@nika-js/onlymap 0.11.3 → 0.11.5

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 (41) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/dist/{basemap-C6Ehu6fw.js → basemap-CnjAGLZo.js} +14 -2
  4. package/dist/basemap.d.ts +9 -0
  5. package/dist/cartograph.js +231 -229
  6. package/dist/cartograph.standalone.js +361 -359
  7. package/dist/elements/om-map.d.ts +31 -1
  8. package/dist/elements/om-overlay.d.ts +0 -14
  9. package/dist/{geoparquet-3V4KrvQN.js → geoparquet-CHtunmD2.js} +1 -1
  10. package/dist/{globe-view-D4Tlyff-.js → globe-view-CgQa-07O.js} +1 -1
  11. package/dist/{hillshade-BC8QiJRP.js → hillshade-BgXgVdjg.js} +1 -1
  12. package/dist/{index-pu3BNjzA.js → index-BTTCf4nb.js} +5488 -5305
  13. package/dist/{index-BUE-VzWx.js → index-BTsRqhXB.js} +1 -1
  14. package/dist/{index-p5XXAoNa.js → index-ClLMdW3k.js} +2 -2
  15. package/dist/{index-BPCIxI1b.js → index-D4x57ql0.js} +1 -1
  16. package/dist/{index-iwTA46AA.js → index-DjtM8ecq.js} +1 -1
  17. package/dist/{index-C1f14saD.js → index-DoNtp5Nh.js} +3 -3
  18. package/dist/{index-DpUl6z5-.js → index-NCXX8bDe.js} +1 -1
  19. package/dist/{index-BqFwoWp9.js → index-aOe9cOFs.js} +1 -1
  20. package/dist/{index-DgutJ5y2.js → index-k7l7kqTk.js} +3 -3
  21. package/dist/index.d.ts +1 -1
  22. package/dist/{lerc-DWtJKNQk.js → lerc-BtdiMDO7.js} +1 -1
  23. package/dist/onlymap.standalone.js +13650 -13455
  24. package/dist/onlymapjs.js +1 -1
  25. package/dist/{post-process-effect-mQdMaWQE.js → post-process-effect-BWrq5IR8.js} +1 -1
  26. package/dist/programmatic.d.ts +10 -1
  27. package/dist/{raster-DtUDOXfy.js → raster-iGwPuAgo.js} +3 -3
  28. package/dist/{raster-pipeline-hQh5cG3e.js → raster-pipeline-Dxs9TpD6.js} +1 -1
  29. package/dist/react.js +128 -125
  30. package/dist/runtime-core.d.ts +50 -1
  31. package/dist/selection.d.ts +31 -0
  32. package/dist/{text-on-path-CcfoZqXD.js → text-on-path-C8h_3Snf.js} +1 -1
  33. package/dist/version.d.ts +1 -1
  34. package/dist/viewport-cull.d.ts +15 -0
  35. package/dist/{zarr-Qo4A_t7d.js → zarr-C1zXD9VD.js} +2 -2
  36. package/docs/cartograph.md +8 -3
  37. package/llms.txt +3 -2
  38. package/onlymapjs.html-data.json +4 -0
  39. package/package.json +1 -1
  40. package/skills/onlymapjs/SKILL.md +3 -2
  41. package/skills/onlymapjs/references/syntax.md +5 -3
@@ -1,15 +1,15 @@
1
1
  let Ze = null, Ot = null;
2
- function js(t) {
2
+ function zs(t) {
3
3
  Ze = t;
4
4
  }
5
- function ia() {
5
+ function sa() {
6
6
  return Et !== null;
7
7
  }
8
8
  let Et = null;
9
9
  function kt() {
10
10
  return Et;
11
11
  }
12
- function zs() {
12
+ function Bs() {
13
13
  return Et ? Promise.resolve(Et) : Ot || (Ze ? (Ot = Promise.resolve(Ze()).then((t) => (Et = t, Et)).catch((t) => {
14
14
  throw Ot = null, t;
15
15
  }), Ot) : Promise.reject(
@@ -18,12 +18,12 @@ function zs() {
18
18
  )
19
19
  ));
20
20
  }
21
- const sa = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
21
+ const ra = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
22
22
  __proto__: null,
23
- isCoreLoaded: ia,
24
- loadCore: zs,
23
+ isCoreLoaded: sa,
24
+ loadCore: Bs,
25
25
  peekCore: kt,
26
- setCoreLoader: js
26
+ setCoreLoader: zs
27
27
  }, Symbol.toStringTag, { value: "Module" }));
28
28
  function Oi(t) {
29
29
  return { scale: t / 96, pxPerMm: t / 25.4 };
@@ -74,7 +74,7 @@ function Se(t, e, i, s) {
74
74
  return s === "landscape" ? { widthMm: n.heightMm, heightMm: n.widthMm } : { ...n };
75
75
  }
76
76
  let ae = null;
77
- function ra(t) {
77
+ function aa(t) {
78
78
  if (!ae) {
79
79
  ae = new Uint32Array(256);
80
80
  for (let i = 0; i < 256; i++) {
@@ -87,18 +87,18 @@ function ra(t) {
87
87
  for (let i = 0; i < t.length; i++) e = ae[(e ^ t[i]) & 255] ^ e >>> 8;
88
88
  return (e ^ 4294967295) >>> 0;
89
89
  }
90
- function aa(t) {
90
+ function na(t) {
91
91
  const e = Math.max(1980, t.getFullYear());
92
92
  return {
93
93
  time: t.getHours() << 11 | t.getMinutes() << 5 | Math.floor(t.getSeconds() / 2),
94
94
  date: e - 1980 << 9 | t.getMonth() + 1 << 5 | t.getDate()
95
95
  };
96
96
  }
97
- async function na(t, e = /* @__PURE__ */ new Date()) {
98
- const i = new TextEncoder(), { time: s, date: r } = aa(e), a = [], n = [];
97
+ async function oa(t, e = /* @__PURE__ */ new Date()) {
98
+ const i = new TextEncoder(), { time: s, date: r } = na(e), a = [], n = [];
99
99
  let o = 0;
100
100
  for (const f of t) {
101
- const u = f.data instanceof Blob ? new Uint8Array(await f.data.arrayBuffer()) : f.data, c = i.encode(f.name), m = ra(u), d = new DataView(new ArrayBuffer(30));
101
+ const u = f.data instanceof Blob ? new Uint8Array(await f.data.arrayBuffer()) : f.data, c = i.encode(f.name), m = aa(u), d = new DataView(new ArrayBuffer(30));
102
102
  d.setUint32(0, 67324752, !0), d.setUint16(4, 20, !0), d.setUint16(6, 2048, !0), d.setUint16(8, 0, !0), d.setUint16(10, s, !0), d.setUint16(12, r, !0), d.setUint32(14, m, !0), d.setUint32(18, u.length, !0), d.setUint32(22, u.length, !0), d.setUint16(26, c.length, !0), d.setUint16(28, 0, !0), a.push(new Uint8Array(d.buffer), c, u), n.push({ name: f.name, bytes: u, crc: m, offset: o }), o += 30 + c.length + u.length;
103
103
  }
104
104
  const h = o;
@@ -109,7 +109,7 @@ async function na(t, e = /* @__PURE__ */ new Date()) {
109
109
  const l = new DataView(new ArrayBuffer(22));
110
110
  return l.setUint32(0, 101010256, !0), l.setUint16(4, 0, !0), l.setUint16(6, 0, !0), l.setUint16(8, n.length, !0), l.setUint16(10, n.length, !0), l.setUint32(12, o - h, !0), l.setUint32(16, h, !0), l.setUint16(20, 0, !0), a.push(new Uint8Array(l.buffer)), new Blob(a, { type: "application/zip" });
111
111
  }
112
- const Te = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"], Bs = {
112
+ const Te = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"], Ws = {
113
113
  protan: "protanopia",
114
114
  deutan: "deuteranopia",
115
115
  tritan: "tritanopia",
@@ -117,9 +117,9 @@ const Te = ["protanopia", "deuteranopia", "tritanopia", "achromatopsia"], Bs = {
117
117
  };
118
118
  function pi(t) {
119
119
  const e = t?.trim().toLowerCase();
120
- return !e || e === "none" ? null : Te.includes(e) ? e : Bs[e] ?? null;
120
+ return !e || e === "none" ? null : Te.includes(e) ? e : Ws[e] ?? null;
121
121
  }
122
- const oa = ["none", ...Te, ...Object.keys(Bs)], _i = {
122
+ const ha = ["none", ...Te, ...Object.keys(Ws)], _i = {
123
123
  protanopia: [0.11238, 0.88762, 0, 0.11238, 0.88762, 0, 401e-5, -401e-5, 1],
124
124
  deuteranopia: [0.29275, 0.70725, 0, 0.29275, 0.70725, 0, -0.02234, 0.02234, 1],
125
125
  tritanopia: [1, 0.14461, -0.14461, 0, 0.85659, 0.14341, 0, 0.85659, 0.14341],
@@ -131,7 +131,7 @@ const oa = ["none", ...Te, ...Object.keys(Bs)], _i = {
131
131
  const e = Math.min(1, Math.max(0, t));
132
132
  return 255 * (e <= 31308e-7 ? e * 12.92 : 1.055 * e ** (1 / 2.4) - 0.055);
133
133
  };
134
- function ha(t) {
134
+ function la(t) {
135
135
  const e = t.trim().toLowerCase(), i = /^#([0-9a-f]{3}|[0-9a-f]{6})$/.exec(e);
136
136
  if (i) {
137
137
  const r = i[1], a = (n) => parseInt(n.length === 1 ? n + n : n, 16);
@@ -166,11 +166,11 @@ function ji(t, e) {
166
166
  const R = 1 - 0.17 * Math.cos((P - 30) * h) + 0.24 * Math.cos(2 * P * h) + 0.32 * Math.cos((3 * P + 6) * h) - 0.2 * Math.cos((4 * P - 63) * h), x = 1 + 0.015 * (G - 50) ** 2 / Math.sqrt(20 + (G - 50) ** 2), I = 1 + 0.045 * T, U = 1 + 0.015 * T * R, q = -2 * Math.sqrt(T ** 7 / (T ** 7 + 25 ** 7)) * Math.sin(60 * Math.exp(-(((P - 275) / 25) ** 2)) * h);
167
167
  return Math.sqrt((p / x) ** 2 + (S / I) ** 2 + (A / U) ** 2 + q * (S / I) * (A / U));
168
168
  }
169
- const la = 10;
170
- function ca(t, e = la) {
169
+ const ca = 10;
170
+ function ua(t, e = ca) {
171
171
  const i = /* @__PURE__ */ new Map();
172
172
  for (const o of t) {
173
- const h = ha(o.color);
173
+ const h = la(o.color);
174
174
  if (!h) continue;
175
175
  const l = o.layer ?? "", f = i.get(l);
176
176
  f ? f.push({ entry: o, rgb: h }) : i.set(l, [{ entry: o, rgb: h }]);
@@ -189,7 +189,7 @@ function ca(t, e = la) {
189
189
  h > n && (n = h, a = o);
190
190
  return { collapses: s, worstType: a };
191
191
  }
192
- function ua(t, e, i, s) {
192
+ function fa(t, e, i, s) {
193
193
  if (e <= 0 || i <= 0) return !0;
194
194
  let r;
195
195
  try {
@@ -211,14 +211,14 @@ function ua(t, e, i, s) {
211
211
  }
212
212
  return t.putImageData(r, 0, 0), !0;
213
213
  }
214
- const Ws = (t) => `om-carto-cvd-${t}`;
215
- function fa(t) {
214
+ const Hs = (t) => `om-carto-cvd-${t}`;
215
+ function ma(t) {
216
216
  if (t.getElementById("om-carto-cvd-filters")) return;
217
217
  const e = t.createElementNS("http://www.w3.org/2000/svg", "svg");
218
218
  e.id = "om-carto-cvd-filters", e.setAttribute("aria-hidden", "true"), e.setAttribute("width", "0"), e.setAttribute("height", "0"), e.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;";
219
219
  for (const i of Te) {
220
220
  const s = t.createElementNS("http://www.w3.org/2000/svg", "filter");
221
- s.id = Ws(i), s.setAttribute("color-interpolation-filters", "linearRGB");
221
+ s.id = Hs(i), s.setAttribute("color-interpolation-filters", "linearRGB");
222
222
  const r = t.createElementNS("http://www.w3.org/2000/svg", "feColorMatrix");
223
223
  r.setAttribute("type", "matrix");
224
224
  const a = _i[i];
@@ -226,8 +226,8 @@ function fa(t) {
226
226
  }
227
227
  t.body.appendChild(e);
228
228
  }
229
- const Hs = 16384, Ks = 134217728;
230
- async function ma(t) {
229
+ const Ks = 16384, Vs = 134217728;
230
+ async function da(t) {
231
231
  const e = [], i = [...t.querySelectorAll("img")];
232
232
  return await Promise.all(
233
233
  i.map(async (s) => {
@@ -240,11 +240,11 @@ async function ma(t) {
240
240
  })
241
241
  ), e;
242
242
  }
243
- function Vs(t) {
243
+ function Xs(t) {
244
244
  return !t.hasAttribute("hidden") && !t.hasAttribute("data-om-carto-screen-only") && !t.hasAttribute("data-om-carto-marks") && !t.hasAttribute("data-om-carto-flattened") && t.tagName.toLowerCase() !== "style" && t.tagName.toLowerCase() !== "script";
245
245
  }
246
- function da(t) {
247
- return [...t.children].filter(Vs).map((e, i) => ({ el: e, index: i, z: $(e).z ?? 0 })).sort((e, i) => e.z - i.z || e.index - i.index).map((e) => e.el);
246
+ function ga(t) {
247
+ return [...t.children].filter(Xs).map((e, i) => ({ el: e, index: i, z: $(e).z ?? 0 })).sort((e, i) => e.z - i.z || e.index - i.index).map((e) => e.el);
248
248
  }
249
249
  async function bi(t, e = {}) {
250
250
  const i = t ?? document.querySelector("om-cartograph");
@@ -256,11 +256,11 @@ async function bi(t, e = {}) {
256
256
  i.getAttribute("width"),
257
257
  i.getAttribute("height"),
258
258
  i.getAttribute("orientation")
259
- ), o = Math.max(0, Number(i.getAttribute("bleed")) || 0), h = a + o * 2, l = n + o * 2, f = e.maxDimension ?? Hs, u = e.maxArea ?? Ks;
259
+ ), o = Math.max(0, Number(i.getAttribute("bleed")) || 0), h = a + o * 2, l = n + o * 2, f = e.maxDimension ?? Ks, u = e.maxArea ?? Vs;
260
260
  let c = r;
261
261
  const m = Math.min(f / (h / 25.4), f / (l / 25.4)), d = Math.sqrt(u / (h / 25.4 * (l / 25.4))), v = Math.min(m, d);
262
- c > v && (c = Math.floor(v), s.push(`Requested ${r} dpi exceeds this browser's canvas budget for a ${h.toFixed(0)}×${l.toFixed(0)}mm page; rendered at ${c} dpi instead.`)), s.push(...await ma(i)), typeof document < "u" && document.fonts?.ready && await document.fonts.ready;
263
- const g = Oi(c), M = Math.max(1, Math.round(h * g.pxPerMm)), _ = Math.max(1, Math.round(l * g.pxPerMm)), p = da(i);
262
+ c > v && (c = Math.floor(v), s.push(`Requested ${r} dpi exceeds this browser's canvas budget for a ${h.toFixed(0)}×${l.toFixed(0)}mm page; rendered at ${c} dpi instead.`)), s.push(...await da(i)), typeof document < "u" && document.fonts?.ready && await document.fonts.ready;
263
+ const g = Oi(c), M = Math.max(1, Math.round(h * g.pxPerMm)), _ = Math.max(1, Math.round(l * g.pxPerMm)), p = ga(i);
264
264
  for (const x of p)
265
265
  if (!(!$e(x) || !x.prepareCartograph))
266
266
  try {
@@ -294,7 +294,7 @@ async function bi(t, e = {}) {
294
294
  [I, U, q, X].every(Number.isFinite) && (E.save(), E.strokeStyle = x.getAttribute("stroke") || "#000000", E.lineWidth = (Number(x.getAttribute("stroke-width")) || 0.2) * g.pxPerMm, E.beginPath(), E.moveTo((I + o) * g.pxPerMm, (U + o) * g.pxPerMm), E.lineTo((q + o) * g.pxPerMm, (X + o) * g.pxPerMm), E.stroke(), E.restore());
295
295
  }
296
296
  const T = pi(e.cvd === "page" ? i.getAttribute("cvd") : e.cvd);
297
- T && !ua(E, M, _, T) && s.push("Colour-vision simulation was skipped: a cross-origin image on the page makes the export canvas unreadable.");
297
+ T && !fa(E, M, _, T) && s.push("Colour-vision simulation was skipped: a cross-origin image on the page makes the export canvas unreadable.");
298
298
  for (const x of p) $e(x) && x.discardCartograph?.();
299
299
  const P = e.format === "jpeg" ? "image/jpeg" : "image/png";
300
300
  P === "image/jpeg" && i.querySelector("om-text") && s.push("JPEG compresses text edges — prefer PNG for a page carrying labels.");
@@ -302,7 +302,7 @@ async function bi(t, e = {}) {
302
302
  if (!R) throw new Error("[onlymapjs/cartograph] renderCartograph: the canvas produced no image (it may have exceeded a browser limit).");
303
303
  return { blob: R, widthPx: M, heightPx: _, dpi: c, warnings: s };
304
304
  }
305
- async function Xs(t, e = {}) {
305
+ async function Qs(t, e = {}) {
306
306
  const i = t ?? document.querySelector("om-cartograph");
307
307
  if (!i) throw new Error("[onlymapjs/cartograph] renderCartographAtlas: no <om-cartograph> to render.");
308
308
  const s = i.querySelector("om-atlas") ?? null;
@@ -328,7 +328,7 @@ async function Xs(t, e = {}) {
328
328
  const c = await zi(i, e, o);
329
329
  f = c.dpi, l.push({ name: n[u], data: c.blob }), e.onPage?.(u + 1, r);
330
330
  }
331
- return { blob: await na(l), filenames: n, pages: r, dpi: f, warnings: o };
331
+ return { blob: await oa(l), filenames: n, pages: r, dpi: f, warnings: o };
332
332
  } finally {
333
333
  s.seek(h);
334
334
  }
@@ -339,13 +339,13 @@ async function zi(t, e, i) {
339
339
  const s = await bi(t, e);
340
340
  return i.push(...s.warnings), s;
341
341
  }
342
- const ga = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
342
+ const va = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
343
343
  __proto__: null,
344
- MAX_CANVAS_AREA: Ks,
345
- MAX_CANVAS_DIMENSION: Hs,
346
- paintsInExport: Vs,
344
+ MAX_CANVAS_AREA: Vs,
345
+ MAX_CANVAS_DIMENSION: Ks,
346
+ paintsInExport: Xs,
347
347
  renderCartograph: bi,
348
- renderCartographAtlas: Xs
348
+ renderCartographAtlas: Qs
349
349
  }, Symbol.toStringTag, { value: "Module" }));
350
350
  function Bi(t, e, i = {}) {
351
351
  const s = URL.createObjectURL(t), r = document.createElement("a");
@@ -353,8 +353,8 @@ function Bi(t, e, i = {}) {
353
353
  const a = i.revokeAfterMs ?? 0;
354
354
  a > 0 ? setTimeout(() => URL.revokeObjectURL(s), a) : URL.revokeObjectURL(s);
355
355
  }
356
- const va = 3e4;
357
- async function Wi(t, e = va) {
356
+ const Ma = 3e4;
357
+ async function Wi(t, e = Ma) {
358
358
  let i = !1;
359
359
  const s = new Promise(
360
360
  (a) => setTimeout(() => {
@@ -374,7 +374,7 @@ async function Wi(t, e = va) {
374
374
  })();
375
375
  return await Promise.race([r, s]), { timedOut: i };
376
376
  }
377
- async function Ma(t, e = {}) {
377
+ async function ya(t, e = {}) {
378
378
  if (!t.hasAttribute("allow-url-actions") || typeof document < "u" && document.documentElement?.dataset?.omHost === "editor") return null;
379
379
  const i = e.search ?? (typeof location < "u" ? location.search : "");
380
380
  if (!i) return null;
@@ -390,7 +390,7 @@ async function Ma(t, e = {}) {
390
390
  const c = Number(l);
391
391
  if (!Number.isInteger(c) || c < 1) throw new Error(`?page=${l} is not a page number (they start at 1).`);
392
392
  u.refresh?.();
393
- const m = await Xs(t, { dpi: o, format: n, page: c - 1 });
393
+ const m = await Qs(t, { dpi: o, format: n, page: c - 1 });
394
394
  for (const d of m.warnings) console.warn(`[onlymapjs/cartograph] ${d}`);
395
395
  return Bi(m.blob, m.filenames[0] ?? `${h}.${n === "jpeg" ? "jpg" : "png"}`, { revokeAfterMs: 1e4 }), "export";
396
396
  }
@@ -400,27 +400,27 @@ async function Ma(t, e = {}) {
400
400
  }
401
401
  return s.get("print") === "1" ? (await Wi(t, e.timeoutMs), typeof t.print == "function" ? await t.print({ dpi: Number(s.get("dpi")) || void 0 }) : typeof window < "u" && window.print(), "print") : r ? "cvd" : null;
402
402
  }
403
- function ya() {
403
+ function pa() {
404
404
  if (typeof document > "u") return;
405
405
  const t = () => {
406
406
  for (const e of document.querySelectorAll("om-cartograph[allow-url-actions]"))
407
- Ma(e).catch((i) => console.warn(`[onlymapjs/cartograph] URL action failed: ${i.message}`));
407
+ ya(e).catch((i) => console.warn(`[onlymapjs/cartograph] URL action failed: ${i.message}`));
408
408
  };
409
409
  document.readyState === "loading" ? document.addEventListener("DOMContentLoaded", t, { once: !0 }) : t();
410
410
  }
411
- const Qs = typeof window < "u" && typeof document < "u" && typeof customElements < "u", Js = Qs ? HTMLElement : class {
411
+ const Js = typeof window < "u" && typeof document < "u" && typeof customElements < "u", Ys = Js ? HTMLElement : class {
412
412
  };
413
413
  function O(t, e) {
414
- Qs && (customElements.get(t) || customElements.define(t, e));
414
+ Js && (customElements.get(t) || customElements.define(t, e));
415
415
  }
416
- function pa(t) {
416
+ function _a(t) {
417
417
  if (typeof DOMParser > "u")
418
418
  throw new Error(
419
419
  "[onlymapjs] Parsing a manifest string needs a DOM implementation (DOMParser). In node, run under a DOM test environment — e.g. vitest with `environment: 'happy-dom'` (or jsdom) — or pass an already-parsed Element instead of a string."
420
420
  );
421
421
  return new DOMParser().parseFromString(t, "text/html");
422
422
  }
423
- const wi = " · ", _a = {
423
+ const wi = " · ", ba = {
424
424
  copy: "©",
425
425
  reg: "®",
426
426
  amp: "&",
@@ -430,25 +430,25 @@ const wi = " · ", _a = {
430
430
  apos: "'",
431
431
  nbsp: " "
432
432
  };
433
- function ba(t) {
433
+ function wa(t) {
434
434
  return t.replace(/<[^>]*>/g, " ").replace(/&(#x[0-9a-f]+|#\d+|[a-z]+);/gi, (e, i) => {
435
435
  if (i.startsWith("#")) {
436
436
  const s = i[1].toLowerCase() === "x" ? parseInt(i.slice(2), 16) : parseInt(i.slice(1), 10);
437
437
  return Number.isInteger(s) && s > 0 && s <= 1114111 ? String.fromCodePoint(s) : e;
438
438
  }
439
- return _a[i.toLowerCase()] ?? e;
439
+ return ba[i.toLowerCase()] ?? e;
440
440
  }).replace(/\s+/g, " ").trim();
441
441
  }
442
- function Ys(t) {
443
- const e = [...new Set(t.filter((i) => typeof i == "string").map(ba))].filter(
442
+ function Zs(t) {
443
+ const e = [...new Set(t.filter((i) => typeof i == "string").map(wa))].filter(
444
444
  (i) => i.length > 0
445
445
  );
446
446
  return e.filter((i) => !e.some((s) => s !== i && s.includes(i)));
447
447
  }
448
- function wa(t) {
449
- return Ys((t ?? "").split(wi.trim()));
448
+ function Hi(t) {
449
+ return Zs((t ?? "").split(wi.trim()));
450
450
  }
451
- class at extends Js {
451
+ class at extends Ys {
452
452
  renderQueued = !1;
453
453
  connectedCallback() {
454
454
  this.scheduleRender();
@@ -492,7 +492,7 @@ class at extends Js {
492
492
  o != null && Number.isInteger(o) ? this.style.zIndex = String(o) : this.style.removeProperty("z-index");
493
493
  }
494
494
  }
495
- const Le = "cartograph/2", Su = ["default", "dark", "sepia", "blueprint", "minimal"], Hi = ["A0", "A1", "A2", "A3", "A4", "A5", "Letter", "Legal"], Sa = /* @__PURE__ */ new Map([
495
+ const Le = "cartograph/2", Su = ["default", "dark", "sepia", "blueprint", "minimal"], Ki = ["A0", "A1", "A2", "A3", "A4", "A5", "Letter", "Legal"], Sa = /* @__PURE__ */ new Map([
496
496
  ["projection", "live frames render Web Mercator (EPSG:3857) only — Globe support is design-only; use a static frame for other projections"]
497
497
  ]), lt = ["id", "x", "y", "w", "h", "rotation", "z", "locked", "hidden"], V = {
498
498
  "om-cartograph": ["cartograph-id", "format", "size", "width", "height", "orientation", "theme", "bg", "color", "font", "title", "attribution", "notes", "cvd", "bleed", "crop-marks", "safe-zone", "dpi", "flatten", "color-profile", "allow-url-actions", "keep-badge"],
@@ -514,18 +514,18 @@ const Le = "cartograph/2", Su = ["default", "dark", "sepia", "blueprint", "minim
514
514
  // carries the georeference that was true when it was taken, which is the
515
515
  // only way furniture can be right when the live map never loaded and its
516
516
  // CRS is therefore unknowable.
517
- "om-source": ["src", "corners", "crs", "crs-def"],
517
+ "om-source": ["src", "corners", "crs", "crs-def", "attribution"],
518
518
  "om-atlas": ["id", "for", "layer", "filter", "sort", "filename", "page-name", "pager"]
519
519
  }, Oe = Object.keys(V), ei = "data-om-carto-vector", Ea = ["metric", "imperial", "nautical"], Aa = 0.3048, xa = 1609.344, Pa = 1852;
520
520
  function Ga(t) {
521
521
  return t != null && Ea.includes(t) ? t : null;
522
522
  }
523
- function Zs(t) {
523
+ function tr(t) {
524
524
  if (!isFinite(t) || t <= 0) return 0;
525
525
  const e = Math.pow(10, Math.floor(Math.log10(t))), i = t / e;
526
526
  return (i >= 5 ? 5 : i >= 2 ? 2 : 1) * e;
527
527
  }
528
- const Ki = {
528
+ const Vi = {
529
529
  // Finest first; the largest tier whose snapped length is ≥ 1 unit wins.
530
530
  metric: [
531
531
  { metersPerUnit: 1, label: "m" },
@@ -537,15 +537,15 @@ const Ki = {
537
537
  ],
538
538
  nautical: [{ metersPerUnit: Pa, label: "nmi" }]
539
539
  };
540
- function tr({ groundMetersPerMm: t, maxWidthMm: e, segments: i = 4, units: s = "metric", segmentLengthMeters: r }) {
540
+ function er({ groundMetersPerMm: t, maxWidthMm: e, segments: i = 4, units: s = "metric", segmentLengthMeters: r }) {
541
541
  if (!Number.isFinite(t) || t <= 0 || !Number.isFinite(e) || e <= 0) return null;
542
- const a = Number.isInteger(i) && i > 0 ? i : 4, n = Ki[s] ?? Ki.metric, o = e / a * t;
542
+ const a = Number.isInteger(i) && i > 0 ? i : 4, n = Vi[s] ?? Vi.metric, o = e / a * t;
543
543
  let h, l;
544
544
  if (r != null && Number.isFinite(r) && r > 0)
545
- h = r, l = Vi(n, h);
545
+ h = r, l = Xi(n, h);
546
546
  else {
547
- l = Vi(n, o);
548
- const d = Zs(o / l.metersPerUnit);
547
+ l = Xi(n, o);
548
+ const d = tr(o / l.metersPerUnit);
549
549
  if (d <= 0) return null;
550
550
  h = d * l.metersPerUnit;
551
551
  }
@@ -606,7 +606,7 @@ function Na(t, e, i) {
606
606
  }
607
607
  return { bars: l, strokes: f, labels: d, fontMm: s, strokeMm: r, segmentMeters: t.segmentMeters, unitLabel: t.unitLabel, scaleDenominator: t.scaleDenominator };
608
608
  }
609
- function Vi(t, e) {
609
+ function Xi(t, e) {
610
610
  let i = t[0];
611
611
  for (const s of t)
612
612
  e / s.metersPerUnit >= 1 && (i = s);
@@ -616,7 +616,7 @@ const Ca = " ";
616
616
  function Ia(t) {
617
617
  return !Number.isFinite(t) || t <= 0 ? "" : Math.round(t).toString().replace(/\B(?=(\d{3})+(?!\d))/g, Ca);
618
618
  }
619
- const er = /\{\{\s*([\w.]+)\s*\}\}/g;
619
+ const ir = /\{\{\s*([\w.]+)\s*\}\}/g;
620
620
  function Ta(t, e) {
621
621
  if (t.startsWith("atlas.")) return e.atlas?.[t.slice(6)];
622
622
  if (t.startsWith("frame.")) {
@@ -629,17 +629,17 @@ function Ta(t, e) {
629
629
  }
630
630
  return e.page[t];
631
631
  }
632
- function ir(t, e) {
632
+ function sr(t, e) {
633
633
  const i = [];
634
- return { text: t.replace(er, (r, a) => {
634
+ return { text: t.replace(ir, (r, a) => {
635
635
  const n = Ta(a, e);
636
636
  return n === void 0 ? (i.push(a), r) : n;
637
637
  }), unresolved: i };
638
638
  }
639
639
  function Ra(t) {
640
- return [...t.matchAll(er)].map((e) => e[1]);
640
+ return [...t.matchAll(ir)].map((e) => e[1]);
641
641
  }
642
- const Xi = /* @__PURE__ */ new WeakMap();
642
+ const Qi = /* @__PURE__ */ new WeakMap();
643
643
  function ka(t, e) {
644
644
  const i = [], s = t.ownerDocument ?? (typeof document < "u" ? document : null);
645
645
  if (!s) return i;
@@ -650,12 +650,12 @@ function ka(t, e) {
650
650
  ), a = [];
651
651
  for (let n = r.nextNode(); n; n = r.nextNode()) a.push(n);
652
652
  for (const n of a) {
653
- let o = Xi.get(n);
653
+ let o = Qi.get(n);
654
654
  if (o === void 0) {
655
655
  if (o = n.data, !o.includes("{{")) continue;
656
- Xi.set(n, o);
656
+ Qi.set(n, o);
657
657
  }
658
- const h = ir(o, e);
658
+ const h = sr(o, e);
659
659
  n.data !== h.text && (n.data = h.text), i.push(...h.unresolved);
660
660
  }
661
661
  return i;
@@ -664,28 +664,28 @@ function $a(t = /* @__PURE__ */ new Date()) {
664
664
  return `${t.getFullYear()}-${String(t.getMonth() + 1).padStart(2, "0")}-${String(t.getDate()).padStart(2, "0")}`;
665
665
  }
666
666
  const ii = "data-om-carto-unlinked";
667
- function sr(t) {
667
+ function rr(t) {
668
668
  return t.closest("om-cartograph");
669
669
  }
670
- function rr(t, e) {
671
- const i = sr(t);
670
+ function ar(t, e) {
671
+ const i = rr(t);
672
672
  if (!i || !e) return null;
673
673
  for (const s of i.querySelectorAll("om-frame"))
674
674
  if (s.id === e) return s;
675
675
  return null;
676
676
  }
677
- function ar(t) {
677
+ function nr(t) {
678
678
  return [...t.querySelectorAll("om-frame")];
679
679
  }
680
680
  function La(t) {
681
- const e = sr(t);
681
+ const e = rr(t);
682
682
  if (!e) return null;
683
- const i = ar(e);
683
+ const i = nr(e);
684
684
  return i.length === 1 ? i[0] : null;
685
685
  }
686
686
  function nt(t) {
687
687
  const e = t.getAttribute("for");
688
- return e ? rr(t, e) : La(t);
688
+ return e ? ar(t, e) : La(t);
689
689
  }
690
690
  function yt(t, e) {
691
691
  let i = t.querySelector(`:scope > [${ii}]`);
@@ -699,11 +699,11 @@ function yt(t, e) {
699
699
  function Oa(t) {
700
700
  t.querySelector(`:scope > [${ii}]`)?.remove();
701
701
  }
702
- const Qi = "data-om-carto-page", Ji = "data-om-carto-marks", Fe = "data-om-carto-credit", Yi = "data-om-carto-attribution", nr = "Built with OnlyMap by NIKA", Fa = `${nr} · free for non-commercial use`, ne = 2, Ue = 1.2, oe = 2.4, qe = 1.5, he = 1.2, De = 0.3, je = 0.8, ze = "http://www.w3.org/2000/svg", Ua = 6e4;
703
- function Zi(t) {
702
+ const Ji = "data-om-carto-page", Yi = "data-om-carto-marks", Fe = "data-om-carto-credit", Zi = "data-om-carto-attribution", or = "Built with OnlyMap by NIKA", Fa = `${or} · free for non-commercial use`, ne = 2, Ue = 1.2, oe = 2.4, qe = 1.5, he = 1.2, De = 0.3, je = 0.8, ze = "http://www.w3.org/2000/svg", Ua = 6e4;
703
+ function ts(t) {
704
704
  return t.replace(/©|\(c\)/gi, " ").replace(/\s+/g, " ").trim().toLowerCase();
705
705
  }
706
- class or extends at {
706
+ class hr extends at {
707
707
  static observedAttributes = [...V["om-cartograph"]];
708
708
  frameListenerBound = !1;
709
709
  /** Fields of the atlas page currently displayed, for {{atlas.<field>}}. */
@@ -749,7 +749,7 @@ class or extends at {
749
749
  r?.remove();
750
750
  return;
751
751
  }
752
- const a = i === "voluntary" ? nr : Fa;
752
+ const a = i === "voluntary" ? or : Fa;
753
753
  if (r) {
754
754
  r.textContent !== a && (r.textContent = a), this.armCreditPainter(r);
755
755
  return;
@@ -772,8 +772,8 @@ class or extends at {
772
772
  * runtime still credits the tiles in its pictures.
773
773
  */
774
774
  renderAttribution() {
775
- const e = [...this.querySelectorAll("om-frame")], i = Ys(e.flatMap((h) => h.attributions?.() ?? [])), s = [...this.querySelectorAll("om-text")].map((h) => Zi(h.textContent ?? "")).join(`
776
- `), r = i.filter((h) => !s.includes(Zi(h))), a = this.querySelector(`:scope > [${Yi}]`);
775
+ const e = [...this.querySelectorAll("om-frame")], i = Zs(e.flatMap((h) => h.attributions?.() ?? [])), s = [...this.querySelectorAll("om-text")].map((h) => ts(h.textContent ?? "")).join(`
776
+ `), r = i.filter((h) => !s.includes(ts(h))), a = this.querySelector(`:scope > [${Zi}]`);
777
777
  if (r.length === 0) {
778
778
  a?.remove();
779
779
  return;
@@ -784,7 +784,7 @@ class or extends at {
784
784
  return;
785
785
  }
786
786
  const o = this.ownerDocument.createElement("div");
787
- o.setAttribute(Yi, ""), o.setAttribute("z", "2147483644"), o.textContent = n, o.style.cssText = `position:absolute;right:${ne}mm;bottom:${Ue}mm;z-index:2147483644;max-width:60%;text-align:right;font:${oe}mm/${qe} system-ui,sans-serif;color:#374151;background:rgba(255,255,255,.72);padding:${De}mm ${he}mm;border-radius:${je}mm;pointer-events:none;`, this.armFootPainter(o, "right"), this.appendChild(o);
787
+ o.setAttribute(Zi, ""), o.setAttribute("z", "2147483644"), o.textContent = n, o.style.cssText = `position:absolute;right:${ne}mm;bottom:${Ue}mm;z-index:2147483644;max-width:60%;text-align:right;font:${oe}mm/${qe} system-ui,sans-serif;color:#374151;background:rgba(255,255,255,.72);padding:${De}mm ${he}mm;border-radius:${je}mm;pointer-events:none;`, this.armFootPainter(o, "right"), this.appendChild(o);
788
788
  }
789
789
  /**
790
790
  * Which credit this sheet carries, from the core's own predicate so the
@@ -847,7 +847,7 @@ class or extends at {
847
847
  }
848
848
  /** Render the whole page to one image, for `flatten`. */
849
849
  async buildFlattenedImage(e) {
850
- const { renderCartograph: i } = await Promise.resolve().then(() => ga), { blob: s } = await i(this, { dpi: e }), r = this.ownerDocument.createElement("img");
850
+ const { renderCartograph: i } = await Promise.resolve().then(() => va), { blob: s } = await i(this, { dpi: e }), r = this.ownerDocument.createElement("img");
851
851
  r.src = URL.createObjectURL(s), r.setAttribute("data-om-carto-flattened", "");
852
852
  const a = this.bleedMm;
853
853
  return r.style.cssText = `position:absolute;left:${-a}mm;top:${-a}mm;width:calc(100% + ${a * 2}mm);height:calc(100% + ${a * 2}mm);z-index:2147483645;`, await r.decode().catch(() => {
@@ -868,7 +868,7 @@ class or extends at {
868
868
  }
869
869
  /** Values every `{{token}}` on this page resolves against. */
870
870
  tokenContext() {
871
- const e = /* @__PURE__ */ new Map(), i = ar(this);
871
+ const e = /* @__PURE__ */ new Map(), i = nr(this);
872
872
  for (const a of i) {
873
873
  const n = a.georef, o = n?.groundMetersPerMm() ?? 0;
874
874
  e.set(a.id, {
@@ -876,7 +876,7 @@ class or extends at {
876
876
  crs: n?.crs
877
877
  });
878
878
  }
879
- const s = { page: {}, frames: e, soleFrameId: i.length === 1 ? i[0].id : null, atlas: this.atlasFields }, r = (a) => ir(this.getAttribute(a) ?? "", s).text;
879
+ const s = { page: {}, frames: e, soleFrameId: i.length === 1 ? i[0].id : null, atlas: this.atlasFields }, r = (a) => sr(this.getAttribute(a) ?? "", s).text;
880
880
  return {
881
881
  page: {
882
882
  title: r("title"),
@@ -899,8 +899,8 @@ class or extends at {
899
899
  renderNow() {
900
900
  const { widthMm: e, heightMm: i } = this.pageSize, s = this.bleedMm;
901
901
  this.style.display = "block", this.style.position = "relative", this.style.width = `${e}mm`, this.style.height = `${i}mm`, this.style.margin = s > 0 ? `${s}mm` : "", this.style.overflow = s > 0 ? "visible" : "hidden", this.applyThemeOverride("bg", "--om-carto-bg"), this.applyThemeOverride("color", "--om-carto-ink"), this.applyThemeOverride("font", "--om-carto-font");
902
- let r = this.querySelector(`style[${Qi}]`);
903
- r || (r = document.createElement("style"), r.setAttribute(Qi, ""), this.prepend(r));
902
+ let r = this.querySelector(`style[${Ji}]`);
903
+ r || (r = document.createElement("style"), r.setAttribute(Ji, ""), this.prepend(r));
904
904
  const a = e + s * 2, n = i + s * 2;
905
905
  r.textContent = `@page { size: ${a}mm ${n}mm; margin: 0; }
906
906
  @media print { html, body { margin: 0; padding: 0; } om-cartograph { break-after: page; } }`, this.renderPrintMarks(e, i, s), this.applyCvd(), this.refreshTokens(), this.renderCredit(), this.renderAttribution();
@@ -915,13 +915,13 @@ class or extends at {
915
915
  * worse than no guide.
916
916
  */
917
917
  renderPrintMarks(e, i, s) {
918
- const r = this.hasAttribute("crop-marks") && s > 0, a = Number(this.getAttribute("safe-zone")), n = Number.isFinite(a) && a > 0, o = this.querySelector(`:scope > [${Ji}]`);
918
+ const r = this.hasAttribute("crop-marks") && s > 0, a = Number(this.getAttribute("safe-zone")), n = Number.isFinite(a) && a > 0, o = this.querySelector(`:scope > [${Yi}]`);
919
919
  if (!r && !n) {
920
920
  o?.remove();
921
921
  return;
922
922
  }
923
923
  const h = this.ownerDocument, l = o ?? h.createElementNS(ze, "svg");
924
- if (l.setAttribute(Ji, ""), l.setAttribute("viewBox", `${-s} ${-s} ${e + s * 2} ${i + s * 2}`), l.setAttribute("width", `${e + s * 2}mm`), l.setAttribute("height", `${i + s * 2}mm`), l.style.cssText = `position:absolute;left:${-s}mm;top:${-s}mm;pointer-events:none;z-index:2147483646;`, l.replaceChildren(), r) {
924
+ if (l.setAttribute(Yi, ""), l.setAttribute("viewBox", `${-s} ${-s} ${e + s * 2} ${i + s * 2}`), l.setAttribute("width", `${e + s * 2}mm`), l.setAttribute("height", `${i + s * 2}mm`), l.style.cssText = `position:absolute;left:${-s}mm;top:${-s}mm;pointer-events:none;z-index:2147483646;`, l.replaceChildren(), r) {
925
925
  const f = Math.min(s, 4), u = Math.min(s * 0.35, 1.5), c = [];
926
926
  for (const m of [0, e])
927
927
  for (const d of [0, i]) {
@@ -953,10 +953,10 @@ class or extends at {
953
953
  this.style.removeProperty("filter");
954
954
  return;
955
955
  }
956
- fa(this.ownerDocument), this.style.filter = `url(#${Ws(e)})`;
956
+ ma(this.ownerDocument), this.style.filter = `url(#${Hs(e)})`;
957
957
  }
958
958
  }
959
- O("om-cartograph", or);
959
+ O("om-cartograph", hr);
960
960
  function qa({ text: t, maxWidth: e, fontSizePx: i, lineHeightPx: s, measure: r }) {
961
961
  const a = s > 0 ? s : i * 1.2, n = [];
962
962
  for (const l of t.split(/\r?\n/)) {
@@ -995,7 +995,7 @@ function Eu(t) {
995
995
  function Da(t, e, i) {
996
996
  return t === "center" ? (e - i) / 2 : t === "end" || t === "right" ? e - i : 0;
997
997
  }
998
- class hr extends at {
998
+ class lr extends at {
999
999
  static observedAttributes = [...V["om-text"]];
1000
1000
  renderNow() {
1001
1001
  this.applyPlacement(), this.style.display = "block", this.style.boxSizing = "border-box", this.style.overflow = "hidden";
@@ -1040,7 +1040,7 @@ class hr extends at {
1040
1040
  e.restore();
1041
1041
  }
1042
1042
  }
1043
- O("om-text", hr);
1043
+ O("om-text", lr);
1044
1044
  const ja = 63710087714e-4;
1045
1045
  let za = ja;
1046
1046
  const le = Math.PI / 180;
@@ -1048,13 +1048,13 @@ function Ba(t, e, i = za) {
1048
1048
  const s = (e[1] - t[1]) * le, r = (e[0] - t[0]) * le, a = t[1] * le, n = e[1] * le, o = Math.sin(s / 2) ** 2 + Math.cos(a) * Math.cos(n) * Math.sin(r / 2) ** 2;
1049
1049
  return 2 * i * Math.asin(Math.min(1, Math.sqrt(o)));
1050
1050
  }
1051
- const Xt = 6378137, ts = Math.PI / 180, es = 180 / Math.PI, is = 85.0511287798066, si = 2 * Math.PI * Xt / 360;
1051
+ const Xt = 6378137, es = Math.PI / 180, is = 180 / Math.PI, ss = 85.0511287798066, si = 2 * Math.PI * Xt / 360;
1052
1052
  function Si([t, e]) {
1053
- const i = Math.max(-is, Math.min(is, e));
1054
- return [Xt * t * ts, Xt * Math.log(Math.tan(Math.PI / 4 + i * ts / 2))];
1053
+ const i = Math.max(-ss, Math.min(ss, e));
1054
+ return [Xt * t * es, Xt * Math.log(Math.tan(Math.PI / 4 + i * es / 2))];
1055
1055
  }
1056
1056
  function Re([t, e]) {
1057
- return [t / Xt * es, (2 * Math.atan(Math.exp(e / Xt)) - Math.PI / 2) * es];
1057
+ return [t / Xt * is, (2 * Math.atan(Math.exp(e / Xt)) - Math.PI / 2) * is];
1058
1058
  }
1059
1059
  const Wa = {
1060
1060
  code: "EPSG:3857",
@@ -1076,16 +1076,16 @@ function Ei(t) {
1076
1076
  const i = /^(?:epsg:{1,2})?(\d{4,6})$/i.exec(e);
1077
1077
  return i ? `EPSG:${i[1]}` : e.toUpperCase();
1078
1078
  }
1079
- function lr(t) {
1079
+ function cr(t) {
1080
1080
  const e = Ei(t) ?? "EPSG:3857";
1081
1081
  return e === "EPSG:3857" || e === "EPSG:900913" ? Wa : e === "EPSG:4326" || e === "CRS:84" || e === "OGC:CRS84" ? Ha : null;
1082
1082
  }
1083
- const cr = /* @__PURE__ */ new Map();
1083
+ const ur = /* @__PURE__ */ new Map();
1084
1084
  function ri(t, e) {
1085
1085
  return !Number.isInteger(t) || t < 1 || t > 60 ? null : `+proj=utm +zone=${t}${e === "S" ? " +south" : ""} +datum=WGS84 +units=m +no_defs`;
1086
1086
  }
1087
1087
  async function Ka(t) {
1088
- const e = cr.get(t);
1088
+ const e = ur.get(t);
1089
1089
  if (typeof e == "string") return e;
1090
1090
  const i = Number(/^EPSG:(\d+)$/.exec(t)?.[1]);
1091
1091
  if (!Number.isFinite(i)) return null;
@@ -1101,10 +1101,10 @@ function Va(t) {
1101
1101
  return e.startsWith("deg") ? { units: "degree", metresPerUnit: si } : e.includes("ft") || e.includes("foot") ? { units: "linear", metresPerUnit: 0.3048 } : { units: "linear", metresPerUnit: 1 };
1102
1102
  }
1103
1103
  async function Xa(t, e) {
1104
- const i = Ei(t) ?? "EPSG:3857", s = cr.get(i);
1104
+ const i = Ei(t) ?? "EPSG:3857", s = ur.get(i);
1105
1105
  if (s && typeof s != "string") return s;
1106
1106
  if (!e) {
1107
- const f = lr(i);
1107
+ const f = cr(i);
1108
1108
  if (f) return f;
1109
1109
  }
1110
1110
  const r = e?.trim() || await Ka(i);
@@ -1118,14 +1118,14 @@ async function Xa(t, e) {
1118
1118
  inverse: (f) => o.forward(f)
1119
1119
  };
1120
1120
  }
1121
- const ss = Math.PI / 180, Qa = 180 / Math.PI, Ja = { code: "EPSG:3857", forward: Si, inverse: Re }, Au = Si, xu = Re, rs = 6378137, as = 89.9;
1121
+ const rs = Math.PI / 180, Qa = 180 / Math.PI, Ja = { code: "EPSG:3857", forward: Si, inverse: Re }, Au = Si, xu = Re, as = 6378137, ns = 89.9;
1122
1122
  function Ya([t, e]) {
1123
- const i = Math.max(-as, Math.min(as, e));
1124
- return [rs * t * ss, rs * Math.log(Math.tan(Math.PI / 4 + i * ss / 2))];
1123
+ const i = Math.max(-ns, Math.min(ns, e));
1124
+ return [as * t * rs, as * Math.log(Math.tan(Math.PI / 4 + i * rs / 2))];
1125
1125
  }
1126
1126
  const Za = { code: "EPSG:3857", forward: Ya, inverse: Re }, ai = Ei;
1127
1127
  function Ct(t) {
1128
- return lr(t);
1128
+ return cr(t);
1129
1129
  }
1130
1130
  async function ni(t, e) {
1131
1131
  return Xa(t, e);
@@ -1159,7 +1159,7 @@ function en(t, e) {
1159
1159
  const f = (u) => [u[0] / a + i, u[1] / a + s];
1160
1160
  return { matrix: [l[0], l[1], l[2], l[3], l[4], l[5], l[6], l[7], 1], normalize: n, denormalize: f };
1161
1161
  }
1162
- function ns(t, [e, i]) {
1162
+ function os(t, [e, i]) {
1163
1163
  const s = t[6] * e + t[7] * i + t[8];
1164
1164
  return Math.abs(s) < 1e-12 ? null : [(t[0] * e + t[1] * i + t[2]) / s, (t[3] * e + t[4] * i + t[5]) / s];
1165
1165
  }
@@ -1183,12 +1183,12 @@ function rn(t, e) {
1183
1183
  for (; e - i > 180; ) i += 360;
1184
1184
  return i;
1185
1185
  }
1186
- const ur = (t) => {
1186
+ const fr = (t) => {
1187
1187
  let e = ((t + 180) % 360 + 360) % 360 - 180;
1188
1188
  return e === -180 && (e = 180), e;
1189
1189
  };
1190
1190
  function zt({ corners: t, widthMm: e, heightMm: i, crsForward: s, continuous: r = !1 }) {
1191
- const a = s ?? (r ? Za : Ja), n = t[0][0], o = (M) => r ? M : rn(M, n), h = (M) => r ? M : ur(M), l = t.map(([M, _]) => [o(M), _]), f = l.map((M) => a.forward(M)), u = [
1191
+ const a = s ?? (r ? Za : Ja), n = t[0][0], o = (M) => r ? M : rn(M, n), h = (M) => r ? M : fr(M), l = t.map(([M, _]) => [o(M), _]), f = l.map((M) => a.forward(M)), u = [
1192
1192
  [0, 0],
1193
1193
  [e, 0],
1194
1194
  [e, i],
@@ -1211,12 +1211,12 @@ function zt({ corners: t, widthMm: e, heightMm: i, crsForward: s, continuous: r
1211
1211
  continuous: r,
1212
1212
  project(M) {
1213
1213
  if (!c) return null;
1214
- const _ = a.forward([o(M[0]), M[1]]), p = ns(c.matrix, c.normalize(_));
1214
+ const _ = a.forward([o(M[0]), M[1]]), p = os(c.matrix, c.normalize(_));
1215
1215
  return p && Number.isFinite(p[0]) && Number.isFinite(p[1]) ? { xMm: p[0], yMm: p[1] } : null;
1216
1216
  },
1217
1217
  unproject(M, _) {
1218
1218
  if (!c || !m) return null;
1219
- const p = ns(m, [M, _]);
1219
+ const p = os(m, [M, _]);
1220
1220
  if (!p) return null;
1221
1221
  const S = a.inverse(c.denormalize(p));
1222
1222
  return Number.isFinite(S[0]) && Number.isFinite(S[1]) ? [h(S[0]), S[1]] : null;
@@ -1381,7 +1381,7 @@ function oi(t, e, i, s) {
1381
1381
  return n;
1382
1382
  }
1383
1383
  async function cn(t, e) {
1384
- const i = await zs();
1384
+ const i = await Bs();
1385
1385
  if (e && typeof e != "string") return { core: i, map: e };
1386
1386
  if (!e) throw new Error("a live frame needs src= or an inline <om-map> child");
1387
1387
  const s = await ln(e, t.ownerDocument);
@@ -1429,8 +1429,8 @@ async function vn(t, e, i) {
1429
1429
  }
1430
1430
  return o;
1431
1431
  }
1432
- const We = "data-om-carto-placeholder", os = "data-om-carto-source", He = "data-om-carto-capture", Ke = "data-om-carto-overview", hs = "http://www.w3.org/2000/svg", ls = 24, cs = 0.25;
1433
- class fr extends at {
1432
+ const We = "data-om-carto-placeholder", hs = "data-om-carto-source", He = "data-om-carto-capture", Ke = "data-om-carto-overview", ls = "http://www.w3.org/2000/svg", cs = 24, us = 0.25;
1433
+ class mr extends at {
1434
1434
  static observedAttributes = [...V["om-frame"]];
1435
1435
  /** Resolved non-builtin CRS planes, so a re-render does not re-await proj4. */
1436
1436
  resolvedForward = null;
@@ -1582,7 +1582,7 @@ class fr extends at {
1582
1582
  renderNow() {
1583
1583
  this.applyPlacement(), this.style.display = "block", this.style.overflow = "hidden", this.style.boxSizing = "border-box";
1584
1584
  const e = this.getAttribute("frame-stroke");
1585
- this.style.border = "0", this.style.boxShadow = `inset 0 0 0 ${cs}mm ${e || "var(--om-carto-frame-stroke)"}`;
1585
+ this.style.border = "0", this.style.boxShadow = `inset 0 0 0 ${us}mm ${e || "var(--om-carto-frame-stroke)"}`;
1586
1586
  const i = this.getAttribute("frame-bg");
1587
1587
  this.style.background = i || "var(--om-carto-frame-bg)", this.mode === "static" ? (this.suspendLiveMode(), this.renderStatic()) : this.renderLive(), this.renderOverview();
1588
1588
  }
@@ -1640,7 +1640,7 @@ class fr extends at {
1640
1640
  return;
1641
1641
  }
1642
1642
  const n = gn(a);
1643
- n !== this.knownSourceList && (this.knownSourceList = n, this.sourceCursor = 0, this.settledSource = null, this.removeAttribute(os));
1643
+ n !== this.knownSourceList && (this.knownSourceList = n, this.sourceCursor = 0, this.settledSource = null, this.removeAttribute(hs));
1644
1644
  const o = Math.min(this.sourceCursor, a.length - 1), h = a[o];
1645
1645
  if (h.kind === "raster") {
1646
1646
  this.suspendLiveMode(), this.renderCaptureSource(h, o);
@@ -1714,9 +1714,9 @@ class fr extends at {
1714
1714
  */
1715
1715
  settleSource(e, i) {
1716
1716
  if (this.settledSource?.key === e.key) return;
1717
- this.settledSource = e, this.sourceCursor = i, this.setAttribute(os, String(i));
1717
+ this.settledSource = e, this.sourceCursor = i, this.setAttribute(hs, String(i));
1718
1718
  const s = { id: this.id, index: i, kind: e.kind, src: e.src ?? null };
1719
- this.dispatchEvent(new CustomEvent("om-frame-source", { bubbles: !0, detail: s })), this.dispatchEvent(new CustomEvent("om-frame-view", { bubbles: !0, detail: { id: this.id } }));
1719
+ this.dispatchEvent(new CustomEvent("om-frame-source", { bubbles: !0, detail: s })), this.dispatchEvent(new CustomEvent("om-frame-view", { bubbles: !0, detail: { id: this.id } })), this.dispatchEvent(new CustomEvent("om-attributions-changed", { bubbles: !0 }));
1720
1720
  }
1721
1721
  /** Leave live mode without deleting an authored inline map. */
1722
1722
  suspendLiveMode() {
@@ -1824,7 +1824,7 @@ class fr extends at {
1824
1824
  i?.remove();
1825
1825
  return;
1826
1826
  }
1827
- const s = rr(this, e), r = this.georef, a = s?.georef;
1827
+ const s = ar(this, e), r = this.georef, a = s?.georef;
1828
1828
  if (!s || !r || !a) {
1829
1829
  i?.remove();
1830
1830
  return;
@@ -1836,17 +1836,17 @@ class fr extends at {
1836
1836
  [c, l]
1837
1837
  ];
1838
1838
  for (const [M, _] of m)
1839
- for (let p = 0; p < ls; p++) {
1840
- const S = p / ls, E = [M[0] + (_[0] - M[0]) * S, M[1] + (_[1] - M[1]) * S], A = r.project(E);
1839
+ for (let p = 0; p < cs; p++) {
1840
+ const S = p / cs, E = [M[0] + (_[0] - M[0]) * S, M[1] + (_[1] - M[1]) * S], A = r.project(E);
1841
1841
  A && h.push(`${A.xMm.toFixed(3)},${A.yMm.toFixed(3)}`);
1842
1842
  }
1843
1843
  if (h.length < 3) {
1844
1844
  i?.remove();
1845
1845
  return;
1846
1846
  }
1847
- const d = this.ownerDocument, v = i ?? d.createElementNS(hs, "svg");
1847
+ const d = this.ownerDocument, v = i ?? d.createElementNS(ls, "svg");
1848
1848
  v.setAttribute(Ke, ""), v.setAttribute("width", `${n}mm`), v.setAttribute("height", `${o}mm`), v.setAttribute("viewBox", `0 0 ${n} ${o}`), v.style.cssText = "position:absolute;inset:0;pointer-events:none;", v.replaceChildren();
1849
- const g = d.createElementNS(hs, "polygon");
1849
+ const g = d.createElementNS(ls, "polygon");
1850
1850
  g.setAttribute("points", h.join(" ")), g.setAttribute("fill", "none"), g.setAttribute("stroke", this.getAttribute("overview-stroke") || "#e63946"), g.setAttribute("stroke-width", "0.4"), v.appendChild(g), i || this.appendChild(v);
1851
1851
  }
1852
1852
  // -------------------------------------------------------------------------
@@ -1938,7 +1938,9 @@ class fr extends at {
1938
1938
  * the only source a page without the runtime has.
1939
1939
  */
1940
1940
  attributions() {
1941
- return this.mode === "live" ? this.liveMap?.attributions?.() ?? [] : wa(this.getAttribute("attribution"));
1941
+ if (this.mode !== "live") return Hi(this.getAttribute("attribution"));
1942
+ const e = this.settledSource;
1943
+ return e?.kind === "raster" ? Hi(e.el.getAttribute("attribution")) : this.liveMap?.attributions?.() ?? [];
1942
1944
  }
1943
1945
  /**
1944
1946
  * Point this frame's camera at a lon/lat box — the atlas's per-page refit.
@@ -2002,7 +2004,7 @@ class fr extends at {
2002
2004
  h && (e.fillStyle = h, e.fillRect(0, 0, a, n));
2003
2005
  const l = this.mode === "static" ? this.vector ? this.captureImage : this.raster : this.captureImage;
2004
2006
  l && l.complete && l.naturalWidth > 0 && e.drawImage(l, 0, 0, a, n), this.paintOverview(e, i);
2005
- const f = this.getAttribute("frame-stroke") || tt(o?.getPropertyValue("--om-carto-frame-stroke")?.trim()) || "#333333", u = cs * i.pxPerMm;
2007
+ const f = this.getAttribute("frame-stroke") || tt(o?.getPropertyValue("--om-carto-frame-stroke")?.trim()) || "#333333", u = us * i.pxPerMm;
2006
2008
  u > 0 && (e.strokeStyle = f, e.lineWidth = u, e.strokeRect(u / 2, u / 2, a - u, n - u));
2007
2009
  }
2008
2010
  paintOverview(e, i) {
@@ -2013,15 +2015,15 @@ class fr extends at {
2013
2015
  }), e.closePath(), e.stroke(), e.restore());
2014
2016
  }
2015
2017
  }
2016
- O("om-frame", fr);
2018
+ O("om-frame", mr);
2017
2019
  const ce = "http://www.w3.org/2000/svg", Mn = ["single", "double", "line", "ticks"];
2018
- class mr extends at {
2020
+ class dr extends at {
2019
2021
  static observedAttributes = [...V["om-scalebar"]];
2020
2022
  /** The geometry currently drawn — reused by the canvas exporter. */
2021
2023
  get drawing() {
2022
2024
  const i = nt(this)?.georef;
2023
2025
  if (!i) return null;
2024
- const { w: s, h: r } = $(this), a = tr({
2026
+ const { w: s, h: r } = $(this), a = er({
2025
2027
  groundMetersPerMm: i.groundMetersPerMm(),
2026
2028
  maxWidthMm: s,
2027
2029
  segments: Number(this.getAttribute("segments")) || void 0,
@@ -2085,9 +2087,9 @@ class mr extends at {
2085
2087
  e.textAlign = h.anchor === "middle" ? "center" : h.anchor === "end" ? "right" : "left", e.fillText(h.text, n(h.x), n(h.y));
2086
2088
  }
2087
2089
  }
2088
- O("om-scalebar", mr);
2090
+ O("om-scalebar", dr);
2089
2091
  const Ft = "http://www.w3.org/2000/svg";
2090
- class dr extends at {
2092
+ class gr extends at {
2091
2093
  static observedAttributes = [...V["om-north"]];
2092
2094
  /** Degrees clockwise from the page's "up", or null when unknowable. */
2093
2095
  get bearing() {
@@ -2133,9 +2135,9 @@ class dr extends at {
2133
2135
  e.save(), e.translate(h(u), h(a / 2)), e.rotate(s * Math.PI / 180), e.translate(-h(u), -h(a / 2)), e.fillStyle = o, e.strokeStyle = o, this.indicatorKind === "rose" && (e.lineWidth = h(0.2), e.beginPath(), e.arc(h(u), h(f / 2), h(Math.min(r, f) / 2), 0, Math.PI * 2), e.stroke()), e.beginPath(), e.moveTo(h(u), 0), e.lineTo(h(u + c), h(f)), e.lineTo(h(u), h(f - c * 0.55)), e.lineTo(h(u - c), h(f)), e.closePath(), e.fill(), e.font = `${h(l)}px ${n?.fontFamily || "system-ui, sans-serif"}`, e.textAlign = "center", e.textBaseline = "alphabetic", e.fillText("N", h(u), h(a)), e.restore();
2134
2136
  }
2135
2137
  }
2136
- O("om-north", dr);
2138
+ O("om-north", gr);
2137
2139
  const ue = "http://www.w3.org/2000/svg", yn = ["rect", "ellipse", "line", "arrow"];
2138
- class gr extends at {
2140
+ class vr extends at {
2139
2141
  static observedAttributes = [...V["om-shape"]];
2140
2142
  get kind() {
2141
2143
  const e = this.getAttribute("kind");
@@ -2196,9 +2198,9 @@ class gr extends at {
2196
2198
  e.restore();
2197
2199
  }
2198
2200
  }
2199
- O("om-shape", gr);
2200
- const us = "data-om-carto-owned", pn = ["contain", "cover", "fill"];
2201
- class vr extends at {
2201
+ O("om-shape", vr);
2202
+ const fs = "data-om-carto-owned", pn = ["contain", "cover", "fill"];
2203
+ class Mr extends at {
2202
2204
  static observedAttributes = [...V["om-image"]];
2203
2205
  get fit() {
2204
2206
  const e = this.getAttribute("fit");
@@ -2211,7 +2213,7 @@ class vr extends at {
2211
2213
  this.applyPlacement(), this.style.display = "block", this.style.overflow = "hidden";
2212
2214
  const e = this.getAttribute("src");
2213
2215
  let i = this.image;
2214
- !i && e && (i = this.ownerDocument.createElement("img"), i.setAttribute(us, ""), i.alt = "", i.crossOrigin = "anonymous", this.appendChild(i)), i && (e && i.hasAttribute(us) && i.getAttribute("src") !== e && i.setAttribute("src", e), i.style.width = "100%", i.style.height = "100%", i.style.objectFit = this.fit, i.style.display = "block");
2216
+ !i && e && (i = this.ownerDocument.createElement("img"), i.setAttribute(fs, ""), i.alt = "", i.crossOrigin = "anonymous", this.appendChild(i)), i && (e && i.hasAttribute(fs) && i.getAttribute("src") !== e && i.setAttribute("src", e), i.style.width = "100%", i.style.height = "100%", i.style.objectFit = this.fit, i.style.display = "block");
2215
2217
  }
2216
2218
  paintCartograph(e, i) {
2217
2219
  const s = this.image;
@@ -2227,7 +2229,7 @@ class vr extends at {
2227
2229
  h === "cover" && (e.save(), e.beginPath(), e.rect(0, 0, n, o), e.clip()), e.drawImage(s, (n - c) / 2, (o - m) / 2, c, m), h === "cover" && e.restore();
2228
2230
  }
2229
2231
  }
2230
- O("om-image", vr);
2232
+ O("om-image", Mr);
2231
2233
  const _n = /* @__PURE__ */ new Set(["PathLayer", "LineLayer", "ArcLayer", "TripsLayer", "GreatCircleLayer", "PathStyleLayer"]), bn = /* @__PURE__ */ new Set(["ScatterplotLayer", "IconLayer", "TextLayer", "PointCloudLayer", "HeatmapLayer", "ScreenGridLayer"]), wn = /* @__PURE__ */ new Set(["COGLayer", "ZarrLayer", "BitmapLayer", "TerrainLayer", "ImageOverlay"]);
2232
2234
  function Sn(t) {
2233
2235
  const e = t.type ?? "";
@@ -2303,7 +2305,7 @@ function Gn(t) {
2303
2305
  }
2304
2306
  return e;
2305
2307
  }
2306
- function Mr(t) {
2308
+ function yr(t) {
2307
2309
  const e = [];
2308
2310
  for (const i of t.querySelectorAll(":scope > om-legend-row")) {
2309
2311
  if (i.hasAttribute("hide")) continue;
@@ -2318,15 +2320,15 @@ function Mr(t) {
2318
2320
  }
2319
2321
  return e.sort((i, s) => (i.order ?? Number.POSITIVE_INFINITY) - (s.order ?? Number.POSITIVE_INFINITY));
2320
2322
  }
2321
- const fs = "data-om-carto-legend-rows";
2322
- class yr extends at {
2323
+ const ms = "data-om-carto-legend-rows";
2324
+ class pr extends at {
2323
2325
  static observedAttributes = [...V["om-legend"]];
2324
2326
  get derived() {
2325
2327
  return this.getAttribute("derived") !== "false";
2326
2328
  }
2327
2329
  /** The rows this legend currently shows — recomputed on demand, never stored. */
2328
2330
  get rows() {
2329
- if (!this.derived) return Mr(this);
2331
+ if (!this.derived) return yr(this);
2330
2332
  const s = nt(this)?.mapElement?.getLayers?.();
2331
2333
  return s ? An(s, Gn(this)) : [];
2332
2334
  }
@@ -2355,9 +2357,9 @@ class yr extends at {
2355
2357
  }
2356
2358
  renderRows(e) {
2357
2359
  const i = this.ownerDocument;
2358
- this.querySelector(`:scope > [${fs}]`)?.remove(), Oa(this);
2360
+ this.querySelector(`:scope > [${ms}]`)?.remove(), Oa(this);
2359
2361
  const s = i.createElement("div");
2360
- s.setAttribute(fs, ""), s.style.cssText = `padding:${this.paddingMm}mm;font-size:${this.fontMm}mm;line-height:1.35;`;
2362
+ s.setAttribute(ms, ""), s.style.cssText = `padding:${this.paddingMm}mm;font-size:${this.fontMm}mm;line-height:1.35;`;
2361
2363
  const r = this.getAttribute("title");
2362
2364
  if (r) {
2363
2365
  const n = i.createElement("div");
@@ -2420,9 +2422,9 @@ class yr extends at {
2420
2422
  const q = I.legend;
2421
2423
  if (e.save(), e.font = `${m(2.1)}px ${c}`, e.globalAlpha = 0.7, e.fillText(q.field, m(R + 2.7), g), e.globalAlpha = 1, g += m(2.8), q.kind === "ramp") {
2422
2424
  const X = Math.min(24, Math.max(1, G - 2.7)), Z = R + 2.7, bt = e.createLinearGradient(m(Z), 0, m(Z + X), 0);
2423
- q.colors.forEach((ta, ea) => bt.addColorStop(q.colors.length === 1 ? 0 : ea / (q.colors.length - 1), ta)), e.fillStyle = bt, e.fillRect(m(Z), g, m(X), m(2.4)), g += m(3.4), e.fillStyle = u, e.font = `${m(2.1)}px ${c}`, e.fillText(q.domain[0].toLocaleString("en-US"), m(Z), g);
2424
- const Zr = q.domain[1].toLocaleString("en-US");
2425
- e.textAlign = "right", e.fillText(Zr, m(Z + X), g), e.textAlign = "left", g += m(3.2);
2425
+ q.colors.forEach((ea, ia) => bt.addColorStop(q.colors.length === 1 ? 0 : ia / (q.colors.length - 1), ea)), e.fillStyle = bt, e.fillRect(m(Z), g, m(X), m(2.4)), g += m(3.4), e.fillStyle = u, e.font = `${m(2.1)}px ${c}`, e.fillText(q.domain[0].toLocaleString("en-US"), m(Z), g);
2426
+ const ta = q.domain[1].toLocaleString("en-US");
2427
+ e.textAlign = "right", e.fillText(ta, m(Z + X), g), e.textAlign = "left", g += m(3.2);
2426
2428
  } else {
2427
2429
  const X = [...q.entries];
2428
2430
  q.kind === "categories" && q.defaultColor && X.push({ color: q.defaultColor, label: "other" }), e.font = `${m(2.3)}px ${c}`;
@@ -2440,40 +2442,40 @@ const fe = (t, e) => {
2440
2442
  const i = t.createElement("span");
2441
2443
  return i.textContent = e, i;
2442
2444
  };
2443
- O("om-legend", yr);
2444
- const ms = 48, li = {
2445
+ O("om-legend", pr);
2446
+ const ds = 48, li = {
2445
2447
  toLngLat: (t, e) => [t, e],
2446
2448
  fromLngLat: (t) => [t[0], t[1]]
2447
2449
  };
2448
- function ds(t, e = 5) {
2449
- return !Number.isFinite(t) || t <= 0 ? 0 : Zs(t / Math.max(1, e));
2450
+ function gs(t, e = 5) {
2451
+ return !Number.isFinite(t) || t <= 0 ? 0 : tr(t / Math.max(1, e));
2450
2452
  }
2451
2453
  function Nn({ georef: t, plane: e = li, interval: i, intervalX: s, intervalY: r, labels: a = "outside", format: n }) {
2452
2454
  if (t.degenerate) return null;
2453
2455
  const o = t.corners.map((p) => e.fromLngLat(p)), h = o.map((p) => p[0]), l = o.map((p) => p[1]);
2454
2456
  if (h.some((p) => !Number.isFinite(p)) || l.some((p) => !Number.isFinite(p))) return null;
2455
- const f = Math.min(...h), u = Math.max(...h), c = Math.min(...l), m = Math.max(...l), d = gs(s ?? i, ds(u - f)), v = gs(r ?? i, ds(m - c));
2457
+ const f = Math.min(...h), u = Math.max(...h), c = Math.min(...l), m = Math.max(...l), d = vs(s ?? i, gs(u - f)), v = vs(r ?? i, gs(m - c));
2456
2458
  if (d <= 0 || v <= 0 || (u - f) / d > 500 || (m - c) / v > 500) return null;
2457
2459
  const g = [], M = [], _ = n ?? In;
2458
2460
  for (let p = Math.ceil(f / d) * d; p <= u + 1e-9; p += d) {
2459
- const S = vs(t, e, p, c, m, "x");
2461
+ const S = Ms(t, e, p, c, m, "x");
2460
2462
  if (S) {
2461
2463
  g.push(S);
2462
- const E = e === li ? ur(p) : p;
2463
- a !== "none" && ys(M, S, t, _(E, "x"), "x", a);
2464
+ const E = e === li ? fr(p) : p;
2465
+ a !== "none" && ps(M, S, t, _(E, "x"), "x", a);
2464
2466
  }
2465
2467
  }
2466
2468
  for (let p = Math.ceil(c / v) * v; p <= m + 1e-9; p += v) {
2467
- const S = vs(t, e, p, f, u, "y");
2468
- S && (g.push(S), a !== "none" && ys(M, S, t, _(p, "y"), "y", a));
2469
+ const S = Ms(t, e, p, f, u, "y");
2470
+ S && (g.push(S), a !== "none" && ps(M, S, t, _(p, "y"), "y", a));
2469
2471
  }
2470
2472
  return { lines: g, labels: M, intervalX: d, intervalY: v };
2471
2473
  }
2472
- const gs = (t, e) => t != null && Number.isFinite(t) && t > 0 ? t : e;
2473
- function vs(t, e, i, s, r, a) {
2474
+ const vs = (t, e) => t != null && Number.isFinite(t) && t > 0 ? t : e;
2475
+ function Ms(t, e, i, s, r, a) {
2474
2476
  const n = [];
2475
- for (let h = 0; h <= ms; h++) {
2476
- const l = s + (r - s) * h / ms, f = a === "x" ? e.toLngLat(i, l) : e.toLngLat(l, i);
2477
+ for (let h = 0; h <= ds; h++) {
2478
+ const l = s + (r - s) * h / ds, f = a === "x" ? e.toLngLat(i, l) : e.toLngLat(l, i);
2477
2479
  if (!Number.isFinite(f[0]) || !Number.isFinite(f[1])) continue;
2478
2480
  const u = t.project(f);
2479
2481
  u && n.push(u);
@@ -2486,10 +2488,10 @@ function Cn(t, e, i) {
2486
2488
  if (r === -1) return [];
2487
2489
  let a = t.length - 1;
2488
2490
  for (; a > r && !s(t[a]); ) a--;
2489
- return t.slice(Math.max(0, r - 1), Math.min(t.length, a + 2)).map((o) => ({ xMm: Ms(o.xMm, 0, e), yMm: Ms(o.yMm, 0, i) }));
2491
+ return t.slice(Math.max(0, r - 1), Math.min(t.length, a + 2)).map((o) => ({ xMm: ys(o.xMm, 0, e), yMm: ys(o.yMm, 0, i) }));
2490
2492
  }
2491
- const Ms = (t, e, i) => Math.min(i, Math.max(e, t));
2492
- function ys(t, e, i, s, r, a) {
2493
+ const ys = (t, e, i) => Math.min(i, Math.max(e, t));
2494
+ function ps(t, e, i, s, r, a) {
2493
2495
  if (r === "x") {
2494
2496
  const n = e.points.reduce((o, h) => h.yMm > o.yMm ? h : o);
2495
2497
  if (Math.abs(n.yMm - i.heightMm) > 0.5) return;
@@ -2510,7 +2512,7 @@ function Tn(t, e) {
2510
2512
  return `${l}°${String(f).padStart(2, "0")}′${String(u).padStart(2, "0")}″${i}`;
2511
2513
  }
2512
2514
  const me = "http://www.w3.org/2000/svg", Rn = ["solid", "cross", "markers"], ct = 1.4;
2513
- class pr extends at {
2515
+ class _r extends at {
2514
2516
  static observedAttributes = [...V["om-graticule"]];
2515
2517
  resolvedPlane = null;
2516
2518
  resolvedPlaneKey = null;
@@ -2632,7 +2634,7 @@ function kn(t, e) {
2632
2634
  }
2633
2635
  return s <= 1 ? i : null;
2634
2636
  }
2635
- O("om-graticule", pr);
2637
+ O("om-graticule", _r);
2636
2638
  function $n(t, e) {
2637
2639
  if (t == null || typeof t != "object") return;
2638
2640
  const i = t.properties;
@@ -2719,8 +2721,8 @@ function Bn(t, e, i) {
2719
2721
  return s.set(h, l + 1), `${l === 0 ? h : `${h}-${l + 1}`}.${i}`;
2720
2722
  });
2721
2723
  }
2722
- const ps = "data-om-carto-pager", Wn = "data-om-carto-screen-only", Hn = "onlymap-cartograph", Kn = "onlymap-cartograph-host";
2723
- class _r extends at {
2724
+ const _s = "data-om-carto-pager", Wn = "data-om-carto-screen-only", Hn = "onlymap-cartograph", Kn = "onlymap-cartograph-host";
2725
+ class br extends at {
2724
2726
  static observedAttributes = [...V["om-atlas"]];
2725
2727
  /**
2726
2728
  * Pages are SNAPSHOTTED when iteration first starts. A streaming or polling
@@ -2895,14 +2897,14 @@ class _r extends at {
2895
2897
  renderPager() {
2896
2898
  const e = this.closest("om-cartograph");
2897
2899
  if (!e) return;
2898
- const i = e.querySelector(`:scope > [${ps}]`), s = this.count;
2900
+ const i = e.querySelector(`:scope > [${_s}]`), s = this.count;
2899
2901
  if (this.getAttribute("pager") === "none" || s === 0) {
2900
2902
  i?.remove(), this.pager = null;
2901
2903
  return;
2902
2904
  }
2903
2905
  const r = this.ownerDocument, a = i ?? r.createElement("div");
2904
2906
  if (!i) {
2905
- a.setAttribute(ps, ""), a.setAttribute(Wn, ""), a.setAttribute("role", "navigation"), a.setAttribute("aria-label", "Atlas pages"), a.style.cssText = "position:absolute;left:50%;bottom:4mm;transform:translateX(-50%);z-index:2147483000;display:flex;align-items:center;gap:8px;padding:4px 10px;border-radius:999px;background:rgba(20,20,24,.82);color:#fff;font:12px/1.2 system-ui,sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.35);user-select:none;pointer-events:auto;";
2907
+ a.setAttribute(_s, ""), a.setAttribute(Wn, ""), a.setAttribute("role", "navigation"), a.setAttribute("aria-label", "Atlas pages"), a.style.cssText = "position:absolute;left:50%;bottom:4mm;transform:translateX(-50%);z-index:2147483000;display:flex;align-items:center;gap:8px;padding:4px 10px;border-radius:999px;background:rgba(20,20,24,.82);color:#fff;font:12px/1.2 system-ui,sans-serif;box-shadow:0 2px 10px rgba(0,0,0,.35);user-select:none;pointer-events:auto;";
2906
2908
  for (const [f, u, c] of [
2907
2909
  [-1, "‹", "Previous page"],
2908
2910
  [1, "›", "Next page"]
@@ -2934,8 +2936,8 @@ class _r extends at {
2934
2936
  this.style.display = "none", this.refresh();
2935
2937
  }
2936
2938
  }
2937
- O("om-atlas", _r);
2938
- class Vn extends Js {
2939
+ O("om-atlas", br);
2940
+ class Vn extends Ys {
2939
2941
  static observedAttributes = [...V["om-source"]];
2940
2942
  connectedCallback() {
2941
2943
  this.style.display = "none";
@@ -2950,7 +2952,7 @@ class Vn extends Js {
2950
2952
  }
2951
2953
  }
2952
2954
  const Xn = /* @__PURE__ */ new Set(["class", "style", "id", "hidden", "title", "lang", "dir", "slot", "part", "role", "tabindex"]), Qn = /* @__PURE__ */ new Set(["style", "script", "img", "template", "om-map"]), Jn = ["data-om-carto-credit", "data-om-carto-marks", "data-om-carto-flattened"], Yn = /* @__PURE__ */ new Set(["om-text", "om-legend", "om-scalebar", "om-north", "om-shape", "om-image"]), Zn = /* @__PURE__ */ new Set(["om-frame", "om-legend", "om-scalebar", "om-north", "om-graticule", "om-text", "om-shape", "om-image"]), to = 0.02, eo = (t) => Math.max(0, Number(t.getAttribute("bleed")) || 0);
2953
- function br(t) {
2955
+ function wr(t) {
2954
2956
  const e = t.tagName.toLowerCase();
2955
2957
  return t.id ? `${e}#${t.id}` : e;
2956
2958
  }
@@ -2969,9 +2971,9 @@ function so(t, e) {
2969
2971
  const s = new RegExp(`(?:^|;)\\s*${e}\\s*:\\s*(-?[\\d.]+)mm`, "i").exec(i);
2970
2972
  return s ? Number(s[1]) : null;
2971
2973
  }
2972
- function wr(t) {
2974
+ function Sr(t) {
2973
2975
  const e = [], i = (n, o, h, l, f) => {
2974
- e.push({ severity: n, element: br(o), ...f ? { attribute: f } : {}, message: h, fix: l });
2976
+ e.push({ severity: n, element: wr(o), ...f ? { attribute: f } : {}, message: h, fix: l });
2975
2977
  }, s = [...t.querySelectorAll("om-cartograph")];
2976
2978
  if (s.length === 0 && t.tagName?.toLowerCase() === "om-cartograph" && s.push(t), s.length === 0)
2977
2979
  return { valid: !0, errors: [], warnings: [] };
@@ -2981,15 +2983,15 @@ function wr(t) {
2981
2983
  }
2982
2984
  function ro(t, e) {
2983
2985
  const i = t.getAttribute("size"), s = At(t, "width") != null && At(t, "height") != null;
2984
- i && !Hi.includes(i) && !s && e(
2986
+ i && !Ki.includes(i) && !s && e(
2985
2987
  "error",
2986
2988
  t,
2987
2989
  `Unknown page size "${i}" and no width/height to fall back on.`,
2988
- `Use one of ${Hi.join(", ")}, or give width= and height= in millimetres.`,
2990
+ `Use one of ${Ki.join(", ")}, or give width= and height= in millimetres.`,
2989
2991
  "size"
2990
2992
  );
2991
2993
  const r = t.getAttribute("cvd");
2992
- r && r.trim().toLowerCase() !== "none" && !pi(r) && e("warning", t, `Unknown cvd="${r}" — no simulation applied.`, `Use one of ${oa.join(", ")}.`, "cvd"), t.hasAttribute("crop-marks") && eo(t) <= 0 && e("warning", t, "crop-marks needs bleed to draw into — trim marks sit outside the page box.", 'Add bleed="3" (mm), or drop crop-marks.', "crop-marks");
2994
+ r && r.trim().toLowerCase() !== "none" && !pi(r) && e("warning", t, `Unknown cvd="${r}" — no simulation applied.`, `Use one of ${ha.join(", ")}.`, "cvd"), t.hasAttribute("crop-marks") && eo(t) <= 0 && e("warning", t, "crop-marks needs bleed to draw into — trim marks sit outside the page box.", 'Add bleed="3" (mm), or drop crop-marks.', "crop-marks");
2993
2995
  const a = At(t, "safe-zone");
2994
2996
  if (a != null && a > 0) {
2995
2997
  const m = Se(t.getAttribute("size"), t.getAttribute("width"), t.getAttribute("height"), t.getAttribute("orientation"));
@@ -3026,7 +3028,7 @@ function ro(t, e) {
3026
3028
  v.box.w <= 0 || v.box.h <= 0 || g.box.w <= 0 || g.box.h <= 0 || io(v.box, g.box) && e(
3027
3029
  "warning",
3028
3030
  v.el,
3029
- `Overlaps ${br(g.el)} on the page.`,
3031
+ `Overlaps ${wr(g.el)} on the page.`,
3030
3032
  "Move one of them — furniture overlapping furniture usually means a stale layout (frames may sit under anything)."
3031
3033
  );
3032
3034
  }
@@ -3215,9 +3217,9 @@ function lo(t, e, i) {
3215
3217
  'Write the rows as <om-legend-row color= label= shape=> children and set derived="false".',
3216
3218
  "derived"
3217
3219
  );
3218
- const a = Mr(t);
3220
+ const a = yr(t);
3219
3221
  if (a.length < 2) return;
3220
- const n = ca(a.map((o) => ({ label: o.label, color: o.color, layer: o.layerId })));
3222
+ const n = ua(a.map((o) => ({ label: o.label, color: o.color, layer: o.layerId })));
3221
3223
  if (n.collapses.length > 0 && n.worstType) {
3222
3224
  const o = n.collapses.filter((l) => l.type === n.worstType), h = o.slice(0, 3).map((l) => `"${l.a.label}"/"${l.b.label}"`).join(", ");
3223
3225
  i(
@@ -3272,7 +3274,7 @@ function uo(t, e, i) {
3272
3274
  if (!r) return;
3273
3275
  const a = It(r.getAttribute("corners")), n = Ct(r.getAttribute("crs")), o = $(r);
3274
3276
  if (!a || !n || o.w <= 0 || o.h <= 0) return;
3275
- const h = zt({ corners: a, widthMm: o.w, heightMm: o.h, crsForward: n }), l = $(t), f = tr({
3277
+ const h = zt({ corners: a, widthMm: o.w, heightMm: o.h, crsForward: n }), l = $(t), f = er({
3276
3278
  groundMetersPerMm: h.groundMetersPerMm(),
3277
3279
  maxWidthMm: l.w,
3278
3280
  segments: At(t, "segments") ?? void 0,
@@ -3308,12 +3310,12 @@ function fo(t, e, i) {
3308
3310
  }
3309
3311
  }
3310
3312
  function Iu(t) {
3311
- return wr(pa(t));
3313
+ return Sr(_a(t));
3312
3314
  }
3313
3315
  async function Tu(t) {
3314
- const e = wr(t), i = [...t.querySelectorAll("om-frame")].filter((o) => o.querySelector(":scope > om-map"));
3316
+ const e = Sr(t), i = [...t.querySelectorAll("om-frame")].filter((o) => o.querySelector(":scope > om-map"));
3315
3317
  if (i.length === 0) return e;
3316
- const { loadCore: s } = await Promise.resolve().then(() => sa), r = await s(), a = [...e.errors], n = [...e.warnings];
3318
+ const { loadCore: s } = await Promise.resolve().then(() => ra), r = await s(), a = [...e.errors], n = [...e.warnings];
3317
3319
  for (const o of i) {
3318
3320
  const h = o.id ? `om-frame#${o.id}` : "om-frame", l = r.validateManifest(o);
3319
3321
  for (const f of l.errors) a.push({ ...f, element: `${h} > ${f.element}` });
@@ -3322,13 +3324,13 @@ async function Tu(t) {
3322
3324
  return { valid: a.length === 0, errors: a, warnings: n };
3323
3325
  }
3324
3326
  function Ru() {
3325
- O("om-cartograph", or), O("om-text", hr), O("om-frame", fr), O("om-scalebar", mr), O("om-north", dr), O("om-shape", gr), O("om-image", vr), O("om-legend", yr), O("om-graticule", pr), O("om-atlas", _r), O("om-source", Vn);
3327
+ O("om-cartograph", hr), O("om-text", lr), O("om-frame", mr), O("om-scalebar", dr), O("om-north", gr), O("om-shape", vr), O("om-image", Mr), O("om-legend", pr), O("om-graticule", _r), O("om-atlas", br), O("om-source", Vn);
3326
3328
  }
3327
- js(() => import(/* webpackIgnore: true */ /* @vite-ignore */
3329
+ zs(() => import(/* webpackIgnore: true */ /* @vite-ignore */
3328
3330
  new URL("./onlymap.standalone.js", import.meta.url).href
3329
3331
  ));
3330
- ya();
3331
- const _s = [
3332
+ pa();
3333
+ const bs = [
3332
3334
  [33, 129.5],
3333
3335
  [33, 131],
3334
3336
  [36, 132.166666666667],
@@ -3348,7 +3350,7 @@ const _s = [
3348
3350
  [26, 131],
3349
3351
  [20, 136],
3350
3352
  [26, 154]
3351
- ], Sr = {
3353
+ ], Er = {
3352
3354
  // Netherlands — Amersfoort / RD New (3DBAG).
3353
3355
  28992: {
3354
3356
  def: "+proj=sterea +lat_0=52.1561605555556 +lon_0=5.38763888888889 +k=0.9999079 +x_0=155000 +y_0=463000 +ellps=bessel +towgs84=565.4171,50.3319,465.5524,-0.398957,0.343988,-1.8774,4.0725 +units=m +no_defs"
@@ -3412,16 +3414,16 @@ const _s = [
3412
3414
  4326: { def: "+proj=longlat +datum=WGS84 +no_defs", geographic: !0 },
3413
3415
  3857: { def: "+proj=merc +a=6378137 +b=6378137 +lat_ts=0 +lon_0=0 +x_0=0 +y_0=0 +k=1 +units=m +nadgrids=@null +no_defs" }
3414
3416
  };
3415
- for (let t = 0; t < _s.length; t++) {
3416
- const [e, i] = _s[t];
3417
- Sr[6669 + t] = {
3417
+ for (let t = 0; t < bs.length; t++) {
3418
+ const [e, i] = bs[t];
3419
+ Er[6669 + t] = {
3418
3420
  def: `+proj=tmerc +lat_0=${e} +lon_0=${i} +k=0.9999 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs`,
3419
3421
  swapXY: !0
3420
3422
  };
3421
3423
  }
3422
3424
  const mo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3423
3425
  __proto__: null,
3424
- CRS_DEFS: Sr
3426
+ CRS_DEFS: Er
3425
3427
  }, Symbol.toStringTag, { value: "Module" }));
3426
3428
  function go(t) {
3427
3429
  t("EPSG:4326", "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"), t("EPSG:4269", "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"), t("EPSG:3857", "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs");
@@ -3429,7 +3431,7 @@ function go(t) {
3429
3431
  t("EPSG:" + (32600 + e), "+proj=utm +zone=" + e + " +datum=WGS84 +units=m"), t("EPSG:" + (32700 + e), "+proj=utm +zone=" + e + " +south +datum=WGS84 +units=m");
3430
3432
  t("EPSG:5041", "+title=WGS 84 / UPS North (E,N) +proj=stere +lat_0=90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"), t("EPSG:5042", "+title=WGS 84 / UPS South (E,N) +proj=stere +lat_0=-90 +lon_0=0 +k=0.994 +x_0=2000000 +y_0=2000000 +datum=WGS84 +units=m"), t.WGS84 = t["EPSG:4326"], t["EPSG:3785"] = t["EPSG:3857"], t.GOOGLE = t["EPSG:3857"], t["EPSG:900913"] = t["EPSG:3857"], t["EPSG:102113"] = t["EPSG:3857"];
3431
3433
  }
3432
- var pt = 1, _t = 2, Tt = 3, vo = 4, fi = 5, bs = 6378137, Mo = 6356752314e-3, ws = 0.0066943799901413165, Bt = 484813681109536e-20, y = Math.PI / 2, yo = 0.16666666666666666, po = 0.04722222222222222, _o = 0.022156084656084655, b = 1e-10, L = 0.017453292519943295, H = 57.29577951308232, N = Math.PI / 4, Qt = Math.PI * 2, F = 3.14159265359, K = {};
3434
+ var pt = 1, _t = 2, Tt = 3, vo = 4, fi = 5, ws = 6378137, Mo = 6356752314e-3, Ss = 0.0066943799901413165, Bt = 484813681109536e-20, y = Math.PI / 2, yo = 0.16666666666666666, po = 0.04722222222222222, _o = 0.022156084656084655, b = 1e-10, L = 0.017453292519943295, H = 57.29577951308232, N = Math.PI / 4, Qt = Math.PI * 2, F = 3.14159265359, K = {};
3433
3435
  K.greenwich = 0;
3434
3436
  K.lisbon = -9.131906111111;
3435
3437
  K.paris = 2.337229166667;
@@ -3465,12 +3467,12 @@ const bo = {
3465
3467
  "us-in": { to_meter: 0.025400050800101 },
3466
3468
  "us-yd": { to_meter: 0.914401828803658 }
3467
3469
  };
3468
- var Ss = /[\s_\-\/\(\)]/g;
3470
+ var Es = /[\s_\-\/\(\)]/g;
3469
3471
  function ft(t, e) {
3470
3472
  if (t[e])
3471
3473
  return t[e];
3472
- for (var i = Object.keys(t), s = e.toLowerCase().replace(Ss, ""), r = -1, a, n; ++r < i.length; )
3473
- if (a = i[r], n = a.toLowerCase().replace(Ss, ""), n === s)
3474
+ for (var i = Object.keys(t), s = e.toLowerCase().replace(Es, ""), r = -1, a, n; ++r < i.length; )
3475
+ if (a = i[r], n = a.toLowerCase().replace(Es, ""), n === s)
3474
3476
  return t[a];
3475
3477
  }
3476
3478
  function mi(t) {
@@ -3585,7 +3587,7 @@ function mi(t) {
3585
3587
  r = i[s], s in n ? (a = n[s], typeof a == "function" ? a(r) : e[a] = r) : e[s] = r;
3586
3588
  return typeof e.datumCode == "string" && e.datumCode !== "WGS84" && (e.datumCode = e.datumCode.toLowerCase()), e.projStr = t, e;
3587
3589
  }
3588
- class Er {
3590
+ class Ar {
3589
3591
  static getId(e) {
3590
3592
  const i = e.find((s) => Array.isArray(s) && s[0] === "ID");
3591
3593
  return i && i.length >= 3 ? {
@@ -3755,12 +3757,12 @@ class Er {
3755
3757
  return i;
3756
3758
  }
3757
3759
  }
3758
- class wo extends Er {
3760
+ class wo extends Ar {
3759
3761
  static convert(e, i = {}) {
3760
3762
  return super.convert(e, i), i.coordinate_system && i.coordinate_system.subtype === "Cartesian" && delete i.coordinate_system, i.usage && delete i.usage, i;
3761
3763
  }
3762
3764
  }
3763
- class So extends Er {
3765
+ class So extends Ar {
3764
3766
  static convert(e, i = {}) {
3765
3767
  super.convert(e, i);
3766
3768
  const s = e.find((a) => Array.isArray(a) && a[0] === "CS");
@@ -3786,7 +3788,7 @@ function xo(t) {
3786
3788
  const e = t.toUpperCase();
3787
3789
  return e.includes("PROJCRS") || e.includes("GEOGCRS") || e.includes("BOUNDCRS") || e.includes("VERTCRS") || e.includes("LENGTHUNIT") || e.includes("ANGLEUNIT") || e.includes("SCALEUNIT") ? "WKT2" : (e.includes("PROJCS") || e.includes("GEOGCS") || e.includes("LOCAL_CS") || e.includes("VERT_CS") || e.includes("UNIT"), "WKT1");
3788
3790
  }
3789
- var Jt = 1, Ar = 2, xr = 3, Ee = 4, Pr = 5, xi = -1, Po = /\s/, Go = /[A-Za-z]/, No = /[A-Za-z84_]/, ke = /[,\]]/, Gr = /[\d\.E\-\+]/;
3791
+ var Jt = 1, xr = 2, Pr = 3, Ee = 4, Gr = 5, xi = -1, Po = /\s/, Go = /[A-Za-z]/, No = /[A-Za-z84_]/, ke = /[,\]]/, Nr = /[\d\.E\-\+]/;
3790
3792
  function ot(t) {
3791
3793
  if (typeof t != "string")
3792
3794
  throw new Error("not a string");
@@ -3803,13 +3805,13 @@ ot.prototype.readCharicter = function() {
3803
3805
  switch (this.state) {
3804
3806
  case Jt:
3805
3807
  return this.neutral(t);
3806
- case Ar:
3808
+ case xr:
3807
3809
  return this.keyword(t);
3808
3810
  case Ee:
3809
3811
  return this.quoted(t);
3810
- case Pr:
3812
+ case Gr:
3811
3813
  return this.afterquote(t);
3812
- case xr:
3814
+ case Pr:
3813
3815
  return this.number(t);
3814
3816
  case xi:
3815
3817
  return;
@@ -3837,7 +3839,7 @@ ot.prototype.afterItem = function(t) {
3837
3839
  }
3838
3840
  };
3839
3841
  ot.prototype.number = function(t) {
3840
- if (Gr.test(t)) {
3842
+ if (Nr.test(t)) {
3841
3843
  this.word += t;
3842
3844
  return;
3843
3845
  }
@@ -3849,7 +3851,7 @@ ot.prototype.number = function(t) {
3849
3851
  };
3850
3852
  ot.prototype.quoted = function(t) {
3851
3853
  if (t === '"') {
3852
- this.state = Pr;
3854
+ this.state = Gr;
3853
3855
  return;
3854
3856
  }
3855
3857
  this.word += t;
@@ -3872,15 +3874,15 @@ ot.prototype.keyword = function(t) {
3872
3874
  };
3873
3875
  ot.prototype.neutral = function(t) {
3874
3876
  if (Go.test(t)) {
3875
- this.word = t, this.state = Ar;
3877
+ this.word = t, this.state = xr;
3876
3878
  return;
3877
3879
  }
3878
3880
  if (t === '"') {
3879
3881
  this.word = "", this.state = Ee;
3880
3882
  return;
3881
3883
  }
3882
- if (Gr.test(t)) {
3883
- this.word = t, this.state = xr;
3884
+ if (Nr.test(t)) {
3885
+ this.word = t, this.state = Pr;
3884
3886
  return;
3885
3887
  }
3886
3888
  if (ke.test(t)) {
@@ -3990,19 +3992,19 @@ var Io = 0.017453292519943295;
3990
3992
  function Q(t) {
3991
3993
  return t * Io;
3992
3994
  }
3993
- function Nr(t) {
3995
+ function Cr(t) {
3994
3996
  const e = (t.projName || "").toLowerCase().replace(/_/g, " ");
3995
3997
  t.long0 === void 0 && t.longc !== void 0 && (t.long0 = t.longc), !t.lat_ts && t.lat1 && (e === "stereographic south pole" || e === "polar stereographic (variant b)") ? (t.lat0 = Q(t.lat1 > 0 ? 90 : -90), t.lat_ts = t.lat1, delete t.lat1) : !t.lat_ts && t.lat0 && (e === "polar stereographic" || e === "polar stereographic (variant a)") && (t.lat_ts = t.lat0, t.lat0 = Q(t.lat0 > 0 ? 90 : -90), delete t.lat1);
3996
3998
  }
3997
- function Es(t) {
3999
+ function As(t) {
3998
4000
  let e = { units: null, to_meter: void 0 };
3999
4001
  return typeof t == "string" ? (e.units = t.toLowerCase(), e.units === "metre" && (e.units = "meter"), e.units === "meter" && (e.to_meter = 1)) : t && t.name && (e.units = t.name.toLowerCase(), e.units === "metre" && (e.units = "meter"), e.to_meter = t.conversion_factor), e;
4000
4002
  }
4001
- function As(t) {
4003
+ function xs(t) {
4002
4004
  return typeof t == "object" ? t.value * t.unit.conversion_factor : t;
4003
4005
  }
4004
- function xs(t, e) {
4005
- t.ellipsoid.radius ? (e.a = t.ellipsoid.radius, e.rf = 0) : (e.a = As(t.ellipsoid.semi_major_axis), t.ellipsoid.inverse_flattening !== void 0 ? e.rf = t.ellipsoid.inverse_flattening : t.ellipsoid.semi_major_axis !== void 0 && t.ellipsoid.semi_minor_axis !== void 0 && (e.rf = e.a / (e.a - As(t.ellipsoid.semi_minor_axis))));
4006
+ function Ps(t, e) {
4007
+ t.ellipsoid.radius ? (e.a = t.ellipsoid.radius, e.rf = 0) : (e.a = xs(t.ellipsoid.semi_major_axis), t.ellipsoid.inverse_flattening !== void 0 ? e.rf = t.ellipsoid.inverse_flattening : t.ellipsoid.semi_major_axis !== void 0 && t.ellipsoid.semi_minor_axis !== void 0 && (e.rf = e.a / (e.a - xs(t.ellipsoid.semi_minor_axis))));
4006
4008
  }
4007
4009
  function Ae(t, e = {}) {
4008
4010
  return !t || typeof t != "object" ? t : t.type === "BoundCRS" ? (Ae(t.source_crs, e), t.transformation && (t.transformation.method && t.transformation.method.name === "NTv2" ? e.nadgrids = t.transformation.parameters[0].value : e.datum_params = t.transformation.parameters.map((i) => i.value)), e) : (Object.keys(t).forEach((i) => {
@@ -4019,10 +4021,10 @@ function Ae(t, e = {}) {
4019
4021
  break;
4020
4022
  case "datum":
4021
4023
  case "datum_ensemble":
4022
- s.ellipsoid && (e.ellps = s.ellipsoid.name, xs(s, e)), s.prime_meridian && (e.from_greenwich = s.prime_meridian.longitude * Math.PI / 180);
4024
+ s.ellipsoid && (e.ellps = s.ellipsoid.name, Ps(s, e)), s.prime_meridian && (e.from_greenwich = s.prime_meridian.longitude * Math.PI / 180);
4023
4025
  break;
4024
4026
  case "ellipsoid":
4025
- e.ellps = s.name, xs(s, e);
4027
+ e.ellps = s.name, Ps(s, e);
4026
4028
  break;
4027
4029
  case "prime_meridian":
4028
4030
  e.long0 = (s.longitude || 0) * Math.PI / 180;
@@ -4041,10 +4043,10 @@ function Ae(t, e = {}) {
4041
4043
  geocentricz: "u"
4042
4044
  }, a = s.axis.map((n) => r[n.direction.toLowerCase()]);
4043
4045
  if (a.every(Boolean) && (e.axis = a.join(""), e.axis.length === 2 && (e.axis += "u")), s.unit) {
4044
- const { units: n, to_meter: o } = Es(s.unit);
4046
+ const { units: n, to_meter: o } = As(s.unit);
4045
4047
  e.units = n, e.to_meter = o;
4046
4048
  } else if (s.axis[0] && s.axis[0].unit) {
4047
- const { units: n, to_meter: o } = Es(s.axis[0].unit);
4049
+ const { units: n, to_meter: o } = As(s.axis[0].unit);
4048
4050
  e.units = n, e.to_meter = o;
4049
4051
  }
4050
4052
  }
@@ -4065,7 +4067,7 @@ function Ae(t, e = {}) {
4065
4067
  Ae(s, e), e.datumCode = s.id ? s.id.authority + "_" + s.id.code : s.name;
4066
4068
  break;
4067
4069
  }
4068
- }), e.latitude_of_false_origin !== void 0 && (e.lat0 = e.latitude_of_false_origin), e.longitude_of_false_origin !== void 0 && (e.long0 = e.longitude_of_false_origin), e.latitude_of_standard_parallel !== void 0 && (e.lat0 = e.latitude_of_standard_parallel, e.lat1 = e.latitude_of_standard_parallel), e.latitude_of_1st_standard_parallel !== void 0 && (e.lat1 = e.latitude_of_1st_standard_parallel), e.latitude_of_2nd_standard_parallel !== void 0 && (e.lat2 = e.latitude_of_2nd_standard_parallel), e.latitude_of_projection_centre !== void 0 && (e.lat0 = e.latitude_of_projection_centre), e.longitude_of_projection_centre !== void 0 && (e.longc = e.longitude_of_projection_centre), e.easting_at_false_origin !== void 0 && (e.x0 = e.easting_at_false_origin), e.northing_at_false_origin !== void 0 && (e.y0 = e.northing_at_false_origin), e.latitude_of_natural_origin !== void 0 && (e.lat0 = e.latitude_of_natural_origin), e.longitude_of_natural_origin !== void 0 && (e.long0 = e.longitude_of_natural_origin), e.longitude_of_origin !== void 0 && (e.long0 = e.longitude_of_origin), e.false_easting !== void 0 && (e.x0 = e.false_easting), e.easting_at_projection_centre && (e.x0 = e.easting_at_projection_centre), e.false_northing !== void 0 && (e.y0 = e.false_northing), e.northing_at_projection_centre && (e.y0 = e.northing_at_projection_centre), e.standard_parallel_1 !== void 0 && (e.lat1 = e.standard_parallel_1), e.standard_parallel_2 !== void 0 && (e.lat2 = e.standard_parallel_2), e.scale_factor_at_natural_origin !== void 0 && (e.k0 = e.scale_factor_at_natural_origin), e.scale_factor_at_projection_centre !== void 0 && (e.k0 = e.scale_factor_at_projection_centre), e.scale_factor_on_pseudo_standard_parallel !== void 0 && (e.k0 = e.scale_factor_on_pseudo_standard_parallel), e.azimuth !== void 0 && (e.alpha = e.azimuth), e.azimuth_at_projection_centre !== void 0 && (e.alpha = e.azimuth_at_projection_centre), e.angle_from_rectified_to_skew_grid && (e.rectified_grid_angle = e.angle_from_rectified_to_skew_grid), Nr(e), e);
4070
+ }), e.latitude_of_false_origin !== void 0 && (e.lat0 = e.latitude_of_false_origin), e.longitude_of_false_origin !== void 0 && (e.long0 = e.longitude_of_false_origin), e.latitude_of_standard_parallel !== void 0 && (e.lat0 = e.latitude_of_standard_parallel, e.lat1 = e.latitude_of_standard_parallel), e.latitude_of_1st_standard_parallel !== void 0 && (e.lat1 = e.latitude_of_1st_standard_parallel), e.latitude_of_2nd_standard_parallel !== void 0 && (e.lat2 = e.latitude_of_2nd_standard_parallel), e.latitude_of_projection_centre !== void 0 && (e.lat0 = e.latitude_of_projection_centre), e.longitude_of_projection_centre !== void 0 && (e.longc = e.longitude_of_projection_centre), e.easting_at_false_origin !== void 0 && (e.x0 = e.easting_at_false_origin), e.northing_at_false_origin !== void 0 && (e.y0 = e.northing_at_false_origin), e.latitude_of_natural_origin !== void 0 && (e.lat0 = e.latitude_of_natural_origin), e.longitude_of_natural_origin !== void 0 && (e.long0 = e.longitude_of_natural_origin), e.longitude_of_origin !== void 0 && (e.long0 = e.longitude_of_origin), e.false_easting !== void 0 && (e.x0 = e.false_easting), e.easting_at_projection_centre && (e.x0 = e.easting_at_projection_centre), e.false_northing !== void 0 && (e.y0 = e.false_northing), e.northing_at_projection_centre && (e.y0 = e.northing_at_projection_centre), e.standard_parallel_1 !== void 0 && (e.lat1 = e.standard_parallel_1), e.standard_parallel_2 !== void 0 && (e.lat2 = e.standard_parallel_2), e.scale_factor_at_natural_origin !== void 0 && (e.k0 = e.scale_factor_at_natural_origin), e.scale_factor_at_projection_centre !== void 0 && (e.k0 = e.scale_factor_at_projection_centre), e.scale_factor_on_pseudo_standard_parallel !== void 0 && (e.k0 = e.scale_factor_on_pseudo_standard_parallel), e.azimuth !== void 0 && (e.alpha = e.azimuth), e.azimuth_at_projection_centre !== void 0 && (e.alpha = e.azimuth_at_projection_centre), e.angle_from_rectified_to_skew_grid && (e.rectified_grid_angle = e.angle_from_rectified_to_skew_grid), Cr(e), e);
4069
4071
  }
4070
4072
  var To = [
4071
4073
  "PROJECTEDCRS",
@@ -4084,10 +4086,10 @@ function Ro(t, e) {
4084
4086
  var i = e[0], s = e[1];
4085
4087
  !(i in t) && s in t && (t[i] = t[s], e.length === 3 && (t[i] = e[2](t[i])));
4086
4088
  }
4087
- function Cr(t) {
4089
+ function Ir(t) {
4088
4090
  for (var e = Object.keys(t), i = 0, s = e.length; i < s; ++i) {
4089
4091
  var r = e[i];
4090
- To.indexOf(r) !== -1 && ko(t[r]), typeof t[r] == "object" && Cr(t[r]);
4092
+ To.indexOf(r) !== -1 && ko(t[r]), typeof t[r] == "object" && Ir(t[r]);
4091
4093
  }
4092
4094
  }
4093
4095
  function ko(t) {
@@ -4148,7 +4150,7 @@ function ko(t) {
4148
4150
  ["alpha", "azimuth", Q],
4149
4151
  ["srsCode", "name"]
4150
4152
  ];
4151
- l.forEach(h), Nr(t);
4153
+ l.forEach(h), Cr(t);
4152
4154
  }
4153
4155
  function xe(t) {
4154
4156
  if (typeof t == "object")
@@ -4160,7 +4162,7 @@ function xe(t) {
4160
4162
  return Ae(a);
4161
4163
  }
4162
4164
  var s = i[0], r = {};
4163
- return xt(i, r), Cr(r), r[s];
4165
+ return xt(i, r), Ir(r), r[s];
4164
4166
  }
4165
4167
  function D(t) {
4166
4168
  var e = this;
@@ -4204,14 +4206,14 @@ function Lo(t) {
4204
4206
  function Oo(t) {
4205
4207
  return t.indexOf("+") !== 0 && t.indexOf("[") !== -1 || typeof t == "object" && !("srsCode" in t);
4206
4208
  }
4207
- var Ps = ["3857", "900913", "3785", "102113"];
4209
+ var Gs = ["3857", "900913", "3785", "102113"];
4208
4210
  function Fo(t) {
4209
4211
  if (t.title)
4210
- return t.title.toLowerCase().indexOf("epsg:") === 0 && Ps.indexOf(t.title.substr(5)) > -1;
4212
+ return t.title.toLowerCase().indexOf("epsg:") === 0 && Gs.indexOf(t.title.substr(5)) > -1;
4211
4213
  var e = ft(t, "authority");
4212
4214
  if (e) {
4213
4215
  var i = ft(e, "epsg");
4214
- return i && Ps.indexOf(i) > -1;
4216
+ return i && Gs.indexOf(i) > -1;
4215
4217
  }
4216
4218
  }
4217
4219
  function Uo(t) {
@@ -4235,7 +4237,7 @@ function Do(t) {
4235
4237
  else "projName" in t ? e = t : e = xe(t);
4236
4238
  return e && Fo(e) ? D["EPSG:3857"] : e;
4237
4239
  }
4238
- function Gs(t, e) {
4240
+ function Ns(t, e) {
4239
4241
  t = t || {};
4240
4242
  var i, s;
4241
4243
  if (!e)
@@ -4303,42 +4305,42 @@ const Ho = {
4303
4305
  };
4304
4306
  function Ko() {
4305
4307
  }
4306
- function Ns(t) {
4308
+ function Cs(t) {
4307
4309
  return t;
4308
4310
  }
4309
- var Ir = ["longlat", "identity"];
4311
+ var Tr = ["longlat", "identity"];
4310
4312
  const Vo = {
4311
4313
  init: Ko,
4312
- forward: Ns,
4313
- inverse: Ns,
4314
- names: Ir
4314
+ forward: Cs,
4315
+ inverse: Cs,
4316
+ names: Tr
4315
4317
  };
4316
4318
  var Xo = [Ho, Vo], gt = {}, Pt = [];
4317
- function Tr(t, e) {
4319
+ function Rr(t, e) {
4318
4320
  var i = Pt.length;
4319
4321
  return t.names ? (Pt[i] = t, t.names.forEach(function(s) {
4320
4322
  gt[s.toLowerCase()] = i;
4321
4323
  }), this) : (console.log(e), !0);
4322
4324
  }
4323
- function Rr(t) {
4325
+ function kr(t) {
4324
4326
  return t.replace(/[-\(\)\s]+/g, " ").trim().replace(/ /g, "_");
4325
4327
  }
4326
4328
  function Qo(t) {
4327
4329
  if (!t)
4328
4330
  return !1;
4329
4331
  var e = t.toLowerCase();
4330
- if (typeof gt[e] < "u" && Pt[gt[e]] || (e = Rr(e), e in gt && Pt[gt[e]]))
4332
+ if (typeof gt[e] < "u" && Pt[gt[e]] || (e = kr(e), e in gt && Pt[gt[e]]))
4331
4333
  return Pt[gt[e]];
4332
4334
  }
4333
4335
  function Jo() {
4334
- Xo.forEach(Tr);
4336
+ Xo.forEach(Rr);
4335
4337
  }
4336
4338
  const Yo = {
4337
4339
  start: Jo,
4338
- add: Tr,
4340
+ add: Rr,
4339
4341
  get: Qo
4340
4342
  };
4341
- var kr = {
4343
+ var $r = {
4342
4344
  MERIT: {
4343
4345
  a: 6378137,
4344
4346
  rf: 298.257,
@@ -4561,7 +4563,7 @@ var kr = {
4561
4563
  ellipseName: "Normal Sphere (r=6370997)"
4562
4564
  }
4563
4565
  };
4564
- const Zo = kr.WGS84;
4566
+ const Zo = $r.WGS84;
4565
4567
  function th(t, e, i, s) {
4566
4568
  var r = t * t, a = e * e, n = (r - a) / r, o = 0;
4567
4569
  s ? (t *= 1 - n * (yo + n * (po + n * _o)), r = t * t, n = 0) : o = Math.sqrt(n);
@@ -4574,7 +4576,7 @@ function th(t, e, i, s) {
4574
4576
  }
4575
4577
  function eh(t, e, i, s, r) {
4576
4578
  if (!t) {
4577
- var a = ft(kr, s);
4579
+ var a = ft($r, s);
4578
4580
  a || (a = Zo), t = a.a, e = a.b, i = a.rf;
4579
4581
  }
4580
4582
  return i && !e && (e = (1 - 1 / i) * t), (i === 0 || Math.abs(t - e) < b) && (r = !0, e = t), {
@@ -5956,10 +5958,10 @@ function ah(t, e, i) {
5956
5958
  }
5957
5959
  async function nh(t, e) {
5958
5960
  for (var i = [], s = await e.getImageCount(), r = s - 1; r >= 0; r--) {
5959
- var a = await e.getImage(r), n = await a.readRasters(), o = n, h = [a.getWidth(), a.getHeight()], l = a.getBoundingBox().map(Cs), f = typeof a.fileDirectory.getValue == "function" ? a.fileDirectory.getValue("ModelPixelScale") : (
5961
+ var a = await e.getImage(r), n = await a.readRasters(), o = n, h = [a.getWidth(), a.getHeight()], l = a.getBoundingBox().map(Is), f = typeof a.fileDirectory.getValue == "function" ? a.fileDirectory.getValue("ModelPixelScale") : (
5960
5962
  /** @type {any} */
5961
5963
  a.fileDirectory.ModelPixelScale
5962
- ), u = [f[0], f[1]].map(Cs), c = l[0] + (h[0] - 1) * u[0], m = l[3] - (h[1] - 1) * u[1], d = o[0], v = o[1], g = [];
5964
+ ), u = [f[0], f[1]].map(Is), c = l[0] + (h[0] - 1) * u[0], m = l[3] - (h[1] - 1) * u[1], d = o[0], v = o[1], g = [];
5963
5965
  for (let p = h[1] - 1; p >= 0; p--)
5964
5966
  for (let S = h[0] - 1; S >= 0; S--) {
5965
5967
  var M = p * h[0] + S;
@@ -5997,7 +5999,7 @@ function hh(t) {
5997
5999
  isNull: !1
5998
6000
  };
5999
6001
  }
6000
- function Cs(t) {
6002
+ function Is(t) {
6001
6003
  return t * Math.PI / 180;
6002
6004
  }
6003
6005
  function ut(t) {
@@ -6102,14 +6104,14 @@ function Y(t, e) {
6102
6104
  n.ep2,
6103
6105
  o
6104
6106
  );
6105
- Gs(this, i), Gs(this, s), this.a = a.a, this.b = a.b, this.rf = a.rf, this.sphere = a.sphere, this.es = n.es, this.e = n.e, this.ep2 = n.ep2, this.datum = h, "init" in this && typeof this.init == "function" && this.init(), e(null, this);
6107
+ Ns(this, i), Ns(this, s), this.a = a.a, this.b = a.b, this.rf = a.rf, this.sphere = a.sphere, this.es = n.es, this.e = n.e, this.ep2 = n.ep2, this.datum = h, "init" in this && typeof this.init == "function" && this.init(), e(null, this);
6106
6108
  }
6107
6109
  Y.projections = Yo;
6108
6110
  Y.projections.start();
6109
6111
  function gh(t, e) {
6110
6112
  return t.datum_type !== e.datum_type || t.a !== e.a || Math.abs(t.es - e.es) > 5e-11 ? !1 : t.datum_type === pt ? t.datum_params[0] === e.datum_params[0] && t.datum_params[1] === e.datum_params[1] && t.datum_params[2] === e.datum_params[2] : t.datum_type === _t ? t.datum_params[0] === e.datum_params[0] && t.datum_params[1] === e.datum_params[1] && t.datum_params[2] === e.datum_params[2] && t.datum_params[3] === e.datum_params[3] && t.datum_params[4] === e.datum_params[4] && t.datum_params[5] === e.datum_params[5] && t.datum_params[6] === e.datum_params[6] : !0;
6111
6113
  }
6112
- function $r(t, e, i) {
6114
+ function Lr(t, e, i) {
6113
6115
  var s = t.x, r = t.y, a = t.z ? t.z : 0, n, o, h, l;
6114
6116
  if (r < -y && r > -1.001 * y)
6115
6117
  r = -y;
@@ -6127,7 +6129,7 @@ function $r(t, e, i) {
6127
6129
  z: (n * (1 - e) + a) * o
6128
6130
  };
6129
6131
  }
6130
- function Lr(t, e, i, s) {
6132
+ function Or(t, e, i, s) {
6131
6133
  var r = 1e-12, a = r * r, n = 30, o, h, l, f, u, c, m, d, v, g, M, _, p, S = t.x, E = t.y, A = t.z ? t.z : 0, G, T, P;
6132
6134
  if (o = Math.sqrt(S * S + E * E), h = Math.sqrt(S * S + E * E + A * A), o / i < r) {
6133
6135
  if (G = 0, h / i < r)
@@ -6188,22 +6190,22 @@ function yh(t, e, i) {
6188
6190
  return i;
6189
6191
  var s = t.a, r = t.es;
6190
6192
  if (t.datum_type === Tt) {
6191
- var a = Is(t, !1, i);
6193
+ var a = Ts(t, !1, i);
6192
6194
  if (a !== 0)
6193
6195
  return;
6194
- s = bs, r = ws;
6196
+ s = ws, r = Ss;
6195
6197
  }
6196
6198
  var n = e.a, o = e.b, h = e.es;
6197
- if (e.datum_type === Tt && (n = bs, o = Mo, h = ws), r === h && s === n && !de(t.datum_type) && !de(e.datum_type))
6199
+ if (e.datum_type === Tt && (n = ws, o = Mo, h = Ss), r === h && s === n && !de(t.datum_type) && !de(e.datum_type))
6198
6200
  return i;
6199
- if (i = $r(i, r, s), de(t.datum_type) && (i = vh(i, t.datum_type, t.datum_params)), de(e.datum_type) && (i = Mh(i, e.datum_type, e.datum_params)), i = Lr(i, h, n, o), e.datum_type === Tt) {
6200
- var l = Is(e, !0, i);
6201
+ if (i = Lr(i, r, s), de(t.datum_type) && (i = vh(i, t.datum_type, t.datum_params)), de(e.datum_type) && (i = Mh(i, e.datum_type, e.datum_params)), i = Or(i, h, n, o), e.datum_type === Tt) {
6202
+ var l = Ts(e, !0, i);
6201
6203
  if (l !== 0)
6202
6204
  return;
6203
6205
  }
6204
6206
  return i;
6205
6207
  }
6206
- function Is(t, e, i) {
6208
+ function Ts(t, e, i) {
6207
6209
  if (t.grids === null || t.grids.length === 0)
6208
6210
  return console.log("Grid shift grids not found"), -1;
6209
6211
  var s = { x: -i.x, y: i.y }, r = { x: Number.NaN, y: Number.NaN }, a = [];
@@ -6233,14 +6235,14 @@ function ph(t, e, i) {
6233
6235
  return s;
6234
6236
  var r = { x: t.x, y: t.y };
6235
6237
  r.x -= i.ll[0], r.y -= i.ll[1], r.x = w(r.x - Math.PI) + Math.PI;
6236
- var a = Ts(r, i);
6238
+ var a = Rs(r, i);
6237
6239
  if (e) {
6238
6240
  if (isNaN(a.x))
6239
6241
  return s;
6240
6242
  a.x = r.x - a.x, a.y = r.y - a.y;
6241
6243
  var n = 9, o = 1e-12, h, l;
6242
6244
  do {
6243
- if (l = Ts(a, i), isNaN(l.x)) {
6245
+ if (l = Rs(a, i), isNaN(l.x)) {
6244
6246
  console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation.");
6245
6247
  break;
6246
6248
  }
@@ -6253,7 +6255,7 @@ function ph(t, e, i) {
6253
6255
  isNaN(a.x) || (s.x = t.x + a.x, s.y = t.y + a.y);
6254
6256
  return s;
6255
6257
  }
6256
- function Ts(t, e) {
6258
+ function Rs(t, e) {
6257
6259
  var i = { x: t.x / e.del[0], y: t.y / e.del[1] }, s = { x: Math.floor(i.x), y: Math.floor(i.y) }, r = { x: i.x - 1 * s.x, y: i.y - 1 * s.y }, a = { x: Number.NaN, y: Number.NaN }, n;
6258
6260
  if (s.x < 0 || s.x >= e.lim[0] || s.y < 0 || s.y >= e.lim[1])
6259
6261
  return a;
@@ -6338,9 +6340,9 @@ function Gi(t) {
6338
6340
  return t.length > 2 && (e.z = t[2]), t.length > 3 && (e.m = t[3]), e;
6339
6341
  }
6340
6342
  function wh(t) {
6341
- Rs(t.x), Rs(t.y);
6343
+ ks(t.x), ks(t.y);
6342
6344
  }
6343
- function Rs(t) {
6345
+ function ks(t) {
6344
6346
  if (typeof Number.isFinite == "function") {
6345
6347
  if (Number.isFinite(t))
6346
6348
  return;
@@ -6386,7 +6388,7 @@ function Eh(t, e, i, s) {
6386
6388
  var r;
6387
6389
  return Array.isArray(i) ? r = Gi(i) : r = { x: i.x, y: i.y, z: i.z, m: i.m }, Pe(t, e, r, s);
6388
6390
  }
6389
- var ks = Y("WGS84");
6391
+ var $s = Y("WGS84");
6390
6392
  function Je(t, e, i, s) {
6391
6393
  var r, a, n;
6392
6394
  return Array.isArray(i) ? (r = Pe(t, e, Gi(i), s) || { x: NaN, y: NaN }, i.length > 2 ? (a = typeof t.name < "u" && t.name === "geocent" || typeof e.name < "u" && e.name === "geocent", a ? typeof r.z == "number" ? (
@@ -6417,10 +6419,10 @@ function ge(t) {
6417
6419
  }
6418
6420
  function Ah(t, e, i) {
6419
6421
  var s, r, a = !1, n;
6420
- return typeof e > "u" ? (r = ge(t), s = ks, a = !0) : (typeof /** @type {?} */
6422
+ return typeof e > "u" ? (r = ge(t), s = $s, a = !0) : (typeof /** @type {?} */
6421
6423
  e.x < "u" || Array.isArray(e)) && (i = /** @type {T} */
6422
6424
  /** @type {?} */
6423
- e, r = ge(t), s = ks, a = !0), s || (s = ge(t)), r || (r = ge(
6425
+ e, r = ge(t), s = $s, a = !0), s || (s = ge(t)), r || (r = ge(
6424
6426
  /** @type {string | PROJJSONDefinition | proj } */
6425
6427
  e
6426
6428
  )), i ? Je(s, r, i) : (n = {
@@ -6444,30 +6446,30 @@ function Ah(t, e, i) {
6444
6446
  }
6445
6447
  }, a && (n.oProj = r), n);
6446
6448
  }
6447
- var $s = 6, Or = "AJSAJS", Fr = "AFAFAF", Gt = 65, B = 73, J = 79, qt = 86, Dt = 90;
6449
+ var Ls = 6, Fr = "AJSAJS", Ur = "AFAFAF", Gt = 65, B = 73, J = 79, qt = 86, Dt = 90;
6448
6450
  const xh = {
6449
- forward: Ur,
6451
+ forward: qr,
6450
6452
  inverse: Ph,
6451
- toPoint: qr
6453
+ toPoint: Dr
6452
6454
  };
6453
- function Ur(t, e) {
6455
+ function qr(t, e) {
6454
6456
  return e = e || 5, Ch(Gh({
6455
6457
  lat: t[1],
6456
6458
  lon: t[0]
6457
6459
  }), e);
6458
6460
  }
6459
6461
  function Ph(t) {
6460
- var e = Ni(jr(t.toUpperCase()));
6462
+ var e = Ni(zr(t.toUpperCase()));
6461
6463
  return e.lat && e.lon ? [e.lon, e.lat, e.lon, e.lat] : [e.left, e.bottom, e.right, e.top];
6462
6464
  }
6463
- function qr(t) {
6464
- var e = Ni(jr(t.toUpperCase()));
6465
+ function Dr(t) {
6466
+ var e = Ni(zr(t.toUpperCase()));
6465
6467
  return e.lat && e.lon ? [e.lon, e.lat] : [(e.left + e.right) / 2, (e.top + e.bottom) / 2];
6466
6468
  }
6467
6469
  function Ye(t) {
6468
6470
  return t * (Math.PI / 180);
6469
6471
  }
6470
- function Ls(t) {
6472
+ function Os(t) {
6471
6473
  return 180 * (t / Math.PI);
6472
6474
  }
6473
6475
  function Gh(t) {
@@ -6488,9 +6490,9 @@ function Ni(t) {
6488
6490
  var a = 0.9996, n = 6378137, o = 669438e-8, h, l = (1 - Math.sqrt(1 - o)) / (1 + Math.sqrt(1 - o)), f, u, c, m, d, v, g, M, _, p = i - 5e5, S = e;
6489
6491
  s < "N" && (S -= 1e7), g = (r - 1) * 6 - 180 + 3, h = o / (1 - o), v = S / a, M = v / (n * (1 - o / 4 - 3 * o * o / 64 - 5 * o * o * o / 256)), _ = M + (3 * l / 2 - 27 * l * l * l / 32) * Math.sin(2 * M) + (21 * l * l / 16 - 55 * l * l * l * l / 32) * Math.sin(4 * M) + 151 * l * l * l / 96 * Math.sin(6 * M), f = n / Math.sqrt(1 - o * Math.sin(_) * Math.sin(_)), u = Math.tan(_) * Math.tan(_), c = h * Math.cos(_) * Math.cos(_), m = n * (1 - o) / Math.pow(1 - o * Math.sin(_) * Math.sin(_), 1.5), d = p / (f * a);
6490
6492
  var E = _ - f * Math.tan(_) / m * (d * d / 2 - (5 + 3 * u + 10 * c - 4 * c * c - 9 * h) * d * d * d * d / 24 + (61 + 90 * u + 298 * c + 45 * u * u - 252 * h - 3 * c * c) * d * d * d * d * d * d / 720);
6491
- E = Ls(E);
6493
+ E = Os(E);
6492
6494
  var A = (d - (1 + 2 * u + c) * d * d * d / 6 + (5 - 2 * c + 28 * u - 3 * c * c + 8 * h + 24 * u * u) * d * d * d * d * d / 120) / Math.cos(_);
6493
- A = g + Ls(A);
6495
+ A = g + Os(A);
6494
6496
  var G;
6495
6497
  if (t.accuracy) {
6496
6498
  var T = Ni({
@@ -6521,20 +6523,20 @@ function Ch(t, e) {
6521
6523
  return t.zoneNumber + t.zoneLetter + Ih(t.easting, t.northing, t.zoneNumber) + i.substr(i.length - 5, e) + s.substr(s.length - 5, e);
6522
6524
  }
6523
6525
  function Ih(t, e, i) {
6524
- var s = Dr(i), r = Math.floor(t / 1e5), a = Math.floor(e / 1e5) % 20;
6526
+ var s = jr(i), r = Math.floor(t / 1e5), a = Math.floor(e / 1e5) % 20;
6525
6527
  return Th(r, a, s);
6526
6528
  }
6527
- function Dr(t) {
6528
- var e = t % $s;
6529
- return e === 0 && (e = $s), e;
6529
+ function jr(t) {
6530
+ var e = t % Ls;
6531
+ return e === 0 && (e = Ls), e;
6530
6532
  }
6531
6533
  function Th(t, e, i) {
6532
- var s = i - 1, r = Or.charCodeAt(s), a = Fr.charCodeAt(s), n = r + t - 1, o = a + e, h = !1;
6534
+ var s = i - 1, r = Fr.charCodeAt(s), a = Ur.charCodeAt(s), n = r + t - 1, o = a + e, h = !1;
6533
6535
  n > Dt && (n = n - Dt + Gt - 1, h = !0), (n === B || r < B && n > B || (n > B || r < B) && h) && n++, (n === J || r < J && n > J || (n > J || r < J) && h) && (n++, n === B && n++), n > Dt && (n = n - Dt + Gt - 1), o > qt ? (o = o - qt + Gt - 1, h = !0) : h = !1, (o === B || a < B && o > B || (o > B || a < B) && h) && o++, (o === J || a < J && o > J || (o > J || a < J) && h) && (o++, o === B && o++), o > qt && (o = o - qt + Gt - 1);
6534
6536
  var l = String.fromCharCode(n) + String.fromCharCode(o);
6535
6537
  return l;
6536
6538
  }
6537
- function jr(t) {
6539
+ function zr(t) {
6538
6540
  if (t && t.length === 0)
6539
6541
  throw "MGRSPoint coverting from nothing";
6540
6542
  for (var e = t.length, i = null, s = "", r, a = 0; !/[A-Z]/.test(r = t.charAt(a)); ) {
@@ -6549,7 +6551,7 @@ function jr(t) {
6549
6551
  if (o <= "A" || o === "B" || o === "Y" || o >= "Z" || o === "I" || o === "O")
6550
6552
  throw "MGRSPoint zone letter " + o + " not handled: " + t;
6551
6553
  i = t.substring(a, a += 2);
6552
- for (var h = Dr(n), l = Rh(i.charAt(0), h), f = kh(i.charAt(1), h); f < $h(o); )
6554
+ for (var h = jr(n), l = Rh(i.charAt(0), h), f = kh(i.charAt(1), h); f < $h(o); )
6553
6555
  f += 2e6;
6554
6556
  var u = e - a;
6555
6557
  if (u % 2 !== 0)
@@ -6567,7 +6569,7 @@ northing meters` + t;
6567
6569
  };
6568
6570
  }
6569
6571
  function Rh(t, e) {
6570
- for (var i = Or.charCodeAt(e - 1), s = 1e5, r = !1; i !== t.charCodeAt(0); ) {
6572
+ for (var i = Fr.charCodeAt(e - 1), s = 1e5, r = !1; i !== t.charCodeAt(0); ) {
6571
6573
  if (i++, i === B && i++, i === J && i++, i > Dt) {
6572
6574
  if (r)
6573
6575
  throw "Bad character: " + t;
@@ -6580,7 +6582,7 @@ function Rh(t, e) {
6580
6582
  function kh(t, e) {
6581
6583
  if (t > "V")
6582
6584
  throw "MGRSPoint given invalid Northing " + t;
6583
- for (var i = Fr.charCodeAt(e - 1), s = 0, r = !1; i !== t.charCodeAt(0); ) {
6585
+ for (var i = Ur.charCodeAt(e - 1), s = 0, r = !1; i !== t.charCodeAt(0); ) {
6584
6586
  if (i++, i === B && i++, i === J && i++, i > qt) {
6585
6587
  if (r)
6586
6588
  throw "Bad character: " + t;
@@ -6675,15 +6677,15 @@ function $t(t, e, i) {
6675
6677
  console.warn("proj4.Point will be removed in version 3, use proj4.toPoint");
6676
6678
  }
6677
6679
  $t.fromMGRS = function(t) {
6678
- return new $t(qr(t));
6680
+ return new $t(Dr(t));
6679
6681
  };
6680
6682
  $t.prototype.toMGRS = function(t) {
6681
- return Ur([this.x, this.y], t);
6683
+ return qr([this.x, this.y], t);
6682
6684
  };
6683
- var Lh = 1, Oh = 0.25, Os = 0.046875, Fs = 0.01953125, Us = 0.01068115234375, Fh = 0.75, Uh = 0.46875, qh = 0.013020833333333334, Dh = 0.007120768229166667, jh = 0.3645833333333333, zh = 0.005696614583333333, Bh = 0.3076171875;
6685
+ var Lh = 1, Oh = 0.25, Fs = 0.046875, Us = 0.01953125, qs = 0.01068115234375, Fh = 0.75, Uh = 0.46875, qh = 0.013020833333333334, Dh = 0.007120768229166667, jh = 0.3645833333333333, zh = 0.005696614583333333, Bh = 0.3076171875;
6684
6686
  function Ci(t) {
6685
6687
  var e = [];
6686
- e[0] = Lh - t * (Oh + t * (Os + t * (Fs + t * Us))), e[1] = t * (Fh - t * (Os + t * (Fs + t * Us)));
6688
+ e[0] = Lh - t * (Oh + t * (Fs + t * (Us + t * qs))), e[1] = t * (Fh - t * (Fs + t * (Us + t * qs)));
6687
6689
  var i = t * t;
6688
6690
  return e[2] = i * (Uh - t * (qh + t * Dh)), i *= t, e[3] = i * (jh - t * zh), e[4] = i * t * Bh, e;
6689
6691
  }
@@ -6746,7 +6748,7 @@ const _e = {
6746
6748
  inverse: Vh,
6747
6749
  names: Xh
6748
6750
  };
6749
- function zr(t) {
6751
+ function Br(t) {
6750
6752
  var e = Math.exp(t);
6751
6753
  return e = (e - 1 / e) / 2, e;
6752
6754
  }
@@ -6777,8 +6779,8 @@ function Zh(t) {
6777
6779
  var e = Math.exp(t);
6778
6780
  return e = (e + 1 / e) / 2, e;
6779
6781
  }
6780
- function Br(t, e, i) {
6781
- for (var s = Math.sin(e), r = Math.cos(e), a = zr(i), n = Zh(i), o = 2 * r * n, h = -2 * s * a, l = t.length - 1, f = t[l], u = 0, c = 0, m = 0, d, v; --l >= 0; )
6782
+ function Wr(t, e, i) {
6783
+ for (var s = Math.sin(e), r = Math.cos(e), a = Br(i), n = Zh(i), o = 2 * r * n, h = -2 * s * a, l = t.length - 1, f = t[l], u = 0, c = 0, m = 0, d, v; --l >= 0; )
6782
6784
  d = c, v = u, c = f, u = m, f = -d + o * c - h * u + t[l], m = -v + h * c + o * u;
6783
6785
  return o = s * n, h = r * a, [o * f - h * m, o * m + h * f];
6784
6786
  }
@@ -6796,7 +6798,7 @@ function el(t) {
6796
6798
  i = Ti(this.cbg, i);
6797
6799
  var s = Math.sin(i), r = Math.cos(i), a = Math.sin(e), n = Math.cos(e);
6798
6800
  i = Math.atan2(s, n * r), e = Math.atan2(a * r, W(s, r * n)), e = Jh(Math.tan(e));
6799
- var o = Br(this.gtu, 2 * i, 2 * e);
6801
+ var o = Wr(this.gtu, 2 * i, 2 * e);
6800
6802
  i = i + o[0], e = e + o[1];
6801
6803
  var h, l;
6802
6804
  return Math.abs(e) <= 2.623395162778 ? (h = this.a * (this.Qn * e) + this.x0, l = this.a * (this.Qn * i + this.Zb) + this.y0) : (h = 1 / 0, l = 1 / 0), t.x = h, t.y = l, t;
@@ -6806,8 +6808,8 @@ function il(t) {
6806
6808
  i = (i - this.Zb) / this.Qn, e = e / this.Qn;
6807
6809
  var s, r;
6808
6810
  if (Math.abs(e) <= 2.623395162778) {
6809
- var a = Br(this.utg, 2 * i, 2 * e);
6810
- i = i + a[0], e = e + a[1], e = Math.atan(zr(e));
6811
+ var a = Wr(this.utg, 2 * i, 2 * e);
6812
+ i = i + a[0], e = e + a[1], e = Math.atan(Br(e));
6811
6813
  var n = Math.sin(i), o = Math.cos(i), h = Math.sin(e), l = Math.cos(e);
6812
6814
  i = Math.atan2(n * l, W(h, l * o)), e = Math.atan2(h, l * o), s = w(e + this.long0, this.over), r = Ti(this.cgb, i);
6813
6815
  } else
@@ -6950,7 +6952,7 @@ const Pl = {
6950
6952
  var St = 1e-7;
6951
6953
  function Gl(t) {
6952
6954
  var e = ["Hotine_Oblique_Mercator", "Hotine_Oblique_Mercator_variant_A", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin"], i = typeof t.projName == "object" ? Object.keys(t.projName)[0] : t.projName;
6953
- return "no_uoff" in t || "no_off" in t || e.indexOf(i) !== -1 || e.indexOf(Rr(i)) !== -1;
6955
+ return "no_uoff" in t || "no_off" in t || e.indexOf(i) !== -1 || e.indexOf(kr(i)) !== -1;
6954
6956
  }
6955
6957
  function Nl() {
6956
6958
  var t, e, i, s, r, a, n, o, h, l, f = 0, u, c = 0, m = 0, d = 0, v = 0, g = 0, M = 0;
@@ -7134,11 +7136,11 @@ function st(t, e) {
7134
7136
  return t > 1e-7 ? (i = t * e, (1 - t * t) * (e / (1 - i * i) - 0.5 / t * Math.log((1 - i) / (1 + i)))) : 2 * e;
7135
7137
  }
7136
7138
  var Xl = 0.3333333333333333, Ql = 0.17222222222222222, Jl = 0.10257936507936508, Yl = 0.06388888888888888, Zl = 0.0664021164021164, t0 = 0.016415012942191543;
7137
- function Wr(t) {
7139
+ function Hr(t) {
7138
7140
  var e, i = [];
7139
7141
  return i[0] = t * Xl, e = t * t, i[0] += e * Ql, i[1] = e * Yl, e *= t, i[0] += e * Jl, i[1] += e * Zl, i[2] = e * t0, i;
7140
7142
  }
7141
- function Hr(t, e) {
7143
+ function Kr(t, e) {
7142
7144
  var i = t + t;
7143
7145
  return t + e[0] * Math.sin(i) + e[1] * Math.sin(i + i) + e[2] * Math.sin(i + i + i);
7144
7146
  }
@@ -7147,7 +7149,7 @@ function e0() {
7147
7149
  var t = Math.abs(this.lat0);
7148
7150
  if (Math.abs(t - y) < b ? this.mode = this.lat0 < 0 ? gi : vi : Math.abs(t) < b ? this.mode = Mi : this.mode = we, this.es > 0) {
7149
7151
  var e;
7150
- switch (this.qp = st(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = Wr(this.es), this.mode) {
7152
+ switch (this.qp = st(this.e, 1), this.mmf = 0.5 / (1 - this.es), this.apa = Hr(this.es), this.mode) {
7151
7153
  case vi:
7152
7154
  this.dd = 1;
7153
7155
  break;
@@ -7238,7 +7240,7 @@ function s0(t) {
7238
7240
  return t.x = this.long0, t.y = this.lat0, t;
7239
7241
  l = 1 - o / this.qp, this.mode === this.S_POLE && (l = -l);
7240
7242
  }
7241
- s = Math.atan2(e, i), r = Hr(Math.asin(l), this.apa);
7243
+ s = Math.atan2(e, i), r = Kr(Math.asin(l), this.apa);
7242
7244
  }
7243
7245
  return t.x = w(this.long0 + s, this.over), t.y = r, t;
7244
7246
  }
@@ -7356,7 +7358,7 @@ const P0 = {
7356
7358
  inverse: A0,
7357
7359
  names: x0
7358
7360
  };
7359
- var qs = 20;
7361
+ var Ds = 20;
7360
7362
  function G0() {
7361
7363
  this.temp = this.b / this.a, this.es = 1 - Math.pow(this.temp, 2), this.e = Math.sqrt(this.es), this.e0 = ee(this.es), this.e1 = ie(this.es), this.e2 = se(this.es), this.e3 = re(this.es), this.ml0 = this.a * z(this.e0, this.e1, this.e2, this.e3, this.lat0);
7362
7364
  }
@@ -7380,7 +7382,7 @@ function C0(t) {
7380
7382
  else {
7381
7383
  n = this.lat0 + r / this.a, o = s * s / this.a / this.a + n * n, h = n;
7382
7384
  var f;
7383
- for (a = qs; a; --a)
7385
+ for (a = Ds; a; --a)
7384
7386
  if (f = Math.tan(h), l = -1 * (n * (h * f + 1) - h - 0.5 * (h * h + o) * f) / ((h - n) / f - 1), h += l, Math.abs(l) <= b) {
7385
7387
  i = h;
7386
7388
  break;
@@ -7392,7 +7394,7 @@ function C0(t) {
7392
7394
  else {
7393
7395
  n = (this.ml0 + r) / this.a, o = s * s / this.a / this.a + n * n, h = n;
7394
7396
  var u, c, m, d, v;
7395
- for (a = qs; a; --a)
7397
+ for (a = Ds; a; --a)
7396
7398
  if (v = this.e * Math.sin(h), u = Math.sqrt(1 - v * v) * Math.tan(h), c = this.a * z(this.e0, this.e1, this.e2, this.e3, h), m = this.e0 - 2 * this.e1 * Math.cos(2 * h) + 4 * this.e2 * Math.cos(4 * h) - 6 * this.e3 * Math.cos(6 * h), d = c / this.a, l = (n * (u * d + 1) - d - 0.5 * u * (d * d + o)) / (this.es * Math.sin(2 * h) * (d * d + o - 2 * n * d) / (4 * u) + (n - d) * (u * m - 2 / Math.sin(2 * h)) - m), h -= l, Math.abs(l) <= b) {
7397
7399
  i = h;
7398
7400
  break;
@@ -7470,7 +7472,7 @@ var z0 = 20;
7470
7472
  function B0() {
7471
7473
  this.long0 = this.long0 || 0, this.sphere ? (this.n = 1, this.m = 0, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1)) : this.en = Ci(this.es);
7472
7474
  }
7473
- function Kr(t) {
7475
+ function Vr(t) {
7474
7476
  var e, i, s = t.x, r = t.y;
7475
7477
  if (s = w(s - this.long0, this.over), this.sphere) {
7476
7478
  if (!this.m)
@@ -7488,21 +7490,21 @@ function Kr(t) {
7488
7490
  }
7489
7491
  return t.x = e, t.y = i, t;
7490
7492
  }
7491
- function Vr(t) {
7493
+ function Xr(t) {
7492
7494
  var e, i, s, r;
7493
7495
  return t.x -= this.x0, s = t.x / this.a, t.y -= this.y0, e = t.y / this.a, this.sphere ? (e /= this.C_y, s = s / (this.C_x * (this.m + Math.cos(e))), this.m ? e = mt((this.m * e + Math.sin(e)) / this.n) : this.n !== 1 && (e = mt(Math.sin(e) / this.n)), s = w(s + this.long0, this.over), e = dt(e)) : (e = Ii(t.y / this.a, this.es, this.en), r = Math.abs(e), r < y ? (r = Math.sin(e), i = this.long0 + t.x * Math.sqrt(1 - this.es * r * r) / (this.a * Math.cos(e)), s = w(i, this.over)) : r - b < y && (s = this.long0)), t.x = s, t.y = e, t;
7494
7496
  }
7495
7497
  var W0 = ["Sinusoidal", "sinu"];
7496
7498
  const H0 = {
7497
7499
  init: B0,
7498
- forward: Kr,
7499
- inverse: Vr,
7500
+ forward: Vr,
7501
+ inverse: Xr,
7500
7502
  names: W0
7501
7503
  };
7502
7504
  function K0() {
7503
7505
  this.sphere = !0, this.b = this.a, this.m = 1, this.n = 2.5707963267948966, this.es = 0, this.C_y = Math.sqrt((this.m + 1) / this.n), this.C_x = this.C_y / (this.m + 1);
7504
7506
  }
7505
- var V0 = Kr, X0 = Vr, Q0 = ["Eckert_VI", "eck6"];
7507
+ var V0 = Vr, X0 = Xr, Q0 = ["Eckert_VI", "eck6"];
7506
7508
  const J0 = {
7507
7509
  init: K0,
7508
7510
  forward: V0,
@@ -7757,7 +7759,7 @@ var yi = [
7757
7759
  [0.9394, 840947e-8, -192841e-9, -42106e-10],
7758
7760
  [0.9761, 616527e-8, -256e-6, -42106e-10],
7759
7761
  [1, 328947e-8, -319159e-9, -42106e-10]
7760
- ], Xr = 0.8487, Qr = 1.3523, Jr = H / 5, Cc = 1 / Jr, Nt = 18, Ne = function(t, e) {
7762
+ ], Qr = 0.8487, Jr = 1.3523, Yr = H / 5, Cc = 1 / Yr, Nt = 18, Ne = function(t, e) {
7761
7763
  return t[0] + e * (t[1] + e * (t[2] + e * t[3]));
7762
7764
  }, Ic = function(t, e) {
7763
7765
  return t[1] + e * (2 * t[2] + e * 3 * t[3]);
@@ -7774,18 +7776,18 @@ function Rc() {
7774
7776
  this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.es = 0, this.title = this.title || "Robinson";
7775
7777
  }
7776
7778
  function kc(t) {
7777
- var e = w(t.x - this.long0, this.over), i = Math.abs(t.y), s = Math.floor(i * Jr);
7779
+ var e = w(t.x - this.long0, this.over), i = Math.abs(t.y), s = Math.floor(i * Yr);
7778
7780
  s < 0 ? s = 0 : s >= Nt && (s = Nt - 1), i = H * (i - Cc * s);
7779
7781
  var r = {
7780
7782
  x: Ne(yi[s], i) * e,
7781
7783
  y: Ne(jt[s], i)
7782
7784
  };
7783
- return t.y < 0 && (r.y = -r.y), r.x = r.x * this.a * Xr + this.x0, r.y = r.y * this.a * Qr + this.y0, r;
7785
+ return t.y < 0 && (r.y = -r.y), r.x = r.x * this.a * Qr + this.x0, r.y = r.y * this.a * Jr + this.y0, r;
7784
7786
  }
7785
7787
  function $c(t) {
7786
7788
  var e = {
7787
- x: (t.x - this.x0) / (this.a * Xr),
7788
- y: Math.abs(t.y - this.y0) / (this.a * Qr)
7789
+ x: (t.x - this.x0) / (this.a * Qr),
7790
+ y: Math.abs(t.y - this.y0) / (this.a * Jr)
7789
7791
  };
7790
7792
  if (e.y >= 1)
7791
7793
  e.x /= yi[Nt][0], e.y = t.y < 0 ? -y : y;
@@ -7816,11 +7818,11 @@ function Fc() {
7816
7818
  this.name = "geocent";
7817
7819
  }
7818
7820
  function Uc(t) {
7819
- var e = $r(t, this.es, this.a);
7821
+ var e = Lr(t, this.es, this.a);
7820
7822
  return e;
7821
7823
  }
7822
7824
  function qc(t) {
7823
- var e = Lr(t, this.es, this.a, this.b);
7825
+ var e = Or(t, this.es, this.a, this.b);
7824
7826
  return e;
7825
7827
  }
7826
7828
  var Dc = ["Geocentric", "geocentric", "geocent", "Geocent"];
@@ -7976,7 +7978,7 @@ const Yc = {
7976
7978
  };
7977
7979
  var Wt = 1.340264, Ht = -0.081106, Kt = 893e-6, Vt = 3796e-6, Ce = Math.sqrt(3) / 2;
7978
7980
  function Zc() {
7979
- this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.es !== 0 && (this.apa = Wr(this.es), this.qp = st(this.e, 1), this.rqda = Math.sqrt(0.5 * this.qp));
7981
+ this.long0 = this.long0 !== void 0 ? this.long0 : 0, this.x0 = this.x0 !== void 0 ? this.x0 : 0, this.y0 = this.y0 !== void 0 ? this.y0 : 0, this.es !== 0 && (this.apa = Hr(this.es), this.qp = st(this.e, 1), this.rqda = Math.sqrt(0.5 * this.qp));
7980
7982
  }
7981
7983
  function tu(t) {
7982
7984
  var e = w(t.x - this.long0, this.over), i = t.y, s = Math.sin(i);
@@ -7989,7 +7991,7 @@ function eu(t) {
7989
7991
  var e = 1e-9, i = 12, s = t.y, r, a, n, o, h, l;
7990
7992
  for (l = 0; l < i && (r = s * s, a = r * r * r, n = s * (Wt + Ht * r + a * (Kt + Vt * r)) - t.y, o = Wt + 3 * Ht * r + a * (7 * Kt + 9 * Vt * r), s -= h = n / o, !(Math.abs(h) < e)); ++l)
7991
7993
  ;
7992
- return r = s * s, a = r * r * r, t.x = Ce * t.x * (Wt + 3 * Ht * r + a * (7 * Kt + 9 * Vt * r)) / Math.cos(s), t.y = Math.asin(Math.sin(s) / Ce), this.es !== 0 && (t.y = Hr(t.y, this.apa)), t.x = w(t.x + this.long0, this.over), t;
7994
+ return r = s * s, a = r * r * r, t.x = Ce * t.x * (Wt + 3 * Ht * r + a * (7 * Kt + 9 * Vt * r)) / Math.cos(s), t.y = Math.asin(Math.sin(s) / Ce), this.es !== 0 && (t.y = Kr(t.y, this.apa)), t.x = w(t.x + this.long0, this.over), t;
7993
7995
  }
7994
7996
  var iu = ["eqearth", "Equal Earth", "Equal_Earth"];
7995
7997
  const su = {
@@ -8040,7 +8042,7 @@ var lu = ["bonne", "Bonne (Werner lat_1=90)"];
8040
8042
  const cu = {
8041
8043
  init: ru,
8042
8044
  names: lu
8043
- }, Ds = {
8045
+ }, js = {
8044
8046
  OBLIQUE: {
8045
8047
  forward: gu,
8046
8048
  inverse: Mu
@@ -8067,7 +8069,7 @@ const cu = {
8067
8069
  }
8068
8070
  };
8069
8071
  function uu() {
8070
- if (this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.title = this.title || "General Oblique Transformation", this.isIdentity = Ir.includes(this.o_proj), !this.o_proj)
8072
+ if (this.x0 = this.x0 || 0, this.y0 = this.y0 || 0, this.long0 = this.long0 || 0, this.title = this.title || "General Oblique Transformation", this.isIdentity = Tr.includes(this.o_proj), !this.o_proj)
8071
8073
  throw new Error("Missing parameter: o_proj");
8072
8074
  if (this.o_proj === "ob_tran")
8073
8075
  throw new Error("Invalid value for o_proj: " + this.o_proj);
@@ -8102,7 +8104,7 @@ function uu() {
8102
8104
  if (!i)
8103
8105
  throw new Error("No valid parameters provided for ob_tran projection.");
8104
8106
  const { lamp: a, phip: n } = du(this, i);
8105
- this.lamp = a, Math.abs(n) > b ? (this.cphip = Math.cos(n), this.sphip = Math.sin(n), this.projectionType = Ds.OBLIQUE) : this.projectionType = Ds.TRANSVERSE;
8107
+ this.lamp = a, Math.abs(n) > b ? (this.cphip = Math.cos(n), this.sphip = Math.sin(n), this.projectionType = js.OBLIQUE) : this.projectionType = js.TRANSVERSE;
8106
8108
  }
8107
8109
  function fu(t) {
8108
8110
  return this.projectionType.forward(this, t);
@@ -8205,7 +8207,7 @@ const _u = {
8205
8207
  function bu(t) {
8206
8208
  t.Proj.projections.add(_e), t.Proj.projections.add(be), t.Proj.projections.add(hl), t.Proj.projections.add(Ml), t.Proj.projections.add(wl), t.Proj.projections.add(Pl), t.Proj.projections.add(Rl), t.Proj.projections.add(Fl), t.Proj.projections.add(zl), t.Proj.projections.add(Vl), t.Proj.projections.add(a0), t.Proj.projections.add(u0), t.Proj.projections.add(v0), t.Proj.projections.add(w0), t.Proj.projections.add(P0), t.Proj.projections.add(T0), t.Proj.projections.add(O0), t.Proj.projections.add(j0), t.Proj.projections.add(H0), t.Proj.projections.add(J0), t.Proj.projections.add(ic), t.Proj.projections.add(oc), t.Proj.projections.add(fc), t.Proj.projections.add(pc), t.Proj.projections.add(Ec), t.Proj.projections.add(Nc), t.Proj.projections.add(Oc), t.Proj.projections.add(jc), t.Proj.projections.add(Kc), t.Proj.projections.add(Yc), t.Proj.projections.add(su), t.Proj.projections.add(cu), t.Proj.projections.add(_u);
8207
8209
  }
8208
- const Yr = Object.assign(Ah, {
8210
+ const Zr = Object.assign(Ah, {
8209
8211
  defaultDatum: "WGS84",
8210
8212
  Proj: Y,
8211
8213
  WGS84: new Y("WGS84"),
@@ -8217,52 +8219,52 @@ const Yr = Object.assign(Ah, {
8217
8219
  mgrs: xh,
8218
8220
  version: "__VERSION__"
8219
8221
  });
8220
- bu(Yr);
8222
+ bu(Zr);
8221
8223
  const wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8222
8224
  __proto__: null,
8223
- default: Yr
8225
+ default: Zr
8224
8226
  }, Symbol.toStringTag, { value: "Module" }));
8225
8227
  export {
8226
8228
  V as CARTOGRAPH_ELEMENT_ATTRS,
8227
8229
  Le as CARTOGRAPH_FORMAT,
8228
8230
  Oe as CARTOGRAPH_TAG_NAMES,
8229
8231
  Su as CARTOGRAPH_THEMES,
8230
- la as COLLAPSE_THRESHOLD,
8232
+ ca as COLLAPSE_THRESHOLD,
8231
8233
  _i as CVD_MATRICES,
8232
8234
  Te as CVD_TYPES,
8233
- oa as CVD_VALUES,
8235
+ ha as CVD_VALUES,
8234
8236
  li as GEOGRAPHIC_PLANE,
8235
8237
  Sa as INERT_RESERVED_CARTOGRAPH_ATTRS,
8236
- Ks as MAX_CANVAS_AREA,
8237
- Hs as MAX_CANVAS_DIMENSION,
8238
+ Vs as MAX_CANVAS_AREA,
8239
+ Ks as MAX_CANVAS_DIMENSION,
8238
8240
  Ve as MAX_CATEGORY_ENTRIES,
8239
- _r as OmAtlasElement,
8240
- or as OmCartographElement,
8241
- fr as OmFrameElement,
8242
- pr as OmGraticuleElement,
8243
- vr as OmImageElement,
8244
- yr as OmLegendElement,
8245
- dr as OmNorthElement,
8246
- mr as OmScalebarElement,
8247
- gr as OmShapeElement,
8248
- hr as OmTextElement,
8241
+ br as OmAtlasElement,
8242
+ hr as OmCartographElement,
8243
+ mr as OmFrameElement,
8244
+ _r as OmGraticuleElement,
8245
+ Mr as OmImageElement,
8246
+ pr as OmLegendElement,
8247
+ gr as OmNorthElement,
8248
+ dr as OmScalebarElement,
8249
+ vr as OmShapeElement,
8250
+ lr as OmTextElement,
8249
8251
  Fi as PAGE_PRESETS,
8250
- Hi as PAGE_SIZE_NAMES,
8252
+ Ki as PAGE_SIZE_NAMES,
8251
8253
  lt as PLACED_ATTR_NAMES,
8252
8254
  ht as PX_PER_MM,
8253
8255
  Ca as SCALE_GROUP_SEPARATOR,
8254
- va as URL_ACTION_TIMEOUT_MS,
8256
+ Ma as URL_ACTION_TIMEOUT_MS,
8255
8257
  Da as alignOffset,
8256
- ar as allFrames,
8257
- ua as applyCvdToCanvas,
8258
+ nr as allFrames,
8259
+ fa as applyCvdToCanvas,
8258
8260
  ka as applyTokens,
8259
- Ma as applyUrlActions,
8261
+ ya as applyUrlActions,
8260
8262
  ui as atlasFields,
8261
8263
  Cu as boundsArea,
8262
8264
  $ as boxMm,
8263
8265
  Nn as buildGraticule,
8264
8266
  Un as buildPages,
8265
- tr as buildScalebar,
8267
+ er as buildScalebar,
8266
8268
  Na as buildScalebarDrawing,
8267
8269
  Ct as builtinCrsForward,
8268
8270
  Eu as canvasMeasurer,
@@ -8270,59 +8272,59 @@ export {
8270
8272
  Gu as cornersFromBounds,
8271
8273
  oi as cornersFromCamera,
8272
8274
  zt as createFrameGeoref,
8273
- na as createZip,
8275
+ oa as createZip,
8274
8276
  Ru as defineCartographElements,
8275
8277
  ji as deltaE00,
8276
8278
  An as deriveLegendRows,
8277
- fa as ensureCvdFilters,
8279
+ ma as ensureCvdFilters,
8278
8280
  On as featureBounds,
8279
8281
  it as fieldOf,
8280
- rr as findFrame,
8282
+ ar as findFrame,
8281
8283
  Tn as formatDms,
8282
8284
  Ia as formatScaleDenominator,
8283
- ya as installUrlActions,
8284
- ia as isCoreLoaded,
8285
+ pa as installUrlActions,
8286
+ sa as isCoreLoaded,
8285
8287
  $a as isoDate,
8286
8288
  qa as layoutText,
8287
- ca as lintLegendColours,
8288
- zs as loadCore,
8289
+ ua as lintLegendColours,
8290
+ Bs as loadCore,
8289
8291
  Nu as maxGeoreferenceablePitch,
8290
8292
  Au as mercatorForward,
8291
8293
  xu as mercatorInverse,
8292
- ds as niceInterval,
8293
- Zs as niceNumberBelow,
8294
+ gs as niceInterval,
8295
+ tr as niceNumberBelow,
8294
8296
  ai as normalizeCrs,
8295
8297
  an as northBearingDegrees,
8296
- sr as ownerCartograph,
8298
+ rr as ownerCartograph,
8297
8299
  Fn as padBounds,
8298
8300
  Oi as paintEnvForDpi,
8299
- ha as parseColor,
8301
+ la as parseColor,
8300
8302
  It as parseCorners,
8301
8303
  Dn as parseSort,
8302
8304
  kt as peekCore,
8303
8305
  ye as readCamera,
8304
- Mr as readLiteralRows,
8306
+ yr as readLiteralRows,
8305
8307
  Gn as readOverrides,
8306
8308
  nt as referencedFrame,
8307
8309
  Ln as rejectionFor,
8308
8310
  bi as renderCartograph,
8309
- Xs as renderCartographAtlas,
8311
+ Qs as renderCartographAtlas,
8310
8312
  ni as resolveCrsForward,
8311
8313
  pi as resolveCvdType,
8312
8314
  Bn as resolveFilenames,
8313
8315
  Se as resolvePageSize,
8314
8316
  Ta as resolveToken,
8315
- ir as resolveTokens,
8317
+ sr as resolveTokens,
8316
8318
  En as rowColorFor,
8317
8319
  hn as sanitizeAdoptedMap,
8318
8320
  zn as sanitizeFilename,
8319
8321
  nn as scaleVariation,
8320
- js as setCoreLoader,
8322
+ zs as setCoreLoader,
8321
8323
  qi as simulate,
8322
8324
  Sn as swatchShapeFor,
8323
8325
  Ra as tokensIn,
8324
8326
  Pu as utmDef,
8325
- wr as validateCartograph,
8327
+ Sr as validateCartograph,
8326
8328
  Tu as validateCartographDeep,
8327
8329
  Iu as validateCartographString,
8328
8330
  Wi as whenPageReady