webim-adapter 0.14.0 → 0.15.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.
@@ -60,24 +60,24 @@ function h(e) {
60
60
  delete t.clipText, oe && (t.WebkitBackgroundClip = "text", t.backgroundClip = "text", t.WebkitTextFillColor = "transparent");
61
61
  let { transitions: se, transitionDuration: V, transitionEasing: H, transitionProperty: U } = t, W = (e) => typeof e == "number" || !Number.isNaN(Number(e)) ? `${Number(e)}ms` : e;
62
62
  delete t.transitions, delete t.transitionDuration, delete t.transitionEasing, delete t.transitionProperty;
63
- let G = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${W(e.duration ?? 200)} ${e.easing || "ease"}`);
64
- if (V !== void 0 && G.push(`${U || "all"} ${W(V)} ${H || "ease"}`), G.length && (t.transition = G.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
63
+ let ce = (Array.isArray(se) ? se : []).filter((e) => e && e.on !== !1).map((e) => `${e.property || "all"} ${W(e.duration ?? 200)} ${e.easing || "ease"}`);
64
+ if (V !== void 0 && ce.push(`${U || "all"} ${W(V)} ${H || "ease"}`), ce.length && (t.transition = ce.join(", ")), t.textDecoration !== void 0 && (t.textDecorationLine = t.textDecoration, delete t.textDecoration), t.backgroundImage && !String(t.backgroundImage).includes("(") && (t.backgroundImage = `url("${t.backgroundImage}")`), n) {
65
65
  let e = `${i || "rgba(0,0,0,0.5)"}, ${a || "transparent"}`, o = n === "radial" ? `radial-gradient(circle, ${e})` : `linear-gradient(${r ?? 180}deg, ${e})`;
66
66
  t.backgroundImage = t.backgroundImage ? `${o}, ${t.backgroundImage}` : o;
67
67
  }
68
68
  delete t.backgroundVideo;
69
- let { overlayColor: K, overlayOpacity: ce } = t;
70
- if (delete t.overlayColor, delete t.overlayOpacity, K) {
71
- let e = `color-mix(in srgb, ${K} ${ce ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
69
+ let { overlayColor: G, overlayOpacity: le } = t;
70
+ if (delete t.overlayColor, delete t.overlayOpacity, G) {
71
+ let e = `color-mix(in srgb, ${G} ${le ?? 50}%, transparent)`, n = `linear-gradient(${e}, ${e})`;
72
72
  t.backgroundImage = t.backgroundImage ? `${n}, ${t.backgroundImage}` : n;
73
73
  }
74
74
  t.backgroundImage && (t.backgroundSize ??= "cover", t.backgroundPosition ??= "center", t.backgroundRepeat ??= "no-repeat");
75
- let { backgroundLayers: q } = t;
75
+ let { backgroundLayers: K } = t;
76
76
  delete t.backgroundLayers;
77
- let le = (Array.isArray(q) ? q : []).filter((e) => e && e.on !== !1);
78
- if (le.length) {
77
+ let ue = (Array.isArray(K) ? K : []).filter((e) => e && e.on !== !1);
78
+ if (ue.length) {
79
79
  let e = [], n = [], r = [], i = [], a = [];
80
- for (let t of le) 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");
80
+ for (let t of ue) 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");
81
81
  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");
82
82
  else {
83
83
  if (!t.src) continue;
@@ -492,11 +492,11 @@ var ae = /* @__PURE__ */ new Set([
492
492
  if (typeof window > "u") return 1;
493
493
  let n = Number(new URLSearchParams(window.location.search).get("page"));
494
494
  return Number.isFinite(n) && n >= 1 ? Math.floor(n) : 1;
495
- }, W = t(null), G = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
496
- function K(e, t) {
495
+ }, W = t(null), ce = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
496
+ function G(e, t) {
497
497
  if (t) return t.includes(".") ? t.split(".").reduce((e, t) => e && typeof e == "object" ? e[t] : void 0, e) : e?.[t];
498
498
  }
499
- var ce = (e) => {
499
+ var le = (e) => {
500
500
  let t = [];
501
501
  for (let [n, r] of Object.entries(e ?? {})) {
502
502
  if (!/^[\w-]+$/.test(n)) continue;
@@ -506,36 +506,36 @@ var ce = (e) => {
506
506
  }
507
507
  return t;
508
508
  };
509
- function q(e) {
509
+ function K(e) {
510
510
  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 ?? "") : 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(" ") : "";
511
511
  }
512
- function le(e, t) {
513
- let n = t?.data ?? {}, r = ce(n);
512
+ function ue(e, t) {
513
+ let n = t?.data ?? {}, r = le(n);
514
514
  if (!r.length) return e;
515
- let i = RegExp(`:(${r.map(G).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;
515
+ let i = RegExp(`:(${r.map(ce).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;
516
516
  return a(e);
517
517
  }
518
- var ue = {
518
+ var de = {
519
519
  margin: 0,
520
520
  fontWeight: 700,
521
521
  lineHeight: 1.2,
522
522
  fontFamily: "var(--page-heading-font, inherit)"
523
- }, de = { margin: 0 }, J = {
523
+ }, fe = { margin: 0 }, q = {
524
524
  display: "inline-block",
525
525
  textDecoration: "none",
526
526
  cursor: "pointer",
527
527
  backgroundColor: "var(--page-accent, #111827)",
528
528
  color: "var(--page-accent-text, #ffffff)"
529
- }, fe = {
529
+ }, pe = {
530
530
  flexGrow: 1,
531
531
  display: "flex",
532
532
  flexDirection: "column",
533
533
  position: "relative"
534
- }, pe = {
534
+ }, me = {
535
535
  display: "flex",
536
536
  flexDirection: "column"
537
537
  };
538
- function me({ style: e }) {
538
+ function he({ style: e }) {
539
539
  let t = e?.backgroundVideo;
540
540
  if (!t) return null;
541
541
  let n = {
@@ -561,7 +561,7 @@ function me({ style: e }) {
561
561
  background: r
562
562
  } })] });
563
563
  }
564
- var he = (e, t) => e?.backgroundVideo ? {
564
+ var ge = (e, t) => e?.backgroundVideo ? {
565
565
  position: "relative",
566
566
  ...t,
567
567
  ...h(e)
@@ -569,24 +569,24 @@ var he = (e, t) => e?.backgroundVideo ? {
569
569
  ...t,
570
570
  ...h(e)
571
571
  };
572
- function ge({ style: e, nodeRef: t, children: n }) {
572
+ function _e({ style: e, nodeRef: t, children: n }) {
573
573
  return /* @__PURE__ */ d("div", {
574
574
  ref: t,
575
575
  style: {
576
- ...fe,
576
+ ...pe,
577
577
  ...h(e)
578
578
  },
579
- children: [/* @__PURE__ */ u(me, { style: e }), n]
579
+ children: [/* @__PURE__ */ u(he, { style: e }), n]
580
580
  });
581
581
  }
582
- function _e({ style: e, nodeRef: t, children: n }) {
582
+ function ve({ style: e, nodeRef: t, children: n }) {
583
583
  return /* @__PURE__ */ d("section", {
584
584
  ref: t,
585
- style: he(e, pe),
586
- children: [/* @__PURE__ */ u(me, { style: e }), n]
585
+ style: ge(e, me),
586
+ children: [/* @__PURE__ */ u(he, { style: e }), n]
587
587
  });
588
588
  }
589
- function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
589
+ function ye({ style: e, freeLayout: t, nodeRef: n, children: r }) {
590
590
  let i = t ? {
591
591
  position: "relative",
592
592
  minHeight: 240
@@ -595,32 +595,32 @@ function ve({ style: e, freeLayout: t, nodeRef: n, children: r }) {
595
595
  ref: n,
596
596
  style: i ? {
597
597
  ...i,
598
- ...he(e)
599
- } : he(e),
600
- children: [/* @__PURE__ */ u(me, { style: e }), r]
598
+ ...ge(e)
599
+ } : ge(e),
600
+ children: [/* @__PURE__ */ u(he, { style: e }), r]
601
601
  });
602
602
  }
603
- function ye({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
603
+ function be({ text: e, parts: t, tag: n = "h2", style: r, linked: i, nodeRef: a }) {
604
604
  return /* @__PURE__ */ u(n, {
605
605
  ref: a,
606
606
  style: {
607
- ...ue,
607
+ ...de,
608
608
  ...h(r)
609
609
  },
610
- children: Y(t, e, i)
610
+ children: J(t, e, i)
611
611
  });
612
612
  }
613
- var be = {
613
+ var xe = {
614
614
  fontFamily: j.mono.value,
615
615
  background: "rgba(148, 163, 184, 0.18)",
616
616
  padding: "1px 5px",
617
617
  borderRadius: 4,
618
618
  fontSize: "0.9em"
619
619
  };
620
- function xe(e, t = [], n, r) {
620
+ function Se(e, t = [], n, r) {
621
621
  let i = e;
622
622
  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", {
623
- style: be,
623
+ style: xe,
624
624
  children: i
625
625
  })), 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", {
626
626
  href: n,
@@ -630,13 +630,13 @@ function xe(e, t = [], n, r) {
630
630
  children: i
631
631
  })), i;
632
632
  }
633
- function Y(t, n, r) {
633
+ function J(t, n, r) {
634
634
  return t?.length ? t.map((t, n) => {
635
635
  if (t.slot) return /* @__PURE__ */ u(e, { children: r?.[t.slot] ?? null }, n);
636
- if (t.parts) return /* @__PURE__ */ u(e, { children: Y(t.parts, "", r) }, n);
636
+ if (t.parts) return /* @__PURE__ */ u(e, { children: J(t.parts, "", r) }, n);
637
637
  let i = t.text;
638
638
  return t.sup ? i = /* @__PURE__ */ u("sup", { children: i }) : t.sub && (i = /* @__PURE__ */ u("sub", { children: i })), t.code && (i = /* @__PURE__ */ u("code", {
639
- style: be,
639
+ style: xe,
640
640
  children: i
641
641
  })), 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", {
642
642
  style: {
@@ -653,13 +653,13 @@ function Y(t, n, r) {
653
653
  })), /* @__PURE__ */ u(e, { children: i }, n);
654
654
  }) : n;
655
655
  }
656
- function Se({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
656
+ function Ce({ parts: e, text: t, marks: n, href: r, target: i, style: a }) {
657
657
  return /* @__PURE__ */ u("span", {
658
658
  style: h(a),
659
- children: e?.length ? Y(e, t) : xe(t, n, r, i)
659
+ children: e?.length ? J(e, t) : Se(t, n, r, i)
660
660
  });
661
661
  }
662
- var Ce = {
662
+ var we = {
663
663
  h1: 40,
664
664
  h2: 32,
665
665
  h3: 26,
@@ -667,7 +667,7 @@ var Ce = {
667
667
  h5: 19,
668
668
  h6: 16
669
669
  };
670
- function we({ align: e = "center", width: t, wrap: n } = {}) {
670
+ function Te({ align: e = "center", width: t, wrap: n } = {}) {
671
671
  let r = t ? `${t}%` : void 0;
672
672
  if (e === "full") return { width: "100%" };
673
673
  let i = e === "left" || e === "right";
@@ -701,8 +701,8 @@ function we({ align: e = "center", width: t, wrap: n } = {}) {
701
701
  marginRight: "auto"
702
702
  };
703
703
  }
704
- function Te(e = [], t, n) {
705
- let r = n ?? ((e, n) => Y(e, n, t));
704
+ function Ee(e = [], t, n) {
705
+ let r = n ?? ((e, n) => J(e, n, t));
706
706
  return e.map((t, n) => {
707
707
  let i = {
708
708
  marginTop: 0,
@@ -724,7 +724,7 @@ function Te(e = [], t, n) {
724
724
  marginLeft: 0,
725
725
  marginRight: 0,
726
726
  ...i,
727
- ...we(t)
727
+ ...Te(t)
728
728
  },
729
729
  children: [t.href ? /* @__PURE__ */ u("a", {
730
730
  href: t.href,
@@ -743,16 +743,16 @@ function Te(e = [], t, n) {
743
743
  })]
744
744
  }, n);
745
745
  }
746
- if (t.type === "video") return Ie(t.url) ? /* @__PURE__ */ u("div", {
746
+ if (t.type === "video") return Le(t.url) ? /* @__PURE__ */ u("div", {
747
747
  style: {
748
748
  ...i,
749
- ...we({
749
+ ...Te({
750
750
  align: t.align,
751
751
  wrap: t.wrap,
752
752
  width: t.width ?? 100
753
753
  })
754
754
  },
755
- children: /* @__PURE__ */ u(Le, {
755
+ children: /* @__PURE__ */ u(Re, {
756
756
  url: t.url,
757
757
  autoplay: t.autoplay,
758
758
  muted: t.muted,
@@ -781,17 +781,17 @@ function Te(e = [], t, n) {
781
781
  }
782
782
  if (t.type === "quote") return /* @__PURE__ */ u("blockquote", {
783
783
  style: {
784
- ...De,
784
+ ...Oe,
785
785
  ...i
786
786
  },
787
787
  children: r(t.parts, t.text)
788
788
  }, n);
789
- if (Ce[t.type]) {
789
+ if (we[t.type]) {
790
790
  let e = t.type;
791
791
  return /* @__PURE__ */ u(e, {
792
792
  style: {
793
- ...ue,
794
- fontSize: Ce[t.type],
793
+ ...de,
794
+ fontSize: we[t.type],
795
795
  ...i
796
796
  },
797
797
  children: r(t.parts, t.text)
@@ -799,39 +799,39 @@ function Te(e = [], t, n) {
799
799
  }
800
800
  return /* @__PURE__ */ u("p", {
801
801
  style: {
802
- ...de,
802
+ ...fe,
803
803
  ...i
804
804
  },
805
805
  children: r(t.parts, t.text)
806
806
  }, n);
807
807
  });
808
808
  }
809
- function Ee({ content: e, style: t, linked: n, nodeRef: r }) {
809
+ function De({ content: e, style: t, linked: n, nodeRef: r }) {
810
810
  return /* @__PURE__ */ u("div", {
811
811
  ref: r,
812
812
  style: {
813
813
  display: "flow-root",
814
814
  ...h(t)
815
815
  },
816
- children: Te(e, n)
816
+ children: Ee(e, n)
817
817
  });
818
818
  }
819
- var De = {
819
+ var Oe = {
820
820
  margin: 0,
821
821
  padding: "8px 0 8px 20px",
822
822
  borderLeft: "4px solid var(--page-accent, rgba(148, 163, 184, 0.6))"
823
823
  };
824
- function Oe({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
824
+ function ke({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
825
825
  return /* @__PURE__ */ u("blockquote", {
826
826
  ref: i,
827
827
  style: {
828
- ...De,
828
+ ...Oe,
829
829
  ...h(n)
830
830
  },
831
- children: Y(t, e, r)
831
+ children: J(t, e, r)
832
832
  });
833
833
  }
834
- function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
834
+ function Ae({ ordered: e, items: t = [], style: n, nodeRef: r }) {
835
835
  return /* @__PURE__ */ u(e ? "ol" : "ul", {
836
836
  ref: r,
837
837
  style: {
@@ -841,53 +841,53 @@ function ke({ ordered: e, items: t = [], style: n, nodeRef: r }) {
841
841
  },
842
842
  children: t.map((e, t) => /* @__PURE__ */ u("li", {
843
843
  style: { marginBottom: 4 },
844
- children: Y(e.parts, e.text)
844
+ children: J(e.parts, e.text)
845
845
  }, t))
846
846
  });
847
847
  }
848
- function Ae({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
848
+ function je({ text: e, parts: t, style: n, linked: r, nodeRef: i }) {
849
849
  return /* @__PURE__ */ u("p", {
850
850
  ref: i,
851
851
  style: {
852
- ...de,
852
+ ...fe,
853
853
  ...h(n)
854
854
  },
855
- children: Y(t, e, r)
855
+ children: J(t, e, r)
856
856
  });
857
857
  }
858
- var je = {
858
+ var Me = {
859
859
  color: "var(--page-accent, inherit)",
860
860
  textDecoration: "underline",
861
861
  textUnderlineOffset: 3,
862
862
  cursor: "pointer"
863
863
  };
864
- function Me({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
864
+ function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
865
865
  return /* @__PURE__ */ u("a", {
866
866
  ref: o,
867
867
  href: n || "#",
868
868
  target: r || void 0,
869
869
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
870
870
  style: {
871
- ...je,
871
+ ...Me,
872
872
  ...h(i)
873
873
  },
874
- children: Y(t, e, a)
874
+ children: J(t, e, a)
875
875
  });
876
876
  }
877
- function Ne({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
877
+ function Pe({ text: e, parts: t, href: n, target: r, style: i, linked: a, nodeRef: o }) {
878
878
  return /* @__PURE__ */ u("a", {
879
879
  ref: o,
880
880
  href: n || "#",
881
881
  target: r || void 0,
882
882
  rel: r === "_blank" ? "noopener noreferrer" : void 0,
883
883
  style: {
884
- ...J,
884
+ ...q,
885
885
  ...h(i)
886
886
  },
887
- children: Y(t, e, a)
887
+ children: J(t, e, a)
888
888
  });
889
889
  }
890
- function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
890
+ function Fe({ src: e, alt: t, style: n, nodeRef: r }) {
891
891
  return e ? /* @__PURE__ */ u("img", {
892
892
  ref: r,
893
893
  src: e,
@@ -899,7 +899,7 @@ function Pe({ src: e, alt: t, style: n, nodeRef: r }) {
899
899
  }
900
900
  }) : null;
901
901
  }
902
- function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
902
+ function Ie({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !1, muted: a = !1, style: o, nodeRef: s }) {
903
903
  return e ? /* @__PURE__ */ u("video", {
904
904
  ref: s,
905
905
  src: e,
@@ -917,9 +917,9 @@ function Fe({ src: e, poster: t, controls: n = !0, autoplay: r = !1, loop: i = !
917
917
  }
918
918
  }) : null;
919
919
  }
920
- var Ie = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
921
- function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
922
- let c = Ie(e);
920
+ var Le = (e = "") => (e.match(/(?:youtu\.be\/|v=|embed\/|shorts\/|live\/)([\w-]{11})/) || e.match(/^([\w-]{11})$/))?.[1];
921
+ function Re({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i = !0, start: a, style: o, nodeRef: s }) {
922
+ let c = Le(e);
923
923
  if (!c) return null;
924
924
  let l = new URLSearchParams({ rel: "0" });
925
925
  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", {
@@ -945,7 +945,7 @@ function Le({ url: e, autoplay: t = !1, muted: n = !1, loop: r = !1, controls: i
945
945
  })
946
946
  });
947
947
  }
948
- function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
948
+ function ze({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i }) {
949
949
  return e ? /* @__PURE__ */ u("iframe", {
950
950
  ref: i,
951
951
  src: e,
@@ -961,7 +961,7 @@ function Re({ src: e, title: t, allowFullscreen: n = !0, style: r, nodeRef: i })
961
961
  }
962
962
  }) : null;
963
963
  }
964
- function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
964
+ function Be({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
965
965
  let [a, o] = c(null);
966
966
  return i(() => {
967
967
  a && (a.innerHTML = e || "", t && a.querySelectorAll("script").forEach((e) => {
@@ -980,7 +980,7 @@ function ze({ code: e, runScripts: t = !0, style: n, nodeRef: r }) {
980
980
  style: h(n)
981
981
  });
982
982
  }
983
- function Be({ height: e, nodeRef: t }) {
983
+ function Ve({ height: e, nodeRef: t }) {
984
984
  return /* @__PURE__ */ u("div", {
985
985
  ref: t,
986
986
  style: {
@@ -990,7 +990,7 @@ function Be({ height: e, nodeRef: t }) {
990
990
  }
991
991
  });
992
992
  }
993
- function Ve({ style: e, nodeRef: t }) {
993
+ function He({ style: e, nodeRef: t }) {
994
994
  return /* @__PURE__ */ u("div", {
995
995
  ref: t,
996
996
  style: {
@@ -1001,7 +1001,7 @@ function Ve({ style: e, nodeRef: t }) {
1001
1001
  }
1002
1002
  });
1003
1003
  }
1004
- var He = {
1004
+ var Ue = {
1005
1005
  position: "absolute",
1006
1006
  top: "50%",
1007
1007
  transform: "translateY(-50%)",
@@ -1018,7 +1018,7 @@ var He = {
1018
1018
  alignItems: "center",
1019
1019
  justifyContent: "center",
1020
1020
  padding: 0
1021
- }, Ue = {
1021
+ }, We = {
1022
1022
  bottom: {
1023
1023
  inset: "auto 0 0 0",
1024
1024
  padding: "40px 24px 20px",
@@ -1037,8 +1037,8 @@ var He = {
1037
1037
  padding: 24,
1038
1038
  textShadow: "0 2px 12px rgba(0, 0, 0, 0.6)"
1039
1039
  }
1040
- }, We = 48;
1041
- function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1040
+ }, Ge = 48;
1041
+ function Ke({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, height: a = 320, swipe: o = !0, style: s, nodeRef: f }) {
1042
1042
  let [p, m] = c(0), [g, _] = c(!1), [v, y] = c(null), b = e ? Math.min(p, e - 1) : 0;
1043
1043
  if (i(() => {
1044
1044
  if (!n || g || v || e < 2) return;
@@ -1054,7 +1054,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1054
1054
  let x = (t) => m((t + e) % e), S = () => {
1055
1055
  if (!v) return;
1056
1056
  let { dx: e } = v;
1057
- y(null), e < -48 ? x(b + 1) : e > We && x(b - 1);
1057
+ y(null), e < -48 ? x(b + 1) : e > Ge && x(b - 1);
1058
1058
  };
1059
1059
  return /* @__PURE__ */ d("div", {
1060
1060
  ref: f,
@@ -1102,7 +1102,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1102
1102
  type: "button",
1103
1103
  "aria-label": "Previous slide",
1104
1104
  style: {
1105
- ...He,
1105
+ ...Ue,
1106
1106
  left: 12
1107
1107
  },
1108
1108
  onClick: () => x(b - 1),
@@ -1112,7 +1112,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1112
1112
  type: "button",
1113
1113
  "aria-label": "Next slide",
1114
1114
  style: {
1115
- ...He,
1115
+ ...Ue,
1116
1116
  right: 12
1117
1117
  },
1118
1118
  onClick: () => x(b + 1),
@@ -1146,7 +1146,7 @@ function Ge({ count: e, renderSlide: t, autoplay: n = !0, interval: r = 5, heigh
1146
1146
  ] })]
1147
1147
  });
1148
1148
  }
1149
- var Ke = (e, t) => ({
1149
+ var qe = (e, t) => ({
1150
1150
  position: "absolute",
1151
1151
  inset: 0,
1152
1152
  backgroundImage: e ? `url(${e})` : "none",
@@ -1154,18 +1154,18 @@ var Ke = (e, t) => ({
1154
1154
  backgroundSize: "cover",
1155
1155
  backgroundPosition: "center"
1156
1156
  });
1157
- function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1158
- return e.length ? /* @__PURE__ */ u(Ge, {
1157
+ function Je({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "left", ...r }) {
1158
+ return e.length ? /* @__PURE__ */ u(Ke, {
1159
1159
  ...r,
1160
1160
  count: e.length,
1161
1161
  renderSlide: (r) => {
1162
1162
  let i = e[r];
1163
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ke(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1163
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: qe(i.image) }), (i.title || i.text) && /* @__PURE__ */ d("div", {
1164
1164
  style: {
1165
1165
  position: "absolute",
1166
1166
  color: "#fff",
1167
1167
  textAlign: n,
1168
- ...Ue[t] ?? Ue.bottom
1168
+ ...We[t] ?? We.bottom
1169
1169
  },
1170
1170
  children: [i.title && /* @__PURE__ */ u("div", {
1171
1171
  style: {
@@ -1185,13 +1185,13 @@ function qe({ slides: e = [], captionPosition: t = "bottom", captionAlign: n = "
1185
1185
  }
1186
1186
  }) : null;
1187
1187
  }
1188
- function Je({ slides: e = [], linked: t, ...n }) {
1189
- return e.length ? /* @__PURE__ */ u(Ge, {
1188
+ function Ye({ slides: e = [], linked: t, ...n }) {
1189
+ return e.length ? /* @__PURE__ */ u(Ke, {
1190
1190
  ...n,
1191
1191
  count: e.length,
1192
1192
  renderSlide: (n) => {
1193
1193
  let r = e[n];
1194
- return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: Ke(r.image, r.color) }), /* @__PURE__ */ u("div", {
1194
+ return /* @__PURE__ */ d(l, { children: [/* @__PURE__ */ u("div", { style: qe(r.image, r.color) }), /* @__PURE__ */ u("div", {
1195
1195
  style: {
1196
1196
  position: "absolute",
1197
1197
  inset: 0,
@@ -1203,7 +1203,7 @@ function Je({ slides: e = [], linked: t, ...n }) {
1203
1203
  }
1204
1204
  }) : null;
1205
1205
  }
1206
- var Ye = {
1206
+ var Y = {
1207
1207
  color: "inherit",
1208
1208
  textDecoration: "none",
1209
1209
  fontSize: 14,
@@ -1225,7 +1225,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1225
1225
  let w = p === "hamburger" || p === "auto" && v, T = (e, t) => /* @__PURE__ */ d("a", {
1226
1226
  href: e.href || "#",
1227
1227
  style: {
1228
- ...Ye,
1228
+ ...Y,
1229
1229
  display: "block",
1230
1230
  ...t
1231
1231
  },
@@ -1313,7 +1313,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1313
1313
  let t = e.children ?? [];
1314
1314
  if (!t.length) return /* @__PURE__ */ u("a", {
1315
1315
  href: e.href || "#",
1316
- style: Ye,
1316
+ style: Y,
1317
1317
  children: e.label
1318
1318
  }, e.key);
1319
1319
  let n = e.type === "mega";
@@ -1327,7 +1327,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1327
1327
  children: [/* @__PURE__ */ d("a", {
1328
1328
  href: e.href || "#",
1329
1329
  style: {
1330
- ...Ye,
1330
+ ...Y,
1331
1331
  cursor: "pointer"
1332
1332
  },
1333
1333
  children: [
@@ -1388,7 +1388,7 @@ function Ze({ brand: t, logo: n, brandHref: r, brandTarget: a, links: o = [], st
1388
1388
  children: o.map((t) => /* @__PURE__ */ d(e, { children: [/* @__PURE__ */ u("a", {
1389
1389
  href: t.href || "#",
1390
1390
  style: {
1391
- ...Ye,
1391
+ ...Y,
1392
1392
  padding: "10px 4px",
1393
1393
  fontWeight: (t.children ?? []).length ? 600 : 400,
1394
1394
  opacity: 1
@@ -1601,7 +1601,7 @@ function ot({ field: e, value: t, onChange: n, inert: r, values: i }) {
1601
1601
  borderRadius: 8,
1602
1602
  display: "block"
1603
1603
  }
1604
- }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Le, {
1604
+ }) : null : e.type === "video" ? e.src ? /youtube\.com|youtu\.be|vimeo\.com/i.test(e.src) ? /* @__PURE__ */ u(Re, {
1605
1605
  url: e.src,
1606
1606
  style: { width: "100%" }
1607
1607
  }) : /* @__PURE__ */ u("video", {
@@ -1794,7 +1794,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1794
1794
  disabled: g || void 0,
1795
1795
  onClick: () => k(F - 1),
1796
1796
  style: {
1797
- ...J,
1797
+ ...q,
1798
1798
  background: "transparent",
1799
1799
  color: "inherit",
1800
1800
  border: 0,
@@ -1807,7 +1807,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1807
1807
  disabled: g || ee.length > 0,
1808
1808
  onClick: () => k(F + 1),
1809
1809
  style: {
1810
- ...J,
1810
+ ...q,
1811
1811
  border: 0,
1812
1812
  padding: "10px 22px",
1813
1813
  borderRadius: 8,
@@ -1821,7 +1821,7 @@ function st({ style: e, action: t, method: n, name: a, enctype: o, formSlug: s,
1821
1821
  type: "submit",
1822
1822
  disabled: g || void 0,
1823
1823
  style: {
1824
- ...J,
1824
+ ...q,
1825
1825
  border: 0,
1826
1826
  padding: "10px 22px",
1827
1827
  borderRadius: 8,
@@ -1945,7 +1945,7 @@ function dt({ text: e, parts: t, style: n, nodeRef: r, linked: i }) {
1945
1945
  ...X,
1946
1946
  ...h(n)
1947
1947
  },
1948
- children: Y(t, e, i)
1948
+ children: J(t, e, i)
1949
1949
  });
1950
1950
  }
1951
1951
  function ft({ type: e = "text", name: t, placeholder: n, required: r, style: i, nodeRef: a, inert: o }) {
@@ -2058,7 +2058,7 @@ function _t({ text: e = "Submit", style: t, nodeRef: n, inert: r }) {
2058
2058
  ref: n,
2059
2059
  type: r ? "button" : "submit",
2060
2060
  style: {
2061
- ...J,
2061
+ ...q,
2062
2062
  border: 0,
2063
2063
  cursor: "pointer",
2064
2064
  alignSelf: "flex-start",
@@ -2134,7 +2134,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2134
2134
  },
2135
2135
  children: O.map((e) => /* @__PURE__ */ u("div", {
2136
2136
  style: { minWidth: 0 },
2137
- children: x.render(p, (t) => le(t, e))
2137
+ children: x.render(p, (t) => ue(t, e))
2138
2138
  }, e.id ?? e?.data?.slug))
2139
2139
  }) : /* @__PURE__ */ u("div", {
2140
2140
  ref: _,
@@ -2144,7 +2144,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2144
2144
  ...h(g)
2145
2145
  },
2146
2146
  children: O.map((e) => {
2147
- 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";
2147
+ 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";
2148
2148
  return /* @__PURE__ */ d("div", {
2149
2149
  style: {
2150
2150
  display: "flex",
@@ -2191,7 +2191,7 @@ function yt({ collection: e, limit: t = 6, layout: n = "grid", columns: a = 3, i
2191
2191
  lineHeight: 1.55,
2192
2192
  opacity: .85
2193
2193
  },
2194
- children: Te(a)
2194
+ children: Ee(a)
2195
2195
  })
2196
2196
  ]
2197
2197
  })]
@@ -2501,7 +2501,7 @@ var Et = (e, t) => {
2501
2501
  return .299 * (r >> 16 & 255) + .587 * (r >> 8 & 255) + .114 * (r & 255) > 150 ? "#111827" : "#ffffff";
2502
2502
  }, Ot = (e) => !!(e?.cv?.trim?.() || e?.photo);
2503
2503
  function kt(e, t = {}) {
2504
- 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);
2504
+ 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);
2505
2505
  return n.map((e) => {
2506
2506
  let n = e.data ?? {}, a = r(n[t.parentField]), o = a && typeof a == "object" ? a.id ?? null : a || null;
2507
2507
  return {
@@ -2846,7 +2846,7 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2846
2846
  x,
2847
2847
  a
2848
2848
  ]), !e.length) return null;
2849
- let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => q(K(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === 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 };
2849
+ let w = Math.max(1, Number(a) || 10), T = n ? f ? b || n.startsWith("api:") ? (b ?? S ?? []).slice((x - 1) * w, x * w) : (S ?? []).slice(0, w) : (b ?? S ?? []).slice(0, w) : null, E = T ? T.map((t) => e.map((e) => K(G(t?.data, e.field)))) : t, D = !!n && !(n && !b && S === 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 };
2850
2850
  return /* @__PURE__ */ u("div", {
2851
2851
  ref: g,
2852
2852
  style: {
@@ -2893,17 +2893,17 @@ function Nt({ columns: e = [], rows: t = [], source: n, limit: a = 10, striped:
2893
2893
  });
2894
2894
  }
2895
2895
  var Pt = {
2896
- PageRoot: ge,
2897
- Section: _e,
2898
- Container: ve,
2899
- Heading: ye,
2900
- TextBlock: Ae,
2901
- ButtonBlock: Ne,
2902
- ImageBlock: Pe,
2903
- Spacer: Be,
2904
- Divider: Ve,
2905
- SliderBlock: qe,
2906
- CanvasSlider: Je,
2896
+ PageRoot: _e,
2897
+ Section: ve,
2898
+ Container: ye,
2899
+ Heading: be,
2900
+ TextBlock: je,
2901
+ ButtonBlock: Pe,
2902
+ ImageBlock: Fe,
2903
+ Spacer: Ve,
2904
+ Divider: He,
2905
+ SliderBlock: Je,
2906
+ CanvasSlider: Ye,
2907
2907
  TabsBlock: Qe,
2908
2908
  QuickStack: vt,
2909
2909
  CollectionList: yt,
@@ -2914,16 +2914,16 @@ var Pt = {
2914
2914
  TableBlock: Nt,
2915
2915
  AccordionBlock: $e,
2916
2916
  NavbarBlock: Ze,
2917
- ListBlock: ke,
2918
- TextSpan: Se,
2919
- QuoteBlock: Oe,
2920
- TextLink: Me,
2921
- RichTextBlock: Ee,
2922
- RichContentBlock: Ee,
2923
- VideoBlock: Fe,
2924
- YouTubeBlock: Le,
2925
- IframeBlock: Re,
2926
- EmbedBlock: ze,
2917
+ ListBlock: Ae,
2918
+ TextSpan: Ce,
2919
+ QuoteBlock: ke,
2920
+ TextLink: Ne,
2921
+ RichTextBlock: De,
2922
+ RichContentBlock: De,
2923
+ VideoBlock: Ie,
2924
+ YouTubeBlock: Re,
2925
+ IframeBlock: ze,
2926
+ EmbedBlock: Be,
2927
2927
  FormBlock: st,
2928
2928
  FormLabel: dt,
2929
2929
  FormInput: ft,
@@ -3095,7 +3095,7 @@ function Bt({ mode: e = "login", redirect: t, emailLabel: n = "Email", passwordL
3095
3095
  type: f ? "button" : "submit",
3096
3096
  disabled: C || void 0,
3097
3097
  style: {
3098
- ...J,
3098
+ ...q,
3099
3099
  border: 0,
3100
3100
  padding: "10px 22px",
3101
3101
  borderRadius: 8,
@@ -3169,7 +3169,7 @@ function Vt({ greeting: e = "Hi", signOutLabel: t = "Sign out", showEmail: n = !
3169
3169
  type: "button",
3170
3170
  onClick: a ? void 0 : f,
3171
3171
  style: {
3172
- ...J,
3172
+ ...q,
3173
3173
  border: 0,
3174
3174
  padding: "8px 16px",
3175
3175
  borderRadius: 8,
@@ -3199,10 +3199,92 @@ var Ht = [Ft], Ut = {
3199
3199
  };
3200
3200
  new Set(Ht.filter((e) => e.ssr === "shell").flatMap((e) => e.keys));
3201
3201
  //#endregion
3202
+ //#region ../ui/src/components/builder/plugins/runtime.js
3203
+ var Wt = /* @__PURE__ */ new Map();
3204
+ function Gt(e) {
3205
+ if (Wt.has(e)) return Wt.get(e);
3206
+ let t = URL.createObjectURL(new Blob([e], { type: "text/javascript" })), n = import(
3207
+ /* @vite-ignore */
3208
+ t
3209
+ ).finally(() => URL.revokeObjectURL(t));
3210
+ return Wt.set(e, n), n;
3211
+ }
3212
+ function Kt(e) {
3213
+ let t = e && typeof e == "object" ? e.builder_plugins : null, n = t && typeof t == "object" ? t.plugins : null;
3214
+ return n && typeof n == "object" ? n : {};
3215
+ }
3216
+ //#endregion
3217
+ //#region ../ui/src/components/builder/plugins/view.jsx
3218
+ async function qt(e, t) {
3219
+ let n = await Gt(e);
3220
+ return (Array.isArray(n?.default?.blocks) ? n.default.blocks : []).find((e) => e?.id === t && typeof e.mount == "function") ?? null;
3221
+ }
3222
+ var Jt = {
3223
+ padding: "10px 12px",
3224
+ border: "1px dashed rgba(148, 163, 184, 0.5)",
3225
+ borderRadius: 8,
3226
+ fontSize: 12,
3227
+ opacity: .6
3228
+ };
3229
+ function Yt({ pluginId: e, blockId: t, props: n, style: a, nodeRef: o }) {
3230
+ let c = r(V), l = Kt(c?.settings)[e], f = s(null), p = s(null), m = {
3231
+ tenant: c?.tenant ?? "",
3232
+ apiUrl: c?.apiUrl ?? "/api",
3233
+ locale: c?.locale ?? "",
3234
+ settings: c?.settings ?? null
3235
+ }, g = s(m);
3236
+ g.current = m;
3237
+ let _ = JSON.stringify(n ?? {});
3238
+ return i(() => {
3239
+ let e = f.current;
3240
+ if (!l?.code || !e) return;
3241
+ let n = !0;
3242
+ return qt(l.code, t).then((e) => {
3243
+ if (!(!n || !e || !f.current)) {
3244
+ p.current = e;
3245
+ try {
3246
+ e.mount(f.current, JSON.parse(_), g.current);
3247
+ } catch {
3248
+ p.current = null;
3249
+ }
3250
+ }
3251
+ }).catch(() => {}), () => {
3252
+ n = !1;
3253
+ let t = p.current;
3254
+ p.current = null;
3255
+ try {
3256
+ t?.unmount?.(e);
3257
+ } catch {}
3258
+ e && (e.innerHTML = "");
3259
+ };
3260
+ }, [l?.code, t]), i(() => {
3261
+ let e = p.current, t = f.current;
3262
+ if (!(!e || !t)) try {
3263
+ e.update ? e.update(t, JSON.parse(_), g.current) : (e.unmount?.(t), t.innerHTML = "", e.mount(t, JSON.parse(_), g.current));
3264
+ } catch {}
3265
+ }, [_]), l ? /* @__PURE__ */ u("div", {
3266
+ ref: o,
3267
+ style: h(a),
3268
+ children: /* @__PURE__ */ u("div", { ref: f })
3269
+ }) : /* @__PURE__ */ d("div", {
3270
+ ref: o,
3271
+ style: {
3272
+ ...Jt,
3273
+ ...h(a)
3274
+ },
3275
+ children: [
3276
+ "Plugin “",
3277
+ e,
3278
+ "” is not installed"
3279
+ ]
3280
+ });
3281
+ }
3282
+ //#endregion
3202
3283
  //#region ../ui/src/components/builder/render.jsx
3203
- var Wt = {
3284
+ var Xt = {
3204
3285
  ...Pt,
3205
- ...Ut
3286
+ ...Ut,
3287
+ PluginBlock: Yt
3206
3288
  };
3207
3289
  function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3208
3290
  let o = n[t];
@@ -3214,7 +3296,7 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3214
3296
  let c = new Set(i).add(n);
3215
3297
  return /* @__PURE__ */ u(e, { children: $(s.template.rootId, s.template.nodes, r, c, a) }, t);
3216
3298
  }
3217
- let l = Wt[s];
3299
+ let l = Xt[s];
3218
3300
  if (!l) return null;
3219
3301
  let d = (o.nodes ?? []).map((e) => $(e, n, r, i, a)).filter(Boolean), f = Object.entries(o.linkedNodes ?? {}), p = f.length ? Object.fromEntries(f.map(([e, t]) => [e, $(t, n, r, i)])) : void 0, m = /* @__PURE__ */ u(l, {
3220
3302
  ...c,
@@ -3232,8 +3314,8 @@ function $(t, n, r, i = /* @__PURE__ */ new Set(), a = void 0) {
3232
3314
  }
3233
3315
  //#endregion
3234
3316
  //#region ../ui/src/components/builder/PageRenderer.jsx
3235
- var Gt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3236
- function Kt({ 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: g }) {
3317
+ var Zt = (e) => Object.entries(e).map(([e, t]) => `${e}: ${t};`).join(" ");
3318
+ function Qt({ 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: g }) {
3237
3319
  let _ = s?.js?.trim();
3238
3320
  if (i(() => {
3239
3321
  if (!_) return;
@@ -3309,8 +3391,8 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3309
3391
  ...a
3310
3392
  },
3311
3393
  children: [
3312
- /* @__PURE__ */ u("style", { children: `.webim-page { ${Gt(F(k.light))} }
3313
- @media (prefers-color-scheme: dark) { .webim-page { ${Gt(F(k.dark))} } }` }),
3394
+ /* @__PURE__ */ u("style", { children: `.webim-page { ${Zt(F(k.light))} }
3395
+ @media (prefers-color-scheme: dark) { .webim-page { ${Zt(F(k.dark))} } }` }),
3314
3396
  O,
3315
3397
  /* @__PURE__ */ u("style", { children: y }),
3316
3398
  C && /* @__PURE__ */ u("style", { children: C }),
@@ -3326,8 +3408,8 @@ function Kt({ blocks: e, theme: t, components: n, mode: r = "auto", style: a, cu
3326
3408
  }
3327
3409
  //#endregion
3328
3410
  //#region src/WebimContent.jsx
3329
- function qt({ bundle: e, mode: t = "auto", style: n }) {
3330
- return e?.blocks?.ROOT ? /* @__PURE__ */ u(Kt, {
3411
+ function $t({ bundle: e, mode: t = "auto", style: n }) {
3412
+ return e?.blocks?.ROOT ? /* @__PURE__ */ u(Qt, {
3331
3413
  blocks: e.blocks,
3332
3414
  theme: e.theme,
3333
3415
  components: e.components,
@@ -3344,7 +3426,7 @@ function qt({ bundle: e, mode: t = "auto", style: n }) {
3344
3426
  }
3345
3427
  //#endregion
3346
3428
  //#region src/WebimPage.jsx
3347
- function Jt({ 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 }) {
3429
+ function en({ 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 }) {
3348
3430
  let [g, _] = c({ status: "loading" }), v = s({
3349
3431
  onLoad: m,
3350
3432
  onError: h
@@ -3381,11 +3463,11 @@ function Jt({ apiUrl: e, tenant: t, slug: n, locale: r, preview: a, token: o, mo
3381
3463
  r,
3382
3464
  a,
3383
3465
  o
3384
- ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u(qt, {
3466
+ ]), g.status === "loading" ? f : g.status === "error" ? typeof p == "function" ? p(g.error) : p : /* @__PURE__ */ u($t, {
3385
3467
  bundle: g.bundle,
3386
3468
  mode: l,
3387
3469
  style: d
3388
3470
  });
3389
3471
  }
3390
3472
  //#endregion
3391
- export { Kt as PageRenderer, qt as WebimContent, Jt as WebimPage, z as fetchPage, Te as renderRichContent, L as resolveTheme };
3473
+ export { Qt as PageRenderer, $t as WebimContent, en as WebimPage, z as fetchPage, Ee as renderRichContent, L as resolveTheme };