@edugis-org/webmapx 0.1.7 → 0.1.9

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 (60) hide show
  1. package/dist-lib/{decorate-CWgUV1hU.js → decorate-DnZTfaod.js} +6 -6
  2. package/dist-lib/dist-BIbq3o-p.js +213 -0
  3. package/dist-lib/{dist-Dm6b7XCs.js → dist-CKAaoSoW.js} +2743 -2491
  4. package/dist-lib/{dist-kKlmcBXq.js → dist-CWCNMXMK.js} +1 -1
  5. package/dist-lib/{dist-Ha9LQCut.js → dist-D-5Gmgwo.js} +1 -1
  6. package/dist-lib/{layer-discovery-afWzu5hY.js → layer-discovery-DFP-WHAh.js} +1 -1
  7. package/dist-lib/{leaflet-adapter-D9djjrKv.js → leaflet-adapter-A0rte-c7.js} +1 -1
  8. package/dist-lib/{maplibre-adapter-TFc3e0G9.js → maplibre-adapter-Cy6yX6o7.js} +1 -1
  9. package/dist-lib/ol-tilegrid-Ct4my3IN.js +24 -0
  10. package/dist-lib/openlayers-adapter-B8WtV1tn.js +1462 -0
  11. package/dist-lib/{toast-Cm28o9U6.js → toast-BsoXOdeA.js} +1 -1
  12. package/dist-lib/{webmapx-3d-tool-D4CTD2gB.js → webmapx-3d-tool-CLppA7mK.js} +13 -13
  13. package/dist-lib/{webmapx-base-tool-Dm9NAWLD.js → webmapx-base-tool-DfRa7TlD.js} +1 -1
  14. package/dist-lib/{webmapx-config-edit-tool-BgcSkmmg.js → webmapx-config-edit-tool-BztWspia.js} +21 -21
  15. package/dist-lib/{webmapx-coordinates-tool-GMfztOzE.js → webmapx-coordinates-tool-DnTSkrRG.js} +20 -20
  16. package/dist-lib/{webmapx-core-bundle-BDImi1RE.js → webmapx-core-bundle-CH-5vYXU.js} +607 -1519
  17. package/dist-lib/webmapx-draw-tool-DxQgUF1Q.js +2117 -0
  18. package/dist-lib/{webmapx-geolocation-tool-Rw3-Iad1.js → webmapx-geolocation-tool-DIMh2kIr.js} +26 -25
  19. package/dist-lib/{webmapx-import-layer-tool-DRYviHd5.js → webmapx-import-layer-tool-DMiC1TpU.js} +16 -16
  20. package/dist-lib/{webmapx-info-tool-BJA157cy.js → webmapx-info-tool-D-XbAU9J.js} +56 -56
  21. package/dist-lib/{webmapx-language-osmvector-M5y_lwOg.js → webmapx-language-osmvector-BAw9TR-M.js} +12 -11
  22. package/dist-lib/{webmapx-measure-tool-BXhMJFC6.js → webmapx-measure-tool-CXlg11s8.js} +34 -34
  23. package/dist-lib/{webmapx-modal-tool-eF6Naluv.js → webmapx-modal-tool-Cs7LRrgW.js} +3 -3
  24. package/dist-lib/{webmapx-plugin-tool-D2Hghf9n.js → webmapx-plugin-tool-qe2yTrWB.js} +7 -7
  25. package/dist-lib/{webmapx-print-tool-ob1bOsR5.js → webmapx-print-tool-DrK9sLC7.js} +27 -26
  26. package/dist-lib/{webmapx-search-tool-Cv8BrYvY.js → webmapx-search-tool-H7NisgWH.js} +11 -11
  27. package/dist-lib/webmapx-settings-EHSm-AGU.js +167 -0
  28. package/dist-lib/{webmapx-truearea-tool-CMB4Orm-.js → webmapx-truearea-tool-CSU9mE1D.js} +26 -26
  29. package/dist-lib/{webmapx-view-mode-tool-CUpLNjOj.js → webmapx-view-mode-tool-D1QyQfq8.js} +9 -9
  30. package/dist-lib/webmapx.css +1 -1
  31. package/dist-lib/webmapx.js +42 -41
  32. package/package.json +1 -1
  33. package/dist-lib/WMTS-DCN4zX0-.js +0 -1169
  34. package/dist-lib/alert-GeHlqlN8.js +0 -310
  35. package/dist-lib/button-DFdGkRPQ.js +0 -741
  36. package/dist-lib/checkbox-QoR4S8tV.js +0 -284
  37. package/dist-lib/chunk.36O46B5H-B6ZL7Sm1.js +0 -77
  38. package/dist-lib/chunk.3RPBFEDE-BFO1fHVm.js +0 -138
  39. package/dist-lib/chunk.5JY5FUCG-DTXsslmx.js +0 -1090
  40. package/dist-lib/chunk.6CTB5ZDJ-DjZrBd6Y.js +0 -99
  41. package/dist-lib/chunk.AJ3ENQ5C-Ci7Gm2b6.js +0 -175
  42. package/dist-lib/chunk.LD4M4QGE-CiCfhE8r.js +0 -8
  43. package/dist-lib/chunk.NYIIDP5N-BikXIStD.js +0 -99
  44. package/dist-lib/chunk.RWUUFNUL-DFztA4uV.js +0 -43
  45. package/dist-lib/chunk.SI4ACBFK-CLb9VfMG.js +0 -61
  46. package/dist-lib/chunk.YHLNUJ7P-D-kanrCf.js +0 -503
  47. package/dist-lib/decorators-B35AgiCU.js +0 -351
  48. package/dist-lib/dist-c1PlDAd1.js +0 -2359
  49. package/dist-lib/divider-CPm675yY.js +0 -41
  50. package/dist-lib/icon-CEOgWlro.js +0 -9
  51. package/dist-lib/icon-button-Da_nBTy3.js +0 -408
  52. package/dist-lib/input-CeGntPlT.js +0 -590
  53. package/dist-lib/ol-tilegrid-9VtyxaLG.js +0 -64
  54. package/dist-lib/openlayers-adapter-DVW1KCRv.js +0 -13307
  55. package/dist-lib/option-CBxl1mZP.js +0 -1106
  56. package/dist-lib/rbush-C8k41T4z.js +0 -254
  57. package/dist-lib/spinner-DysxdNG9.js +0 -6
  58. package/dist-lib/tooltip-Cucn1SiD.js +0 -197
  59. package/dist-lib/webmapx-draw-tool-DooAV8cF.js +0 -4336
  60. package/dist-lib/webmapx-settings-DDEJ8aoV.js +0 -479
@@ -1,12 +1,13 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { t as n } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { a as r, i, o as a } from "./decorators-B35AgiCU.js";
4
- import "./button-DFdGkRPQ.js";
5
- import "./input-CeGntPlT.js";
6
- import "./spinner-DysxdNG9.js";
7
- import "./icon-button-Da_nBTy3.js";
8
- import { a as o, i as s, t as c } from "./zip.js-DVhmtjxZ.js";
9
- import { css as l, html as u } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { a as r, i, t as a } from "./zip.js-DVhmtjxZ.js";
4
+ import { css as o, html as s } from "lit";
5
+ import { customElement as c, property as l, state as u } from "lit/decorators.js";
6
+ import "@shoelace-style/shoelace/dist/components/button/button.js";
7
+ import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
8
+ import "@shoelace-style/shoelace/dist/components/dialog/dialog.js";
9
+ import "@shoelace-style/shoelace/dist/components/input/input.js";
10
+ import "@shoelace-style/shoelace/dist/components/icon-button/icon-button.js";
10
11
  //#region src/components/webmapx-geolocation-tool.ts
11
12
  var d, f = "webmapx-geolocation-tracks", p = "webmapx-geolocation-track-last-id";
12
13
  function m() {
@@ -113,7 +114,7 @@ var b = class extends n {
113
114
  this.boundReacquireWakeLock = () => d.reacquireWakeLockIfNeeded();
114
115
  }
115
116
  static {
116
- this.styles = l`
117
+ this.styles = o`
117
118
  :host {
118
119
  display: block;
119
120
  box-sizing: border-box;
@@ -623,11 +624,11 @@ var b = class extends n {
623
624
  };
624
625
  }
625
626
  render() {
626
- return u`
627
+ return s`
627
628
  <div class="tool-content">
628
629
  <div class="title">
629
630
  Location
630
- ${this.status === "locating" ? u`<sl-spinner></sl-spinner>` : ""}
631
+ ${this.status === "locating" ? s`<sl-spinner></sl-spinner>` : ""}
631
632
  <sl-icon-button
632
633
  name="box-arrow-up"
633
634
  label="Export tracked points"
@@ -654,7 +655,7 @@ var b = class extends n {
654
655
  @sl-request-close=${() => {
655
656
  this.exportDialogOpen = !1, this.exportFilenameStep = !1;
656
657
  }}>
657
- ${this.exportFilenameStep ? u`
658
+ ${this.exportFilenameStep ? s`
658
659
  <div style="display:flex; align-items:center; gap:0.4rem;">
659
660
  <span>Filename</span>
660
661
  <sl-input style="flex:1;" size="small" .value=${this.exportFilename} aria-label="Export filename"
@@ -670,7 +671,7 @@ var b = class extends n {
670
671
  this.exportFilenameStep = !1;
671
672
  }}>Back</sl-button>
672
673
  </div>
673
- ` : u`
674
+ ` : s`
674
675
  <p>Save the recorded GPS tracks as GeoJSON, or add them to the map.</p>
675
676
  <p>${this.storedPointCount} point(s) stored.</p>
676
677
  <label style="display:flex; align-items:center; gap:0.4rem; margin-bottom:0.5rem;">
@@ -696,10 +697,10 @@ var b = class extends n {
696
697
  this.exportFilename = `gps-tracks-${t}`, this.exportFilenameStep = !0;
697
698
  }
698
699
  async handleExportSaveFiles() {
699
- let { points: e, lines: t } = _(m()), n = this.exportFilename.trim() || "gps-tracks", r = new c(new s("application/zip"));
700
- await r.add("gps-track-points.geojson", new o(JSON.stringify(e, null, 2))), await r.add("gps-track-lines.geojson", new o(JSON.stringify(t, null, 2)));
701
- let i = this.buildTracksStyleConfig("gps-track-lines.geojson", "gps-track-points.geojson");
702
- await r.add("style.json", new o(JSON.stringify(i, null, 2))), this.downloadBlob(await r.close(), `${n}.zip`), this.eraseAfterExport && this.eraseStoredTracks(), this.exportFilenameStep = !1, this.exportDialogOpen = !1;
700
+ let { points: e, lines: t } = _(m()), n = this.exportFilename.trim() || "gps-tracks", o = new a(new i("application/zip"));
701
+ await o.add("gps-track-points.geojson", new r(JSON.stringify(e, null, 2))), await o.add("gps-track-lines.geojson", new r(JSON.stringify(t, null, 2)));
702
+ let s = this.buildTracksStyleConfig("gps-track-lines.geojson", "gps-track-points.geojson");
703
+ await o.add("style.json", new r(JSON.stringify(s, null, 2))), this.downloadBlob(await o.close(), `${n}.zip`), this.eraseAfterExport && this.eraseStoredTracks(), this.exportFilenameStep = !1, this.exportDialogOpen = !1;
703
704
  }
704
705
  buildTracksStyleConfig(e, t) {
705
706
  return {
@@ -765,24 +766,24 @@ var b = class extends n {
765
766
  r.href = n, r.download = t, r.click(), URL.revokeObjectURL(n);
766
767
  }
767
768
  };
768
- t([r({
769
+ t([l({
769
770
  type: Boolean,
770
771
  attribute: "watch"
771
- })], b.prototype, "watch", void 0), t([r({
772
+ })], b.prototype, "watch", void 0), t([l({
772
773
  type: Boolean,
773
774
  attribute: "high-accuracy"
774
- })], b.prototype, "highAccuracy", void 0), t([r({
775
+ })], b.prototype, "highAccuracy", void 0), t([l({
775
776
  type: Number,
776
777
  attribute: "timeout"
777
- })], b.prototype, "timeout", void 0), t([r({
778
+ })], b.prototype, "timeout", void 0), t([l({
778
779
  type: Number,
779
780
  attribute: "max-age"
780
- })], b.prototype, "maxAge", void 0), t([r({ type: Number })], b.prototype, "zoom", void 0), t([r({
781
+ })], b.prototype, "maxAge", void 0), t([l({ type: Number })], b.prototype, "zoom", void 0), t([l({
781
782
  type: Boolean,
782
783
  attribute: "follow"
783
- })], b.prototype, "follow", void 0), t([r({
784
+ })], b.prototype, "follow", void 0), t([l({
784
785
  type: Boolean,
785
786
  reflect: !0
786
- })], b.prototype, "active", void 0), t([i()], b.prototype, "status", void 0), t([i()], b.prototype, "message", void 0), t([i()], b.prototype, "lastUpdate", void 0), t([i()], b.prototype, "exportDialogOpen", void 0), t([i()], b.prototype, "storedPointCount", void 0), t([i()], b.prototype, "exportFilenameStep", void 0), t([i()], b.prototype, "exportFilename", void 0), t([i()], b.prototype, "eraseAfterExport", void 0), b = d = t([a("webmapx-geolocation-tool")], b);
787
+ })], b.prototype, "active", void 0), t([u()], b.prototype, "status", void 0), t([u()], b.prototype, "message", void 0), t([u()], b.prototype, "lastUpdate", void 0), t([u()], b.prototype, "exportDialogOpen", void 0), t([u()], b.prototype, "storedPointCount", void 0), t([u()], b.prototype, "exportFilenameStep", void 0), t([u()], b.prototype, "exportFilename", void 0), t([u()], b.prototype, "eraseAfterExport", void 0), b = d = t([c("webmapx-geolocation-tool")], b);
787
788
  //#endregion
788
789
  export { b as WebmapxGeolocationTool, y as evaluateGeolocationFix };
@@ -1,15 +1,15 @@
1
- import { r as e, t } from "./decorate-CWgUV1hU.js";
2
- import { t as n } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { i as r, o as i } from "./decorators-B35AgiCU.js";
4
- import { discoverLayers as a } from "./layer-discovery-afWzu5hY.js";
5
- import { css as o, html as s } from "lit";
1
+ import { r as e, t } from "./decorate-DnZTfaod.js";
2
+ import { t as n } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { discoverLayers as r } from "./layer-discovery-DFP-WHAh.js";
4
+ import { css as i, html as a } from "lit";
5
+ import { customElement as o, state as s } from "lit/decorators.js";
6
6
  //#region src/components/webmapx-import-layer-tool.ts
7
7
  var c = class extends n {
8
8
  constructor(...e) {
9
9
  super(...e), this.active = !1, this.mapElement = null, this.url = "", this.discovering = !1, this.results = [], this.selected = /* @__PURE__ */ new Set(), this.error = null, this.filterText = "", this.catalog = [], this.fileDropActive = !1, this.fileImporting = !1, this.discoverySeq = 0;
10
10
  }
11
11
  static {
12
- this.styles = o`
12
+ this.styles = i`
13
13
  :host { display: block; width: 100%; pointer-events: auto; }
14
14
  :host([hidden]) { display: none !important; }
15
15
  .container { width: 100%; color: var(--color-text-primary); box-sizing: border-box; padding: var(--webmapx-tool-padding, 0); }
@@ -64,7 +64,7 @@ var c = class extends n {
64
64
  let t = ++this.discoverySeq;
65
65
  this.discovering = !0, this.error = null, this.results = [], this.catalog = [], this.selected = /* @__PURE__ */ new Set(), this.filterText = "";
66
66
  try {
67
- let n = await a(e);
67
+ let n = await r(e);
68
68
  if (t !== this.discoverySeq) return;
69
69
  this.results = n.layers, this.catalog = n.catalog ?? [], this.selected = /* @__PURE__ */ new Set(), n.layers.length === 0 && this.catalog.length === 0 && (this.error = "No services discovered at this URL.");
70
70
  } catch (e) {
@@ -142,7 +142,7 @@ var c = class extends n {
142
142
  e.dataTransfer?.types.includes("Files") && (e.preventDefault(), e.stopPropagation(), e.dataTransfer.dropEffect = "copy", this.fileDropActive = !0);
143
143
  }
144
144
  render() {
145
- return s`
145
+ return a`
146
146
  <div class="container tool-content">
147
147
  <div class="section-title">From URL</div>
148
148
  <div class="urlbox">
@@ -167,16 +167,16 @@ var c = class extends n {
167
167
  <sl-button size="small" ?loading=${this.discovering} ?disabled=${this.discovering} @click="${() => this.handleDiscover()}">Discover</sl-button>
168
168
  </div>
169
169
 
170
- ${this.error ? s`<div class="error">${this.error}</div>` : ""}
170
+ ${this.error ? a`<div class="error">${this.error}</div>` : ""}
171
171
 
172
- ${this.catalog.length === 0 ? "" : s`
172
+ ${this.catalog.length === 0 ? "" : a`
173
173
  <div class="results">
174
174
  <ul>
175
- ${this.catalog.map((e) => s`
175
+ ${this.catalog.map((e) => a`
176
176
  <li class="result-item" @click="${() => this.openCatalogEntry(e)}" style="cursor:pointer;">
177
177
  <div style="flex:1; min-width:0;">
178
178
  <div style="white-space:normal; word-break:break-word;" title="${e.name}">${e.kind === "folder" ? "📁" : "🗺"} ${e.name}</div>
179
- ${e.type ? s`<div class="meta">${e.type}</div>` : ""}
179
+ ${e.type ? a`<div class="meta">${e.type}</div>` : ""}
180
180
  </div>
181
181
  </li>
182
182
  `)}
@@ -184,7 +184,7 @@ var c = class extends n {
184
184
  </div>
185
185
  `}
186
186
 
187
- ${this.results.length === 0 ? "" : s`
187
+ ${this.results.length === 0 ? "" : a`
188
188
  <input
189
189
  type="text"
190
190
  class="filter"
@@ -202,7 +202,7 @@ var c = class extends n {
202
202
  </div>
203
203
  <div class="results">
204
204
  <ul>
205
- ${this.filteredResults.map((e) => s`
205
+ ${this.filteredResults.map((e) => a`
206
206
  <li class="result-item">
207
207
  <sl-checkbox
208
208
  .checked=${this.selected.has(e)}
@@ -211,7 +211,7 @@ var c = class extends n {
211
211
  <div style="flex:1; min-width:0;">
212
212
  <div style="white-space:normal; word-break:break-word;" title="${e.title}">${e.title}</div>
213
213
  <div class="meta">${e.serviceType}</div>
214
- ${e.abstract ? s`<div class="meta">${e.abstract}</div>` : ""}
214
+ ${e.abstract ? a`<div class="meta">${e.abstract}</div>` : ""}
215
215
  </div>
216
216
  </li>
217
217
  `)}
@@ -245,6 +245,6 @@ var c = class extends n {
245
245
  `;
246
246
  }
247
247
  };
248
- t([r()], c.prototype, "url", void 0), t([r()], c.prototype, "discovering", void 0), t([r()], c.prototype, "results", void 0), t([r()], c.prototype, "selected", void 0), t([r()], c.prototype, "error", void 0), t([r()], c.prototype, "filterText", void 0), t([r()], c.prototype, "catalog", void 0), t([r()], c.prototype, "fileDropActive", void 0), t([r()], c.prototype, "fileImporting", void 0), c = t([i("webmapx-import-layer-tool")], c);
248
+ t([s()], c.prototype, "url", void 0), t([s()], c.prototype, "discovering", void 0), t([s()], c.prototype, "results", void 0), t([s()], c.prototype, "selected", void 0), t([s()], c.prototype, "error", void 0), t([s()], c.prototype, "filterText", void 0), t([s()], c.prototype, "catalog", void 0), t([s()], c.prototype, "fileDropActive", void 0), t([s()], c.prototype, "fileImporting", void 0), c = t([o("webmapx-import-layer-tool")], c);
249
249
  //#endregion
250
250
  export { c as WebmapxImportLayerTool };
@@ -1,15 +1,15 @@
1
- import { t as e } from "./decorate-CWgUV1hU.js";
2
- import { t } from "./webmapx-base-tool-Dm9NAWLD.js";
3
- import { i as n, o as r } from "./decorators-B35AgiCU.js";
4
- import "./icon-CEOgWlro.js";
5
- import "./spinner-DysxdNG9.js";
6
- import { t as i } from "./throttle-BeneRNYK.js";
7
- import { t as a } from "./wms-feature-info-C0RVMEQC.js";
8
- import { css as o, html as s, nothing as c } from "lit";
1
+ import { t as e } from "./decorate-DnZTfaod.js";
2
+ import { t } from "./webmapx-base-tool-DfRa7TlD.js";
3
+ import { t as n } from "./throttle-BeneRNYK.js";
4
+ import { t as r } from "./wms-feature-info-C0RVMEQC.js";
5
+ import { css as i, html as a, nothing as o } from "lit";
6
+ import { customElement as s, state as c } from "lit/decorators.js";
7
+ import "@shoelace-style/shoelace/dist/components/icon/icon.js";
8
+ import "@shoelace-style/shoelace/dist/components/spinner/spinner.js";
9
9
  //#region src/components/webmapx-info-tool.ts
10
10
  var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
11
11
  constructor(...e) {
12
- super(...e), this.active = !1, this.features = [], this.loading = !1, this.mode = "hover", this.pinnedLocation = null, this.pinnedPixel = null, this.pinMarkerAdded = !1, this.unsubClick = null, this.unsubPointerMove = null, this.throttledHoverQuery = i(async (e, t) => {
12
+ super(...e), this.active = !1, this.features = [], this.loading = !1, this.mode = "hover", this.pinnedLocation = null, this.pinnedPixel = null, this.pinMarkerAdded = !1, this.unsubClick = null, this.unsubPointerMove = null, this.throttledHoverQuery = n(async (e, t) => {
13
13
  if (this.mode !== "hover" || !this.active || !this.adapter) return;
14
14
  let n;
15
15
  try {
@@ -27,7 +27,7 @@ var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
27
27
  }, d);
28
28
  }
29
29
  static {
30
- this.styles = o`
30
+ this.styles = i`
31
31
  :host {
32
32
  display: block;
33
33
  pointer-events: auto;
@@ -258,24 +258,24 @@ var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
258
258
  }
259
259
  async queryGFILayers(e, t) {
260
260
  if (!this.adapter) return [];
261
- let n = this.adapter.store.getState().mapLayers ?? {}, r = 128 * (360 / (256 * 2 ** (this.adapter.getViewportState()?.zoom ?? 0))), i = {
262
- west: t[0] - r,
263
- south: t[1] - r,
264
- east: t[0] + r,
265
- north: t[1] + r
261
+ let n = this.adapter.store.getState().mapLayers ?? {}, i = 128 * (360 / (256 * 2 ** (this.adapter.getViewportState()?.zoom ?? 0))), a = {
262
+ west: t[0] - i,
263
+ south: t[1] - i,
264
+ east: t[0] + i,
265
+ north: t[1] + i
266
266
  }, o = [];
267
267
  return await Promise.all(Object.entries(n).map(async ([e, t]) => {
268
- let n = t, r = typeof n?.getFeatureInfoUrl == "string" ? n.getFeatureInfoUrl : null;
269
- if (r) try {
270
- let t = new URL(r), s = (e) => {
268
+ let n = t, i = typeof n?.getFeatureInfoUrl == "string" ? n.getFeatureInfoUrl : null;
269
+ if (i) try {
270
+ let t = new URL(i), s = (e) => {
271
271
  for (let [n, r] of t.searchParams) if (n.toLowerCase() === e) return r;
272
272
  return null;
273
- }, c = await a({
273
+ }, c = await r({
274
274
  sourceConfig: {
275
275
  id: e,
276
276
  type: "raster",
277
277
  service: "wms",
278
- url: r,
278
+ url: i,
279
279
  version: s("version") ?? "1.1.1",
280
280
  layers: s("layers") ?? s("query_layers") ?? "",
281
281
  format: typeof n.getFeatureInfoFormat == "string" ? n.getFeatureInfoFormat : "application/json",
@@ -283,7 +283,7 @@ var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
283
283
  },
284
284
  layerId: e,
285
285
  layerTitle: typeof n.label == "string" ? n.label : e,
286
- bounds: i,
286
+ bounds: a,
287
287
  containerWidth: 256,
288
288
  containerHeight: 256,
289
289
  pixelX: 128,
@@ -303,33 +303,33 @@ var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
303
303
  this.mode = "hover", this.pinnedLocation = null, this.pinnedPixel = null, this.features = [], this.removePinMarker();
304
304
  }
305
305
  renderFeatures() {
306
- if (this.features.length === 0) return c;
306
+ if (this.features.length === 0) return o;
307
307
  let e = /* @__PURE__ */ new Map();
308
308
  for (let t of this.features) {
309
309
  let n = e.get(t.layerId);
310
310
  n ? n.push(t) : e.set(t.layerId, [t]);
311
311
  }
312
- return s`
312
+ return a`
313
313
  ${[...e.entries()].map(([e, t]) => {
314
- let n = this.adapter?.store.getState().mapLayers?.[e], r = Array.isArray(n?.sublayers) && n.sublayers.length > 1, i = r ? "composite" : t[0].source, a = typeof n?.featureInfoLimit == "number" ? n.featureInfoLimit : null, o = a !== null && t.length > a, c = o ? t.slice(0, a) : t, l = /* @__PURE__ */ new Map();
314
+ let n = this.adapter?.store.getState().mapLayers?.[e], r = Array.isArray(n?.sublayers) && n.sublayers.length > 1, i = r ? "composite" : t[0].source, o = typeof n?.featureInfoLimit == "number" ? n.featureInfoLimit : null, s = o !== null && t.length > o, c = s ? t.slice(0, o) : t, l = /* @__PURE__ */ new Map();
315
315
  for (let e of c) {
316
316
  let t = e.subLayerId ?? "", n = l.get(t);
317
317
  n ? n.push(e) : l.set(t, [e]);
318
318
  }
319
- return s`
319
+ return a`
320
320
  <div class="layer-group">
321
321
  <div class="layer-title">
322
322
  ${t[0].layerTitle ?? e}
323
323
  <span class="source-badge ${r ? "composite" : t[0].source}">${i}</span>
324
324
  </div>
325
- ${[...l.entries()].map(([e, t]) => s`
326
- ${e ? s`<div class="sub-layer-title">
325
+ ${[...l.entries()].map(([e, t]) => a`
326
+ ${e ? a`<div class="sub-layer-title">
327
327
  <span class="sub-layer-name">${e}</span>
328
- ${t[0].subLayerType ? s`<span class="sub-layer-type">${t[0].subLayerType}</span>` : ""}
328
+ ${t[0].subLayerType ? a`<span class="sub-layer-type">${t[0].subLayerType}</span>` : ""}
329
329
  </div>` : ""}
330
330
  ${t.map((e) => this.renderPropsTable(e))}
331
331
  `)}
332
- ${o ? s`<div class="feature-limit-notice">Showing ${a} of ${t.length} features</div>` : ""}
332
+ ${s ? a`<div class="feature-limit-notice">Showing ${o} of ${t.length} features</div>` : ""}
333
333
  </div>`;
334
334
  })}
335
335
  `;
@@ -347,66 +347,66 @@ var l = "webmapx-info-pin", u = 8, d = 120, f = 4, p = 6, m = class extends t {
347
347
  };
348
348
  }
349
349
  renderPropsTable(e) {
350
- let t = this.getPropertySchema(e.layerId), { translations: n, allowed: r, denied: i } = this.getAttributeMeta(e.layerId), a = e.properties;
351
- if (a._raw) return s`<div class="raw-value">${a._raw}</div>`;
352
- let o = [], c = /* @__PURE__ */ new Set();
350
+ let t = this.getPropertySchema(e.layerId), { translations: n, allowed: r, denied: i } = this.getAttributeMeta(e.layerId), o = e.properties;
351
+ if (o._raw) return a`<div class="raw-value">${o._raw}</div>`;
352
+ let s = [], c = /* @__PURE__ */ new Set();
353
353
  for (let e of n) {
354
354
  let n = e.name;
355
- if (i.has(n) || r && !r.has(n) || !(n in a) || a[n] === null || a[n] === void 0) continue;
355
+ if (i.has(n) || r && !r.has(n) || !(n in o) || o[n] === null || o[n] === void 0) continue;
356
356
  c.add(n);
357
- let s = a[n];
358
- if (e.multiplier && !isNaN(parseFloat(String(e.multiplier))) && (s = parseFloat(String(s)) * parseFloat(String(e.multiplier))), e.decimals !== void 0 && !isNaN(parseInt(String(e.decimals)))) {
357
+ let a = o[n];
358
+ if (e.multiplier && !isNaN(parseFloat(String(e.multiplier))) && (a = parseFloat(String(a)) * parseFloat(String(e.multiplier))), e.decimals !== void 0 && !isNaN(parseInt(String(e.decimals)))) {
359
359
  let t = 10 ** parseInt(String(e.decimals));
360
- s = Math.round(parseFloat(String(s)) * t) / t;
360
+ a = Math.round(parseFloat(String(a)) * t) / t;
361
361
  }
362
362
  if (e.valuemap && Array.isArray(e.valuemap)) {
363
- let t = e.valuemap.find((e) => e.value === s);
364
- t && (s = t.label);
363
+ let t = e.valuemap.find((e) => e.value === a);
364
+ t && (a = t.label);
365
365
  }
366
- e.date && (s &&= new Date(s).toLocaleString());
367
- let l = e.unit && !isNaN(Number(s)) ? e.unit : "", u = e.translation || n, d = l ? `${s}${l}` : typeof s == "object" ? JSON.stringify(s) : String(s ?? "");
368
- o.push(this.renderPropRow(n, u, d, t));
366
+ e.date && (a &&= new Date(a).toLocaleString());
367
+ let l = e.unit && !isNaN(Number(a)) ? e.unit : "", u = e.translation || n, d = l ? `${a}${l}` : typeof a == "object" ? JSON.stringify(a) : String(a ?? "");
368
+ s.push(this.renderPropRow(n, u, d, t));
369
369
  }
370
- for (let [e, s] of Object.entries(a)) {
371
- if (e === "_raw" || c.has(e) || i.has(e) || r && !r.has(e) || s == null || n.length > 0 && !n.find((t) => t.name === e) && r === null) continue;
372
- let a = typeof s == "object" ? JSON.stringify(s) : String(s ?? "");
373
- o.push(this.renderPropRow(e, e.replace(/_/g, " "), a, t));
370
+ for (let [e, a] of Object.entries(o)) {
371
+ if (e === "_raw" || c.has(e) || i.has(e) || r && !r.has(e) || a == null || n.length > 0 && !n.find((t) => t.name === e) && r === null) continue;
372
+ let o = typeof a == "object" ? JSON.stringify(a) : String(a ?? "");
373
+ s.push(this.renderPropRow(e, e.replace(/_/g, " "), o, t));
374
374
  }
375
- return o.length === 0 ? s`<div class="empty-hint">No properties</div>` : s`<div class="props-list">${o}</div>`;
375
+ return s.length === 0 ? a`<div class="empty-hint">No properties</div>` : a`<div class="props-list">${s}</div>`;
376
376
  }
377
377
  renderPropRow(e, t, n, r) {
378
- let i = r?.find((t) => t.name === e)?.type ?? "string", a = /^https?:\/\/\S+$/.test(n.trim()), o = /^data:image\//i.test(n), c = i === "string" ? o ? "imageURL" : a ? "linkURL" : "string" : i;
379
- return s`
378
+ let i = r?.find((t) => t.name === e)?.type ?? "string", o = /^https?:\/\/\S+$/.test(n.trim()), s = /^data:image\//i.test(n), c = i === "string" ? s ? "imageURL" : o ? "linkURL" : "string" : i;
379
+ return a`
380
380
  <div class="props-row">
381
381
  <span class="props-key" title=${e}>${t}</span>
382
- <span class="props-val">${(c === "create-time" || c === "update-time") && n ? new Date(Number(n)).toLocaleString() : c === "imageURL" && n ? s`<img src=${n} @error=${(e) => {
382
+ <span class="props-val">${(c === "create-time" || c === "update-time") && n ? new Date(Number(n)).toLocaleString() : c === "imageURL" && n ? a`<img src=${n} @error=${(e) => {
383
383
  let t = e.target, n = document.createElement("span");
384
384
  n.className = "img-error", n.textContent = "⚠ invalid image", t.replaceWith(n);
385
- }}>` : c === "linkURL" && n ? s`<a href=${n} target="_blank" rel="noopener noreferrer">${n}</a>` : n.split(",").map((e, t) => t === 0 ? s`${e}` : s`,<wbr>${e}`)}</span>
385
+ }}>` : c === "linkURL" && n ? a`<a href=${n} target="_blank" rel="noopener noreferrer">${n}</a>` : n.split(",").map((e, t) => t === 0 ? a`${e}` : a`,<wbr>${e}`)}</span>
386
386
  </div>
387
387
  `;
388
388
  }
389
389
  render() {
390
390
  let e = this.mode === "pinned";
391
- return s`
391
+ return a`
392
392
  <div class="info-container">
393
393
  <div class="mode-badge ${e ? "pinned" : ""}">
394
394
  <sl-icon name=${e ? "pin-angle-fill" : "cursor"}></sl-icon>
395
395
  ${e ? "Pinned" : "Hover"}
396
- ${this.loading ? s`<sl-spinner></sl-spinner>` : c}
396
+ ${this.loading ? a`<sl-spinner></sl-spinner>` : o}
397
397
  </div>
398
398
 
399
- ${!e && this.features.length === 0 ? s`<p class="instructions">Move cursor over features to inspect. Click to pin and query WMS.</p>` : c}
399
+ ${!e && this.features.length === 0 ? a`<p class="instructions">Move cursor over features to inspect. Click to pin and query WMS.</p>` : o}
400
400
 
401
- ${e && !this.loading && this.features.length === 0 ? s`<p class="empty-hint">No features at this location.</p>` : c}
401
+ ${e && !this.loading && this.features.length === 0 ? a`<p class="empty-hint">No features at this location.</p>` : o}
402
402
 
403
403
  ${this.renderFeatures()}
404
404
 
405
- ${e ? s`<p class="instructions">Click same location to unpin.</p>` : c}
405
+ ${e ? a`<p class="instructions">Click same location to unpin.</p>` : o}
406
406
  </div>
407
407
  `;
408
408
  }
409
409
  };
410
- e([n()], m.prototype, "features", void 0), e([n()], m.prototype, "loading", void 0), e([n()], m.prototype, "mode", void 0), e([n()], m.prototype, "pinnedLocation", void 0), m = e([r("webmapx-info-tool")], m);
410
+ e([c()], m.prototype, "features", void 0), e([c()], m.prototype, "loading", void 0), e([c()], m.prototype, "mode", void 0), e([c()], m.prototype, "pinnedLocation", void 0), m = e([s("webmapx-info-tool")], m);
411
411
  //#endregion
412
412
  export { m as WebmapxInfoTool };
@@ -1,8 +1,9 @@
1
- import { t as e } from "./decorate-CWgUV1hU.js";
2
- import { a as t, o as n } from "./decorators-B35AgiCU.js";
3
- import { t as r } from "./webmapx-modal-tool-eF6Naluv.js";
4
- import "./option-CBxl1mZP.js";
5
- import { css as i, html as a } from "lit";
1
+ import { t as e } from "./decorate-DnZTfaod.js";
2
+ import { t } from "./webmapx-modal-tool-Cs7LRrgW.js";
3
+ import { css as n, html as r } from "lit";
4
+ import { customElement as i, property as a } from "lit/decorators.js";
5
+ import "@shoelace-style/shoelace/dist/components/select/select.js";
6
+ import "@shoelace-style/shoelace/dist/components/option/option.js";
6
7
  //#region src/components/webmapx-language-osmvector.ts
7
8
  var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c = /* @__PURE__ */ new WeakMap(), l = [
8
9
  {
@@ -385,7 +386,7 @@ var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c
385
386
  label: "Toki Pona",
386
387
  en: "Toki Pona"
387
388
  }
388
- ], u = /"name(?:[:_][\w-]+)?"/, d = class extends r {
389
+ ], u = /"name(?:[:_][\w-]+)?"/, d = class extends t {
389
390
  constructor(...e) {
390
391
  super(...e), this.toolId = "maplanguage", this.hideUi = !1, this.language = localStorage.getItem(o) ?? "browser", this.boundLanguageChangeEvent = (e) => {
391
392
  let t = e.detail?.language;
@@ -393,7 +394,7 @@ var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c
393
394
  };
394
395
  }
395
396
  static {
396
- this.styles = i`
397
+ this.styles = n`
397
398
  :host {
398
399
  display: block;
399
400
  }
@@ -464,7 +465,7 @@ var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c
464
465
  this.language = t, localStorage.setItem(o, t), this.applyLanguage(), window.dispatchEvent(new CustomEvent(s, { detail: { language: t } }));
465
466
  }
466
467
  render() {
467
- return this.hideUi ? a`` : a`
468
+ return this.hideUi ? r`` : r`
468
469
  <div class="tool-content container">
469
470
  <div>Map label language</div>
470
471
  <div class="current-en">${l.find((e) => e.code === this.language)?.en ?? this.language}</div>
@@ -473,7 +474,7 @@ var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c
473
474
  hoist
474
475
  @sl-change=${this.handleLanguageChange}
475
476
  >
476
- ${l.map((e) => a`
477
+ ${l.map((e) => r`
477
478
  <sl-option value=${e.code}>${e.label}</sl-option>
478
479
  `)}
479
480
  </sl-select>
@@ -481,9 +482,9 @@ var o = "webmapx-language-osmvector", s = "webmapx-language-osmvector-change", c
481
482
  `;
482
483
  }
483
484
  };
484
- e([t({
485
+ e([a({
485
486
  type: Boolean,
486
487
  attribute: "hide-ui"
487
- })], d.prototype, "hideUi", void 0), e([t({ type: String })], d.prototype, "language", void 0), d = e([n("webmapx-language-osmvector")], d);
488
+ })], d.prototype, "hideUi", void 0), e([a({ type: String })], d.prototype, "language", void 0), d = e([i("webmapx-language-osmvector")], d);
488
489
  //#endregion
489
490
  export { d as WebmapxLanguageOsmVector };
@@ -1,17 +1,17 @@
1
- import { t as e } from "./decorate-CWgUV1hU.js";
2
- import { a as t, i as n, o as r } from "./decorators-B35AgiCU.js";
3
- import "./icon-CEOgWlro.js";
4
- import "./button-DFdGkRPQ.js";
5
- import { i, n as a, r as o, t as s } from "./geo-calculations-DbFJAUoI.js";
6
- import { t as c } from "./throttle-BeneRNYK.js";
7
- import { t as l } from "./webmapx-modal-tool-eF6Naluv.js";
8
- import { css as u, html as d, nothing as f } from "lit";
1
+ import { t as e } from "./decorate-DnZTfaod.js";
2
+ import { i as t, n, r, t as i } from "./geo-calculations-DbFJAUoI.js";
3
+ import { t as a } from "./throttle-BeneRNYK.js";
4
+ import { t as o } from "./webmapx-modal-tool-Cs7LRrgW.js";
5
+ import { css as s, html as c, nothing as l } from "lit";
6
+ import { customElement as u, property as d, state as f } from "lit/decorators.js";
7
+ import "@shoelace-style/shoelace/dist/components/button/button.js";
8
+ import "@shoelace-style/shoelace/dist/components/icon/icon.js";
9
9
  //#region src/components/webmapx-measure-tool.ts
10
- var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webmapx-measure-lines", g = "webmapx-measure-polygon", _ = "webmapx-measure-segment-labels", v = "webmapx-measure-rubberband-source", y = "webmapx-measure-rubberband-layer", b = class extends l {
10
+ var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webmapx-measure-lines", g = "webmapx-measure-polygon", _ = "webmapx-measure-segment-labels", v = "webmapx-measure-rubberband-source", y = "webmapx-measure-rubberband-layer", b = class extends o {
11
11
  constructor(...e) {
12
12
  super(...e), this.toolId = "measure", this.closeThreshold = 10, this.finishThreshold = 10, this.points = [], this.segments = [], this.totalDistanceCm = 0, this.cursorPosition = null, this.isClosed = !1, this.areaM2 = 0, this.finished = !1, this.touchMQ = window.matchMedia("(pointer: coarse)"), this.isTouchDevice = this.touchMQ.matches, this.onTouchMQChange = (e) => {
13
13
  this.isTouchDevice = e.matches;
14
- }, this.layersCreated = !1, this.throttledUpdateVisualization = c(() => {
14
+ }, this.layersCreated = !1, this.throttledUpdateVisualization = a(() => {
15
15
  this.doUpdateRubberbandVisualization();
16
16
  }, 50), this.unsubClick = null, this.unsubDblClick = null, this.unsubPointerMove = null, this.unsubContextMenu = null, this.keydownHandler = null;
17
17
  }
@@ -19,7 +19,7 @@ var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webm
19
19
  return this.finished || this.isClosed;
20
20
  }
21
21
  static {
22
- this.styles = u`
22
+ this.styles = s`
23
23
  :host {
24
24
  display: block;
25
25
  pointer-events: auto;
@@ -474,25 +474,25 @@ var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webm
474
474
  return (e + 3 * Math.PI) % (2 * Math.PI) - Math.PI;
475
475
  }
476
476
  addPoint(e) {
477
- let t = [...this.points, e];
478
- if (t.length >= 2) {
479
- let e = t[t.length - 2], n = t[t.length - 1], r = i(e, n), a = {
477
+ let n = [...this.points, e];
478
+ if (n.length >= 2) {
479
+ let e = n[n.length - 2], r = n[n.length - 1], i = t(e, r), a = {
480
480
  from: e,
481
- to: n,
482
- distanceCm: r
481
+ to: r,
482
+ distanceCm: i
483
483
  };
484
- this.segments = [...this.segments, a], this.totalDistanceCm += r;
484
+ this.segments = [...this.segments, a], this.totalDistanceCm += i;
485
485
  }
486
- this.points = t, this.updateMapVisualization();
486
+ this.points = n, this.updateMapVisualization();
487
487
  }
488
488
  closePolygon() {
489
489
  if (this.points.length < 3) return;
490
- let e = this.points[this.points.length - 1], t = this.points[0], n = i(e, t), r = {
490
+ let e = this.points[this.points.length - 1], n = this.points[0], i = t(e, n), a = {
491
491
  from: e,
492
- to: t,
493
- distanceCm: n
492
+ to: n,
493
+ distanceCm: i
494
494
  };
495
- this.segments = [...this.segments, r], this.totalDistanceCm += n, this.areaM2 = o(this.points), this.isClosed = !0, this.cursorPosition = null, this.updateMapVisualization(), this.doUpdateRubberbandVisualization();
495
+ this.segments = [...this.segments, a], this.totalDistanceCm += i, this.areaM2 = r(this.points), this.isClosed = !0, this.cursorPosition = null, this.updateMapVisualization(), this.doUpdateRubberbandVisualization();
496
496
  }
497
497
  finishMeasurement() {
498
498
  this.finished = !0, this.cursorPosition = null, this.doUpdateRubberbandVisualization();
@@ -529,38 +529,38 @@ var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webm
529
529
  }));
530
530
  }
531
531
  renderSegments() {
532
- return this.segments.length === 0 ? f : d`
532
+ return this.segments.length === 0 ? l : c`
533
533
  <div class="segment-list">
534
- ${this.segments.map((e, t) => d`
534
+ ${this.segments.map((e, t) => c`
535
535
  <div class="segment">
536
536
  <span class="segment-label">Segment ${t + 1}</span>
537
- <span class="segment-value">${a(e.distanceCm)}</span>
537
+ <span class="segment-value">${n(e.distanceCm)}</span>
538
538
  </div>
539
539
  `)}
540
540
  </div>
541
541
  `;
542
542
  }
543
543
  renderTotal() {
544
- return this.segments.length === 0 ? f : d`
544
+ return this.segments.length === 0 ? l : c`
545
545
  <div class="total-row">
546
546
  <span>Total</span>
547
- <span>${a(this.totalDistanceCm)}</span>
547
+ <span>${n(this.totalDistanceCm)}</span>
548
548
  </div>
549
549
  `;
550
550
  }
551
551
  renderArea() {
552
- return !this.isClosed || this.areaM2 === 0 ? f : d`
552
+ return !this.isClosed || this.areaM2 === 0 ? l : c`
553
553
  <div class="area-row">
554
554
  <span>Area</span>
555
- <span>${s(this.areaM2)}</span>
555
+ <span>${i(this.areaM2)}</span>
556
556
  </div>
557
557
  `;
558
558
  }
559
559
  renderInstructions() {
560
- return this.isFinished ? this.isTouchDevice ? d`<p class="instructions">Measurement finished. Tap Clear to start a new measurement.</p>` : d`<p class="instructions">Measurement finished. Click Clear, or click the map to start a new measurement.</p>` : this.points.length === 0 ? d`<p class="instructions">Click on the map to start measuring.</p>` : this.points.length < 3 ? d`<p class="instructions">Click to add points. Double-click, right-click or ESC to finish.</p>` : d`<p class="instructions">Click near first point to close polygon, or double-click/right-click/ESC to finish.</p>`;
560
+ return this.isFinished ? this.isTouchDevice ? c`<p class="instructions">Measurement finished. Tap Clear to start a new measurement.</p>` : c`<p class="instructions">Measurement finished. Click Clear, or click the map to start a new measurement.</p>` : this.points.length === 0 ? c`<p class="instructions">Click on the map to start measuring.</p>` : this.points.length < 3 ? c`<p class="instructions">Click to add points. Double-click, right-click or ESC to finish.</p>` : c`<p class="instructions">Click near first point to close polygon, or double-click/right-click/ESC to finish.</p>`;
561
561
  }
562
562
  render() {
563
- return d`
563
+ return c`
564
564
  <div class="tool-content measure-container">
565
565
  <div class="measure-content">
566
566
  ${this.renderInstructions()}
@@ -579,12 +579,12 @@ var p = "webmapx-measure-static-source", m = "webmapx-measure-points", h = "webm
579
579
  `;
580
580
  }
581
581
  };
582
- e([t({
582
+ e([d({
583
583
  type: Number,
584
584
  attribute: "close-threshold"
585
- })], b.prototype, "closeThreshold", void 0), e([t({
585
+ })], b.prototype, "closeThreshold", void 0), e([d({
586
586
  type: Number,
587
587
  attribute: "finish-threshold"
588
- })], b.prototype, "finishThreshold", void 0), e([n()], b.prototype, "points", void 0), e([n()], b.prototype, "segments", void 0), e([n()], b.prototype, "totalDistanceCm", void 0), e([n()], b.prototype, "cursorPosition", void 0), e([n()], b.prototype, "isClosed", void 0), e([n()], b.prototype, "areaM2", void 0), e([n()], b.prototype, "finished", void 0), e([n()], b.prototype, "isTouchDevice", void 0), b = e([r("webmapx-measure-tool")], b);
588
+ })], b.prototype, "finishThreshold", void 0), e([f()], b.prototype, "points", void 0), e([f()], b.prototype, "segments", void 0), e([f()], b.prototype, "totalDistanceCm", void 0), e([f()], b.prototype, "cursorPosition", void 0), e([f()], b.prototype, "isClosed", void 0), e([f()], b.prototype, "areaM2", void 0), e([f()], b.prototype, "finished", void 0), e([f()], b.prototype, "isTouchDevice", void 0), b = e([u("webmapx-measure-tool")], b);
589
589
  //#endregion
590
590
  export { b as WebmapxMeasureTool };