webim-adapter 1.1.0 → 1.1.1

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.
@@ -263,16 +263,16 @@ function P(e) {
263
263
  delete t.filters, delete t.backdropFilters, delete t.filterBlur, delete t.filterGrayscale, delete t.filterBrightness, delete t.filterContrast, delete t.filterSaturate;
264
264
  let H = F(I);
265
265
  R !== void 0 && H.push(`blur(${M(R)})`), z !== void 0 && H.push(`grayscale(${z}%)`), B !== void 0 && H.push(`brightness(${B}%)`), V !== void 0 && H.push(`contrast(${V}%)`), ee !== void 0 && H.push(`saturate(${ee}%)`), H.length && (t.filter = H.join(" "));
266
- let U = F(L);
267
- U.length && (t.backdropFilter = U.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
268
- let { textStrokeWidth: te, textStrokeColor: W } = t;
269
- delete t.textStrokeWidth, delete t.textStrokeColor, (te !== void 0 || W !== void 0) && (t.WebkitTextStroke = `${M(te ?? 1)} ${W || "currentColor"}`);
266
+ let te = F(L);
267
+ te.length && (t.backdropFilter = te.join(" "), t.WebkitBackdropFilter = t.backdropFilter);
268
+ let { textStrokeWidth: U, textStrokeColor: W } = t;
269
+ delete t.textStrokeWidth, delete t.textStrokeColor, (U !== void 0 || W !== void 0) && (t.WebkitTextStroke = `${M(U ?? 1)} ${W || "currentColor"}`);
270
270
  let { clipText: ne } = t;
271
271
  delete t.clipText, ne && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
272
- let { transitions: re, transitionDuration: ie, transitionEasing: G, transitionProperty: ae } = t, oe = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
272
+ let { transitions: re, transitionDuration: ie, transitionEasing: ae, transitionProperty: G } = t, oe = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
273
273
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
274
274
  let se = (Array.isArray(re) ? re : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${oe(e.duration ?? 200)} ${e.easing || "ease"}`);
275
- if (ie !== void 0 && se.push(`${ae || "all"} ${oe(ie)} ${G || "ease"}`), se.length && (t.transition = se.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
275
+ if (ie !== void 0 && se.push(`${G || "all"} ${oe(ie)} ${ae || "ease"}`), se.length && (t.transition = se.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
276
276
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
277
277
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
278
278
  }
@@ -335,7 +335,7 @@ function H(e, t) {
335
335
  }
336
336
  return [];
337
337
  }
338
- function U(e, t) {
338
+ function te(e, t) {
339
339
  for (let t of e.__webimEvents ?? []) t();
340
340
  let n = [];
341
341
  for (let r of t ?? []) {
@@ -366,7 +366,7 @@ function U(e, t) {
366
366
  }
367
367
  e.__webimEvents = n;
368
368
  }
369
- function te(e, t, n = []) {
369
+ function U(e, t, n = []) {
370
370
  t.htmlId ? e.id = t.htmlId : e.removeAttribute("id");
371
371
  let r = R(t.classNames), i = R(e.getAttribute("data-wb-class"));
372
372
  for (let t of i) r.includes(t) || e.classList.remove(t);
@@ -401,17 +401,17 @@ var ie = [
401
401
  key: "mobile",
402
402
  max: 478
403
403
  }
404
- ], G = (e) => Object.entries(P(e)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
405
- function ae(e, t) {
404
+ ], ae = (e) => Object.entries(P(e)).map(([e, t]) => `${W(e)}: ${t} !important;`).join(" ");
405
+ function G(e, t) {
406
406
  return ie.map(({ key: n, max: r }) => {
407
- let i = t?.[n] ? G(t[n]) : "";
407
+ let i = t?.[n] ? ae(t[n]) : "";
408
408
  return i ? `@media (max-width: ${r}px) { [data-wb="${e}"] { ${i} } }` : "";
409
409
  }).filter(Boolean).join("\n");
410
410
  }
411
411
  function oe(e, t) {
412
412
  let n = [], r = (e) => {
413
413
  for (let [t, r] of Object.entries(e || {})) {
414
- let e = ae(t, r.props);
414
+ let e = G(t, r.props);
415
415
  e && n.push(e);
416
416
  }
417
417
  };
@@ -587,11 +587,11 @@ var q = n({
587
587
  ...xe()
588
588
  };
589
589
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
590
- }, Ce = n(null), J = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
591
- function we(e, t) {
590
+ }, Ce = n(null), we = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
591
+ function Te(e, t) {
592
592
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
593
593
  }
594
- var Y = (e) => {
594
+ var J = (e) => {
595
595
  let t = [];
596
596
  for (let [n, r] of Object.entries(e ?? {})) {
597
597
  if (!/^[\w-]+$/.test(n)) continue;
@@ -601,16 +601,16 @@ var Y = (e) => {
601
601
  }
602
602
  return t;
603
603
  };
604
- function X(e) {
604
+ function Y(e) {
605
605
  return e == null ? "" : typeof e == "string" || typeof e == "number" || typeof e == "boolean" ? String(e) : typeof e == "object" && !Array.isArray(e) && ("label" in e || "name" in e || "slug" in e) ? String(e.label ?? e.name ?? e.slug ?? "") : typeof e == "object" && !Array.isArray(e) && Number.isFinite(Number(e.lat)) && Number.isFinite(Number(e.lng)) ? `${e.lat}, ${e.lng}` : Array.isArray(e) ? e.map((e) => typeof e == "string" ? e : Array.isArray(e?.parts) ? e.parts.map((e) => e?.text ?? "").join("") : Array.isArray(e?.items) ? e.items.map((e) => e?.text ?? "").join(" ") : e && (e.label != null || e.name != null || e.slug != null) ? String(e.label ?? e.name ?? e.slug) : "").filter(Boolean).join(" ") : "";
606
606
  }
607
- function Z(e, t) {
608
- let n = t?.data ?? {}, r = Y(n);
607
+ function X(e, t) {
608
+ let n = t?.data ?? {}, r = J(n);
609
609
  if (!r.length) return e;
610
- let i = RegExp(`:(${r.map(J).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => X(we(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
610
+ let i = RegExp(`:(${r.map(we).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => Y(Te(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
611
611
  return a(e);
612
612
  }
613
- var Te = {
613
+ var Z = {
614
614
  margin: 0,
615
615
  fontWeight: 700,
616
616
  lineHeight: 1.2,
@@ -699,7 +699,7 @@ function Fe({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a
699
699
  return /* @__PURE__ */ d(n, {
700
700
  ref: a,
701
701
  style: {
702
- ...Te,
702
+ ...Z,
703
703
  ...P(r)
704
704
  },
705
705
  children: Re(t, e, i)
@@ -717,11 +717,17 @@ function Le(e, t = [], n, r) {
717
717
  return t.includes("sup") ? i = /* @__PURE__ */ d("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ d("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ d("code", {
718
718
  style: Ie,
719
719
  children: i
720
- })), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n && (i = /* @__PURE__ */ d("a", {
720
+ })), t.includes("strike") && (i = /* @__PURE__ */ d("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ d("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ d("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ d("strong", { children: i })), n ? i = /* @__PURE__ */ d("a", {
721
721
  href: n,
722
722
  target: r || void 0,
723
723
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
724
- style: { color: "inherit" },
724
+ style: {
725
+ color: "inherit",
726
+ ...t.includes("nounderline") && { textDecoration: "none" }
727
+ },
728
+ children: i
729
+ }) : t.includes("nounderline") && (i = /* @__PURE__ */ d("span", {
730
+ style: { textDecoration: "none" },
725
731
  children: i
726
732
  })), i;
727
733
  }
@@ -739,11 +745,17 @@ function Re(e, n, r) {
739
745
  ...e.background && { backgroundColor: e.background }
740
746
  },
741
747
  children: i
742
- })), e.href && (i = /* @__PURE__ */ d("a", {
748
+ })), e.href ? i = /* @__PURE__ */ d("a", {
743
749
  href: e.href,
744
750
  target: e.target || void 0,
745
751
  rel: e.target === "_blank" ? "noopener noreferrer" : void 0,
746
- style: { color: e.color ?? "inherit" },
752
+ style: {
753
+ color: e.color ?? "inherit",
754
+ ...e.nounderline && { textDecoration: "none" }
755
+ },
756
+ children: i
757
+ }) : e.nounderline && (i = /* @__PURE__ */ d("span", {
758
+ style: { textDecoration: "none" },
747
759
  children: i
748
760
  })), /* @__PURE__ */ d(t, { children: i }, n);
749
761
  }) : n;
@@ -959,7 +971,7 @@ function He(e = [], t, n) {
959
971
  let e = t.type;
960
972
  return /* @__PURE__ */ d(e, {
961
973
  style: {
962
- ...Te,
974
+ ...Z,
963
975
  fontSize: Be[t.type],
964
976
  ...i
965
977
  },
@@ -1702,9 +1714,9 @@ function yt({ name: e = "star", paths: t, fill: n = !1, size: r = 24, stroke: i
1702
1714
  });
1703
1715
  }
1704
1716
  function bt(e, t = {}, n = 0) {
1705
- let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : X(e), a = Math.max(0, Number(n) || 0), o = [];
1717
+ let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object") : [], i = (e) => e == null ? "" : Y(e), a = Math.max(0, Number(n) || 0), o = [];
1706
1718
  for (let e of r) {
1707
- let n = e.data ?? e, r = we(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(we(n, t.nameField)) : i(n.name), l = t.hrefField ? i(we(n, t.hrefField)) : "";
1719
+ let n = e.data ?? e, r = Te(n, t.imageField), s = (Array.isArray(r) ? r : [r]).map((e) => e && typeof e == "object" ? e.url ?? e.src ?? "" : e).filter((e) => typeof e == "string" && e.trim()), c = t.nameField ? i(Te(n, t.nameField)) : i(n.name), l = t.hrefField ? i(Te(n, t.hrefField)) : "";
1708
1720
  for (let e of s) if (o.push({
1709
1721
  src: e,
1710
1722
  name: c,
@@ -1950,7 +1962,7 @@ var St = {
1950
1962
  zIndex: 60
1951
1963
  };
1952
1964
  function wt(e, t = {}, n = "dropdown") {
1953
- let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : X(e), o = r.map((e) => {
1965
+ let r = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], i = (e) => Array.isArray(e) ? e[0] : e, a = (e) => e == null ? "" : Y(e), o = r.map((e) => {
1954
1966
  let n = e.data ?? {}, r = t.parentField ? i(n[t.parentField]) : null;
1955
1967
  return {
1956
1968
  key: e.id,
@@ -2264,55 +2276,79 @@ function Et({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
2264
2276
  }, e.key))]
2265
2277
  }) : null;
2266
2278
  }
2267
- function Dt({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
2268
- let [a, o] = l(() => new Set(e.length ? [e[0].key] : []));
2279
+ function Dt({ items: e = [], linked: t, multiple: n = !1, icon: r = "", padX: i, padY: a, headerBg: o, headerColor: s, openBg: c, openColor: u, borderColor: p, style: m, nodeRef: h }) {
2280
+ let [g, _] = l(() => new Set(e.length ? [e[0].key] : []));
2269
2281
  if (!e.length) return null;
2270
- let s = (e) => o((t) => {
2282
+ let v = (e, t) => typeof e == "string" && e ? e : t, y = (e, t) => {
2283
+ let n = Number(e);
2284
+ return e === "" || e == null || !Number.isFinite(n) ? t : n;
2285
+ }, b = vt[r], x = (e) => _((t) => {
2271
2286
  let r = new Set(n ? t : []);
2272
2287
  return t.has(e) ? r.delete(e) : r.add(e), r;
2273
2288
  });
2274
2289
  return /* @__PURE__ */ d("div", {
2275
- ref: i,
2290
+ ref: h,
2276
2291
  style: {
2277
2292
  width: "100%",
2278
- ...P(r)
2293
+ ...P(m)
2279
2294
  },
2280
2295
  children: e.map((n, r) => {
2281
- let i = a.has(n.key);
2296
+ let l = g.has(n.key);
2282
2297
  return /* @__PURE__ */ f("div", {
2283
- style: { borderBottom: r < e.length - 1 ? "1px solid rgba(148, 163, 184, 0.35)" : "none" },
2298
+ style: { borderBottom: r < e.length - 1 ? `1px solid ${v(p, "rgba(148, 163, 184, 0.35)")}` : "none" },
2284
2299
  children: [/* @__PURE__ */ f("button", {
2285
2300
  type: "button",
2286
- onClick: () => s(n.key),
2301
+ onClick: () => x(n.key),
2287
2302
  style: {
2288
2303
  width: "100%",
2289
2304
  display: "flex",
2290
2305
  alignItems: "center",
2291
2306
  justifyContent: "space-between",
2292
2307
  gap: 12,
2293
- background: "transparent",
2308
+ background: l ? v(c, v(o, "transparent")) : v(o, "transparent"),
2294
2309
  border: 0,
2295
- padding: "14px 4px",
2310
+ padding: `${y(a, 14)}px ${y(i, 4)}px`,
2296
2311
  fontSize: 15,
2297
2312
  fontWeight: 600,
2298
2313
  fontFamily: "inherit",
2299
- color: "inherit",
2314
+ color: l ? v(u, v(s, "inherit")) : v(s, "inherit"),
2300
2315
  textAlign: "left",
2301
- cursor: "pointer"
2316
+ cursor: "pointer",
2317
+ transition: "background 180ms, color 180ms"
2302
2318
  },
2303
- children: [n.title || `Item ${r + 1}`, /* @__PURE__ */ d("span", {
2319
+ children: [/* @__PURE__ */ f("span", {
2320
+ style: {
2321
+ display: "flex",
2322
+ alignItems: "center",
2323
+ gap: 10,
2324
+ minWidth: 0
2325
+ },
2326
+ children: [b ? /* @__PURE__ */ d("svg", {
2327
+ viewBox: "0 0 24 24",
2328
+ width: 16,
2329
+ height: 16,
2330
+ fill: "none",
2331
+ stroke: "currentColor",
2332
+ strokeWidth: 2,
2333
+ strokeLinecap: "round",
2334
+ strokeLinejoin: "round",
2335
+ "aria-hidden": "true",
2336
+ style: { flexShrink: 0 },
2337
+ children: /* @__PURE__ */ d("path", { d: b })
2338
+ }) : null, n.title || `Item ${r + 1}`]
2339
+ }), /* @__PURE__ */ d("span", {
2304
2340
  "aria-hidden": !0,
2305
2341
  style: {
2306
2342
  fontSize: 12,
2307
2343
  opacity: .6,
2308
- transform: i ? "rotate(180deg)" : "none",
2344
+ transform: l ? "rotate(180deg)" : "none",
2309
2345
  transition: "transform 180ms"
2310
2346
  },
2311
2347
  children: "▼"
2312
2348
  })]
2313
2349
  }), /* @__PURE__ */ d("div", {
2314
2350
  style: {
2315
- display: i ? "flex" : "none",
2351
+ display: l ? "flex" : "none",
2316
2352
  flexDirection: "column"
2317
2353
  },
2318
2354
  children: t?.[n.key] ?? null
@@ -2993,7 +3029,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
2993
3029
  },
2994
3030
  children: M.map((e) => /* @__PURE__ */ d("div", {
2995
3031
  style: { minWidth: 0 },
2996
- children: x.render(p, (t) => Z(t, e))
3032
+ children: x.render(p, (t) => X(t, e))
2997
3033
  }, e.id ?? e?.data?.slug))
2998
3034
  }) : /* @__PURE__ */ d("div", {
2999
3035
  ref: _,
@@ -3003,7 +3039,7 @@ function $t({ collection: e, limit: t = 6, layout: n = "grid", columns: r = 3, i
3003
3039
  ...P(g)
3004
3040
  },
3005
3041
  children: M.map((e) => {
3006
- let t = o ? we(e?.data, o) : null, r = s ? X(we(e?.data, s)) : null, i = c ? we(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : X(i), u = n === "list";
3042
+ let t = o ? Te(e?.data, o) : null, r = s ? Y(Te(e?.data, s)) : null, i = c ? Te(e?.data, c) : null, a = Array.isArray(i) ? i : null, l = a || i == null ? null : Y(i), u = n === "list";
3007
3043
  return /* @__PURE__ */ f("div", {
3008
3044
  style: {
3009
3045
  display: "flex",
@@ -3821,7 +3857,7 @@ var yn = (e, t) => {
3821
3857
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
3822
3858
  }, xn = (e) => !!(e?.cv?.trim?.() || e?.photo);
3823
3859
  function Sn(e, t = {}) {
3824
- let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : X(e);
3860
+ let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : Y(e);
3825
3861
  return n.map((e) => {
3826
3862
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
3827
3863
  return {
@@ -4190,87 +4226,87 @@ var Dn = 360, On = "\n.wb-tedit-btn {\n cursor: pointer;\n border-radius: 4px;
4190
4226
  children: t
4191
4227
  }) : t;
4192
4228
  };
4193
- function jn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, maxHeight: k, style: A, nodeRef: j, edit: M }) {
4194
- let N = c(null), F = c(null), [I, L] = l(null), [R, z] = l(null), B = (e, t) => () => L({
4229
+ function jn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], colKeys: o = [], heights: s = [], spans: p, linked: m, source: h, limit: g = 10, header: _ = !0, striped: v = !0, bordered: y = !1, compact: b = !1, padX: x, padY: S, paged: C, emptyText: w, stickyHeader: T, headerBg: E, headerColor: D, headerAlign: O, borderColor: k, maxHeight: A, style: j, nodeRef: M, edit: N }) {
4230
+ let F = c(null), I = c(null), [L, R] = l(null), [z, B] = l(null), V = (e, t) => () => R({
4195
4231
  r: e,
4196
4232
  c: t
4197
4233
  });
4198
4234
  a(() => {
4199
- if (!M) return;
4200
- let e = F.current, t = I && e?.querySelector(`[data-cell="${I.r}-${I.c}"]`);
4235
+ if (!N) return;
4236
+ let e = I.current, t = L && e?.querySelector(`[data-cell="${L.r}-${L.c}"]`);
4201
4237
  if (!t) {
4202
- R && z(null);
4238
+ z && B(null);
4203
4239
  return;
4204
4240
  }
4205
4241
  let n = e.getBoundingClientRect(), r = t.getBoundingClientRect(), i = {
4206
4242
  top: r.bottom - n.top + 4,
4207
4243
  left: Math.max(0, Math.min(r.left - n.left, n.width - Dn))
4208
4244
  };
4209
- (R?.top !== i.top || R?.left !== i.left) && z(i);
4245
+ (z?.top !== i.top || z?.left !== i.left) && B(i);
4210
4246
  }), a(() => {
4211
- if (!M || !I) return;
4247
+ if (!N || !L) return;
4212
4248
  let e = (e) => {
4213
- F.current?.contains(e.target) || L(null);
4249
+ I.current?.contains(e.target) || R(null);
4214
4250
  };
4215
4251
  return document.addEventListener("mousedown", e, !0), () => document.removeEventListener("mousedown", e, !0);
4216
- }, [M, I]);
4217
- let { tenant: V, apiUrl: ee } = i(q), H = i(ye), U = H?.[h], te = C ? be(H) : 1, [W, ne] = l(null);
4252
+ }, [N, L]);
4253
+ let { tenant: ee, apiUrl: H } = i(q), te = i(ye), U = te?.[h], W = C ? be(te) : 1, [ne, re] = l(null);
4218
4254
  if (a(() => {
4219
4255
  if (!h || U) return;
4220
- let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(te - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${ee}/data/${encodeURIComponent(h.slice(4))}` : `${ee}/dynamic/${encodeURIComponent(h)}${n}`;
4221
- return fetch(r, { headers: V ? { "x-tenant": V } : {} }).then((e) => e.json()).then((t) => {
4256
+ let e = !0, t = Math.max(1, Number(g) || 10), n = C && !h.startsWith("api:") ? `?offset=${(W - 1) * t}&limit=${t}` : "", r = h.startsWith("api:") ? `${H}/data/${encodeURIComponent(h.slice(4))}` : `${H}/dynamic/${encodeURIComponent(h)}${n}`;
4257
+ return fetch(r, { headers: ee ? { "x-tenant": ee } : {} }).then((e) => e.json()).then((t) => {
4222
4258
  let n = Array.isArray(t?.payload) ? t.payload : Array.isArray(t?.payload?.data) ? t.payload.data : [];
4223
- return e && ne(n);
4224
- }).catch(() => e && ne([])), () => {
4259
+ return e && re(n);
4260
+ }).catch(() => e && re([])), () => {
4225
4261
  e = !1;
4226
4262
  };
4227
4263
  }, [
4228
4264
  h,
4229
- V,
4230
4265
  ee,
4266
+ H,
4231
4267
  U,
4232
4268
  C,
4233
- te,
4269
+ W,
4234
4270
  g
4235
4271
  ]), !e.length) return null;
4236
- let re = Math.max(1, Number(g) || 10), ie = h ? C ? U || h.startsWith("api:") ? (U ?? W ?? []).slice((te - 1) * re, te * re) : (W ?? []).slice(0, re) : (U ?? W ?? []).slice(0, re) : null, G = ie ? ie.map((t) => e.map((e) => X(we(t?.data, e.field)))) : t, ae = !!h && !(h && !U && W === null) && G.length === 0, oe = b ? {
4272
+ let ie = Math.max(1, Number(g) || 10), ae = h ? C ? U || h.startsWith("api:") ? (U ?? ne ?? []).slice((W - 1) * ie, W * ie) : (ne ?? []).slice(0, ie) : (U ?? ne ?? []).slice(0, ie) : null, G = ae ? ae.map((t) => e.map((e) => Y(Te(t?.data, e.field)))) : t, oe = !!h && !(h && !U && ne === null) && G.length === 0, se = b ? {
4237
4273
  y: 6,
4238
4274
  x: 10
4239
4275
  } : {
4240
4276
  y: 10,
4241
4277
  x: 14
4242
- }, se = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : oe.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : oe.x}px`, K = "1px solid rgba(148, 163, 184, 0.35)", ce = y ? { border: K } : { borderBottom: K }, le = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), ue = [
4278
+ }, K = `${Number.isFinite(Number(S)) && S !== "" ? Number(S) : se.y}px ${Number.isFinite(Number(x)) && x !== "" ? Number(x) : se.x}px`, ce = `1px solid ${typeof k == "string" && k ? k : "rgba(148, 163, 184, 0.35)"}`, le = y ? { border: ce } : { borderBottom: ce }, ue = Array.isArray(n) && n.length === e.length && n.every((e) => Number.isFinite(e) && e > 0), de = [
4243
4279
  "left",
4244
4280
  "center",
4245
4281
  "right"
4246
- ], de = (t) => ue.includes(e[t]?.align) ? e[t].align : "", fe = (e) => de(e) || (ue.includes(O) ? O : "left"), pe = Number.isFinite(Number(k)) && Number(k) > 0 ? Number(k) : 0, me = P(A), he = !pe && me && me.maxHeight !== void 0 ? me.maxHeight : 0, ge = pe || he, _e = he ? {
4247
- ...me,
4282
+ ], fe = (t) => de.includes(e[t]?.align) ? e[t].align : "", pe = (e) => fe(e) || (de.includes(O) ? O : "left"), me = Number.isFinite(Number(A)) && Number(A) > 0 ? Number(A) : 0, he = P(j), ge = !me && he && he.maxHeight !== void 0 ? he.maxHeight : 0, _e = me || ge, ve = ge ? {
4283
+ ...he,
4248
4284
  maxHeight: void 0
4249
- } : me, ve = !!M && M.rows !== !1, xe = (t) => (r) => {
4250
- if (!M?.resize || t >= e.length - 1) return;
4285
+ } : he, xe = !!N && N.rows !== !1, Se = (t) => (r) => {
4286
+ if (!N?.resize || t >= e.length - 1) return;
4251
4287
  r.preventDefault(), r.stopPropagation();
4252
- let i = N.current, a = i ? i.clientWidth : 0;
4288
+ let i = F.current, a = i ? i.clientWidth : 0;
4253
4289
  if (!a) return;
4254
- let o = le ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4290
+ let o = ue ? [...n] : e.map(() => 100 / e.length), s = r.clientX, c = o[t] + o[t + 1], l = (e) => {
4255
4291
  let n = (e.clientX - s) / a * 100, r = Math.min(c - 5, Math.max(5, o[t] + n)), i = [...o];
4256
- i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, M.resize(i);
4292
+ i[t] = Math.round(r * 10) / 10, i[t + 1] = Math.round((c - r) * 10) / 10, N.resize(i);
4257
4293
  }, u = () => {
4258
4294
  window.removeEventListener("pointermove", l), window.removeEventListener("pointerup", u);
4259
4295
  };
4260
4296
  window.addEventListener("pointermove", l), window.addEventListener("pointerup", u);
4261
- }, Se = /* @__PURE__ */ new Set();
4297
+ }, Ce = /* @__PURE__ */ new Set();
4262
4298
  p && G.forEach((t, n) => e.forEach((e, t) => {
4263
4299
  let i = p[kn(r[n], o[t])];
4264
4300
  if (!i) return;
4265
4301
  let a = Math.max(1, Number(i.c) || 1), s = Math.max(1, Number(i.r) || 1);
4266
- for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && Se.add(`${n + e},${t + r}`);
4302
+ for (let e = 0; e < s; e++) for (let r = 0; r < a; r++) (e || r) && Ce.add(`${n + e},${t + r}`);
4267
4303
  }));
4268
- let Ce = (e) => (t) => {
4269
- if (!M?.resizeRow) return;
4304
+ let we = (e) => (t) => {
4305
+ if (!N?.resizeRow) return;
4270
4306
  t.preventDefault(), t.stopPropagation();
4271
4307
  let n = t.currentTarget.closest("tr");
4272
4308
  if (!n) return;
4273
- let r = t.clientY, i = n.offsetHeight, a = (t) => M.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4309
+ let r = t.clientY, i = n.offsetHeight, a = (t) => N.resizeRow(e, Math.max(20, Math.round(i + (t.clientY - r)))), o = () => {
4274
4310
  window.removeEventListener("pointermove", a), window.removeEventListener("pointerup", o);
4275
4311
  };
4276
4312
  window.addEventListener("pointermove", a), window.addEventListener("pointerup", o);
@@ -4283,129 +4319,129 @@ function jn({ columns: e = [], rows: t = [], widths: n = [], rowKeys: r = [], co
4283
4319
  },
4284
4320
  onClick: n,
4285
4321
  children: e
4286
- }, t), Y = I && I.r < G.length && I.c < e.length ? I : null, Z = (e, t) => M?.labels?.[e] ?? t, Te = Y ? p?.[kn(r[Y.r], o[Y.c])] : null, Ee = Math.max(1, Number(Te?.c) || 1), De = Math.max(1, Number(Te?.r) || 1);
4322
+ }, t), X = L && L.r < G.length && L.c < e.length ? L : null, Z = (e, t) => N?.labels?.[e] ?? t, Ee = X ? p?.[kn(r[X.r], o[X.c])] : null, De = Math.max(1, Number(Ee?.c) || 1), Oe = Math.max(1, Number(Ee?.r) || 1);
4287
4323
  return /* @__PURE__ */ f("div", {
4288
4324
  ref: (e) => {
4289
- F.current = e, typeof j == "function" && j(e);
4325
+ I.current = e, typeof M == "function" && M(e);
4290
4326
  },
4291
4327
  style: {
4292
4328
  width: "100%",
4293
- ...M ? { position: "relative" } : null,
4294
- ..._e
4329
+ ...N ? { position: "relative" } : null,
4330
+ ...ve
4295
4331
  },
4296
4332
  children: [
4297
- M && /* @__PURE__ */ d("style", { children: On }),
4298
- M && Y && R && /* @__PURE__ */ f("div", {
4333
+ N && /* @__PURE__ */ d("style", { children: On }),
4334
+ N && X && z && /* @__PURE__ */ f("div", {
4299
4335
  className: "wb-tedit-bar",
4300
4336
  style: {
4301
- top: R.top,
4302
- left: R.left
4337
+ top: z.top,
4338
+ left: z.left
4303
4339
  },
4304
4340
  onMouseDown: (e) => e.stopPropagation(),
4305
4341
  children: [
4306
4342
  /* @__PURE__ */ d("span", {
4307
4343
  className: "wb-tedit-at",
4308
- children: `R${Y.r + 1}·C${Y.c + 1}`
4344
+ children: `R${X.r + 1}·C${X.c + 1}`
4309
4345
  }),
4310
- J("+↑", Z("rowAbove", "Insert row above"), () => M.addRow(Y.r - 1)),
4311
- J("+↓", Z("rowBelow", "Insert row below"), () => M.addRow(Y.r)),
4312
- J("↑", Z("rowUp", "Move row up"), () => M.moveRow(Y.r, -1), Y.r === 0),
4313
- J("↓", Z("rowDown", "Move row down"), () => M.moveRow(Y.r, 1), Y.r >= G.length - 1),
4314
- J("✕ row", Z("rowDelete", "Delete row"), () => M.dropRow(Y.r), G.length <= 1),
4346
+ J("+↑", Z("rowAbove", "Insert row above"), () => N.addRow(X.r - 1)),
4347
+ J("+↓", Z("rowBelow", "Insert row below"), () => N.addRow(X.r)),
4348
+ J("↑", Z("rowUp", "Move row up"), () => N.moveRow(X.r, -1), X.r === 0),
4349
+ J("↓", Z("rowDown", "Move row down"), () => N.moveRow(X.r, 1), X.r >= G.length - 1),
4350
+ J("✕ row", Z("rowDelete", "Delete row"), () => N.dropRow(X.r), G.length <= 1),
4315
4351
  /* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
4316
- J("+←", Z("colLeft", "Insert column left"), () => M.addColumn(Y.c - 1)),
4317
- J("+→", Z("colRight", "Insert column right"), () => M.addColumn(Y.c)),
4318
- J("←", Z("colMoveLeft", "Move column left"), () => M.moveColumn(Y.c, -1), Y.c === 0),
4319
- J("→", Z("colMoveRight", "Move column right"), () => M.moveColumn(Y.c, 1), Y.c >= e.length - 1),
4320
- J("✕ col", Z("colDelete", "Delete column"), () => M.dropColumn(Y.c), e.length <= 1),
4352
+ J("+←", Z("colLeft", "Insert column left"), () => N.addColumn(X.c - 1)),
4353
+ J("+→", Z("colRight", "Insert column right"), () => N.addColumn(X.c)),
4354
+ J("←", Z("colMoveLeft", "Move column left"), () => N.moveColumn(X.c, -1), X.c === 0),
4355
+ J("→", Z("colMoveRight", "Move column right"), () => N.moveColumn(X.c, 1), X.c >= e.length - 1),
4356
+ J("✕ col", Z("colDelete", "Delete column"), () => N.dropColumn(X.c), e.length <= 1),
4321
4357
  /* @__PURE__ */ d("span", { className: "wb-tedit-sep" }),
4322
- J("↔", Z("mergeRight", "Merge with the cell on the right"), () => M.merge(Y.r, Y.c, "right"), Y.c + Ee >= e.length),
4323
- J("↕", Z("mergeDown", "Merge with the cell below"), () => M.merge(Y.r, Y.c, "down"), Y.r + De >= G.length),
4324
- J("⤫", Z("split", "Split this cell"), () => M.split(Y.r, Y.c), Ee === 1 && De === 1)
4358
+ J("↔", Z("mergeRight", "Merge with the cell on the right"), () => N.merge(X.r, X.c, "right"), X.c + De >= e.length),
4359
+ J("↕", Z("mergeDown", "Merge with the cell below"), () => N.merge(X.r, X.c, "down"), X.r + Oe >= G.length),
4360
+ J("⤫", Z("split", "Split this cell"), () => N.split(X.r, X.c), De === 1 && Oe === 1)
4325
4361
  ]
4326
4362
  }),
4327
4363
  /* @__PURE__ */ d("div", {
4328
4364
  style: {
4329
4365
  width: "100%",
4330
4366
  overflowX: "auto",
4331
- ...ge ? {
4332
- maxHeight: ge,
4367
+ ..._e ? {
4368
+ maxHeight: _e,
4333
4369
  overflowY: "auto"
4334
4370
  } : null
4335
4371
  },
4336
4372
  children: /* @__PURE__ */ f("table", {
4337
- ref: N,
4373
+ ref: F,
4338
4374
  style: {
4339
4375
  width: "100%",
4340
4376
  borderCollapse: T && _ !== !1 ? "separate" : "collapse",
4341
4377
  borderSpacing: 0,
4342
4378
  fontSize: 14,
4343
- ...le ? { tableLayout: "fixed" } : null,
4344
- ...y ? { border: K } : {}
4379
+ ...ue ? { tableLayout: "fixed" } : null,
4380
+ ...y ? { border: ce } : {}
4345
4381
  },
4346
4382
  children: [
4347
- le && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
4383
+ ue && /* @__PURE__ */ d("colgroup", { children: n.map((e, t) => /* @__PURE__ */ d("col", { style: { width: `${e}%` } }, t)) }),
4348
4384
  _ === !1 ? null : /* @__PURE__ */ d("thead", { children: /* @__PURE__ */ d("tr", { children: e.map((t, n) => /* @__PURE__ */ d("th", {
4349
- className: M ? "wb-tedit-head" : void 0,
4385
+ className: N ? "wb-tedit-head" : void 0,
4350
4386
  style: {
4351
- textAlign: fe(n),
4387
+ textAlign: pe(n),
4352
4388
  fontWeight: 600,
4353
- padding: se,
4389
+ padding: K,
4354
4390
  ...typeof D == "string" && D ? { color: D } : null,
4355
4391
  background: typeof E == "string" && E ? E : T ? "var(--page-surface, #f2f2f2)" : "rgba(148, 163, 184, 0.12)",
4356
4392
  ...T ? {
4357
4393
  position: "sticky",
4358
4394
  top: 0,
4359
4395
  zIndex: 2
4360
- } : M ? { position: "relative" } : null,
4361
- ...ce
4396
+ } : N ? { position: "relative" } : null,
4397
+ ...le
4362
4398
  },
4363
- children: M ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(En, {
4399
+ children: N ? /* @__PURE__ */ f(u, { children: [/* @__PURE__ */ d(En, {
4364
4400
  value: t.label ?? t,
4365
- onCommit: (e) => M.header(n, e),
4401
+ onCommit: (e) => N.header(n, e),
4366
4402
  hint: Z("editCell", "Double-click to edit"),
4367
4403
  style: { paddingRight: 6 }
4368
4404
  }), n < e.length - 1 && /* @__PURE__ */ d("span", {
4369
4405
  className: "wb-tedit-grip",
4370
4406
  title: Z("colWidth", "Drag to resize the column"),
4371
- onPointerDown: xe(n)
4407
+ onPointerDown: Se(n)
4372
4408
  })] }) : t.label ?? t
4373
4409
  }, n)) }) }),
4374
- /* @__PURE__ */ f("tbody", { children: [ae && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
4410
+ /* @__PURE__ */ f("tbody", { children: [oe && /* @__PURE__ */ d("tr", { children: /* @__PURE__ */ d("td", {
4375
4411
  colSpan: e.length,
4376
4412
  style: {
4377
- padding: se,
4413
+ padding: K,
4378
4414
  textAlign: "center",
4379
4415
  opacity: .6,
4380
- ...ce
4416
+ ...le
4381
4417
  },
4382
4418
  children: w || "No data yet"
4383
4419
  }) }), G.map((t, n) => /* @__PURE__ */ d("tr", {
4384
- className: M ? "wb-tedit-row" : void 0,
4420
+ className: N ? "wb-tedit-row" : void 0,
4385
4421
  style: {
4386
4422
  ...v && n % 2 == 1 ? { background: "rgba(148, 163, 184, 0.07)" } : null,
4387
4423
  ...Number.isFinite(Number(s?.[n])) && s[n] > 0 ? { height: s[n] } : null
4388
4424
  },
4389
4425
  children: e.map((e, i) => {
4390
- if (Se.has(`${n},${i}`)) return null;
4426
+ if (Ce.has(`${n},${i}`)) return null;
4391
4427
  let a = kn(r[n], o[i]), s = m?.[a], c = p?.[a], l = Math.max(1, Number(c?.c) || 1), u = Math.max(1, Number(c?.r) || 1);
4392
4428
  return /* @__PURE__ */ f("td", {
4393
- className: M ? `wb-tedit-cell${I?.r === n && I?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
4394
- onMouseDownCapture: ve ? B(n, i) : void 0,
4395
- "data-cell": M ? `${n}-${i}` : void 0,
4429
+ className: N ? `wb-tedit-cell${L?.r === n && L?.c === i ? " wb-tedit-cellon" : ""}` : void 0,
4430
+ onMouseDownCapture: xe ? V(n, i) : void 0,
4431
+ "data-cell": N ? `${n}-${i}` : void 0,
4396
4432
  colSpan: l > 1 ? l : void 0,
4397
4433
  rowSpan: u > 1 ? u : void 0,
4398
4434
  style: {
4399
- padding: se,
4400
- ...de(i) ? { textAlign: de(i) } : null,
4401
- ...M ? { position: "relative" } : null,
4402
- ...ce
4435
+ padding: K,
4436
+ ...fe(i) ? { textAlign: fe(i) } : null,
4437
+ ...N ? { position: "relative" } : null,
4438
+ ...le
4403
4439
  },
4404
- children: [s ?? An(t?.[i]), M && ve && /* @__PURE__ */ d("span", {
4440
+ children: [s ?? An(t?.[i]), N && xe && /* @__PURE__ */ d("span", {
4405
4441
  className: "wb-tedit-rowgrip",
4406
4442
  title: Z("rowHeight", "Drag to set the row height — double-click to fit the content"),
4407
- onPointerDown: Ce(n),
4408
- onDoubleClick: () => M.resizeRow(n, 0)
4443
+ onPointerDown: we(n),
4444
+ onDoubleClick: () => N.resizeRow(n, 0)
4409
4445
  })]
4410
4446
  }, i);
4411
4447
  })
@@ -4443,7 +4479,7 @@ var Mn = {
4443
4479
  }
4444
4480
  }, Nn = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, Pn = (e) => new Date(e.getFullYear(), e.getMonth(), e.getDate()), Fn = 366;
4445
4481
  function In(e, t = {}) {
4446
- let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : X(e), a = (e) => {
4482
+ let n = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.id) : [], r = (e) => Array.isArray(e) ? e[0] : e, i = (e) => e == null ? "" : Y(e), a = (e) => {
4447
4483
  let t = i(r(e)), n = t ? new Date(t) : null;
4448
4484
  return n && !Number.isNaN(n.getTime()) ? n : null;
4449
4485
  };
@@ -4556,16 +4592,16 @@ function zn({ events: e = [], source: t = "", titleField: n = "", startField: r
4556
4592
  }, H = new Intl.DateTimeFormat(V, {
4557
4593
  month: "long",
4558
4594
  year: "numeric"
4559
- }).format(new Date(j.year, j.month, 1)), U = (e) => M((t) => {
4595
+ }).format(new Date(j.year, j.month, 1)), te = (e) => M((t) => {
4560
4596
  let n = new Date(t.year, t.month + e, 1);
4561
4597
  return {
4562
4598
  year: n.getFullYear(),
4563
4599
  month: n.getMonth()
4564
4600
  };
4565
- }), te = (e, t) => /* @__PURE__ */ d("button", {
4601
+ }), U = (e, t) => /* @__PURE__ */ d("button", {
4566
4602
  type: "button",
4567
4603
  "aria-label": e,
4568
- onClick: () => U(t),
4604
+ onClick: () => te(t),
4569
4605
  style: {
4570
4606
  background: "transparent",
4571
4607
  border: `1px solid ${I}`,
@@ -4594,8 +4630,8 @@ function zn({ events: e = [], source: t = "", titleField: n = "", startField: r
4594
4630
  },
4595
4631
  children: H
4596
4632
  }),
4597
- te("Previous month", -1),
4598
- te("Next month", 1)
4633
+ U("Previous month", -1),
4634
+ U("Next month", 1)
4599
4635
  ]
4600
4636
  });
4601
4637
  if (p === "list") {
@@ -4647,9 +4683,9 @@ function zn({ events: e = [], source: t = "", titleField: n = "", startField: r
4647
4683
  })]
4648
4684
  });
4649
4685
  }
4650
- let ne = new Date(j.year, j.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, G = new Date(j.year, j.month + 1, 0).getDate(), ae = Math.ceil((ie + G) / 7), oe = Nn(/* @__PURE__ */ new Date()), se = new Intl.DateTimeFormat(V, { weekday: "short" }), K = [];
4651
- for (let e = 0; e < ae * 7; e += 1) {
4652
- let t = e - ie + 1, n = t >= 1 && t <= G, r = Nn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === oe;
4686
+ let ne = new Date(j.year, j.month, 1), re = y === "sunday" ? 0 : 1, ie = (ne.getDay() - re + 7) % 7, ae = new Date(j.year, j.month + 1, 0).getDate(), G = Math.ceil((ie + ae) / 7), oe = Nn(/* @__PURE__ */ new Date()), se = new Intl.DateTimeFormat(V, { weekday: "short" }), K = [];
4687
+ for (let e = 0; e < G * 7; e += 1) {
4688
+ let t = e - ie + 1, n = t >= 1 && t <= ae, r = Nn(new Date(j.year, j.month, t)), i = n ? B.get(r) ?? [] : [], a = i.slice(0, Math.max(1, b)), o = n && r === oe;
4653
4689
  K.push(/* @__PURE__ */ f("div", {
4654
4690
  style: {
4655
4691
  minHeight: N.cell,
@@ -5409,7 +5445,7 @@ function sr() {
5409
5445
  function cr(e, t) {
5410
5446
  let n = e?.data ?? {}, r = [];
5411
5447
  for (let e of Object.values(n)) {
5412
- let t = e == null ? "" : X(e);
5448
+ let t = e == null ? "" : Y(e);
5413
5449
  if (t && r.push(t), r.join(" ").length > or) break;
5414
5450
  }
5415
5451
  return r.join(" ").slice(0, or).toLocaleLowerCase(t || void 0);
@@ -5470,7 +5506,7 @@ function lr({ placeholder: e = "Search…", buttonLabel: t = "Search", showButto
5470
5506
  }
5471
5507
  else for (let t of e.rows) {
5472
5508
  if (!cr(t, S).includes(N)) continue;
5473
- let n = t?.data ?? {}, r = X(n.name) || "Untitled", i = X(n.slug);
5509
+ let n = t?.data ?? {}, r = Y(n.name) || "Untitled", i = Y(n.slug);
5474
5510
  F.push({
5475
5511
  key: `entry:${t.id}`,
5476
5512
  title: r,
@@ -5839,7 +5875,7 @@ function wr(e, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
5839
5875
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
5840
5876
  linked: p,
5841
5877
  nodeRef: (t) => {
5842
- t && (t.setAttribute("data-wb", e), te(t, c), U(t, a?.events === !1 ? [] : c.events));
5878
+ t && (t.setAttribute("data-wb", e), U(t, c), te(t, a?.events === !1 ? [] : c.events));
5843
5879
  },
5844
5880
  children: u.length ? u : void 0
5845
5881
  }, e);