@charisol/plexo-sdk 1.1.15 → 1.2.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.
Files changed (36) hide show
  1. package/dist/PlexoRenderer.d.ts +8 -0
  2. package/dist/{compiler-TjBEKCfw.js → compiler-nmaKKdLq.js} +245 -239
  3. package/dist/compiler.js +2 -2
  4. package/dist/compilerClient-DW7b0Ifk.js +215 -0
  5. package/dist/compilerClient.js +2 -168
  6. package/dist/components/CodeViewer.d.ts +7 -0
  7. package/dist/components/editor/frame/AccordionHeaderOverlay.d.ts +15 -0
  8. package/dist/components/editor/frame/CompiledCanvasEditorOverlay.d.ts +30 -0
  9. package/dist/components/editor/frame/CompiledCanvasFrame.d.ts +16 -0
  10. package/dist/components/editor/frame/DndOverlayNode.d.ts +59 -0
  11. package/dist/components/editor/frame/FrameTextToolbar.d.ts +29 -0
  12. package/dist/components/editor/frame/TableCellOverlay.d.ts +23 -0
  13. package/dist/components/editor/frame/useAccordionHeaderRects.d.ts +21 -0
  14. package/dist/components/editor/frame/useCanvasEngine.d.ts +25 -0
  15. package/dist/components/editor/frame/useCompiledCanvasHtml.d.ts +41 -0
  16. package/dist/components/editor/frame/useFrameNodeRects.d.ts +18 -0
  17. package/dist/components/editor/frame/useFrameTextEditing.d.ts +47 -0
  18. package/dist/components/editor/frame/useMeasuredFrameNodes.d.ts +13 -0
  19. package/dist/components/editor/frame/useTableCellRects.d.ts +29 -0
  20. package/dist/{iconSvgStatic-CA1z-vnh.js → iconSvgStatic-CGue7nyp.js} +81 -47
  21. package/dist/index.d.ts +1 -0
  22. package/dist/index.js +47631 -47240
  23. package/dist/mjmlBrowser-DFgIYJ2a.js +39283 -0
  24. package/dist/plexo-sdk.css +1 -1
  25. package/dist/sanitize.js +2 -0
  26. package/dist/sanitizeCompiledHtml-C_sPjL3B.js +5079 -0
  27. package/dist/utilities/compiler.d.ts +4 -1
  28. package/dist/utilities/compilerClient.d.ts +4 -1
  29. package/dist/utilities/elementResolvers.d.ts +27 -7
  30. package/dist/utilities/instrumentation.d.ts +54 -0
  31. package/dist/utilities/mjmlBrowser.d.ts +19 -0
  32. package/dist/utilities/playground.helpers.d.ts +0 -18
  33. package/dist/utilities/playground.interfaces.d.ts +13 -0
  34. package/dist/utilities/sanitizeCompiledHtml.d.ts +10 -0
  35. package/dist/utilities/useApiKeyValidation.d.ts +6 -0
  36. package/package.json +17 -2
@@ -1,6 +1,6 @@
1
- import { a as e, b as t, c as n, d as r, f as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, v as h } from "./iconSvgStatic-CA1z-vnh.js";
1
+ import { a as e, c as t, d as n, f as r, g as i, h as a, i as o, l as s, m as c, n as l, o as u, p as d, r as f, s as p, t as m, u as h, x as g, y as _ } from "./iconSvgStatic-CGue7nyp.js";
2
2
  //#region src/utilities/playground.constants.ts
3
- var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _ = [
3
+ var v = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, y = [
4
4
  {
5
5
  id: "all",
6
6
  label: "All sources"
@@ -17,7 +17,7 @@ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _
17
17
  id: "pixabay",
18
18
  label: "Pixabay"
19
19
  }
20
- ], v = [
20
+ ], b = [
21
21
  {
22
22
  id: "surface-book",
23
23
  label: "Surface Book",
@@ -84,10 +84,10 @@ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _
84
84
  width: 375,
85
85
  category: "mobile"
86
86
  }
87
- ], y = 1280, b = Object.entries(h).map(([e, t]) => ({
87
+ ], x = 1280, S = Object.entries(_).map(([e, t]) => ({
88
88
  id: e,
89
89
  label: t.label
90
- })), x = [
90
+ })), C = [
91
91
  {
92
92
  label: "Text",
93
93
  value: "text"
@@ -120,7 +120,7 @@ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _
120
120
  label: "Checkbox",
121
121
  value: "checkbox"
122
122
  }
123
- ], S = [
123
+ ], w = [
124
124
  {
125
125
  label: "1 Column",
126
126
  widths: ["100%"],
@@ -169,7 +169,7 @@ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _
169
169
  "25%"
170
170
  ]
171
171
  }
172
- ], C = [
172
+ ], T = [
173
173
  {
174
174
  label: "Roboto",
175
175
  value: "'Roboto', sans-serif",
@@ -570,8 +570,8 @@ var g = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, _
570
570
  value: "'Great Vibes', cursive",
571
571
  style: "handwriting"
572
572
  }
573
- ], w = new Map(C.map((e) => [e.value, e.label]));
574
- function T(e, t = []) {
573
+ ], E = new Map(T.map((e) => [e.value, e.label]));
574
+ function D(e, t = []) {
575
575
  let n = /* @__PURE__ */ new Set(), r = (e) => {
576
576
  if (!e) return;
577
577
  let t = Array.isArray(e.columns) ? e.columns : [];
@@ -589,17 +589,17 @@ function T(e, t = []) {
589
589
  for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
590
590
  return n;
591
591
  }
592
- function E(e) {
592
+ function O(e) {
593
593
  let t = /* @__PURE__ */ new Set();
594
594
  for (let n of e) {
595
- let e = w.get(n);
595
+ let e = E.get(n);
596
596
  e && t.add(e);
597
597
  }
598
598
  return t.size === 0 ? null : `https://fonts.googleapis.com/css?family=${Array.from(t).map((e) => `${encodeURIComponent(e).replace(/%20/g, "+")}:400,700`).join("|")}&display=swap`;
599
599
  }
600
600
  //#endregion
601
601
  //#region src/utilities/responsiveDefaults.ts
602
- var D = {
602
+ var k = {
603
603
  tablet: {
604
604
  thresholdPx: 24,
605
605
  scale: .85,
@@ -610,7 +610,7 @@ var D = {
610
610
  scale: .7,
611
611
  floorPx: 14
612
612
  }
613
- }, ee = {
613
+ }, A = {
614
614
  tablet: {
615
615
  thresholdPx: 320,
616
616
  scale: .8,
@@ -621,7 +621,7 @@ var D = {
621
621
  scale: .55,
622
622
  floorPx: 140
623
623
  }
624
- }, O = {
624
+ }, j = {
625
625
  tablet: {
626
626
  thresholdPx: 48,
627
627
  scale: .75,
@@ -632,7 +632,7 @@ var D = {
632
632
  scale: .55,
633
633
  floorPx: 16
634
634
  }
635
- }, k = {
635
+ }, M = {
636
636
  tablet: {
637
637
  thresholdPx: 500,
638
638
  scale: 1,
@@ -643,11 +643,11 @@ var D = {
643
643
  scale: 1,
644
644
  floorPx: 0
645
645
  }
646
- }, A = ["fontSize"], j = [
646
+ }, ee = ["fontSize"], te = [
647
647
  "height",
648
648
  "minHeight",
649
649
  "maxHeight"
650
- ], M = [
650
+ ], N = [
651
651
  "padding",
652
652
  "paddingTop",
653
653
  "paddingBottom",
@@ -656,8 +656,8 @@ var D = {
656
656
  "margin",
657
657
  "marginTop",
658
658
  "marginBottom"
659
- ], N = ["width", "maxWidth"];
660
- function P(e) {
659
+ ], P = ["width", "maxWidth"];
660
+ function F(e) {
661
661
  if (typeof e == "number" && Number.isFinite(e)) return e;
662
662
  if (typeof e != "string") return null;
663
663
  let t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
@@ -665,48 +665,48 @@ function P(e) {
665
665
  let n = parseFloat(t[1]);
666
666
  return Number.isFinite(n) ? n : null;
667
667
  }
668
- function F(e, t) {
668
+ function I(e, t) {
669
669
  return e < t.thresholdPx ? null : Math.max(Math.round(e * t.scale), t.floorPx);
670
670
  }
671
- function I(e, t) {
671
+ function L(e, t) {
672
672
  if (!e || typeof e != "object") return {};
673
673
  let n = {};
674
- for (let r of A) {
675
- let i = P(e[r]);
674
+ for (let r of ee) {
675
+ let i = F(e[r]);
676
676
  if (i === null) continue;
677
- let a = F(i, D[t]);
677
+ let a = I(i, k[t]);
678
678
  a !== null && (n[r] = `${a}px`);
679
679
  }
680
- for (let r of j) {
681
- let i = P(e[r]);
680
+ for (let r of te) {
681
+ let i = F(e[r]);
682
682
  if (i === null) continue;
683
- let a = F(i, ee[t]);
683
+ let a = I(i, A[t]);
684
684
  a !== null && (n[r] = `${a}px`);
685
685
  }
686
- for (let r of M) {
687
- let i = P(e[r]);
686
+ for (let r of N) {
687
+ let i = F(e[r]);
688
688
  if (i === null) continue;
689
- let a = F(i, O[t]);
689
+ let a = I(i, j[t]);
690
690
  a !== null && (n[r] = `${a}px`);
691
691
  }
692
- for (let r of N) {
693
- let i = P(e[r]);
694
- i !== null && i >= k[t].thresholdPx && (n[r] = "100%");
692
+ for (let r of P) {
693
+ let i = F(e[r]);
694
+ i !== null && i >= M[t].thresholdPx && (n[r] = "100%");
695
695
  }
696
696
  return n;
697
697
  }
698
- function L(e, t, n) {
698
+ function R(e, t, n) {
699
699
  let r = e || {};
700
700
  return n ? {
701
701
  ...r,
702
- ...I(r, n),
702
+ ...L(r, n),
703
703
  ...t || {}
704
704
  } : r;
705
705
  }
706
706
  //#endregion
707
707
  //#region src/utilities/compiler.ts
708
- var R = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
709
- function z(e) {
708
+ var z = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif";
709
+ function B(e) {
710
710
  if (!e || typeof e != "object") return null;
711
711
  if (Array.isArray(e.columns) && e.columns.length > 0) return e;
712
712
  let t = (e.type || "").toLowerCase(), n = e.props || e.content || e.attributes || e.data || e.payload || e, r = e.style || {};
@@ -960,7 +960,7 @@ function z(e) {
960
960
  }
961
961
  }
962
962
  }
963
- var B = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
963
+ var V = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
964
964
  let n = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t;
965
965
  return typeof t == "number" && [
966
966
  "padding",
@@ -971,25 +971,25 @@ var B = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
971
971
  "width",
972
972
  "height"
973
973
  ].some((t) => e.toLowerCase().includes(t)) && (r = `${t}px`), `${n}: ${r};`;
974
- }).join(" "), V = (e = {}) => B(e).replace(/;(\s|$)/g, " !important;$1");
975
- function H(e) {
974
+ }).join(" "), H = (e = {}) => V(e).replace(/;(\s|$)/g, " !important;$1");
975
+ function U(e) {
976
976
  if (typeof e != "string") return !1;
977
977
  let t = e.toLowerCase();
978
978
  return t.includes("javascript:") || t.includes("vbscript:") || t.includes("expression") || t.includes("url(") || t.includes("@import") || t.includes("-moz-binding") || t.includes("behavior") || t.includes("</style") || /\\/.test(e);
979
979
  }
980
- function U(e, t, n, r, i) {
980
+ function W(e, t, n, r, i) {
981
981
  let a = {
982
- ...I(n, r),
982
+ ...L(n, r),
983
983
  ...i || {}
984
984
  };
985
- for (let e of Object.keys(a)) H(a[e]) && delete a[e];
985
+ for (let e of Object.keys(a)) U(a[e]) && delete a[e];
986
986
  if (Object.keys(a).length === 0) return;
987
- let o = V(a);
987
+ let o = H(a);
988
988
  if (!o) return;
989
989
  let s = String(t).replace(/["\\]/g, "");
990
990
  e[r].push(`[data-plexo-id="${s}"] { ${o} }`);
991
991
  }
992
- function W(e, t) {
992
+ function G(e, t) {
993
993
  if (e.type !== "menu" || !t || t.textAlign === void 0) return t;
994
994
  let n = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
995
995
  return {
@@ -997,7 +997,7 @@ function W(e, t) {
997
997
  justifyContent: n
998
998
  };
999
999
  }
1000
- var G = () => ({
1000
+ var K = () => ({
1001
1001
  backgroundColor: "#ffffff",
1002
1002
  borderRadius: "20px",
1003
1003
  width: "100%",
@@ -1020,11 +1020,11 @@ var G = () => ({
1020
1020
  buttonPaddingRight: "14px",
1021
1021
  buttonFontSize: "13px",
1022
1022
  buttonFontWeight: "700"
1023
- }), K = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), q = (e, t) => {
1023
+ }), q = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), J = (e, t) => {
1024
1024
  if (typeof t != "string") return "";
1025
1025
  let n = t.trim();
1026
- return n ? ` ${e}="${K(n)}"` : "";
1027
- }, J = [
1026
+ return n ? ` ${e}="${q(n)}"` : "";
1027
+ }, Y = [
1028
1028
  "fieldSpacing",
1029
1029
  "buttonBackgroundColor",
1030
1030
  "buttonTextColor",
@@ -1044,9 +1044,9 @@ var G = () => ({
1044
1044
  "buttonWidth",
1045
1045
  "buttonHeight",
1046
1046
  "buttonAlign"
1047
- ], Y = (e) => {
1047
+ ], ne = (e) => {
1048
1048
  if (!e || typeof e != "object") return "";
1049
- let t = e.kind || "text", n = K(e.name || e.label || "field"), r = e.required ? " required" : "", i = B({
1049
+ let t = e.kind || "text", n = q(e.name || e.id || "field"), r = e.required ? " required" : "", i = V({
1050
1050
  fontSize: e.fontSize || "13px",
1051
1051
  borderRadius: e.borderRadius || "12px",
1052
1052
  borderWidth: e.borderWidth || "1px",
@@ -1054,19 +1054,19 @@ var G = () => ({
1054
1054
  borderStyle: "solid",
1055
1055
  color: e.inputTextColor
1056
1056
  }), a = e.showLabel === !1 ? "" : `<label style="display: block; margin-bottom: 4px; font-size: ${e.fontSize || "12px"}; font-weight: ${e.labelFontWeight || "700"}; color: ${e.labelColor || "inherit"};">${e.label || ""}${e.required ? " <span style=\"color:#e11d48;\">*</span>" : ""}</label>`;
1057
- return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${K(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${K(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
1057
+ return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${q(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}></textarea>` : t === "select" ? `${a}<select name="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r}>${(Array.isArray(e.options) ? e.options : []).map((e) => `<option value="${q(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>` : t === "radio" || t === "checkbox" ? `${a}<div style="display: flex; flex-wrap: wrap; gap: 8px;">${(Array.isArray(e.options) && e.options.length > 0 ? e.options : [{
1058
1058
  label: e.label || "Option",
1059
1059
  value: e.name || "option"
1060
- }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${K(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${K(t)}" name="${n}" placeholder="${K(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
1060
+ }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${q(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${q(t)}" name="${n}" placeholder="${q(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
1061
1061
  };
1062
- function X(e, t, n) {
1062
+ function re(e, t, n) {
1063
1063
  if (e === "none") return "";
1064
- let r = K(t);
1064
+ let r = q(t);
1065
1065
  return e === "plus" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; font-weight: 700; color: ${r};">${n ? "−" : "+"}</span>` : e === "arrow" ? `<span data-acc-icon style="font-size: 14px; line-height: 1; display: inline-block; color: ${r}; transform: ${n ? "rotate(90deg)" : "none"}; transition: transform 0.2s ease;">›</span>` : `<svg data-acc-icon width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="${r}" stroke-width="2.5" style="flex-shrink: 0; transform: ${n ? "rotate(180deg)" : "none"}; transition: transform 0.2s ease;"><path stroke-linecap="round" stroke-linejoin="round" d="M19.5 8.25l-7.5 7.5-7.5-7.5"/></svg>`;
1066
1066
  }
1067
- function Z(e, t, n) {
1068
- return e.map((r, i) => {
1069
- let a = i === e.length - 1, o = B({ borderBottom: n.showDividers && !a ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), s = B({
1067
+ function X(e, t, n, r, i = []) {
1068
+ return e.map((a, o) => {
1069
+ let s = [...i, o], c = o === e.length - 1, l = V({ borderBottom: n.showDividers && !c ? `1px solid ${t.dividerColor || "#e2e8f0"}` : void 0 }), u = V({
1070
1070
  display: "flex",
1071
1071
  alignItems: "center",
1072
1072
  gap: "8px",
@@ -1075,99 +1075,99 @@ function Z(e, t, n) {
1075
1075
  textAlign: "left",
1076
1076
  flexDirection: n.iconOnLeft ? "row-reverse" : "row",
1077
1077
  padding: t.padding || "14px",
1078
- backgroundColor: r.defaultOpen ? t.headerActiveBackgroundColor || t.headerBackgroundColor || "#ffffff" : t.headerBackgroundColor || "#ffffff",
1079
- color: r.defaultOpen ? t.headerActiveTextColor || t.headerTextColor || "#0f172a" : t.headerTextColor || "#0f172a",
1078
+ backgroundColor: a.defaultOpen ? t.headerActiveBackgroundColor || t.headerBackgroundColor || "#ffffff" : t.headerBackgroundColor || "#ffffff",
1079
+ color: a.defaultOpen ? t.headerActiveTextColor || t.headerTextColor || "#0f172a" : t.headerTextColor || "#0f172a",
1080
1080
  fontSize: t.headerFontSize || "14px",
1081
1081
  fontWeight: t.headerFontWeight || 600,
1082
1082
  fontFamily: t.headerFontFamily,
1083
1083
  border: "none",
1084
1084
  font: "inherit",
1085
1085
  background: void 0
1086
- }), c = B({
1086
+ }), d = V({
1087
1087
  display: "grid",
1088
- gridTemplateRows: r.defaultOpen ? "1fr" : "0fr",
1088
+ gridTemplateRows: a.defaultOpen ? "1fr" : "0fr",
1089
1089
  transition: n.animated ? "grid-template-rows 0.25s ease" : void 0,
1090
1090
  backgroundColor: t.contentBackgroundColor || "#ffffff"
1091
- }), l = B({
1091
+ }), f = V({
1092
1092
  padding: t.contentPadding || "14px",
1093
1093
  color: t.contentTextColor || "#475569",
1094
1094
  fontSize: t.contentFontSize || "13px",
1095
1095
  whiteSpace: "pre-wrap"
1096
- }), u = X(n.iconStyle, t.iconColor || "#64748b", !!r.defaultOpen), d = K(r.title), f = K(r.content), p = r.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${Z(r.children, t, n)}</div>` : "";
1097
- return `<div class="plexo-acc-item" style="${o}"><button type="button" data-acc-header data-acc-open="${r.defaultOpen ? "1" : "0"}" style="${s}"><span style="flex: 1;">${d}</span>${u}</button><div data-acc-panel style="${c}"><div style="overflow: hidden;"><div style="${l}">${f}${p}</div></div></div></div>`;
1096
+ }), p = re(n.iconStyle, t.iconColor || "#64748b", !!a.defaultOpen), m = q(a.title), h = q(a.content), g = a.children.length ? `<div class="plexo-acc-group" style="margin-top: 10px;">${X(a.children, t, n, r, s)}</div>` : "";
1097
+ return `<div class="plexo-acc-item" style="${l}"><button type="button"${` data-plexo-acc-item="${q(r)}|${s.join(".")}"`} data-acc-header data-acc-open="${a.defaultOpen ? "1" : "0"}" style="${u}"><span style="flex: 1;">${m}</span>${p}</button><div data-acc-panel style="${d}"><div style="overflow: hidden;"><div style="${f}">${h}${g}</div></div></div></div>`;
1098
1098
  }).join("");
1099
1099
  }
1100
- function te(e) {
1100
+ function ie(e) {
1101
1101
  return `<!-- Unsupported block ${String(e)} -->`;
1102
1102
  }
1103
- var ne = (t) => {
1104
- if (!t || typeof t != "object") return "";
1105
- let h = t.style || {}, g = B(t.type === "form_container" ? {
1106
- ...G(),
1107
- ...h
1108
- } : h), _ = t.attributes || {}, v = ` data-plexo-id="${K(t.id)}"`;
1109
- switch (t.type) {
1110
- case "heading": return `<h2${v} style="margin-top: 0; margin-bottom: 8px; ${g}">${_.text || "Heading"}</h2>`;
1111
- case "paragraph": return `<p${v} style="margin-top: 0; margin-bottom: 12px; ${g}">${_.text || "Paragraph text content."}</p>`;
1112
- case "text": return `<div${v} style="${g}">${_.text || ""}</div>`;
1103
+ var ae = (g) => {
1104
+ if (!g || typeof g != "object") return "";
1105
+ let _ = g.style || {}, v = g.type === "heading" || g.type === "paragraph" || g.type === "text", y = v ? c(g).autoWidth : !1, b = y ? Object.fromEntries(Object.entries(_).filter(([e]) => e !== "width")) : _, x = V(g.type === "form_container" ? {
1106
+ ...K(),
1107
+ ..._
1108
+ } : b), S = g.attributes || {}, C = ` data-plexo-id="${q(g.id)}"`, w = (e) => y ? `<div style="text-align: ${_.textAlign || "left"};">${e}</div>` : e, T = `${y ? "display: inline-block; " : ""}${v && _.height ? "overflow: hidden; " : ""}`;
1109
+ switch (g.type) {
1110
+ case "heading": return w(`<h2${C} style="margin-top: 0; margin-bottom: 8px; ${T}${x}">${S.text || "Heading"}</h2>`);
1111
+ case "paragraph": return w(`<p${C} style="margin-top: 0; margin-bottom: 12px; ${T}${x}">${S.text || "Paragraph text content."}</p>`);
1112
+ case "text": return w(`<div${C} style="${T}${x}">${S.text || ""}</div>`);
1113
1113
  case "button": {
1114
- let n = e(t), r = B({
1115
- ...h,
1116
- width: n.width,
1117
- height: n.height
1114
+ let e = u(g), t = V({
1115
+ ..._,
1116
+ width: e.width,
1117
+ height: e.height
1118
1118
  });
1119
- return `<div style="text-align: ${h.textAlign || "center"};"><a${v} href="${_.href || "#"}" target="${_.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${r}">${_.text || "Button"}</a></div>`;
1119
+ return `<div style="text-align: ${_.textAlign || "center"};"><a${C} href="${S.href || "#"}" target="${S.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${t}">${S.text || "Button"}</a></div>`;
1120
1120
  }
1121
1121
  case "image": {
1122
- let e = s(t), n = h.textAlign === "center" ? "margin: 0 auto; display: block;" : h.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = B({
1123
- ...h,
1122
+ let e = h(g), t = _.textAlign === "center" ? "margin: 0 auto; display: block;" : _.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", n = V({
1123
+ ..._,
1124
1124
  width: e.width,
1125
1125
  height: e.height
1126
1126
  });
1127
- return `<img${v} src="${_.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${_.alt || ""}" style="${r} ${n}" />`;
1127
+ return `<img${C} src="${S.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${S.alt || ""}" style="${n} ${t}" />`;
1128
1128
  }
1129
- case "divider": return `<hr${v} style="border: 0; border-top: ${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#334155"}; ${g}" />`;
1130
- case "spacer": return `<div${v} style="height: ${h.height || "24px"};"></div>`;
1131
- case "card": return `<div${v} style="${g}">
1132
- <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${_.title || "Card Title"}</h3>
1133
- <p style="margin: 0; color: #94a3b8; font-size: 14px;">${_.description || "Card description."}</p>
1129
+ case "divider": return `<hr${C} style="border: 0; border-top: ${_.borderWidth || "1px"} ${_.borderStyle || "solid"} ${_.borderColor || "#334155"}; ${x}" />`;
1130
+ case "spacer": return `<div${C} style="height: ${_.height || "24px"};"></div>`;
1131
+ case "card": return `<div${C} style="${x}">
1132
+ <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${S.title || "Card Title"}</h3>
1133
+ <p style="margin: 0; color: #94a3b8; font-size: 14px;">${S.description || "Card description."}</p>
1134
1134
  </div>`;
1135
1135
  case "form_container": {
1136
- let e = {
1137
- ...G(),
1138
- ...h
1139
- }, n = {};
1140
- for (let t of Object.keys(e)) J.includes(t) || (n[t] = e[t]);
1141
- n.height = u(t);
1142
- let r = B(n), i = p(Array.isArray(_.fields) ? _.fields : []), a = e.fieldSpacing || "12px", s = i.map((e) => `<div style="margin-bottom: ${a};">${Y(e)}</div>`).join(""), c = _.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", l = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", d = _.buttonAutoHeight === !1 && e.buttonHeight || "auto", f = B({
1143
- backgroundColor: e.buttonBackgroundColor,
1144
- color: e.buttonTextColor,
1145
- borderRadius: e.buttonBorderRadius,
1146
- paddingTop: o(e.buttonPaddingTop, e.buttonPadding, "top", "10px"),
1147
- paddingBottom: o(e.buttonPaddingBottom, e.buttonPadding, "bottom", "10px"),
1148
- paddingLeft: o(e.buttonPaddingLeft, e.buttonPadding, "left", "14px"),
1149
- paddingRight: o(e.buttonPaddingRight, e.buttonPadding, "right", "14px"),
1150
- marginTop: o(e.buttonMarginTop, e.buttonMargin, "top"),
1151
- marginBottom: o(e.buttonMarginBottom, e.buttonMargin, "bottom"),
1152
- marginLeft: o(e.buttonMarginLeft, e.buttonMargin, "left"),
1153
- marginRight: o(e.buttonMarginRight, e.buttonMargin, "right"),
1154
- fontSize: e.buttonFontSize,
1155
- fontWeight: e.buttonFontWeight,
1136
+ let n = {
1137
+ ...K(),
1138
+ ..._
1139
+ }, r = {};
1140
+ for (let e of Object.keys(n)) Y.includes(e) || (r[e] = n[e]);
1141
+ r.height = p(g);
1142
+ let i = V(r), a = l(t(Array.isArray(S.fields) ? S.fields : [])), o = n.fieldSpacing || "12px", s = a.map((e) => `<div style="margin-bottom: ${o};">${ne(e)}</div>`).join(""), c = S.buttonAutoWidth === !1 ? n.buttonWidth || "100%" : "auto", u = n.buttonAlign === "left" ? "flex-start" : n.buttonAlign === "right" ? "flex-end" : "center", d = S.buttonAutoHeight === !1 && n.buttonHeight || "auto", f = V({
1143
+ backgroundColor: n.buttonBackgroundColor,
1144
+ color: n.buttonTextColor,
1145
+ borderRadius: n.buttonBorderRadius,
1146
+ paddingTop: e(n.buttonPaddingTop, n.buttonPadding, "top", "10px"),
1147
+ paddingBottom: e(n.buttonPaddingBottom, n.buttonPadding, "bottom", "10px"),
1148
+ paddingLeft: e(n.buttonPaddingLeft, n.buttonPadding, "left", "14px"),
1149
+ paddingRight: e(n.buttonPaddingRight, n.buttonPadding, "right", "14px"),
1150
+ marginTop: e(n.buttonMarginTop, n.buttonMargin, "top"),
1151
+ marginBottom: e(n.buttonMarginBottom, n.buttonMargin, "bottom"),
1152
+ marginLeft: e(n.buttonMarginLeft, n.buttonMargin, "left"),
1153
+ marginRight: e(n.buttonMarginRight, n.buttonMargin, "right"),
1154
+ fontSize: n.buttonFontSize,
1155
+ fontWeight: n.buttonFontWeight,
1156
1156
  width: c,
1157
1157
  height: d
1158
1158
  });
1159
- return `<form${v} action="${K(_.actionUrl || _.action || "#")}" method="${K(_.method || "POST")}" style="${r}">${s}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${_.submitLabel || "Submit"}</button></div></form>`;
1159
+ return `<form${C} action="${q(S.actionUrl || S.action || "#")}" method="${q(S.method || "POST")}" style="${i}">${s}<div style="display: flex; width: 100%; justify-content: ${u};"><button type="submit" style="border: 0; cursor: pointer; ${f}">${S.submitLabel || "Submit"}</button></div></form>`;
1160
1160
  }
1161
1161
  case "input": {
1162
- let e = _.inputType || _.type || "text", t = K(_.name || _.fieldName || "field"), n = K(_.placeholder || ""), r = _.required ? " required" : "";
1163
- return `<input${v} type="${K(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${r} />`;
1162
+ let e = S.inputType || S.type || "text", t = q(S.name || S.fieldName || "field"), n = q(S.placeholder || ""), r = S.required ? " required" : "";
1163
+ return `<input${C} type="${q(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${x}"${r} />`;
1164
1164
  }
1165
- case "textarea": return `<textarea${v} name="${K(_.name || _.fieldName || "field")}" placeholder="${K(_.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}></textarea>`;
1166
- case "select": return `<select${v} name="${K(_.name || _.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${g}"${_.required ? " required" : ""}>${(Array.isArray(_.options) ? _.options : []).map((e) => `<option value="${K(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1167
- case "html": return `<div${v} style="${B({
1168
- ...h,
1169
- height: n(t, "auto")
1170
- })}">${_.htmlContent || _.text || ""}</div>`;
1165
+ case "textarea": return `<textarea${C} name="${q(S.name || S.fieldName || "field")}" placeholder="${q(S.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${x}"${S.required ? " required" : ""}></textarea>`;
1166
+ case "select": return `<select${C} name="${q(S.name || S.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${x}"${S.required ? " required" : ""}>${(Array.isArray(S.options) ? S.options : []).map((e) => `<option value="${q(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1167
+ case "html": return `<div${C} style="${V({
1168
+ ..._,
1169
+ height: s(g, "auto")
1170
+ })}">${S.htmlContent || S.text || ""}</div>`;
1171
1171
  case "blog_title":
1172
1172
  case "blog_content":
1173
1173
  case "blog_featured_image":
@@ -1176,20 +1176,20 @@ var ne = (t) => {
1176
1176
  case "blog_categories":
1177
1177
  case "blog_comments":
1178
1178
  case "blog_post_list": {
1179
- let e = t.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), n = B(h);
1180
- return `<div${v} data-plexo-blog-${e}="true"${q("data-plexo-blog-prefix", _.prefix)} style="${n}"></div>`;
1179
+ let e = g.type.replace(/^blog_/, "").replace(/_([a-z])/g, (e, t) => t.toUpperCase()), t = V(_);
1180
+ return `<div${C} data-plexo-blog-${e}="true"${J("data-plexo-blog-prefix", S.prefix)} style="${t}"></div>`;
1181
1181
  }
1182
1182
  case "social": {
1183
- let e = i(t), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1184
- return `<div${v} style="${B({
1185
- padding: h.padding,
1186
- margin: h.margin,
1183
+ let e = r(g), t = _.textAlign === "center" ? "center" : _.textAlign === "right" ? "flex-end" : "flex-start";
1184
+ return `<div${C} style="${V({
1185
+ padding: _.padding,
1186
+ margin: _.margin,
1187
1187
  display: "flex",
1188
1188
  flexWrap: "wrap",
1189
- gap: h.iconSpacing || "8px",
1190
- justifyContent: n
1189
+ gap: _.iconSpacing || "8px",
1190
+ justifyContent: t
1191
1191
  })}">${e.map((e) => {
1192
- let t = B({
1192
+ let t = V({
1193
1193
  width: e.size,
1194
1194
  height: e.size,
1195
1195
  padding: "8px",
@@ -1201,150 +1201,153 @@ var ne = (t) => {
1201
1201
  justifyContent: "center",
1202
1202
  overflow: "hidden"
1203
1203
  });
1204
- return `<a href="${K(e.url)}" style="${t} text-decoration: none;">${l(e.provider, e.color)}</a>`;
1204
+ return `<a href="${q(e.url)}" style="${t} text-decoration: none;">${f(e.provider, e.color)}</a>`;
1205
1205
  }).join("")}</div>`;
1206
1206
  }
1207
1207
  case "menu": {
1208
- let e = r(t), n = h.textAlign === "center" ? "center" : h.textAlign === "right" ? "flex-end" : "flex-start";
1209
- return `<div${v} style="${B({
1210
- ...h,
1208
+ let e = n(g), t = _.textAlign === "center" ? "center" : _.textAlign === "right" ? "flex-end" : "flex-start";
1209
+ return `<div${C} style="${V({
1210
+ ..._,
1211
1211
  display: "flex",
1212
1212
  flexWrap: "wrap",
1213
1213
  gap: "16px",
1214
- justifyContent: n
1215
- })}">${e.map((e) => `<a href="${K(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${h.fontWeight || 600};">${K(e.label)}</a>`).join("")}</div>`;
1214
+ justifyContent: t
1215
+ })}">${e.map((e) => `<a href="${q(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${_.fontWeight || 600};">${q(e.label)}</a>`).join("")}</div>`;
1216
1216
  }
1217
1217
  case "icon": {
1218
- let e = h.fontSize || `${_.iconSize || 48}px`, t = h.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(_.iconName, n, t), i = h.textAlign === "right" ? "flex-end" : h.textAlign === "left" ? "flex-start" : "center", a = B({
1219
- padding: h.padding,
1220
- margin: h.margin,
1218
+ let e = _.fontSize || `${S.iconSize || 48}px`, t = _.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = m(S.iconName, n, t), i = _.textAlign === "right" ? "flex-end" : _.textAlign === "left" ? "flex-start" : "center", a = V({
1219
+ padding: _.padding,
1220
+ margin: _.margin,
1221
1221
  display: "flex",
1222
1222
  justifyContent: i
1223
- }), o = typeof _.href == "string" ? _.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1224
- return `<div style="${a}">${o ? `<a${v} href="${K(o)}" target="${_.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${v}>${s}</span>`}</div>`;
1223
+ }), o = typeof S.href == "string" ? S.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1224
+ return `<div style="${a}">${o ? `<a${C} href="${q(o)}" target="${S.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${C}>${s}</span>`}</div>`;
1225
1225
  }
1226
1226
  case "table": {
1227
- let e = d(t), n = `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#cbd5e1"}`, r = (t, r, i) => {
1228
- let a = i ? "th" : "td", o = i ? h.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : h.contentBgColor || "#ffffff", s = i ? h.headerTextColor || "#1e293b" : h.contentTextColor || "#475569", c = i ? h.headerTextAlign || "left" : h.contentTextAlign || "left";
1229
- return `<tr>${t.map((e) => {
1230
- let t = B({
1231
- padding: h.cellPadding || "8px",
1232
- border: n,
1233
- backgroundColor: o,
1234
- color: s,
1235
- textAlign: c,
1236
- lineHeight: h.contentLineHeight,
1237
- letterSpacing: h.contentLetterSpacing,
1238
- fontWeight: i ? "700" : void 0
1239
- });
1240
- return `<${a} style="${t}">${e || "&nbsp;"}</${a}>`;
1227
+ let e = d(g), t = `${_.borderWidth || "1px"} ${_.borderStyle || "solid"} ${_.borderColor || "#cbd5e1"}`, n = (n, r, i, a) => {
1228
+ let o = a ? "th" : "td", s = a ? _.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : _.contentBgColor || "#ffffff", c = a ? _.headerTextColor || "#1e293b" : _.contentTextColor || "#475569", l = a ? _.headerTextAlign || "left" : _.contentTextAlign || "left";
1229
+ return `<tr>${n.map((e, n) => {
1230
+ let r = V({
1231
+ padding: _.cellPadding || "8px",
1232
+ border: t,
1233
+ backgroundColor: s,
1234
+ color: c,
1235
+ textAlign: l,
1236
+ lineHeight: _.contentLineHeight,
1237
+ letterSpacing: _.contentLetterSpacing,
1238
+ fontWeight: a ? "700" : void 0
1239
+ }), u = ` data-plexo-cell="${q(g.id)}|${i}-${n}"`;
1240
+ return `<${o}${u} style="${r}">${e || "&nbsp;"}</${o}>`;
1241
1241
  }).join("")}</tr>`;
1242
- }, i = e.enableHeader && e.cells.length > 0 ? `<thead>${r(e.cells[0], 0, !0)}</thead>` : "", a = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length, s = e.cells.slice(a, Math.max(a, o)).map((e, t) => r(e, t, !1)).join(""), c = e.enableFooter && e.cells.length > a ? `<tfoot>${r(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", l = B({
1242
+ }, r = e.enableHeader && e.cells.length > 0 ? `<thead>${n(e.cells[0], 0, 0, !0)}</thead>` : "", i = +!!e.enableHeader, a = e.enableFooter ? e.cells.length - 1 : e.cells.length, o = e.cells.slice(i, Math.max(i, a)).map((e, t) => n(e, t, i + t, !1)).join(""), s = e.enableFooter && e.cells.length > i ? `<tfoot>${n(e.cells[e.cells.length - 1], e.cells.length - 1, e.cells.length - 1, !1)}</tfoot>` : "", c = V({
1243
1243
  borderCollapse: "collapse",
1244
1244
  width: "100%"
1245
1245
  });
1246
- return `<div${v} style="${B({
1247
- padding: h.padding,
1248
- margin: h.margin,
1246
+ return `<div${C} style="${V({
1247
+ padding: _.padding,
1248
+ margin: _.margin,
1249
1249
  overflowX: "auto"
1250
- })}"><table style="${l}">${i}<tbody>${s}</tbody>${c}</table></div>`;
1250
+ })}"><table style="${c}">${r}<tbody>${o}</tbody>${s}</table></div>`;
1251
1251
  }
1252
1252
  case "video": {
1253
- let e = a(_.videoUrl), t = _.linkType === "email" ? `mailto:${_.href || ""}` : _.href || _.videoUrl || "#", n = _.target || "_blank";
1254
- return `<div${v} style="${B({
1255
- padding: h.padding,
1256
- margin: h.margin,
1257
- borderRadius: h.borderRadius,
1253
+ let e = i(S.videoUrl), t = S.linkType === "email" ? `mailto:${S.href || ""}` : S.href || S.videoUrl || "#", n = S.target || "_blank";
1254
+ return `<div${C} style="${V({
1255
+ padding: _.padding,
1256
+ margin: _.margin,
1257
+ borderRadius: _.borderRadius,
1258
1258
  overflow: "hidden"
1259
- })}"><a href="${K(t)}" target="${K(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${K(e.thumbnailUrl)}" alt="${K(_.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1259
+ })}"><a href="${q(t)}" target="${q(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${q(e.thumbnailUrl)}" alt="${q(S.alt || "Video preview")}" style="width: 100%; display: block;" /><span style="position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 56px; height: 56px; border-radius: 9999px; background: rgba(15, 23, 42, 0.75); display: flex; align-items: center; justify-content: center;"><span style="width: 0; height: 0; border-top: 10px solid transparent; border-bottom: 10px solid transparent; border-left: 16px solid #ffffff; margin-left: 4px;"></span></span></a></div>`;
1260
1260
  }
1261
1261
  case "timer": {
1262
- let e = _.showLabels !== !1, n = B({
1263
- fontFamily: h.digitsFontFamily,
1264
- fontSize: h.digitsFontSize || "40px",
1265
- color: h.digitsColor || "#1e293b",
1262
+ let e = S.showLabels !== !1, t = V({
1263
+ fontFamily: _.digitsFontFamily,
1264
+ fontSize: _.digitsFontSize || "40px",
1265
+ color: _.digitsColor || "#1e293b",
1266
1266
  fontWeight: "800"
1267
- }), r = B({
1268
- fontFamily: h.labelsFontFamily,
1269
- fontSize: h.labelsFontSize || "16px",
1270
- color: h.labelsColor || "#64748b"
1271
- }), i = B({
1272
- backgroundColor: h.backgroundColor || "#f8fafc",
1273
- borderRadius: h.borderRadius || "8px",
1274
- padding: h.padding || "16px",
1267
+ }), n = V({
1268
+ fontFamily: _.labelsFontFamily,
1269
+ fontSize: _.labelsFontSize || "16px",
1270
+ color: _.labelsColor || "#64748b"
1271
+ }), r = V({
1272
+ backgroundColor: _.backgroundColor || "#f8fafc",
1273
+ borderRadius: _.borderRadius || "8px",
1274
+ padding: _.padding || "16px",
1275
1275
  textAlign: "center"
1276
- }), a = (t, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${t}" style="${n}">${a}</span>${e ? `<span style="${r}">${i}</span>` : ""}</div>`, o = c(_.targetDate), s = K(_.targetDate || "2026-12-31T23:59:59"), l = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1277
- return `<div${v} data-plexo-target="${s}" style="${i}"><div>${a("days", "Days", o.days)}${a("hours", "Hours", o.hours)}${a("minutes", "Mins", o.minutes)}${a("seconds", "Secs", o.seconds)}</div>${l}</div>`;
1276
+ }), i = (r, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${r}" style="${t}">${a}</span>${e ? `<span style="${n}">${i}</span>` : ""}</div>`, o = a(S.targetDate, S.timezone), s = q(new Date(o.targetTimestamp).toISOString()), c = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${g.id}"]`)});if(!wrap)return;var target=new Date(wrap.getAttribute('data-plexo-target')).getTime();function pad(n){return String(n).padStart(2,'0');}function tick(){var diff=target-Date.now();var d=wrap.querySelector('[data-unit="days"]'),h=wrap.querySelector('[data-unit="hours"]'),m=wrap.querySelector('[data-unit="minutes"]'),s=wrap.querySelector('[data-unit="seconds"]');if(diff<=0){[d,h,m,s].forEach(function(n){if(n)n.textContent='00';});clearInterval(iv);return;}var total=Math.floor(diff/1000);if(d)d.textContent=pad(Math.floor(total/86400));if(h)h.textContent=pad(Math.floor(total%86400/3600));if(m)m.textContent=pad(Math.floor(total%3600/60));if(s)s.textContent=pad(total%60);}tick();var iv=setInterval(tick,1000);})();<\/script>`;
1277
+ return `<div${C} data-plexo-target="${s}" style="${r}"><div>${i("days", "Days", o.days)}${i("hours", "Hours", o.hours)}${i("minutes", "Mins", o.minutes)}${i("seconds", "Secs", o.seconds)}</div>${c}</div>`;
1278
1278
  }
1279
1279
  case "carousel": {
1280
- let e = Array.isArray(_.images) ? _.images : [], n = B({
1281
- padding: h.padding || "10px",
1282
- margin: h.margin,
1283
- backgroundColor: h.backgroundColor,
1280
+ let e = Array.isArray(S.images) ? S.images : [], t = V({
1281
+ padding: _.padding || "10px",
1282
+ margin: _.margin,
1283
+ backgroundColor: _.backgroundColor,
1284
1284
  position: "relative",
1285
1285
  overflow: "hidden",
1286
1286
  borderRadius: "12px"
1287
1287
  });
1288
- if (e.length === 0) return `<div${v} style="${n}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1289
- let r = Math.min(e.length - 1, Math.max(0, parseInt(String(_.activeIdx), 10) || 0)), i = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === r ? "block" : "none"};"><img src="${K(e.src)}" alt="${K(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${K(e.caption)}</div>` : ""}</div>`).join(""), a = e.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${e.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === r ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1290
- return `<div${v} data-active-idx="${r}" style="${n}">${e.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${i}${a}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
1288
+ if (e.length === 0) return `<div${C} style="${t}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1289
+ let n = Math.min(e.length - 1, Math.max(0, parseInt(String(S.activeIdx), 10) || 0)), r = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === n ? "block" : "none"};"><img src="${q(e.src)}" alt="${q(e.alt || e.caption || "")}" style="width: 100%; display: block;" />${e.caption ? `<div style="padding: 8px; text-align: center; background: rgba(15, 23, 42, 0.8); color: #fff; font-size: 12px; font-weight: 600;">${q(e.caption)}</div>` : ""}</div>`).join(""), i = e.length > 1 ? `<div style="display: flex; gap: 6px; justify-content: center; padding: 8px 0;">${e.map((e, t) => `<button type="button" data-dot-idx="${t}" style="width: 8px; height: 8px; border-radius: 9999px; border: none; background: ${t === n ? "#4f46e5" : "#cbd5e1"}; cursor: pointer;"></button>`).join("")}</div>` : "";
1290
+ return `<div${C} data-active-idx="${n}" style="${t}">${e.length > 1 ? "<button type=\"button\" data-nav=\"prev\" style=\"position: absolute; left: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">‹</button><button type=\"button\" data-nav=\"next\" style=\"position: absolute; right: 8px; top: 40%; transform: translateY(-50%); border: none; background: rgba(15, 23, 42, 0.6); color: #fff; width: 28px; height: 28px; border-radius: 9999px; cursor: pointer;\">›</button>" : ""}${r}${i}${`<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${g.id}"]`)});if(!wrap)return;var slides=wrap.querySelectorAll('[data-slide-idx]');var dots=wrap.querySelectorAll('[data-dot-idx]');function show(n){var idx=(n+slides.length)%slides.length;slides.forEach(function(s,i){s.style.display=i===idx?'block':'none';});dots.forEach(function(d,i){d.style.background=i===idx?'#4f46e5':'#cbd5e1';});wrap.setAttribute('data-active-idx',String(idx));}var prev=wrap.querySelector('[data-nav="prev"]');var next=wrap.querySelector('[data-nav="next"]');if(prev)prev.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)-1);});if(next)next.addEventListener('click',function(){show(parseInt(wrap.getAttribute('data-active-idx')||'0',10)+1);});dots.forEach(function(d,i){d.addEventListener('click',function(){show(i);});});})();<\/script>`}</div>`;
1291
1291
  }
1292
1292
  case "accordion": {
1293
- let e = f(t), n = _.mode === "multi" ? "multi" : "single", r = _.iconStyle || "chevron", i = _.iconPosition === "left", a = _.showDividers !== !1, o = _.animation !== "none", s = B({
1294
- border: `${h.borderWidth || "1px"} ${h.borderStyle || "solid"} ${h.borderColor || "#e2e8f0"}`,
1295
- borderRadius: h.borderRadius || "10px",
1293
+ let e = o(g), t = S.mode === "multi" ? "multi" : "single", n = S.iconStyle || "chevron", r = S.iconPosition === "left", i = S.showDividers !== !1, a = S.animation !== "none", s = V({
1294
+ border: `${_.borderWidth || "1px"} ${_.borderStyle || "solid"} ${_.borderColor || "#e2e8f0"}`,
1295
+ borderRadius: _.borderRadius || "10px",
1296
1296
  overflow: "hidden",
1297
- margin: h.margin
1297
+ margin: _.margin
1298
1298
  });
1299
- return e.length === 0 ? `<div${v} style="${s}"></div>` : `<div${v} data-acc-mode="${n}" data-acc-icon-style="${r}" style="${s}"><div class="plexo-acc-group">${Z(e, h, {
1300
- iconStyle: r,
1301
- iconOnLeft: i,
1302
- showDividers: a,
1303
- animated: o
1304
- })}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${t.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
1299
+ return e.length === 0 ? `<div${C} style="${s}"></div>` : `<div${C} data-acc-mode="${t}" data-acc-icon-style="${n}" style="${s}"><div class="plexo-acc-group">${X(e, _, {
1300
+ iconStyle: n,
1301
+ iconOnLeft: r,
1302
+ showDividers: i,
1303
+ animated: a
1304
+ }, g.id)}</div>${`<script>(function(){var root=document.querySelector(${JSON.stringify(`[data-plexo-id="${g.id}"]`)});if(!root)return;var mode=root.getAttribute('data-acc-mode')||'single';var iconStyle=root.getAttribute('data-acc-icon-style')||'chevron';function setIconState(icon,open){if(!icon)return;if(iconStyle==='plus'){icon.textContent=open?'−':'+';}else if(iconStyle==='arrow'){icon.style.transform=open?'rotate(90deg)':'';}else if(iconStyle==='chevron'){icon.style.transform=open?'rotate(180deg)':'';}}var headers=root.querySelectorAll('[data-acc-header]');headers.forEach(function(header){header.addEventListener('click',function(){var item=header.parentElement;var group=item.parentElement;var panel=item.children[1];var isOpen=header.getAttribute('data-acc-open')==='1';if(mode!=='multi'&&group){Array.prototype.forEach.call(group.children,function(sib){if(sib===item)return;var sh=sib.children[0];var sp=sib.children[1];if(sh){sh.setAttribute('data-acc-open','0');setIconState(sh.querySelector('[data-acc-icon]'),false);}if(sp)sp.style.gridTemplateRows='0fr';});}var next=!isOpen;header.setAttribute('data-acc-open',next?'1':'0');panel.style.gridTemplateRows=next?'1fr':'0fr';setIconState(header.querySelector('[data-acc-icon]'),next);});});})();<\/script>`}</div>`;
1305
1305
  }
1306
- default: return te(t.type);
1306
+ default: return ie(g.type);
1307
1307
  }
1308
- }, Q = (e, n) => {
1308
+ }, Z = (e, t, n) => {
1309
1309
  if (!e || typeof e != "object") return "";
1310
- let r = z(e);
1310
+ let r = B(e);
1311
1311
  if (!r) return `\n <!-- ROW SKIPPED (type="${typeof e.type == "string" ? e.type : "unknown"}"${e.id ? `, id="${e.id}"` : ""}): this row has no 'columns' array and its shorthand content (e.g. a list of items/links) can't be auto-converted without losing data. Provide a fully hydrated row with 'columns' and 'elements' instead. -->`;
1312
- let i = B(r.style || {}), a = q("id", r.htmlId), o = q("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1313
- U(n, s, r.style, "tablet", r.styleTablet), U(n, s, r.style, "mobile", r.styleMobile);
1312
+ let i = V(r.style || {}), a = J("id", r.htmlId), o = J("class", r.htmlClass), s = r.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1313
+ W(t, s, r.style, "tablet", r.styleTablet), W(t, s, r.style, "mobile", r.styleMobile);
1314
1314
  let c = `\n <!-- ROW START: ${r.id || "row"} -->`;
1315
1315
  c += `\n <div data-plexo-id="${s}"${a}${o} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${i}">`;
1316
1316
  let l = Array.isArray(r.columns) ? r.columns : [];
1317
1317
  for (let e of l) {
1318
1318
  if (!e) continue;
1319
- let r = e.styles || e.style || {}, i = B(r), a = r.gap || "16px", o = q("id", e.attrs?.htmlId), s = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", l = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1320
- U(n, l, r, "tablet", e.stylesTablet), U(n, l, r, "mobile", e.stylesMobile), c += `\n <!-- COLUMN START: ${e.id || "col"} -->`, c += `\n <div data-plexo-id="${l}"${o} class="plexo-col${s}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; --plexo-col-gap: ${a}; ${i}">`;
1321
- let u = Array.isArray(e.elements) ? e.elements : [], d = Array.isArray(e.nestedRows) ? e.nestedRows : [], f = new Map(u.map((e) => [e.id, e])), p = new Map(d.map((e) => [e.id, e]));
1322
- for (let r of t({
1319
+ let r = e.styles || e.style || {}, i = V(r), a = r.gap || "16px", o = J("id", e.attrs?.htmlId), s = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", l = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1320
+ W(t, l, r, "tablet", e.stylesTablet), W(t, l, r, "mobile", e.stylesMobile);
1321
+ let u = Array.isArray(e.elements) ? e.elements : [], d = Array.isArray(e.nestedRows) ? e.nestedRows : [], f = n && u.length === 0 && d.length === 0 ? "min-height: 148px; " : "";
1322
+ c += `\n <!-- COLUMN START: ${e.id || "col"} -->`, c += `\n <div data-plexo-id="${l}"${o} class="plexo-col${s}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; --plexo-col-gap: ${a}; ${f}${i}">`;
1323
+ let p = new Map(u.map((e) => [e.id, e])), m = new Map(d.map((e) => [e.id, e]));
1324
+ for (let r of g({
1323
1325
  ...e,
1324
1326
  elements: u,
1325
1327
  nestedRows: d
1326
1328
  })) {
1327
- let e = f.get(r);
1329
+ let e = p.get(r);
1328
1330
  if (e) {
1329
- let t = e.attributes || {}, r = typeof t.htmlClassNames == "string" ? t.htmlClassNames : typeof t.htmlClass == "string" ? t.htmlClass : typeof t.className == "string" ? t.className : "", i = q("id", t.htmlId), o = q("class", r), s = e.style?.display, l = s === "inline-block" || s === "inline" || s === "inline-flex" ? `margin-bottom: ${a}; display: ${s}; vertical-align: top;` : `margin-bottom: ${a};`;
1330
- U(n, e.id, e.style, "tablet", W(e, e.styleTablet)), U(n, e.id, e.style, "mobile", W(e, e.styleMobile)), c += `\n <div${i}${o} style="${l}">`, c += `\n ${ne(e)}`, c += "\n </div>";
1331
+ let n = e.attributes || {}, r = typeof n.htmlClassNames == "string" ? n.htmlClassNames : typeof n.htmlClass == "string" ? n.htmlClass : typeof n.className == "string" ? n.className : "", i = J("id", n.htmlId), o = J("class", r), s = e.style?.display, l = s === "inline-block" || s === "inline" || s === "inline-flex" ? `margin-bottom: ${a}; display: ${s}; vertical-align: top;` : `margin-bottom: ${a};`;
1332
+ W(t, e.id, e.style, "tablet", G(e, e.styleTablet)), W(t, e.id, e.style, "mobile", G(e, e.styleMobile)), c += `\n <div${i}${o} style="${l}">`, c += `\n ${ae(e)}`, c += "\n </div>";
1331
1333
  continue;
1332
1334
  }
1333
- let t = p.get(r);
1334
- t && (c += Q(t, n));
1335
+ let i = m.get(r);
1336
+ i && (c += Z(i, t, n));
1335
1337
  }
1336
1338
  c += "\n </div>";
1337
1339
  }
1338
1340
  return c += "\n </div>", c;
1339
- }, $ = (e) => {
1341
+ }, Q = (e, t) => {
1342
+ let n = t?.canvasEditorPadding ?? !1;
1340
1343
  if (!e || typeof e != "object") return "<!-- Empty template -->";
1341
- let t = e.designJson || e.template || e, n = t.body || (Array.isArray(t.rows) ? {
1342
- style: t.style || {},
1343
- rows: t.rows
1344
+ let r = e.designJson || e.template || e, i = r.body || (Array.isArray(r.rows) ? {
1345
+ style: r.style || {},
1346
+ rows: r.rows
1344
1347
  } : {
1345
1348
  style: {},
1346
1349
  rows: []
1347
- }), r = { ...n.style || {} };
1350
+ }), a = { ...i.style || {} };
1348
1351
  for (let e of [
1349
1352
  "backgroundColor",
1350
1353
  "background",
@@ -1352,9 +1355,9 @@ var ne = (t) => {
1352
1355
  "textColor",
1353
1356
  "fontFamily",
1354
1357
  "htmlTitle"
1355
- ]) r[e] === void 0 && (n[e] === void 0 ? t[e] !== void 0 && (r[e] = t[e]) : r[e] = n[e]);
1356
- r.backgroundColor && !r.background ? r.background = r.backgroundColor : r.background && !r.backgroundColor && (r.backgroundColor = r.background), r.textColor && !r.color && (r.color = r.textColor);
1357
- let i = [
1358
+ ]) a[e] === void 0 && (i[e] === void 0 ? r[e] !== void 0 && (a[e] = r[e]) : a[e] = i[e]);
1359
+ a.backgroundColor && !a.background ? a.background = a.backgroundColor : a.background && !a.backgroundColor && (a.backgroundColor = a.background), a.textColor && !a.color && (a.color = a.textColor);
1360
+ let o = [
1358
1361
  "htmlTitle",
1359
1362
  "htmlId",
1360
1363
  "htmlClass",
@@ -1362,23 +1365,23 @@ var ne = (t) => {
1362
1365
  "customJs",
1363
1366
  "textColor",
1364
1367
  "favicon"
1365
- ], a = {};
1366
- for (let e of Object.keys(r)) i.includes(e) || (a[e] = r[e]);
1367
- let o = B(a), s = typeof r.htmlTitle == "string" && r.htmlTitle.trim() ? r.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", c = q("id", r.htmlId), l = q("class", r.htmlClass), u = typeof r.customCss == "string" && r.customCss.trim() ? r.customCss.trim() : "", d = typeof r.customJs == "string" && r.customJs.trim() ? r.customJs.trim() : "", f = typeof r.favicon == "string" && r.favicon.trim() ? r.favicon.trim() : "", p = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], m = E(T(p, [r.fontFamily])), h = {
1368
+ ], s = {};
1369
+ for (let e of Object.keys(a)) o.includes(e) || (s[e] = a[e]);
1370
+ let c = V(s), l = typeof a.htmlTitle == "string" && a.htmlTitle.trim() ? a.htmlTitle.trim() : typeof e?.name == "string" && e.name.trim() ? e.name.trim() : "Plexo Rendered Page", u = J("id", a.htmlId), d = J("class", a.htmlClass), f = typeof a.customCss == "string" && a.customCss.trim() ? a.customCss.trim() : "", p = typeof a.customJs == "string" && a.customJs.trim() ? a.customJs.trim() : "", m = typeof a.favicon == "string" && a.favicon.trim() ? a.favicon.trim() : "", h = Array.isArray(i.rows) ? i.rows : Array.isArray(r.rows) ? r.rows : Array.isArray(e.rows) ? e.rows : [], g = O(D(h, [a.fontFamily])), _ = {
1368
1371
  tablet: [],
1369
1372
  mobile: []
1370
- }, g = "";
1371
- for (let e of p) g += Q(e, h);
1372
- let _ = h.tablet.length ? `\n ${h.tablet.join("\n ")}` : "", v = h.mobile.length ? `\n ${h.mobile.join("\n ")}` : "", y = `<!DOCTYPE html>
1373
+ }, v = "";
1374
+ for (let e of h) v += Z(e, _, n);
1375
+ let y = _.tablet.length ? `\n ${_.tablet.join("\n ")}` : "", b = _.mobile.length ? `\n ${_.mobile.join("\n ")}` : "", x = `<!DOCTYPE html>
1373
1376
  <html>
1374
1377
  <head>
1375
1378
  <meta charset="utf-8">
1376
- <title>${K(s)}</title>
1377
- ${f ? `<link rel="icon" href="${K(f)}">` : ""}
1379
+ <title>${q(l)}</title>
1380
+ ${m ? `<link rel="icon" href="${q(m)}">` : ""}
1378
1381
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1379
- ${m ? `<link rel="stylesheet" href="${m}">` : ""}
1382
+ ${g ? `<link rel="stylesheet" href="${g}">` : ""}
1380
1383
  <style>
1381
- body { margin: 0; font-family: ${R}; }
1384
+ body { margin: 0; font-family: ${z}; }
1382
1385
  .plexo-row {
1383
1386
  display: flex;
1384
1387
  flex-wrap: wrap;
@@ -1386,7 +1389,7 @@ var ne = (t) => {
1386
1389
  /* Tablet: auto-scaled fonts/heights/spacing (see utilities/responsiveDefaults.ts) and
1387
1390
  any explicit per-element styleTablet/stylesTablet override — columns stay side by
1388
1391
  side at this width. */
1389
- @media (min-width: 769px) and (max-width: 1024px) {${_}
1392
+ @media (min-width: 769px) and (max-width: 1024px) {${y}
1390
1393
  }
1391
1394
  @media (max-width: 768px) {
1392
1395
  .plexo-row {
@@ -1396,26 +1399,29 @@ var ne = (t) => {
1396
1399
  width: 100% !important;
1397
1400
  max-width: 100% !important;
1398
1401
  margin-bottom: var(--plexo-col-gap, 16px);
1399
- }${v}
1402
+ }${b}
1400
1403
  }
1401
1404
  </style>
1402
- ${u ? `<style>\n${u}\n </style>` : ""}
1405
+ ${f ? `<style>\n${f}\n </style>` : ""}
1403
1406
  </head>
1404
- <body${c}${l} style="${o}">
1407
+ <body${u}${d} style="${c}">
1405
1408
  <div style="max-width: 1200px; margin: 0 auto; width: 100%;">`;
1406
- return y += g, y += `\n </div>
1407
- ${d ? ` <script>\n${d}\n <\/script>` : ""}
1409
+ return x += v, x += `\n </div>
1410
+ ${p ? ` <script>\n${p}\n <\/script>` : ""}
1408
1411
  </body>
1409
- </html>`, y = y.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), y;
1412
+ </html>`, x = x.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), x;
1410
1413
  };
1411
- function re(e) {
1412
- return $(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1414
+ function $(e) {
1415
+ return e.replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1413
1416
  }
1414
- function ie(e) {
1415
- return $(e);
1417
+ function oe(e) {
1418
+ return $(Q(e));
1419
+ }
1420
+ function se(e) {
1421
+ return Q(e);
1416
1422
  }
1417
- function ae(e) {
1423
+ function ce(e) {
1418
1424
  return e;
1419
1425
  }
1420
1426
  //#endregion
1421
- export { C as _, ie as a, _ as b, G as c, L as d, E as f, x as g, v as h, $ as i, V as l, S as m, J as n, re as o, T as p, U as r, z as s, R as t, ae as u, y as v, g as x, b as y };
1427
+ export { v as S, C as _, se as a, S as b, K as c, ce as d, R as f, b as g, w as h, Q as i, H as l, D as m, Y as n, oe as o, O as p, W as r, B as s, z as t, $ as u, T as v, y as x, x as y };