@m3ui-vue/m3ui-vue 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) hide show
  1. package/dist/API.md +2914 -348
  2. package/dist/MButton-CuNzpoxm.js +172 -0
  3. package/dist/MButton-CuNzpoxm.js.map +1 -0
  4. package/dist/MDialog-HxEL-m58.js +173 -0
  5. package/dist/MDialog-HxEL-m58.js.map +1 -0
  6. package/dist/MIconButton-DoNotQ9v.js +282 -0
  7. package/dist/MIconButton-DoNotQ9v.js.map +1 -0
  8. package/dist/MListItem-DnPtv-hY.js +824 -0
  9. package/dist/MListItem-DnPtv-hY.js.map +1 -0
  10. package/dist/MLoadingIndicator-BQMNX6Dx.js +115 -0
  11. package/dist/MLoadingIndicator-BQMNX6Dx.js.map +1 -0
  12. package/dist/MMenuItem-Bih0h4-n.js +604 -0
  13. package/dist/MMenuItem-Bih0h4-n.js.map +1 -0
  14. package/dist/MProgressBar-BCoruxA-.js +184 -0
  15. package/dist/MProgressBar-BCoruxA-.js.map +1 -0
  16. package/dist/MSeekBar-LURE1Ah7.js +435 -0
  17. package/dist/MSeekBar-LURE1Ah7.js.map +1 -0
  18. package/dist/MSegmentedButton-DL9JtJFX.js +65 -0
  19. package/dist/MSegmentedButton-DL9JtJFX.js.map +1 -0
  20. package/dist/MSlider-_J4IS2_z.js +691 -0
  21. package/dist/MSlider-_J4IS2_z.js.map +1 -0
  22. package/dist/MSpinner-BhkMYKOM.js +65 -0
  23. package/dist/MSpinner-BhkMYKOM.js.map +1 -0
  24. package/dist/MTextField-CkzwNBWS.js +296 -0
  25. package/dist/MTextField-CkzwNBWS.js.map +1 -0
  26. package/dist/MTooltip-B67ZDSGp.js +756 -0
  27. package/dist/MTooltip-B67ZDSGp.js.map +1 -0
  28. package/dist/_storageKeys-CYXsUBwK.js +18 -0
  29. package/dist/_storageKeys-CYXsUBwK.js.map +1 -0
  30. package/dist/_useEscapeStack-CjndQhqg.js +19 -0
  31. package/dist/_useEscapeStack-CjndQhqg.js.map +1 -0
  32. package/dist/api.json +1 -1
  33. package/dist/chart.js +1 -1
  34. package/dist/code-editor.js +1 -1
  35. package/dist/components/MAudioPlayer.vue.d.ts +115 -0
  36. package/dist/components/MBadge.vue.d.ts +1 -1
  37. package/dist/components/MBottomSheetScaffold.vue.d.ts +1 -1
  38. package/dist/components/MBox.vue.d.ts +1 -1
  39. package/dist/components/MButton.vue.d.ts +1 -1
  40. package/dist/components/MConfirmDialog.vue.d.ts +1 -1
  41. package/dist/components/MCopyButton.vue.d.ts +2 -2
  42. package/dist/components/MDataTable.vue.d.ts +2 -2
  43. package/dist/components/MDialog.vue.d.ts +2 -2
  44. package/dist/components/MDivider.vue.d.ts +1 -1
  45. package/dist/components/MDragHandle.vue.d.ts +1 -1
  46. package/dist/components/MDrawCanvas.vue.d.ts +148 -0
  47. package/dist/components/MDrawLayers.vue.d.ts +3 -0
  48. package/dist/components/MDrawToolbar.vue.d.ts +34 -0
  49. package/dist/components/MExportButton.vue.d.ts +1 -1
  50. package/dist/components/MFab.vue.d.ts +2 -2
  51. package/dist/components/MFabMenu.vue.d.ts +2 -2
  52. package/dist/components/MFixed.vue.d.ts +1 -1
  53. package/dist/components/MFlex.vue.d.ts +2 -2
  54. package/dist/components/MFloorPlan.vue.d.ts +160 -0
  55. package/dist/components/MFlow.vue.d.ts +305 -0
  56. package/dist/components/MFlowControls.vue.d.ts +33 -0
  57. package/dist/components/MFlowHandle.vue.d.ts +16 -0
  58. package/dist/components/MFlowMinimap.vue.d.ts +22 -0
  59. package/dist/components/MFlowNode.vue.d.ts +35 -0
  60. package/dist/components/MGantt.vue.d.ts +141 -0
  61. package/dist/components/MGanttControls.vue.d.ts +32 -0
  62. package/dist/components/MIconButton.vue.d.ts +3 -1
  63. package/dist/components/MImageCropper.vue.d.ts +110 -0
  64. package/dist/components/MInfiniteScroll.vue.d.ts +1 -1
  65. package/dist/components/MLightbox.vue.d.ts +2 -2
  66. package/dist/components/MList.vue.d.ts +1 -1
  67. package/dist/components/MLoadingOverlay.vue.d.ts +1 -1
  68. package/dist/components/MMap.vue.d.ts +1 -1
  69. package/dist/components/MMapControl.vue.d.ts +1 -1
  70. package/dist/components/MMapSearch.vue.d.ts +1 -1
  71. package/dist/components/MMaskField.vue.d.ts +12 -1
  72. package/dist/components/MMenu.vue.d.ts +1 -1
  73. package/dist/components/MNavigationDrawer.vue.d.ts +1 -1
  74. package/dist/components/MNumberField.vue.d.ts +11 -2
  75. package/dist/components/MPdfViewer.vue.d.ts +174 -0
  76. package/dist/components/MPullToRefresh.vue.d.ts +1 -1
  77. package/dist/components/MResourceTimeline.vue.d.ts +149 -0
  78. package/dist/components/MScheduler.vue.d.ts +3 -3
  79. package/dist/components/MScheme.vue.d.ts +1 -1
  80. package/dist/components/MSearchField.vue.d.ts +1 -1
  81. package/dist/components/MSeekBar.vue.d.ts +1 -1
  82. package/dist/components/MSimpleCarousel.vue.d.ts +1 -1
  83. package/dist/components/MSkeleton.vue.d.ts +1 -1
  84. package/dist/components/MSlider.vue.d.ts +4 -4
  85. package/dist/components/MSparkline.vue.d.ts +1 -1
  86. package/dist/components/MSplitter.vue.d.ts +1 -1
  87. package/dist/components/MStack.vue.d.ts +2 -2
  88. package/dist/components/MSwipeToDismiss.vue.d.ts +1 -1
  89. package/dist/components/MSwitch.vue.d.ts +1 -1
  90. package/dist/components/MTable.vue.d.ts +1 -1
  91. package/dist/components/MTagInput.vue.d.ts +12 -1
  92. package/dist/components/MTextField.vue.d.ts +13 -2
  93. package/dist/components/MToolbar.vue.d.ts +1 -1
  94. package/dist/components/MTree.vue.d.ts +2 -2
  95. package/dist/components/MVideoPlayer.vue.d.ts +253 -0
  96. package/dist/components/MVirtualTable.vue.d.ts +1 -1
  97. package/dist/components/MWindow.vue.d.ts +3 -3
  98. package/dist/components/_MFlowEdge.vue.d.ts +9 -0
  99. package/dist/components/_MFlowEdgeLabel.vue.d.ts +9 -0
  100. package/dist/components/_MFlowNodeShell.vue.d.ts +9 -0
  101. package/dist/components/_MPdfPage.vue.d.ts +76 -0
  102. package/dist/components/_MTimeBackground.vue.d.ts +14 -0
  103. package/dist/components/_MTimeHeader.vue.d.ts +20 -0
  104. package/dist/composables/_effectCanvas.d.ts +23 -0
  105. package/dist/composables/_flowPanel.d.ts +2 -0
  106. package/dist/composables/_flowSlot.d.ts +5 -0
  107. package/dist/composables/_ganttTime.d.ts +41 -0
  108. package/dist/composables/_storageKeys.d.ts +9 -0
  109. package/dist/composables/_useTimeAxis.d.ts +90 -0
  110. package/dist/composables/drawGeometry.d.ts +119 -0
  111. package/dist/composables/flowFormats.d.ts +79 -0
  112. package/dist/composables/flowLayout.d.ts +45 -0
  113. package/dist/composables/flowPaths.d.ts +53 -0
  114. package/dist/composables/ganttFormats.d.ts +52 -0
  115. package/dist/composables/ganttSchedule.d.ts +99 -0
  116. package/dist/composables/themeInitScript.d.ts +2 -0
  117. package/dist/composables/useConfetti.d.ts +19 -8
  118. package/dist/composables/useDrawing.d.ts +44 -0
  119. package/dist/composables/useFireworks.d.ts +37 -0
  120. package/dist/composables/useFlow.d.ts +266 -0
  121. package/dist/composables/useGantt.d.ts +87 -0
  122. package/dist/composables/useLocale.d.ts +163 -0
  123. package/dist/composables/useMediaPlayer.d.ts +101 -0
  124. package/dist/composables/usePdf.d.ts +119 -0
  125. package/dist/composables/useReactions.d.ts +32 -0
  126. package/dist/composables/useResourceTimeline.d.ts +70 -0
  127. package/dist/composables/viewportHints.d.ts +2 -0
  128. package/dist/directives/vSparkle.d.ts +27 -0
  129. package/dist/draw.d.ts +7 -0
  130. package/dist/draw.js +1700 -0
  131. package/dist/draw.js.map +1 -0
  132. package/dist/flow.d.ts +14 -0
  133. package/dist/flow.js +3542 -0
  134. package/dist/flow.js.map +1 -0
  135. package/dist/flowPaths-CUc6X373.js +161 -0
  136. package/dist/flowPaths-CUc6X373.js.map +1 -0
  137. package/dist/gantt.d.ts +12 -0
  138. package/dist/gantt.js +3575 -0
  139. package/dist/gantt.js.map +1 -0
  140. package/dist/index.d.ts +11 -1
  141. package/dist/locales/index.js +1148 -7
  142. package/dist/locales/index.js.map +1 -1
  143. package/dist/m3ui-vue.css +1 -1
  144. package/dist/m3ui.js +7822 -7809
  145. package/dist/m3ui.js.map +1 -1
  146. package/dist/map.js +593 -588
  147. package/dist/map.js.map +1 -1
  148. package/dist/media.d.ts +5 -0
  149. package/dist/media.js +1311 -0
  150. package/dist/media.js.map +1 -0
  151. package/dist/pdf.d.ts +4 -0
  152. package/dist/pdf.js +1871 -0
  153. package/dist/pdf.js.map +1 -0
  154. package/dist/plugin.d.ts +10 -0
  155. package/dist/rich-text-editor.js +28 -26
  156. package/dist/rich-text-editor.js.map +1 -1
  157. package/dist/styles.css +1 -1
  158. package/dist/{useLocale-JYxDDeXC.js → useLocale-BpGxplLV.js} +165 -2
  159. package/dist/useLocale-BpGxplLV.js.map +1 -0
  160. package/dist/{useThemeTokens-Bv-Uv8eX.js → useThemeTokens-DQQcaWbE.js} +41 -40
  161. package/dist/useThemeTokens-DQQcaWbE.js.map +1 -0
  162. package/package.json +29 -5
  163. package/src/__tests__/MAudioPlayer.test.ts +75 -0
  164. package/src/__tests__/MDrawCanvas.test.ts +110 -0
  165. package/src/__tests__/MFloorPlan.test.ts +97 -0
  166. package/src/__tests__/MFlow.test.ts +575 -0
  167. package/src/__tests__/MGantt.test.ts +130 -0
  168. package/src/__tests__/MImageCropper.test.ts +89 -0
  169. package/src/__tests__/MPdfViewer.test.ts +235 -0
  170. package/src/__tests__/MResourceTimeline.test.ts +102 -0
  171. package/src/__tests__/MSlider.test.ts +36 -0
  172. package/src/__tests__/MVideoPlayer.test.ts +201 -0
  173. package/src/__tests__/drawGeometry.test.ts +58 -0
  174. package/src/__tests__/fieldExpose.test.ts +30 -0
  175. package/src/__tests__/flowFormats.test.ts +185 -0
  176. package/src/__tests__/flowLayout.test.ts +113 -0
  177. package/src/__tests__/ganttFormats.test.ts +76 -0
  178. package/src/__tests__/ganttSchedule.test.ts +136 -0
  179. package/src/__tests__/pdfMock.ts +83 -0
  180. package/src/__tests__/plugin.test.ts +56 -1
  181. package/src/__tests__/ssr.test.ts +1 -1
  182. package/src/__tests__/themeInitScript.test.ts +10 -0
  183. package/src/__tests__/useConfetti.test.ts +33 -2
  184. package/src/__tests__/useFireworks.test.ts +104 -0
  185. package/src/__tests__/useMediaPlayer.test.ts +182 -0
  186. package/src/__tests__/usePdf.test.ts +102 -0
  187. package/src/__tests__/useReactions.test.ts +51 -0
  188. package/src/__tests__/vSparkle.test.ts +83 -0
  189. package/src/components/MAudioPlayer.vue +319 -0
  190. package/src/components/MDrawCanvas.vue +813 -0
  191. package/src/components/MDrawLayers.vue +114 -0
  192. package/src/components/MDrawToolbar.vue +171 -0
  193. package/src/components/MEmojiSelector.vue +3 -2
  194. package/src/components/MFloorPlan.vue +581 -0
  195. package/src/components/MFlow.vue +2049 -0
  196. package/src/components/MFlowControls.vue +110 -0
  197. package/src/components/MFlowHandle.vue +60 -0
  198. package/src/components/MFlowMinimap.vue +134 -0
  199. package/src/components/MFlowNode.vue +98 -0
  200. package/src/components/MGantt.vue +1609 -0
  201. package/src/components/MGanttControls.vue +77 -0
  202. package/src/components/MIconButton.vue +3 -1
  203. package/src/components/MImageCropper.vue +507 -0
  204. package/src/components/MMap.vue +3 -2
  205. package/src/components/MMaskField.vue +13 -0
  206. package/src/components/MNumberField.vue +13 -0
  207. package/src/components/MPdfViewer.vue +1269 -0
  208. package/src/components/MResourceTimeline.vue +1020 -0
  209. package/src/components/MSlider.vue +22 -4
  210. package/src/components/MTagInput.vue +13 -0
  211. package/src/components/MTextField.vue +24 -4
  212. package/src/components/MVideoPlayer.vue +839 -0
  213. package/src/components/_MFlowEdge.vue +100 -0
  214. package/src/components/_MFlowEdgeLabel.vue +56 -0
  215. package/src/components/_MFlowNodeShell.vue +111 -0
  216. package/src/components/_MPdfPage.vue +456 -0
  217. package/src/components/_MTimeBackground.vue +16 -0
  218. package/src/components/_MTimeHeader.vue +31 -0
  219. package/src/composables/_colorUtils.ts +4 -2
  220. package/src/composables/_effectCanvas.ts +109 -0
  221. package/src/composables/_flowPanel.ts +13 -0
  222. package/src/composables/_flowSlot.ts +6 -0
  223. package/src/composables/_ganttTime.ts +200 -0
  224. package/src/composables/_ssrState.ts +2 -2
  225. package/src/composables/_storageKeys.ts +28 -0
  226. package/src/composables/_useTimeAxis.ts +224 -0
  227. package/src/composables/drawGeometry.ts +405 -0
  228. package/src/composables/flowFormats.ts +916 -0
  229. package/src/composables/flowLayout.ts +297 -0
  230. package/src/composables/flowPaths.ts +239 -0
  231. package/src/composables/ganttFormats.ts +366 -0
  232. package/src/composables/ganttSchedule.ts +403 -0
  233. package/src/composables/themeInitScript.ts +5 -2
  234. package/src/composables/useColorPalette.ts +36 -8
  235. package/src/composables/useConfetti.ts +84 -107
  236. package/src/composables/useDrawing.ts +53 -0
  237. package/src/composables/useFireworks.ts +360 -0
  238. package/src/composables/useFlow.ts +250 -0
  239. package/src/composables/useGantt.ts +92 -0
  240. package/src/composables/useLocale.ts +328 -0
  241. package/src/composables/useMediaPlayer.ts +406 -0
  242. package/src/composables/usePdf.ts +456 -0
  243. package/src/composables/useReactions.ts +131 -0
  244. package/src/composables/useResourceTimeline.ts +76 -0
  245. package/src/composables/useTheme.ts +21 -4
  246. package/src/composables/viewportHints.ts +6 -5
  247. package/src/directives/vSparkle.ts +180 -0
  248. package/src/draw.ts +25 -0
  249. package/src/flow.ts +26 -0
  250. package/src/gantt.ts +12 -0
  251. package/src/index.ts +11 -1
  252. package/src/locales/de.ts +163 -0
  253. package/src/locales/es.ts +163 -0
  254. package/src/locales/fr.ts +163 -0
  255. package/src/locales/ja.ts +163 -0
  256. package/src/locales/ko.ts +163 -0
  257. package/src/locales/pt.ts +163 -0
  258. package/src/locales/zh.ts +163 -0
  259. package/src/media.ts +5 -0
  260. package/src/pdf.ts +15 -0
  261. package/src/plugin.ts +21 -5
  262. package/dist/MMenuItem-DI351kIf.js +0 -929
  263. package/dist/MMenuItem-DI351kIf.js.map +0 -1
  264. package/dist/MSlider-BnEy5ieZ.js +0 -1500
  265. package/dist/MSlider-BnEy5ieZ.js.map +0 -1
  266. package/dist/MTextField-BBmkaIbO.js +0 -633
  267. package/dist/MTextField-BBmkaIbO.js.map +0 -1
  268. package/dist/useLocale-JYxDDeXC.js.map +0 -1
  269. package/dist/useThemeTokens-Bv-Uv8eX.js.map +0 -1
package/dist/map.js CHANGED
@@ -1,41 +1,46 @@
1
- import { t as e } from "./useThemeTokens-Bv-Uv8eX.js";
2
- import { i as t } from "./useLocale-JYxDDeXC.js";
3
- import { _ as n, g as r, h as i, n as a, p as o, r as s, t as c, v as l } from "./MTextField-BBmkaIbO.js";
4
- import { i as u } from "./motion-DZiXG09o.js";
5
- import { t as d } from "./MIcon-Bxh9j135.js";
6
- import { c as f, i as p, n as m, o as h, t as g } from "./MSlider-BnEy5ieZ.js";
7
- import { Fragment as _, Transition as v, computed as y, createBlock as b, createCommentVNode as x, createElementBlock as S, createElementVNode as C, createSlots as w, createTextVNode as T, createVNode as E, defineComponent as D, getCurrentInstance as O, inject as k, markRaw as A, mergeProps as j, normalizeClass as M, normalizeStyle as N, onBeforeUnmount as P, onMounted as F, onUnmounted as I, openBlock as L, provide as R, reactive as ee, ref as z, renderList as B, renderSlot as V, shallowRef as H, toDisplayString as U, toValue as W, unref as G, useId as te, useSlots as ne, watch as K, withCtx as q, withModifiers as J } from "vue";
1
+ import { t as e } from "./useThemeTokens-DQQcaWbE.js";
2
+ import { o as t } from "./_storageKeys-CYXsUBwK.js";
3
+ import { i as n } from "./useLocale-BpGxplLV.js";
4
+ import { d as r, f as i, l as a, t as o, u as s } from "./MIconButton-DoNotQ9v.js";
5
+ import { i as c } from "./motion-DZiXG09o.js";
6
+ import { t as l } from "./MIcon-Bxh9j135.js";
7
+ import { t as u } from "./MSpinner-BhkMYKOM.js";
8
+ import { t as d } from "./MTextField-CkzwNBWS.js";
9
+ import { t as f } from "./_useEscapeStack-CjndQhqg.js";
10
+ import { a as p, r as m, s as h, t as g } from "./MListItem-DnPtv-hY.js";
11
+ import { t as _ } from "./MSlider-_J4IS2_z.js";
12
+ import { Fragment as v, Transition as y, computed as b, createBlock as x, createCommentVNode as S, createElementBlock as C, createElementVNode as w, createSlots as T, createTextVNode as E, createVNode as D, defineComponent as O, getCurrentInstance as k, inject as A, markRaw as j, mergeProps as M, normalizeClass as N, normalizeStyle as P, onBeforeUnmount as F, onMounted as ee, onUnmounted as I, openBlock as L, provide as te, reactive as R, ref as z, renderList as B, renderSlot as V, shallowRef as H, toDisplayString as U, toValue as ne, unref as W, useId as re, useSlots as G, watch as K, withCtx as q, withModifiers as J } from "vue";
8
13
  //#region src/composables/useMap.ts
9
- var re = Symbol("m3-map");
10
- function ie(e) {
11
- let t = k(re, null);
14
+ var ie = Symbol("m3-map");
15
+ function ae(e) {
16
+ let t = A(ie, null);
12
17
  if (t || e === void 0) return t;
13
- let n = y(() => {
14
- let t = W(e);
18
+ let n = b(() => {
19
+ let t = ne(e);
15
20
  return t ? "context" in t ? t.context : t : void 0;
16
21
  }), r = {
17
- map: y(() => n.value?.map.value),
18
- maplibre: y(() => n.value?.maplibre.value),
19
- styleVersion: y(() => n.value?.styleVersion.value ?? 0),
20
- model: y(() => n.value?.model.value),
22
+ map: b(() => n.value?.map.value),
23
+ maplibre: b(() => n.value?.maplibre.value),
24
+ styleVersion: b(() => n.value?.styleVersion.value ?? 0),
25
+ model: b(() => n.value?.model.value),
21
26
  layerState: new Proxy({
22
27
  visible: {},
23
28
  opacity: {}
24
29
  }, { get: (e, t) => Reflect.get(n.value?.layerState ?? e, t) }),
25
- activeTool: y({
30
+ activeTool: b({
26
31
  get: () => n.value?.activeTool.value ?? null,
27
32
  set: (e) => {
28
33
  n.value && (n.value.activeTool.value = e);
29
34
  }
30
35
  })
31
36
  };
32
- return R(re, r), r;
37
+ return te(ie, r), r;
33
38
  }
34
39
  function Y(e) {
35
- let t = ie(e);
40
+ let t = ae(e);
36
41
  if (!t) throw Error("useMap() must be called in a component inside <MMap>, or be given one");
37
42
  let n = [];
38
- O() && P(() => n.splice(0).forEach((e) => e()));
43
+ k() && F(() => n.splice(0).forEach((e) => e()));
39
44
  function r(e) {
40
45
  let r = () => {
41
46
  if (t.map.value && t.maplibre.value) return e(t.map.value, t.maplibre.value);
@@ -43,8 +48,8 @@ function Y(e) {
43
48
  n && t.maplibre.value && (r(), e(n, t.maplibre.value));
44
49
  });
45
50
  n.push(r);
46
- }, i = O();
47
- i && !i.isMounted ? F(r) : r();
51
+ }, i = k();
52
+ i && !i.isMounted ? ee(r) : r();
48
53
  }
49
54
  function i(e, t) {
50
55
  r((r) => {
@@ -57,9 +62,9 @@ function Y(e) {
57
62
  });
58
63
  }
59
64
  return {
60
- map: y(() => t.map.value),
61
- maplibre: y(() => t.maplibre.value),
62
- styleVersion: y(() => t.styleVersion.value),
65
+ map: b(() => t.map.value),
66
+ maplibre: b(() => t.maplibre.value),
67
+ styleVersion: b(() => t.styleVersion.value),
63
68
  activeTool: t.activeTool,
64
69
  onReady: r,
65
70
  on: i,
@@ -68,10 +73,10 @@ function Y(e) {
68
73
  }
69
74
  //#endregion
70
75
  //#region src/components/MMapControl.vue?vue&type=script&setup=true&lang.ts
71
- var ae = { class: "hidden" }, X = {
76
+ var oe = { class: "hidden" }, X = {
72
77
  key: 0,
73
78
  class: "m3-map-control-panel-in"
74
- }, oe = /* @__PURE__ */ D({
79
+ }, se = /* @__PURE__ */ O({
75
80
  inheritAttrs: !1,
76
81
  __name: "MMapControl",
77
82
  props: {
@@ -91,22 +96,22 @@ var ae = { class: "hidden" }, X = {
91
96
  },
92
97
  emits: ["update:expanded"],
93
98
  setup(e, { emit: t }) {
94
- let a = e, o = t, s = ne(), c = z(), { onReady: d } = Y(), f = z(a.expanded);
95
- K(() => a.expanded, (e) => {
99
+ let n = e, o = t, l = G(), u = z(), { onReady: d } = Y(), f = z(n.expanded);
100
+ K(() => n.expanded, (e) => {
96
101
  f.value = e;
97
102
  });
98
- let p = y(() => f.value && !!s.panel);
103
+ let p = b(() => f.value && !!l.panel);
99
104
  function m(e) {
100
105
  e !== f.value && (f.value = e, o("update:expanded", e));
101
106
  }
102
107
  let h = () => m(!f.value), g = () => m(!1);
103
108
  function _(e) {
104
- p.value && !c.value?.contains(e.target) && g();
109
+ p.value && !u.value?.contains(e.target) && g();
105
110
  }
106
111
  function v(e) {
107
112
  e.key === "Escape" && p.value && (g(), e.stopPropagation());
108
113
  }
109
- let b = null, x = null, w = [], T = {
114
+ let y = null, x = null, S = [], T = {
110
115
  w: 0,
111
116
  h: 0
112
117
  }, E = {
@@ -115,114 +120,114 @@ var ae = { class: "hidden" }, X = {
115
120
  }, D = null;
116
121
  function O() {
117
122
  return {
118
- w: c.value.offsetWidth,
119
- h: c.value.offsetHeight
123
+ w: u.value.offsetWidth,
124
+ h: u.value.offsetHeight
120
125
  };
121
126
  }
122
127
  function k() {
123
- let e = c.value;
128
+ let e = u.value;
124
129
  if (!e || x) return;
125
130
  let t = O();
126
- b && (t.w !== b.w || t.h !== b.h) && a.animate && !r() && A(e, b, t), b = t;
131
+ y && (t.w !== y.w || t.h !== y.h) && n.animate && !s() && A(e, y, t), y = t;
127
132
  }
128
133
  function A(e, t, n) {
129
- if (T = t, E = n, w = l(0, 1, 0, u.standard.defaultSpatial, .002), e.style.overflow = "hidden", x = i(e, w, (e) => ({
134
+ if (T = t, E = n, S = i(0, 1, 0, c.standard.defaultSpatial, .002), e.style.overflow = "hidden", x = a(e, S, (e) => ({
130
135
  width: `${t.w + (n.w - t.w) * e}px`,
131
136
  height: `${t.h + (n.h - t.h) * e}px`
132
- })), !x) return M(e);
133
- x.onfinish = () => M(e);
137
+ })), !x) return j(e);
138
+ x.onfinish = () => j(e);
134
139
  }
135
- function M(e) {
140
+ function j(e) {
136
141
  x?.cancel(), x = null, e.style.overflow = "";
137
142
  let t = O();
138
- t.w !== E.w || t.h !== E.h ? (b = E, k()) : b = t;
143
+ t.w !== E.w || t.h !== E.h ? (y = E, k()) : y = t;
139
144
  }
140
145
  function N() {
141
- if (!c.value || !x) return;
142
- let e = n(w, x.currentTime), t = {
146
+ if (!u.value || !x) return;
147
+ let e = r(S, x.currentTime), t = {
143
148
  w: T.w + (E.w - T.w) * e,
144
149
  h: T.h + (E.h - T.h) * e
145
150
  };
146
- x.onfinish = null, x.cancel(), x = null, b = t, k();
151
+ x.onfinish = null, x.cancel(), x = null, y = t, k();
147
152
  }
148
153
  K(p, N, { flush: "post" });
149
- let I, R = {
150
- onAdd: () => c.value,
151
- onRemove: () => c.value?.remove()
154
+ let P, I = {
155
+ onAdd: () => u.value,
156
+ onRemove: () => u.value?.remove()
152
157
  };
153
158
  return d((e) => {
154
- I = e, c.value && e.addControl(R, a.position);
155
- }), K(() => a.position, (e) => {
156
- I && c.value && (I.removeControl(R), I.addControl(R, e));
159
+ P = e, u.value && e.addControl(I, n.position);
160
+ }), K(() => n.position, (e) => {
161
+ P && u.value && (P.removeControl(I), P.addControl(I, e));
162
+ }), ee(() => {
163
+ document.addEventListener("pointerdown", _, !0), !(typeof ResizeObserver > "u" || !u.value) && (D = new ResizeObserver(k), D.observe(u.value));
157
164
  }), F(() => {
158
- document.addEventListener("pointerdown", _, !0), !(typeof ResizeObserver > "u" || !c.value) && (D = new ResizeObserver(k), D.observe(c.value));
159
- }), P(() => {
160
- document.removeEventListener("pointerdown", _, !0), D?.disconnect(), x?.cancel(), I?.hasControl(R) && I.removeControl(R);
161
- }), (t, n) => (L(), S("div", ae, [C("div", j({
165
+ document.removeEventListener("pointerdown", _, !0), D?.disconnect(), x?.cancel(), P?.hasControl(I) && P.removeControl(I);
166
+ }), (t, n) => (L(), C("div", oe, [w("div", M({
162
167
  ref_key: "el",
163
- ref: c,
168
+ ref: u,
164
169
  class: ["maplibregl-ctrl m3-map-control", p.value ? "m3-map-control-panel" : e.group ? "maplibregl-ctrl-group" : ""]
165
- }, t.$attrs, { onKeydown: v }), [p.value ? (L(), S("div", X, [V(t.$slots, "panel", { close: g })])) : V(t.$slots, "default", {
170
+ }, t.$attrs, { onKeydown: v }), [p.value ? (L(), C("div", X, [V(t.$slots, "panel", { close: g })])) : V(t.$slots, "default", {
166
171
  expanded: f.value,
167
172
  toggle: h
168
173
  }, void 0, void 0, 1)], 16)]));
169
174
  }
170
- }), Z = [
175
+ }), ce = [
171
176
  "title",
172
177
  "aria-label",
173
178
  "aria-expanded"
174
- ], se = ["innerHTML"], ce = /* @__PURE__ */ D({
179
+ ], le = ["innerHTML"], ue = /* @__PURE__ */ O({
175
180
  __name: "_MMapAttribution",
176
181
  props: { position: {} },
177
182
  setup(e) {
178
- let n = e, r = t(), { on: i, onReady: a } = Y(), o = z([]), s = z(!0), c = z(0), l;
179
- function u() {
180
- if (!l) return;
181
- let e = l.getStyle?.();
183
+ let t = e, r = n(), { on: i, onReady: a } = Y(), o = z([]), s = z(!0), c = z(0), u;
184
+ function d() {
185
+ if (!u) return;
186
+ let e = u.getStyle?.();
182
187
  if (!e?.sources) return;
183
188
  let t = new Set(e.layers?.map((e) => e.source).filter(Boolean)), n = [];
184
189
  for (let [r, i] of Object.entries(e.sources)) {
185
190
  if (t.size && !t.has(r)) continue;
186
- let e = l.getSource(r)?.attribution ?? i.attribution;
191
+ let e = u.getSource(r)?.attribution ?? i.attribution;
187
192
  e && !n.includes(e) && n.push(e);
188
193
  }
189
194
  let r = n.filter((e) => !n.some((t) => t !== e && t.includes(e)));
190
- r.join("\n") !== o.value.join("\n") && (o.value = r), c.value = Math.max(0, l.getContainer().clientWidth - 20);
195
+ r.join("\n") !== o.value.join("\n") && (o.value = r), c.value = Math.max(0, u.getContainer().clientWidth - 20);
191
196
  }
192
197
  a((e) => {
193
- l = e, u();
194
- }), i("styledata", u), i("sourcedata", u), i("resize", u), i("dragstart", () => {
198
+ u = e, d();
199
+ }), i("styledata", d), i("sourcedata", d), i("resize", d), i("dragstart", () => {
195
200
  s.value = !1;
196
201
  });
197
- let f = y(() => o.value.join(" ")), p = y(() => n.position.endsWith("right"));
198
- return (t, n) => f.value ? (L(), b(oe, {
202
+ let f = b(() => o.value.join(" ")), p = b(() => t.position.endsWith("right"));
203
+ return (t, n) => f.value ? (L(), x(se, {
199
204
  key: 0,
200
205
  position: e.position,
201
206
  group: !1,
202
- class: M(["m3-map-attrib", s.value ? "m3-map-attrib-open" : ""])
207
+ class: N(["m3-map-attrib", s.value ? "m3-map-attrib-open" : ""])
203
208
  }, {
204
- default: q(() => [C("div", {
205
- class: M(["m3-map-attrib-row", p.value ? "flex-row-reverse" : ""]),
206
- style: N(c.value ? { maxWidth: `${c.value}px` } : void 0)
207
- }, [C("button", {
209
+ default: q(() => [w("div", {
210
+ class: N(["m3-map-attrib-row", p.value ? "flex-row-reverse" : ""]),
211
+ style: P(c.value ? { maxWidth: `${c.value}px` } : void 0)
212
+ }, [w("button", {
208
213
  type: "button",
209
214
  class: "m3-map-attrib-button",
210
- title: G(r).mapToggleAttribution,
211
- "aria-label": G(r).mapToggleAttribution,
215
+ title: W(r).mapToggleAttribution,
216
+ "aria-label": W(r).mapToggleAttribution,
212
217
  "aria-expanded": s.value,
213
218
  onClick: n[0] ||= (e) => s.value = !s.value
214
- }, [E(d, {
219
+ }, [D(l, {
215
220
  name: "info",
216
221
  size: 20
217
- })], 8, Z), s.value ? (L(), S("div", {
222
+ })], 8, ce), s.value ? (L(), C("div", {
218
223
  key: 0,
219
- class: M(["m3-map-attrib-text", p.value ? "pl-3.5" : "pr-3.5"]),
224
+ class: N(["m3-map-attrib-text", p.value ? "pl-3.5" : "pr-3.5"]),
220
225
  innerHTML: f.value
221
- }, null, 10, se)) : x("", !0)], 6)]),
226
+ }, null, 10, le)) : S("", !0)], 6)]),
222
227
  _: 1
223
- }, 8, ["position", "class"])) : x("", !0);
228
+ }, 8, ["position", "class"])) : S("", !0);
224
229
  }
225
- }), le = {
230
+ }), de = {
226
231
  fill: ["fill-opacity"],
227
232
  line: ["line-opacity"],
228
233
  circle: ["circle-opacity", "circle-stroke-opacity"],
@@ -231,27 +236,27 @@ var ae = { class: "hidden" }, X = {
231
236
  heatmap: ["heatmap-opacity"],
232
237
  "fill-extrusion": ["fill-extrusion-opacity"]
233
238
  };
234
- function ue() {
235
- return ee({
239
+ function fe() {
240
+ return R({
236
241
  visible: {},
237
242
  opacity: {}
238
243
  });
239
244
  }
240
- function de(e, t, n) {
245
+ function pe(e, t, n) {
241
246
  let r = {}, i = {};
242
247
  for (let e of n?.layers ?? []) {
243
248
  let n = t.getLayer(e.id);
244
249
  if (!n) continue;
245
250
  r[e.id] = t.getLayoutProperty(e.id, "visibility") !== "none";
246
- let a = le[n.type]?.[0], o = a ? t.getPaintProperty(e.id, a) : void 0;
251
+ let a = de[n.type]?.[0], o = a ? t.getPaintProperty(e.id, a) : void 0;
247
252
  i[e.id] = typeof o == "number" ? o : 1;
248
253
  }
249
254
  e.visible = r, e.opacity = i;
250
255
  }
251
- function fe(e) {
252
- let t = ie(e);
256
+ function Z(e) {
257
+ let t = ae(e);
253
258
  if (!t) throw Error("useMapLayers() must be called in a component inside <MMap>, or be given one");
254
- let { map: n, model: r, layerState: i } = t, a = y(() => r.value?.layers ?? []), o = y(() => new Map(a.value.map((e) => [e.id, e])));
259
+ let { map: n, model: r, layerState: i } = t, a = b(() => r.value?.layers ?? []), o = b(() => new Map(a.value.map((e) => [e.id, e])));
255
260
  function s(e) {
256
261
  return i.visible[e] ?? !0;
257
262
  }
@@ -268,7 +273,7 @@ function fe(e) {
268
273
  }
269
274
  function d(e, t) {
270
275
  let r = n.value, a = r?.getLayer(e);
271
- if (a) for (let n of le[a.type] ?? []) r.setPaintProperty(e, n, t);
276
+ if (a) for (let n of de[a.type] ?? []) r.setPaintProperty(e, n, t);
272
277
  i.opacity[e] = t;
273
278
  for (let n of o.value.get(e)?.children ?? []) d(n, t);
274
279
  }
@@ -282,12 +287,12 @@ function fe(e) {
282
287
  function m(e, t) {
283
288
  for (let n of f(e)) c(n.id, t);
284
289
  }
285
- let h = y(() => a.value.filter((e) => e.base)), g = y(() => h.value.find((e) => s(e.id))?.id ?? null);
290
+ let h = b(() => a.value.filter((e) => e.base)), g = b(() => h.value.find((e) => s(e.id))?.id ?? null);
286
291
  function _(e) {
287
292
  for (let t of h.value) c(t.id, t.id === e);
288
293
  }
289
294
  return {
290
- model: y(() => r.value),
295
+ model: b(() => r.value),
291
296
  layers: a,
292
297
  isVisible: s,
293
298
  setVisible: c,
@@ -304,13 +309,13 @@ function fe(e) {
304
309
  }
305
310
  //#endregion
306
311
  //#region src/composables/_mapStyle.ts
307
- function pe(e) {
312
+ function me(e) {
308
313
  return {
309
314
  sources: new Set(Object.keys(e?.sources ?? {})),
310
315
  layers: new Set((e?.layers ?? []).map((e) => e.id))
311
316
  };
312
317
  }
313
- function me(e, t, n, r = () => !0) {
318
+ function he(e, t, n, r = () => !0) {
314
319
  if (!e) return t;
315
320
  let i = new Set(t.layers.map((e) => e.id)), a = e.layers.filter((e) => !n.layers.has(e.id) && !i.has(e.id) && r(e)), o = { ...t.sources };
316
321
  for (let [t, r] of Object.entries(e.sources)) !n.sources.has(t) && !(t in o) && (o[t] = r);
@@ -322,7 +327,7 @@ function me(e, t, n, r = () => !0) {
322
327
  }
323
328
  //#endregion
324
329
  //#region src/components/MMap.vue?vue&type=script&setup=true&lang.ts
325
- var he = 600, ge = /* @__PURE__ */ D({
330
+ var ge = 600, _e = /* @__PURE__ */ O({
326
331
  __name: "MMap",
327
332
  props: {
328
333
  mapStyle: {},
@@ -370,22 +375,22 @@ var he = 600, ge = /* @__PURE__ */ D({
370
375
  "update:bearing",
371
376
  "update:pitch"
372
377
  ],
373
- setup(e, { expose: n, emit: r }) {
374
- let i = e, a = r, o = z(), s = z(), c = H(), l = H(), u = z(0), d, f = H(), p = ue(), m = {
375
- map: c,
376
- maplibre: l,
377
- styleVersion: u,
378
- model: f,
379
- layerState: p,
378
+ setup(e, { expose: r, emit: i }) {
379
+ let a = e, o = i, s = z(), c = z(), l = H(), u = H(), d = z(0), f, p = H(), m = fe(), h = {
380
+ map: l,
381
+ maplibre: u,
382
+ styleVersion: d,
383
+ model: p,
384
+ layerState: m,
380
385
  activeTool: z(null)
381
386
  };
382
- R(re, m);
383
- function h(e) {
384
- f.value = i.adapter ? i.adapter(e.getStyle(), { styleUrl: typeof i.mapStyle == "string" ? i.mapStyle : void 0 }) : void 0, de(p, e, f.value);
387
+ te(ie, h);
388
+ function g(e) {
389
+ p.value = a.adapter ? a.adapter(e.getStyle(), { styleUrl: typeof a.mapStyle == "string" ? a.mapStyle : void 0 }) : void 0, pe(m, e, p.value);
385
390
  }
386
- let g = t(), _ = () => typeof i.persist == "string" ? i.persist : i.persist ? "m3-map-view" : null;
387
- function y() {
388
- let e = _();
391
+ let _ = n(), v = () => typeof a.persist == "string" ? a.persist : a.persist ? t("m3-map-view") : null;
392
+ function b() {
393
+ let e = v();
389
394
  if (!e) return {};
390
395
  try {
391
396
  let t = JSON.parse(localStorage.getItem(e) ?? "null");
@@ -394,7 +399,7 @@ var he = 600, ge = /* @__PURE__ */ D({
394
399
  return {};
395
400
  }
396
401
  }
397
- function w(e) {
402
+ function T(e) {
398
403
  let t = e.getCenter();
399
404
  return {
400
405
  center: [t.lng, t.lat],
@@ -403,7 +408,7 @@ var he = 600, ge = /* @__PURE__ */ D({
403
408
  pitch: e.getPitch()
404
409
  };
405
410
  }
406
- let T = {
411
+ let E = {
407
412
  navigation: {
408
413
  corner: "top-right",
409
414
  create: (e) => new e.NavigationControl()
@@ -417,7 +422,7 @@ var he = 600, ge = /* @__PURE__ */ D({
417
422
  },
418
423
  fullscreen: {
419
424
  corner: "top-right",
420
- create: (e) => new e.FullscreenControl({ container: o.value })
425
+ create: (e) => new e.FullscreenControl({ container: s.value })
421
426
  },
422
427
  scale: {
423
428
  corner: "bottom-left",
@@ -426,74 +431,74 @@ var he = 600, ge = /* @__PURE__ */ D({
426
431
  unit: "metric"
427
432
  })
428
433
  }
429
- }, D = /* @__PURE__ */ new Map();
430
- function O(e) {
431
- let t = c.value, n = l.value;
434
+ }, O = /* @__PURE__ */ new Map();
435
+ function k(e) {
436
+ let t = l.value, n = u.value;
432
437
  if (!t || !n) return;
433
- let r = D.get(e);
434
- r && (t.removeControl(r), D.delete(e));
435
- let a = i[e];
436
- if (!a) return;
437
- let o = T[e].create(n);
438
- t.addControl(o, a === !0 ? T[e].corner : a), D.set(e, o);
439
- }
440
- for (let e of Object.keys(T)) K(() => i[e], () => O(e));
441
- function k() {
438
+ let r = O.get(e);
439
+ r && (t.removeControl(r), O.delete(e));
440
+ let i = a[e];
441
+ if (!i) return;
442
+ let o = E[e].create(n);
443
+ t.addControl(o, i === !0 ? E[e].corner : i), O.set(e, o);
444
+ }
445
+ for (let e of Object.keys(E)) K(() => a[e], () => k(e));
446
+ function A() {
442
447
  return {
443
- "AttributionControl.ToggleAttribution": g.mapToggleAttribution,
444
- "AttributionControl.MapFeedback": g.mapFeedback,
445
- "FullscreenControl.Enter": g.mapEnterFullscreen,
446
- "FullscreenControl.Exit": g.mapExitFullscreen,
447
- "GeolocateControl.FindMyLocation": g.mapFindMyLocation,
448
- "GeolocateControl.LocationNotAvailable": g.mapLocationNotAvailable,
449
- "Map.Title": g.mapTitle,
450
- "Marker.Title": g.mapMarker,
451
- "NavigationControl.ResetBearing": g.mapResetBearing,
452
- "NavigationControl.ZoomIn": g.mapZoomIn,
453
- "NavigationControl.ZoomOut": g.mapZoomOut,
454
- "Popup.Close": g.close,
455
- "CooperativeGesturesHandler.WindowsHelpText": g.mapCtrlScroll,
456
- "CooperativeGesturesHandler.MacHelpText": g.mapCmdScroll,
457
- "CooperativeGesturesHandler.MobileHelpText": g.mapTwoFingers
448
+ "AttributionControl.ToggleAttribution": _.mapToggleAttribution,
449
+ "AttributionControl.MapFeedback": _.mapFeedback,
450
+ "FullscreenControl.Enter": _.mapEnterFullscreen,
451
+ "FullscreenControl.Exit": _.mapExitFullscreen,
452
+ "GeolocateControl.FindMyLocation": _.mapFindMyLocation,
453
+ "GeolocateControl.LocationNotAvailable": _.mapLocationNotAvailable,
454
+ "Map.Title": _.mapTitle,
455
+ "Marker.Title": _.mapMarker,
456
+ "NavigationControl.ResetBearing": _.mapResetBearing,
457
+ "NavigationControl.ZoomIn": _.mapZoomIn,
458
+ "NavigationControl.ZoomOut": _.mapZoomOut,
459
+ "Popup.Close": _.close,
460
+ "CooperativeGesturesHandler.WindowsHelpText": _.mapCtrlScroll,
461
+ "CooperativeGesturesHandler.MacHelpText": _.mapCmdScroll,
462
+ "CooperativeGesturesHandler.MobileHelpText": _.mapTwoFingers
458
463
  };
459
464
  }
460
- let j = z(null), ee, B;
461
- function W(e) {
465
+ let M = z(null), R, B;
466
+ function ne(e) {
462
467
  let t = e.getAttribute("title");
463
468
  t && e.closest(".maplibregl-ctrl") && (e.setAttribute("data-m3-tip", t), e.hasAttribute("aria-label") || e.setAttribute("aria-label", t), e.removeAttribute("title"));
464
469
  }
465
- function G(e) {
466
- let t = e.getAttribute("data-m3-tip"), n = o.value?.getBoundingClientRect();
470
+ function W(e) {
471
+ let t = e.getAttribute("data-m3-tip"), n = s.value?.getBoundingClientRect();
467
472
  if (!t || !n) return;
468
473
  let r = e.getBoundingClientRect(), i = r.left + r.width / 2 > n.left + n.width / 2;
469
- j.value = {
474
+ M.value = {
470
475
  text: t,
471
476
  left: i,
472
477
  x: (i ? r.left - 8 : r.right + 8) - n.left,
473
478
  y: r.top + r.height / 2 - n.top
474
479
  };
475
480
  }
476
- function te() {
477
- clearTimeout(ee), j.value = null;
481
+ function re() {
482
+ clearTimeout(R), M.value = null;
478
483
  }
479
- let ne = (e) => e.target?.closest?.(".maplibregl-ctrl [data-m3-tip]") ?? null;
484
+ let G = (e) => e.target?.closest?.(".maplibregl-ctrl [data-m3-tip]") ?? null;
480
485
  function J(e) {
481
- let t = ne(e);
482
- t && e.pointerType !== "touch" && (clearTimeout(ee), ee = setTimeout(() => G(t), he));
486
+ let t = G(e);
487
+ t && e.pointerType !== "touch" && (clearTimeout(R), R = setTimeout(() => W(t), ge));
483
488
  }
484
- function ie(e) {
485
- let t = ne(e);
486
- t && !t.contains(e.relatedTarget) && te();
489
+ function ae(e) {
490
+ let t = G(e);
491
+ t && !t.contains(e.relatedTarget) && re();
487
492
  }
488
493
  function Y(e) {
489
- let t = ne(e);
490
- t?.matches(":focus-visible") && G(t);
491
- }
492
- F(() => {
493
- let e = o.value;
494
- e && (e.querySelectorAll("[title]").forEach(W), B = new MutationObserver((e) => {
495
- for (let t of e) t.type === "attributes" ? W(t.target) : t.addedNodes.forEach((e) => {
496
- e instanceof Element && (W(e), e.querySelectorAll("[title]").forEach(W));
494
+ let t = G(e);
495
+ t?.matches(":focus-visible") && W(t);
496
+ }
497
+ ee(() => {
498
+ let e = s.value;
499
+ e && (e.querySelectorAll("[title]").forEach(ne), B = new MutationObserver((e) => {
500
+ for (let t of e) t.type === "attributes" ? ne(t.target) : t.addedNodes.forEach((e) => {
501
+ e instanceof Element && (ne(e), e.querySelectorAll("[title]").forEach(ne));
497
502
  });
498
503
  }), B.observe(e, {
499
504
  subtree: !0,
@@ -501,118 +506,118 @@ var he = 600, ge = /* @__PURE__ */ D({
501
506
  attributes: !0,
502
507
  attributeFilter: ["title"]
503
508
  }));
504
- }), P(() => {
505
- B?.disconnect(), clearTimeout(ee);
509
+ }), F(() => {
510
+ B?.disconnect(), clearTimeout(R);
506
511
  });
507
- let ae = !1;
508
- F(async () => {
512
+ let oe = !1;
513
+ ee(async () => {
509
514
  let e = await import("maplibre-gl"), t = "Map" in e ? e : e.default;
510
- if (ae || !s.value) return;
511
- let n = y(), r = {
512
- center: n.center ?? i.center,
513
- zoom: n.zoom ?? i.zoom,
514
- bearing: n.bearing ?? i.bearing,
515
- pitch: n.pitch ?? i.pitch
516
- }, o = A(new t.Map({
517
- container: s.value,
518
- style: i.mapStyle,
515
+ if (oe || !c.value) return;
516
+ let n = b(), r = {
517
+ center: n.center ?? a.center,
518
+ zoom: n.zoom ?? a.zoom,
519
+ bearing: n.bearing ?? a.bearing,
520
+ pitch: n.pitch ?? a.pitch
521
+ }, i = j(new t.Map({
522
+ container: c.value,
523
+ style: a.mapStyle,
519
524
  attributionControl: !1,
520
- locale: k(),
525
+ locale: A(),
521
526
  ...Object.fromEntries(Object.entries(r).filter(([, e]) => e !== void 0)),
522
- ...i.options
527
+ ...a.options
523
528
  }));
524
- l.value = t, o.on("style.load", () => {
525
- d ||= pe(o.getStyle()), h(o), u.value++;
526
- }), o.on("click", (e) => a("click", e)), o.on("moveend", () => {
527
- let e = w(o);
528
- a("update:center", e.center), a("update:zoom", e.zoom), a("update:bearing", e.bearing), a("update:pitch", e.pitch);
529
- let t = _();
529
+ u.value = t, i.on("style.load", () => {
530
+ f ||= me(i.getStyle()), g(i), d.value++;
531
+ }), i.on("click", (e) => o("click", e)), i.on("moveend", () => {
532
+ let e = T(i);
533
+ o("update:center", e.center), o("update:zoom", e.zoom), o("update:bearing", e.bearing), o("update:pitch", e.pitch);
534
+ let t = v();
530
535
  if (t) try {
531
536
  localStorage.setItem(t, JSON.stringify(e));
532
537
  } catch {}
533
- }), o.once("load", () => {
534
- c.value = o;
535
- for (let e of Object.keys(T)) O(e);
536
- a("ready", o);
538
+ }), i.once("load", () => {
539
+ l.value = i;
540
+ for (let e of Object.keys(E)) k(e);
541
+ o("ready", i);
537
542
  });
538
543
  }), I(() => {
539
- ae = !0, c.value?.remove(), c.value = void 0;
544
+ oe = !0, l.value?.remove(), l.value = void 0;
540
545
  });
541
546
  let X = (e, t) => Math.abs(e - t) < 1e-9;
542
- return K(() => i.center?.join(","), () => {
543
- let e = c.value;
544
- if (!e || !i.center) return;
547
+ return K(() => a.center?.join(","), () => {
548
+ let e = l.value;
549
+ if (!e || !a.center) return;
545
550
  let t = e.getCenter();
546
- (!X(t.lng, i.center[0]) || !X(t.lat, i.center[1])) && e.jumpTo({ center: i.center });
547
- }), K(() => i.zoom, (e) => {
548
- c.value && e !== void 0 && !X(c.value.getZoom(), e) && c.value.jumpTo({ zoom: e });
549
- }), K(() => i.bearing, (e) => {
550
- c.value && e !== void 0 && !X(c.value.getBearing(), e) && c.value.jumpTo({ bearing: e });
551
- }), K(() => i.pitch, (e) => {
552
- c.value && e !== void 0 && !X(c.value.getPitch(), e) && c.value.jumpTo({ pitch: e });
553
- }), K(() => i.adapter, () => {
554
- c.value && h(c.value);
555
- }), K(() => i.mapStyle, (e) => c.value?.setStyle(e, {
551
+ (!X(t.lng, a.center[0]) || !X(t.lat, a.center[1])) && e.jumpTo({ center: a.center });
552
+ }), K(() => a.zoom, (e) => {
553
+ l.value && e !== void 0 && !X(l.value.getZoom(), e) && l.value.jumpTo({ zoom: e });
554
+ }), K(() => a.bearing, (e) => {
555
+ l.value && e !== void 0 && !X(l.value.getBearing(), e) && l.value.jumpTo({ bearing: e });
556
+ }), K(() => a.pitch, (e) => {
557
+ l.value && e !== void 0 && !X(l.value.getPitch(), e) && l.value.jumpTo({ pitch: e });
558
+ }), K(() => a.adapter, () => {
559
+ l.value && g(l.value);
560
+ }), K(() => a.mapStyle, (e) => l.value?.setStyle(e, {
556
561
  diff: !1,
557
562
  transformStyle: (e, t) => {
558
- let n = d ?? pe(void 0);
559
- d = pe(t);
560
- let r = i.keepLayers, a = r === !1 ? t : me(e, t, n, typeof r == "function" ? r : void 0);
561
- return i.transformStyle && (a = i.transformStyle(e, a)), a;
563
+ let n = f ?? me(void 0);
564
+ f = me(t);
565
+ let r = a.keepLayers, i = r === !1 ? t : he(e, t, n, typeof r == "function" ? r : void 0);
566
+ return a.transformStyle && (i = a.transformStyle(e, i)), i;
562
567
  }
563
- })), n({
564
- map: c,
565
- context: m
566
- }), (t, n) => (L(), S("div", {
568
+ })), r({
569
+ map: l,
570
+ context: h
571
+ }), (t, n) => (L(), C("div", {
567
572
  ref_key: "root",
568
- ref: o,
573
+ ref: s,
569
574
  class: "m3-map relative overflow-hidden",
570
575
  onPointerover: J,
571
- onPointerout: ie,
572
- onPointerdown: te,
576
+ onPointerout: ae,
577
+ onPointerdown: re,
573
578
  onFocusin: Y,
574
- onFocusout: te
579
+ onFocusout: re
575
580
  }, [
576
- C("div", {
581
+ w("div", {
577
582
  ref_key: "container",
578
- ref: s,
583
+ ref: c,
579
584
  class: "h-full w-full"
580
585
  }, null, 512),
581
- c.value && e.attribution ? (L(), b(ce, {
586
+ l.value && e.attribution ? (L(), x(ue, {
582
587
  key: 0,
583
588
  position: e.attribution === !0 ? "bottom-right" : e.attribution
584
- }, null, 8, ["position"])) : x("", !0),
585
- c.value ? V(t.$slots, "default", {}, void 0, void 0, 1) : x("", !0),
586
- E(v, {
589
+ }, null, 8, ["position"])) : S("", !0),
590
+ l.value ? V(t.$slots, "default", {}, void 0, void 0, 1) : S("", !0),
591
+ D(y, {
587
592
  "enter-active-class": "transition-opacity duration-150",
588
593
  "enter-from-class": "opacity-0",
589
594
  "leave-active-class": "transition-opacity duration-100",
590
595
  "leave-to-class": "opacity-0"
591
596
  }, {
592
- default: q(() => [j.value ? (L(), S("div", {
597
+ default: q(() => [M.value ? (L(), C("div", {
593
598
  key: 0,
594
599
  role: "tooltip",
595
- class: M(["pointer-events-none absolute z-10 min-h-6 max-w-[200px] -translate-y-1/2 rounded bg-inverse-surface px-2 py-1 text-body-small whitespace-nowrap text-inverse-on-surface", j.value.left ? "-translate-x-full" : ""]),
596
- style: N({
597
- left: `${j.value.x}px`,
598
- top: `${j.value.y}px`
600
+ class: N(["pointer-events-none absolute z-10 min-h-6 max-w-[200px] -translate-y-1/2 rounded bg-inverse-surface px-2 py-1 text-body-small whitespace-nowrap text-inverse-on-surface", M.value.left ? "-translate-x-full" : ""]),
601
+ style: P({
602
+ left: `${M.value.x}px`,
603
+ top: `${M.value.y}px`
599
604
  })
600
- }, U(j.value.text), 7)) : x("", !0)]),
605
+ }, U(M.value.text), 7)) : S("", !0)]),
601
606
  _: 1
602
607
  })
603
608
  ], 544));
604
609
  }
605
- }), _e = 13.5, ve = _e / Math.SQRT2, ye = [0, -14], be = {
610
+ }), ve = 13.5, ye = ve / Math.SQRT2, be = [0, -14], xe = {
606
611
  center: [0, 0],
607
612
  top: [0, 0],
608
613
  "top-left": [0, 0],
609
614
  "top-right": [0, 0],
610
615
  bottom: [0, -38.1],
611
- "bottom-left": [ve, (24.6 + ve) * -1],
612
- "bottom-right": [-ve, (24.6 + ve) * -1],
613
- left: [_e, -24.6],
616
+ "bottom-left": [ye, (24.6 + ye) * -1],
617
+ "bottom-right": [-ye, (24.6 + ye) * -1],
618
+ left: [ve, -24.6],
614
619
  right: [-13.5, -24.6]
615
- }, xe = { class: "hidden" }, Se = /* @__PURE__ */ D({
620
+ }, Q = { class: "hidden" }, Se = /* @__PURE__ */ O({
616
621
  inheritAttrs: !1,
617
622
  __name: "MMapMarker",
618
623
  props: {
@@ -628,7 +633,7 @@ var he = 600, ge = /* @__PURE__ */ D({
628
633
  },
629
634
  emits: ["update:lngLat", "click"],
630
635
  setup(e, { expose: t, emit: n }) {
631
- let r = e, i = n, a = ne(), o = z(), s = z(), { onReady: c } = Y(), l, u = !1;
636
+ let r = e, i = n, a = G(), o = z(), s = z(), { onReady: c } = Y(), l, u = !1;
632
637
  c((e, t) => {
633
638
  u = !!a.default && !!o.value, l = new t.Marker({
634
639
  ...u ? { element: o.value } : { color: r.color ?? "currentColor" },
@@ -647,20 +652,20 @@ var he = 600, ge = /* @__PURE__ */ D({
647
652
  function d(e) {
648
653
  i("click", e);
649
654
  }
650
- return K(() => r.lngLat.join(","), () => l?.setLngLat(r.lngLat)), K(() => r.draggable, (e) => l?.setDraggable(e)), K(() => r.rotation, (e) => l?.setRotation(e)), K(() => r.offset?.join(","), () => l?.setOffset(r.offset ?? (u ? [0, 0] : ye))), P(() => {
655
+ return K(() => r.lngLat.join(","), () => l?.setLngLat(r.lngLat)), K(() => r.draggable, (e) => l?.setDraggable(e)), K(() => r.rotation, (e) => l?.setRotation(e)), K(() => r.offset?.join(","), () => l?.setOffset(r.offset ?? (u ? [0, 0] : be))), F(() => {
651
656
  l?.getElement().removeEventListener("click", d), l?.getPopup()?.remove(), l?.remove();
652
- }), t({ marker: () => l }), (e, t) => (L(), S("div", xe, [e.$slots.default ? (L(), S("div", j({
657
+ }), t({ marker: () => l }), (e, t) => (L(), C("div", Q, [e.$slots.default ? (L(), C("div", M({
653
658
  key: 0,
654
659
  ref_key: "content",
655
660
  ref: o,
656
661
  class: "m3-map-marker"
657
- }, e.$attrs), [V(e.$slots, "default")], 16)) : x("", !0), e.$slots.popup ? (L(), S("div", {
662
+ }, e.$attrs), [V(e.$slots, "default")], 16)) : S("", !0), e.$slots.popup ? (L(), C("div", {
658
663
  key: 1,
659
664
  ref_key: "popupContent",
660
665
  ref: s
661
- }, [V(e.$slots, "popup")], 512)) : x("", !0)]));
666
+ }, [V(e.$slots, "popup")], 512)) : S("", !0)]));
662
667
  }
663
- }), Q = { class: "hidden" }, Ce = /* @__PURE__ */ D({
668
+ }), Ce = { class: "hidden" }, we = /* @__PURE__ */ O({
664
669
  inheritAttrs: !1,
665
670
  __name: "MMapPopup",
666
671
  props: {
@@ -701,14 +706,14 @@ var he = 600, ge = /* @__PURE__ */ D({
701
706
  }), r.open && u();
702
707
  }), K(() => r.open, (e) => {
703
708
  e ? u() : s?.isOpen() && (l = !0, s.remove(), l = !1);
704
- }), K(() => r.lngLat.join(","), () => s?.setLngLat(r.lngLat)), K(() => r.maxWidth, (e) => s?.setMaxWidth(e)), K(() => r.offset, (e) => s?.setOffset(e ?? 0)), P(() => {
709
+ }), K(() => r.lngLat.join(","), () => s?.setLngLat(r.lngLat)), K(() => r.maxWidth, (e) => s?.setMaxWidth(e)), K(() => r.offset, (e) => s?.setOffset(e ?? 0)), F(() => {
705
710
  l = !0, s?.remove();
706
- }), t({ popup: () => s }), (e, t) => (L(), S("div", Q, [C("div", j({
711
+ }), t({ popup: () => s }), (e, t) => (L(), C("div", Ce, [w("div", M({
707
712
  ref_key: "content",
708
713
  ref: a
709
714
  }, e.$attrs), [V(e.$slots, "default")], 16)]));
710
715
  }
711
- }), we = /* @__PURE__ */ D({
716
+ }), Te = /* @__PURE__ */ O({
712
717
  inheritAttrs: !1,
713
718
  __name: "MMapGeoJson",
714
719
  props: {
@@ -724,13 +729,13 @@ var he = 600, ge = /* @__PURE__ */ D({
724
729
  },
725
730
  emits: ["click"],
726
731
  setup(t, { expose: n, emit: r }) {
727
- let i = t, a = r, o = i.id ?? `m3-geojson-${te()}`, { onReady: s, styleVersion: c } = Y(), l = e(["primary", "surface"]), u = (...e) => [
732
+ let i = t, a = r, o = i.id ?? `m3-geojson-${re()}`, { onReady: s, styleVersion: c } = Y(), l = e(["primary", "surface"]), u = (...e) => [
728
733
  "match",
729
734
  ["geometry-type"],
730
735
  e,
731
736
  !0,
732
737
  !1
733
- ], d = y(() => {
738
+ ], d = b(() => {
734
739
  let { primary: e, surface: t } = l.value;
735
740
  return [
736
741
  {
@@ -763,7 +768,7 @@ var he = 600, ge = /* @__PURE__ */ D({
763
768
  }
764
769
  }
765
770
  ];
766
- }), f = y(() => (i.layers ?? d.value).map((e, t) => ({
771
+ }), f = b(() => (i.layers ?? d.value).map((e, t) => ({
767
772
  ...e,
768
773
  id: e.id ?? `${o}-${t}`,
769
774
  source: o
@@ -778,7 +783,7 @@ var he = 600, ge = /* @__PURE__ */ D({
778
783
  m = [];
779
784
  }
780
785
  }
781
- function b() {
786
+ function y() {
782
787
  if (p) {
783
788
  v();
784
789
  for (let e of f.value) p.addLayer(e, i.before && p.getLayer(i.before) ? i.before : void 0), p.on("click", e.id, h), p.on("mouseenter", e.id, g), p.on("mouseleave", e.id, _), m.push(e.id);
@@ -789,111 +794,111 @@ var he = 600, ge = /* @__PURE__ */ D({
789
794
  type: "geojson",
790
795
  data: i.data,
791
796
  ...i.sourceOptions
792
- }), m = []), (!m.length || !p.getLayer(m[0])) && b());
797
+ }), m = []), (!m.length || !p.getLayer(m[0])) && y());
793
798
  }
794
799
  return s((e) => {
795
800
  p = e, x();
796
- }), K(c, () => x()), K(() => i.data, (e) => (p?.getSource(o))?.setData(e)), K(() => JSON.stringify(f.value), () => b()), K(() => i.before, () => b()), P(() => {
801
+ }), K(c, () => x()), K(() => i.data, (e) => (p?.getSource(o))?.setData(e)), K(() => JSON.stringify(f.value), () => y()), K(() => i.before, () => y()), F(() => {
797
802
  p &&= (v(), p.getSource(o) && p.removeSource(o), void 0);
798
803
  }), n({
799
804
  sourceId: o,
800
805
  layerIds: () => [...m]
801
806
  }), (e, t) => null;
802
807
  }
803
- }), Te = { class: "flex min-w-0 flex-1 flex-col" }, Ee = ["aria-label", "aria-pressed"], De = { class: "flex min-w-0 flex-1 flex-col" }, Oe = {
808
+ }), Ee = { class: "flex min-w-0 flex-1 flex-col" }, De = ["aria-label", "aria-pressed"], Oe = { class: "flex min-w-0 flex-1 flex-col" }, ke = {
804
809
  key: 0,
805
810
  class: "truncate text-label-small text-on-surface-variant"
806
- }, ke = {
811
+ }, Ae = {
807
812
  key: 0,
808
813
  class: "rounded-full bg-primary/8 px-2 py-0.5 text-label-small tabular-nums text-primary"
809
- }, Ae = { class: "min-h-0 overflow-hidden" }, je = { class: "flex flex-col gap-3 px-3 pb-3" }, Me = {
814
+ }, je = { class: "min-h-0 overflow-hidden" }, Me = { class: "flex flex-col gap-3 px-3 pb-3" }, Ne = {
810
815
  key: 0,
811
816
  class: "text-body-small text-on-surface-variant"
812
- }, Ne = { class: "flex items-center gap-2 rounded-2xl bg-surface-container-highest/60 px-3 py-1" }, Pe = ["src"], Fe = {
817
+ }, Pe = { class: "flex items-center gap-2 rounded-2xl bg-surface-container-highest/60 px-3 py-1" }, Fe = ["src"], Ie = {
813
818
  key: 2,
814
819
  class: "flex flex-wrap items-center gap-2"
815
- }, Ie = ["href"], Le = /* @__PURE__ */ D({
820
+ }, Le = ["href"], Re = /* @__PURE__ */ O({
816
821
  __name: "_MMapLayerItem",
817
822
  props: {
818
823
  layer: {},
819
824
  expanded: { type: Boolean }
820
825
  },
821
826
  emits: ["toggle-expanded"],
822
- setup(e, { emit: n }) {
823
- let r = n, i = t(), { isVisible: a, toggle: o, opacityOf: s, setOpacity: c } = fe();
824
- return (t, n) => (L(), S("div", { class: M(["flex overflow-hidden rounded-2xl bg-surface-container", G(a)(e.layer.id) ? "" : "opacity-75"]) }, [C("div", { class: M(["w-1 shrink-0 transition-colors duration-200", G(a)(e.layer.id) ? "bg-primary" : "bg-outline-variant"]) }, null, 2), C("div", Te, [C("div", {
827
+ setup(e, { emit: t }) {
828
+ let r = t, i = n(), { isVisible: a, toggle: o, opacityOf: s, setOpacity: c } = Z();
829
+ return (t, n) => (L(), C("div", { class: N(["flex overflow-hidden rounded-2xl bg-surface-container", W(a)(e.layer.id) ? "" : "opacity-75"]) }, [w("div", { class: N(["w-1 shrink-0 transition-colors duration-200", W(a)(e.layer.id) ? "bg-primary" : "bg-outline-variant"]) }, null, 2), w("div", Ee, [w("div", {
825
830
  class: "flex cursor-pointer items-center gap-2 px-3 py-2",
826
831
  onClick: n[1] ||= (e) => r("toggle-expanded")
827
832
  }, [
828
- C("button", {
833
+ w("button", {
829
834
  type: "button",
830
- class: M(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", G(a)(e.layer.id) ? "bg-primary/12 text-primary" : "bg-on-surface/5 text-on-surface-variant"]),
831
- "aria-label": G(a)(e.layer.id) ? G(i).mapHideLayer : G(i).mapShowLayer,
832
- "aria-pressed": G(a)(e.layer.id),
833
- onClick: n[0] ||= J((t) => G(o)(e.layer.id), ["stop"])
834
- }, [E(d, {
835
- name: G(a)(e.layer.id) ? "visibility" : "visibility_off",
835
+ class: N(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", W(a)(e.layer.id) ? "bg-primary/12 text-primary" : "bg-on-surface/5 text-on-surface-variant"]),
836
+ "aria-label": W(a)(e.layer.id) ? W(i).mapHideLayer : W(i).mapShowLayer,
837
+ "aria-pressed": W(a)(e.layer.id),
838
+ onClick: n[0] ||= J((t) => W(o)(e.layer.id), ["stop"])
839
+ }, [D(l, {
840
+ name: W(a)(e.layer.id) ? "visibility" : "visibility_off",
836
841
  size: 18
837
- }, null, 8, ["name"])], 10, Ee),
838
- C("div", De, [C("span", { class: M(["truncate text-body-medium", G(a)(e.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, U(e.layer.title), 3), e.layer.description && !e.expanded ? (L(), S("span", Oe, U(e.layer.description), 1)) : x("", !0)]),
839
- G(a)(e.layer.id) && G(s)(e.layer.id) < 1 ? (L(), S("span", ke, U(Math.round(G(s)(e.layer.id) * 100)) + "% ", 1)) : x("", !0),
840
- E(d, {
842
+ }, null, 8, ["name"])], 10, De),
843
+ w("div", Oe, [w("span", { class: N(["truncate text-body-medium", W(a)(e.layer.id) ? "text-on-surface" : "text-on-surface-variant"]) }, U(e.layer.title), 3), e.layer.description && !e.expanded ? (L(), C("span", ke, U(e.layer.description), 1)) : S("", !0)]),
844
+ W(a)(e.layer.id) && W(s)(e.layer.id) < 1 ? (L(), C("span", Ae, U(Math.round(W(s)(e.layer.id) * 100)) + "% ", 1)) : S("", !0),
845
+ D(l, {
841
846
  name: "expand_more",
842
847
  size: 18,
843
- class: M(["shrink-0 text-on-surface-variant transition-transform duration-300", e.expanded ? "rotate-180" : ""])
848
+ class: N(["shrink-0 text-on-surface-variant transition-transform duration-300", e.expanded ? "rotate-180" : ""])
844
849
  }, null, 8, ["class"])
845
- ]), C("div", {
850
+ ]), w("div", {
846
851
  class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
847
- style: N({ gridTemplateRows: e.expanded ? "1fr" : "0fr" })
848
- }, [C("div", Ae, [C("div", je, [
849
- e.layer.description ? (L(), S("p", Me, U(e.layer.description), 1)) : x("", !0),
850
- C("div", Ne, [E(d, {
852
+ style: P({ gridTemplateRows: e.expanded ? "1fr" : "0fr" })
853
+ }, [w("div", je, [w("div", Me, [
854
+ e.layer.description ? (L(), C("p", Ne, U(e.layer.description), 1)) : S("", !0),
855
+ w("div", Pe, [D(l, {
851
856
  name: "opacity",
852
857
  size: 16,
853
858
  class: "shrink-0 text-on-surface-variant"
854
- }), E(g, {
855
- "model-value": G(s)(e.layer.id),
859
+ }), D(_, {
860
+ "model-value": W(s)(e.layer.id),
856
861
  min: 0,
857
862
  max: 1,
858
863
  step: .01,
859
- label: G(i).mapOpacity,
864
+ label: W(i).mapOpacity,
860
865
  class: "flex-1",
861
- "onUpdate:modelValue": n[2] ||= (t) => G(c)(e.layer.id, Number(t))
866
+ "onUpdate:modelValue": n[2] ||= (t) => W(c)(e.layer.id, Number(t))
862
867
  }, null, 8, ["model-value", "label"])]),
863
- e.layer.legend ? (L(), S("img", {
868
+ e.layer.legend ? (L(), C("img", {
864
869
  key: 1,
865
870
  src: e.layer.legend,
866
871
  alt: "",
867
872
  class: "max-w-full self-start",
868
873
  loading: "lazy"
869
- }, null, 8, Pe)) : x("", !0),
870
- e.layer.download || t.$slots.actions ? (L(), S("div", Fe, [e.layer.download ? (L(), S("a", {
874
+ }, null, 8, Fe)) : S("", !0),
875
+ e.layer.download || t.$slots.actions ? (L(), C("div", Ie, [e.layer.download ? (L(), C("a", {
871
876
  key: 0,
872
877
  href: e.layer.download,
873
878
  target: "_blank",
874
879
  rel: "noopener",
875
880
  download: "",
876
881
  class: "inline-flex items-center gap-1 rounded-full px-3 py-1.5 text-label-large text-primary hover:bg-primary/8"
877
- }, [E(d, {
882
+ }, [D(l, {
878
883
  name: "download",
879
884
  size: 18
880
- }), T(" " + U(G(i).mapDownload), 1)], 8, Ie)) : x("", !0), V(t.$slots, "actions", {
885
+ }), E(" " + U(W(i).mapDownload), 1)], 8, Le)) : S("", !0), V(t.$slots, "actions", {
881
886
  layer: e.layer,
882
- visible: G(a)(e.layer.id)
883
- })])) : x("", !0)
887
+ visible: W(a)(e.layer.id)
888
+ })])) : S("", !0)
884
889
  ])])], 4)])], 2));
885
890
  }
886
- }), Re = { class: "flex flex-col gap-3" }, ze = ["onClick"], Be = [
891
+ }), ze = { class: "flex flex-col gap-3" }, Be = ["onClick"], Ve = [
887
892
  "aria-label",
888
893
  "aria-pressed",
889
894
  "onClick"
890
- ], Ve = { class: "flex-1 select-none truncate text-label-large text-on-surface" }, He = { class: "rounded-full bg-surface-container-highest px-2 py-0.5 text-label-small tabular-nums text-on-surface-variant" }, Ue = {
895
+ ], He = { class: "flex-1 select-none truncate text-label-large text-on-surface" }, Ue = { class: "rounded-full bg-surface-container-highest px-2 py-0.5 text-label-small tabular-nums text-on-surface-variant" }, We = {
891
896
  key: 1,
892
897
  class: "flex flex-col gap-1.5"
893
- }, We = {
898
+ }, Ge = {
894
899
  key: 2,
895
900
  class: "flex flex-col items-center gap-3 py-8"
896
- }, Ge = { class: "grid size-14 place-items-center rounded-full bg-surface-container-highest" }, Ke = { class: "text-body-medium text-on-surface-variant" }, qe = /* @__PURE__ */ D({
901
+ }, Ke = { class: "grid size-14 place-items-center rounded-full bg-surface-container-highest" }, qe = { class: "text-body-medium text-on-surface-variant" }, Je = /* @__PURE__ */ O({
897
902
  __name: "MMapLayers",
898
903
  props: {
899
904
  search: {
@@ -907,103 +912,103 @@ var he = 600, ge = /* @__PURE__ */ D({
907
912
  map: {}
908
913
  },
909
914
  setup(e) {
910
- let n = e, r = t(), { model: i, layersOf: a, isVisible: o, groupState: s, setGroupVisible: l } = fe(() => n.map), u = z(""), f = (e) => !u.value || e.title.toLowerCase().includes(u.value.toLowerCase()), p = y(() => (i.value?.groups ?? []).map((e) => ({
915
+ let t = e, r = n(), { model: i, layersOf: a, isVisible: o, groupState: s, setGroupVisible: c } = Z(() => t.map), u = z(""), f = (e) => !u.value || e.title.toLowerCase().includes(u.value.toLowerCase()), p = b(() => (i.value?.groups ?? []).map((e) => ({
911
916
  ...e,
912
917
  all: a(e.name),
913
918
  layers: a(e.name).filter(f)
914
- })).filter((e) => e.layers.length)), m = y(() => a(null).filter(f)), h = z(/* @__PURE__ */ new Set()), g = (e) => h.value.has(e) === n.collapsed;
915
- function v(e) {
919
+ })).filter((e) => e.layers.length)), m = b(() => a(null).filter(f)), h = z(/* @__PURE__ */ new Set()), g = (e) => h.value.has(e) === t.collapsed;
920
+ function _(e) {
916
921
  let t = new Set(h.value);
917
922
  t.delete(e) || t.add(e), h.value = t;
918
923
  }
919
- let T = z(/* @__PURE__ */ new Set());
920
- function D(e) {
921
- let t = new Set(T.value);
922
- t.delete(e) || t.add(e), T.value = t;
924
+ let y = z(/* @__PURE__ */ new Set());
925
+ function E(e) {
926
+ let t = new Set(y.value);
927
+ t.delete(e) || t.add(e), y.value = t;
923
928
  }
924
929
  let O = (e) => e.filter((e) => o(e.id)).length;
925
- return (t, n) => (L(), S("div", Re, [
926
- e.search ? (L(), b(c, {
930
+ return (t, n) => (L(), C("div", ze, [
931
+ e.search ? (L(), x(d, {
927
932
  key: 0,
928
933
  modelValue: u.value,
929
934
  "onUpdate:modelValue": n[0] ||= (e) => u.value = e,
930
- label: G(r).mapSearchLayers,
935
+ label: W(r).mapSearchLayers,
931
936
  "leading-icon": "search",
932
937
  variant: "outlined",
933
938
  clearable: ""
934
- }, null, 8, ["modelValue", "label"])) : x("", !0),
935
- (L(!0), S(_, null, B(p.value, (e) => (L(), S("section", {
939
+ }, null, 8, ["modelValue", "label"])) : S("", !0),
940
+ (L(!0), C(v, null, B(p.value, (e) => (L(), C("section", {
936
941
  key: e.name,
937
942
  class: "flex flex-col"
938
- }, [C("div", {
943
+ }, [w("div", {
939
944
  class: "m3-map-layers-row flex cursor-pointer items-center gap-2 rounded-xl px-2 py-1.5",
940
- onClick: (t) => v(e.name)
945
+ onClick: (t) => _(e.name)
941
946
  }, [
942
- C("button", {
947
+ w("button", {
943
948
  type: "button",
944
- class: M(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", G(s)(e.name) === "visible" ? "bg-primary-container text-on-primary-container" : G(s)(e.name) === "partial" ? "bg-secondary-container text-on-secondary-container" : "bg-on-surface/8 text-on-surface-variant"]),
945
- "aria-label": G(s)(e.name) === "hidden" ? G(r).mapShowLayer : G(r).mapHideLayer,
946
- "aria-pressed": G(s)(e.name) !== "hidden",
947
- onClick: J((t) => G(l)(e.name, G(s)(e.name) !== "visible"), ["stop"])
948
- }, [E(d, {
949
- name: G(s)(e.name) === "hidden" ? "visibility_off" : "visibility",
949
+ class: N(["grid size-8 shrink-0 cursor-pointer place-items-center rounded-full transition-colors duration-200", W(s)(e.name) === "visible" ? "bg-primary-container text-on-primary-container" : W(s)(e.name) === "partial" ? "bg-secondary-container text-on-secondary-container" : "bg-on-surface/8 text-on-surface-variant"]),
950
+ "aria-label": W(s)(e.name) === "hidden" ? W(r).mapShowLayer : W(r).mapHideLayer,
951
+ "aria-pressed": W(s)(e.name) !== "hidden",
952
+ onClick: J((t) => W(c)(e.name, W(s)(e.name) !== "visible"), ["stop"])
953
+ }, [D(l, {
954
+ name: W(s)(e.name) === "hidden" ? "visibility_off" : "visibility",
950
955
  size: 18
951
- }, null, 8, ["name"])], 10, Be),
952
- C("span", Ve, U(e.title), 1),
953
- C("span", He, U(O(e.all)) + "/" + U(e.all.length), 1),
954
- E(d, {
956
+ }, null, 8, ["name"])], 10, Ve),
957
+ w("span", He, U(e.title), 1),
958
+ w("span", Ue, U(O(e.all)) + "/" + U(e.all.length), 1),
959
+ D(l, {
955
960
  name: "expand_more",
956
961
  size: 18,
957
- class: M(["text-on-surface-variant transition-transform duration-300", g(e.name) ? "rotate-180" : ""])
962
+ class: N(["text-on-surface-variant transition-transform duration-300", g(e.name) ? "rotate-180" : ""])
958
963
  }, null, 8, ["class"])
959
- ], 8, ze), C("div", {
964
+ ], 8, Be), w("div", {
960
965
  class: "grid transition-[grid-template-rows] duration-300 ease-[cubic-bezier(0.2,0,0,1)]",
961
- style: N({ gridTemplateRows: g(e.name) ? "1fr" : "0fr" })
962
- }, [C("div", { class: M(["flex min-h-0 flex-col gap-1.5 overflow-hidden", g(e.name) ? "pt-1.5" : ""]) }, [(L(!0), S(_, null, B(e.layers, (e) => (L(), b(Le, {
966
+ style: P({ gridTemplateRows: g(e.name) ? "1fr" : "0fr" })
967
+ }, [w("div", { class: N(["flex min-h-0 flex-col gap-1.5 overflow-hidden", g(e.name) ? "pt-1.5" : ""]) }, [(L(!0), C(v, null, B(e.layers, (e) => (L(), x(Re, {
963
968
  key: e.id,
964
969
  layer: e,
965
- expanded: T.value.has(e.id),
966
- onToggleExpanded: (t) => D(e.id)
967
- }, w({ _: 2 }, [t.$slots.actions ? {
970
+ expanded: y.value.has(e.id),
971
+ onToggleExpanded: (t) => E(e.id)
972
+ }, T({ _: 2 }, [t.$slots.actions ? {
968
973
  name: "actions",
969
- fn: q((e) => [V(t.$slots, "actions", j({ ref_for: !0 }, e))]),
974
+ fn: q((e) => [V(t.$slots, "actions", M({ ref_for: !0 }, e))]),
970
975
  key: "0"
971
976
  } : void 0]), 1032, [
972
977
  "layer",
973
978
  "expanded",
974
979
  "onToggleExpanded"
975
980
  ]))), 128))], 2)], 4)]))), 128)),
976
- m.value.length ? (L(), S("div", Ue, [(L(!0), S(_, null, B(m.value, (e) => (L(), b(Le, {
981
+ m.value.length ? (L(), C("div", We, [(L(!0), C(v, null, B(m.value, (e) => (L(), x(Re, {
977
982
  key: e.id,
978
983
  layer: e,
979
- expanded: T.value.has(e.id),
980
- onToggleExpanded: (t) => D(e.id)
981
- }, w({ _: 2 }, [t.$slots.actions ? {
984
+ expanded: y.value.has(e.id),
985
+ onToggleExpanded: (t) => E(e.id)
986
+ }, T({ _: 2 }, [t.$slots.actions ? {
982
987
  name: "actions",
983
- fn: q((e) => [V(t.$slots, "actions", j({ ref_for: !0 }, e))]),
988
+ fn: q((e) => [V(t.$slots, "actions", M({ ref_for: !0 }, e))]),
984
989
  key: "0"
985
990
  } : void 0]), 1032, [
986
991
  "layer",
987
992
  "expanded",
988
993
  "onToggleExpanded"
989
- ]))), 128))])) : x("", !0),
990
- !p.value.length && !m.value.length ? (L(), S("div", We, [C("div", Ge, [E(d, {
994
+ ]))), 128))])) : S("", !0),
995
+ !p.value.length && !m.value.length ? (L(), C("div", Ge, [w("div", Ke, [D(l, {
991
996
  name: "layers_clear",
992
997
  size: 28,
993
998
  class: "text-on-surface-variant"
994
- })]), C("p", Ke, U(G(r).mapNoLayers), 1)])) : x("", !0)
999
+ })]), w("p", qe, U(W(r).mapNoLayers), 1)])) : S("", !0)
995
1000
  ]));
996
1001
  }
997
- }), Je = [
1002
+ }), Ye = [
998
1003
  "title",
999
1004
  "aria-label",
1000
1005
  "aria-checked",
1001
1006
  "onClick"
1002
- ], Ye = ["src"], Xe = [
1007
+ ], Xe = ["src"], Ze = [
1003
1008
  "title",
1004
1009
  "aria-label",
1005
1010
  "aria-checked"
1006
- ], Ze = /* @__PURE__ */ D({
1011
+ ], Qe = /* @__PURE__ */ O({
1007
1012
  __name: "MMapBaseLayers",
1008
1013
  props: {
1009
1014
  imageBase: { default: "" },
@@ -1018,95 +1023,95 @@ var he = 600, ge = /* @__PURE__ */ D({
1018
1023
  map: {}
1019
1024
  },
1020
1025
  setup(e) {
1021
- let n = e, r = t(), { baseLayers: i, baseLayer: a, setBaseLayer: o } = fe(() => n.map), s = (e, t) => /^(https?:|data:|\/\/)/.test(e) ? e : `${t}${e}`;
1022
- return (t, n) => (L(), S("div", {
1023
- class: M(["flex gap-2", e.vertical ? "flex-col" : "flex-row flex-wrap"]),
1026
+ let t = e, r = n(), { baseLayers: i, baseLayer: a, setBaseLayer: o } = Z(() => t.map), s = (e, t) => /^(https?:|data:|\/\/)/.test(e) ? e : `${t}${e}`;
1027
+ return (t, n) => (L(), C("div", {
1028
+ class: N(["flex gap-2", e.vertical ? "flex-col" : "flex-row flex-wrap"]),
1024
1029
  role: "radiogroup"
1025
- }, [(L(!0), S(_, null, B(G(i), (t) => (L(), S("button", {
1030
+ }, [(L(!0), C(v, null, B(W(i), (t) => (L(), C("button", {
1026
1031
  key: t.id,
1027
1032
  type: "button",
1028
1033
  role: "radio",
1029
- class: M(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", G(a) === t.id ? "m3-map-base--active border-primary" : "border-transparent"]),
1034
+ class: N(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center overflow-hidden rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", W(a) === t.id ? "m3-map-base--active border-primary" : "border-transparent"]),
1030
1035
  title: t.title,
1031
1036
  "aria-label": t.title,
1032
- "aria-checked": G(a) === t.id,
1033
- onClick: (e) => G(o)(t.id)
1034
- }, [t.base?.image ? (L(), S("img", {
1037
+ "aria-checked": W(a) === t.id,
1038
+ onClick: (e) => W(o)(t.id)
1039
+ }, [t.base?.image ? (L(), C("img", {
1035
1040
  key: 0,
1036
1041
  src: s(t.base.image, e.imageBase),
1037
1042
  alt: "",
1038
1043
  class: "size-full object-cover"
1039
- }, null, 8, Ye)) : (L(), b(d, {
1044
+ }, null, 8, Xe)) : (L(), x(l, {
1040
1045
  key: 1,
1041
1046
  name: "map",
1042
1047
  size: 22,
1043
1048
  class: "text-on-surface-variant"
1044
- }))], 10, Je))), 128)), e.none ? (L(), S("button", {
1049
+ }))], 10, Ye))), 128)), e.none ? (L(), C("button", {
1045
1050
  key: 0,
1046
1051
  type: "button",
1047
1052
  role: "radio",
1048
- class: M(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", G(a) === null ? "m3-map-base--active border-primary" : "border-transparent"]),
1049
- title: G(r).mapNoBaseLayer,
1050
- "aria-label": G(r).mapNoBaseLayer,
1051
- "aria-checked": G(a) === null,
1052
- onClick: n[0] ||= (e) => G(o)(null)
1053
- }, [E(d, {
1053
+ class: N(["m3-map-base grid size-12 shrink-0 cursor-pointer place-items-center rounded-full border-2 bg-surface-variant transition-[border-color,transform] duration-150 hover:scale-110", W(a) === null ? "m3-map-base--active border-primary" : "border-transparent"]),
1054
+ title: W(r).mapNoBaseLayer,
1055
+ "aria-label": W(r).mapNoBaseLayer,
1056
+ "aria-checked": W(a) === null,
1057
+ onClick: n[0] ||= (e) => W(o)(null)
1058
+ }, [D(l, {
1054
1059
  name: "layers_clear",
1055
1060
  size: 22,
1056
1061
  class: "text-on-surface-variant"
1057
- })], 10, Xe)) : x("", !0)], 2));
1062
+ })], 10, Ze)) : S("", !0)], 2));
1058
1063
  }
1059
- }), Qe = { class: "flex flex-col gap-2" }, $e = { class: "flex items-center gap-2 bg-primary-container/40 px-4 py-2" }, et = { class: "text-label-large text-on-primary-container" }, tt = { class: "flex flex-col px-4 py-1" }, nt = { class: "text-label-small text-on-surface-variant" }, rt = { class: "text-body-medium text-on-surface" }, it = {
1064
+ }), $e = { class: "flex flex-col gap-2" }, et = { class: "flex items-center gap-2 bg-primary-container/40 px-4 py-2" }, tt = { class: "text-label-large text-on-primary-container" }, nt = { class: "flex flex-col px-4 py-1" }, rt = { class: "text-label-small text-on-surface-variant" }, it = { class: "text-body-medium text-on-surface" }, at = {
1060
1065
  key: 0,
1061
1066
  class: "break-words"
1062
- }, at = {
1067
+ }, ot = {
1063
1068
  key: 1,
1064
1069
  class: "text-body-small italic text-on-surface-variant"
1065
- }, ot = /* @__PURE__ */ D({
1070
+ }, st = /* @__PURE__ */ O({
1066
1071
  __name: "MMapFeatureInfo",
1067
1072
  props: { results: {} },
1068
1073
  setup(e) {
1069
- let n = t();
1070
- return (t, r) => (L(), S("div", Qe, [(L(!0), S(_, null, B(e.results, (e, r) => (L(), S("div", {
1074
+ let t = n();
1075
+ return (n, r) => (L(), C("div", $e, [(L(!0), C(v, null, B(e.results, (e, r) => (L(), C("div", {
1071
1076
  key: r,
1072
1077
  class: "overflow-hidden rounded-2xl bg-surface-container"
1073
- }, [C("div", $e, [E(d, {
1078
+ }, [w("div", et, [D(l, {
1074
1079
  name: "layers",
1075
1080
  size: 16,
1076
1081
  class: "text-on-primary-container"
1077
- }), C("span", et, U(e.layer.title), 1)]), C("dl", tt, [(L(!0), S(_, null, B(e.fields, (r) => (L(), S("div", {
1082
+ }), w("span", tt, U(e.layer.title), 1)]), w("dl", nt, [(L(!0), C(v, null, B(e.fields, (r) => (L(), C("div", {
1078
1083
  key: r.key,
1079
1084
  class: "flex flex-col gap-0.5 border-b border-outline-variant py-1.5 last:border-b-0"
1080
- }, [C("dt", nt, U(r.label), 1), C("dd", rt, [V(t.$slots, "value", {
1085
+ }, [w("dt", rt, U(r.label), 1), w("dd", it, [V(n.$slots, "value", {
1081
1086
  field: r,
1082
1087
  result: e
1083
- }, () => [r.value ? (L(), S("span", it, U(r.value), 1)) : (L(), S("span", at, U(G(n).mapNoValue), 1))])])]))), 128))])]))), 128))]));
1088
+ }, () => [r.value ? (L(), C("span", at, U(r.value), 1)) : (L(), C("span", ot, U(W(t).mapNoValue), 1))])])]))), 128))])]))), 128))]));
1084
1089
  }
1085
- }), st = (e) => e.metadata, ct = /* @__PURE__ */ new Set([
1090
+ }), ct = (e) => e.metadata, lt = /* @__PURE__ */ new Set([
1086
1091
  "fill",
1087
1092
  "line",
1088
1093
  "circle",
1089
1094
  "symbol",
1090
1095
  "fill-extrusion",
1091
1096
  "heatmap"
1092
- ]), lt = (e) => ({
1097
+ ]), ut = (e) => ({
1093
1098
  title: e.name,
1094
1099
  groups: [],
1095
1100
  layers: e.layers.filter((e) => e.type !== "background").map((e) => ({
1096
1101
  id: e.id,
1097
- title: st(e)?.title ?? e.id,
1102
+ title: ct(e)?.title ?? e.id,
1098
1103
  listed: !0,
1099
1104
  children: [],
1100
- identify: ct.has(e.type) ? {
1105
+ identify: lt.has(e.type) ? {
1101
1106
  format: {},
1102
1107
  exclude: []
1103
1108
  } : !1,
1104
1109
  hover: !1
1105
1110
  }))
1106
1111
  });
1107
- function ut(e = {}) {
1112
+ function dt(e = {}) {
1108
1113
  let t = e.legend ?? ((e, t) => {
1109
- let n = st(e)?.legend;
1114
+ let n = ct(e)?.legend;
1110
1115
  if (n?.show === !1) return;
1111
1116
  if (n?.wmslegend) return n.wmslegend;
1112
1117
  if (!t?.includes("/services/styles/")) return;
@@ -1122,7 +1127,7 @@ function ut(e = {}) {
1122
1127
  title: e.alias ?? e.name
1123
1128
  })),
1124
1129
  layers: e.layers.filter((e) => e.type !== "background").map((e) => {
1125
- let r = st(e) ?? {}, i = { ...r.fields }, a = i.exclude ?? [];
1130
+ let r = ct(e) ?? {}, i = { ...r.fields }, a = i.exclude ?? [];
1126
1131
  delete i.exclude;
1127
1132
  let o = {};
1128
1133
  for (let [e, t] of Object.entries(i)) o[e] = {
@@ -1159,10 +1164,10 @@ function ut(e = {}) {
1159
1164
  };
1160
1165
  };
1161
1166
  }
1162
- function dt(e, t) {
1167
+ function ft(e, t) {
1163
1168
  return t?.label ?? e.charAt(0).toUpperCase() + e.slice(1);
1164
1169
  }
1165
- function ft(e, t) {
1170
+ function pt(e, t) {
1166
1171
  if (e == null || String(e).trim() === "") return "";
1167
1172
  let n = String(e), r = typeof e == "number" ? e : Number(e);
1168
1173
  if (t?.mask && !Number.isNaN(r)) {
@@ -1175,23 +1180,23 @@ function ft(e, t) {
1175
1180
  }
1176
1181
  return t?.prefix && (n = `${t.prefix} ${n}`), t?.suffix && (n = `${n} ${t.suffix}`), n;
1177
1182
  }
1178
- var pt = /* @__PURE__ */ new Set([
1183
+ var mt = /* @__PURE__ */ new Set([
1179
1184
  "coordinates",
1180
1185
  "mapCoordinates",
1181
1186
  "layerId",
1182
1187
  "__layerMetadata"
1183
1188
  ]);
1184
- function mt(e, t, n) {
1189
+ function ht(e, t, n) {
1185
1190
  let r = new Map((n?.layers ?? []).filter((t) => t.identify && e.getLayer(t.id)).map((e) => [e.id, e]));
1186
1191
  if (!r.size) return [];
1187
1192
  let i = [];
1188
1193
  for (let n of e.queryRenderedFeatures(t, { layers: [...r.keys()] })) {
1189
1194
  let e = r.get(n.layer.id);
1190
1195
  if (!e || !e.identify) continue;
1191
- let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !pt.has(e) && !a.includes(e) && !t[e]?.hidden).map(([e, n]) => ({
1196
+ let { format: t, exclude: a } = e.identify, o = Object.entries(n.properties ?? {}).filter(([e]) => !mt.has(e) && !a.includes(e) && !t[e]?.hidden).map(([e, n]) => ({
1192
1197
  key: e,
1193
- label: dt(e, t[e]),
1194
- value: ft(n, t[e])
1198
+ label: ft(e, t[e]),
1199
+ value: pt(n, t[e])
1195
1200
  }));
1196
1201
  o.length && i.push({
1197
1202
  layer: e,
@@ -1203,7 +1208,7 @@ function mt(e, t, n) {
1203
1208
  }
1204
1209
  //#endregion
1205
1210
  //#region src/components/MMapIdentify.vue?vue&type=script&setup=true&lang.ts
1206
- var ht = { class: "hidden" }, gt = /* @__PURE__ */ D({
1211
+ var gt = { class: "hidden" }, _t = /* @__PURE__ */ O({
1207
1212
  inheritAttrs: !1,
1208
1213
  __name: "MMapIdentify",
1209
1214
  props: {
@@ -1222,11 +1227,11 @@ var ht = { class: "hidden" }, gt = /* @__PURE__ */ D({
1222
1227
  },
1223
1228
  emits: ["identify"],
1224
1229
  setup(e, { expose: t, emit: n }) {
1225
- let r = e, i = n, { on: a, onReady: o, activeTool: s } = Y(), { model: c } = fe(), l = H([]), u = z([0, 0]), d = z(!1);
1230
+ let r = e, i = n, { on: a, onReady: o, activeTool: s } = Y(), { model: c } = Z(), l = H([]), u = z([0, 0]), d = z(!1);
1226
1231
  a("click", (e) => {
1227
1232
  if (!r.enabled || s.value) return;
1228
1233
  let t = e.target;
1229
- l.value = mt(t, e.point, c.value), u.value = [e.lngLat.lng, e.lngLat.lat], d.value = l.value.length > 0, i("identify", l.value, u.value);
1234
+ l.value = ht(t, e.point, c.value), u.value = [e.lngLat.lng, e.lngLat.lat], d.value = l.value.length > 0, i("identify", l.value, u.value);
1230
1235
  });
1231
1236
  function f() {
1232
1237
  d.value = !1;
@@ -1248,38 +1253,38 @@ var ht = { class: "hidden" }, gt = /* @__PURE__ */ D({
1248
1253
  }
1249
1254
  return o((e) => {
1250
1255
  p = e, _();
1251
- }), K(c, _), P(() => {
1256
+ }), K(c, _), F(() => {
1252
1257
  m.forEach((e) => {
1253
1258
  p?.off("mouseenter", e, h), p?.off("mouseleave", e, g);
1254
1259
  });
1255
- }), t({ close: f }), (t, n) => (L(), S("div", ht, [e.marker && d.value ? (L(), b(Se, {
1260
+ }), t({ close: f }), (t, n) => (L(), C("div", gt, [e.marker && d.value ? (L(), x(Se, {
1256
1261
  key: 0,
1257
1262
  "lng-lat": u.value
1258
- }, null, 8, ["lng-lat"])) : x("", !0), e.popup && l.value.length ? (L(), b(Ce, {
1263
+ }, null, 8, ["lng-lat"])) : S("", !0), e.popup && l.value.length ? (L(), x(we, {
1259
1264
  key: 1,
1260
1265
  open: d.value,
1261
1266
  "onUpdate:open": n[0] ||= (e) => d.value = e,
1262
1267
  "lng-lat": u.value,
1263
1268
  "max-width": "360px",
1264
- offset: e.marker ? G(be) : void 0
1269
+ offset: e.marker ? W(xe) : void 0
1265
1270
  }, {
1266
- default: q(() => [C("div", j({ class: "max-h-80 overflow-y-auto" }, t.$attrs), [V(t.$slots, "default", {
1271
+ default: q(() => [w("div", M({ class: "max-h-80 overflow-y-auto" }, t.$attrs), [V(t.$slots, "default", {
1267
1272
  results: l.value,
1268
1273
  lngLat: u.value,
1269
1274
  close: f
1270
- }, () => [E(ot, { results: l.value }, null, 8, ["results"])])], 16)]),
1275
+ }, () => [D(st, { results: l.value }, null, 8, ["results"])])], 16)]),
1271
1276
  _: 3
1272
1277
  }, 8, [
1273
1278
  "open",
1274
1279
  "lng-lat",
1275
1280
  "offset"
1276
- ])) : x("", !0)]));
1281
+ ])) : S("", !0)]));
1277
1282
  }
1278
- }), _t = { class: "hidden" }, vt = [
1283
+ }), vt = { class: "hidden" }, yt = [
1279
1284
  "title",
1280
1285
  "aria-label",
1281
1286
  "aria-pressed"
1282
- ], yt = { class: "-mx-4 -mt-3 mb-1 bg-primary-container px-3 py-1.5 text-label-medium text-on-primary-container" }, bt = { class: "flex flex-col" }, xt = { class: "text-label-small text-on-surface-variant" }, St = { class: "text-body-small text-on-surface" }, Ct = /* @__PURE__ */ D({
1287
+ ], bt = { class: "-mx-4 -mt-3 mb-1 bg-primary-container px-3 py-1.5 text-label-medium text-on-primary-container" }, xt = { class: "flex flex-col" }, St = { class: "text-label-small text-on-surface-variant" }, Ct = { class: "text-body-small text-on-surface" }, wt = /* @__PURE__ */ O({
1283
1288
  __name: "MMapHover",
1284
1289
  props: {
1285
1290
  modelValue: {
@@ -1292,25 +1297,25 @@ var ht = { class: "hidden" }, gt = /* @__PURE__ */ D({
1292
1297
  }
1293
1298
  },
1294
1299
  emits: ["update:modelValue"],
1295
- setup(e, { emit: n }) {
1296
- let r = e, i = n, a = t(), { onReady: o } = Y(), { model: s } = fe(), c = y(() => (s.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), l = H(null), u = z([0, 0]), f = z(!1), p, m = [];
1300
+ setup(e, { emit: t }) {
1301
+ let r = e, i = t, a = n(), { onReady: o } = Y(), { model: s } = Z(), c = b(() => (s.value?.layers ?? []).filter((e) => e.hover && e.hover.fields.length)), u = H(null), d = z([0, 0]), f = z(!1), p, m = [];
1297
1302
  function h(e) {
1298
1303
  let t = e.features?.[0], n = c.value.find((e) => e.id === t?.layer.id);
1299
1304
  if (!t || !n || !n.hover) return;
1300
1305
  let r = t.properties ?? {};
1301
- l.value = {
1306
+ u.value = {
1302
1307
  layer: n,
1303
1308
  fields: n.hover.fields.map((e) => ({
1304
1309
  key: e.key,
1305
- label: dt(e.key, e),
1306
- value: ft(r[e.key], e)
1310
+ label: ft(e.key, e),
1311
+ value: pt(r[e.key], e)
1307
1312
  })).filter((e) => e.value)
1308
- }, u.value = [e.lngLat.lng, e.lngLat.lat], f.value = !0;
1313
+ }, d.value = [e.lngLat.lng, e.lngLat.lat], f.value = !0;
1309
1314
  }
1310
1315
  function g() {
1311
1316
  f.value = !1;
1312
1317
  }
1313
- function v() {
1318
+ function _() {
1314
1319
  if (p) {
1315
1320
  for (let e of m) p.off("mousemove", e, h), p.off("mouseleave", e, g);
1316
1321
  m = r.modelValue ? c.value.map((e) => e.id) : [];
@@ -1319,56 +1324,56 @@ var ht = { class: "hidden" }, gt = /* @__PURE__ */ D({
1319
1324
  }
1320
1325
  }
1321
1326
  o((e) => {
1322
- p = e, v();
1323
- }), K([() => r.modelValue, c], v), P(() => {
1327
+ p = e, _();
1328
+ }), K([() => r.modelValue, c], _), F(() => {
1324
1329
  for (let e of m) p?.off("mousemove", e, h), p?.off("mouseleave", e, g);
1325
1330
  });
1326
- let w = y(() => r.control === !0 ? "top-right" : r.control || "top-right");
1327
- return (t, n) => (L(), S("div", _t, [e.control && c.value.length ? (L(), b(oe, {
1331
+ let y = b(() => r.control === !0 ? "top-right" : r.control || "top-right");
1332
+ return (t, n) => (L(), C("div", vt, [e.control && c.value.length ? (L(), x(se, {
1328
1333
  key: 0,
1329
- position: w.value
1334
+ position: y.value
1330
1335
  }, {
1331
- default: q(() => [C("button", {
1336
+ default: q(() => [w("button", {
1332
1337
  type: "button",
1333
1338
  class: "grid place-items-center",
1334
- title: G(a).mapHoverInfo,
1335
- "aria-label": G(a).mapHoverInfo,
1339
+ title: W(a).mapHoverInfo,
1340
+ "aria-label": W(a).mapHoverInfo,
1336
1341
  "aria-pressed": e.modelValue,
1337
1342
  onClick: n[0] ||= (t) => i("update:modelValue", !e.modelValue)
1338
- }, [E(d, {
1343
+ }, [D(l, {
1339
1344
  name: "ads_click",
1340
1345
  size: 20
1341
- })], 8, vt)]),
1346
+ })], 8, yt)]),
1342
1347
  _: 1
1343
- }, 8, ["position"])) : x("", !0), l.value ? (L(), b(Ce, {
1348
+ }, 8, ["position"])) : S("", !0), u.value ? (L(), x(we, {
1344
1349
  key: 1,
1345
1350
  open: f.value,
1346
1351
  "onUpdate:open": n[1] ||= (e) => f.value = e,
1347
- "lng-lat": u.value,
1352
+ "lng-lat": d.value,
1348
1353
  "close-button": !1,
1349
1354
  "close-on-click": !1,
1350
1355
  offset: 12,
1351
1356
  "max-width": "280px",
1352
1357
  class: "m3-map-hover"
1353
1358
  }, {
1354
- default: q(() => [C("p", yt, U(l.value.layer.title), 1), C("dl", bt, [(L(!0), S(_, null, B(l.value.fields, (e) => (L(), S("div", {
1359
+ default: q(() => [w("p", bt, U(u.value.layer.title), 1), w("dl", xt, [(L(!0), C(v, null, B(u.value.fields, (e) => (L(), C("div", {
1355
1360
  key: e.key,
1356
1361
  class: "border-b border-outline-variant py-1 last:border-b-0"
1357
- }, [C("dt", xt, U(e.label), 1), C("dd", St, U(e.value), 1)]))), 128))])]),
1362
+ }, [w("dt", St, U(e.label), 1), w("dd", Ct, U(e.value), 1)]))), 128))])]),
1358
1363
  _: 1
1359
- }, 8, ["open", "lng-lat"])) : x("", !0)]));
1364
+ }, 8, ["open", "lng-lat"])) : S("", !0)]));
1360
1365
  }
1361
- }), wt = 6371008.8, $ = Math.PI / 180;
1362
- function Tt(e, t) {
1366
+ }), Tt = 6371008.8, $ = Math.PI / 180;
1367
+ function Et(e, t) {
1363
1368
  let n = (t[1] - e[1]) * $, r = (t[0] - e[0]) * $, i = Math.sin(n / 2) ** 2 + Math.cos(e[1] * $) * Math.cos(t[1] * $) * Math.sin(r / 2) ** 2;
1364
- return 2 * wt * Math.asin(Math.min(1, Math.sqrt(i)));
1369
+ return 2 * Tt * Math.asin(Math.min(1, Math.sqrt(i)));
1365
1370
  }
1366
- function Et(e) {
1371
+ function Dt(e) {
1367
1372
  let t = 0;
1368
- for (let n = 1; n < e.length; n++) t += Tt(e[n - 1], e[n]);
1373
+ for (let n = 1; n < e.length; n++) t += Et(e[n - 1], e[n]);
1369
1374
  return t;
1370
1375
  }
1371
- function Dt(e, t) {
1376
+ function Ot(e, t) {
1372
1377
  let [n, r, i, a] = [
1373
1378
  e[0] * $,
1374
1379
  e[1] * $,
@@ -1377,22 +1382,22 @@ function Dt(e, t) {
1377
1382
  ], o = Math.cos(a) * Math.cos(i - n), s = Math.cos(a) * Math.sin(i - n), c = Math.atan2(Math.sin(r) + Math.sin(a), Math.sqrt((Math.cos(r) + o) ** 2 + s ** 2));
1378
1383
  return [(n + Math.atan2(s, Math.cos(r) + o)) / $, c / $];
1379
1384
  }
1380
- function Ot(e) {
1381
- let t = kt(e), n = t.length - 1;
1385
+ function kt(e) {
1386
+ let t = At(e), n = t.length - 1;
1382
1387
  if (n <= 2) return 0;
1383
1388
  let r = 0;
1384
1389
  for (let e = 0; e < n; e++) {
1385
1390
  let i = t[e], a = t[e + 1 === n ? 0 : e + 1], o = t[e + 2 >= n ? (e + 2) % n : e + 2];
1386
1391
  r += (o[0] - i[0]) * $ * Math.sin(a[1] * $);
1387
1392
  }
1388
- return Math.abs(r * wt * wt / 2);
1393
+ return Math.abs(r * Tt * Tt / 2);
1389
1394
  }
1390
- function kt(e) {
1395
+ function At(e) {
1391
1396
  let t = e[0], n = e[e.length - 1];
1392
1397
  return t && n && (t[0] !== n[0] || t[1] !== n[1]) ? [...e, t] : e;
1393
1398
  }
1394
- function At(e) {
1395
- let t = kt(e), n = 0, r = 0, i = 0;
1399
+ function jt(e) {
1400
+ let t = At(e), n = 0, r = 0, i = 0;
1396
1401
  for (let e = 0; e < t.length - 1; e++) {
1397
1402
  let [a, o] = t[e], [s, c] = t[e + 1], l = a * c - s * o;
1398
1403
  n += l, r += (a + s) * l, i += (o + c) * l;
@@ -1405,11 +1410,11 @@ function At(e) {
1405
1410
  }
1406
1411
  //#endregion
1407
1412
  //#region src/components/MMapMeasure.vue?vue&type=script&setup=true&lang.ts
1408
- var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "aria-pressed"], Pt = ["title", "disabled"], Ft = [
1413
+ var Mt = { class: "hidden" }, Nt = ["title", "aria-pressed"], Pt = ["title", "aria-pressed"], Ft = ["title", "disabled"], It = [
1409
1414
  "aria-label",
1410
1415
  "title",
1411
1416
  "onClick"
1412
- ], It = /* @__PURE__ */ D({
1417
+ ], Lt = /* @__PURE__ */ O({
1413
1418
  __name: "MMapMeasure",
1414
1419
  props: {
1415
1420
  modelValue: { default: null },
@@ -1419,15 +1424,15 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1419
1424
  }
1420
1425
  },
1421
1426
  emits: ["update:modelValue", "change"],
1422
- setup(n, { expose: r, emit: i }) {
1423
- let o = n, s = i, c = t(), { onReady: l, styleVersion: u, activeTool: f } = Y(), p = e(["primary", "surface"]), m = `m3-measure-${te()}`, h = {
1427
+ setup(t, { expose: r, emit: i }) {
1428
+ let a = t, o = i, s = n(), { onReady: c, styleVersion: u, activeTool: d } = Y(), p = e(["primary", "surface"]), m = `m3-measure-${re()}`, h = {
1424
1429
  done: `${m}-done`,
1425
1430
  draft: `${m}-draft`,
1426
1431
  handles: `${m}-handles`
1427
- }, g = `${h.handles}-vertex`, v = `${h.handles}-midpoint`, w = [], D = [], O = null, k = !1, A = null, j = 0, N, F = z(null), I = z(0), R = H([]), ee = () => typeof document < "u" && document.documentElement.lang || void 0, V = (e, t) => new Intl.NumberFormat(ee(), {
1432
+ }, g = `${h.handles}-vertex`, _ = `${h.handles}-midpoint`, y = [], T = [], O = null, k = !1, A = null, j = 0, M, P = z(null), ee = z(0), I = H([]), te = () => typeof document < "u" && document.documentElement.lang || void 0, R = (e, t) => new Intl.NumberFormat(te(), {
1428
1433
  minimumFractionDigits: t,
1429
1434
  maximumFractionDigits: t
1430
- }).format(e), W = (e) => e === 0 ? "" : e < 1e3 ? `${V(Math.round(e), 0)} m` : `${V(e / 1e3, 2)} km`, ne = (e) => e >= 1e6 ? `${V(e / 1e6, 2)} km²` : e >= 1e4 ? `${V(e / 1e4, 2)} ha` : `${V(Math.round(e), 0)} m²`, re = (e, t = {}) => ({
1435
+ }).format(e), V = (e) => e === 0 ? "" : e < 1e3 ? `${R(Math.round(e), 0)} m` : `${R(e / 1e3, 2)} km`, ne = (e) => e >= 1e6 ? `${R(e / 1e6, 2)} km²` : e >= 1e4 ? `${R(e / 1e4, 2)} ha` : `${R(Math.round(e), 0)} m²`, G = (e, t = {}) => ({
1431
1436
  type: "Feature",
1432
1437
  geometry: {
1433
1438
  type: "Point",
@@ -1436,7 +1441,7 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1436
1441
  properties: t
1437
1442
  });
1438
1443
  function ie(e, t, n, r) {
1439
- let i = e.map((e) => re(e)), a = [];
1444
+ let i = e.map((e) => G(e)), a = [];
1440
1445
  if (e.length < 2) return {
1441
1446
  features: i,
1442
1447
  labels: a
@@ -1451,10 +1456,10 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1451
1456
  });
1452
1457
  let o = (e) => {
1453
1458
  for (let t = 0; t < e.length - 1; t++) {
1454
- let r = W(Tt(e[t], e[t + 1]));
1459
+ let r = V(Et(e[t], e[t + 1]));
1455
1460
  r && a.push({
1456
1461
  key: `${n}-s${t}`,
1457
- at: Dt(e[t], e[t + 1]),
1462
+ at: Ot(e[t], e[t + 1]),
1458
1463
  text: r,
1459
1464
  kind: "segment"
1460
1465
  });
@@ -1463,12 +1468,12 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1463
1468
  if (t === "distance") o(e), a.push({
1464
1469
  key: `${n}-t`,
1465
1470
  at: e[e.length - 1],
1466
- text: `${c.mapTotal}: ${W(Et(e))}`,
1471
+ text: `${s.mapTotal}: ${V(Dt(e))}`,
1467
1472
  kind: "total",
1468
1473
  m: r
1469
1474
  });
1470
1475
  else if (e.length >= 3) {
1471
- let t = kt(e);
1476
+ let t = At(e);
1472
1477
  i.push({
1473
1478
  type: "Feature",
1474
1479
  geometry: {
@@ -1478,15 +1483,15 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1478
1483
  properties: {}
1479
1484
  }), o(t), a.push({
1480
1485
  key: `${n}-a`,
1481
- at: At(t),
1482
- text: ne(Ot(t)),
1486
+ at: jt(t),
1487
+ text: ne(kt(t)),
1483
1488
  kind: "area",
1484
1489
  m: r
1485
1490
  });
1486
1491
  } else a.push({
1487
1492
  key: `${n}-t`,
1488
1493
  at: e[e.length - 1],
1489
- text: W(Et(e)),
1494
+ text: V(Dt(e)),
1490
1495
  kind: "total",
1491
1496
  m: r
1492
1497
  });
@@ -1498,43 +1503,43 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1498
1503
  let ae = (e) => ({
1499
1504
  type: "FeatureCollection",
1500
1505
  features: e
1501
- }), X = (e, t) => (N?.getSource(e))?.setData(ae(t));
1502
- function Z() {
1503
- if (!N) return;
1504
- let e = w.map((e, t) => ie(e.points, e.mode, `m${t}`, t)), t = F.value && D.length ? ie(O ? [...D, O] : D, F.value, "draft") : {
1506
+ }), oe = (e, t) => (M?.getSource(e))?.setData(ae(t));
1507
+ function X() {
1508
+ if (!M) return;
1509
+ let e = y.map((e, t) => ie(e.points, e.mode, `m${t}`, t)), t = P.value && T.length ? ie(O ? [...T, O] : T, P.value, "draft") : {
1505
1510
  features: [],
1506
1511
  labels: []
1507
1512
  };
1508
- X(h.done, e.flatMap((e) => e.features)), X(h.draft, t.features);
1513
+ oe(h.done, e.flatMap((e) => e.features)), oe(h.draft, t.features);
1509
1514
  let n = [];
1510
- F.value || w.forEach((e, t) => {
1511
- (e.closed ? e.points.slice(0, -1) : e.points).forEach((e, r) => n.push(re(e, {
1515
+ P.value || y.forEach((e, t) => {
1516
+ (e.closed ? e.points.slice(0, -1) : e.points).forEach((e, r) => n.push(G(e, {
1512
1517
  handle: "vertex",
1513
1518
  m: t,
1514
1519
  v: r
1515
1520
  })));
1516
- for (let r = 0; r < e.points.length - 1; r++) n.push(re(Dt(e.points[r], e.points[r + 1]), {
1521
+ for (let r = 0; r < e.points.length - 1; r++) n.push(G(Ot(e.points[r], e.points[r + 1]), {
1517
1522
  handle: "midpoint",
1518
1523
  m: t,
1519
1524
  after: r
1520
1525
  }));
1521
- }), X(h.handles, n), R.value = [...e.flatMap((e) => e.labels), ...t.labels];
1526
+ }), oe(h.handles, n), I.value = [...e.flatMap((e) => e.labels), ...t.labels];
1522
1527
  }
1523
- function se() {
1524
- I.value = w.length, s("change", w.map((e) => ({
1528
+ function ce() {
1529
+ ee.value = y.length, o("change", y.map((e) => ({
1525
1530
  mode: e.mode,
1526
1531
  points: e.points.map((e) => [...e]),
1527
1532
  closed: e.closed,
1528
- length: Et(e.points),
1529
- ...e.mode === "area" || e.closed ? { area: Ot(e.points) } : {}
1533
+ length: Dt(e.points),
1534
+ ...e.mode === "area" || e.closed ? { area: kt(e.points) } : {}
1530
1535
  })));
1531
1536
  }
1532
- let ce = (e) => [
1537
+ let le = (e) => [
1533
1538
  "==",
1534
1539
  ["geometry-type"],
1535
1540
  e
1536
1541
  ];
1537
- function le() {
1542
+ function ue() {
1538
1543
  let { primary: e, surface: t } = p.value;
1539
1544
  return {
1540
1545
  fill: { "fill-color": e },
@@ -1545,20 +1550,20 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1545
1550
  }
1546
1551
  };
1547
1552
  }
1548
- function ue() {
1549
- if (!N) return;
1550
- for (let e of Object.values(h)) N.getSource(e) || N.addSource(e, {
1553
+ function de() {
1554
+ if (!M) return;
1555
+ for (let e of Object.values(h)) M.getSource(e) || M.addSource(e, {
1551
1556
  type: "geojson",
1552
1557
  data: ae([])
1553
1558
  });
1554
- let e = le(), t = (e) => {
1555
- N.getLayer(e.id) || N.addLayer(e);
1559
+ let e = ue(), t = (e) => {
1560
+ M.getLayer(e.id) || M.addLayer(e);
1556
1561
  };
1557
1562
  for (let [n, r] of [[h.done, !1], [h.draft, !0]]) t({
1558
1563
  id: `${n}-fill`,
1559
1564
  type: "fill",
1560
1565
  source: n,
1561
- filter: ce("Polygon"),
1566
+ filter: le("Polygon"),
1562
1567
  paint: {
1563
1568
  ...e.fill,
1564
1569
  "fill-opacity": r ? .15 : .2
@@ -1581,7 +1586,7 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1581
1586
  id: `${n}-points`,
1582
1587
  type: "circle",
1583
1588
  source: n,
1584
- filter: ce("Point"),
1589
+ filter: le("Point"),
1585
1590
  paint: {
1586
1591
  ...e.vertices,
1587
1592
  "circle-radius": 5,
@@ -1589,7 +1594,7 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1589
1594
  }
1590
1595
  });
1591
1596
  t({
1592
- id: v,
1597
+ id: _,
1593
1598
  type: "circle",
1594
1599
  source: h.handles,
1595
1600
  filter: [
@@ -1620,46 +1625,46 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1620
1625
  });
1621
1626
  }
1622
1627
  K(p, () => {
1623
- if (!N) return;
1624
- let e = le(), t = (e, t) => {
1625
- if (N.getLayer(e)) for (let [n, r] of Object.entries(t)) N.setPaintProperty(e, n, r);
1628
+ if (!M) return;
1629
+ let e = ue(), t = (e, t) => {
1630
+ if (M.getLayer(e)) for (let [n, r] of Object.entries(t)) M.setPaintProperty(e, n, r);
1626
1631
  };
1627
1632
  for (let n of [h.done, h.draft]) t(`${n}-fill`, e.fill), t(`${n}-line`, e.line), t(`${n}-points`, e.vertices);
1628
- t(v, e.vertices), t(g, e.vertices);
1633
+ t(_, e.vertices), t(g, e.vertices);
1629
1634
  });
1630
- let de = (e) => [e.lngLat.lng, e.lngLat.lat];
1631
- function fe(e) {
1632
- if (D.length >= 2) {
1633
- let t = N.project(D[0]);
1635
+ let fe = (e) => [e.lngLat.lng, e.lngLat.lat];
1636
+ function pe(e) {
1637
+ if (T.length >= 2) {
1638
+ let t = M.project(T[0]);
1634
1639
  if (Math.hypot(t.x - e.point.x, t.y - e.point.y) < 20) {
1635
1640
  k = !0, Q();
1636
1641
  return;
1637
1642
  }
1638
1643
  }
1639
- D.push(de(e)), Z();
1644
+ T.push(fe(e)), X();
1640
1645
  }
1641
- function pe(e) {
1642
- O = de(e), !j && (j = requestAnimationFrame(() => {
1643
- j = 0, Z();
1646
+ function Z(e) {
1647
+ O = fe(e), !j && (j = requestAnimationFrame(() => {
1648
+ j = 0, X();
1644
1649
  }));
1645
1650
  }
1646
1651
  function me(e) {
1647
- if (e.preventDefault(), D.length < 2) return;
1648
- let t = N.project(D[D.length - 1]), n = N.project(D[D.length - 2]);
1649
- Math.hypot(t.x - n.x, t.y - n.y) < 10 && D.pop(), Q();
1652
+ if (e.preventDefault(), T.length < 2) return;
1653
+ let t = M.project(T[T.length - 1]), n = M.project(T[T.length - 2]);
1654
+ Math.hypot(t.x - n.x, t.y - n.y) < 10 && T.pop(), Q();
1650
1655
  }
1651
1656
  function he(e) {
1652
1657
  e.key === "Enter" && Q();
1653
1658
  }
1654
- a(() => !!F.value, () => Q(!0));
1659
+ f(() => !!P.value, () => Q(!0));
1655
1660
  let ge = () => typeof navigator < "u" ? navigator.keyboard : void 0, _e = !1;
1656
1661
  function ve() {
1657
- F.value && document.fullscreenElement && ge()?.lock && ge().lock(["Escape"]).then(() => {
1662
+ P.value && document.fullscreenElement && ge()?.lock && ge().lock(["Escape"]).then(() => {
1658
1663
  _e = !0;
1659
1664
  }, () => {});
1660
1665
  }
1661
1666
  function ye() {
1662
- F.value || (_e && ge()?.unlock?.(), _e = !1);
1667
+ P.value || (_e && ge()?.unlock?.(), _e = !1);
1663
1668
  }
1664
1669
  function be() {
1665
1670
  let e, t = () => {
@@ -1670,147 +1675,147 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1670
1675
  document.addEventListener("keyup", n, !0), e = setTimeout(t, 1500);
1671
1676
  }
1672
1677
  function xe(e) {
1673
- if (N) {
1674
- if (F.value === e) return Q();
1675
- F.value && Q(), F.value = e, f.value = "measure", D = [], O = null, N.getCanvas().style.cursor = "crosshair", N.doubleClickZoom.disable(), N.on("click", fe), N.on("mousemove", pe), N.on("dblclick", me), document.addEventListener("keydown", he), document.addEventListener("fullscreenchange", ve), ve(), Z(), o.modelValue !== e && s("update:modelValue", e);
1678
+ if (M) {
1679
+ if (P.value === e) return Q();
1680
+ P.value && Q(), P.value = e, d.value = "measure", T = [], O = null, M.getCanvas().style.cursor = "crosshair", M.doubleClickZoom.disable(), M.on("click", pe), M.on("mousemove", Z), M.on("dblclick", me), document.addEventListener("keydown", he), document.addEventListener("fullscreenchange", ve), ve(), X(), a.modelValue !== e && o("update:modelValue", e);
1676
1681
  }
1677
1682
  }
1678
1683
  function Q(e = !1) {
1679
- if (!N || !F.value) return;
1684
+ if (!M || !P.value) return;
1680
1685
  cancelAnimationFrame(j), j = 0;
1681
- let t = D.length >= 3 && (k || F.value === "area");
1682
- D.length >= 2 && w.push({
1683
- mode: F.value,
1684
- points: t ? [...D, [...D[0]]] : D,
1686
+ let t = T.length >= 3 && (k || P.value === "area");
1687
+ T.length >= 2 && y.push({
1688
+ mode: P.value,
1689
+ points: t ? [...T, [...T[0]]] : T,
1685
1690
  closed: t
1686
- }), D = [], O = null, k = !1, F.value = null, f.value === "measure" && (f.value = null), N.getCanvas().style.cursor = "", N.doubleClickZoom.enable(), N.off("click", fe), N.off("mousemove", pe), N.off("dblclick", me), document.removeEventListener("keydown", he), document.removeEventListener("fullscreenchange", ve), e && _e ? be() : ye(), Z(), se(), o.modelValue !== null && s("update:modelValue", null);
1691
+ }), T = [], O = null, k = !1, P.value = null, d.value === "measure" && (d.value = null), M.getCanvas().style.cursor = "", M.doubleClickZoom.enable(), M.off("click", pe), M.off("mousemove", Z), M.off("dblclick", me), document.removeEventListener("keydown", he), document.removeEventListener("fullscreenchange", ve), e && _e ? be() : ye(), X(), ce(), a.modelValue !== null && o("update:modelValue", null);
1687
1692
  }
1688
1693
  function Ce(e) {
1689
- w[e] && (w.splice(e, 1), Z(), se());
1694
+ y[e] && (y.splice(e, 1), X(), ce());
1690
1695
  }
1691
1696
  function we() {
1692
- F.value && Q(), w.length = 0, Z(), se();
1697
+ P.value && Q(), y.length = 0, X(), ce();
1693
1698
  }
1694
1699
  function Te(e) {
1695
1700
  let t = e.features?.[0];
1696
- if (!t || F.value || !N) return;
1701
+ if (!t || P.value || !M) return;
1697
1702
  e.preventDefault();
1698
- let n = t.properties.m, r = w[n];
1703
+ let n = t.properties.m, r = y[n];
1699
1704
  if (!r) return;
1700
1705
  let i = t.properties.v;
1701
- t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0, de(e))), A = {
1706
+ t.properties.handle === "midpoint" && (i = t.properties.after + 1, r.points.splice(i, 0, fe(e))), A = {
1702
1707
  m: n,
1703
1708
  v: i
1704
- }, f.value = "measure", N.getCanvas().style.cursor = "grabbing";
1709
+ }, d.value = "measure", M.getCanvas().style.cursor = "grabbing";
1705
1710
  let a = e.type === "touchstart";
1706
- a && N.dragPan.disable(), N.on(a ? "touchmove" : "mousemove", Ee), N.once(a ? "touchend" : "mouseup", De), Z();
1711
+ a && M.dragPan.disable(), M.on(a ? "touchmove" : "mousemove", Ee), M.once(a ? "touchend" : "mouseup", De), X();
1707
1712
  }
1708
1713
  function Ee(e) {
1709
1714
  if (!A) return;
1710
- let t = w[A.m];
1715
+ let t = y[A.m];
1711
1716
  if (!t) return;
1712
- let n = de(e);
1713
- t.points[A.v] = n, t.closed && A.v === 0 && (t.points[t.points.length - 1] = n), Z();
1717
+ let n = fe(e);
1718
+ t.points[A.v] = n, t.closed && A.v === 0 && (t.points[t.points.length - 1] = n), X();
1714
1719
  }
1715
1720
  function De() {
1716
- N && (A = null, N.off("mousemove", Ee), N.off("touchmove", Ee), N.dragPan.enable(), N.getCanvas().style.cursor = "", se(), setTimeout(() => {
1717
- f.value === "measure" && !F.value && (f.value = null);
1721
+ M && (A = null, M.off("mousemove", Ee), M.off("touchmove", Ee), M.dragPan.enable(), M.getCanvas().style.cursor = "", ce(), setTimeout(() => {
1722
+ d.value === "measure" && !P.value && (d.value = null);
1718
1723
  }));
1719
1724
  }
1720
1725
  let Oe = () => {
1721
- N && !A && !F.value && (N.getCanvas().style.cursor = "grab");
1726
+ M && !A && !P.value && (M.getCanvas().style.cursor = "grab");
1722
1727
  }, ke = () => {
1723
- N && !A && !F.value && (N.getCanvas().style.cursor = "");
1728
+ M && !A && !P.value && (M.getCanvas().style.cursor = "");
1724
1729
  };
1725
- l((e) => {
1726
- N = e, ue();
1727
- for (let t of [g, v]) e.on("mousedown", t, Te), e.on("touchstart", t, Te), e.on("mouseenter", t, Oe), e.on("mouseleave", t, ke);
1728
- o.modelValue && xe(o.modelValue);
1730
+ c((e) => {
1731
+ M = e, de();
1732
+ for (let t of [g, _]) e.on("mousedown", t, Te), e.on("touchstart", t, Te), e.on("mouseenter", t, Oe), e.on("mouseleave", t, ke);
1733
+ a.modelValue && xe(a.modelValue);
1729
1734
  }), K(u, () => {
1730
- ue(), Z();
1731
- }), K(() => o.modelValue, (e) => {
1732
- e && e !== F.value ? xe(e) : !e && F.value && Q();
1733
- }), P(() => {
1734
- if (!N) return;
1735
- F.value && Q();
1736
- for (let e of [g, v]) N.off("mousedown", e, Te), N.off("touchstart", e, Te), N.off("mouseenter", e, Oe), N.off("mouseleave", e, ke);
1735
+ de(), X();
1736
+ }), K(() => a.modelValue, (e) => {
1737
+ e && e !== P.value ? xe(e) : !e && P.value && Q();
1738
+ }), F(() => {
1739
+ if (!M) return;
1740
+ P.value && Q();
1741
+ for (let e of [g, _]) M.off("mousedown", e, Te), M.off("touchstart", e, Te), M.off("mouseenter", e, Oe), M.off("mouseleave", e, ke);
1737
1742
  let e = [
1738
1743
  g,
1739
- v,
1744
+ _,
1740
1745
  ...[h.done, h.draft].flatMap((e) => [
1741
1746
  `${e}-points`,
1742
1747
  `${e}-line`,
1743
1748
  `${e}-fill`
1744
1749
  ])
1745
1750
  ];
1746
- for (let t of e) N.getLayer(t) && N.removeLayer(t);
1747
- for (let e of Object.values(h)) N.getSource(e) && N.removeSource(e);
1751
+ for (let t of e) M.getLayer(t) && M.removeLayer(t);
1752
+ for (let e of Object.values(h)) M.getSource(e) && M.removeSource(e);
1748
1753
  });
1749
- let Ae = y(() => o.control === !0 ? "top-right" : o.control || "top-right");
1754
+ let Ae = b(() => a.control === !0 ? "top-right" : a.control || "top-right");
1750
1755
  return r({
1751
1756
  start: xe,
1752
1757
  finish: Q,
1753
1758
  clear: we,
1754
1759
  remove: Ce
1755
- }), (e, t) => (L(), S("div", jt, [n.control ? (L(), b(oe, {
1760
+ }), (e, n) => (L(), C("div", Mt, [t.control ? (L(), x(se, {
1756
1761
  key: 0,
1757
1762
  position: Ae.value
1758
1763
  }, {
1759
1764
  default: q(() => [
1760
- C("button", {
1765
+ w("button", {
1761
1766
  type: "button",
1762
1767
  class: "grid place-items-center",
1763
- title: G(c).mapMeasureDistance,
1764
- "aria-pressed": F.value === "distance",
1765
- onClick: t[0] ||= (e) => xe("distance")
1766
- }, [E(d, {
1768
+ title: W(s).mapMeasureDistance,
1769
+ "aria-pressed": P.value === "distance",
1770
+ onClick: n[0] ||= (e) => xe("distance")
1771
+ }, [D(l, {
1767
1772
  name: "straighten",
1768
1773
  size: 20
1769
- })], 8, Mt),
1770
- C("button", {
1774
+ })], 8, Nt),
1775
+ w("button", {
1771
1776
  type: "button",
1772
1777
  class: "grid place-items-center",
1773
- title: G(c).mapMeasureArea,
1774
- "aria-pressed": F.value === "area",
1775
- onClick: t[1] ||= (e) => xe("area")
1776
- }, [E(d, {
1778
+ title: W(s).mapMeasureArea,
1779
+ "aria-pressed": P.value === "area",
1780
+ onClick: n[1] ||= (e) => xe("area")
1781
+ }, [D(l, {
1777
1782
  name: "pentagon",
1778
1783
  size: 20
1779
- })], 8, Nt),
1780
- C("button", {
1784
+ })], 8, Pt),
1785
+ w("button", {
1781
1786
  type: "button",
1782
1787
  class: "grid place-items-center",
1783
- title: G(c).mapClearMeasurements,
1784
- disabled: !I.value && !F.value,
1788
+ title: W(s).mapClearMeasurements,
1789
+ disabled: !ee.value && !P.value,
1785
1790
  onClick: we
1786
- }, [E(d, {
1791
+ }, [D(l, {
1787
1792
  name: "delete",
1788
1793
  size: 20
1789
- })], 8, Pt)
1794
+ })], 8, Ft)
1790
1795
  ]),
1791
1796
  _: 1
1792
- }, 8, ["position"])) : x("", !0), (L(!0), S(_, null, B(R.value, (e) => (L(), b(Se, {
1797
+ }, 8, ["position"])) : S("", !0), (L(!0), C(v, null, B(I.value, (e) => (L(), x(Se, {
1793
1798
  key: e.key,
1794
1799
  "lng-lat": e.at,
1795
1800
  anchor: e.kind === "area" ? "center" : "top",
1796
1801
  offset: e.kind === "area" ? [0, 0] : [0, 8],
1797
1802
  class: "pointer-events-none"
1798
1803
  }, {
1799
- default: q(() => [C("span", { class: M(["flex items-center gap-1 whitespace-nowrap rounded-full py-0.5 shadow-elevation-1", [e.kind === "segment" ? "bg-surface-container-highest text-label-small text-on-surface" : "bg-primary text-label-medium text-on-primary", e.m === void 0 ? "px-2" : "pr-0.5 pl-2"]]) }, [T(U(e.text) + " ", 1), e.m === void 0 ? x("", !0) : (L(), S("button", {
1804
+ default: q(() => [w("span", { class: N(["flex items-center gap-1 whitespace-nowrap rounded-full py-0.5 shadow-elevation-1", [e.kind === "segment" ? "bg-surface-container-highest text-label-small text-on-surface" : "bg-primary text-label-medium text-on-primary", e.m === void 0 ? "px-2" : "pr-0.5 pl-2"]]) }, [E(U(e.text) + " ", 1), e.m === void 0 ? S("", !0) : (L(), C("button", {
1800
1805
  key: 0,
1801
1806
  type: "button",
1802
1807
  class: "pointer-events-auto grid size-5 cursor-pointer place-items-center rounded-full hover:bg-on-primary/12 focus-visible:outline-2 focus-visible:outline-on-primary",
1803
- "aria-label": G(c).mapDeleteMeasurement,
1804
- title: G(c).mapDeleteMeasurement,
1808
+ "aria-label": W(s).mapDeleteMeasurement,
1809
+ title: W(s).mapDeleteMeasurement,
1805
1810
  onClick: J((t) => Ce(e.m), ["stop"]),
1806
- onPointerdown: t[2] ||= J(() => {}, ["stop"]),
1807
- onMousedown: t[3] ||= J(() => {}, ["stop"]),
1808
- onTouchstart: t[4] ||= J(() => {}, ["stop"]),
1809
- onDblclick: t[5] ||= J(() => {}, ["stop"])
1810
- }, [E(d, {
1811
+ onPointerdown: n[2] ||= J(() => {}, ["stop"]),
1812
+ onMousedown: n[3] ||= J(() => {}, ["stop"]),
1813
+ onTouchstart: n[4] ||= J(() => {}, ["stop"]),
1814
+ onDblclick: n[5] ||= J(() => {}, ["stop"])
1815
+ }, [D(l, {
1811
1816
  name: "close",
1812
1817
  size: 14
1813
- })], 40, Ft))], 2)]),
1818
+ })], 40, It))], 2)]),
1814
1819
  _: 2
1815
1820
  }, 1032, [
1816
1821
  "lng-lat",
@@ -1818,15 +1823,15 @@ var jt = { class: "hidden" }, Mt = ["title", "aria-pressed"], Nt = ["title", "ar
1818
1823
  "offset"
1819
1824
  ]))), 128))]));
1820
1825
  }
1821
- }), Lt = /* @__PURE__ */ new WeakMap();
1822
- function Rt(e) {
1823
- let t = ie(e);
1826
+ }), Rt = /* @__PURE__ */ new WeakMap();
1827
+ function zt(e) {
1828
+ let t = ae(e);
1824
1829
  if (!t) throw Error("useMapFilter() must be called in a component inside <MMap>, or be given one");
1825
1830
  function n(e, n) {
1826
1831
  let r = t.map.value;
1827
1832
  if (!r?.getLayer(e)) return;
1828
- let i = Lt.get(r);
1829
- i || Lt.set(r, i = /* @__PURE__ */ new Map()), i.has(e) || i.set(e, r.getFilter(e) ?? void 0);
1833
+ let i = Rt.get(r);
1834
+ i || Rt.set(r, i = /* @__PURE__ */ new Map()), i.has(e) || i.set(e, r.getFilter(e) ?? void 0);
1830
1835
  let a = i.get(e);
1831
1836
  r.setFilter(e, n ? a ? [
1832
1837
  "all",
@@ -1851,7 +1856,7 @@ function Rt(e) {
1851
1856
  }
1852
1857
  //#endregion
1853
1858
  //#region src/components/MMapFilter.vue?vue&type=script&setup=true&lang.ts
1854
- var zt = { class: "flex flex-wrap gap-2" }, Bt = /* @__PURE__ */ D({
1859
+ var Bt = { class: "flex flex-wrap gap-2" }, Vt = /* @__PURE__ */ O({
1855
1860
  __name: "MMapFilter",
1856
1861
  props: {
1857
1862
  layer: {},
@@ -1863,7 +1868,7 @@ var zt = { class: "flex flex-wrap gap-2" }, Bt = /* @__PURE__ */ D({
1863
1868
  },
1864
1869
  emits: ["update:modelValue"],
1865
1870
  setup(e, { emit: t }) {
1866
- let n = e, r = t, { onReady: i, styleVersion: a } = Y(() => n.map), { setFilter: o, valuesOf: s } = Rt(() => n.map), c = z([]), l = y(() => n.values ?? c.value), u = z([]), d = y(() => n.modelValue ?? u.value);
1871
+ let n = e, r = t, { onReady: i, styleVersion: a } = Y(() => n.map), { setFilter: o, valuesOf: s } = zt(() => n.map), c = z([]), l = b(() => n.values ?? c.value), u = z([]), d = b(() => n.modelValue ?? u.value);
1867
1872
  function f() {
1868
1873
  let e = d.value;
1869
1874
  o(n.layer, e.length ? [
@@ -1872,35 +1877,35 @@ var zt = { class: "flex flex-wrap gap-2" }, Bt = /* @__PURE__ */ D({
1872
1877
  ["literal", e]
1873
1878
  ] : null);
1874
1879
  }
1875
- function p(e) {
1880
+ function m(e) {
1876
1881
  let t = d.value.includes(e) ? d.value.filter((t) => t !== e) : [...d.value, e];
1877
1882
  u.value = t, r("update:modelValue", t);
1878
1883
  }
1879
- function m(e) {
1884
+ function h(e) {
1880
1885
  let t = () => {
1881
1886
  n.values || (c.value = s(n.layer, n.property));
1882
1887
  };
1883
1888
  t(), e.once("idle", t);
1884
1889
  }
1885
1890
  return i((e) => {
1886
- m(e), f();
1891
+ h(e), f();
1887
1892
  }), K(d, f, { deep: !0 }), K(a, () => f()), K(() => [n.layer, n.property], ([e], [t]) => {
1888
1893
  e !== t && o(t, null), f();
1889
- }), P(() => o(n.layer, null)), (t, n) => (L(), S("div", zt, [(L(!0), S(_, null, B(l.value, (t) => (L(), b(h, {
1894
+ }), F(() => o(n.layer, null)), (t, n) => (L(), C("div", Bt, [(L(!0), C(v, null, B(l.value, (t) => (L(), x(p, {
1890
1895
  key: t,
1891
1896
  type: "filter",
1892
1897
  clickable: "",
1893
1898
  selected: d.value.includes(t),
1894
- onClick: (e) => p(t)
1899
+ onClick: (e) => m(t)
1895
1900
  }, {
1896
- default: q(() => [T(U(e.labels?.[String(t)] ?? t), 1)]),
1901
+ default: q(() => [E(U(e.labels?.[String(t)] ?? t), 1)]),
1897
1902
  _: 2
1898
1903
  }, 1032, ["selected", "onClick"]))), 128))]));
1899
1904
  }
1900
1905
  });
1901
1906
  //#endregion
1902
1907
  //#region src/composables/mapSearch.ts
1903
- function Vt(e = {}) {
1908
+ function Ht(e = {}) {
1904
1909
  return async (t, n) => {
1905
1910
  let r = new URLSearchParams({
1906
1911
  format: "jsonv2",
@@ -1928,17 +1933,17 @@ function Vt(e = {}) {
1928
1933
  }
1929
1934
  //#endregion
1930
1935
  //#region src/components/MMapSearch.vue?vue&type=script&setup=true&lang.ts
1931
- var Ht = { class: "hidden" }, Ut = [
1936
+ var Ut = { class: "hidden" }, Wt = [
1932
1937
  "value",
1933
1938
  "placeholder",
1934
1939
  "aria-label"
1935
- ], Wt = {
1940
+ ], Gt = {
1936
1941
  key: 0,
1937
1942
  class: "border-t border-outline-variant"
1938
- }, Gt = {
1943
+ }, Kt = {
1939
1944
  key: 1,
1940
1945
  class: "flex flex-col items-center gap-2 py-6"
1941
- }, Kt = { class: "text-body-small text-on-surface-variant" }, qt = /* @__PURE__ */ D({
1946
+ }, qt = { class: "text-body-small text-on-surface-variant" }, Jt = /* @__PURE__ */ O({
1942
1947
  __name: "MMapSearch",
1943
1948
  props: {
1944
1949
  provider: {},
@@ -1955,30 +1960,30 @@ var Ht = { class: "hidden" }, Ut = [
1955
1960
  }
1956
1961
  },
1957
1962
  emits: ["select"],
1958
- setup(e, { emit: n }) {
1959
- let r = e, i = n, a = t(), { map: c } = Y(), l = y(() => r.provider ?? Vt()), u = z(""), h = H([]), g = z(!1), v = z(!1), w = z(!1), T = H(null), D, O;
1963
+ setup(e, { emit: t }) {
1964
+ let r = e, i = t, a = n(), { map: s } = Y(), c = b(() => r.provider ?? Ht()), d = z(""), f = H([]), p = z(!1), _ = z(!1), y = z(!1), T = H(null), E, O;
1960
1965
  async function k() {
1961
- let e = u.value.trim();
1966
+ let e = d.value.trim();
1962
1967
  if (!e) return;
1963
- D?.abort(), D = new AbortController();
1964
- let t = D;
1965
- g.value = !0, w.value = !0;
1968
+ E?.abort(), E = new AbortController();
1969
+ let t = E;
1970
+ p.value = !0, y.value = !0;
1966
1971
  try {
1967
- h.value = await l.value(e, t.signal);
1972
+ f.value = await c.value(e, t.signal);
1968
1973
  } catch {
1969
1974
  if (t.signal.aborted) return;
1970
- h.value = [];
1975
+ f.value = [];
1971
1976
  } finally {
1972
- D === t && (g.value = !1, v.value = !0);
1977
+ E === t && (p.value = !1, _.value = !0);
1973
1978
  }
1974
1979
  }
1975
1980
  function A(e) {
1976
- if (u.value = e, !e) return M();
1981
+ if (d.value = e, !e) return M();
1977
1982
  r.instant && (clearTimeout(O), O = setTimeout(k, 350));
1978
1983
  }
1979
1984
  function j(e) {
1980
- T.value = e, w.value = !1;
1981
- let t = c.value;
1985
+ T.value = e, y.value = !1;
1986
+ let t = s.value;
1982
1987
  e.bbox && e.bbox[0] !== e.bbox[2] ? t?.fitBounds([[e.bbox[0], e.bbox[1]], [e.bbox[2], e.bbox[3]]], {
1983
1988
  padding: 48,
1984
1989
  maxZoom: r.zoom
@@ -1988,10 +1993,10 @@ var Ht = { class: "hidden" }, Ut = [
1988
1993
  }), i("select", e);
1989
1994
  }
1990
1995
  function M() {
1991
- D?.abort(), clearTimeout(O), u.value = "", h.value = [], v.value = !1, g.value = !1, w.value = !1, T.value = null;
1996
+ E?.abort(), clearTimeout(O), d.value = "", f.value = [], _.value = !1, p.value = !1, y.value = !1, T.value = null;
1992
1997
  }
1993
- P(() => {
1994
- D?.abort(), clearTimeout(O);
1998
+ F(() => {
1999
+ E?.abort(), clearTimeout(O);
1995
2000
  });
1996
2001
  let N = {
1997
2002
  city: "location_city",
@@ -2020,54 +2025,54 @@ var Ht = { class: "hidden" }, Ut = [
2020
2025
  administrative: "map",
2021
2026
  country: "public",
2022
2027
  state: "map"
2023
- }, F = (e) => e && N[e] || "location_on";
2024
- return (t, n) => (L(), S("div", Ht, [E(oe, {
2028
+ }, P = (e) => e && N[e] || "location_on";
2029
+ return (t, n) => (L(), C("div", Ut, [D(se, {
2025
2030
  position: e.position,
2026
2031
  group: !1
2027
2032
  }, {
2028
- default: q(() => [E(f, {
2033
+ default: q(() => [D(h, {
2029
2034
  variant: "elevated",
2030
2035
  class: "w-80 max-w-[calc(100vw-5rem)] overflow-hidden"
2031
2036
  }, {
2032
- default: q(() => [C("form", {
2037
+ default: q(() => [w("form", {
2033
2038
  class: "flex items-center gap-2 py-1 pr-1 pl-3",
2034
2039
  role: "search",
2035
2040
  onSubmit: J(k, ["prevent"])
2036
2041
  }, [
2037
- E(d, {
2042
+ D(l, {
2038
2043
  name: "search",
2039
2044
  size: 20,
2040
2045
  class: "shrink-0 text-on-surface-variant"
2041
2046
  }),
2042
- C("input", {
2043
- value: u.value,
2047
+ w("input", {
2048
+ value: d.value,
2044
2049
  type: "search",
2045
2050
  enterkeyhint: "search",
2046
- placeholder: e.placeholder ?? G(a).mapSearchPlaces,
2047
- "aria-label": e.placeholder ?? G(a).mapSearchPlaces,
2051
+ placeholder: e.placeholder ?? W(a).mapSearchPlaces,
2052
+ "aria-label": e.placeholder ?? W(a).mapSearchPlaces,
2048
2053
  class: "min-w-0 flex-1 bg-transparent py-2 text-body-medium text-on-surface outline-none placeholder:text-on-surface-variant [&::-webkit-search-cancel-button]:hidden",
2049
2054
  onInput: n[0] ||= (e) => A(e.target.value),
2050
- onFocus: n[1] ||= (e) => w.value = v.value && !T.value
2051
- }, null, 40, Ut),
2052
- g.value ? (L(), b(o, {
2055
+ onFocus: n[1] ||= (e) => y.value = _.value && !T.value
2056
+ }, null, 40, Wt),
2057
+ p.value ? (L(), x(u, {
2053
2058
  key: 0,
2054
2059
  size: 20,
2055
2060
  class: "mr-2 shrink-0"
2056
- })) : u.value ? (L(), b(s, {
2061
+ })) : d.value ? (L(), x(o, {
2057
2062
  key: 1,
2058
2063
  icon: "close",
2059
- label: G(a).clearSearch,
2064
+ label: W(a).clearSearch,
2060
2065
  size: "sm",
2061
2066
  onClick: M
2062
- }, null, 8, ["label"])) : x("", !0)
2063
- ], 32), w.value && v.value && !g.value ? (L(), S("div", Wt, [h.value.length ? (L(), b(p, {
2067
+ }, null, 8, ["label"])) : S("", !0)
2068
+ ], 32), y.value && _.value && !p.value ? (L(), C("div", Gt, [f.value.length ? (L(), x(m, {
2064
2069
  key: 0,
2065
2070
  class: "max-h-72 overflow-y-auto"
2066
2071
  }, {
2067
- default: q(() => [(L(!0), S(_, null, B(h.value, (e, t) => (L(), b(m, {
2072
+ default: q(() => [(L(!0), C(v, null, B(f.value, (e, t) => (L(), x(g, {
2068
2073
  key: t,
2069
2074
  title: e.label,
2070
- icon: F(e.type),
2075
+ icon: P(e.type),
2071
2076
  leading: "icon",
2072
2077
  clickable: "",
2073
2078
  onClick: (t) => j(e)
@@ -2077,21 +2082,21 @@ var Ht = { class: "hidden" }, Ut = [
2077
2082
  "onClick"
2078
2083
  ]))), 128))]),
2079
2084
  _: 1
2080
- })) : (L(), S("div", Gt, [E(d, {
2085
+ })) : (L(), C("div", Kt, [D(l, {
2081
2086
  name: "search_off",
2082
2087
  size: 28,
2083
2088
  class: "text-on-surface-variant"
2084
- }), C("span", Kt, U(G(a).noResults), 1)]))])) : x("", !0)]),
2089
+ }), w("span", qt, U(W(a).noResults), 1)]))])) : S("", !0)]),
2085
2090
  _: 1
2086
2091
  })]),
2087
2092
  _: 1
2088
- }, 8, ["position"]), e.marker && T.value ? (L(), b(Se, {
2093
+ }, 8, ["position"]), e.marker && T.value ? (L(), x(Se, {
2089
2094
  key: 0,
2090
2095
  "lng-lat": T.value.lngLat
2091
- }, null, 8, ["lng-lat"])) : x("", !0)]));
2096
+ }, null, 8, ["lng-lat"])) : S("", !0)]));
2092
2097
  }
2093
2098
  });
2094
2099
  //#endregion
2095
- export { ge as MMap, Ze as MMapBaseLayers, oe as MMapControl, ot as MMapFeatureInfo, Bt as MMapFilter, we as MMapGeoJson, Ct as MMapHover, gt as MMapIdentify, qe as MMapLayers, Se as MMapMarker, It as MMapMeasure, Ce as MMapPopup, qt as MMapSearch, dt as fieldLabel, ft as formatFieldValue, lt as genericAdapter, mt as identifyFeatures, Vt as nominatimProvider, ut as orvianAdapter, Y as useMap, Rt as useMapFilter, fe as useMapLayers };
2100
+ export { _e as MMap, Qe as MMapBaseLayers, se as MMapControl, st as MMapFeatureInfo, Vt as MMapFilter, Te as MMapGeoJson, wt as MMapHover, _t as MMapIdentify, Je as MMapLayers, Se as MMapMarker, Lt as MMapMeasure, we as MMapPopup, Jt as MMapSearch, ft as fieldLabel, pt as formatFieldValue, ut as genericAdapter, ht as identifyFeatures, Ht as nominatimProvider, dt as orvianAdapter, Y as useMap, zt as useMapFilter, Z as useMapLayers };
2096
2101
 
2097
2102
  //# sourceMappingURL=map.js.map