webim-adapter 0.25.0 → 0.26.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.
@@ -220,26 +220,26 @@ function C(e) {
220
220
  delete t.textStrokeWidth, delete t.textStrokeColor, (re !== void 0 || ie !== void 0) && (t.WebkitTextStroke = `${x(re ?? 1)} ${ie || "currentColor"}`);
221
221
  let { clipText: ae } = t;
222
222
  delete t.clipText, ae && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
223
- let { transitions: oe, transitionDuration: H, transitionEasing: se, transitionProperty: ce } = t, le = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
223
+ let { transitions: oe, transitionDuration: se, transitionEasing: ce, transitionProperty: le } = t, ue = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
224
224
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
225
- let ue = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${le(e.duration ?? 200)} ${e.easing || "ease"}`);
226
- if (H !== void 0 && ue.push(`${ce || "all"} ${le(H)} ${se || "ease"}`), ue.length && (t.transition = ue.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
225
+ let de = (Array.isArray(oe) ? oe : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${ue(e.duration ?? 200)} ${e.easing || "ease"}`);
226
+ if (se !== void 0 && de.push(`${le || "all"} ${ue(se)} ${ce || "ease"}`), de.length && (t.transition = de.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
227
227
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
228
228
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
229
229
  }
230
230
  delete t.backgroundVideo;
231
- let { overlayColor: U, overlayOpacity: W } = t;
232
- if (delete t.overlayColor, delete t.overlayOpacity, U) {
233
- let e = `color-mix(in srgb, ${U} ${W ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
231
+ let { overlayColor: H, overlayOpacity: U } = t;
232
+ if (delete t.overlayColor, delete t.overlayOpacity, H) {
233
+ let e = `color-mix(in srgb, ${H} ${U ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
234
234
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
235
235
  }
236
236
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
237
- let { backgroundLayers: G } = t;
237
+ let { backgroundLayers: W } = t;
238
238
  delete t.backgroundLayers;
239
- let de = (Array.isArray(G) ? G : []).filter((e) => e && e.on !== !1);
240
- if (de.length) {
239
+ let fe = (Array.isArray(W) ? W : []).filter((e) => e && e.on !== !1);
240
+ if (fe.length) {
241
241
  let e = [], n = [], r = [], i = [], a = [];
242
- for (let t of de) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
242
+ for (let t of fe) if (t.kind === "linear") e.push(`linear-gradient(${t.angle ?? 180}deg, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
243
243
  else if (t.kind === "radial") e.push(`radial-gradient(circle, ${t.from || "rgba(0,0,0,0.5)"}, ${t.to || "transparent"})`), n.push("auto"), r.push("0% 0%"), i.push("repeat"), a.push("scroll");
244
244
  else {
245
245
  if (!t.src) continue;
@@ -480,18 +480,18 @@ function oe({ page: e, settings: t, tenant: n, apiUrl: r, locale: i }) {
480
480
  }
481
481
  //#endregion
482
482
  //#region src/fetchPage.js
483
- var H = async (e) => {
483
+ var se = async (e) => {
484
484
  let t = await e.json().catch(() => null);
485
485
  if (!e.ok || t?.success === !1) throw Error(t?.error?.message || `Request failed (${e.status})`);
486
486
  return t?.payload ?? t;
487
487
  };
488
- async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
488
+ async function ce({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token: a, page: o, fetch: s }) {
489
489
  if (!e) throw Error("fetchPage: apiUrl is required");
490
490
  if (!n) throw Error("fetchPage: slug is required");
491
491
  let c = s ?? fetch, l = e.replace(/\/$/, ""), u = {
492
492
  ...t ? { "x-tenant": t } : {},
493
493
  ...a ? { authorization: `Bearer ${a}` } : {}
494
- }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(H), c(`${l}/settings/public`, { headers: u }).then(H)]), p = oe({
494
+ }, [d, f] = await Promise.all([c(`${l}/render/${encodeURIComponent(n)}${i ? `?preview=${encodeURIComponent(i)}` : ""}`, { headers: u }).then(se), c(`${l}/settings/public`, { headers: u }).then(se)]), p = oe({
495
495
  page: d,
496
496
  settings: f,
497
497
  tenant: t,
@@ -499,7 +499,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
499
499
  locale: r
500
500
  }), m = [...new Set(Object.values(p.blocks ?? {}).map((e) => e?.type?.resolvedName === "CollectionList" ? e.props?.collection : e?.type?.resolvedName === "TableBlock" || e?.type?.resolvedName === "OrgChartBlock" ? e.props?.source : null).filter(Boolean))];
501
501
  if (m.length) {
502
- let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(H).then((e) => {
502
+ let e = (e) => e.startsWith("api:") ? `${l}/data/${encodeURIComponent(e.slice(4))}` : `${l}/dynamic/${encodeURIComponent(e)}?all=1${r ? `&locale=${encodeURIComponent(r)}` : ""}`, t = await Promise.all(m.map((t) => c(e(t), { headers: u }).then(se).then((e) => {
503
503
  let n = Array.isArray(e) ? e : Array.isArray(e?.data) ? e.data : [], r = Number(e?.total?.filtered ?? e?.total?.all ?? n.length);
504
504
  return [[t, n], [`${t}:total`, Number.isFinite(r) ? r : n.length]];
505
505
  }).catch(() => [[t, []]])));
@@ -513,7 +513,7 @@ async function se({ apiUrl: e, tenant: t, slug: n, locale: r, preview: i, token:
513
513
  }
514
514
  //#endregion
515
515
  //#region ../ui/src/components/builder/locale.js
516
- var ce = /* @__PURE__ */ new Set([
516
+ var le = /* @__PURE__ */ new Set([
517
517
  "ar",
518
518
  "he",
519
519
  "fa",
@@ -524,34 +524,34 @@ var ce = /* @__PURE__ */ new Set([
524
524
  "yi",
525
525
  "dv",
526
526
  "ckb"
527
- ]), le = (e) => ce.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", ue = (e, t) => e === "ltr" || e === "rtl" ? e : t ? le(t) : void 0, U = t({
527
+ ]), ue = (e) => le.has(String(e || "").toLowerCase().split(/[-_]/)[0]) ? "rtl" : "ltr", de = (e, t) => e === "ltr" || e === "rtl" ? e : t ? ue(t) : void 0, H = t({
528
528
  tenant: "",
529
529
  apiUrl: "/api",
530
530
  locale: "",
531
531
  settings: null
532
- }), W = t(null), G = (e) => {
532
+ }), U = t(null), W = (e) => {
533
533
  let t = Number(e?.__page);
534
534
  if (Number.isFinite(t) && t >= 1) return Math.floor(t);
535
535
  if (typeof window > "u") return 1;
536
536
  let n = Number(new URLSearchParams(window.location.search).get("page"));
537
537
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
538
- }, de = () => {
538
+ }, fe = () => {
539
539
  if (typeof window > "u") return {};
540
540
  let e = {};
541
541
  return new URLSearchParams(window.location.search).forEach((t, n) => {
542
542
  n.startsWith("f_") && n.length > 2 && t !== "" && (e[n.slice(2)] = t);
543
543
  }), e;
544
- }, fe = (e) => {
544
+ }, pe = (e) => {
545
545
  let t = {
546
546
  ...e && typeof e == "object" && !Array.isArray(e) ? e : {},
547
- ...de()
547
+ ...fe()
548
548
  };
549
549
  return Object.fromEntries(Object.entries(t).filter(([, e]) => typeof e == "string" && e.trim() !== ""));
550
- }, pe = t(null), me = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
551
- function K(e, t) {
550
+ }, me = t(null), he = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
551
+ function G(e, t) {
552
552
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
553
553
  }
554
- var he = (e) => {
554
+ var ge = (e) => {
555
555
  let t = [];
556
556
  for (let [n, r] of Object.entries(e ?? {})) {
557
557
  if (!/^[\w-]+$/.test(n)) continue;
@@ -561,36 +561,36 @@ var he = (e) => {
561
561
  }
562
562
  return t;
563
563
  };
564
- function q(e) {
564
+ function K(e) {
565
565
  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(" ") : "";
566
566
  }
567
- function ge(e, t) {
568
- let n = t?.data ?? {}, r = he(n);
567
+ function _e(e, t) {
568
+ let n = t?.data ?? {}, r = ge(n);
569
569
  if (!r.length) return e;
570
- let i = RegExp(`:(${r.map(me).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => q(K(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
570
+ let i = RegExp(`:(${r.map(he).sort((e, t) => t.length - e.length).join("|")})`, "g"), a = (e) => typeof e == "string" ? e.replace(i, (e, t) => K(G(n, t))) : Array.isArray(e) ? e.map(a) : e && typeof e == "object" ? Object.fromEntries(Object.entries(e).map(([e, t]) => [e, a(t)])) : e;
571
571
  return a(e);
572
572
  }
573
- var _e = {
573
+ var ve = {
574
574
  margin: 0,
575
575
  fontWeight: 700,
576
576
  lineHeight: 1.2,
577
577
  fontFamily: "var(--page-heading-font, inherit)"
578
- }, ve = { margin: 0 }, J = {
578
+ }, ye = { margin: 0 }, q = {
579
579
  display: "inline-block",
580
580
  textDecoration: "none",
581
581
  cursor: "pointer",
582
582
  backgroundColor: "var(--page-accent, #111827)",
583
583
  color: "var(--page-accent-text, #ffffff)"
584
- }, ye = {
584
+ }, be = {
585
585
  flexGrow: 1,
586
586
  display: "flex",
587
587
  flexDirection: "column",
588
588
  position: "relative"
589
- }, be = {
589
+ }, xe = {
590
590
  display: "flex",
591
591
  flexDirection: "column"
592
592
  };
593
- function xe({ style: e }) {
593
+ function Se({ style: e }) {
594
594
  let t = e?.backgroundVideo;
595
595
  if (!t) return null;
596
596
  let n = {
@@ -616,7 +616,7 @@ function xe({ style: e }) {
616
616
  background: r
617
617
  } })] });
618
618
  }
619
- var Se = (e, t) => e?.backgroundVideo ? {
619
+ var Ce = (e, t) => e?.backgroundVideo ? {
620
620
  position: "relative",
621
621
  ...t,
622
622
  ...C(e)
@@ -624,24 +624,24 @@ var Se = (e, t) => e?.backgroundVideo ? {
624
624
  ...t,
625
625
  ...C(e)
626
626
  };
627
- function Ce({ style: e, nodeRef: t, children: n }) {
627
+ function we({ style: e, nodeRef: t, children: n }) {
628
628
  return /* @__PURE__ */ d("div", {
629
629
  ref: t,
630
630
  style: {
631
- ...ye,
631
+ ...be,
632
632
  ...C(e)
633
633
  },
634
- children: [/* @__PURE__ */ u(xe, { style: e }), n]
634
+ children: [/* @__PURE__ */ u(Se, { style: e }), n]
635
635
  });
636
636
  }
637
- function we({ style: e, nodeRef: t, children: n }) {
637
+ function Te({ style: e, nodeRef: t, children: n }) {
638
638
  return /* @__PURE__ */ d("section", {
639
639
  ref: t,
640
- style: Se(e, be),
641
- children: [/* @__PURE__ */ u(xe, { style: e }), n]
640
+ style: Ce(e, xe),
641
+ children: [/* @__PURE__ */ u(Se, { style: e }), n]
642
642
  });
643
643
  }
644
- function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
644
+ function Ee({ style: e, freeLayout: t, nodeRef: n, children: r }) {
645
645
  let i = t ? {
646
646
  position: "relative",
647
647
  minHeight: 240
@@ -650,32 +650,32 @@ function Te({ style: e, freeLayout: t, nodeRef: n, children: r }) {
650
650
  ref: n,
651
651
  style: i ? {
652
652
  ...i,
653
- ...Se(e)
654
- } : Se(e),
655
- children: [/* @__PURE__ */ u(xe, { style: e }), r]
653
+ ...Ce(e)
654
+ } : Ce(e),
655
+ children: [/* @__PURE__ */ u(Se, { style: e }), r]
656
656
  });
657
657
  }
658
- function Ee({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
658
+ function De({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
659
659
  return /* @__PURE__ */ u(n, {
660
660
  ref: a,
661
661
  style: {
662
- ..._e,
662
+ ...ve,
663
663
  ...C(r)
664
664
  },
665
- children: Y(t, e, i)
665
+ children: J(t, e, i)
666
666
  });
667
667
  }
668
- var De = {
668
+ var Oe = {
669
669
  fontFamily: z.mono.value,
670
670
  background: "rgba(148, 163, 184, 0.18)",
671
671
  padding: "1px 5px",
672
672
  borderRadius: 4,
673
673
  fontSize: "0.9em"
674
674
  };
675
- function Oe(e, t = [], n, r) {
675
+ function ke(e, t = [], n, r) {
676
676
  let i = e;
677
677
  return t.includes("sup") ? i = /* @__PURE__ */ u("sup", { children: i }) : t.includes("sub") && (i = /* @__PURE__ */ u("sub", { children: i })), t.includes("code") && (i = /* @__PURE__ */ u("code", {
678
- style: De,
678
+ style: Oe,
679
679
  children: i
680
680
  })), t.includes("strike") && (i = /* @__PURE__ */ u("s", { children: i })), t.includes("underline") && (i = /* @__PURE__ */ u("u", { children: i })), t.includes("italic") && (i = /* @__PURE__ */ u("em", { children: i })), t.includes("bold") && (i = /* @__PURE__ */ u("strong", { children: i })), n && (i = /* @__PURE__ */ u("a", {
681
681
  href: n,
@@ -685,13 +685,13 @@ function Oe(e, t = [], n, r) {
685
685
  children: i
686
686
  })), i;
687
687
  }
688
- function Y(t, n, r) {
688
+ function J(t, n, r) {
689
689
  return t?.length ? t.map((t, n) => {
690
690
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
691
- if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
691
+ if (t.parts) return /* @__PURE__ */ u(e, { children: J(t.parts, "", r) }, n);
692
692
  let i = t.text;
693
693
  return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
694
- style: De,
694
+ style: Oe,
695
695
  children: i
696
696
  })), t.strike && (i = /* @__PURE__ */ u("s", { children: i })), t.underline && (i = /* @__PURE__ */ u("u", { children: i })), t.italic && (i = /* @__PURE__ */ u("em", { children: i })), t.bold && (i = /* @__PURE__ */ u("strong", { children: i })), (t.color || t.background) && (i = /* @__PURE__ */ u("span", {
697
697
  style: {
@@ -708,13 +708,13 @@ function Y(t, n, r) {
708
708
  })), /* @__PURE__ */ u(e, { children: i }, n);
709
709
  }) : n;
710
710
  }
711
- function ke({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
711
+ function Ae({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
712
712
  return /* @__PURE__ */ u("span", {
713
713
  style: C(a),
714
- children: e?.length ? Y(e, t) : Oe(t, n, r, i)
714
+ children: e?.length ? J(e, t) : ke(t, n, r, i)
715
715
  });
716
716
  }
717
- var Ae = {
717
+ var je = {
718
718
  h1: 40,
719
719
  h2: 32,
720
720
  h3: 26,
@@ -722,7 +722,7 @@ var Ae = {
722
722
  h5: 19,
723
723
  h6: 16
724
724
  };
725
- function je({ align: e = "center", width: t, wrap: n } = {}) {
725
+ function Me({ align: e = "center", width: t, wrap: n } = {}) {
726
726
  let r = t ? `${t}%` : void 0;
727
727
  if (e === "full") return { width: "100%" };
728
728
  let i = e === "left" || e === "right";
@@ -756,8 +756,8 @@ function je({ align: e = "center", width: t, wrap: n } = {}) {
756
756
  marginRight: "auto"
757
757
  };
758
758
  }
759
- function Me(e = [], t, n) {
760
- let r = n ?? ((e, n) => Y(e, n, t));
759
+ function Ne(e = [], t, n) {
760
+ let r = n ?? ((e, n) => J(e, n, t));
761
761
  return e.map((t, n) => {
762
762
  let i = {
763
763
  marginTop: 0,
@@ -779,7 +779,7 @@ function Me(e = [], t, n) {
779
779
  marginLeft: 0,
780
780
  marginRight: 0,
781
781
  ...i,
782
- ...je(t)
782
+ ...Me(t)
783
783
  },
784
784
  children: [t.href ? /* @__PURE__ */ u("a", {
785
785
  href: t.href,
@@ -798,16 +798,16 @@ function Me(e = [], t, n) {
798
798
  })]
799
799
  }, n);
800
800
  }
801
- if (t.type === "video") return Ue(t.url) ? /* @__PURE__ */ u("div", {
801
+ if (t.type === "video") return We(t.url) ? /* @__PURE__ */ u("div", {
802
802
  style: {
803
803
  ...i,
804
- ...je({
804
+ ...Me({
805
805
  align: t.align,
806
806
  wrap: t.wrap,
807
807
  width: t.width ?? 100
808
808
  })
809
809
  },
810
- children: /* @__PURE__ */ u(We, {
810
+ children: /* @__PURE__ */ u(Ge, {
811
811
  url: t.url,
812
812
  autoplay: t.autoplay,
813
813
  muted: t.muted,
@@ -869,17 +869,17 @@ function Me(e = [], t, n) {
869
869
  }
870
870
  if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
871
871
  style: {
872
- ...Pe,
872
+ ...Fe,
873
873
  ...i
874
874
  },
875
875
  children: r(t.parts, t.text)
876
876
  }, n);
877
- if (Ae[t.type]) {
877
+ if (je[t.type]) {
878
878
  let e = t.type;
879
879
  return /* @__PURE__ */ u(e, {
880
880
  style: {
881
- ..._e,
882
- fontSize: Ae[t.type],
881
+ ...ve,
882
+ fontSize: je[t.type],
883
883
  ...i
884
884
  },
885
885
  children: r(t.parts, t.text)
@@ -887,39 +887,39 @@ function Me(e = [], t, n) {
887
887
  }
888
888
  return /* @__PURE__ */ u("p", {
889
889
  style: {
890
- ...ve,
890
+ ...ye,
891
891
  ...i
892
892
  },
893
893
  children: r(t.parts, t.text)
894
894
  }, n);
895
895
  });
896
896
  }
897
- function Ne({ content: e, style: t, linked: n, nodeRef: r }) {
897
+ function Pe({ content: e, style: t, linked: n, nodeRef: r }) {
898
898
  return /* @__PURE__ */ u("div", {
899
899
  ref: r,
900
900
  style: {
901
901
  display: "flow-root",
902
902
  ...C(t)
903
903
  },
904
- children: Me(e, n)
904
+ children: Ne(e, n)
905
905
  });
906
906
  }
907
- var Pe = {
907
+ var Fe = {
908
908
  margin: 0,
909
909
  padding: "8px 0 8px 20px",
910
910
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
911
911
  };
912
- function Fe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
912
+ function Ie({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
913
913
  return /* @__PURE__ */ u("blockquote", {
914
914
  ref: i,
915
915
  style: {
916
- ...Pe,
916
+ ...Fe,
917
917
  ...C(n)
918
918
  },
919
- children: Y(t, e, r)
919
+ children: J(t, e, r)
920
920
  });
921
921
  }
922
- function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
922
+ function Le({ ordered: e, items: t = [], style: n, nodeRef: r }) {
923
923
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
924
924
  ref: r,
925
925
  style: {
@@ -929,53 +929,53 @@ function Ie({ ordered: e, items: t = [], style: n, nodeRef: r }) {
929
929
  },
930
930
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
931
931
  style: { marginBottom: 4 },
932
- children: Y(e.parts, e.text)
932
+ children: J(e.parts, e.text)
933
933
  }, t))
934
934
  });
935
935
  }
936
- function Le({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
936
+ function Re({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
937
937
  return /* @__PURE__ */ u("p", {
938
938
  ref: i,
939
939
  style: {
940
- ...ve,
940
+ ...ye,
941
941
  ...C(n)
942
942
  },
943
- children: Y(t, e, r)
943
+ children: J(t, e, r)
944
944
  });
945
945
  }
946
- var Re = {
946
+ var ze = {
947
947
  color: "var(--page-accent, inherit)",
948
948
  textDecoration: "underline",
949
949
  textUnderlineOffset: 3,
950
950
  cursor: "pointer"
951
951
  };
952
- function ze({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
952
+ function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
953
953
  return /* @__PURE__ */ u("a", {
954
954
  ref: o,
955
955
  href: n || "#",
956
956
  target: r || void 0,
957
957
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
958
958
  style: {
959
- ...Re,
959
+ ...ze,
960
960
  ...C(i)
961
961
  },
962
- children: Y(t, e, a)
962
+ children: J(t, e, a)
963
963
  });
964
964
  }
965
- function Be({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
965
+ function Ve({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
966
966
  return /* @__PURE__ */ u("a", {
967
967
  ref: o,
968
968
  href: n || "#",
969
969
  target: r || void 0,
970
970
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
971
971
  style: {
972
- ...J,
972
+ ...q,
973
973
  ...C(i)
974
974
  },
975
- children: Y(t, e, a)
975
+ children: J(t, e, a)
976
976
  });
977
977
  }
978
- function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
978
+ function He({ src: e, alt: t, style: n, nodeRef: r }) {
979
979
  return e ? /* @__PURE__ */ u("img", {
980
980
  ref: r,
981
981
  src: e,
@@ -987,7 +987,7 @@ function Ve({ src: e, alt: t, style: n, nodeRef: r }) {
987
987
  }
988
988
  }) : null;
989
989
  }
990
- function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
990
+ function Ue({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
991
991
  return e ? /* @__PURE__ */ u("video", {
992
992
  ref: s,
993
993
  src: e,
@@ -1005,9 +1005,9 @@ function He({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
1005
1005
  }
1006
1006
  }) : null;
1007
1007
  }
1008
- var Ue = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1009
- function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1010
- let c = Ue(e);
1008
+ var We = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
1009
+ function Ge({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
1010
+ let c = We(e);
1011
1011
  if (!c) return null;
1012
1012
  let l = new URLSearchParams({ rel: "0" });
1013
1013
  return t && l.set("autoplay", "1"), (n || t) && l.set("mute", "1"), i || l.set("controls", "0"), r && (l.set("loop", "1"), l.set("playlist", c)), Number(a) > 0 && l.set("start", String(Math.floor(Number(a)))), /* @__PURE__ */ u("div", {
@@ -1033,7 +1033,7 @@ function We({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
1033
1033
  })
1034
1034
  });
1035
1035
  }
1036
- function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1036
+ function Ke({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
1037
1037
  return e ? /* @__PURE__ */ u("iframe", {
1038
1038
  ref: i,
1039
1039
  src: e,
@@ -1049,7 +1049,7 @@ function Ge({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
1049
1049
  }
1050
1050
  }) : null;
1051
1051
  }
1052
- function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1052
+ function qe({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1053
1053
  let [a, o] = c(null);
1054
1054
  return i(() => {
1055
1055
  a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
@@ -1068,7 +1068,7 @@ function Ke({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
1068
1068
  style: C(n)
1069
1069
  });
1070
1070
  }
1071
- function qe({ height: e, nodeRef: t }) {
1071
+ function Je({ height: e, nodeRef: t }) {
1072
1072
  return /* @__PURE__ */ u("div", {
1073
1073
  ref: t,
1074
1074
  style: {
@@ -1078,7 +1078,7 @@ function qe({ height: e, nodeRef: t }) {
1078
1078
  }
1079
1079
  });
1080
1080
  }
1081
- function Je({ style: e, nodeRef: t }) {
1081
+ function Ye({ style: e, nodeRef: t }) {
1082
1082
  return /* @__PURE__ */ u("div", {
1083
1083
  ref: t,
1084
1084
  style: {
@@ -1089,7 +1089,7 @@ function Je({ style: e, nodeRef: t }) {
1089
1089
  }
1090
1090
  });
1091
1091
  }
1092
- var Ye = {
1092
+ var Xe = {
1093
1093
  position: "absolute",
1094
1094
  top: "50%",
1095
1095
  transform: "translateY(-50%)",
@@ -1106,7 +1106,7 @@ var Ye = {
1106
1106
  alignItems: "center",
1107
1107
  justifyContent: "center",
1108
1108
  padding: 0
1109
- }, Xe = {
1109
+ }, Ze = {
1110
1110
  bottom: {
1111
1111
  inset: "auto 0 0 0",
1112
1112
  padding: "40px 24px 20px",
@@ -1125,8 +1125,8 @@ var Ye = {
1125
1125
  padding: 24,
1126
1126
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1127
1127
  }
1128
- }, Ze = 48;
1129
- function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1128
+ }, Qe = 48;
1129
+ function $e({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1130
1130
  let [p, m] = c(0), [h, g] = c(!1), [_, v] = c(null), y = e ? Math.min(p, e - 1) : 0;
1131
1131
  if (i(() => {
1132
1132
  if (!n || h || _ || e < 2) return;
@@ -1142,7 +1142,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1142
1142
  let b = (t) => m((t + e) % e), x = () => {
1143
1143
  if (!_) return;
1144
1144
  let { dx: e } = _;
1145
- v(null), e < -48 ? b(y + 1) : e > Ze && b(y - 1);
1145
+ v(null), e < -48 ? b(y + 1) : e > Qe && b(y - 1);
1146
1146
  };
1147
1147
  return /* @__PURE__ */ d("div", {
1148
1148
  ref: f,
@@ -1190,7 +1190,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1190
1190
  type: "button",
1191
1191
  "aria-label": "Previous slide",
1192
1192
  style: {
1193
- ...Ye,
1193
+ ...Xe,
1194
1194
  left: 12
1195
1195
  },
1196
1196
  onClick: () => b(y - 1),
@@ -1200,7 +1200,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1200
1200
  type: "button",
1201
1201
  "aria-label": "Next slide",
1202
1202
  style: {
1203
- ...Ye,
1203
+ ...Xe,
1204
1204
  right: 12
1205
1205
  },
1206
1206
  onClick: () => b(y + 1),
@@ -1234,7 +1234,7 @@ function Qe({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1234
1234
  ] })]
1235
1235
  });
1236
1236
  }
1237
- var $e = (e, t) => ({
1237
+ var et = (e, t) => ({
1238
1238
  position: "absolute",
1239
1239
  inset: 0,
1240
1240
  backgroundImage: e ? `url(${e})` : "none",
@@ -1242,18 +1242,18 @@ var $e = (e, t) => ({
1242
1242
  backgroundSize: "cover",
1243
1243
  backgroundPosition: "center"
1244
1244
  });
1245
- function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1246
- return e.length ? /* @__PURE__ */ u(Qe, {
1245
+ function tt({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1246
+ return e.length ? /* @__PURE__ */ u($e, {
1247
1247
  ...r,
1248
1248
  count: e.length,
1249
1249
  renderSlide: (r) => {
1250
1250
  let i = e[r];
1251
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1251
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: et(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1252
1252
  style: {
1253
1253
  position: "absolute",
1254
1254
  color: "#fff",
1255
1255
  textAlign: n,
1256
- ...Xe[t] ?? Xe.bottom
1256
+ ...Ze[t] ?? Ze.bottom
1257
1257
  },
1258
1258
  children: [i.title && /* @__PURE__ */ u("div", {
1259
1259
  style: {
@@ -1273,13 +1273,13 @@ function et({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1273
1273
  }
1274
1274
  }) : null;
1275
1275
  }
1276
- function tt({ slides: e = [], linked: t, ...n }) {
1277
- return e.length ? /* @__PURE__ */ u(Qe, {
1276
+ function nt({ slides: e = [], linked: t, ...n }) {
1277
+ return e.length ? /* @__PURE__ */ u($e, {
1278
1278
  ...n,
1279
1279
  count: e.length,
1280
1280
  renderSlide: (n) => {
1281
1281
  let r = e[n];
1282
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: $e(r.image, r.color) }), /* @__PURE__ */ u("div", {
1282
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: et(r.image, r.color) }), /* @__PURE__ */ u("div", {
1283
1283
  style: {
1284
1284
  position: "absolute",
1285
1285
  inset: 0,
@@ -1291,7 +1291,7 @@ function tt({ slides: e = [], linked: t, ...n }) {
1291
1291
  }
1292
1292
  }) : null;
1293
1293
  }
1294
- function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1294
+ function rt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lightbox: a = !0, style: o, nodeRef: s, inert: f }) {
1295
1295
  let p = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && e.src) : [], m = Math.max(0, Number(n) || 0), h = f ? (e) => e.preventDefault() : void 0, [g, _] = c(null), v = a && !f && g !== null && p[g];
1296
1296
  i(() => {
1297
1297
  if (!v) return;
@@ -1490,19 +1490,19 @@ function nt({ images: e = [], columns: t = 3, gap: n = 8, showNames: r = !1, lig
1490
1490
  ]
1491
1491
  });
1492
1492
  }
1493
- var rt = {
1493
+ var it = {
1494
1494
  color: "inherit",
1495
1495
  textDecoration: "none",
1496
1496
  fontSize: 14,
1497
1497
  opacity: .85
1498
- }, it = {
1498
+ }, at = {
1499
1499
  background: "var(--page-surface, #f2f2f2)",
1500
1500
  color: "var(--page-text, #111827)",
1501
1501
  border: "1px solid rgba(148, 163, 184, 0.25)",
1502
1502
  boxShadow: "0 16px 40px rgba(15, 23, 42, 0.16)",
1503
1503
  zIndex: 60
1504
1504
  };
1505
- function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1505
+ function ot({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], style: s, nodeRef: f, menu: p = "auto", breakpoint: m = 768 }) {
1506
1506
  let [h, g] = c(null), [_, v] = c(!1), [y, b] = c(!1), [x, S] = c(null);
1507
1507
  i(() => {
1508
1508
  if (!h) return;
@@ -1512,7 +1512,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1512
1512
  let w = p === "hamburger" || p === "auto" && _, T = (e, t) => /* @__PURE__ */ d("a", {
1513
1513
  href: e.href || "#",
1514
1514
  style: {
1515
- ...rt,
1515
+ ...it,
1516
1516
  display: "block",
1517
1517
  ...t
1518
1518
  },
@@ -1600,7 +1600,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1600
1600
  let t = e.children ?? [];
1601
1601
  if (!t.length) return /* @__PURE__ */ u("a", {
1602
1602
  href: e.href || "#",
1603
- style: rt,
1603
+ style: it,
1604
1604
  children: e.label
1605
1605
  }, e.key);
1606
1606
  let n = e.type === "mega";
@@ -1614,7 +1614,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1614
1614
  children: [/* @__PURE__ */ d("a", {
1615
1615
  href: e.href || "#",
1616
1616
  style: {
1617
- ...rt,
1617
+ ...it,
1618
1618
  cursor: "pointer"
1619
1619
  },
1620
1620
  children: [
@@ -1630,7 +1630,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1630
1630
  ]
1631
1631
  }), x === e.key && (n ? /* @__PURE__ */ u("div", {
1632
1632
  style: {
1633
- ...it,
1633
+ ...at,
1634
1634
  position: "absolute",
1635
1635
  left: 0,
1636
1636
  right: 0,
@@ -1646,7 +1646,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1646
1646
  }))
1647
1647
  }) : /* @__PURE__ */ u("div", {
1648
1648
  style: {
1649
- ...it,
1649
+ ...at,
1650
1650
  position: "absolute",
1651
1651
  top: "100%",
1652
1652
  left: 0,
@@ -1675,7 +1675,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1675
1675
  children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
1676
1676
  href: t.href || "#",
1677
1677
  style: {
1678
- ...rt,
1678
+ ...it,
1679
1679
  padding: "10px 4px",
1680
1680
  fontWeight: (t.children ?? []).length ? 600 : 400,
1681
1681
  opacity: 1
@@ -1686,7 +1686,7 @@ function at({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1686
1686
  ]
1687
1687
  });
1688
1688
  }
1689
- function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1689
+ function st({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1690
1690
  let [i, a] = c(0), o = e.length ? Math.min(i, e.length - 1) : 0;
1691
1691
  return e.length ? /* @__PURE__ */ d("div", {
1692
1692
  ref: r,
@@ -1726,7 +1726,7 @@ function ot({ tabs: e = [], linked: t, style: n, nodeRef: r }) {
1726
1726
  }, e.key))]
1727
1727
  }) : null;
1728
1728
  }
1729
- function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1729
+ function ct({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }) {
1730
1730
  let [a, o] = c(() => new Set(e.length ? [e[0].key] : []));
1731
1731
  if (!e.length) return null;
1732
1732
  let s = (e) => o((t) => {
@@ -1783,15 +1783,15 @@ function st({ items: e = [], linked: t, multiple: n = !1, style: r, nodeRef: i }
1783
1783
  })
1784
1784
  });
1785
1785
  }
1786
- var ct = {
1786
+ var lt = {
1787
1787
  display: "flex",
1788
1788
  flexDirection: "column",
1789
1789
  gap: "12px"
1790
- }, X = {
1790
+ }, Y = {
1791
1791
  fontSize: "14px",
1792
1792
  fontWeight: 500,
1793
1793
  color: "var(--page-text, #111827)"
1794
- }, Z = {
1794
+ }, X = {
1795
1795
  padding: "10px 12px",
1796
1796
  border: "1px solid var(--page-border, #d1d5db)",
1797
1797
  borderRadius: "6px",
@@ -1801,18 +1801,18 @@ var ct = {
1801
1801
  boxSizing: "border-box",
1802
1802
  backgroundColor: "var(--page-surface, #f2f2f2)",
1803
1803
  color: "var(--page-text, #111827)"
1804
- }, lt = {
1804
+ }, ut = {
1805
1805
  display: "flex",
1806
1806
  alignItems: "center",
1807
1807
  gap: "8px",
1808
1808
  fontSize: "14px",
1809
1809
  color: "var(--page-text, #111827)"
1810
- }, Q = (e) => e ? {
1810
+ }, Z = (e) => e ? {
1811
1811
  readOnly: !0,
1812
1812
  tabIndex: -1,
1813
1813
  onMouseDown: (e) => e.preventDefault()
1814
1814
  } : {};
1815
- function ut(e, t) {
1815
+ function dt(e, t) {
1816
1816
  if (!e) return !0;
1817
1817
  let n = t[e.field], r = n == null || n === "" ? "" : String(n), i = e.value ?? "";
1818
1818
  switch (e.op) {
@@ -1826,11 +1826,11 @@ function ut(e, t) {
1826
1826
  default: return !1;
1827
1827
  }
1828
1828
  }
1829
- var dt = {
1829
+ var ft = {
1830
1830
  display: "flex",
1831
1831
  flexDirection: "column",
1832
1832
  gap: 6
1833
- }, ft = {
1833
+ }, pt = {
1834
1834
  font: "inherit",
1835
1835
  fontSize: 15,
1836
1836
  padding: "10px 12px",
@@ -1841,16 +1841,16 @@ var dt = {
1841
1841
  width: "100%",
1842
1842
  boxSizing: "border-box"
1843
1843
  };
1844
- function pt(e, t) {
1844
+ function mt(e, t) {
1845
1845
  let n = Array.isArray(e?.options) ? e.options : [];
1846
1846
  if (!e?.parentField) return n;
1847
1847
  let r = t?.[e.parentField];
1848
1848
  return r ? n.filter((e) => typeof e == "string" ? !1 : !e.parent || e.parent === r) : [];
1849
1849
  }
1850
- function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1850
+ function ht({ field: e, value: t, onChange: n, inert: r, values: i }) {
1851
1851
  let a = /* @__PURE__ */ d("span", {
1852
1852
  style: {
1853
- ...X,
1853
+ ...Y,
1854
1854
  fontSize: 14
1855
1855
  },
1856
1856
  children: [e.label, e.required ? " *" : ""]
@@ -1859,7 +1859,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1859
1859
  required: e.required || void 0,
1860
1860
  placeholder: e.placeholder || void 0,
1861
1861
  disabled: r || void 0,
1862
- style: ft,
1862
+ style: pt,
1863
1863
  value: t ?? "",
1864
1864
  onChange: (t) => n(e.name, t.target.value)
1865
1865
  };
@@ -1888,7 +1888,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1888
1888
  borderRadius: 8,
1889
1889
  display: "block"
1890
1890
  }
1891
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(We, {
1891
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Ge, {
1892
1892
  url: e.src,
1893
1893
  style: { width: "100%" }
1894
1894
  }) : /* @__PURE__ */ u("video", {
@@ -1900,14 +1900,14 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1900
1900
  display: "block"
1901
1901
  }
1902
1902
  }) : null : /* @__PURE__ */ d("label", {
1903
- style: dt,
1903
+ style: ft,
1904
1904
  children: [
1905
1905
  a,
1906
1906
  e.type === "textarea" || e.multiline ? /* @__PURE__ */ u("textarea", {
1907
1907
  ...o,
1908
1908
  rows: 4,
1909
1909
  style: {
1910
- ...ft,
1910
+ ...pt,
1911
1911
  resize: "vertical"
1912
1912
  }
1913
1913
  }) : e.type === "select" ? /* @__PURE__ */ d("select", {
@@ -1916,7 +1916,7 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1916
1916
  children: [/* @__PURE__ */ u("option", {
1917
1917
  value: "",
1918
1918
  children: e.placeholder || "—"
1919
- }), pt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1919
+ }), mt(e, i).map((e, t) => /* @__PURE__ */ u("option", {
1920
1920
  value: typeof e == "string" ? e : e.value,
1921
1921
  children: typeof e == "string" ? e : e.label ?? e.value
1922
1922
  }, t))]
@@ -1963,8 +1963,8 @@ function mt({ field: e, value: t, onChange: n, inert: r, values: i }) {
1963
1963
  ]
1964
1964
  });
1965
1965
  }
1966
- function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1967
- let { tenant: y, apiUrl: b } = r(U), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
1966
+ function gt({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s, auto: f, submitLabel: p, nodeRef: m, inert: h, children: g, linked: _, show: v }) {
1967
+ let { tenant: y, apiUrl: b } = r(H), [x, S] = c("form"), [w, T] = c(null), [E, D] = c({}), [O, k] = c(0), A = h ? v || "form" : x;
1968
1968
  i(() => {
1969
1969
  if (!f || !s) return;
1970
1970
  let e = !0;
@@ -1985,9 +1985,9 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1985
1985
  section: e,
1986
1986
  fields: []
1987
1987
  }) : j[j.length - 1].fields.push(e);
1988
- let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || ut(e.section.condition, E)).map((e) => ({
1988
+ let M = j.filter((e) => e.section || e.fields.length), N = M.filter((e) => !e.section || dt(e.section.condition, E)).map((e) => ({
1989
1989
  ...e,
1990
- fields: e.fields.filter((e) => ut(e.condition, E))
1990
+ fields: e.fields.filter((e) => dt(e.condition, E))
1991
1991
  })), P = M.length > 1, F = Math.min(O, Math.max(0, N.length - 1)), I = P ? N[F]?.fields ?? [] : N.flatMap((e) => e.fields), L = I.filter((e) => {
1992
1992
  let t = E[e.name];
1993
1993
  return e.required && (t == null || t === "" || t === !1);
@@ -2045,7 +2045,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2045
2045
  }
2046
2046
  },
2047
2047
  style: {
2048
- ...ct,
2048
+ ...lt,
2049
2049
  display: A === "success" ? "none" : "flex"
2050
2050
  },
2051
2051
  children: f && s ? /* @__PURE__ */ d(l, { children: [
@@ -2062,7 +2062,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2062
2062
  },
2063
2063
  children: N[F].section.help
2064
2064
  }),
2065
- I.map((e) => /* @__PURE__ */ u(mt, {
2065
+ I.map((e) => /* @__PURE__ */ u(ht, {
2066
2066
  field: e,
2067
2067
  value: E[e.name],
2068
2068
  values: E,
@@ -2081,7 +2081,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2081
2081
  disabled: h || void 0,
2082
2082
  onClick: () => k(F - 1),
2083
2083
  style: {
2084
- ...J,
2084
+ ...q,
2085
2085
  background: "transparent",
2086
2086
  color: "inherit",
2087
2087
  border: 0,
@@ -2094,7 +2094,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2094
2094
  disabled: h || L.length > 0,
2095
2095
  onClick: () => k(F + 1),
2096
2096
  style: {
2097
- ...J,
2097
+ ...q,
2098
2098
  border: 0,
2099
2099
  padding: "10px 22px",
2100
2100
  borderRadius: 8,
@@ -2108,7 +2108,7 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2108
2108
  type: "submit",
2109
2109
  disabled: h || void 0,
2110
2110
  style: {
2111
- ...J,
2111
+ ...q,
2112
2112
  border: 0,
2113
2113
  padding: "10px 22px",
2114
2114
  borderRadius: 8,
@@ -2135,10 +2135,10 @@ function ht({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
2135
2135
  ]
2136
2136
  });
2137
2137
  }
2138
- var $ = null, gt = null, _t = (e) => {
2138
+ var Q = null, _t = null, vt = (e) => {
2139
2139
  let t = typeof e == "string" && e.trim() ? e.trim() : "";
2140
- if ($ && gt === t) return $;
2141
- if ($ && typeof window < "u") {
2140
+ if (Q && _t === t) return Q;
2141
+ if (Q && typeof window < "u") {
2142
2142
  for (let e of ["grecaptcha", "___grecaptcha_cfg"]) try {
2143
2143
  delete window[e];
2144
2144
  } catch {
@@ -2146,22 +2146,22 @@ var $ = null, gt = null, _t = (e) => {
2146
2146
  }
2147
2147
  document.querySelectorAll("script[src*=\"recaptcha\"]").forEach((e) => e.remove());
2148
2148
  }
2149
- return gt = t, $ = new Promise((e) => {
2149
+ return _t = t, Q = new Promise((e) => {
2150
2150
  if (typeof window > "u") return;
2151
2151
  if (window.grecaptcha?.render) return e(window.grecaptcha);
2152
2152
  window.__webimRecaptchaReady = () => e(window.grecaptcha);
2153
2153
  let n = document.createElement("script");
2154
2154
  n.src = `https://www.google.com/recaptcha/api.js?onload=__webimRecaptchaReady&render=explicit${t ? `&hl=${encodeURIComponent(t)}` : ""}`, n.async = !0, document.head.appendChild(n);
2155
- }), $;
2155
+ }), Q;
2156
2156
  };
2157
- function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2158
- let p = r(U), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
2157
+ function yt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert: l, onChange: f }) {
2158
+ let p = r(H), m = p?.settings && typeof p.settings == "object" ? p.settings["google.recaptchaKey"] : "", h = typeof e == "string" && e.trim() || (typeof m == "string" ? m.trim() : ""), g = s(null), _ = s(f);
2159
2159
  if (_.current = f, i(() => {
2160
2160
  if (l || !h || !g.current) return;
2161
2161
  let e = !0, r = (t) => {
2162
2162
  e && typeof _.current == "function" && _.current(t);
2163
2163
  };
2164
- return _t(a).then((i) => {
2164
+ return vt(a).then((i) => {
2165
2165
  if (!(!e || !g.current || !i?.render)) {
2166
2166
  g.current.innerHTML = "", r("");
2167
2167
  try {
@@ -2243,17 +2243,17 @@ function vt({ siteKey: e, theme: t, size: n, hl: a, style: o, nodeRef: c, inert:
2243
2243
  children: /* @__PURE__ */ u("div", { ref: g })
2244
2244
  }) : null;
2245
2245
  }
2246
- function yt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2246
+ function bt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
2247
2247
  return /* @__PURE__ */ u("label", {
2248
2248
  ref: r,
2249
2249
  style: {
2250
- ...X,
2250
+ ...Y,
2251
2251
  ...C(n)
2252
2252
  },
2253
- children: Y(t, e, i)
2253
+ children: J(t, e, i)
2254
2254
  });
2255
2255
  }
2256
- function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2256
+ function xt({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
2257
2257
  return /* @__PURE__ */ u("input", {
2258
2258
  ref: a,
2259
2259
  type: e,
@@ -2261,13 +2261,13 @@ function bt({ type: e = "text", name: t, placeholder: n, required: r, style: i,
2261
2261
  placeholder: n,
2262
2262
  required: !o && !!r,
2263
2263
  style: {
2264
- ...Z,
2264
+ ...X,
2265
2265
  ...C(i)
2266
2266
  },
2267
- ...Q(o)
2267
+ ...Z(o)
2268
2268
  });
2269
2269
  }
2270
- function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2270
+ function St({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeRef: a, inert: o }) {
2271
2271
  return /* @__PURE__ */ u("textarea", {
2272
2272
  ref: a,
2273
2273
  name: e || void 0,
@@ -2275,18 +2275,18 @@ function xt({ name: e, placeholder: t, rows: n = 4, required: r, style: i, nodeR
2275
2275
  rows: n,
2276
2276
  required: !o && !!r,
2277
2277
  style: {
2278
- ...Z,
2278
+ ...X,
2279
2279
  resize: "vertical",
2280
2280
  ...C(i)
2281
2281
  },
2282
- ...Q(o)
2282
+ ...Z(o)
2283
2283
  });
2284
2284
  }
2285
- function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2285
+ function Ct({ kind: e = "checkbox", label: t, name: n, value: r, required: i, style: a, nodeRef: o, inert: s }) {
2286
2286
  return /* @__PURE__ */ d("label", {
2287
2287
  ref: o,
2288
2288
  style: {
2289
- ...lt,
2289
+ ...ut,
2290
2290
  ...C(a)
2291
2291
  },
2292
2292
  children: [/* @__PURE__ */ u("input", {
@@ -2303,7 +2303,7 @@ function St({ kind: e = "checkbox", label: t, name: n, value: r, required: i, st
2303
2303
  }), t]
2304
2304
  });
2305
2305
  }
2306
- function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2306
+ function wt({ name: e, placeholder: t, options: n = [], required: r, style: i, nodeRef: a, inert: o }) {
2307
2307
  return /* @__PURE__ */ d("select", {
2308
2308
  ref: a,
2309
2309
  name: e || void 0,
@@ -2312,7 +2312,7 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2312
2312
  onMouseDown: o ? (e) => e.preventDefault() : void 0,
2313
2313
  tabIndex: o ? -1 : void 0,
2314
2314
  style: {
2315
- ...Z,
2315
+ ...X,
2316
2316
  appearance: "auto",
2317
2317
  ...C(i)
2318
2318
  },
@@ -2326,12 +2326,12 @@ function Ct({ name: e, placeholder: t, options: n = [], required: r, style: i, n
2326
2326
  }, t))]
2327
2327
  });
2328
2328
  }
2329
- function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2329
+ function Tt({ name: e, accept: t, required: n, text: r = "Choose a file…", style: i, nodeRef: a, inert: o }) {
2330
2330
  let [s, l] = c(null);
2331
2331
  return /* @__PURE__ */ d("label", {
2332
2332
  ref: a,
2333
2333
  style: {
2334
- ...Z,
2334
+ ...X,
2335
2335
  display: "flex",
2336
2336
  alignItems: "center",
2337
2337
  gap: "8px",
@@ -2358,12 +2358,12 @@ function wt({ name: e, accept: t, required: n, text: r = "Choose a file…", sty
2358
2358
  ]
2359
2359
  });
2360
2360
  }
2361
- function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2361
+ function Et({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2362
2362
  return /* @__PURE__ */ u("button", {
2363
2363
  ref: n,
2364
2364
  type: r ? "button" : "submit",
2365
2365
  style: {
2366
- ...J,
2366
+ ...q,
2367
2367
  border: 0,
2368
2368
  cursor: "pointer",
2369
2369
  alignSelf: "flex-start",
@@ -2378,7 +2378,7 @@ function Tt({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2378
2378
  children: e
2379
2379
  });
2380
2380
  }
2381
- function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2381
+ function Dt({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2382
2382
  let a = Math.max(1, (Number(e) || 1) * (Number(t) || 1));
2383
2383
  return /* @__PURE__ */ u("div", {
2384
2384
  ref: r,
@@ -2395,8 +2395,8 @@ function Et({ cols: e = 2, rows: t = 1, style: n, nodeRef: r, linked: i }) {
2395
2395
  }, t))
2396
2396
  });
2397
2397
  }
2398
- function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2399
- let { tenant: v, apiUrl: y, locale: b } = r(U), x = r(pe), S = r(W), [, w] = c(0);
2398
+ function Ot({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, imageField: o, titleField: s = "name", textField: l, custom: f, templateId: p, paged: m, filters: h, style: g, nodeRef: _ }) {
2399
+ let { tenant: v, apiUrl: y, locale: b } = r(H), x = r(me), S = r(U), [, w] = c(0);
2400
2400
  i(() => {
2401
2401
  if (typeof window > "u") return;
2402
2402
  let e = () => w((e) => e + 1);
@@ -2404,7 +2404,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2404
2404
  window.removeEventListener("popstate", e), window.removeEventListener("webim:urlchange", e);
2405
2405
  };
2406
2406
  }, []);
2407
- let T = fe(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? G(S) : 1, [A, j] = c(null);
2407
+ let T = pe(h), E = JSON.stringify(T), D = E !== "{}" && !e?.startsWith?.("api:"), O = D ? null : S?.[e], k = m ? W(S) : 1, [A, j] = c(null);
2408
2408
  if (i(() => {
2409
2409
  if (!e || O) return;
2410
2410
  let n = !0, r = new URLSearchParams();
@@ -2449,7 +2449,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2449
2449
  },
2450
2450
  children: N.map((e) => /* @__PURE__ */ u("div", {
2451
2451
  style: { minWidth: 0 },
2452
- children: x.render(p, (t) => ge(t, e))
2452
+ children: x.render(p, (t) => _e(t, e))
2453
2453
  }, e.id ?? e?.data?.slug))
2454
2454
  }) : /* @__PURE__ */ u("div", {
2455
2455
  ref: _,
@@ -2459,7 +2459,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2459
2459
  ...C(g)
2460
2460
  },
2461
2461
  children: N.map((e) => {
2462
- let t = o ? K(e?.data, o) : null, r = s ? q(K(e?.data, s)) : null, i = l ? K(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : q(i), f = n === "list";
2462
+ let t = o ? G(e?.data, o) : null, r = s ? K(G(e?.data, s)) : null, i = l ? G(e?.data, l) : null, a = Array.isArray(i) ? i : null, c = a || i == null ? null : K(i), f = n === "list";
2463
2463
  return /* @__PURE__ */ d("div", {
2464
2464
  style: {
2465
2465
  display: "flex",
@@ -2506,7 +2506,7 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2506
2506
  lineHeight: 1.55,
2507
2507
  opacity: .85
2508
2508
  },
2509
- children: Me(a)
2509
+ children: Ne(a)
2510
2510
  })
2511
2511
  ]
2512
2512
  })]
@@ -2514,8 +2514,8 @@ function Dt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2514
2514
  })
2515
2515
  });
2516
2516
  }
2517
- function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2518
- let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : de(), s = {
2517
+ function kt({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, inert: i }) {
2518
+ let a = Array.isArray(e) ? e.filter((e) => e && typeof e == "object" && typeof e.name == "string" && e.name) : [], o = i ? {} : fe(), s = {
2519
2519
  height: 34,
2520
2520
  padding: "0 12px",
2521
2521
  borderRadius: 8,
@@ -2563,7 +2563,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2563
2563
  name: `f_${e.name}`,
2564
2564
  defaultValue: o[e.name] ?? "",
2565
2565
  style: s,
2566
- ...Q(i),
2566
+ ...Z(i),
2567
2567
  children: [/* @__PURE__ */ u("option", {
2568
2568
  value: "",
2569
2569
  children: e.label || e.name
@@ -2578,7 +2578,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2578
2578
  name: `f_${e.name}`,
2579
2579
  defaultValue: o[e.name] ?? "",
2580
2580
  style: s,
2581
- ...Q(i),
2581
+ ...Z(i),
2582
2582
  children: [
2583
2583
  /* @__PURE__ */ u("option", {
2584
2584
  value: "",
@@ -2599,7 +2599,7 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2599
2599
  defaultValue: o[e.name] ?? "",
2600
2600
  placeholder: e.label || e.name,
2601
2601
  style: s,
2602
- ...Q(i)
2602
+ ...Z(i)
2603
2603
  }, e.name)), /* @__PURE__ */ u("button", {
2604
2604
  type: "submit",
2605
2605
  style: {
@@ -2612,12 +2612,12 @@ function Ot({ fields: e = [], buttonLabel: t = "Search", style: n, nodeRef: r, i
2612
2612
  fontWeight: 600,
2613
2613
  cursor: i ? "default" : "pointer"
2614
2614
  },
2615
- ...Q(i),
2615
+ ...Z(i),
2616
2616
  children: t
2617
2617
  })]
2618
2618
  });
2619
2619
  }
2620
- function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2620
+ function At({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2621
2621
  return e.length ? /* @__PURE__ */ u("nav", {
2622
2622
  ref: r,
2623
2623
  "aria-label": "Breadcrumb",
@@ -2667,8 +2667,8 @@ function kt({ items: e = [], separator: t = "/", style: n, nodeRef: r }) {
2667
2667
  })
2668
2668
  }) : null;
2669
2669
  }
2670
- function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
2671
- let { tenant: g, apiUrl: _ } = r(U), v = r(W), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2670
+ function jt({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", source: o, pageSize: s = 6, align: l, hideEmpty: f, inert: p, style: m, nodeRef: h }) {
2671
+ let { tenant: g, apiUrl: _ } = r(H), v = r(U), [y, b] = c(null), x = o ? Number(v?.[`${o}:total`]) : NaN;
2672
2672
  i(() => {
2673
2673
  if (!o || Number.isFinite(x)) return;
2674
2674
  let e = !0, t = o.startsWith("api:") ? `${_}/data/${encodeURIComponent(o.slice(4))}` : `${_}/dynamic/${encodeURIComponent(o)}?limit=1`;
@@ -2687,7 +2687,7 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2687
2687
  ]);
2688
2688
  let S = Math.max(1, Number(s) || 6), w = Number.isFinite(x) ? x : y;
2689
2689
  if (o && w === null || o && f && !(w > 0)) return null;
2690
- let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? G(v) : Number(t) || 1, 1), T), D = (e) => {
2690
+ let T = Math.min(Math.max(o ? Math.ceil(w / S) : Number(e) || 1, 1), 50), E = Math.min(Math.max(o ? W(v) : Number(t) || 1, 1), T), D = (e) => {
2691
2691
  if (o) {
2692
2692
  if (typeof window < "u") {
2693
2693
  let t = new URLSearchParams(window.location.search);
@@ -2752,15 +2752,15 @@ function At({ pages: e = 5, current: t = 1, prevNext: n = !0, href: a = "#", sou
2752
2752
  ]
2753
2753
  });
2754
2754
  }
2755
- var jt = "webim.page_mode", Mt = () => {
2755
+ var Mt = "webim.page_mode", Nt = () => {
2756
2756
  if (typeof window > "u") return "auto";
2757
2757
  try {
2758
- let e = window.localStorage.getItem(jt);
2758
+ let e = window.localStorage.getItem(Mt);
2759
2759
  return e === "light" || e === "dark" ? e : "auto";
2760
2760
  } catch {
2761
2761
  return "auto";
2762
2762
  }
2763
- }, Nt = (e) => {
2763
+ }, Pt = (e) => {
2764
2764
  let t = {
2765
2765
  width: 16,
2766
2766
  height: 16,
@@ -2792,13 +2792,13 @@ var jt = "webim.page_mode", Mt = () => {
2792
2792
  rx: "2"
2793
2793
  }), /* @__PURE__ */ u("path", { d: "M8 21h8M12 17v4" })]
2794
2794
  });
2795
- }, Pt = {
2795
+ }, $ = {
2796
2796
  light: "Light theme",
2797
2797
  dark: "Dark theme",
2798
2798
  auto: "Follow the device theme"
2799
2799
  };
2800
2800
  function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2801
- let [o, l] = c(a ? "auto" : Mt), d = s(null), f = (e) => {
2801
+ let [o, l] = c(a ? "auto" : Nt), d = s(null), f = (e) => {
2802
2802
  d.current = e, typeof r == "function" && r(e);
2803
2803
  };
2804
2804
  i(() => {
@@ -2806,7 +2806,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2806
2806
  let e = d.current?.closest?.(".webim-page");
2807
2807
  e && (o === "light" || o === "dark" ? e.setAttribute("data-webim-mode", o) : e.removeAttribute("data-webim-mode"));
2808
2808
  try {
2809
- o === "auto" ? window.localStorage.removeItem(jt) : window.localStorage.setItem(jt, o);
2809
+ o === "auto" ? window.localStorage.removeItem(Mt) : window.localStorage.setItem(Mt, o);
2810
2810
  } catch {}
2811
2811
  }, [o, a]);
2812
2812
  let p = t === !1 ? ["light", "dark"] : [
@@ -2841,8 +2841,8 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2841
2841
  },
2842
2842
  children: p.map((e) => /* @__PURE__ */ u("button", {
2843
2843
  type: "button",
2844
- title: Pt[e],
2845
- "aria-label": Pt[e],
2844
+ title: $[e],
2845
+ "aria-label": $[e],
2846
2846
  "aria-pressed": e === m,
2847
2847
  onClick: a ? void 0 : () => l(e),
2848
2848
  style: {
@@ -2853,15 +2853,15 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2853
2853
  background: e === m ? "var(--page-accent, #111827)" : "transparent",
2854
2854
  opacity: e === m ? 1 : .7
2855
2855
  },
2856
- children: Nt(e)
2856
+ children: Pt(e)
2857
2857
  }, e))
2858
2858
  });
2859
2859
  let g = p[(p.indexOf(m) + 1) % p.length];
2860
2860
  return /* @__PURE__ */ u("button", {
2861
2861
  ref: f,
2862
2862
  type: "button",
2863
- title: Pt[m],
2864
- "aria-label": `Theme: ${Pt[m]} — switch to ${Pt[g]}`,
2863
+ title: $[m],
2864
+ "aria-label": `Theme: ${$[m]} — switch to ${$[g]}`,
2865
2865
  onClick: a ? void 0 : () => l(g),
2866
2866
  style: {
2867
2867
  ...h,
@@ -2870,7 +2870,7 @@ function Ft({ variant: e, showSystem: t, style: n, nodeRef: r, inert: a }) {
2870
2870
  border: "1px solid rgba(148, 163, 184, 0.4)",
2871
2871
  ...C(n)
2872
2872
  },
2873
- children: Nt(m)
2873
+ children: Pt(m)
2874
2874
  });
2875
2875
  }
2876
2876
  var It = {
@@ -3155,7 +3155,7 @@ var Ht = (e, t) => {
3155
3155
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
3156
3156
  }, Wt = (e) => !!(e?.cv?.trim?.() || e?.photo);
3157
3157
  function Gt(e, t = {}) {
3158
- 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 ? "" : q(e);
3158
+ 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 ? "" : K(e);
3159
3159
  return n.map((e) => {
3160
3160
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
3161
3161
  return {
@@ -3295,7 +3295,7 @@ function qt({ node: e, onClose: t }) {
3295
3295
  });
3296
3296
  }
3297
3297
  function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField: s, parentField: f, cvField: p, hrefField: m, size: h = "medium", horizontal: g = !1, style: _, nodeRef: v, interactive: y = !0 }) {
3298
- let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(U), E = r(W)?.[t], [D, O] = c(null);
3298
+ let b = a(), [x, S] = c(null), { tenant: w, apiUrl: T } = r(H), E = r(U)?.[t], [D, O] = c(null);
3299
3299
  i(() => {
3300
3300
  if (!t || E) return;
3301
3301
  let e = !0;
@@ -3484,7 +3484,7 @@ function Jt({ nodes: e = [], source: t, nameField: n, titleField: o, photoField:
3484
3484
  });
3485
3485
  }
3486
3486
  function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped: o = !0, bordered: s = !1, compact: l = !1, paged: f, emptyText: p, style: m, nodeRef: h }) {
3487
- let { tenant: g, apiUrl: _ } = r(U), v = r(W), y = v?.[n], b = f ? G(v) : 1, [x, S] = c(null);
3487
+ let { tenant: g, apiUrl: _ } = r(H), v = r(U), y = v?.[n], b = f ? W(v) : 1, [x, S] = c(null);
3488
3488
  if (i(() => {
3489
3489
  if (!n || y) return;
3490
3490
  let e = !0, t = Math.max(1, Number(a) || 10), r = f && !n.startsWith("api:") ? `?offset=${(b - 1) * t}&limit=${t}` : "", i = n.startsWith("api:") ? `${_}/data/${encodeURIComponent(n.slice(4))}` : `${_}/dynamic/${encodeURIComponent(n)}${r}`;
@@ -3503,7 +3503,7 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3503
3503
  b,
3504
3504
  a
3505
3505
  ]), !e.length) return null;
3506
- let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3506
+ let w = Math.max(1, Number(a) || 10), T = n ? f ? y || n.startsWith("api:") ? (y ?? x ?? []).slice((b - 1) * w, b * w) : (x ?? []).slice(0, w) : (y ?? x ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !y && x === null) && E.length === 0, O = l ? "6px 10px" : "10px 14px", k = "1px solid rgba(148, 163, 184, 0.35)", A = s ? { border: k } : { borderBottom: k };
3507
3507
  return /* @__PURE__ */ u("div", {
3508
3508
  ref: h,
3509
3509
  style: {
@@ -3550,57 +3550,57 @@ function Yt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
3550
3550
  });
3551
3551
  }
3552
3552
  var Xt = {
3553
- PageRoot: Ce,
3554
- Section: we,
3555
- Container: Te,
3556
- Heading: Ee,
3557
- TextBlock: Le,
3558
- ButtonBlock: Be,
3559
- ImageBlock: Ve,
3560
- Spacer: qe,
3561
- Divider: Je,
3562
- SliderBlock: et,
3563
- CanvasSlider: tt,
3564
- TabsBlock: ot,
3565
- QuickStack: Et,
3566
- CollectionList: Dt,
3567
- CollectionSearch: Ot,
3568
- BreadcrumbsBlock: kt,
3569
- PaginationBlock: At,
3553
+ PageRoot: we,
3554
+ Section: Te,
3555
+ Container: Ee,
3556
+ Heading: De,
3557
+ TextBlock: Re,
3558
+ ButtonBlock: Ve,
3559
+ ImageBlock: He,
3560
+ Spacer: Je,
3561
+ Divider: Ye,
3562
+ SliderBlock: tt,
3563
+ CanvasSlider: nt,
3564
+ TabsBlock: st,
3565
+ QuickStack: Dt,
3566
+ CollectionList: Ot,
3567
+ CollectionSearch: kt,
3568
+ BreadcrumbsBlock: At,
3569
+ PaginationBlock: jt,
3570
3570
  StepperBlock: Rt,
3571
3571
  SocialLinksBlock: Lt,
3572
3572
  ThemeModeBlock: Ft,
3573
3573
  OrgChartBlock: Jt,
3574
3574
  TableBlock: Yt,
3575
- MasonryBlock: nt,
3576
- AccordionBlock: st,
3577
- NavbarBlock: at,
3578
- ListBlock: Ie,
3579
- TextSpan: ke,
3580
- QuoteBlock: Fe,
3581
- TextLink: ze,
3582
- RichTextBlock: Ne,
3583
- RichContentBlock: Ne,
3584
- VideoBlock: He,
3585
- YouTubeBlock: We,
3586
- IframeBlock: Ge,
3587
- EmbedBlock: Ke,
3588
- FormBlock: ht,
3589
- FormLabel: yt,
3590
- FormInput: bt,
3591
- FormTextarea: xt,
3592
- FormCheckbox: (e) => /* @__PURE__ */ u(St, {
3575
+ MasonryBlock: rt,
3576
+ AccordionBlock: ct,
3577
+ NavbarBlock: ot,
3578
+ ListBlock: Le,
3579
+ TextSpan: Ae,
3580
+ QuoteBlock: Ie,
3581
+ TextLink: Be,
3582
+ RichTextBlock: Pe,
3583
+ RichContentBlock: Pe,
3584
+ VideoBlock: Ue,
3585
+ YouTubeBlock: Ge,
3586
+ IframeBlock: Ke,
3587
+ EmbedBlock: qe,
3588
+ FormBlock: gt,
3589
+ FormLabel: bt,
3590
+ FormInput: xt,
3591
+ FormTextarea: St,
3592
+ FormCheckbox: (e) => /* @__PURE__ */ u(Ct, {
3593
3593
  kind: "checkbox",
3594
3594
  ...e
3595
3595
  }),
3596
- FormRadio: (e) => /* @__PURE__ */ u(St, {
3596
+ FormRadio: (e) => /* @__PURE__ */ u(Ct, {
3597
3597
  kind: "radio",
3598
3598
  ...e
3599
3599
  }),
3600
- FormSelect: Ct,
3601
- FormFile: wt,
3602
- FormRecaptcha: vt,
3603
- FormSubmit: Tt
3600
+ FormSelect: wt,
3601
+ FormFile: Tt,
3602
+ FormRecaptcha: yt,
3603
+ FormSubmit: Et
3604
3604
  }, Zt = {
3605
3605
  id: "auth",
3606
3606
  label: "Accounts",
@@ -3621,7 +3621,7 @@ var Xt = {
3621
3621
  }, [e]), e;
3622
3622
  };
3623
3623
  function en({ children: e, initialUser: t, disabled: i, apiUrl: a, tenant: l }) {
3624
- let d = r(U), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
3624
+ let d = r(H), f = a || d?.apiUrl || "/api", p = l || d?.tenant || "", [m, h] = c(t ?? null), [g, _] = c(t ? "user" : i ? "guest" : "idle"), v = s(!1), y = n((e, t) => fetch(`${f}${e}`, {
3625
3625
  ...t,
3626
3626
  credentials: "include",
3627
3627
  headers: {
@@ -3665,7 +3665,7 @@ function tn({ when: e, children: t }) {
3665
3665
  //#endregion
3666
3666
  //#region ../ui/src/components/builder/apps/auth/views.jsx
3667
3667
  function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordLabel: i = "Password", nameLabel: a = "Name", submitLabel: o, style: s, nodeRef: l, inert: f, linked: p, show: m }) {
3668
- let { tenant: h, apiUrl: g, settings: _ } = r(U), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3668
+ let { tenant: h, apiUrl: g, settings: _ } = r(H), [v, y] = c("form"), [b, x] = c(""), [S, w] = c(!1), T = e === "register", E = f ? m || "form" : v, D = (e) => typeof e == "string" && e.startsWith("/") && !e.startsWith("//") ? e : "", O = async (e) => {
3669
3669
  if (e.preventDefault(), f) return;
3670
3670
  let n = new FormData(e.currentTarget);
3671
3671
  w(!0), x("");
@@ -3713,20 +3713,20 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3713
3713
  children: [
3714
3714
  T ? /* @__PURE__ */ d("label", {
3715
3715
  style: {
3716
- ...X,
3716
+ ...Y,
3717
3717
  display: "grid",
3718
3718
  gap: 6
3719
3719
  },
3720
3720
  children: [a, /* @__PURE__ */ u("input", {
3721
3721
  name: "name",
3722
3722
  type: "text",
3723
- style: Z,
3724
- ...Q(f)
3723
+ style: X,
3724
+ ...Z(f)
3725
3725
  })]
3726
3726
  }) : null,
3727
3727
  /* @__PURE__ */ d("label", {
3728
3728
  style: {
3729
- ...X,
3729
+ ...Y,
3730
3730
  display: "grid",
3731
3731
  gap: 6
3732
3732
  },
@@ -3734,13 +3734,13 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3734
3734
  name: "email",
3735
3735
  type: "email",
3736
3736
  required: !f,
3737
- style: Z,
3738
- ...Q(f)
3737
+ style: X,
3738
+ ...Z(f)
3739
3739
  })]
3740
3740
  }),
3741
3741
  /* @__PURE__ */ d("label", {
3742
3742
  style: {
3743
- ...X,
3743
+ ...Y,
3744
3744
  display: "grid",
3745
3745
  gap: 6
3746
3746
  },
@@ -3748,15 +3748,15 @@ function nn({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3748
3748
  name: "password",
3749
3749
  type: "password",
3750
3750
  required: !f,
3751
- style: Z,
3752
- ...Q(f)
3751
+ style: X,
3752
+ ...Z(f)
3753
3753
  })]
3754
3754
  }),
3755
3755
  /* @__PURE__ */ u("button", {
3756
3756
  type: f ? "button" : "submit",
3757
3757
  disabled: S || void 0,
3758
3758
  style: {
3759
- ...J,
3759
+ ...q,
3760
3760
  border: 0,
3761
3761
  padding: "10px 22px",
3762
3762
  borderRadius: 8,
@@ -3810,7 +3810,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3810
3810
  children: [
3811
3811
  /* @__PURE__ */ d("span", {
3812
3812
  style: {
3813
- ...X,
3813
+ ...Y,
3814
3814
  fontWeight: 600
3815
3815
  },
3816
3816
  children: [
@@ -3821,7 +3821,7 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3821
3821
  }),
3822
3822
  n && m?.email ? /* @__PURE__ */ u("span", {
3823
3823
  style: {
3824
- ...X,
3824
+ ...Y,
3825
3825
  opacity: .7
3826
3826
  },
3827
3827
  children: m.email
@@ -3830,14 +3830,14 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3830
3830
  type: "button",
3831
3831
  onClick: a ? void 0 : f,
3832
3832
  style: {
3833
- ...J,
3833
+ ...q,
3834
3834
  border: 0,
3835
3835
  padding: "8px 16px",
3836
3836
  borderRadius: 8,
3837
3837
  fontSize: 14,
3838
3838
  cursor: a ? "default" : "pointer"
3839
3839
  },
3840
- ...Q(a),
3840
+ ...Z(a),
3841
3841
  children: t
3842
3842
  })
3843
3843
  ]
@@ -3853,43 +3853,156 @@ function rn({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3853
3853
  });
3854
3854
  }
3855
3855
  //#endregion
3856
+ //#region ../ui/src/components/builder/apps/language/manifest.js
3857
+ var an = {
3858
+ id: "language",
3859
+ label: "Language",
3860
+ category: "Apps",
3861
+ keys: ["SiteLanguagePicker"],
3862
+ ssr: "prefetch",
3863
+ settings: ["locales"]
3864
+ };
3865
+ //#endregion
3866
+ //#region ../ui/src/components/builder/apps/language/views.jsx
3867
+ function on(e) {
3868
+ let t = e?.locales, n = [typeof t?.default == "string" && t.default.trim() ? t.default.trim() : "", ...Array.isArray(t?.enabled) ? t.enabled : []].filter((e) => typeof e == "string" && e.trim());
3869
+ return [...new Set(n.map((e) => e.trim()))];
3870
+ }
3871
+ var sn = (e) => e && e.charAt(0).toUpperCase() + e.slice(1);
3872
+ function cn(e, t) {
3873
+ let n = String(e ?? "").toUpperCase();
3874
+ if (t === "code") return n;
3875
+ let r = "";
3876
+ try {
3877
+ r = sn(new Intl.DisplayNames([e], { type: "language" }).of(e) ?? "");
3878
+ } catch {}
3879
+ return !r || r.toUpperCase() === n ? n : t === "both" ? `${n} — ${r}` : r;
3880
+ }
3881
+ function ln(e, t) {
3882
+ let n = t ? "" : `?locale=${encodeURIComponent(e)}`;
3883
+ if (typeof window > "u") return n || "?";
3884
+ try {
3885
+ let n = new URL(window.location.href);
3886
+ return t ? n.searchParams.delete("locale") : n.searchParams.set("locale", e), n.searchParams.delete("page"), `${n.pathname}${n.search}${n.hash}`;
3887
+ } catch {
3888
+ return n || "/";
3889
+ }
3890
+ }
3891
+ function un({ variant: e, display: t, separator: n, label: i, style: a, nodeRef: o, inert: s }) {
3892
+ let c = r(H), l = on(c?.settings), f = l[0] ?? "", p = l.includes(c?.locale) ? c.locale : f, m = {
3893
+ display: "inline-flex",
3894
+ alignItems: "center",
3895
+ gap: 8,
3896
+ ...C(a)
3897
+ };
3898
+ if (l.length < 2) return s ? /* @__PURE__ */ u("div", {
3899
+ ref: o,
3900
+ style: {
3901
+ ...m,
3902
+ padding: "8px 12px",
3903
+ border: "1px dashed rgba(100, 116, 139, 0.45)",
3904
+ borderRadius: 6,
3905
+ color: "rgba(100, 116, 139, 0.8)",
3906
+ fontSize: 12
3907
+ },
3908
+ children: "Add site languages in Settings → Languages"
3909
+ }) : null;
3910
+ let h = i ? /* @__PURE__ */ u("span", {
3911
+ style: { opacity: .7 },
3912
+ children: i
3913
+ }) : null;
3914
+ return e === "inline" ? /* @__PURE__ */ d("div", {
3915
+ ref: o,
3916
+ style: m,
3917
+ children: [h, l.map((e, r) => /* @__PURE__ */ d("span", {
3918
+ style: {
3919
+ display: "inline-flex",
3920
+ alignItems: "center",
3921
+ gap: 8
3922
+ },
3923
+ children: [r > 0 && /* @__PURE__ */ u("span", {
3924
+ style: { opacity: .4 },
3925
+ children: n ?? "·"
3926
+ }), /* @__PURE__ */ u("a", {
3927
+ href: ln(e, e === f),
3928
+ hrefLang: e,
3929
+ "aria-current": e === p ? "true" : void 0,
3930
+ onClick: s ? (e) => e.preventDefault() : void 0,
3931
+ style: {
3932
+ color: e === p ? "var(--page-accent, inherit)" : "inherit",
3933
+ fontWeight: e === p ? 600 : 400,
3934
+ textDecoration: "none",
3935
+ cursor: s ? "default" : "pointer"
3936
+ },
3937
+ children: cn(e, t)
3938
+ })]
3939
+ }, e))]
3940
+ }) : /* @__PURE__ */ d("div", {
3941
+ ref: o,
3942
+ style: m,
3943
+ children: [h, /* @__PURE__ */ u("select", {
3944
+ "aria-label": i || "Language",
3945
+ value: p,
3946
+ onChange: s ? void 0 : (e) => {
3947
+ let t = e.target.value;
3948
+ window.location.assign(ln(t, t === f));
3949
+ },
3950
+ onKeyDown: s ? (e) => e.preventDefault() : void 0,
3951
+ style: {
3952
+ font: "inherit",
3953
+ color: "inherit",
3954
+ background: "var(--page-surface, transparent)",
3955
+ border: "1px solid var(--page-border, rgba(148, 163, 184, 0.4))",
3956
+ borderRadius: 6,
3957
+ padding: "4px 8px",
3958
+ cursor: s ? "default" : "pointer"
3959
+ },
3960
+ children: l.map((e) => /* @__PURE__ */ u("option", {
3961
+ value: e,
3962
+ children: cn(e, t)
3963
+ }, e))
3964
+ })]
3965
+ });
3966
+ }
3967
+ //#endregion
3856
3968
  //#region ../ui/src/components/builder/apps/index.js
3857
- var an = [Zt], on = {
3969
+ var dn = [Zt, an], fn = {
3858
3970
  SiteLoginForm: nn,
3859
- SiteAccountMenu: rn
3971
+ SiteAccountMenu: rn,
3972
+ SiteLanguagePicker: un
3860
3973
  };
3861
- new Set(an.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3974
+ new Set(dn.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3862
3975
  //#endregion
3863
3976
  //#region ../ui/src/components/builder/plugins/runtime.js
3864
- var sn = /* @__PURE__ */ new Map();
3865
- function cn(e) {
3866
- if (sn.has(e)) return sn.get(e);
3977
+ var pn = /* @__PURE__ */ new Map();
3978
+ function mn(e) {
3979
+ if (pn.has(e)) return pn.get(e);
3867
3980
  let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3868
3981
  /* @vite-ignore */
3869
3982
  /* webpackIgnore: true */
3870
3983
  t
3871
3984
  ).finally(() => URL.revokeObjectURL(t));
3872
- return sn.set(e, n), n;
3985
+ return pn.set(e, n), n;
3873
3986
  }
3874
- function ln(e) {
3987
+ function hn(e) {
3875
3988
  let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3876
3989
  return n && typeof n == "object" ? n : {};
3877
3990
  }
3878
3991
  //#endregion
3879
3992
  //#region ../ui/src/components/builder/plugins/view.jsx
3880
- async function un(e, t) {
3881
- let n = await cn(e);
3993
+ async function gn(e, t) {
3994
+ let n = await mn(e);
3882
3995
  return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3883
3996
  }
3884
- var dn = {
3997
+ var _n = {
3885
3998
  padding: "10px 12px",
3886
3999
  border: "1px dashed rgba(148, 163, 184, 0.5)",
3887
4000
  borderRadius: 8,
3888
4001
  fontSize: 12,
3889
4002
  opacity: .6
3890
4003
  };
3891
- function fn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3892
- let c = r(U), l = ln(c?.settings)[e], f = s(null), p = s(null), m = {
4004
+ function vn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
4005
+ let c = r(H), l = hn(c?.settings)[e], f = s(null), p = s(null), m = {
3893
4006
  tenant: c?.tenant ?? "",
3894
4007
  apiUrl: c?.apiUrl ?? "/api",
3895
4008
  locale: c?.locale ?? "",
@@ -3901,7 +4014,7 @@ function fn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3901
4014
  let e = f.current;
3902
4015
  if (!l?.code || !e) return;
3903
4016
  let n = !0;
3904
- return un(l.code, t).then((e) => {
4017
+ return gn(l.code, t).then((e) => {
3905
4018
  if (!(!n || !e || !f.current)) {
3906
4019
  p.current = e;
3907
4020
  try {
@@ -3931,7 +4044,7 @@ function fn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3931
4044
  }) : /* @__PURE__ */ d("div", {
3932
4045
  ref: o,
3933
4046
  style: {
3934
- ...dn,
4047
+ ..._n,
3935
4048
  ...C(a)
3936
4049
  },
3937
4050
  children: [
@@ -3943,12 +4056,12 @@ function fn({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3943
4056
  }
3944
4057
  //#endregion
3945
4058
  //#region ../ui/src/components/builder/render.jsx
3946
- var pn = {
4059
+ var yn = {
3947
4060
  ...Xt,
3948
- ...on,
3949
- PluginBlock: fn
4061
+ ...fn,
4062
+ PluginBlock: vn
3950
4063
  };
3951
- function mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
4064
+ function bn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3952
4065
  let o = n[t];
3953
4066
  if (!o || o.hidden) return null;
3954
4067
  let s = o.type?.resolvedName, c = a?.mapProps ? a.mapProps(o.props ?? {}, s) : o.props ?? {};
@@ -3956,11 +4069,11 @@ function mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3956
4069
  let n = o.props?.componentId, s = r?.[n];
3957
4070
  if (!s?.template || i.has(n)) return null;
3958
4071
  let c = new Set(i).add(n);
3959
- return /* @__PURE__ */ u(e, { children: mn(s.template.rootId, s.template.nodes, r, c, a) }, t);
4072
+ return /* @__PURE__ */ u(e, { children: bn(s.template.rootId, s.template.nodes, r, c, a) }, t);
3960
4073
  }
3961
- let l = pn[s];
4074
+ let l = yn[s];
3962
4075
  if (!l) return null;
3963
- let d = (o.nodes ?? []).map((e) => mn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, mn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
4076
+ let d = (o.nodes ?? []).map((e) => bn(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, bn(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
3964
4077
  ...c,
3965
4078
  ...s === "CollectionList" ? { templateId: o.linkedNodes?.card } : null,
3966
4079
  linked: p,
@@ -3976,9 +4089,9 @@ function mn(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3976
4089
  }
3977
4090
  //#endregion
3978
4091
  //#region ../ui/src/components/builder/PageRenderer.jsx
3979
- var hn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), gn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
4092
+ var xn = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" "), Sn = (e) => `.webim-page[data-webim-mode="light"] { ${Object.entries(V(e.light)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }
3980
4093
  .webim-page[data-webim-mode="dark"] { ${Object.entries(V(e.dark)).map(([e, t]) => `${e}: ${t} !important;`).join(" ")} }`;
3981
- function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
4094
+ function Cn({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, custom: s, tenant: c, apiUrl: l, datasets: f, locale: p, direction: m, settings: h, siteUser: _ }) {
3982
4095
  let v = s?.js?.trim();
3983
4096
  if (i(() => {
3984
4097
  if (!v) return;
@@ -3987,17 +4100,17 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3987
4100
  }, [v]), !e?.ROOT) return null;
3988
4101
  let b = {
3989
4102
  lang: p || void 0,
3990
- dir: ue(m, p)
4103
+ dir: de(m, p)
3991
4104
  }, x = ".webim-page, .webim-page *, .webim-page *::before, .webim-page *::after { box-sizing: border-box; }", S = {
3992
4105
  minHeight: "100%",
3993
4106
  display: "flex",
3994
4107
  flexDirection: "column"
3995
- }, C = mn("ROOT", e, n), w = o(() => ({ render: (t, r) => mn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = F(e, n), E = P(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
4108
+ }, C = bn("ROOT", e, n), w = o(() => ({ render: (t, r) => bn(t, e, n, void 0, { mapProps: r }) }), [e, n]), T = F(e, n), E = P(e, n), D = s?.css?.trim(), O = B(t), k = [O.font, O.headingFont].filter((e) => typeof e == "string" && e.trim() && e !== "inherit" && !z[e]), A = [.../* @__PURE__ */ new Set([...y(e, n), ...k])].map((e) => /* @__PURE__ */ u("link", {
3996
4109
  rel: "stylesheet",
3997
4110
  precedence: "default",
3998
4111
  href: g(e)
3999
- }, e)), j = gn(O);
4000
- return r === "auto" ? /* @__PURE__ */ u(U.Provider, {
4112
+ }, e)), j = Sn(O);
4113
+ return r === "auto" ? /* @__PURE__ */ u(H.Provider, {
4001
4114
  value: {
4002
4115
  tenant: c || "",
4003
4116
  apiUrl: l || "/api",
@@ -4006,9 +4119,9 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4006
4119
  },
4007
4120
  children: /* @__PURE__ */ u(en, {
4008
4121
  initialUser: _,
4009
- children: /* @__PURE__ */ u(W.Provider, {
4122
+ children: /* @__PURE__ */ u(U.Provider, {
4010
4123
  value: f ?? null,
4011
- children: /* @__PURE__ */ u(pe.Provider, {
4124
+ children: /* @__PURE__ */ u(me.Provider, {
4012
4125
  value: w,
4013
4126
  children: /* @__PURE__ */ d("div", {
4014
4127
  ...b,
@@ -4019,8 +4132,8 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4019
4132
  ...a
4020
4133
  },
4021
4134
  children: [
4022
- /* @__PURE__ */ u("style", { children: `.webim-page { ${hn(V(O.light))} }
4023
- @media (prefers-color-scheme: dark) { .webim-page { ${hn(V(O.dark))} } }` }),
4135
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${xn(V(O.light))} }
4136
+ @media (prefers-color-scheme: dark) { .webim-page { ${xn(V(O.dark))} } }` }),
4024
4137
  /* @__PURE__ */ u("style", { children: j }),
4025
4138
  A,
4026
4139
  /* @__PURE__ */ u("style", { children: x }),
@@ -4033,7 +4146,7 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4033
4146
  })
4034
4147
  })
4035
4148
  })
4036
- }) : /* @__PURE__ */ u(U.Provider, {
4149
+ }) : /* @__PURE__ */ u(H.Provider, {
4037
4150
  value: {
4038
4151
  tenant: c || "",
4039
4152
  apiUrl: l || "/api",
@@ -4042,9 +4155,9 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4042
4155
  },
4043
4156
  children: /* @__PURE__ */ u(en, {
4044
4157
  initialUser: _,
4045
- children: /* @__PURE__ */ u(W.Provider, {
4158
+ children: /* @__PURE__ */ u(U.Provider, {
4046
4159
  value: f ?? null,
4047
- children: /* @__PURE__ */ u(pe.Provider, {
4160
+ children: /* @__PURE__ */ u(me.Provider, {
4048
4161
  value: w,
4049
4162
  children: /* @__PURE__ */ d("div", {
4050
4163
  ...b,
@@ -4071,8 +4184,8 @@ function _n({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
4071
4184
  }
4072
4185
  //#endregion
4073
4186
  //#region src/WebimContent.jsx
4074
- function vn({ bundle: e, mode: t = "auto", style: n }) {
4075
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(_n, {
4187
+ function wn({ bundle: e, mode: t = "auto", style: n }) {
4188
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(Cn, {
4076
4189
  blocks: e.blocks,
4077
4190
  theme: e.theme,
4078
4191
  components: e.components,
@@ -4089,7 +4202,7 @@ function vn({ bundle: e, mode: t = "auto", style: n }) {
4089
4202
  }
4090
4203
  //#endregion
4091
4204
  //#region src/WebimPage.jsx
4092
- function yn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
4205
+ function Tn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mode: l = "auto", style: d, fallback: f = null, errorFallback: p = null, onLoad: m, onError: h }) {
4093
4206
  let [g, _] = c({ status: "loading" }), v = s({
4094
4207
  onLoad: m,
4095
4208
  onError: h
@@ -4099,7 +4212,7 @@ function yn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
4099
4212
  onError: h
4100
4213
  }, i(() => {
4101
4214
  let i = !0;
4102
- return _({ status: "loading" }), se({
4215
+ return _({ status: "loading" }), ce({
4103
4216
  apiUrl: e,
4104
4217
  tenant: t,
4105
4218
  slug: n,
@@ -4126,11 +4239,11 @@ function yn({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
4126
4239
  r,
4127
4240
  a,
4128
4241
  o
4129
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(vn, {
4242
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(wn, {
4130
4243
  bundle: g.bundle,
4131
4244
  mode: l,
4132
4245
  style: d
4133
4246
  });
4134
4247
  }
4135
4248
  //#endregion
4136
- export { _n as PageRenderer, vn as WebimContent, yn as WebimPage, se as fetchPage, Me as renderRichContent, ie as resolveTheme };
4249
+ export { Cn as PageRenderer, wn as WebimContent, Tn as WebimPage, ce as fetchPage, Ne as renderRichContent, ie as resolveTheme };