@ogc-maps/storybook-components 0.6.1 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -1,21 +1,21 @@
1
- import { B as et } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
- import { C as tt } from "./CollapsibleControl-VFUTWb_5.js";
3
- import { C as rt, f as lt, a as nt } from "./CoordinateDisplay-PxPmVjpm.js";
4
- import { E as ot } from "./ExportButton-CLsWoW4m.js";
5
- import { F as mt } from "./FeatureDetailPanel-CkFpdEKW.js";
6
- import { F as ct } from "./FeatureTooltip-Db1LgLQV.js";
7
- import { L as ht } from "./LayerPanel-SCdJ8948.js";
8
- import { L as bt } from "./Legend-B6uIqOSw.js";
9
- import { S as ft } from "./SearchPanel-DCY01Wa-.js";
10
- import { jsxs as l, jsx as a, Fragment as B } from "react/jsx-runtime";
11
- import { useId as Ee, useState as L, useRef as ue, useMemo as Pe, useCallback as ze, useEffect as X } from "react";
12
- import { LuInfo as Ve } from "react-icons/lu";
13
- import { J as Fe, j as Me, i as se, L as _e, g as Ye } from "./cql2-onoyCbps.js";
14
- import { a as wt, b as vt, M as Nt, e as kt, N as Ct, f as St, c as Dt, d as Tt, h as Lt, O as It, P as At, k as Et, l as Pt, m as Ft, n as Mt, o as Ot, p as jt, q as $t, r as Rt, s as Bt, t as qt, u as Ut, v as Wt, w as Gt, x as zt, y as Vt, z as _t, A as Yt, Q as Xt, B as Ht, C as Jt, D as Kt, E as Qt, F as Zt, G as ei, H as ai, I as ti, K as ii } from "./cql2-onoyCbps.js";
15
- import { s as Xe } from "./index-B4i0zJXf.js";
16
- import { B as li, C as ni, a as pi, b as oi, D as ui, F as mi, c as si, d as ci, e as di, L as hi, f as gi, g as bi, h as yi, i as fi, j as xi, M as wi, N as vi, O as Ni, P as ki, k as Ci, S as Si, l as Di, m as Ti, n as Li, o as Ii, p as Ai, q as Ei, r as Pi, T as Fi, U as Mi, V as Oi, v as ji } from "./index-B4i0zJXf.js";
17
- import './style.css';function He({ text: e, id: t }) {
18
- const i = Ee(), r = t ?? i;
1
+ import { B as rt } from "./BasemapSwitcher-BW7lyZ2Y.js";
2
+ import { C as nt } from "./CollapsibleControl-VFUTWb_5.js";
3
+ import { C as ot, f as ut, a as mt } from "./CoordinateDisplay-PxPmVjpm.js";
4
+ import { E as ct } from "./ExportButton-CLsWoW4m.js";
5
+ import { F as ht } from "./FeatureDetailPanel-CkFpdEKW.js";
6
+ import { F as bt } from "./FeatureTooltip-Db1LgLQV.js";
7
+ import { L as ft } from "./LayerPanel-SCdJ8948.js";
8
+ import { L as wt } from "./Legend-DNjVLgsd.js";
9
+ import { S as Nt } from "./SearchPanel-DCY01Wa-.js";
10
+ import { jsxs as l, jsx as a, Fragment as q } from "react/jsx-runtime";
11
+ import { useId as Ie, useState as A, useRef as ue, useMemo as Ee, useCallback as We, useEffect as X } from "react";
12
+ import { LuInfo as ze } from "react-icons/lu";
13
+ import { J as Fe, j as Pe, i as se, L as Ve, g as _e } from "./cql2-DOJnQwcv.js";
14
+ import { a as Ct, b as St, M as Dt, e as Tt, N as Lt, f as At, c as It, d as Et, h as Ft, O as Pt, P as Mt, k as Ot, l as jt, m as $t, n as Rt, o as Bt, p as qt, q as Ut, r as Gt, s as Wt, t as zt, u as Vt, v as _t, w as Yt, x as Xt, y as Ht, z as Jt, A as Kt, Q as Qt, B as Zt, C as ei, D as ai, E as ti, F as ii, G as ri, H as li, I as ni, K as pi } from "./cql2-DOJnQwcv.js";
15
+ import { s as Ye } from "./index-RzZtWlUz.js";
16
+ import { B as ui, C as mi, a as si, b as ci, D as di, F as hi, c as gi, d as bi, e as yi, G as fi, L as xi, f as wi, g as vi, h as Ni, i as ki, j as Ci, M as Si, N as Di, O as Ti, P as Li, k as Ai, S as Ii, l as Ei, m as Fi, n as Pi, o as Mi, p as Oi, q as ji, r as $i, T as Ri, U as Bi, V as qi, v as Ui } from "./index-RzZtWlUz.js";
17
+ import './style.css';function Xe({ text: e, id: t }) {
18
+ const i = Ie(), r = t ?? i;
19
19
  return /* @__PURE__ */ l("span", { className: "mapui:relative mapui:inline-flex mapui:group", children: [
20
20
  /* @__PURE__ */ a(
21
21
  "span",
@@ -24,7 +24,7 @@ import './style.css';function He({ text: e, id: t }) {
24
24
  "aria-label": "Info",
25
25
  "aria-describedby": r,
26
26
  className: "mapui:inline-flex mapui:items-center mapui:text-gray-400 mapui:cursor-default hover:mapui:text-gray-600 focus:mapui:text-gray-600 focus:mapui:outline-none",
27
- children: /* @__PURE__ */ a(Ve, { className: "mapui:h-3.5 mapui:w-3.5" })
27
+ children: /* @__PURE__ */ a(ze, { className: "mapui:h-3.5 mapui:w-3.5" })
28
28
  }
29
29
  ),
30
30
  /* @__PURE__ */ l(
@@ -48,7 +48,7 @@ function S({ label: e, error: t, required: i, description: r, htmlFor: n, childr
48
48
  e,
49
49
  i && /* @__PURE__ */ a("span", { className: "mapui:ml-0.5 mapui:text-red-500", "aria-hidden": "true", children: "*" })
50
50
  ] }),
51
- r && /* @__PURE__ */ a(He, { text: r })
51
+ r && /* @__PURE__ */ a(Xe, { text: r })
52
52
  ] }),
53
53
  o,
54
54
  t && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:text-red-600", role: "alert", children: t })
@@ -131,7 +131,7 @@ function _({
131
131
  defaultOpen: i = !1,
132
132
  badge: r
133
133
  }) {
134
- const [n, o] = L(i);
134
+ const [n, o] = A(i);
135
135
  return /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-200", children: [
136
136
  /* @__PURE__ */ l(
137
137
  "button",
@@ -152,7 +152,7 @@ function _({
152
152
  ] });
153
153
  }
154
154
  const H = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
155
- function de({
155
+ function ce({
156
156
  value: e,
157
157
  onChange: t,
158
158
  onTestConnection: i,
@@ -225,21 +225,21 @@ const ee = () => ({
225
225
  label: void 0,
226
226
  tileMatrixSetId: "WebMercatorQuad"
227
227
  });
228
- function Ua({ sources: e, onChange: t }) {
229
- const [i, r] = L(null), [n, o] = L(null), [p, b] = L(!1), [m, w] = L(ee()), [d, f] = L({}), [c, u] = L({}), [s, v] = L(null), k = async (C, P) => {
230
- f((E) => ({ ...E, [C]: "loading" }));
228
+ function Va({ sources: e, onChange: t }) {
229
+ const [i, r] = A(null), [n, o] = A(null), [p, y] = A(!1), [m, x] = A(ee()), [h, f] = A({}), [d, u] = A({}), [s, v] = A(null), N = async (C, F) => {
230
+ f((T) => ({ ...T, [C]: "loading" }));
231
231
  try {
232
- const E = await fetch(`${P}/conformance`);
233
- E.ok ? f((y) => ({ ...y, [C]: "success" })) : (f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: `HTTP ${E.status}` })));
234
- } catch (E) {
235
- f((y) => ({ ...y, [C]: "error" })), u((y) => ({ ...y, [C]: E instanceof Error ? E.message : "Network error" }));
232
+ const T = await fetch(`${F}/conformance`);
233
+ T.ok ? f((c) => ({ ...c, [C]: "success" })) : (f((c) => ({ ...c, [C]: "error" })), u((c) => ({ ...c, [C]: `HTTP ${T.status}` })));
234
+ } catch (T) {
235
+ f((c) => ({ ...c, [C]: "error" })), u((c) => ({ ...c, [C]: T instanceof Error ? T.message : "Network error" }));
236
236
  }
237
237
  }, D = () => {
238
238
  n && (t(e.map((C) => C.id === i ? n : C)), r(null), o(null));
239
- }, x = () => {
240
- t([...e, m]), b(!1), w(ee());
241
- }, $ = (C) => {
242
- t(e.filter((P) => P.id !== C)), v(null);
239
+ }, M = () => {
240
+ t([...e, m]), y(!1), x(ee());
241
+ }, w = (C) => {
242
+ t(e.filter((F) => F.id !== C)), v(null);
243
243
  };
244
244
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
245
245
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -249,7 +249,7 @@ function Ua({ sources: e, onChange: t }) {
249
249
  {
250
250
  type: "button",
251
251
  onClick: () => {
252
- b(!0), w(ee());
252
+ y(!0), x(ee());
253
253
  },
254
254
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
255
255
  children: "+ Add Source"
@@ -263,13 +263,13 @@ function Ua({ sources: e, onChange: t }) {
263
263
  className: "mapui:rounded-lg mapui:border mapui:border-gray-200 mapui:bg-white mapui:p-3",
264
264
  children: i === C.id ? /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
265
265
  /* @__PURE__ */ a(
266
- de,
266
+ ce,
267
267
  {
268
268
  value: n ?? C,
269
269
  onChange: o,
270
- onTestConnection: (P) => k(`edit-${C.id}`, P),
271
- testStatus: d[`edit-${C.id}`],
272
- testError: c[`edit-${C.id}`]
270
+ onTestConnection: (F) => N(`edit-${C.id}`, F),
271
+ testStatus: h[`edit-${C.id}`],
272
+ testError: d[`edit-${C.id}`]
273
273
  }
274
274
  ),
275
275
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
@@ -333,13 +333,13 @@ function Ua({ sources: e, onChange: t }) {
333
333
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
334
334
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Source" }),
335
335
  /* @__PURE__ */ a(
336
- de,
336
+ ce,
337
337
  {
338
338
  value: m,
339
- onChange: w,
340
- onTestConnection: (C) => k("new", C),
341
- testStatus: d.new,
342
- testError: c.new
339
+ onChange: x,
340
+ onTestConnection: (C) => N("new", C),
341
+ testStatus: h.new,
342
+ testError: d.new
343
343
  }
344
344
  ),
345
345
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
@@ -347,7 +347,7 @@ function Ua({ sources: e, onChange: t }) {
347
347
  "button",
348
348
  {
349
349
  type: "button",
350
- onClick: x,
350
+ onClick: M,
351
351
  disabled: !m.id || !m.url,
352
352
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
353
353
  children: "Save"
@@ -357,7 +357,7 @@ function Ua({ sources: e, onChange: t }) {
357
357
  "button",
358
358
  {
359
359
  type: "button",
360
- onClick: () => b(!1),
360
+ onClick: () => y(!1),
361
361
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
362
362
  children: "Cancel"
363
363
  }
@@ -370,13 +370,13 @@ function Ua({ sources: e, onChange: t }) {
370
370
  open: s !== null,
371
371
  title: "Remove Source",
372
372
  description: "Are you sure you want to remove this source? Any layers using it will be affected.",
373
- onConfirm: () => s && $(s),
373
+ onConfirm: () => s && w(s),
374
374
  onCancel: () => v(null)
375
375
  }
376
376
  )
377
377
  ] });
378
378
  }
379
- function Wa({
379
+ function _a({
380
380
  sourceUrl: e,
381
381
  selectedCollectionIds: t,
382
382
  onSelect: i,
@@ -389,8 +389,8 @@ function Wa({
389
389
  ] }) : p ? /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:bg-red-50 mapui:p-3 mapui:text-sm mapui:text-red-700", children: [
390
390
  "Failed to load collections: ",
391
391
  p.message
392
- ] }) : n.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: n.map((b) => {
393
- const m = t.includes(b.id);
392
+ ] }) : n.length === 0 ? /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No collections found at this source." }) : /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-1 mapui:p-0", children: n.map((y) => {
393
+ const m = t.includes(y.id);
394
394
  return /* @__PURE__ */ l(
395
395
  "li",
396
396
  {
@@ -400,51 +400,51 @@ function Wa({
400
400
  "input",
401
401
  {
402
402
  type: "checkbox",
403
- id: `collection-${b.id}`,
403
+ id: `collection-${y.id}`,
404
404
  checked: m,
405
- onChange: () => m ? r(b.id) : i(b.id),
405
+ onChange: () => m ? r(y.id) : i(y.id),
406
406
  className: "mapui:mt-0.5 mapui:h-4 mapui:w-4 mapui:cursor-pointer mapui:accent-blue-600"
407
407
  }
408
408
  ),
409
409
  /* @__PURE__ */ l(
410
410
  "label",
411
411
  {
412
- htmlFor: `collection-${b.id}`,
412
+ htmlFor: `collection-${y.id}`,
413
413
  className: "mapui:flex mapui:cursor-pointer mapui:flex-col mapui:gap-0.5",
414
414
  children: [
415
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: b.title ?? b.id }),
416
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: b.id }),
417
- b.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: b.description })
415
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: y.title ?? y.id }),
416
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: y.id }),
417
+ y.description && /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-400 mapui:line-clamp-2", children: y.description })
418
418
  ]
419
419
  }
420
420
  )
421
421
  ]
422
422
  },
423
- b.id
423
+ y.id
424
424
  );
425
425
  }) });
426
426
  }
427
- function Je({ value: e, onChange: t, availableIcons: i }) {
428
- const [r, n] = L(!1), [o, p] = L(-1), b = ue(null), m = Ee(), w = o >= 0 ? `${m}-option-${o}` : void 0, d = Pe(() => {
427
+ function He({ value: e, onChange: t, availableIcons: i }) {
428
+ const [r, n] = A(!1), [o, p] = A(-1), y = ue(null), m = Ie(), x = o >= 0 ? `${m}-option-${o}` : void 0, h = Ee(() => {
429
429
  if (!i || i.length === 0) return [];
430
430
  if (!e) return i;
431
- const k = e.toLowerCase();
432
- return i.filter((D) => D.toLowerCase().includes(k));
433
- }, [i, e]), f = r && d.length > 0, c = ze(
434
- (k) => {
435
- t(k), n(!1), p(-1);
431
+ const N = e.toLowerCase();
432
+ return i.filter((D) => D.toLowerCase().includes(N));
433
+ }, [i, e]), f = r && h.length > 0, d = We(
434
+ (N) => {
435
+ t(N), n(!1), p(-1);
436
436
  },
437
437
  [t]
438
- ), u = (k) => {
439
- t(k.target.value), n(!0), p(-1);
440
- }, s = (k) => {
441
- f && (k.key === "ArrowDown" ? (k.preventDefault(), p((D) => Math.min(D + 1, d.length - 1))) : k.key === "ArrowUp" ? (k.preventDefault(), p((D) => Math.max(D - 1, 0))) : k.key === "Enter" && o >= 0 ? (k.preventDefault(), c(d[o])) : k.key === "Escape" && (n(!1), p(-1)));
438
+ ), u = (N) => {
439
+ t(N.target.value), n(!0), p(-1);
440
+ }, s = (N) => {
441
+ f && (N.key === "ArrowDown" ? (N.preventDefault(), p((D) => Math.min(D + 1, h.length - 1))) : N.key === "ArrowUp" ? (N.preventDefault(), p((D) => Math.max(D - 1, 0))) : N.key === "Enter" && o >= 0 ? (N.preventDefault(), d(h[o])) : N.key === "Escape" && (n(!1), p(-1)));
442
442
  };
443
443
  X(() => {
444
- const k = (D) => {
445
- b.current && !b.current.contains(D.target) && (n(!1), p(-1));
444
+ const N = (D) => {
445
+ y.current && !y.current.contains(D.target) && (n(!1), p(-1));
446
446
  };
447
- return document.addEventListener("mousedown", k), () => document.removeEventListener("mousedown", k);
447
+ return document.addEventListener("mousedown", N), () => document.removeEventListener("mousedown", N);
448
448
  }, []);
449
449
  const v = "mapui:w-full mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
450
450
  return !i || i.length === 0 ? /* @__PURE__ */ a(
@@ -452,11 +452,11 @@ function Je({ value: e, onChange: t, availableIcons: i }) {
452
452
  {
453
453
  type: "text",
454
454
  value: e,
455
- onChange: (k) => t(k.target.value || ""),
455
+ onChange: (N) => t(N.target.value || ""),
456
456
  placeholder: "icon-name",
457
457
  className: v
458
458
  }
459
- ) : /* @__PURE__ */ l("div", { ref: b, className: "mapui:relative", children: [
459
+ ) : /* @__PURE__ */ l("div", { ref: y, className: "mapui:relative", children: [
460
460
  /* @__PURE__ */ a(
461
461
  "input",
462
462
  {
@@ -467,7 +467,7 @@ function Je({ value: e, onChange: t, availableIcons: i }) {
467
467
  "aria-expanded": f,
468
468
  "aria-autocomplete": "list",
469
469
  "aria-controls": m,
470
- "aria-activedescendant": w,
470
+ "aria-activedescendant": x,
471
471
  onChange: u,
472
472
  onFocus: () => n(!0),
473
473
  onKeyDown: s,
@@ -480,25 +480,25 @@ function Je({ value: e, onChange: t, availableIcons: i }) {
480
480
  id: m,
481
481
  role: "listbox",
482
482
  className: "mapui:absolute mapui:z-10 mapui:mt-1 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:shadow-lg mapui:max-h-48 mapui:overflow-y-auto mapui:p-0 mapui:m-0 mapui:list-none",
483
- children: d.map((k, D) => /* @__PURE__ */ a(
483
+ children: h.map((N, D) => /* @__PURE__ */ a(
484
484
  "li",
485
485
  {
486
486
  id: `${m}-option-${D}`,
487
487
  role: "option",
488
488
  "aria-selected": D === o,
489
- onMouseDown: (x) => {
490
- x.preventDefault(), c(k);
489
+ onMouseDown: (M) => {
490
+ M.preventDefault(), d(N);
491
491
  },
492
492
  className: `mapui:cursor-pointer mapui:px-2 mapui:py-1 mapui:text-sm mapui:font-mono ${D === o ? "mapui:bg-blue-100" : "hover:mapui:bg-gray-50"}`,
493
- children: k
493
+ children: N
494
494
  },
495
- `${D}-${k}`
495
+ `${D}-${N}`
496
496
  ))
497
497
  }
498
498
  )
499
499
  ] });
500
500
  }
501
- const he = [
501
+ const de = [
502
502
  "#4e79a7",
503
503
  "#f28e2b",
504
504
  "#e15759",
@@ -511,132 +511,132 @@ const he = [
511
511
  "#bab0ac"
512
512
  ];
513
513
  function ae(e) {
514
- return he[e % he.length];
514
+ return de[e % de.length];
515
515
  }
516
- function Ke(e) {
516
+ function Je(e) {
517
517
  return e[0] === "interpolate" ? "interpolate" : "match";
518
518
  }
519
- function Qe(e) {
519
+ function Ke(e) {
520
520
  const t = Array.isArray(e[1]) ? e[1][1] ?? "" : "", i = e[e.length - 1] ?? "#000000", r = [];
521
521
  for (let n = 2; n < e.length - 1; n += 2)
522
522
  r.push({ value: String(e[n] ?? ""), color: e[n + 1] ?? "#000000" });
523
523
  return { property: t, pairs: r, fallback: i };
524
524
  }
525
- function ge(e, t, i) {
525
+ function he(e, t, i) {
526
526
  const r = ["match", ["get", e]];
527
527
  for (const n of t)
528
528
  r.push(n.value, n.color);
529
529
  return r.push(i), r;
530
530
  }
531
- function Ze(e) {
531
+ function Qe(e) {
532
532
  const t = Array.isArray(e[2]) ? e[2][1] ?? "" : "", i = [];
533
533
  for (let r = 3; r < e.length; r += 2)
534
534
  i.push({ stop: Number(e[r] ?? 0), color: e[r + 1] ?? "#000000" });
535
535
  return { property: t, stops: i };
536
536
  }
537
- function be(e, t) {
537
+ function ge(e, t) {
538
538
  const i = ["interpolate", ["linear"], ["get", e]];
539
539
  for (const r of t)
540
540
  i.push(r.stop, r.color);
541
541
  return i;
542
542
  }
543
- const J = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", te = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", ye = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50";
544
- function ea({
543
+ const J = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", te = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50", be = "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50";
544
+ function Ze({
545
545
  value: e,
546
546
  onChange: t,
547
547
  availableProperties: i = [],
548
548
  onFetchDistinctValues: r
549
549
  }) {
550
- const [n, o] = L(() => Ke(e)), [p, b] = L(!1), m = Qe(e), w = Ze(e), d = n === "match" ? m.property : "", f = n === "match" ? m.pairs : [], c = n === "match" ? m.fallback : "#000000", u = n === "interpolate" ? w.property : "", s = n === "interpolate" ? w.stops : [], v = i.filter(
551
- (h) => !h.type || h.type === "string"
552
- ), k = i.filter(
553
- (h) => h.type === "number" || h.type === "integer"
554
- ), D = (h, T, I) => {
555
- t(ge(h, T, I));
556
- }, x = (h) => {
557
- D(h, f, c);
558
- }, $ = (h) => {
559
- D(d, f, h);
560
- }, C = (h, T) => {
561
- const I = f.map((A, W) => W === h ? { ...A, value: T } : A);
562
- D(d, I, c);
563
- }, P = (h, T) => {
564
- const I = f.map((A, W) => W === h ? { ...A, color: T } : A);
565
- D(d, I, c);
566
- }, E = (h) => {
567
- const T = f.filter((I, A) => A !== h);
568
- D(d, T, c);
569
- }, y = () => {
570
- const h = [...f, { value: "", color: ae(f.length) }];
571
- D(d, h, c);
572
- }, F = async () => {
573
- if (!(!r || !d)) {
574
- b(!0);
550
+ const [n, o] = A(() => Je(e)), [p, y] = A(!1), m = Ke(e), x = Qe(e), h = n === "match" ? m.property : "", f = n === "match" ? m.pairs : [], d = n === "match" ? m.fallback : "#000000", u = n === "interpolate" ? x.property : "", s = n === "interpolate" ? x.stops : [], v = i.filter(
551
+ (g) => !g.type || g.type === "string"
552
+ ), N = i.filter(
553
+ (g) => g.type === "number" || g.type === "integer"
554
+ ), D = (g, L, I) => {
555
+ t(he(g, L, I));
556
+ }, M = (g) => {
557
+ D(g, f, d);
558
+ }, w = (g) => {
559
+ D(h, f, g);
560
+ }, C = (g, L) => {
561
+ const I = f.map((E, $) => $ === g ? { ...E, value: L } : E);
562
+ D(h, I, d);
563
+ }, F = (g, L) => {
564
+ const I = f.map((E, $) => $ === g ? { ...E, color: L } : E);
565
+ D(h, I, d);
566
+ }, T = (g) => {
567
+ const L = f.filter((I, E) => E !== g);
568
+ D(h, L, d);
569
+ }, c = () => {
570
+ const g = [...f, { value: "", color: ae(f.length) }];
571
+ D(h, g, d);
572
+ }, P = async () => {
573
+ if (!(!r || !h)) {
574
+ y(!0);
575
575
  try {
576
- const T = (await r(d)).map((I, A) => ({
576
+ const L = (await r(h)).map((I, E) => ({
577
577
  value: I,
578
- color: ae(A)
578
+ color: ae(E)
579
579
  }));
580
- D(d, T, c);
580
+ D(h, L, d);
581
581
  } finally {
582
- b(!1);
582
+ y(!1);
583
583
  }
584
584
  }
585
- }, M = (h, T) => {
586
- t(be(h, T));
587
- }, g = (h) => {
588
- M(h, s);
589
- }, N = (h, T) => {
590
- const I = s.map((A, W) => W === h ? { ...A, stop: T } : A);
591
- M(u, I);
592
- }, O = (h, T) => {
593
- const I = s.map((A, W) => W === h ? { ...A, color: T } : A);
594
- M(u, I);
595
- }, q = (h) => {
596
- const T = s.filter((I, A) => A !== h);
597
- M(u, T);
598
- }, U = () => {
585
+ }, O = (g, L) => {
586
+ t(ge(g, L));
587
+ }, b = (g) => {
588
+ O(g, s);
589
+ }, k = (g, L) => {
590
+ const I = s.map((E, $) => $ === g ? { ...E, stop: L } : E);
591
+ O(u, I);
592
+ }, j = (g, L) => {
593
+ const I = s.map((E, $) => $ === g ? { ...E, color: L } : E);
594
+ O(u, I);
595
+ }, U = (g) => {
596
+ const L = s.filter((I, E) => E !== g);
597
+ O(u, L);
598
+ }, G = () => {
599
599
  var I;
600
- const h = ((I = s[s.length - 1]) == null ? void 0 : I.stop) ?? 0, T = [...s, { stop: h + 10, color: ae(s.length) }];
601
- M(u, T);
602
- }, R = (h) => {
603
- o(h), t(h === "match" ? ge("", [], "#000000") : be("", []));
600
+ const g = ((I = s[s.length - 1]) == null ? void 0 : I.stop) ?? 0, L = [...s, { stop: g + 10, color: ae(s.length) }];
601
+ O(u, L);
602
+ }, B = (g) => {
603
+ o(g), t(g === "match" ? he("", [], "#000000") : ge("", []));
604
604
  };
605
605
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
606
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((h) => /* @__PURE__ */ a(
606
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: ["match", "interpolate"].map((g) => /* @__PURE__ */ a(
607
607
  "button",
608
608
  {
609
609
  type: "button",
610
- onClick: () => R(h),
610
+ onClick: () => B(g),
611
611
  className: [
612
612
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-xs mapui:capitalize mapui:outline-none",
613
613
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
614
- n === h ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
614
+ n === g ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
615
615
  ].join(" "),
616
- children: h === "match" ? "Categorical" : "Gradient"
616
+ children: g === "match" ? "Categorical" : "Gradient"
617
617
  },
618
- h
618
+ g
619
619
  )) }),
620
- n === "match" && /* @__PURE__ */ l(B, { children: [
620
+ n === "match" && /* @__PURE__ */ l(q, { children: [
621
621
  /* @__PURE__ */ l(
622
622
  "select",
623
623
  {
624
- value: d,
625
- onChange: (h) => x(h.target.value),
624
+ value: h,
625
+ onChange: (g) => M(g.target.value),
626
626
  className: J,
627
627
  children: [
628
628
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
629
- v.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
629
+ v.map((g) => /* @__PURE__ */ a("option", { value: g.name, children: g.title ?? g.name }, g.name))
630
630
  ]
631
631
  }
632
632
  ),
633
- f.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: f.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
633
+ f.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: f.map((g, L) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
634
634
  /* @__PURE__ */ a(
635
635
  "input",
636
636
  {
637
637
  type: "text",
638
- value: h.value,
639
- onChange: (I) => C(T, I.target.value),
638
+ value: g.value,
639
+ onChange: (I) => C(L, I.target.value),
640
640
  placeholder: "value",
641
641
  className: `${J} mapui:flex-1`
642
642
  }
@@ -644,24 +644,24 @@ function ea({
644
644
  /* @__PURE__ */ a(
645
645
  Y,
646
646
  {
647
- value: h.color,
648
- onChange: (I) => P(T, I),
649
- label: `Color for "${h.value}"`
647
+ value: g.color,
648
+ onChange: (I) => F(L, I),
649
+ label: `Color for "${g.value}"`
650
650
  }
651
651
  ),
652
- /* @__PURE__ */ a("button", { type: "button", onClick: () => E(T), className: ye, children: "×" })
653
- ] }, T)) }),
652
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => T(L), className: be, children: "×" })
653
+ ] }, L)) }),
654
654
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
655
655
  /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-gray-500 mapui:shrink-0", children: "Fallback:" }),
656
- /* @__PURE__ */ a(Y, { value: c, onChange: $, label: "Fallback color" })
656
+ /* @__PURE__ */ a(Y, { value: d, onChange: w, label: "Fallback color" })
657
657
  ] }),
658
658
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:gap-2", children: [
659
- /* @__PURE__ */ a("button", { type: "button", onClick: y, className: te, children: "+ Add value" }),
660
- r && d && /* @__PURE__ */ a(
659
+ /* @__PURE__ */ a("button", { type: "button", onClick: c, className: te, children: "+ Add value" }),
660
+ r && h && /* @__PURE__ */ a(
661
661
  "button",
662
662
  {
663
663
  type: "button",
664
- onClick: F,
664
+ onClick: P,
665
665
  disabled: p,
666
666
  className: te,
667
667
  children: p ? "Loading…" : "Auto-populate"
@@ -669,26 +669,26 @@ function ea({
669
669
  )
670
670
  ] })
671
671
  ] }),
672
- n === "interpolate" && /* @__PURE__ */ l(B, { children: [
672
+ n === "interpolate" && /* @__PURE__ */ l(q, { children: [
673
673
  /* @__PURE__ */ l(
674
674
  "select",
675
675
  {
676
676
  value: u,
677
- onChange: (h) => g(h.target.value),
677
+ onChange: (g) => b(g.target.value),
678
678
  className: J,
679
679
  children: [
680
680
  /* @__PURE__ */ a("option", { value: "", children: "Select a numeric property…" }),
681
- k.map((h) => /* @__PURE__ */ a("option", { value: h.name, children: h.title ?? h.name }, h.name))
681
+ N.map((g) => /* @__PURE__ */ a("option", { value: g.name, children: g.title ?? g.name }, g.name))
682
682
  ]
683
683
  }
684
684
  ),
685
- s.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: s.map((h, T) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
685
+ s.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: s.map((g, L) => /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
686
686
  /* @__PURE__ */ a(
687
687
  "input",
688
688
  {
689
689
  type: "number",
690
- value: h.stop,
691
- onChange: (I) => N(T, parseFloat(I.target.value) || 0),
690
+ value: g.stop,
691
+ onChange: (I) => k(L, parseFloat(I.target.value) || 0),
692
692
  placeholder: "stop",
693
693
  className: `${J} mapui:w-24`
694
694
  }
@@ -696,19 +696,19 @@ function ea({
696
696
  /* @__PURE__ */ a(
697
697
  Y,
698
698
  {
699
- value: h.color,
700
- onChange: (I) => O(T, I),
701
- label: `Color at stop ${h.stop}`
699
+ value: g.color,
700
+ onChange: (I) => j(L, I),
701
+ label: `Color at stop ${g.stop}`
702
702
  }
703
703
  ),
704
- /* @__PURE__ */ a("button", { type: "button", onClick: () => q(T), className: ye, children: "×" })
705
- ] }, T)) }),
706
- /* @__PURE__ */ a("button", { type: "button", onClick: U, className: te, children: "+ Add stop" })
704
+ /* @__PURE__ */ a("button", { type: "button", onClick: () => U(L), className: be, children: "×" })
705
+ ] }, L)) }),
706
+ /* @__PURE__ */ a("button", { type: "button", onClick: G, className: te, children: "+ Add stop" })
707
707
  ] })
708
708
  ] });
709
709
  }
710
710
  const z = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
711
- function aa({
711
+ function ea({
712
712
  value: e,
713
713
  onChange: t
714
714
  }) {
@@ -740,7 +740,7 @@ function aa({
740
740
  )
741
741
  ] });
742
742
  }
743
- function ta({
743
+ function aa({
744
744
  value: e,
745
745
  onChange: t
746
746
  }) {
@@ -761,7 +761,7 @@ function ta({
761
761
  /* @__PURE__ */ a("span", { className: "mapui:w-8 mapui:text-right mapui:text-xs mapui:text-gray-600", children: i.toFixed(2) })
762
762
  ] });
763
763
  }
764
- function fe({
764
+ function ye({
765
765
  def: e,
766
766
  value: t,
767
767
  onChange: i,
@@ -769,10 +769,10 @@ function fe({
769
769
  availableProperties: n,
770
770
  onFetchDistinctValues: o
771
771
  }) {
772
- var p, b;
772
+ var p, y;
773
773
  switch (e.widget) {
774
774
  case "color": {
775
- const m = Array.isArray(t), w = m ? t[t.length - 1] ?? "#000000" : "#000000";
775
+ const m = Array.isArray(t), x = m ? t[t.length - 1] ?? "#000000" : "#000000";
776
776
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1 mapui:w-full", children: [
777
777
  /* @__PURE__ */ a("div", { className: "mapui:flex mapui:items-center mapui:justify-end", children: /* @__PURE__ */ a(
778
778
  "button",
@@ -780,7 +780,7 @@ function fe({
780
780
  type: "button",
781
781
  title: m ? "Switch to static color" : "Switch to data-driven color",
782
782
  onClick: () => {
783
- i(m ? w : ["match", ["get", ""], w]);
783
+ i(m ? x : ["match", ["get", ""], x]);
784
784
  },
785
785
  className: [
786
786
  "mapui:cursor-pointer mapui:rounded mapui:border mapui:px-1.5 mapui:py-0.5 mapui:font-mono mapui:text-xs mapui:outline-none",
@@ -791,10 +791,10 @@ function fe({
791
791
  }
792
792
  ) }),
793
793
  m ? /* @__PURE__ */ a(
794
- ea,
794
+ Ze,
795
795
  {
796
796
  value: t,
797
- onChange: (d) => i(d),
797
+ onChange: (h) => i(h),
798
798
  availableProperties: n,
799
799
  onFetchDistinctValues: o
800
800
  }
@@ -810,7 +810,7 @@ function fe({
810
810
  }
811
811
  case "opacity":
812
812
  return /* @__PURE__ */ a(
813
- ta,
813
+ aa,
814
814
  {
815
815
  value: t,
816
816
  onChange: i
@@ -846,12 +846,12 @@ function fe({
846
846
  value: t ?? ((p = e.options) == null ? void 0 : p[0]) ?? "",
847
847
  onChange: (m) => i(m.target.value),
848
848
  className: z,
849
- children: (b = e.options) == null ? void 0 : b.map((m) => /* @__PURE__ */ a("option", { value: m, children: m }, m))
849
+ children: (y = e.options) == null ? void 0 : y.map((m) => /* @__PURE__ */ a("option", { value: m, children: m }, m))
850
850
  }
851
851
  );
852
852
  case "translate":
853
853
  return /* @__PURE__ */ a(
854
- aa,
854
+ ea,
855
855
  {
856
856
  value: t,
857
857
  onChange: i
@@ -859,24 +859,24 @@ function fe({
859
859
  );
860
860
  case "dasharray":
861
861
  case "stringArray": {
862
- const m = t, w = m ? m.join(", ") : "";
862
+ const m = t, x = m ? m.join(", ") : "";
863
863
  return /* @__PURE__ */ a(
864
864
  "input",
865
865
  {
866
866
  type: "text",
867
- value: w,
868
- onChange: (d) => {
869
- const f = d.target.value.trim();
867
+ value: x,
868
+ onChange: (h) => {
869
+ const f = h.target.value.trim();
870
870
  if (!f) {
871
871
  i(void 0);
872
872
  return;
873
873
  }
874
874
  if (e.widget === "dasharray") {
875
- const c = f.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
876
- i(c.length > 0 ? c : void 0);
875
+ const d = f.split(",").map((u) => parseFloat(u.trim())).filter((u) => !isNaN(u));
876
+ i(d.length > 0 ? d : void 0);
877
877
  } else {
878
- const c = f.split(",").map((u) => u.trim()).filter(Boolean);
879
- i(c.length > 0 ? c : void 0);
878
+ const d = f.split(",").map((u) => u.trim()).filter(Boolean);
879
+ i(d.length > 0 ? d : void 0);
880
880
  }
881
881
  },
882
882
  placeholder: e.widget === "dasharray" ? "e.g. 2, 4" : "comma-separated",
@@ -896,7 +896,7 @@ function fe({
896
896
  );
897
897
  case "icon-image":
898
898
  return /* @__PURE__ */ a(
899
- Je,
899
+ He,
900
900
  {
901
901
  value: t ?? "",
902
902
  onChange: (m) => i(m ?? void 0),
@@ -907,8 +907,8 @@ function fe({
907
907
  return null;
908
908
  }
909
909
  }
910
- function ia({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: n, onFetchDistinctValues: o }) {
911
- const p = e.enableDefault !== void 0, b = t !== void 0;
910
+ function ta({ def: e, value: t, onChange: i, availableIcons: r, availableProperties: n, onFetchDistinctValues: o }) {
911
+ const p = e.enableDefault !== void 0, y = t !== void 0;
912
912
  if (p && e.widget === "boolean") {
913
913
  const m = !e.enableDefault;
914
914
  return /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
@@ -916,8 +916,8 @@ function ia({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
916
916
  {
917
917
  type: "checkbox",
918
918
  checked: t === m,
919
- onChange: (w) => {
920
- i(e.key, w.target.checked ? m : void 0);
919
+ onChange: (x) => {
920
+ i(e.key, x.target.checked ? m : void 0);
921
921
  },
922
922
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
923
923
  }
@@ -928,15 +928,15 @@ function ia({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
928
928
  "input",
929
929
  {
930
930
  type: "checkbox",
931
- checked: b,
931
+ checked: y,
932
932
  onChange: (m) => {
933
933
  i(e.key, m.target.checked ? e.enableDefault : void 0);
934
934
  },
935
935
  className: "mapui:h-4 mapui:w-4 mapui:shrink-0 mapui:accent-blue-600"
936
936
  }
937
937
  ),
938
- b && /* @__PURE__ */ a(
939
- fe,
938
+ y && /* @__PURE__ */ a(
939
+ ye,
940
940
  {
941
941
  def: e,
942
942
  value: t,
@@ -947,7 +947,7 @@ function ia({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
947
947
  }
948
948
  )
949
949
  ] }) }) : /* @__PURE__ */ a(S, { label: e.label, description: e.description, children: /* @__PURE__ */ a(
950
- fe,
950
+ ye,
951
951
  {
952
952
  def: e,
953
953
  value: t,
@@ -958,7 +958,7 @@ function ia({ def: e, value: t, onChange: i, availableIcons: r, availablePropert
958
958
  }
959
959
  ) });
960
960
  }
961
- function xe({
961
+ function fe({
962
962
  title: e,
963
963
  properties: t,
964
964
  values: i,
@@ -966,31 +966,31 @@ function xe({
966
966
  defaultOpen: n = !1,
967
967
  availableIcons: o,
968
968
  availableProperties: p,
969
- onFetchDistinctValues: b
969
+ onFetchDistinctValues: y
970
970
  }) {
971
971
  const m = t.filter(
972
- (w) => w.enableDefault !== void 0 && i[w.key] !== void 0
972
+ (x) => x.enableDefault !== void 0 && i[x.key] !== void 0
973
973
  ).length;
974
- return /* @__PURE__ */ a(_, { title: e, defaultOpen: n, badge: m || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((w) => /* @__PURE__ */ a(
975
- ia,
974
+ return /* @__PURE__ */ a(_, { title: e, defaultOpen: n, badge: m || void 0, children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: t.map((x) => /* @__PURE__ */ a(
975
+ ta,
976
976
  {
977
- def: w,
978
- value: i[w.key],
977
+ def: x,
978
+ value: i[x.key],
979
979
  onChange: r,
980
980
  availableIcons: o,
981
981
  availableProperties: p,
982
- onFetchDistinctValues: b
982
+ onFetchDistinctValues: y
983
983
  },
984
- w.key
984
+ x.key
985
985
  )) }) });
986
986
  }
987
- function G(e) {
987
+ function W(e) {
988
988
  return Array.isArray(e);
989
989
  }
990
- function ra(e) {
990
+ function ia(e) {
991
991
  return e[0] === "match" ? "match" : e[0] === "interpolate" ? "interpolate" : null;
992
992
  }
993
- function Oe(e) {
993
+ function Me(e) {
994
994
  if (e[0] === "match") {
995
995
  const t = [];
996
996
  for (let r = 3; r < e.length; r += 2)
@@ -1006,7 +1006,7 @@ function Oe(e) {
1006
1006
  }
1007
1007
  return [];
1008
1008
  }
1009
- function la(e) {
1009
+ function ra(e) {
1010
1010
  if (e[0] === "match") {
1011
1011
  const t = [];
1012
1012
  for (let r = 2; r < e.length - 1; r += 2) {
@@ -1026,11 +1026,11 @@ function la(e) {
1026
1026
  }
1027
1027
  return [];
1028
1028
  }
1029
- function na(e) {
1029
+ function la(e) {
1030
1030
  const t = e[0] === "match" ? e[1] : e[0] === "interpolate" ? e[2] : null;
1031
1031
  return Array.isArray(t) && t[0] === "get" && typeof t[1] == "string" ? t[1] : null;
1032
1032
  }
1033
- function pa(e) {
1033
+ function na(e) {
1034
1034
  switch (e.type) {
1035
1035
  case "fill":
1036
1036
  return e.paint["fill-color"] ?? "#000000";
@@ -1042,7 +1042,7 @@ function pa(e) {
1042
1042
  return e.paint["text-color"] ?? e.paint["icon-color"] ?? "#000000";
1043
1043
  }
1044
1044
  }
1045
- function oa(e) {
1045
+ function pa(e) {
1046
1046
  switch (e.type) {
1047
1047
  case "fill":
1048
1048
  return "square";
@@ -1054,7 +1054,7 @@ function oa(e) {
1054
1054
  }
1055
1055
  }
1056
1056
  function ie({ expr: e, height: t }) {
1057
- const i = Oe(e);
1057
+ const i = Me(e);
1058
1058
  if (i.length === 0)
1059
1059
  return /* @__PURE__ */ a(
1060
1060
  "div",
@@ -1077,10 +1077,10 @@ function ie({ expr: e, height: t }) {
1077
1077
  }
1078
1078
  );
1079
1079
  }
1080
- function we(e, t) {
1081
- return typeof e == "string" ? e : G(e) ? Oe(e)[0] ?? t : t;
1080
+ function xe(e, t) {
1081
+ return typeof e == "string" ? e : W(e) ? Me(e)[0] ?? t : t;
1082
1082
  }
1083
- function ua({ style: e }) {
1083
+ function oa({ style: e }) {
1084
1084
  if (e.type === "fill") {
1085
1085
  const r = e.paint["fill-color"];
1086
1086
  return /* @__PURE__ */ a(
@@ -1088,7 +1088,7 @@ function ua({ style: e }) {
1088
1088
  {
1089
1089
  className: "mapui:h-8 mapui:w-full mapui:rounded mapui:border mapui:border-gray-200 mapui:overflow-hidden",
1090
1090
  "aria-label": "Style preview",
1091
- children: G(r) ? /* @__PURE__ */ a(ie, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1091
+ children: W(r) ? /* @__PURE__ */ a(ie, { expr: r, height: 32 }) : /* @__PURE__ */ a(
1092
1092
  "div",
1093
1093
  {
1094
1094
  style: {
@@ -1096,7 +1096,7 @@ function ua({ style: e }) {
1096
1096
  height: "100%",
1097
1097
  backgroundColor: r,
1098
1098
  opacity: e.paint["fill-opacity"],
1099
- outline: e.paint["fill-outline-color"] && !G(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1099
+ outline: e.paint["fill-outline-color"] && !W(e.paint["fill-outline-color"]) ? `2px solid ${e.paint["fill-outline-color"]}` : void 0
1100
1100
  }
1101
1101
  }
1102
1102
  )
@@ -1110,7 +1110,7 @@ function ua({ style: e }) {
1110
1110
  {
1111
1111
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:rounded mapui:border mapui:border-gray-200 mapui:px-2",
1112
1112
  "aria-label": "Style preview",
1113
- children: G(r) ? /* @__PURE__ */ a(ie, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1113
+ children: W(r) ? /* @__PURE__ */ a(ie, { expr: r, height: e.paint["line-width"] }) : /* @__PURE__ */ a(
1114
1114
  "div",
1115
1115
  {
1116
1116
  style: {
@@ -1131,7 +1131,7 @@ function ua({ style: e }) {
1131
1131
  {
1132
1132
  className: "mapui:flex mapui:h-8 mapui:w-full mapui:items-center mapui:justify-center mapui:rounded mapui:border mapui:border-gray-200",
1133
1133
  "aria-label": "Style preview",
1134
- children: G(r) ? /* @__PURE__ */ a("div", { style: { width: n, height: n, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(ie, { expr: r, height: n }) }) : /* @__PURE__ */ a(
1134
+ children: W(r) ? /* @__PURE__ */ a("div", { style: { width: n, height: n, borderRadius: "50%", overflow: "hidden" }, children: /* @__PURE__ */ a(ie, { expr: r, height: n }) }) : /* @__PURE__ */ a(
1135
1135
  "div",
1136
1136
  {
1137
1137
  style: {
@@ -1140,14 +1140,14 @@ function ua({ style: e }) {
1140
1140
  backgroundColor: r,
1141
1141
  opacity: e.paint["circle-opacity"],
1142
1142
  borderRadius: "50%",
1143
- border: e.paint["circle-stroke-color"] && !G(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1143
+ border: e.paint["circle-stroke-color"] && !W(e.paint["circle-stroke-color"]) ? `${e.paint["circle-stroke-width"] ?? 1}px solid ${e.paint["circle-stroke-color"]}` : void 0
1144
1144
  }
1145
1145
  }
1146
1146
  )
1147
1147
  }
1148
1148
  );
1149
1149
  }
1150
- const t = we(e.paint["text-color"], "#333333"), i = we(e.paint["icon-color"], "#333333");
1150
+ const t = xe(e.paint["text-color"], "#333333"), i = xe(e.paint["icon-color"], "#333333");
1151
1151
  return /* @__PURE__ */ a(
1152
1152
  "div",
1153
1153
  {
@@ -1167,7 +1167,7 @@ function ua({ style: e }) {
1167
1167
  }
1168
1168
  );
1169
1169
  }
1170
- const ma = [
1170
+ const ua = [
1171
1171
  // Appearance (paint)
1172
1172
  { key: "fill-color", label: "Fill Color", widget: "color", group: "Appearance", category: "paint" },
1173
1173
  { key: "fill-opacity", label: "Fill Opacity", widget: "opacity", group: "Appearance", category: "paint" },
@@ -1179,7 +1179,7 @@ const ma = [
1179
1179
  { key: "fill-translate-anchor", label: "Translate Anchor", widget: "enum", group: "Transform", category: "paint", options: ["map", "viewport"], enableDefault: "map", description: '"map" moves the fill with the map when panning; "viewport" keeps the offset fixed on screen.' },
1180
1180
  // Sorting (layout)
1181
1181
  { key: "fill-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1182
- ], sa = [
1182
+ ], ma = [
1183
1183
  // Appearance (paint)
1184
1184
  { key: "line-color", label: "Line Color", widget: "color", group: "Appearance", category: "paint" },
1185
1185
  { key: "line-width", label: "Line Width", widget: "number", group: "Appearance", category: "paint", min: 0, step: 0.5 },
@@ -1200,7 +1200,7 @@ const ma = [
1200
1200
  { key: "line-round-limit", label: "Round Limit", widget: "number", group: "Cap & Join", category: "layout", step: 0.1, enableDefault: 1.05, description: 'When line-join is "round", angles sharper than this threshold (in radians) are bevelled instead of rounded.' },
1201
1201
  // Sorting (layout)
1202
1202
  { key: "line-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1203
- ], ca = [
1203
+ ], sa = [
1204
1204
  // Appearance (paint)
1205
1205
  { key: "circle-color", label: "Circle Color", widget: "color", group: "Appearance", category: "paint" },
1206
1206
  { key: "circle-radius", label: "Radius", widget: "number", group: "Appearance", category: "paint", min: 0, step: 1 },
@@ -1218,7 +1218,7 @@ const ma = [
1218
1218
  { key: "circle-pitch-alignment", label: "Pitch Alignment", widget: "enum", group: "Alignment", category: "paint", options: ["map", "viewport"], enableDefault: "viewport", description: '"map" orients circles flat on the map surface; "viewport" keeps circles facing the screen (default).' },
1219
1219
  // Sorting (layout)
1220
1220
  { key: "circle-sort-key", label: "Sort Key", widget: "number", group: "Sorting", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are drawn on top of features with a lower sort key within this layer." }
1221
- ], da = [
1221
+ ], ca = [
1222
1222
  // Icon Appearance (paint)
1223
1223
  { key: "icon-color", label: "Icon Color", widget: "color", group: "Icon Appearance", category: "paint", enableDefault: "#000000" },
1224
1224
  { key: "icon-opacity", label: "Icon Opacity", widget: "opacity", group: "Icon Appearance", category: "paint", enableDefault: 1 },
@@ -1267,16 +1267,16 @@ const ma = [
1267
1267
  { key: "symbol-avoid-edges", label: "Avoid Edges", widget: "boolean", group: "Placement", category: "layout", enableDefault: !1, description: "When enabled, symbols near tile edges are hidden to avoid being clipped or doubled at tile boundaries." },
1268
1268
  { key: "symbol-sort-key", label: "Sort Key", widget: "number", group: "Placement", category: "layout", step: 1, enableDefault: 0, description: "Features with a higher sort key are prioritised in collision detection and drawn on top within this layer." },
1269
1269
  { key: "symbol-z-order", label: "Z-Order", widget: "enum", group: "Placement", category: "layout", options: ["auto", "viewport-y", "source"], enableDefault: "auto", description: '"viewport-y" renders symbols in top-to-bottom screen order (closer = higher); "source" preserves data source order; "auto" uses "viewport-y" when sort-key is unset.' }
1270
- ], ha = {
1271
- fill: ma,
1272
- line: sa,
1273
- circle: ca,
1274
- symbol: da
1270
+ ], da = {
1271
+ fill: ua,
1272
+ line: ma,
1273
+ circle: sa,
1274
+ symbol: ca
1275
1275
  };
1276
- function ga(e) {
1277
- return ha[e] ?? [];
1276
+ function ha(e) {
1277
+ return da[e] ?? [];
1278
1278
  }
1279
- function ve(e) {
1279
+ function we(e) {
1280
1280
  const t = {};
1281
1281
  for (const i of e)
1282
1282
  t[i.group] || (t[i.group] = []), t[i.group].push(i);
@@ -1285,151 +1285,151 @@ function ve(e) {
1285
1285
  const me = {
1286
1286
  type: "fill",
1287
1287
  paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 }
1288
- }, je = {
1288
+ }, ga = {
1289
1289
  type: "line",
1290
1290
  paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 }
1291
- }, $e = {
1291
+ }, Oe = {
1292
1292
  type: "circle",
1293
1293
  paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 }
1294
- }, Re = {
1294
+ }, ba = {
1295
1295
  type: "symbol",
1296
1296
  paint: { "text-color": "#333333" },
1297
1297
  layout: { "text-field": "{name}", "text-size": 14 }
1298
- }, ba = {
1298
+ }, ya = {
1299
1299
  layout: { "icon-image": "" }
1300
1300
  };
1301
- function Ne(e) {
1301
+ function ve(e) {
1302
1302
  if (e.type !== "symbol") return "text";
1303
1303
  const t = e.layout ?? {}, i = "icon-image" in t, r = "text-field" in t;
1304
1304
  return i && r ? "both" : i ? "icon" : "text";
1305
1305
  }
1306
- const ya = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", K = {
1306
+ const fa = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", K = {
1307
1307
  fill: "Fill",
1308
1308
  line: "Line",
1309
1309
  circle: "Circle",
1310
1310
  symbol: "Symbol"
1311
- }, fa = ["text", "icon", "both"];
1312
- function xa({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: n, availableProperties: o, onFetchDistinctValues: p }) {
1313
- const b = r ?? (i ? [i] : []), [m, w] = L(() => Ne(e));
1311
+ }, xa = ["text", "icon", "both"];
1312
+ function wa({ value: e, onChange: t, suggestedType: i, suggestedTypes: r, availableIcons: n, availableProperties: o, onFetchDistinctValues: p }) {
1313
+ const y = r ?? (i ? [i] : []), [m, x] = A(() => ve(e));
1314
1314
  X(() => {
1315
- w(Ne(e));
1315
+ x(ve(e));
1316
1316
  }, [e.type]);
1317
- const d = (y) => {
1318
- t(y === "fill" ? me : y === "line" ? je : y === "circle" ? $e : Re);
1319
- }, f = (y) => {
1320
- if (y === m) return;
1321
- const F = e.paint ?? {}, M = e.layout ?? {};
1322
- let g = { ...F }, N = { ...M };
1323
- y === "icon" ? (g = Object.fromEntries(Object.entries(g).filter(([O]) => !O.startsWith("text-"))), N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("text-"))), "icon-image" in N || (N["icon-image"] = ba.layout["icon-image"])) : y === "text" && (g = Object.fromEntries(Object.entries(g).filter(([O]) => !O.startsWith("icon-"))), N = Object.fromEntries(Object.entries(N).filter(([O]) => !O.startsWith("icon-"))), "text-field" in N || (N["text-field"] = "{name}"), "text-size" in N || (N["text-size"] = 14), "text-color" in g || (g["text-color"] = "#333333")), w(y), t({
1317
+ const h = (c) => {
1318
+ t(c === "fill" ? me : c === "line" ? ga : c === "circle" ? Oe : ba);
1319
+ }, f = (c) => {
1320
+ if (c === m) return;
1321
+ const P = e.paint ?? {}, O = e.layout ?? {};
1322
+ let b = { ...P }, k = { ...O };
1323
+ c === "icon" ? (b = Object.fromEntries(Object.entries(b).filter(([j]) => !j.startsWith("text-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("text-"))), "icon-image" in k || (k["icon-image"] = ya.layout["icon-image"])) : c === "text" && (b = Object.fromEntries(Object.entries(b).filter(([j]) => !j.startsWith("icon-"))), k = Object.fromEntries(Object.entries(k).filter(([j]) => !j.startsWith("icon-"))), "text-field" in k || (k["text-field"] = "{name}"), "text-size" in k || (k["text-size"] = 14), "text-color" in b || (b["text-color"] = "#333333")), x(c), t({
1324
1324
  ...e,
1325
- paint: g,
1326
- layout: Object.keys(N).length > 0 ? N : void 0
1325
+ paint: b,
1326
+ layout: Object.keys(k).length > 0 ? k : void 0
1327
1327
  });
1328
- }, c = (y, F) => {
1329
- const M = { ...e.paint, [y]: F };
1330
- for (const g of Object.keys(M))
1331
- M[g] === void 0 && delete M[g];
1332
- t({ ...e, paint: M });
1333
- }, u = (y, F) => {
1334
- const g = { ...e.layout ?? {}, [y]: F };
1335
- for (const N of Object.keys(g))
1336
- g[N] === void 0 && delete g[N];
1328
+ }, d = (c, P) => {
1329
+ const O = { ...e.paint, [c]: P };
1330
+ for (const b of Object.keys(O))
1331
+ O[b] === void 0 && delete O[b];
1332
+ t({ ...e, paint: O });
1333
+ }, u = (c, P) => {
1334
+ const b = { ...e.layout ?? {}, [c]: P };
1335
+ for (const k of Object.keys(b))
1336
+ b[k] === void 0 && delete b[k];
1337
1337
  t({
1338
1338
  ...e,
1339
- layout: Object.keys(g).length > 0 ? g : void 0
1339
+ layout: Object.keys(b).length > 0 ? b : void 0
1340
1340
  });
1341
1341
  };
1342
- let s = ga(e.type);
1343
- e.type === "symbol" && (m === "text" ? s = s.filter((y) => !y.key.startsWith("icon-")) : m === "icon" && (s = s.filter((y) => !y.key.startsWith("text-"))));
1344
- const v = s.filter((y) => y.category === "paint"), k = s.filter((y) => y.category === "layout"), D = ve(v), x = ve(k), $ = e.paint, C = e.layout ?? {}, P = Object.keys(D), E = Object.keys(x);
1342
+ let s = ha(e.type);
1343
+ e.type === "symbol" && (m === "text" ? s = s.filter((c) => !c.key.startsWith("icon-")) : m === "icon" && (s = s.filter((c) => !c.key.startsWith("text-"))));
1344
+ const v = s.filter((c) => c.category === "paint"), N = s.filter((c) => c.category === "layout"), D = we(v), M = we(N), w = e.paint, C = e.layout ?? {}, F = Object.keys(D), T = Object.keys(M);
1345
1345
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1346
- b.length > 0 && !b.includes(e.type) && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
1346
+ y.length > 0 && !y.includes(e.type) && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:rounded mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:px-3 mapui:py-2 mapui:text-sm mapui:text-blue-800", children: [
1347
1347
  /* @__PURE__ */ l("span", { children: [
1348
1348
  "Detected geometry is suitable for",
1349
1349
  " ",
1350
- b.map((y, F) => /* @__PURE__ */ l("span", { children: [
1351
- F > 0 && (F === b.length - 1 ? " or " : ", "),
1352
- /* @__PURE__ */ a("strong", { children: K[y] })
1353
- ] }, y)),
1350
+ y.map((c, P) => /* @__PURE__ */ l("span", { children: [
1351
+ P > 0 && (P === y.length - 1 ? " or " : ", "),
1352
+ /* @__PURE__ */ a("strong", { children: K[c] })
1353
+ ] }, c)),
1354
1354
  " ",
1355
1355
  "style."
1356
1356
  ] }),
1357
- /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: b.map((y) => /* @__PURE__ */ a(
1357
+ /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-1", children: y.map((c) => /* @__PURE__ */ a(
1358
1358
  "button",
1359
1359
  {
1360
1360
  type: "button",
1361
- onClick: () => d(y),
1361
+ onClick: () => h(c),
1362
1362
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-400 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-blue-700 hover:mapui:bg-blue-100",
1363
- children: K[y]
1363
+ children: K[c]
1364
1364
  },
1365
- y
1365
+ c
1366
1366
  )) })
1367
1367
  ] }),
1368
1368
  /* @__PURE__ */ a(S, { label: "Style Type", children: /* @__PURE__ */ a(
1369
1369
  "select",
1370
1370
  {
1371
1371
  value: e.type,
1372
- onChange: (y) => d(y.target.value),
1373
- className: ya,
1374
- children: Object.keys(K).map((y) => /* @__PURE__ */ a("option", { value: y, children: K[y] }, y))
1372
+ onChange: (c) => h(c.target.value),
1373
+ className: fa,
1374
+ children: Object.keys(K).map((c) => /* @__PURE__ */ a("option", { value: c, children: K[c] }, c))
1375
1375
  }
1376
1376
  ) }),
1377
- e.type === "symbol" && /* @__PURE__ */ a(S, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: fa.map((y) => /* @__PURE__ */ a(
1377
+ e.type === "symbol" && /* @__PURE__ */ a(S, { label: "Symbol Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:overflow-hidden mapui:rounded mapui:border mapui:border-gray-300", children: xa.map((c) => /* @__PURE__ */ a(
1378
1378
  "button",
1379
1379
  {
1380
1380
  type: "button",
1381
- onClick: () => f(y),
1381
+ onClick: () => f(c),
1382
1382
  className: [
1383
1383
  "mapui:flex-1 mapui:cursor-pointer mapui:border-0 mapui:px-3 mapui:py-1 mapui:text-sm mapui:capitalize mapui:outline-none",
1384
1384
  "focus:mapui:ring-1 focus:mapui:ring-inset focus:mapui:ring-blue-400",
1385
- m === y ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1385
+ m === c ? "mapui:bg-blue-500 mapui:text-white" : "mapui:bg-white mapui:text-gray-700 hover:mapui:bg-gray-50"
1386
1386
  ].join(" "),
1387
- children: y === "both" ? "Both" : y.charAt(0).toUpperCase() + y.slice(1)
1387
+ children: c === "both" ? "Both" : c.charAt(0).toUpperCase() + c.slice(1)
1388
1388
  },
1389
- y
1389
+ c
1390
1390
  )) }) }),
1391
1391
  /* @__PURE__ */ l("div", { className: "mapui:rounded mapui:border mapui:border-gray-100 mapui:p-2", children: [
1392
1392
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-1 mapui:text-xs mapui:text-gray-500", children: "Preview" }),
1393
- /* @__PURE__ */ a(ua, { style: e })
1393
+ /* @__PURE__ */ a(oa, { style: e })
1394
1394
  ] }),
1395
- E.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1395
+ T.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1396
1396
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Layout" }),
1397
- E.map((y, F) => /* @__PURE__ */ a(
1398
- xe,
1397
+ T.map((c, P) => /* @__PURE__ */ a(
1398
+ fe,
1399
1399
  {
1400
- title: y,
1401
- properties: x[y],
1400
+ title: c,
1401
+ properties: M[c],
1402
1402
  values: C,
1403
1403
  onChange: u,
1404
- defaultOpen: F === 0,
1404
+ defaultOpen: P === 0,
1405
1405
  availableIcons: n,
1406
1406
  availableProperties: o,
1407
1407
  onFetchDistinctValues: p
1408
1408
  },
1409
- y
1409
+ c
1410
1410
  ))
1411
1411
  ] }),
1412
- P.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1412
+ F.length > 0 && /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1413
1413
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-xs mapui:font-medium mapui:uppercase mapui:tracking-wide mapui:text-gray-500", children: "Paint" }),
1414
- P.map((y) => /* @__PURE__ */ a(
1415
- xe,
1414
+ F.map((c) => /* @__PURE__ */ a(
1415
+ fe,
1416
1416
  {
1417
- title: y,
1418
- properties: D[y],
1419
- values: $,
1420
- onChange: c,
1417
+ title: c,
1418
+ properties: D[c],
1419
+ values: w,
1420
+ onChange: d,
1421
1421
  defaultOpen: !1,
1422
1422
  availableIcons: n,
1423
1423
  availableProperties: o,
1424
1424
  onFetchDistinctValues: p
1425
1425
  },
1426
- y
1426
+ c
1427
1427
  ))
1428
1428
  ] })
1429
1429
  ] });
1430
1430
  }
1431
- const ke = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1432
- function wa({ value: e, onChange: t }) {
1431
+ const Ne = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1432
+ function va({ value: e, onChange: t }) {
1433
1433
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1434
1434
  /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
1435
1435
  "input",
@@ -1438,7 +1438,7 @@ function wa({ value: e, onChange: t }) {
1438
1438
  value: e.label,
1439
1439
  onChange: (i) => t({ ...e, label: i.target.value }),
1440
1440
  placeholder: "Legend entry label",
1441
- className: ke
1441
+ className: Ne
1442
1442
  }
1443
1443
  ) }),
1444
1444
  /* @__PURE__ */ a(S, { label: "Color", children: /* @__PURE__ */ a(
@@ -1454,7 +1454,7 @@ function wa({ value: e, onChange: t }) {
1454
1454
  {
1455
1455
  value: e.shape ?? "square",
1456
1456
  onChange: (i) => t({ ...e, shape: i.target.value }),
1457
- className: ke,
1457
+ className: Ne,
1458
1458
  children: [
1459
1459
  /* @__PURE__ */ a("option", { value: "square", children: "Square" }),
1460
1460
  /* @__PURE__ */ a("option", { value: "circle", children: "Circle" }),
@@ -1464,45 +1464,45 @@ function wa({ value: e, onChange: t }) {
1464
1464
  ) })
1465
1465
  ] });
1466
1466
  }
1467
- const Ce = () => ({ label: "", color: "#4a90d9", shape: "square" }), re = 8, Se = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1468
- function va({ value: e, onChange: t, style: i }) {
1469
- const r = (e == null ? void 0 : e.entries) ?? [], n = (e == null ? void 0 : e.displayMode) ?? "simple", o = Pe(() => {
1467
+ const ke = () => ({ label: "", color: "#4a90d9", shape: "square" }), re = 8, Ce = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
1468
+ function Na({ value: e, onChange: t, style: i }) {
1469
+ const r = (e == null ? void 0 : e.entries) ?? [], n = (e == null ? void 0 : e.displayMode) ?? "simple", o = Ee(() => {
1470
1470
  if (!i) return null;
1471
- const c = pa(i);
1472
- if (!G(c)) return null;
1473
- const u = ra(c);
1471
+ const d = na(i);
1472
+ if (!W(d)) return null;
1473
+ const u = ia(d);
1474
1474
  if (!u) return null;
1475
- const s = oa(i);
1475
+ const s = pa(i);
1476
1476
  return {
1477
- entries: la(c).map((k) => ({
1478
- label: k.label,
1479
- color: k.color,
1477
+ entries: ra(d).map((N) => ({
1478
+ label: N.label,
1479
+ color: N.color,
1480
1480
  shape: s
1481
1481
  })),
1482
1482
  mode: u === "interpolate" ? "gradient" : "categorical",
1483
- property: na(c)
1483
+ property: la(d)
1484
1484
  };
1485
1485
  }, [i]), p = () => {
1486
- t({ ...e, entries: [...r, Ce()] });
1487
- }, b = (c, u) => {
1488
- const s = r.map((v, k) => k === c ? u : v);
1486
+ t({ ...e, entries: [...r, ke()] });
1487
+ }, y = (d, u) => {
1488
+ const s = r.map((v, N) => N === d ? u : v);
1489
1489
  t({ ...e, entries: s });
1490
- }, m = (c) => {
1491
- const u = r.filter((s, v) => v !== c);
1490
+ }, m = (d) => {
1491
+ const u = r.filter((s, v) => v !== d);
1492
1492
  t(u.length > 0 ? { ...e, entries: u } : void 0);
1493
- }, w = (c) => {
1494
- t(c ? { entries: [Ce()] } : void 0);
1495
- }, d = () => {
1493
+ }, x = (d) => {
1494
+ t(d ? { entries: [ke()] } : void 0);
1495
+ }, h = () => {
1496
1496
  o && t({
1497
1497
  entries: o.entries,
1498
1498
  displayMode: o.mode,
1499
1499
  ...o.mode === "gradient" && o.property ? { gradientProperty: o.property } : {},
1500
1500
  ...o.mode === "categorical" ? { showLabelsCollapsed: !1 } : {}
1501
1501
  });
1502
- }, f = (c) => {
1502
+ }, f = (d) => {
1503
1503
  if (!e) return;
1504
- const u = { ...e, displayMode: c };
1505
- c !== "categorical" && delete u.showLabelsCollapsed, c !== "gradient" && delete u.gradientProperty, t(u);
1504
+ const u = { ...e, displayMode: d };
1505
+ d !== "categorical" && delete u.showLabelsCollapsed, d !== "gradient" && delete u.gradientProperty, t(u);
1506
1506
  };
1507
1507
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1508
1508
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
@@ -1512,7 +1512,7 @@ function va({ value: e, onChange: t, style: i }) {
1512
1512
  type: "checkbox",
1513
1513
  id: "legend-enabled",
1514
1514
  checked: e !== void 0,
1515
- onChange: (c) => w(c.target.checked),
1515
+ onChange: (d) => x(d.target.checked),
1516
1516
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1517
1517
  }
1518
1518
  ),
@@ -1527,23 +1527,23 @@ function va({ value: e, onChange: t, style: i }) {
1527
1527
  ")"
1528
1528
  ] }),
1529
1529
  /* @__PURE__ */ l("div", { className: "mapui:mt-2 mapui:flex mapui:flex-wrap mapui:items-center mapui:gap-1.5", children: [
1530
- o.entries.slice(0, re).map((c, u) => /* @__PURE__ */ l(
1530
+ o.entries.slice(0, re).map((d, u) => /* @__PURE__ */ l(
1531
1531
  "div",
1532
1532
  {
1533
1533
  className: "mapui:flex mapui:items-center mapui:gap-1",
1534
- title: c.label,
1534
+ title: d.label,
1535
1535
  children: [
1536
1536
  /* @__PURE__ */ a(
1537
1537
  "span",
1538
1538
  {
1539
1539
  className: "mapui:inline-block mapui:h-3 mapui:w-3 mapui:rounded-sm mapui:shrink-0",
1540
- style: { backgroundColor: c.color }
1540
+ style: { backgroundColor: d.color }
1541
1541
  }
1542
1542
  ),
1543
- /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-blue-700 mapui:truncate mapui:max-w-16", children: c.label })
1543
+ /* @__PURE__ */ a("span", { className: "mapui:text-xs mapui:text-blue-700 mapui:truncate mapui:max-w-16", children: d.label })
1544
1544
  ]
1545
1545
  },
1546
- `${c.label}-${u}`
1546
+ `${d.label}-${u}`
1547
1547
  )),
1548
1548
  o.entries.length > re && /* @__PURE__ */ l("span", { className: "mapui:text-xs mapui:text-blue-600", children: [
1549
1549
  "+",
@@ -1555,13 +1555,13 @@ function va({ value: e, onChange: t, style: i }) {
1555
1555
  "button",
1556
1556
  {
1557
1557
  type: "button",
1558
- onClick: d,
1558
+ onClick: h,
1559
1559
  className: "mapui:mt-2 mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-100",
1560
1560
  children: "Generate from Style"
1561
1561
  }
1562
1562
  )
1563
1563
  ] }),
1564
- e !== void 0 && /* @__PURE__ */ l(B, { children: [
1564
+ e !== void 0 && /* @__PURE__ */ l(q, { children: [
1565
1565
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1566
1566
  /* @__PURE__ */ a("label", { htmlFor: "legend-display-mode", className: "mapui:text-sm mapui:text-gray-700", children: "Display Mode" }),
1567
1567
  /* @__PURE__ */ l(
@@ -1569,8 +1569,8 @@ function va({ value: e, onChange: t, style: i }) {
1569
1569
  {
1570
1570
  id: "legend-display-mode",
1571
1571
  value: n,
1572
- onChange: (c) => f(c.target.value),
1573
- className: Se,
1572
+ onChange: (d) => f(d.target.value),
1573
+ className: Ce,
1574
1574
  children: [
1575
1575
  /* @__PURE__ */ a("option", { value: "simple", children: "Simple" }),
1576
1576
  /* @__PURE__ */ a("option", { value: "categorical", children: "Categorical" }),
@@ -1586,7 +1586,7 @@ function va({ value: e, onChange: t, style: i }) {
1586
1586
  type: "checkbox",
1587
1587
  id: "legend-show-labels-collapsed",
1588
1588
  checked: e.showLabelsCollapsed ?? !1,
1589
- onChange: (c) => t({ ...e, showLabelsCollapsed: c.target.checked }),
1589
+ onChange: (d) => t({ ...e, showLabelsCollapsed: d.target.checked }),
1590
1590
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
1591
1591
  }
1592
1592
  ),
@@ -1600,13 +1600,13 @@ function va({ value: e, onChange: t, style: i }) {
1600
1600
  type: "text",
1601
1601
  id: "legend-gradient-property",
1602
1602
  value: e.gradientProperty ?? "",
1603
- onChange: (c) => t({ ...e, gradientProperty: c.target.value || void 0 }),
1603
+ onChange: (d) => t({ ...e, gradientProperty: d.target.value || void 0 }),
1604
1604
  placeholder: "e.g. POP_EST",
1605
- className: Se
1605
+ className: Ce
1606
1606
  }
1607
1607
  )
1608
1608
  ] }),
1609
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: r.map((c, u) => /* @__PURE__ */ l(
1609
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: r.map((d, u) => /* @__PURE__ */ l(
1610
1610
  "li",
1611
1611
  {
1612
1612
  className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:p-3",
@@ -1627,10 +1627,10 @@ function va({ value: e, onChange: t, style: i }) {
1627
1627
  )
1628
1628
  ] }),
1629
1629
  /* @__PURE__ */ a(
1630
- wa,
1630
+ va,
1631
1631
  {
1632
- value: c,
1633
- onChange: (s) => b(u, s)
1632
+ value: d,
1633
+ onChange: (s) => y(u, s)
1634
1634
  }
1635
1635
  )
1636
1636
  ]
@@ -1651,7 +1651,7 @@ function va({ value: e, onChange: t, style: i }) {
1651
1651
  "button",
1652
1652
  {
1653
1653
  type: "button",
1654
- onClick: d,
1654
+ onClick: h,
1655
1655
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-white mapui:px-3 mapui:py-2 mapui:text-sm mapui:font-medium mapui:text-blue-700 hover:mapui:bg-blue-50",
1656
1656
  children: [
1657
1657
  "Populate from Style (",
@@ -1664,13 +1664,13 @@ function va({ value: e, onChange: t, style: i }) {
1664
1664
  ] })
1665
1665
  ] });
1666
1666
  }
1667
- function De({
1667
+ function Se({
1668
1668
  options: e,
1669
1669
  onChange: t,
1670
1670
  placeholder: i,
1671
1671
  className: r
1672
1672
  }) {
1673
- const [n, o] = L(() => (e == null ? void 0 : e.join(", ")) ?? "");
1673
+ const [n, o] = A(() => (e == null ? void 0 : e.join(", ")) ?? "");
1674
1674
  return X(() => {
1675
1675
  o((e == null ? void 0 : e.join(", ")) ?? "");
1676
1676
  }, [e == null ? void 0 : e.join(",")]), /* @__PURE__ */ a(
@@ -1678,9 +1678,9 @@ function De({
1678
1678
  {
1679
1679
  type: "text",
1680
1680
  value: n,
1681
- onChange: (b) => o(b.target.value),
1681
+ onChange: (y) => o(y.target.value),
1682
1682
  onBlur: () => {
1683
- const b = n.trim(), m = b ? b.split(",").map((w) => w.trim()).filter(Boolean) : void 0;
1683
+ const y = n.trim(), m = y ? y.split(",").map((x) => x.trim()).filter(Boolean) : void 0;
1684
1684
  t(m), o((m == null ? void 0 : m.join(", ")) ?? "");
1685
1685
  },
1686
1686
  placeholder: i,
@@ -1688,15 +1688,15 @@ function De({
1688
1688
  }
1689
1689
  );
1690
1690
  }
1691
- const j = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", Na = {
1691
+ const R = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500", ka = {
1692
1692
  text: { type: "text", property: "", label: "", autocomplete: !1 },
1693
1693
  number: { type: "number", property: "", label: "", inputMode: "input", operator: "eq" },
1694
1694
  datetime: { type: "datetime", property: "", label: "", range: !1 },
1695
1695
  select: { type: "select", property: "", label: "" }
1696
1696
  };
1697
- function ka({ value: e, onChange: t, availableProperties: i }) {
1697
+ function Ca({ value: e, onChange: t, availableProperties: i }) {
1698
1698
  const r = (p) => {
1699
- t({ ...Na[p], property: e.property, label: e.label });
1699
+ t({ ...ka[p], property: e.property, label: e.label });
1700
1700
  }, n = (p) => t({ ...e, ...p }), o = i && i.length > 0;
1701
1701
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
1702
1702
  /* @__PURE__ */ a(S, { label: "Field Type", children: /* @__PURE__ */ l(
@@ -1704,7 +1704,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1704
1704
  {
1705
1705
  value: e.type,
1706
1706
  onChange: (p) => r(p.target.value),
1707
- className: j,
1707
+ className: R,
1708
1708
  children: [
1709
1709
  /* @__PURE__ */ a("option", { value: "text", children: "Text" }),
1710
1710
  /* @__PURE__ */ a("option", { value: "number", children: "Number" }),
@@ -1718,7 +1718,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1718
1718
  {
1719
1719
  value: e.property,
1720
1720
  onChange: (p) => n({ property: p.target.value }),
1721
- className: j,
1721
+ className: R,
1722
1722
  children: [
1723
1723
  /* @__PURE__ */ a("option", { value: "", children: "Select a property…" }),
1724
1724
  i.map((p) => /* @__PURE__ */ a("option", { value: p.name, children: p.title ?? p.name }, p.name))
@@ -1731,7 +1731,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1731
1731
  value: e.property,
1732
1732
  onChange: (p) => n({ property: p.target.value }),
1733
1733
  placeholder: "e.g. name",
1734
- className: j
1734
+ className: R
1735
1735
  }
1736
1736
  ) }),
1737
1737
  /* @__PURE__ */ a(S, { label: "Label", children: /* @__PURE__ */ a(
@@ -1741,7 +1741,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1741
1741
  value: e.label,
1742
1742
  onChange: (p) => n({ label: p.target.value }),
1743
1743
  placeholder: "Display label",
1744
- className: j
1744
+ className: R
1745
1745
  }
1746
1746
  ) }),
1747
1747
  /* @__PURE__ */ a(S, { label: "Placeholder", children: /* @__PURE__ */ a(
@@ -1751,10 +1751,10 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1751
1751
  value: e.placeholder ?? "",
1752
1752
  onChange: (p) => n({ placeholder: p.target.value || void 0 }),
1753
1753
  placeholder: "Input placeholder text",
1754
- className: j
1754
+ className: R
1755
1755
  }
1756
1756
  ) }),
1757
- e.type === "text" && /* @__PURE__ */ l(B, { children: [
1757
+ e.type === "text" && /* @__PURE__ */ l(q, { children: [
1758
1758
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1759
1759
  /* @__PURE__ */ a(
1760
1760
  "input",
@@ -1782,16 +1782,16 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1782
1782
  /* @__PURE__ */ a("label", { htmlFor: "text-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
1783
1783
  ] }),
1784
1784
  /* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
1785
- De,
1785
+ Se,
1786
1786
  {
1787
1787
  options: e.options,
1788
1788
  onChange: (p) => t({ ...e, options: p }),
1789
1789
  placeholder: "option1, option2",
1790
- className: j
1790
+ className: R
1791
1791
  }
1792
1792
  ) })
1793
1793
  ] }),
1794
- e.type === "number" && /* @__PURE__ */ l(B, { children: [
1794
+ e.type === "number" && /* @__PURE__ */ l(q, { children: [
1795
1795
  /* @__PURE__ */ a(S, { label: "Input Mode", children: /* @__PURE__ */ l(
1796
1796
  "select",
1797
1797
  {
@@ -1800,7 +1800,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1800
1800
  ...e,
1801
1801
  inputMode: p.target.value
1802
1802
  }),
1803
- className: j,
1803
+ className: R,
1804
1804
  children: [
1805
1805
  /* @__PURE__ */ a("option", { value: "input", children: "Input" }),
1806
1806
  /* @__PURE__ */ a("option", { value: "slider", children: "Slider" })
@@ -1815,7 +1815,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1815
1815
  ...e,
1816
1816
  operator: p.target.value
1817
1817
  }),
1818
- className: j,
1818
+ className: R,
1819
1819
  children: [
1820
1820
  /* @__PURE__ */ a("option", { value: "eq", children: "Equal (=)" }),
1821
1821
  /* @__PURE__ */ a("option", { value: "gt", children: "Greater Than (>)" }),
@@ -1836,7 +1836,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1836
1836
  ...e,
1837
1837
  min: p.target.value ? parseFloat(p.target.value) : void 0
1838
1838
  }),
1839
- className: j
1839
+ className: R
1840
1840
  }
1841
1841
  ) }),
1842
1842
  /* @__PURE__ */ a(S, { label: "Max", children: /* @__PURE__ */ a(
@@ -1848,7 +1848,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1848
1848
  ...e,
1849
1849
  max: p.target.value ? parseFloat(p.target.value) : void 0
1850
1850
  }),
1851
- className: j
1851
+ className: R
1852
1852
  }
1853
1853
  ) }),
1854
1854
  /* @__PURE__ */ a(S, { label: "Step", children: /* @__PURE__ */ a(
@@ -1860,7 +1860,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1860
1860
  ...e,
1861
1861
  step: p.target.value ? parseFloat(p.target.value) : void 0
1862
1862
  }),
1863
- className: j
1863
+ className: R
1864
1864
  }
1865
1865
  ) })
1866
1866
  ] })
@@ -1878,7 +1878,7 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1878
1878
  ),
1879
1879
  /* @__PURE__ */ a("label", { htmlFor: "datetime-range", className: "mapui:text-sm mapui:text-gray-700", children: "Date Range" })
1880
1880
  ] }),
1881
- e.type === "select" && /* @__PURE__ */ l(B, { children: [
1881
+ e.type === "select" && /* @__PURE__ */ l(q, { children: [
1882
1882
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
1883
1883
  /* @__PURE__ */ a(
1884
1884
  "input",
@@ -1893,43 +1893,43 @@ function ka({ value: e, onChange: t, availableProperties: i }) {
1893
1893
  /* @__PURE__ */ a("label", { htmlFor: "select-prefetch", className: "mapui:text-sm mapui:text-gray-700", children: "Prefetch Options" })
1894
1894
  ] }),
1895
1895
  /* @__PURE__ */ a(S, { label: "Static Options (comma-separated)", children: /* @__PURE__ */ a(
1896
- De,
1896
+ Se,
1897
1897
  {
1898
1898
  options: e.options,
1899
1899
  onChange: (p) => t({ ...e, options: p }),
1900
1900
  placeholder: "option1, option2",
1901
- className: j
1901
+ className: R
1902
1902
  }
1903
1903
  ) })
1904
1904
  ] })
1905
1905
  ] });
1906
1906
  }
1907
- const Ca = () => ({
1907
+ const Sa = () => ({
1908
1908
  type: "text",
1909
1909
  property: "",
1910
1910
  label: "",
1911
1911
  autocomplete: !1
1912
1912
  });
1913
- function Sa({ fields: e, onChange: t, availableProperties: i }) {
1914
- const [r, n] = L(null), o = () => {
1915
- const d = [...e, Ca()];
1916
- t(d), n(d.length - 1);
1917
- }, p = (d, f) => {
1918
- t(e.map((c, u) => u === d ? f : c));
1919
- }, b = (d) => {
1920
- t(e.filter((f, c) => c !== d)), n(null);
1921
- }, m = (d) => {
1922
- if (d === 0) return;
1913
+ function Da({ fields: e, onChange: t, availableProperties: i }) {
1914
+ const [r, n] = A(null), o = () => {
1915
+ const h = [...e, Sa()];
1916
+ t(h), n(h.length - 1);
1917
+ }, p = (h, f) => {
1918
+ t(e.map((d, u) => u === h ? f : d));
1919
+ }, y = (h) => {
1920
+ t(e.filter((f, d) => d !== h)), n(null);
1921
+ }, m = (h) => {
1922
+ if (h === 0) return;
1923
1923
  const f = [...e];
1924
- [f[d - 1], f[d]] = [f[d], f[d - 1]], t(f), n(d - 1);
1925
- }, w = (d) => {
1926
- if (d === e.length - 1) return;
1924
+ [f[h - 1], f[h]] = [f[h], f[h - 1]], t(f), n(h - 1);
1925
+ }, x = (h) => {
1926
+ if (h === e.length - 1) return;
1927
1927
  const f = [...e];
1928
- [f[d], f[d + 1]] = [f[d + 1], f[d]], t(f), n(d + 1);
1928
+ [f[h], f[h + 1]] = [f[h + 1], f[h]], t(f), n(h + 1);
1929
1929
  };
1930
1930
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
1931
1931
  e.length === 0 && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No search fields configured." }),
1932
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((d, f) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
1932
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((h, f) => /* @__PURE__ */ l("li", { className: "mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white", children: [
1933
1933
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-1 mapui:px-3 mapui:py-2", children: [
1934
1934
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-0.5", children: [
1935
1935
  /* @__PURE__ */ a(
@@ -1947,7 +1947,7 @@ function Sa({ fields: e, onChange: t, availableProperties: i }) {
1947
1947
  "button",
1948
1948
  {
1949
1949
  type: "button",
1950
- onClick: () => w(f),
1950
+ onClick: () => x(f),
1951
1951
  disabled: f === e.length - 1,
1952
1952
  "aria-label": "Move down",
1953
1953
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
@@ -1962,8 +1962,8 @@ function Sa({ fields: e, onChange: t, availableProperties: i }) {
1962
1962
  onClick: () => n(r === f ? null : f),
1963
1963
  className: "mapui:flex-1 mapui:cursor-pointer mapui:border-none mapui:bg-transparent mapui:text-left mapui:text-sm mapui:font-medium mapui:text-gray-800",
1964
1964
  children: [
1965
- /* @__PURE__ */ a("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: d.type }),
1966
- d.label || d.property || "Untitled field"
1965
+ /* @__PURE__ */ a("span", { className: "mapui:mr-1 mapui:rounded mapui:bg-gray-100 mapui:px-1 mapui:py-0.5 mapui:text-xs mapui:font-mono mapui:text-gray-500", children: h.type }),
1966
+ h.label || h.property || "Untitled field"
1967
1967
  ]
1968
1968
  }
1969
1969
  ),
@@ -1971,7 +1971,7 @@ function Sa({ fields: e, onChange: t, availableProperties: i }) {
1971
1971
  "button",
1972
1972
  {
1973
1973
  type: "button",
1974
- onClick: () => b(f),
1974
+ onClick: () => y(f),
1975
1975
  "aria-label": "Remove field",
1976
1976
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
1977
1977
  children: "Remove"
@@ -1979,10 +1979,10 @@ function Sa({ fields: e, onChange: t, availableProperties: i }) {
1979
1979
  )
1980
1980
  ] }),
1981
1981
  r === f && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
1982
- ka,
1982
+ Ca,
1983
1983
  {
1984
- value: d,
1985
- onChange: (c) => p(f, c),
1984
+ value: h,
1985
+ onChange: (d) => p(f, d),
1986
1986
  availableProperties: i
1987
1987
  }
1988
1988
  ) })
@@ -1998,14 +1998,14 @@ function Sa({ fields: e, onChange: t, availableProperties: i }) {
1998
1998
  )
1999
1999
  ] });
2000
2000
  }
2001
- function Da(e) {
2001
+ function Ta(e) {
2002
2002
  return Object.entries(e).map(([t, i]) => ({
2003
2003
  key: t,
2004
2004
  label: i.label ?? "",
2005
2005
  visible: i.visible ?? !0
2006
2006
  }));
2007
2007
  }
2008
- function Ta(e) {
2008
+ function La(e) {
2009
2009
  const t = {};
2010
2010
  for (const i of e)
2011
2011
  t[i.key] = {
@@ -2015,17 +2015,17 @@ function Ta(e) {
2015
2015
  return t;
2016
2016
  }
2017
2017
  const le = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2018
- function La({ value: e, onChange: t, availableProperties: i }) {
2019
- const r = Da(e), n = i && i.length > 0, o = (u) => t(Ta(u)), p = () => {
2018
+ function Aa({ value: e, onChange: t, availableProperties: i }) {
2019
+ const r = Ta(e), n = i && i.length > 0, o = (u) => t(La(u)), p = () => {
2020
2020
  o([...r, { key: "", label: "", visible: !0 }]);
2021
- }, b = (u) => {
2021
+ }, y = (u) => {
2022
2022
  o(r.filter((s, v) => v !== u));
2023
2023
  }, m = (u, s) => {
2024
- o(r.map((v, k) => k === u ? { ...v, ...s } : v));
2025
- }, w = (u, s) => {
2026
- const v = i == null ? void 0 : i.find((D) => D.name === s), k = (v == null ? void 0 : v.title) ?? r[u].label;
2027
- o(r.map((D, x) => x === u ? { ...D, key: s, label: k } : D));
2028
- }, d = (u) => {
2024
+ o(r.map((v, N) => N === u ? { ...v, ...s } : v));
2025
+ }, x = (u, s) => {
2026
+ const v = i == null ? void 0 : i.find((D) => D.name === s), N = (v == null ? void 0 : v.title) ?? r[u].label;
2027
+ o(r.map((D, M) => M === u ? { ...D, key: s, label: N } : D));
2028
+ }, h = (u) => {
2029
2029
  if (u === 0) return;
2030
2030
  const s = [...r];
2031
2031
  [s[u - 1], s[u]] = [s[u], s[u - 1]], o(s);
@@ -2033,7 +2033,7 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2033
2033
  if (u === r.length - 1) return;
2034
2034
  const s = [...r];
2035
2035
  [s[u], s[u + 1]] = [s[u + 1], s[u]], o(s);
2036
- }, c = () => {
2036
+ }, d = () => {
2037
2037
  if (!i) return;
2038
2038
  const u = i.map((s) => ({
2039
2039
  key: s.name,
@@ -2043,18 +2043,18 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2043
2043
  o(u);
2044
2044
  };
2045
2045
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2046
- r.length === 0 ? /* @__PURE__ */ l(B, { children: [
2046
+ r.length === 0 ? /* @__PURE__ */ l(q, { children: [
2047
2047
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No property display rules configured. All properties will be shown." }),
2048
2048
  n && /* @__PURE__ */ a(
2049
2049
  "button",
2050
2050
  {
2051
2051
  type: "button",
2052
- onClick: c,
2052
+ onClick: d,
2053
2053
  className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-blue-300 mapui:bg-blue-50 mapui:px-3 mapui:py-1.5 mapui:text-sm mapui:text-blue-700 hover:mapui:bg-blue-100",
2054
2054
  children: "Populate from API metadata"
2055
2055
  }
2056
2056
  )
2057
- ] }) : /* @__PURE__ */ l(B, { children: [
2057
+ ] }) : /* @__PURE__ */ l(q, { children: [
2058
2058
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:items-center mapui:gap-2 mapui:px-8", style: { gridTemplateColumns: "1fr 1fr auto" }, children: [
2059
2059
  /* @__PURE__ */ a(S, { label: "Property Key", children: /* @__PURE__ */ a("span", {}) }),
2060
2060
  /* @__PURE__ */ a(S, { label: "Display Label", children: /* @__PURE__ */ a("span", {}) }),
@@ -2066,7 +2066,7 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2066
2066
  "button",
2067
2067
  {
2068
2068
  type: "button",
2069
- onClick: () => d(s),
2069
+ onClick: () => h(s),
2070
2070
  disabled: s === 0,
2071
2071
  "aria-label": "Move up",
2072
2072
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
@@ -2090,7 +2090,7 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2090
2090
  "select",
2091
2091
  {
2092
2092
  value: u.key,
2093
- onChange: (v) => w(s, v.target.value),
2093
+ onChange: (v) => x(s, v.target.value),
2094
2094
  "aria-label": "Property key",
2095
2095
  className: le,
2096
2096
  children: [
@@ -2134,7 +2134,7 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2134
2134
  "button",
2135
2135
  {
2136
2136
  type: "button",
2137
- onClick: () => b(s),
2137
+ onClick: () => y(s),
2138
2138
  "aria-label": "Remove property",
2139
2139
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-0.5 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2140
2140
  children: "Remove"
@@ -2154,39 +2154,39 @@ function La({ value: e, onChange: t, availableProperties: i }) {
2154
2154
  )
2155
2155
  ] });
2156
2156
  }
2157
- const Be = /geojson\.org\/schema\/(\w+)\.json/;
2157
+ const je = /geojson\.org\/schema\/(\w+)\.json/;
2158
2158
  function Ia(e) {
2159
- return !!e.$ref && Be.test(e.$ref);
2159
+ return !!e.$ref && je.test(e.$ref);
2160
2160
  }
2161
- function qe(e) {
2162
- const t = Be.exec(e);
2161
+ function $e(e) {
2162
+ const t = je.exec(e);
2163
2163
  return t ? t[1] : null;
2164
2164
  }
2165
- function Ue(e) {
2165
+ function Re(e) {
2166
2166
  const t = e.toLowerCase();
2167
2167
  return t.includes("polygon") ? "fill" : t.includes("linestring") ? "line" : t.includes("point") ? "circle" : null;
2168
2168
  }
2169
- function ce(e) {
2169
+ function Be(e) {
2170
2170
  const t = e.toLowerCase();
2171
2171
  return t.includes("polygon") ? ["fill"] : t.includes("linestring") ? ["line"] : t.includes("point") ? ["circle", "symbol"] : [];
2172
2172
  }
2173
- function Aa(e) {
2173
+ function Ea(e) {
2174
2174
  for (const t of Object.values(e.properties))
2175
2175
  if (t.$ref) {
2176
- const i = qe(t.$ref);
2177
- if (i) return Ue(i);
2176
+ const i = $e(t.$ref);
2177
+ if (i) return Re(i);
2178
2178
  }
2179
2179
  return null;
2180
2180
  }
2181
- function We(e) {
2181
+ function qe(e) {
2182
2182
  for (const t of Object.values(e.properties))
2183
2183
  if (t.$ref) {
2184
- const i = qe(t.$ref);
2185
- if (i) return ce(i);
2184
+ const i = $e(t.$ref);
2185
+ if (i) return Be(i);
2186
2186
  }
2187
2187
  return [];
2188
2188
  }
2189
- function Ea(e) {
2189
+ function Fa(e) {
2190
2190
  return Object.entries(e.properties).filter(([, t]) => !Ia(t)).map(([t, i]) => ({
2191
2191
  name: t,
2192
2192
  title: i.title,
@@ -2197,87 +2197,123 @@ function Ea(e) {
2197
2197
  maximum: i.maximum
2198
2198
  }));
2199
2199
  }
2200
- async function Ga(e, t) {
2200
+ function Ue(e) {
2201
+ var i;
2202
+ const t = /* @__PURE__ */ new Set();
2203
+ for (const r of e)
2204
+ (i = r.geometry) != null && i.type && t.add(r.geometry.type);
2205
+ return Array.from(t);
2206
+ }
2207
+ function Pa(e) {
2208
+ const t = /* @__PURE__ */ new Set();
2209
+ for (const n of e) {
2210
+ const o = n.toLowerCase();
2211
+ o.includes("polygon") ? t.add("polygon") : o.includes("linestring") ? t.add("line") : o.includes("point") && t.add("point");
2212
+ }
2213
+ const i = t.size > 1, r = [];
2214
+ return t.has("polygon") && r.push({
2215
+ type: "fill",
2216
+ paint: { "fill-color": "#4a90d9", "fill-opacity": 0.6, "fill-outline-color": "transparent", "fill-antialias": !0 },
2217
+ ...i ? { geometryFilter: ["Polygon", "MultiPolygon"] } : {}
2218
+ }), t.has("line") && r.push({
2219
+ type: "line",
2220
+ paint: { "line-color": "#2980b9", "line-width": 2, "line-opacity": 1 },
2221
+ ...i ? { geometryFilter: ["LineString", "MultiLineString"] } : {}
2222
+ }), t.has("point") && r.push({
2223
+ type: "circle",
2224
+ paint: { "circle-color": "#e74c3c", "circle-radius": 5, "circle-opacity": 0.9 },
2225
+ ...i ? { geometryFilter: ["Point", "MultiPoint"] } : {}
2226
+ }), r;
2227
+ }
2228
+ async function Ya(e, t) {
2201
2229
  var i, r;
2202
2230
  try {
2203
- const n = await Me(e, t), o = Aa(n);
2231
+ const n = await Pe(e, t), o = Ea(n);
2204
2232
  if (o) return o;
2205
2233
  } catch {
2206
2234
  }
2207
2235
  try {
2208
2236
  const o = (r = (i = (await se(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
2209
- if (typeof o == "string") return Ue(o);
2237
+ if (typeof o == "string") return Re(o);
2210
2238
  } catch {
2211
2239
  }
2212
2240
  return null;
2213
2241
  }
2214
- async function za(e, t) {
2215
- var i, r;
2242
+ async function Xa(e, t) {
2216
2243
  try {
2217
- const n = await Me(e, t), o = We(n);
2218
- if (o.length > 0) return o;
2244
+ const i = await Pe(e, t), r = qe(i);
2245
+ if (r.length > 0) return r;
2219
2246
  } catch {
2220
2247
  }
2221
2248
  try {
2222
- const o = (r = (i = (await se(e, t, { limit: 1 })).features[0]) == null ? void 0 : i.geometry) == null ? void 0 : r.type;
2223
- if (typeof o == "string") return ce(o);
2249
+ const i = await se(e, t, { limit: 20 }), r = Ue(i.features), n = /* @__PURE__ */ new Set();
2250
+ for (const o of r)
2251
+ for (const p of Be(o))
2252
+ n.add(p);
2253
+ return Array.from(n);
2224
2254
  } catch {
2225
2255
  }
2226
2256
  return [];
2227
2257
  }
2228
- function Va(e) {
2258
+ function Ha(e) {
2229
2259
  return e.replace(/_/g, " ").replace(/([a-z])([A-Z])/g, "$1 $2").replace(/\b\w/g, (t) => t.toUpperCase());
2230
2260
  }
2261
+ function Ma(e, t, i) {
2262
+ const r = [...e ?? []];
2263
+ return r[t] = i, r;
2264
+ }
2265
+ function Oa(e, t) {
2266
+ return (e ?? []).filter((i, r) => r !== t);
2267
+ }
2231
2268
  const V = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2232
- function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2233
- var D;
2234
- const n = (x) => t({ ...e, ...x }), o = ue(e);
2269
+ function De({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2270
+ var D, M;
2271
+ const n = (w) => t({ ...e, ...w }), o = ue(e);
2235
2272
  o.current = e;
2236
2273
  const p = ue(t);
2237
2274
  p.current = t;
2238
- const b = i.find((x) => x.id === e.sourceId), m = (b == null ? void 0 : b.url) ?? null, w = e.collection || null, { collections: d, loading: f } = Fe(m), { queryables: c, loading: u } = _e(m, w), s = c ? Ea(c) : [], [v, k] = L([]);
2275
+ const y = i.find((w) => w.id === e.sourceId), m = (y == null ? void 0 : y.url) ?? null, x = e.collection || null, { collections: h, loading: f } = Fe(m), { queryables: d, loading: u } = Ve(m, x), s = d ? Fa(d) : [], [v, N] = A([]);
2239
2276
  return X(() => {
2240
- if (!c) {
2241
- k([]);
2277
+ if (!d) {
2278
+ N([]);
2242
2279
  return;
2243
2280
  }
2244
- const x = (P) => {
2245
- k(P);
2246
- const E = P[0];
2247
- if (E && !o.current.style) {
2248
- const y = E === "fill" ? me : E === "line" ? je : E === "symbol" ? Re : $e;
2249
- p.current({ ...o.current, style: y });
2250
- }
2251
- }, $ = We(c);
2252
- if ($.length > 0) {
2253
- x($);
2281
+ const w = (T) => {
2282
+ var P;
2283
+ const c = Pa(T);
2284
+ N(c), c.length > 0 && !((P = o.current.styles) != null && P.length) && p.current({ ...o.current, styles: c });
2285
+ }, C = qe(d);
2286
+ if (C.length > 0) {
2287
+ const T = [];
2288
+ for (const c of C)
2289
+ c === "fill" ? T.push("Polygon") : c === "line" ? T.push("LineString") : (c === "circle" || c === "symbol") && T.push("Point");
2290
+ w(T);
2254
2291
  return;
2255
2292
  }
2256
- if (!m || !w) {
2257
- k([]);
2293
+ if (!m || !x) {
2294
+ N([]);
2258
2295
  return;
2259
2296
  }
2260
- let C = !1;
2261
- return se(m, w, { limit: 1 }).then((P) => {
2262
- var y, F;
2263
- if (C) return;
2264
- const E = (F = (y = P.features[0]) == null ? void 0 : y.geometry) == null ? void 0 : F.type;
2265
- x(typeof E == "string" ? ce(E) : []);
2297
+ let F = !1;
2298
+ return se(m, x, { limit: 20 }).then((T) => {
2299
+ if (F) return;
2300
+ const c = Ue(T.features);
2301
+ c.length > 0 ? w(c) : N([]);
2266
2302
  }).catch(() => {
2267
- C || k([]);
2303
+ F || N([]);
2268
2304
  }), () => {
2269
- C = !0;
2305
+ F = !0;
2270
2306
  };
2271
- }, [c, m, w]), X(() => {
2272
- k([]);
2273
- }, [m, w]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2307
+ }, [d, m, x]), X(() => {
2308
+ N([]);
2309
+ }, [m, x]), /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2274
2310
  /* @__PURE__ */ l("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: [
2275
2311
  /* @__PURE__ */ a(S, { label: "Layer ID", required: !0, children: /* @__PURE__ */ a(
2276
2312
  "input",
2277
2313
  {
2278
2314
  type: "text",
2279
2315
  value: e.id,
2280
- onChange: (x) => n({ id: x.target.value }),
2316
+ onChange: (w) => n({ id: w.target.value }),
2281
2317
  placeholder: "my-layer",
2282
2318
  className: V
2283
2319
  }
@@ -2287,7 +2323,7 @@ function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2287
2323
  {
2288
2324
  type: "text",
2289
2325
  value: e.label,
2290
- onChange: (x) => n({ label: x.target.value }),
2326
+ onChange: (w) => n({ label: w.target.value }),
2291
2327
  placeholder: "My Layer",
2292
2328
  className: V
2293
2329
  }
@@ -2297,24 +2333,24 @@ function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2297
2333
  "select",
2298
2334
  {
2299
2335
  value: e.sourceId,
2300
- onChange: (x) => n({ sourceId: x.target.value }),
2336
+ onChange: (w) => n({ sourceId: w.target.value }),
2301
2337
  className: V,
2302
2338
  children: [
2303
2339
  /* @__PURE__ */ a("option", { value: "", children: "Select a source…" }),
2304
- i.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.label ?? x.id }, x.id))
2340
+ i.map((w) => /* @__PURE__ */ a("option", { value: w.id, children: w.label ?? w.id }, w.id))
2305
2341
  ]
2306
2342
  }
2307
2343
  ) }),
2308
2344
  /* @__PURE__ */ l(S, { label: "Collection", required: !0, children: [
2309
- d.length > 0 ? /* @__PURE__ */ l(
2345
+ h.length > 0 ? /* @__PURE__ */ l(
2310
2346
  "select",
2311
2347
  {
2312
2348
  value: e.collection,
2313
- onChange: (x) => n({ collection: x.target.value }),
2349
+ onChange: (w) => n({ collection: w.target.value }),
2314
2350
  className: V,
2315
2351
  children: [
2316
2352
  /* @__PURE__ */ a("option", { value: "", children: "Select a collection…" }),
2317
- d.map((x) => /* @__PURE__ */ a("option", { value: x.id, children: x.title ?? x.id }, x.id))
2353
+ h.map((w) => /* @__PURE__ */ a("option", { value: w.id, children: w.title ?? w.id }, w.id))
2318
2354
  ]
2319
2355
  }
2320
2356
  ) : /* @__PURE__ */ a(
@@ -2322,27 +2358,27 @@ function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2322
2358
  {
2323
2359
  type: "text",
2324
2360
  value: e.collection,
2325
- onChange: (x) => n({ collection: x.target.value }),
2361
+ onChange: (w) => n({ collection: w.target.value }),
2326
2362
  placeholder: f ? "Loading collections…" : "collection-id",
2327
2363
  className: V
2328
2364
  }
2329
2365
  ),
2330
2366
  u && /* @__PURE__ */ a("span", { className: "mapui:mt-0.5 mapui:block mapui:text-xs mapui:text-gray-400", children: "Loading properties…" })
2331
2367
  ] }),
2332
- /* @__PURE__ */ a(S, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((x) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
2368
+ /* @__PURE__ */ a(S, { label: "Data Mode", children: /* @__PURE__ */ a("div", { className: "mapui:flex mapui:gap-4", children: ["vector-tiles", "geojson"].map((w) => /* @__PURE__ */ l("label", { className: "mapui:flex mapui:cursor-pointer mapui:items-center mapui:gap-1.5", children: [
2333
2369
  /* @__PURE__ */ a(
2334
2370
  "input",
2335
2371
  {
2336
2372
  type: "radio",
2337
2373
  name: `data-mode-${e.id}`,
2338
- value: x,
2339
- checked: e.dataMode === x,
2340
- onChange: () => n({ dataMode: x }),
2374
+ value: w,
2375
+ checked: e.dataMode === w,
2376
+ onChange: () => n({ dataMode: w }),
2341
2377
  className: "mapui:accent-blue-600"
2342
2378
  }
2343
2379
  ),
2344
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: x })
2345
- ] }, x)) }) }),
2380
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:text-gray-700", children: w })
2381
+ ] }, w)) }) }),
2346
2382
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
2347
2383
  /* @__PURE__ */ a(
2348
2384
  "input",
@@ -2350,44 +2386,77 @@ function Te({ value: e, onChange: t, availableSources: i, availableIcons: r }) {
2350
2386
  type: "checkbox",
2351
2387
  id: "layer-visible",
2352
2388
  checked: e.visible,
2353
- onChange: (x) => n({ visible: x.target.checked }),
2389
+ onChange: (w) => n({ visible: w.target.checked }),
2354
2390
  className: "mapui:h-4 mapui:w-4 mapui:accent-blue-600"
2355
2391
  }
2356
2392
  ),
2357
2393
  /* @__PURE__ */ a("label", { htmlFor: "layer-visible", className: "mapui:text-sm mapui:text-gray-700", children: "Visible by default" })
2358
2394
  ] }),
2359
- /* @__PURE__ */ a(_, { title: "Style", children: /* @__PURE__ */ a(
2360
- xa,
2361
- {
2362
- value: e.style ?? me,
2363
- onChange: (x) => n({ style: x }),
2364
- suggestedTypes: v,
2365
- availableIcons: r,
2366
- availableProperties: s,
2367
- onFetchDistinctValues: m && w ? (x) => Ye(m, w, x, { limit: 1e3 }) : void 0
2368
- }
2369
- ) }),
2395
+ /* @__PURE__ */ a(_, { title: "Style", children: /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-4", children: [
2396
+ (e.styles ?? [me]).map((w, C) => {
2397
+ var F;
2398
+ return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-2", children: [
2399
+ w.geometryFilter && w.geometryFilter.length > 0 && /* @__PURE__ */ a("div", { className: "mapui:flex mapui:flex-wrap mapui:gap-1", children: w.geometryFilter.map((T) => /* @__PURE__ */ a(
2400
+ "span",
2401
+ {
2402
+ className: "mapui:rounded mapui:bg-indigo-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-indigo-700",
2403
+ children: T
2404
+ },
2405
+ T
2406
+ )) }),
2407
+ /* @__PURE__ */ a(
2408
+ wa,
2409
+ {
2410
+ value: w,
2411
+ onChange: (T) => n({ styles: Ma(e.styles, C, T) }),
2412
+ suggestedTypes: v.map((T) => T.type),
2413
+ availableIcons: r,
2414
+ availableProperties: s,
2415
+ onFetchDistinctValues: m && x ? (T) => _e(m, x, T, { limit: 1e3 }) : void 0
2416
+ }
2417
+ ),
2418
+ (((F = e.styles) == null ? void 0 : F.length) ?? 0) > 1 && /* @__PURE__ */ a(
2419
+ "button",
2420
+ {
2421
+ type: "button",
2422
+ onClick: () => n({ styles: Oa(e.styles, C) }),
2423
+ className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2424
+ children: "Remove style"
2425
+ }
2426
+ )
2427
+ ] }, C);
2428
+ }),
2429
+ /* @__PURE__ */ a(
2430
+ "button",
2431
+ {
2432
+ type: "button",
2433
+ onClick: () => n({ styles: [...e.styles ?? [me], Oe] }),
2434
+ className: "mapui:cursor-pointer mapui:self-start mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
2435
+ children: "+ Add style"
2436
+ }
2437
+ )
2438
+ ] }) }),
2370
2439
  /* @__PURE__ */ a(_, { title: "Legend", children: /* @__PURE__ */ a(
2371
- va,
2440
+ Na,
2372
2441
  {
2373
2442
  value: e.legend,
2374
- onChange: (x) => n({ legend: x }),
2375
- style: e.style
2443
+ onChange: (w) => n({ legend: w }),
2444
+ style: (D = e.styles) == null ? void 0 : D[0]
2376
2445
  }
2377
2446
  ) }),
2378
2447
  /* @__PURE__ */ a(_, { title: "Search Fields", children: /* @__PURE__ */ a(
2379
- Sa,
2448
+ Da,
2380
2449
  {
2381
- fields: ((D = e.search) == null ? void 0 : D.fields) ?? [],
2382
- onChange: (x) => n({ search: x.length > 0 ? { fields: x } : void 0 }),
2450
+ fields: ((M = e.search) == null ? void 0 : M.fields) ?? [],
2451
+ onChange: (w) => n({ search: w.length > 0 ? { fields: w } : void 0 }),
2383
2452
  availableProperties: s
2384
2453
  }
2385
2454
  ) }),
2386
2455
  /* @__PURE__ */ a(_, { title: "Property Display", children: /* @__PURE__ */ a(
2387
- La,
2456
+ Aa,
2388
2457
  {
2389
2458
  value: e.propertyDisplay ?? {},
2390
- onChange: (x) => n({ propertyDisplay: Object.keys(x).length > 0 ? x : void 0 }),
2459
+ onChange: (w) => n({ propertyDisplay: Object.keys(w).length > 0 ? w : void 0 }),
2391
2460
  availableProperties: s
2392
2461
  }
2393
2462
  ) })
@@ -2401,36 +2470,36 @@ const ne = () => ({
2401
2470
  visible: !0,
2402
2471
  dataMode: "vector-tiles"
2403
2472
  });
2404
- function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
2405
- const [n, o] = L(null), [p, b] = L(!1), [m, w] = L(ne()), [d, f] = L(null), [c, u] = L(null), [s, v] = L(null), k = () => {
2406
- t([...e, m]), b(!1), w(ne());
2407
- }, D = (g) => {
2408
- t(e.map((N) => N.id === n ? g : N));
2409
- }, x = (g) => {
2410
- t(e.filter((N) => N.id !== g)), f(null), n === g && o(null);
2411
- }, $ = (g) => {
2412
- if (g === 0) return;
2413
- const N = [...e];
2414
- [N[g - 1], N[g]] = [N[g], N[g - 1]], t(N);
2415
- }, C = (g) => {
2416
- if (g === e.length - 1) return;
2417
- const N = [...e];
2418
- [N[g], N[g + 1]] = [N[g + 1], N[g]], t(N);
2419
- }, P = (g, N) => {
2420
- u(N), g.dataTransfer.effectAllowed = "move", g.dataTransfer.setData("text/plain", N);
2421
- }, E = (g, N) => {
2422
- g.preventDefault(), g.dataTransfer.dropEffect = "move", v(N);
2423
- }, y = () => {
2473
+ function Ja({ layers: e, onChange: t, availableSources: i, availableIcons: r }) {
2474
+ const [n, o] = A(null), [p, y] = A(!1), [m, x] = A(ne()), [h, f] = A(null), [d, u] = A(null), [s, v] = A(null), N = () => {
2475
+ t([...e, m]), y(!1), x(ne());
2476
+ }, D = (b) => {
2477
+ t(e.map((k) => k.id === n ? b : k));
2478
+ }, M = (b) => {
2479
+ t(e.filter((k) => k.id !== b)), f(null), n === b && o(null);
2480
+ }, w = (b) => {
2481
+ if (b === 0) return;
2482
+ const k = [...e];
2483
+ [k[b - 1], k[b]] = [k[b], k[b - 1]], t(k);
2484
+ }, C = (b) => {
2485
+ if (b === e.length - 1) return;
2486
+ const k = [...e];
2487
+ [k[b], k[b + 1]] = [k[b + 1], k[b]], t(k);
2488
+ }, F = (b, k) => {
2489
+ u(k), b.dataTransfer.effectAllowed = "move", b.dataTransfer.setData("text/plain", k);
2490
+ }, T = (b, k) => {
2491
+ b.preventDefault(), b.dataTransfer.dropEffect = "move", v(k);
2492
+ }, c = () => {
2424
2493
  v(null);
2425
- }, F = (g, N) => {
2426
- g.preventDefault(), v(null);
2427
- const O = c;
2428
- if (u(null), !O || O === N) return;
2429
- const q = e.findIndex((h) => h.id === O), U = e.findIndex((h) => h.id === N);
2430
- if (q === -1 || U === -1) return;
2431
- const R = [...e];
2432
- R.splice(q, 1), R.splice(U, 0, e[q]), t(R);
2433
- }, M = () => {
2494
+ }, P = (b, k) => {
2495
+ b.preventDefault(), v(null);
2496
+ const j = d;
2497
+ if (u(null), !j || j === k) return;
2498
+ const U = e.findIndex((g) => g.id === j), G = e.findIndex((g) => g.id === k);
2499
+ if (U === -1 || G === -1) return;
2500
+ const B = [...e];
2501
+ B.splice(U, 1), B.splice(G, 0, e[U]), t(B);
2502
+ }, O = () => {
2434
2503
  u(null), v(null);
2435
2504
  };
2436
2505
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
@@ -2441,7 +2510,7 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2441
2510
  {
2442
2511
  type: "button",
2443
2512
  onClick: () => {
2444
- b(!0), w(ne());
2513
+ y(!0), x(ne());
2445
2514
  },
2446
2515
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
2447
2516
  children: "+ Add Layer"
@@ -2449,22 +2518,22 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2449
2518
  )
2450
2519
  ] }),
2451
2520
  e.length === 0 && !p && /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:text-sm mapui:text-gray-500", children: "No layers configured." }),
2452
- /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((g, N) => {
2453
- var R, h, T, I;
2454
- const O = c === g.id, q = s === g.id, U = n === g.id;
2521
+ /* @__PURE__ */ a("ul", { className: "mapui:m-0 mapui:list-none mapui:flex mapui:flex-col mapui:gap-2 mapui:p-0", children: e.map((b, k) => {
2522
+ var B, g, L, I, E;
2523
+ const j = d === b.id, U = s === b.id, G = n === b.id;
2455
2524
  return /* @__PURE__ */ l(
2456
2525
  "li",
2457
2526
  {
2458
- draggable: !U,
2459
- onDragStart: U ? void 0 : (A) => P(A, g.id),
2460
- onDragOver: (A) => E(A, g.id),
2461
- onDragLeave: y,
2462
- onDrop: (A) => F(A, g.id),
2463
- onDragEnd: M,
2527
+ draggable: !G,
2528
+ onDragStart: G ? void 0 : ($) => F($, b.id),
2529
+ onDragOver: ($) => T($, b.id),
2530
+ onDragLeave: c,
2531
+ onDrop: ($) => P($, b.id),
2532
+ onDragEnd: O,
2464
2533
  className: [
2465
2534
  "mapui:rounded-lg mapui:border mapui:bg-white mapui:transition-colors",
2466
- q ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
2467
- O ? "mapui:opacity-50" : "mapui:opacity-100"
2535
+ U ? "mapui:border-blue-400 mapui:bg-blue-50" : "mapui:border-gray-200",
2536
+ j ? "mapui:opacity-50" : "mapui:opacity-100"
2468
2537
  ].join(" "),
2469
2538
  children: [
2470
2539
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between mapui:gap-2 mapui:px-3 mapui:py-2", children: [
@@ -2474,8 +2543,8 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2474
2543
  "button",
2475
2544
  {
2476
2545
  type: "button",
2477
- onClick: () => $(N),
2478
- disabled: N === 0,
2546
+ onClick: () => w(k),
2547
+ disabled: k === 0,
2479
2548
  "aria-label": "Move layer up",
2480
2549
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2481
2550
  children: "▲"
@@ -2485,8 +2554,8 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2485
2554
  "button",
2486
2555
  {
2487
2556
  type: "button",
2488
- onClick: () => C(N),
2489
- disabled: N === e.length - 1,
2557
+ onClick: () => C(k),
2558
+ disabled: k === e.length - 1,
2490
2559
  "aria-label": "Move layer down",
2491
2560
  className: "mapui:cursor-pointer mapui:rounded mapui:border-none mapui:bg-transparent mapui:px-1 mapui:text-xs mapui:text-gray-400 hover:mapui:text-gray-600 disabled:mapui:opacity-30",
2492
2561
  children: "▼"
@@ -2502,18 +2571,18 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2502
2571
  }
2503
2572
  ),
2504
2573
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:min-w-0 mapui:flex-col mapui:gap-0.5", children: [
2505
- /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: g.label || g.id }),
2506
- /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: g.collection }),
2574
+ /* @__PURE__ */ a("span", { className: "mapui:text-sm mapui:font-medium mapui:text-gray-800", children: b.label || b.id }),
2575
+ /* @__PURE__ */ a("span", { className: "mapui:font-mono mapui:text-xs mapui:text-gray-500", children: b.collection }),
2507
2576
  /* @__PURE__ */ l("div", { className: "mapui:mt-1 mapui:flex mapui:flex-wrap mapui:gap-1", children: [
2508
- /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: g.dataMode }),
2509
- g.style && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: g.style.type }),
2510
- g.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
2511
- (((h = (R = g.search) == null ? void 0 : R.fields) == null ? void 0 : h.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
2512
- g.search.fields.length,
2577
+ /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-slate-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-slate-700", children: b.dataMode }),
2578
+ (((B = b.styles) == null ? void 0 : B.length) ?? 0) > 0 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-purple-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-purple-700", children: b.styles.map(($) => $.type).join(" · ") }),
2579
+ b.visible === !1 && /* @__PURE__ */ a("span", { className: "mapui:rounded mapui:bg-amber-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-amber-700", children: "hidden" }),
2580
+ (((L = (g = b.search) == null ? void 0 : g.fields) == null ? void 0 : L.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-blue-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-blue-700", children: [
2581
+ b.search.fields.length,
2513
2582
  " search fields"
2514
2583
  ] }),
2515
- (((I = (T = g.legend) == null ? void 0 : T.entries) == null ? void 0 : I.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
2516
- g.legend.entries.length,
2584
+ (((E = (I = b.legend) == null ? void 0 : I.entries) == null ? void 0 : E.length) ?? 0) > 0 && /* @__PURE__ */ l("span", { className: "mapui:rounded mapui:bg-green-100 mapui:px-1.5 mapui:py-0.5 mapui:text-[10px] mapui:font-medium mapui:text-green-700", children: [
2585
+ b.legend.entries.length,
2517
2586
  " legend entries"
2518
2587
  ] })
2519
2588
  ] })
@@ -2524,26 +2593,26 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2524
2593
  "button",
2525
2594
  {
2526
2595
  type: "button",
2527
- onClick: () => o(n === g.id ? null : g.id),
2596
+ onClick: () => o(n === b.id ? null : b.id),
2528
2597
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-gray-600 hover:mapui:bg-gray-50",
2529
- children: n === g.id ? "Close" : "Edit"
2598
+ children: n === b.id ? "Close" : "Edit"
2530
2599
  }
2531
2600
  ),
2532
2601
  /* @__PURE__ */ a(
2533
2602
  "button",
2534
2603
  {
2535
2604
  type: "button",
2536
- onClick: () => f(g.id),
2605
+ onClick: () => f(b.id),
2537
2606
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2538
2607
  children: "Remove"
2539
2608
  }
2540
2609
  )
2541
2610
  ] })
2542
2611
  ] }),
2543
- n === g.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2544
- Te,
2612
+ n === b.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(
2613
+ De,
2545
2614
  {
2546
- value: g,
2615
+ value: b,
2547
2616
  onChange: D,
2548
2617
  availableSources: i,
2549
2618
  availableIcons: r
@@ -2551,16 +2620,16 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2551
2620
  ) })
2552
2621
  ]
2553
2622
  },
2554
- g.id
2623
+ b.id
2555
2624
  );
2556
2625
  }) }),
2557
2626
  p && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2558
2627
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Layer" }),
2559
2628
  /* @__PURE__ */ a(
2560
- Te,
2629
+ De,
2561
2630
  {
2562
2631
  value: m,
2563
- onChange: w,
2632
+ onChange: x,
2564
2633
  availableSources: i,
2565
2634
  availableIcons: r
2566
2635
  }
@@ -2570,7 +2639,7 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2570
2639
  "button",
2571
2640
  {
2572
2641
  type: "button",
2573
- onClick: k,
2642
+ onClick: N,
2574
2643
  disabled: !m.id || !m.sourceId || !m.collection,
2575
2644
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
2576
2645
  children: "Save"
@@ -2580,7 +2649,7 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2580
2649
  "button",
2581
2650
  {
2582
2651
  type: "button",
2583
- onClick: () => b(!1),
2652
+ onClick: () => y(!1),
2584
2653
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-gray-300 mapui:bg-white mapui:px-3 mapui:py-1 mapui:text-xs mapui:text-gray-700 hover:mapui:bg-gray-50",
2585
2654
  children: "Cancel"
2586
2655
  }
@@ -2590,17 +2659,17 @@ function _a({ layers: e, onChange: t, availableSources: i, availableIcons: r })
2590
2659
  /* @__PURE__ */ a(
2591
2660
  Z,
2592
2661
  {
2593
- open: d !== null,
2662
+ open: h !== null,
2594
2663
  title: "Remove Layer",
2595
2664
  description: "Are you sure you want to remove this layer from the configuration?",
2596
- onConfirm: () => d && x(d),
2665
+ onConfirm: () => h && M(h),
2597
2666
  onCancel: () => f(null)
2598
2667
  }
2599
2668
  )
2600
2669
  ] });
2601
2670
  }
2602
2671
  const Q = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2603
- function Le({ value: e, onChange: t }) {
2672
+ function Te({ value: e, onChange: t }) {
2604
2673
  const i = (r) => t({ ...e, ...r });
2605
2674
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2606
2675
  /* @__PURE__ */ a(S, { label: "ID", required: !0, children: /* @__PURE__ */ a(
@@ -2656,13 +2725,13 @@ function Le({ value: e, onChange: t }) {
2656
2725
  ] });
2657
2726
  }
2658
2727
  const pe = () => ({ id: "", label: "", url: "" });
2659
- function Ya({ basemaps: e, onChange: t }) {
2660
- const [i, r] = L(null), [n, o] = L(!1), [p, b] = L(pe()), [m, w] = L(null), d = (u) => {
2728
+ function Ka({ basemaps: e, onChange: t }) {
2729
+ const [i, r] = A(null), [n, o] = A(!1), [p, y] = A(pe()), [m, x] = A(null), h = (u) => {
2661
2730
  t(e.map((s) => s.id === i ? u : s));
2662
2731
  }, f = () => {
2663
- t([...e, p]), o(!1), b(pe());
2664
- }, c = (u) => {
2665
- t(e.filter((s) => s.id !== u)), w(null);
2732
+ t([...e, p]), o(!1), y(pe());
2733
+ }, d = (u) => {
2734
+ t(e.filter((s) => s.id !== u)), x(null);
2666
2735
  };
2667
2736
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2668
2737
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2672,7 +2741,7 @@ function Ya({ basemaps: e, onChange: t }) {
2672
2741
  {
2673
2742
  type: "button",
2674
2743
  onClick: () => {
2675
- o(!0), b(pe());
2744
+ o(!0), y(pe());
2676
2745
  },
2677
2746
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
2678
2747
  children: "+ Add Basemap"
@@ -2712,21 +2781,21 @@ function Ya({ basemaps: e, onChange: t }) {
2712
2781
  "button",
2713
2782
  {
2714
2783
  type: "button",
2715
- onClick: () => w(u.id),
2784
+ onClick: () => x(u.id),
2716
2785
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2717
2786
  children: "Remove"
2718
2787
  }
2719
2788
  )
2720
2789
  ] })
2721
2790
  ] }),
2722
- i === u.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Le, { value: u, onChange: d }) })
2791
+ i === u.id && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Te, { value: u, onChange: h }) })
2723
2792
  ]
2724
2793
  },
2725
2794
  u.id
2726
2795
  )) }),
2727
2796
  n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2728
2797
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Basemap" }),
2729
- /* @__PURE__ */ a(Le, { value: p, onChange: b }),
2798
+ /* @__PURE__ */ a(Te, { value: p, onChange: y }),
2730
2799
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
2731
2800
  /* @__PURE__ */ a(
2732
2801
  "button",
@@ -2755,13 +2824,13 @@ function Ya({ basemaps: e, onChange: t }) {
2755
2824
  open: m !== null,
2756
2825
  title: "Remove Basemap",
2757
2826
  description: "Are you sure you want to remove this basemap from the configuration?",
2758
- onConfirm: () => m && c(m),
2759
- onCancel: () => w(null)
2827
+ onConfirm: () => m && d(m),
2828
+ onCancel: () => x(null)
2760
2829
  }
2761
2830
  )
2762
2831
  ] });
2763
2832
  }
2764
- const Ie = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2833
+ const Le = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2765
2834
  function Ae({ value: e, onChange: t }) {
2766
2835
  const i = (r) => t({ ...e, ...r });
2767
2836
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
@@ -2772,7 +2841,7 @@ function Ae({ value: e, onChange: t }) {
2772
2841
  value: e.id,
2773
2842
  onChange: (r) => i({ id: r.target.value }),
2774
2843
  placeholder: "my-sprites",
2775
- className: Ie
2844
+ className: Le
2776
2845
  }
2777
2846
  ) }),
2778
2847
  /* @__PURE__ */ l(S, { label: "Sprite URL", required: !0, children: [
@@ -2783,7 +2852,7 @@ function Ae({ value: e, onChange: t }) {
2783
2852
  value: e.url,
2784
2853
  onChange: (r) => i({ url: r.target.value }),
2785
2854
  placeholder: "https://example.com/sprites/sprite",
2786
- className: Ie
2855
+ className: Le
2787
2856
  }
2788
2857
  ),
2789
2858
  /* @__PURE__ */ l("p", { className: "mapui:mt-1 mapui:text-xs mapui:text-gray-400", children: [
@@ -2796,21 +2865,21 @@ function Ae({ value: e, onChange: t }) {
2796
2865
  ] })
2797
2866
  ] });
2798
2867
  }
2799
- const oe = () => ({ id: "", url: "" }), Pa = (e) => {
2868
+ const oe = () => ({ id: "", url: "" }), ja = (e) => {
2800
2869
  try {
2801
2870
  return new URL(e), !0;
2802
2871
  } catch {
2803
2872
  return !1;
2804
2873
  }
2805
2874
  };
2806
- function Xa({ sprites: e, onChange: t }) {
2807
- const [i, r] = L(null), [n, o] = L(!1), [p, b] = L(oe()), [m, w] = L(null), d = (u) => {
2875
+ function Qa({ sprites: e, onChange: t }) {
2876
+ const [i, r] = A(null), [n, o] = A(!1), [p, y] = A(oe()), [m, x] = A(null), h = (u) => {
2808
2877
  t(e.map((s, v) => v === i ? u : s));
2809
2878
  }, f = () => {
2810
- t([...e, p]), o(!1), b(oe());
2811
- }, c = (u) => {
2879
+ t([...e, p]), o(!1), y(oe());
2880
+ }, d = (u) => {
2812
2881
  const s = e.findIndex((v) => v.id === u);
2813
- t(e.filter((v) => v.id !== u)), i !== null && (s === i ? r(null) : s < i && r(i - 1)), w(null);
2882
+ t(e.filter((v) => v.id !== u)), i !== null && (s === i ? r(null) : s < i && r(i - 1)), x(null);
2814
2883
  };
2815
2884
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
2816
2885
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:justify-between", children: [
@@ -2820,7 +2889,7 @@ function Xa({ sprites: e, onChange: t }) {
2820
2889
  {
2821
2890
  type: "button",
2822
2891
  onClick: () => {
2823
- o(!0), b(oe());
2892
+ o(!0), y(oe());
2824
2893
  },
2825
2894
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700",
2826
2895
  children: "+ Add Sprite Sheet"
@@ -2852,28 +2921,28 @@ function Xa({ sprites: e, onChange: t }) {
2852
2921
  "button",
2853
2922
  {
2854
2923
  type: "button",
2855
- onClick: () => w(u.id),
2924
+ onClick: () => x(u.id),
2856
2925
  className: "mapui:cursor-pointer mapui:rounded mapui:border mapui:border-red-200 mapui:bg-white mapui:px-2 mapui:py-1 mapui:text-xs mapui:text-red-600 hover:mapui:bg-red-50",
2857
2926
  children: "Remove"
2858
2927
  }
2859
2928
  )
2860
2929
  ] })
2861
2930
  ] }),
2862
- i === s && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Ae, { value: u, onChange: d }) })
2931
+ i === s && /* @__PURE__ */ a("div", { className: "mapui:border-t mapui:border-gray-100 mapui:p-3", children: /* @__PURE__ */ a(Ae, { value: u, onChange: h }) })
2863
2932
  ]
2864
2933
  },
2865
2934
  s
2866
2935
  )) }),
2867
2936
  n && /* @__PURE__ */ l("div", { className: "mapui:rounded-lg mapui:border mapui:border-blue-200 mapui:bg-blue-50 mapui:p-3", children: [
2868
2937
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-3 mapui:text-xs mapui:font-semibold mapui:text-blue-700", children: "New Sprite Sheet" }),
2869
- /* @__PURE__ */ a(Ae, { value: p, onChange: b }),
2938
+ /* @__PURE__ */ a(Ae, { value: p, onChange: y }),
2870
2939
  /* @__PURE__ */ l("div", { className: "mapui:mt-3 mapui:flex mapui:gap-2", children: [
2871
2940
  /* @__PURE__ */ a(
2872
2941
  "button",
2873
2942
  {
2874
2943
  type: "button",
2875
2944
  onClick: f,
2876
- disabled: !p.id || !p.url || !Pa(p.url) || e.some((u) => u.id === p.id),
2945
+ disabled: !p.id || !p.url || !ja(p.url) || e.some((u) => u.id === p.id),
2877
2946
  className: "mapui:cursor-pointer mapui:rounded mapui:bg-blue-600 mapui:px-3 mapui:py-1 mapui:text-xs mapui:font-medium mapui:text-white hover:mapui:bg-blue-700 disabled:mapui:cursor-not-allowed disabled:mapui:opacity-50",
2878
2947
  children: "Save"
2879
2948
  }
@@ -2895,13 +2964,13 @@ function Xa({ sprites: e, onChange: t }) {
2895
2964
  open: m !== null,
2896
2965
  title: "Remove Sprite Sheet",
2897
2966
  description: "Are you sure you want to remove this sprite sheet from the configuration?",
2898
- onConfirm: () => m && c(m),
2899
- onCancel: () => w(null)
2967
+ onConfirm: () => m && d(m),
2968
+ onCancel: () => x(null)
2900
2969
  }
2901
2970
  )
2902
2971
  ] });
2903
2972
  }
2904
- const Fa = [
2973
+ const $a = [
2905
2974
  { key: "showLayerPanel", label: "Layer Panel", description: "Toggle layer visibility" },
2906
2975
  { key: "showLegend", label: "Legend", description: "Map legend" },
2907
2976
  { key: "showBasemapSwitcher", label: "Basemap Switcher", description: "Switch basemap styles" },
@@ -2912,13 +2981,13 @@ const Fa = [
2912
2981
  { key: "showExportButton", label: "Export Button", description: "Export data as CSV" },
2913
2982
  { key: "showLegendOpacity", label: "Legend Opacity", description: "Expand legend with opacity sliders" }
2914
2983
  ];
2915
- function Ha({ value: e, onChange: t }) {
2984
+ function Za({ value: e, onChange: t }) {
2916
2985
  const i = (r, n) => {
2917
2986
  t({ ...e, [r]: n });
2918
2987
  };
2919
2988
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-1", children: [
2920
2989
  /* @__PURE__ */ a("p", { className: "mapui:m-0 mapui:mb-2 mapui:text-xs mapui:text-gray-500", children: "Enable or disable UI panels and controls." }),
2921
- /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: Fa.map(({ key: r, label: n, description: o }) => {
2990
+ /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-1 mapui:gap-2 sm:mapui:grid-cols-2", children: $a.map(({ key: r, label: n, description: o }) => {
2922
2991
  const p = e[r];
2923
2992
  return /* @__PURE__ */ l(
2924
2993
  "label",
@@ -2935,7 +3004,7 @@ function Ha({ value: e, onChange: t }) {
2935
3004
  {
2936
3005
  type: "checkbox",
2937
3006
  checked: p,
2938
- onChange: (b) => i(r, b.target.checked),
3007
+ onChange: (y) => i(r, y.target.checked),
2939
3008
  className: "mapui:sr-only",
2940
3009
  "aria-label": n
2941
3010
  }
@@ -2973,7 +3042,7 @@ const Ge = [
2973
3042
  { key: "pitch", label: "Pitch (°)", min: 0, max: 85, step: 1, placeholder: "0" },
2974
3043
  { key: "bearing", label: "Bearing (°)", min: -180, max: 180, step: 1, placeholder: "0" }
2975
3044
  ];
2976
- function Ma(e, t) {
3045
+ function Ra(e, t) {
2977
3046
  const i = Ge.find((r) => r.key === e);
2978
3047
  if (i) {
2979
3048
  if (isNaN(t)) return "Must be a number";
@@ -2981,31 +3050,31 @@ function Ma(e, t) {
2981
3050
  if (t > i.max) return `Must be at most ${i.max}`;
2982
3051
  }
2983
3052
  }
2984
- const Oa = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
2985
- function Ja({ value: e, onChange: t }) {
3053
+ const Ba = "mapui:rounded mapui:border mapui:border-gray-300 mapui:px-2 mapui:py-1 mapui:text-sm mapui:outline-none focus:mapui:border-blue-500 focus:mapui:ring-1 focus:mapui:ring-blue-500";
3054
+ function et({ value: e, onChange: t }) {
2986
3055
  const i = (r, n) => {
2987
3056
  const o = parseFloat(n);
2988
3057
  t({ ...e, [r]: isNaN(o) ? 0 : o });
2989
3058
  };
2990
- return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ge.map(({ key: r, label: n, min: o, max: p, step: b, placeholder: m }) => {
2991
- const w = Ma(r, e[r]);
2992
- return /* @__PURE__ */ a(S, { label: n, error: w, children: /* @__PURE__ */ a(
3059
+ return /* @__PURE__ */ a("div", { className: "mapui:grid mapui:grid-cols-2 mapui:gap-3", children: Ge.map(({ key: r, label: n, min: o, max: p, step: y, placeholder: m }) => {
3060
+ const x = Ra(r, e[r]);
3061
+ return /* @__PURE__ */ a(S, { label: n, error: x, children: /* @__PURE__ */ a(
2993
3062
  "input",
2994
3063
  {
2995
3064
  type: "number",
2996
3065
  min: o,
2997
3066
  max: p,
2998
- step: b,
3067
+ step: y,
2999
3068
  value: e[r],
3000
3069
  placeholder: m,
3001
- onChange: (d) => i(r, d.target.value),
3002
- className: `${Oa} ${w ? "mapui:border-red-400" : ""}`
3070
+ onChange: (h) => i(r, h.target.value),
3071
+ className: `${Ba} ${x ? "mapui:border-red-400" : ""}`
3003
3072
  }
3004
3073
  ) }, r);
3005
3074
  }) });
3006
3075
  }
3007
- function Ka({ config: e }) {
3008
- const t = Xe(e);
3076
+ function at({ config: e }) {
3077
+ const t = Ye(e);
3009
3078
  return /* @__PURE__ */ l("div", { className: "mapui:flex mapui:flex-col mapui:gap-3", children: [
3010
3079
  /* @__PURE__ */ l("div", { className: "mapui:flex mapui:items-center mapui:gap-2", children: [
3011
3080
  /* @__PURE__ */ a(
@@ -3031,134 +3100,137 @@ function Ka({ config: e }) {
3031
3100
  ] });
3032
3101
  }
3033
3102
  export {
3034
- li as BasemapConfigSchema,
3035
- Le as BasemapEditor,
3036
- Ya as BasemapList,
3037
- et as BasemapSwitcher,
3038
- ni as CircleLayoutSchema,
3039
- pi as CirclePaintSchema,
3040
- oi as CircleStyleSchema,
3041
- tt as CollapsibleControl,
3042
- Wa as CollectionBrowser,
3103
+ ui as BasemapConfigSchema,
3104
+ Te as BasemapEditor,
3105
+ Ka as BasemapList,
3106
+ rt as BasemapSwitcher,
3107
+ mi as CircleLayoutSchema,
3108
+ si as CirclePaintSchema,
3109
+ ci as CircleStyleSchema,
3110
+ nt as CollapsibleControl,
3111
+ _a as CollectionBrowser,
3043
3112
  Y as ColorPicker,
3044
- Ka as ConfigPreview,
3113
+ at as ConfigPreview,
3045
3114
  Z as ConfirmDialog,
3046
- rt as CoordinateDisplay,
3047
- ui as DatetimeSearchFieldSchema,
3048
- ot as ExportButton,
3049
- mt as FeatureDetailPanel,
3050
- ct as FeatureTooltip,
3051
- mi as FillLayoutSchema,
3052
- si as FillPaintSchema,
3053
- ci as FillStyleSchema,
3054
- di as FilterConfigSchema,
3115
+ ot as CoordinateDisplay,
3116
+ di as DatetimeSearchFieldSchema,
3117
+ ct as ExportButton,
3118
+ ht as FeatureDetailPanel,
3119
+ bt as FeatureTooltip,
3120
+ hi as FillLayoutSchema,
3121
+ gi as FillPaintSchema,
3122
+ bi as FillStyleSchema,
3123
+ yi as FilterConfigSchema,
3055
3124
  S as FormField,
3056
- hi as LayerConfigSchema,
3057
- Te as LayerEditor,
3058
- _a as LayerList,
3059
- ht as LayerPanel,
3060
- bt as Legend,
3061
- gi as LegendConfigSchema,
3062
- va as LegendEditor,
3063
- wa as LegendEntryEditor,
3064
- bi as LegendEntrySchema,
3065
- yi as LineLayoutSchema,
3066
- fi as LinePaintSchema,
3067
- xi as LineStyleSchema,
3068
- wi as MapConfigSchema,
3069
- vi as NumberSearchFieldSchema,
3070
- Ni as OgcApiSourceSchema,
3071
- ki as PropertyDisplayConfigSchema,
3072
- La as PropertyDisplayEditor,
3073
- Ci as PropertyDisplaySchema,
3074
- Si as SearchConfigSchema,
3075
- ka as SearchFieldEditor,
3076
- Sa as SearchFieldList,
3077
- Di as SearchFieldSchema,
3078
- ft as SearchPanel,
3079
- Ti as SelectSearchFieldSchema,
3080
- de as SourceEditor,
3081
- Ua as SourceList,
3125
+ fi as GeometryTypeSchema,
3126
+ xi as LayerConfigSchema,
3127
+ De as LayerEditor,
3128
+ Ja as LayerList,
3129
+ ft as LayerPanel,
3130
+ wt as Legend,
3131
+ wi as LegendConfigSchema,
3132
+ Na as LegendEditor,
3133
+ va as LegendEntryEditor,
3134
+ vi as LegendEntrySchema,
3135
+ Ni as LineLayoutSchema,
3136
+ ki as LinePaintSchema,
3137
+ Ci as LineStyleSchema,
3138
+ Si as MapConfigSchema,
3139
+ Di as NumberSearchFieldSchema,
3140
+ Ti as OgcApiSourceSchema,
3141
+ Li as PropertyDisplayConfigSchema,
3142
+ Aa as PropertyDisplayEditor,
3143
+ Ai as PropertyDisplaySchema,
3144
+ Ii as SearchConfigSchema,
3145
+ Ca as SearchFieldEditor,
3146
+ Da as SearchFieldList,
3147
+ Ei as SearchFieldSchema,
3148
+ Nt as SearchPanel,
3149
+ Fi as SelectSearchFieldSchema,
3150
+ ce as SourceEditor,
3151
+ Va as SourceList,
3082
3152
  Ae as SpriteSourceEditor,
3083
- Xa as SpriteSourceList,
3084
- Li as SpriteSourceSchema,
3085
- Ii as StyleConfigSchema,
3086
- xa as StyleEditor,
3087
- Ai as SymbolLayoutSchema,
3088
- Ei as SymbolPaintSchema,
3089
- Pi as SymbolStyleSchema,
3090
- Fi as TextSearchFieldSchema,
3091
- Ha as UIConfigEditor,
3092
- Mi as UIConfigSchema,
3093
- Oi as ViewConfigSchema,
3094
- Ja as ViewEditor,
3095
- wt as and,
3096
- vt as between,
3097
- $e as defaultCircle,
3153
+ Qa as SpriteSourceList,
3154
+ Pi as SpriteSourceSchema,
3155
+ Mi as StyleConfigSchema,
3156
+ wa as StyleEditor,
3157
+ Oi as SymbolLayoutSchema,
3158
+ ji as SymbolPaintSchema,
3159
+ $i as SymbolStyleSchema,
3160
+ Ri as TextSearchFieldSchema,
3161
+ Za as UIConfigEditor,
3162
+ Bi as UIConfigSchema,
3163
+ qi as ViewConfigSchema,
3164
+ et as ViewEditor,
3165
+ Ct as and,
3166
+ St as between,
3167
+ Pa as buildDefaultStylesForGeometryTypes,
3168
+ Oe as defaultCircle,
3098
3169
  me as defaultFill,
3099
- je as defaultLine,
3100
- Re as defaultSymbol,
3101
- We as detectGeometryStyleTypesFromQueryables,
3102
- Aa as detectGeometryTypeFromQueryables,
3103
- Ga as detectStyleTypeForCollection,
3104
- za as detectStyleTypesForCollection,
3105
- Nt as downloadCsv,
3106
- kt as eq,
3107
- Oe as expressionColors,
3108
- la as expressionEntries,
3109
- na as expressionPropertyName,
3110
- ra as expressionType,
3111
- qe as extractGeometryType,
3112
- Ct as featuresToCsv,
3113
- St as fetchCollectionDetail,
3114
- Dt as fetchCollections,
3115
- Tt as fetchConformance,
3116
- Ye as fetchDistinctValues,
3117
- Lt as fetchFeatureCount,
3170
+ ga as defaultLine,
3171
+ ba as defaultSymbol,
3172
+ qe as detectGeometryStyleTypesFromQueryables,
3173
+ Ea as detectGeometryTypeFromQueryables,
3174
+ Ue as detectGeometryTypesFromFeatures,
3175
+ Ya as detectStyleTypeForCollection,
3176
+ Xa as detectStyleTypesForCollection,
3177
+ Dt as downloadCsv,
3178
+ Tt as eq,
3179
+ Me as expressionColors,
3180
+ ra as expressionEntries,
3181
+ la as expressionPropertyName,
3182
+ ia as expressionType,
3183
+ $e as extractGeometryType,
3184
+ Lt as featuresToCsv,
3185
+ At as fetchCollectionDetail,
3186
+ It as fetchCollections,
3187
+ Et as fetchConformance,
3188
+ _e as fetchDistinctValues,
3189
+ Ft as fetchFeatureCount,
3118
3190
  se as fetchFeatures,
3119
- Me as fetchQueryables,
3120
- It as fetchSpriteNames,
3121
- At as fetchSpriteUrlFromStyle,
3122
- Et as fetchTileJson,
3123
- lt as formatDMS,
3124
- nt as formatDecimal,
3125
- Pt as fromSimpleFilters,
3126
- Ft as fromStructuredFilters,
3127
- Ue as geometryTypeToStyleType,
3128
- ce as geometryTypeToStyleTypes,
3191
+ Pe as fetchQueryables,
3192
+ Pt as fetchSpriteNames,
3193
+ Mt as fetchSpriteUrlFromStyle,
3194
+ Ot as fetchTileJson,
3195
+ ut as formatDMS,
3196
+ mt as formatDecimal,
3197
+ jt as fromSimpleFilters,
3198
+ $t as fromStructuredFilters,
3199
+ Re as geometryTypeToStyleType,
3200
+ Be as geometryTypeToStyleTypes,
3129
3201
  ae as getColorFromPalette,
3130
- Mt as getCql2FilteredVectorTileUrl,
3131
- Ot as getFilteredVectorTileUrl,
3132
- pa as getPrimaryColor,
3133
- oa as getShapeForStyleType,
3134
- jt as getTileJsonUrl,
3135
- $t as getVectorTileUrl,
3136
- Rt as gt,
3137
- Bt as gte,
3138
- Va as humanizePropertyName,
3139
- qt as inList,
3140
- G as isExpression,
3202
+ Rt as getCql2FilteredVectorTileUrl,
3203
+ Bt as getFilteredVectorTileUrl,
3204
+ na as getPrimaryColor,
3205
+ pa as getShapeForStyleType,
3206
+ qt as getTileJsonUrl,
3207
+ Ut as getVectorTileUrl,
3208
+ Gt as gt,
3209
+ Wt as gte,
3210
+ Ha as humanizePropertyName,
3211
+ zt as inList,
3212
+ W as isExpression,
3141
3213
  Ia as isGeometryProperty,
3142
- Ut as isNull,
3143
- Wt as like,
3144
- Gt as lt,
3145
- zt as lte,
3146
- Vt as neq,
3147
- _t as not,
3148
- Yt as or,
3149
- Xt as resolveAvailableIcons,
3150
- Ht as resolvePropertyDisplay,
3151
- Jt as resolveStyleWithSprites,
3152
- Xe as safeValidateMapConfig,
3153
- Kt as serializeCql2,
3154
- Qt as tAfter,
3155
- Zt as tBefore,
3156
- ei as tDuring,
3157
- Ea as toAvailableProperties,
3158
- ai as useCsvExport,
3159
- ti as useOgcCollectionDetail,
3214
+ Vt as isNull,
3215
+ _t as like,
3216
+ Yt as lt,
3217
+ Xt as lte,
3218
+ Ht as neq,
3219
+ Jt as not,
3220
+ Kt as or,
3221
+ Qt as resolveAvailableIcons,
3222
+ Zt as resolvePropertyDisplay,
3223
+ ei as resolveStyleWithSprites,
3224
+ Ye as safeValidateMapConfig,
3225
+ ai as serializeCql2,
3226
+ ti as tAfter,
3227
+ ii as tBefore,
3228
+ ri as tDuring,
3229
+ Fa as toAvailableProperties,
3230
+ li as useCsvExport,
3231
+ ni as useOgcCollectionDetail,
3160
3232
  Fe as useOgcCollections,
3161
- ii as useOgcFeatures,
3162
- _e as useOgcQueryables,
3163
- ji as validateMapConfig
3233
+ pi as useOgcFeatures,
3234
+ Ve as useOgcQueryables,
3235
+ Ui as validateMapConfig
3164
3236
  };