@charisol/plexo-sdk 1.0.37 → 1.0.38

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.
@@ -1,8 +1,6 @@
1
- import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, p as c, r as l, s as u, t as d, u as f } from "./elementResolvers-qyNepC_f.js";
2
- import * as p from "react";
3
- import { renderToStaticMarkup as m } from "react-dom/server";
1
+ import { a as e, c as t, d as n, f as r, i, l as a, n as o, o as s, r as c, t as l, u } from "./iconSvgStatic-JHlo_YyU.js";
4
2
  //#region src/utilities/playground.constants.ts
5
- var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g = [
3
+ var d = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, f = [
6
4
  {
7
5
  id: "all",
8
6
  label: "All sources"
@@ -19,7 +17,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
19
17
  id: "pixabay",
20
18
  label: "Pixabay"
21
19
  }
22
- ], _ = [
20
+ ], p = [
23
21
  {
24
22
  id: "surface-book",
25
23
  label: "Surface Book",
@@ -86,7 +84,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
86
84
  width: 375,
87
85
  category: "mobile"
88
86
  }
89
- ], v = 1280, y = [
87
+ ], m = 1280, h = [
90
88
  {
91
89
  id: "facebook",
92
90
  label: "Facebook"
@@ -119,7 +117,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
119
117
  id: "tiktok",
120
118
  label: "TikTok"
121
119
  }
122
- ], b = [
120
+ ], g = [
123
121
  {
124
122
  label: "Text",
125
123
  value: "text"
@@ -152,7 +150,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
152
150
  label: "Checkbox",
153
151
  value: "checkbox"
154
152
  }
155
- ], x = [
153
+ ], _ = [
156
154
  {
157
155
  label: "1 Column",
158
156
  widths: ["100%"],
@@ -201,7 +199,7 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
201
199
  "25%"
202
200
  ]
203
201
  }
204
- ], S = [
202
+ ], v = [
205
203
  {
206
204
  label: "Roboto",
207
205
  value: "'Roboto', sans-serif",
@@ -602,8 +600,8 @@ var h = (e) => `https://picsum.photos/seed/${encodeURIComponent(e)}/1200/800`, g
602
600
  value: "'Great Vibes', cursive",
603
601
  style: "handwriting"
604
602
  }
605
- ], C = new Map(S.map((e) => [e.value, e.label]));
606
- function w(e, t = []) {
603
+ ], y = new Map(v.map((e) => [e.value, e.label]));
604
+ function b(e, t = []) {
607
605
  let n = /* @__PURE__ */ new Set(), r = (e) => {
608
606
  if (!e) return;
609
607
  let t = Array.isArray(e.columns) ? e.columns : [];
@@ -621,17 +619,17 @@ function w(e, t = []) {
621
619
  for (let e of t) typeof e == "string" && e.trim() && n.add(e.trim());
622
620
  return n;
623
621
  }
624
- function T(e) {
622
+ function x(e) {
625
623
  let t = /* @__PURE__ */ new Set();
626
624
  for (let n of e) {
627
- let e = C.get(n);
625
+ let e = y.get(n);
628
626
  e && t.add(e);
629
627
  }
630
628
  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`;
631
629
  }
632
630
  //#endregion
633
631
  //#region src/utilities/responsiveDefaults.ts
634
- var E = {
632
+ var S = {
635
633
  tablet: {
636
634
  thresholdPx: 24,
637
635
  scale: .85,
@@ -642,7 +640,7 @@ var E = {
642
640
  scale: .7,
643
641
  floorPx: 14
644
642
  }
645
- }, D = {
643
+ }, C = {
646
644
  tablet: {
647
645
  thresholdPx: 320,
648
646
  scale: .8,
@@ -653,7 +651,7 @@ var E = {
653
651
  scale: .55,
654
652
  floorPx: 140
655
653
  }
656
- }, ee = {
654
+ }, w = {
657
655
  tablet: {
658
656
  thresholdPx: 48,
659
657
  scale: .75,
@@ -664,7 +662,7 @@ var E = {
664
662
  scale: .55,
665
663
  floorPx: 16
666
664
  }
667
- }, O = {
665
+ }, T = {
668
666
  tablet: {
669
667
  thresholdPx: 500,
670
668
  scale: 1,
@@ -675,11 +673,11 @@ var E = {
675
673
  scale: 1,
676
674
  floorPx: 0
677
675
  }
678
- }, k = ["fontSize"], A = [
676
+ }, E = ["fontSize"], D = [
679
677
  "height",
680
678
  "minHeight",
681
679
  "maxHeight"
682
- ], j = [
680
+ ], O = [
683
681
  "padding",
684
682
  "paddingTop",
685
683
  "paddingBottom",
@@ -688,8 +686,8 @@ var E = {
688
686
  "margin",
689
687
  "marginTop",
690
688
  "marginBottom"
691
- ], M = ["width", "maxWidth"];
692
- function N(e) {
689
+ ], k = ["width", "maxWidth"];
690
+ function A(e) {
693
691
  if (typeof e == "number" && Number.isFinite(e)) return e;
694
692
  if (typeof e != "string") return null;
695
693
  let t = e.trim().match(/^(-?\d+(?:\.\d+)?)px$/);
@@ -697,48 +695,48 @@ function N(e) {
697
695
  let n = parseFloat(t[1]);
698
696
  return Number.isFinite(n) ? n : null;
699
697
  }
700
- function P(e, t) {
698
+ function j(e, t) {
701
699
  return e < t.thresholdPx ? null : Math.max(Math.round(e * t.scale), t.floorPx);
702
700
  }
703
- function F(e, t) {
701
+ function M(e, t) {
704
702
  if (!e || typeof e != "object") return {};
705
703
  let n = {};
706
- for (let r of k) {
707
- let i = N(e[r]);
704
+ for (let r of E) {
705
+ let i = A(e[r]);
708
706
  if (i === null) continue;
709
- let a = P(i, E[t]);
707
+ let a = j(i, S[t]);
710
708
  a !== null && (n[r] = `${a}px`);
711
709
  }
712
- for (let r of A) {
713
- let i = N(e[r]);
710
+ for (let r of D) {
711
+ let i = A(e[r]);
714
712
  if (i === null) continue;
715
- let a = P(i, D[t]);
713
+ let a = j(i, C[t]);
716
714
  a !== null && (n[r] = `${a}px`);
717
715
  }
718
- for (let r of j) {
719
- let i = N(e[r]);
716
+ for (let r of O) {
717
+ let i = A(e[r]);
720
718
  if (i === null) continue;
721
- let a = P(i, ee[t]);
719
+ let a = j(i, w[t]);
722
720
  a !== null && (n[r] = `${a}px`);
723
721
  }
724
- for (let r of M) {
725
- let i = N(e[r]);
726
- i !== null && i >= O[t].thresholdPx && (n[r] = "100%");
722
+ for (let r of k) {
723
+ let i = A(e[r]);
724
+ i !== null && i >= T[t].thresholdPx && (n[r] = "100%");
727
725
  }
728
726
  return n;
729
727
  }
730
- function I(e, t, n) {
728
+ function N(e, t, n) {
731
729
  let r = e || {};
732
730
  return n ? {
733
731
  ...r,
734
- ...F(r, n),
732
+ ...M(r, n),
735
733
  ...t || {}
736
734
  } : r;
737
735
  }
738
736
  //#endregion
739
737
  //#region src/utilities/compiler.ts
740
- var L = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", R = (e) => e === "twitter" ? "x" : e, z = (e, t = "currentColor") => {
741
- switch (R(e)) {
738
+ var P = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif", F = (e) => e === "twitter" ? "x" : e, I = (e, t = "currentColor") => {
739
+ switch (F(e)) {
742
740
  case "facebook": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><path fill="${t}" d="M14 8h2V4h-2c-2.2 0-4 1.8-4 4v2H8v4h2v6h4v-6h2.5l.5-4H14V8c0-.55.45-1 1-1Z"/></svg>`;
743
741
  case "instagram": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><rect x="4" y="4" width="16" height="16" rx="5" ry="5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="12" cy="12" r="3.5" fill="none" stroke="${t}" stroke-width="2"/><circle cx="17" cy="7" r="1" fill="${t}"/></svg>`;
744
742
  case "linkedin": return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="8" cy="9" r="1.25" fill="${t}"/><path fill="${t}" d="M7 11h2v6H7zM11 11h2v.9c.5-.7 1.34-1.15 2.4-1.15 2 0 3.1 1.25 3.1 3.6V17h-2v-2.2c0-1.3-.45-2.05-1.55-2.05-1.2 0-1.85.8-1.85 2.05V17h-2z"/></svg>`;
@@ -750,7 +748,7 @@ var L = "-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Ari
750
748
  default: return `<svg viewBox="0 0 24 24" width="16" height="16" aria-hidden="true"><circle cx="12" cy="12" r="4" fill="${t}"/></svg>`;
751
749
  }
752
750
  };
753
- function B(e) {
751
+ function L(e) {
754
752
  if (!e || typeof e != "object") return null;
755
753
  if (Array.isArray(e.columns) && e.columns.length > 0) return e;
756
754
  let t = (e.type || "").toLowerCase(), n = e.props || e.content || e.attributes || e.data || e.payload || e, r = e.style || {};
@@ -1004,7 +1002,7 @@ function B(e) {
1004
1002
  }
1005
1003
  }
1006
1004
  }
1007
- var V = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
1005
+ var R = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter(([e, t]) => t != null && t !== "").map(([e, t]) => {
1008
1006
  let n = e.replace(/([A-Z])/g, "-$1").toLowerCase(), r = t;
1009
1007
  return typeof t == "number" && [
1010
1008
  "padding",
@@ -1015,25 +1013,25 @@ var V = (e = {}) => !e || typeof e != "object" ? "" : Object.entries(e).filter((
1015
1013
  "width",
1016
1014
  "height"
1017
1015
  ].some((t) => e.toLowerCase().includes(t)) && (r = `${t}px`), `${n}: ${r};`;
1018
- }).join(" "), H = (e = {}) => V(e).replace(/;(\s|$)/g, " !important;$1");
1019
- function U(e) {
1016
+ }).join(" "), z = (e = {}) => R(e).replace(/;(\s|$)/g, " !important;$1");
1017
+ function B(e) {
1020
1018
  if (typeof e != "string") return !1;
1021
1019
  let t = e.toLowerCase();
1022
1020
  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);
1023
1021
  }
1024
- function W(e, t, n, r, i) {
1022
+ function V(e, t, n, r, i) {
1025
1023
  let a = {
1026
- ...F(n, r),
1024
+ ...M(n, r),
1027
1025
  ...i || {}
1028
1026
  };
1029
- for (let e of Object.keys(a)) U(a[e]) && delete a[e];
1027
+ for (let e of Object.keys(a)) B(a[e]) && delete a[e];
1030
1028
  if (Object.keys(a).length === 0) return;
1031
- let o = H(a);
1029
+ let o = z(a);
1032
1030
  if (!o) return;
1033
1031
  let s = String(t).replace(/["\\]/g, "");
1034
1032
  e[r].push(`[data-plexo-id="${s}"] { ${o} }`);
1035
1033
  }
1036
- var G = () => ({
1034
+ var H = () => ({
1037
1035
  backgroundColor: "#ffffff",
1038
1036
  borderRadius: "20px",
1039
1037
  width: "100%",
@@ -1056,11 +1054,11 @@ var G = () => ({
1056
1054
  buttonPaddingRight: "14px",
1057
1055
  buttonFontSize: "13px",
1058
1056
  buttonFontWeight: "700"
1059
- }), K = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), q = (e, t) => {
1057
+ }), U = (e) => (e || "").replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/</g, "&lt;").replace(/>/g, "&gt;"), W = (e, t) => {
1060
1058
  if (typeof t != "string") return "";
1061
1059
  let n = t.trim();
1062
- return n ? ` ${e}="${K(n)}"` : "";
1063
- }, J = [
1060
+ return n ? ` ${e}="${U(n)}"` : "";
1061
+ }, G = [
1064
1062
  "fieldSpacing",
1065
1063
  "buttonBackgroundColor",
1066
1064
  "buttonTextColor",
@@ -1073,9 +1071,9 @@ var G = () => ({
1073
1071
  "buttonFontWeight",
1074
1072
  "buttonWidth",
1075
1073
  "buttonAlign"
1076
- ], Y = (e) => {
1074
+ ], K = (e) => {
1077
1075
  if (!e || typeof e != "object") return "";
1078
- let t = e.kind || "text", n = K(e.name || e.label || "field"), r = e.required ? " required" : "", i = V({
1076
+ let t = e.kind || "text", n = U(e.name || e.label || "field"), r = e.required ? " required" : "", i = R({
1079
1077
  fontSize: e.fontSize || "13px",
1080
1078
  borderRadius: e.borderRadius || "12px",
1081
1079
  borderWidth: e.borderWidth || "1px",
@@ -1083,54 +1081,54 @@ var G = () => ({
1083
1081
  borderStyle: "solid",
1084
1082
  color: e.inputTextColor
1085
1083
  }), 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>`;
1086
- 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 : [{
1084
+ return t === "textarea" ? `${a}<textarea name="${n}" placeholder="${U(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="${U(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 : [{
1087
1085
  label: e.label || "Option",
1088
1086
  value: e.name || "option"
1089
- }]).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} />`;
1087
+ }]).map((r) => `<label style="display: inline-flex; align-items: center; gap: 6px; font-size: ${e.fontSize || "12px"};"><input type="${t}" name="${n}" value="${U(r?.value ?? "")}" />${r?.label ?? r?.value ?? ""}</label>`).join("")}</div>` : `${a}<input type="${U(t)}" name="${n}" placeholder="${U(e.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; ${i}"${r} />`;
1090
1088
  };
1091
- function X(e) {
1089
+ function q(e) {
1092
1090
  return `<!-- Unsupported block ${String(e)} -->`;
1093
1091
  }
1094
- var Z = (h) => {
1095
- if (!h || typeof h != "object") return "";
1096
- let g = h.style || {}, _ = V(h.type === "form_container" ? {
1097
- ...G(),
1098
- ...g
1099
- } : g), v = h.attributes || {}, y = ` data-plexo-id="${K(h.id)}"`;
1100
- switch (h.type) {
1101
- case "heading": return `<h2${y} style="margin-top: 0; margin-bottom: 8px; ${_}">${v.text || "Heading"}</h2>`;
1102
- case "paragraph": return `<p${y} style="margin-top: 0; margin-bottom: 12px; ${_}">${v.text || "Paragraph text content."}</p>`;
1103
- case "text": return `<div${y} style="${_}">${v.text || ""}</div>`;
1092
+ var J = (d) => {
1093
+ if (!d || typeof d != "object") return "";
1094
+ let f = d.style || {}, p = R(d.type === "form_container" ? {
1095
+ ...H(),
1096
+ ...f
1097
+ } : f), m = d.attributes || {}, h = ` data-plexo-id="${U(d.id)}"`;
1098
+ switch (d.type) {
1099
+ case "heading": return `<h2${h} style="margin-top: 0; margin-bottom: 8px; ${p}">${m.text || "Heading"}</h2>`;
1100
+ case "paragraph": return `<p${h} style="margin-top: 0; margin-bottom: 12px; ${p}">${m.text || "Paragraph text content."}</p>`;
1101
+ case "text": return `<div${h} style="${p}">${m.text || ""}</div>`;
1104
1102
  case "button": {
1105
- let e = d(h), t = V({
1106
- ...g,
1103
+ let e = o(d), t = R({
1104
+ ...f,
1107
1105
  width: e.width,
1108
1106
  height: e.height
1109
1107
  });
1110
- return `<div style="text-align: ${g.textAlign || "center"};"><a${y} href="${v.href || "#"}" target="${v.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${t}">${v.text || "Button"}</a></div>`;
1108
+ return `<div style="text-align: ${f.textAlign || "center"};"><a${h} href="${m.href || "#"}" target="${m.openInNewTab ? "_blank" : "_self"}" style="display: inline-block; text-decoration: none; ${t}">${m.text || "Button"}</a></div>`;
1111
1109
  }
1112
1110
  case "image": {
1113
- let t = e(h), n = g.textAlign === "center" ? "margin: 0 auto; display: block;" : g.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", r = V({
1114
- ...g,
1115
- width: t.width,
1116
- height: t.height
1111
+ let e = s(d), t = f.textAlign === "center" ? "margin: 0 auto; display: block;" : f.textAlign === "right" ? "margin-left: auto; display: block;" : "display: inline-block;", n = R({
1112
+ ...f,
1113
+ width: e.width,
1114
+ height: e.height
1117
1115
  });
1118
- return `<img${y} src="${v.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${v.alt || ""}" style="${r} ${n}" />`;
1116
+ return `<img${h} src="${m.src || "https://images.unsplash.com/photo-1618005182384-a83a8bd57fbe"}" alt="${m.alt || ""}" style="${n} ${t}" />`;
1119
1117
  }
1120
- case "divider": return `<hr${y} style="border: 0; border-top: ${g.borderWidth || "1px"} ${g.borderStyle || "solid"} ${g.borderColor || "#334155"}; ${_}" />`;
1121
- case "spacer": return `<div${y} style="height: ${g.height || "24px"};"></div>`;
1122
- case "card": return `<div${y} style="${_}">
1123
- <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${v.title || "Card Title"}</h3>
1124
- <p style="margin: 0; color: #94a3b8; font-size: 14px;">${v.description || "Card description."}</p>
1118
+ case "divider": return `<hr${h} style="border: 0; border-top: ${f.borderWidth || "1px"} ${f.borderStyle || "solid"} ${f.borderColor || "#334155"}; ${p}" />`;
1119
+ case "spacer": return `<div${h} style="height: ${f.height || "24px"};"></div>`;
1120
+ case "card": return `<div${h} style="${p}">
1121
+ <h3 style="margin-top: 0; margin-bottom: 8px; color: #ffffff;">${m.title || "Card Title"}</h3>
1122
+ <p style="margin: 0; color: #94a3b8; font-size: 14px;">${m.description || "Card description."}</p>
1125
1123
  </div>`;
1126
1124
  case "form_container": {
1127
1125
  let e = {
1128
- ...G(),
1129
- ...g
1126
+ ...H(),
1127
+ ...f
1130
1128
  }, t = {};
1131
- for (let n of Object.keys(e)) J.includes(n) || (t[n] = e[n]);
1132
- t.height = o(h);
1133
- let n = V(t), r = l(Array.isArray(v.fields) ? v.fields : []), i = e.fieldSpacing || "12px", a = r.map((e) => `<div style="margin-bottom: ${i};">${Y(e)}</div>`).join(""), s = v.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", c = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", u = V({
1129
+ for (let n of Object.keys(e)) G.includes(n) || (t[n] = e[n]);
1130
+ t.height = c(d);
1131
+ let n = R(t), r = i(Array.isArray(m.fields) ? m.fields : []), a = e.fieldSpacing || "12px", o = r.map((e) => `<div style="margin-bottom: ${a};">${K(e)}</div>`).join(""), s = m.buttonAutoWidth === !1 ? e.buttonWidth || "100%" : "auto", l = e.buttonAlign === "left" ? "flex-start" : e.buttonAlign === "right" ? "flex-end" : "center", u = R({
1134
1132
  backgroundColor: e.buttonBackgroundColor,
1135
1133
  color: e.buttonTextColor,
1136
1134
  borderRadius: e.buttonBorderRadius,
@@ -1142,29 +1140,29 @@ var Z = (h) => {
1142
1140
  fontWeight: e.buttonFontWeight,
1143
1141
  width: s
1144
1142
  });
1145
- return `<form${y} action="${K(v.actionUrl || v.action || "#")}" method="${K(v.method || "POST")}" style="${n}">${a}<div style="display: flex; width: 100%; justify-content: ${c};"><button type="submit" style="border: 0; cursor: pointer; ${u}">${v.submitLabel || "Submit"}</button></div></form>`;
1143
+ return `<form${h} action="${U(m.actionUrl || m.action || "#")}" method="${U(m.method || "POST")}" style="${n}">${o}<div style="display: flex; width: 100%; justify-content: ${l};"><button type="submit" style="border: 0; cursor: pointer; ${u}">${m.submitLabel || "Submit"}</button></div></form>`;
1146
1144
  }
1147
1145
  case "input": {
1148
- let e = v.inputType || v.type || "text", t = K(v.name || v.fieldName || "field"), n = K(v.placeholder || ""), r = v.required ? " required" : "";
1149
- return `<input${y} type="${K(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${_}"${r} />`;
1146
+ let e = m.inputType || m.type || "text", t = U(m.name || m.fieldName || "field"), n = U(m.placeholder || ""), r = m.required ? " required" : "";
1147
+ return `<input${h} type="${U(e)}" name="${t}" placeholder="${n}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${p}"${r} />`;
1150
1148
  }
1151
- case "textarea": return `<textarea${y} name="${K(v.name || v.fieldName || "field")}" placeholder="${K(v.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${_}"${v.required ? " required" : ""}></textarea>`;
1152
- case "select": return `<select${y} name="${K(v.name || v.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${_}"${v.required ? " required" : ""}>${(Array.isArray(v.options) ? v.options : []).map((e) => `<option value="${K(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1153
- case "html": return `<div${y} style="${V({
1154
- ...g,
1155
- height: i(h, "auto")
1156
- })}">${v.htmlContent || v.text || ""}</div>`;
1149
+ case "textarea": return `<textarea${h} name="${U(m.name || m.fieldName || "field")}" placeholder="${U(m.placeholder || "")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${p}"${m.required ? " required" : ""}></textarea>`;
1150
+ case "select": return `<select${h} name="${U(m.name || m.fieldName || "field")}" style="width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #334155; ${p}"${m.required ? " required" : ""}>${(Array.isArray(m.options) ? m.options : []).map((e) => `<option value="${U(e?.value ?? "")}">${e?.label ?? e?.value ?? ""}</option>`).join("")}</select>`;
1151
+ case "html": return `<div${h} style="${R({
1152
+ ...f,
1153
+ height: e(d, "auto")
1154
+ })}">${m.htmlContent || m.text || ""}</div>`;
1157
1155
  case "social": {
1158
- let e = t(h), n = g.textAlign === "center" ? "center" : g.textAlign === "right" ? "flex-end" : "flex-start";
1159
- return `<div${y} style="${V({
1160
- padding: g.padding,
1161
- margin: g.margin,
1156
+ let e = a(d), t = f.textAlign === "center" ? "center" : f.textAlign === "right" ? "flex-end" : "flex-start";
1157
+ return `<div${h} style="${R({
1158
+ padding: f.padding,
1159
+ margin: f.margin,
1162
1160
  display: "flex",
1163
1161
  flexWrap: "wrap",
1164
- gap: g.iconSpacing || "8px",
1165
- justifyContent: n
1162
+ gap: f.iconSpacing || "8px",
1163
+ justifyContent: t
1166
1164
  })}">${e.map((e) => {
1167
- let t = V({
1165
+ let t = R({
1168
1166
  width: e.size,
1169
1167
  height: e.size,
1170
1168
  padding: "8px",
@@ -1176,124 +1174,121 @@ var Z = (h) => {
1176
1174
  justifyContent: "center",
1177
1175
  overflow: "hidden"
1178
1176
  });
1179
- return `<a href="${K(e.url)}" style="${t} text-decoration: none;">${z(e.provider, e.color)}</a>`;
1177
+ return `<a href="${U(e.url)}" style="${t} text-decoration: none;">${I(e.provider, e.color)}</a>`;
1180
1178
  }).join("")}</div>`;
1181
1179
  }
1182
1180
  case "menu": {
1183
- let e = u(h), t = g.textAlign === "center" ? "center" : g.textAlign === "right" ? "flex-end" : "flex-start";
1184
- return `<div${y} style="${V({
1185
- ...g,
1181
+ let e = t(d), n = f.textAlign === "center" ? "center" : f.textAlign === "right" ? "flex-end" : "flex-start";
1182
+ return `<div${h} style="${R({
1183
+ ...f,
1186
1184
  display: "flex",
1187
1185
  flexWrap: "wrap",
1188
1186
  gap: "16px",
1189
- justifyContent: t
1190
- })}">${e.map((e) => `<a href="${K(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${g.fontWeight || 600};">${K(e.label)}</a>`).join("")}</div>`;
1187
+ justifyContent: n
1188
+ })}">${e.map((e) => `<a href="${U(e.href)}" style="text-decoration: none; color: inherit; font-weight: ${f.fontWeight || 600};">${U(e.label)}</a>`).join("")}</div>`;
1191
1189
  }
1192
1190
  case "icon": {
1193
- let e = g.fontSize || `${v.iconSize || 48}px`, t = g.color || "#1e293b", n = parseInt(String(e), 10) || 48, i = r[s(v.iconName, Object.keys(r))] || c, a = m(p.createElement(i, {
1194
- size: n,
1195
- color: t
1196
- })), o = g.textAlign === "right" ? "flex-end" : g.textAlign === "left" ? "flex-start" : "center", l = V({
1197
- padding: g.padding,
1198
- margin: g.margin,
1191
+ let e = f.fontSize || `${m.iconSize || 48}px`, t = f.color || "#1e293b", n = parseInt(String(e), 10) || 48, r = l(m.iconName, n, t), i = f.textAlign === "right" ? "flex-end" : f.textAlign === "left" ? "flex-start" : "center", a = R({
1192
+ padding: f.padding,
1193
+ margin: f.margin,
1199
1194
  display: "flex",
1200
- justifyContent: o
1201
- }), u = typeof v.href == "string" ? v.href.trim() : "", d = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${a}</span>`;
1202
- return `<div style="${l}">${u ? `<a${y} href="${K(u)}" target="${v.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${d}</a>` : `<span${y}>${d}</span>`}</div>`;
1195
+ justifyContent: i
1196
+ }), o = typeof m.href == "string" ? m.href.trim() : "", s = `<span style="display: inline-flex; align-items: center; justify-content: center; color: ${t};">${r}</span>`;
1197
+ return `<div style="${a}">${o ? `<a${h} href="${U(o)}" target="${m.openInNewTab ? "_blank" : "_self"}" style="text-decoration: none;">${s}</a>` : `<span${h}>${s}</span>`}</div>`;
1203
1198
  }
1204
1199
  case "table": {
1205
- let e = a(h), t = `${g.borderWidth || "1px"} ${g.borderStyle || "solid"} ${g.borderColor || "#cbd5e1"}`, n = (n, r, i) => {
1206
- let a = i ? "th" : "td", o = i ? g.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : g.contentBgColor || "#ffffff", s = i ? g.headerTextColor || "#1e293b" : g.contentTextColor || "#475569", c = i ? g.headerTextAlign || "left" : g.contentTextAlign || "left";
1200
+ let e = u(d), t = `${f.borderWidth || "1px"} ${f.borderStyle || "solid"} ${f.borderColor || "#cbd5e1"}`, n = (n, r, i) => {
1201
+ let a = i ? "th" : "td", o = i ? f.headerBgColor || "#f8fafc" : e.striped && r % 2 == 1 ? "#f8fafc" : f.contentBgColor || "#ffffff", s = i ? f.headerTextColor || "#1e293b" : f.contentTextColor || "#475569", c = i ? f.headerTextAlign || "left" : f.contentTextAlign || "left";
1207
1202
  return `<tr>${n.map((e) => {
1208
- let n = V({
1209
- padding: g.cellPadding || "8px",
1203
+ let n = R({
1204
+ padding: f.cellPadding || "8px",
1210
1205
  border: t,
1211
1206
  backgroundColor: o,
1212
1207
  color: s,
1213
1208
  textAlign: c,
1214
- lineHeight: g.contentLineHeight,
1215
- letterSpacing: g.contentLetterSpacing,
1209
+ lineHeight: f.contentLineHeight,
1210
+ letterSpacing: f.contentLetterSpacing,
1216
1211
  fontWeight: i ? "700" : void 0
1217
1212
  });
1218
1213
  return `<${a} style="${n}">${e || "&nbsp;"}</${a}>`;
1219
1214
  }).join("")}</tr>`;
1220
- }, r = e.enableHeader && e.cells.length > 0 ? `<thead>${n(e.cells[0], 0, !0)}</thead>` : "", i = +!!e.enableHeader, o = e.enableFooter ? e.cells.length - 1 : e.cells.length, s = e.cells.slice(i, Math.max(i, o)).map((e, t) => n(e, t, !1)).join(""), c = e.enableFooter && e.cells.length > i ? `<tfoot>${n(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", l = V({
1215
+ }, r = e.enableHeader && e.cells.length > 0 ? `<thead>${n(e.cells[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, !1)).join(""), s = e.enableFooter && e.cells.length > i ? `<tfoot>${n(e.cells[e.cells.length - 1], e.cells.length - 1, !1)}</tfoot>` : "", c = R({
1221
1216
  borderCollapse: "collapse",
1222
1217
  width: "100%"
1223
1218
  });
1224
- return `<div${y} style="${V({
1225
- padding: g.padding,
1226
- margin: g.margin,
1219
+ return `<div${h} style="${R({
1220
+ padding: f.padding,
1221
+ margin: f.margin,
1227
1222
  overflowX: "auto"
1228
- })}"><table style="${l}">${r}<tbody>${s}</tbody>${c}</table></div>`;
1223
+ })}"><table style="${c}">${r}<tbody>${o}</tbody>${s}</table></div>`;
1229
1224
  }
1230
1225
  case "video": {
1231
- let e = n(v.videoUrl), t = v.linkType === "email" ? `mailto:${v.href || ""}` : v.href || v.videoUrl || "#", r = v.target || "_blank";
1232
- return `<div${y} style="${V({
1233
- padding: g.padding,
1234
- margin: g.margin,
1235
- borderRadius: g.borderRadius,
1226
+ let e = r(m.videoUrl), t = m.linkType === "email" ? `mailto:${m.href || ""}` : m.href || m.videoUrl || "#", n = m.target || "_blank";
1227
+ return `<div${h} style="${R({
1228
+ padding: f.padding,
1229
+ margin: f.margin,
1230
+ borderRadius: f.borderRadius,
1236
1231
  overflow: "hidden"
1237
- })}"><a href="${K(t)}" target="${K(r)}" style="position: relative; display: block; text-decoration: none;"><img src="${K(e.thumbnailUrl)}" alt="${K(v.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>`;
1232
+ })}"><a href="${U(t)}" target="${U(n)}" style="position: relative; display: block; text-decoration: none;"><img src="${U(e.thumbnailUrl)}" alt="${U(m.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>`;
1238
1233
  }
1239
1234
  case "timer": {
1240
- let e = v.showLabels !== !1, t = V({
1241
- fontFamily: g.digitsFontFamily,
1242
- fontSize: g.digitsFontSize || "40px",
1243
- color: g.digitsColor || "#1e293b",
1235
+ let e = m.showLabels !== !1, t = R({
1236
+ fontFamily: f.digitsFontFamily,
1237
+ fontSize: f.digitsFontSize || "40px",
1238
+ color: f.digitsColor || "#1e293b",
1244
1239
  fontWeight: "800"
1245
- }), n = V({
1246
- fontFamily: g.labelsFontFamily,
1247
- fontSize: g.labelsFontSize || "16px",
1248
- color: g.labelsColor || "#64748b"
1249
- }), r = V({
1250
- backgroundColor: g.backgroundColor || "#f8fafc",
1251
- borderRadius: g.borderRadius || "8px",
1252
- padding: g.padding || "16px",
1240
+ }), r = R({
1241
+ fontFamily: f.labelsFontFamily,
1242
+ fontSize: f.labelsFontSize || "16px",
1243
+ color: f.labelsColor || "#64748b"
1244
+ }), i = R({
1245
+ backgroundColor: f.backgroundColor || "#f8fafc",
1246
+ borderRadius: f.borderRadius || "8px",
1247
+ padding: f.padding || "16px",
1253
1248
  textAlign: "center"
1254
- }), 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>`, a = f(v.targetDate), o = K(v.targetDate || "2026-12-31T23:59:59"), s = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${h.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>`;
1255
- return `<div${y} data-plexo-target="${o}" style="${r}"><div>${i("days", "Days", a.days)}${i("hours", "Hours", a.hours)}${i("minutes", "Mins", a.minutes)}${i("seconds", "Secs", a.seconds)}</div>${s}</div>`;
1249
+ }), a = (n, i, a) => `<div style="display: inline-flex; flex-direction: column; align-items: center; padding: 0 10px;"><span data-unit="${n}" style="${t}">${a}</span>${e ? `<span style="${r}">${i}</span>` : ""}</div>`, o = n(m.targetDate), s = U(m.targetDate || "2026-12-31T23:59:59"), c = `<script>(function(){var wrap=document.querySelector(${JSON.stringify(`[data-plexo-id="${d.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>`;
1250
+ return `<div${h} 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>${c}</div>`;
1256
1251
  }
1257
1252
  case "carousel": {
1258
- let e = Array.isArray(v.images) ? v.images : [], t = V({
1259
- padding: g.padding || "10px",
1260
- margin: g.margin,
1261
- backgroundColor: g.backgroundColor,
1253
+ let e = Array.isArray(m.images) ? m.images : [], t = R({
1254
+ padding: f.padding || "10px",
1255
+ margin: f.margin,
1256
+ backgroundColor: f.backgroundColor,
1262
1257
  position: "relative",
1263
1258
  overflow: "hidden",
1264
1259
  borderRadius: "12px"
1265
1260
  });
1266
- if (e.length === 0) return `<div${y} style="${t}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1267
- let n = Math.min(e.length - 1, Math.max(0, parseInt(String(v.activeIdx), 10) || 0)), r = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === n ? "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(""), 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>` : "";
1268
- return `<div${y} 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="${h.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>`;
1261
+ if (e.length === 0) return `<div${h} style="${t}"><div style="padding: 40px; text-align: center; color: #94a3b8;">No images in carousel</div></div>`;
1262
+ let n = Math.min(e.length - 1, Math.max(0, parseInt(String(m.activeIdx), 10) || 0)), r = e.map((e, t) => `<div data-slide-idx="${t}" style="display: ${t === n ? "block" : "none"};"><img src="${U(e.src)}" alt="${U(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;">${U(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>` : "";
1263
+ return `<div${h} 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="${d.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>`;
1269
1264
  }
1270
- default: return X(h.type);
1265
+ default: return q(d.type);
1271
1266
  }
1272
- }, Q = (e, t) => {
1267
+ }, Y = (e, t) => {
1273
1268
  if (!e || typeof e != "object") return "";
1274
- let n = B(e);
1269
+ let n = L(e);
1275
1270
  if (!n) 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. -->`;
1276
- let r = V(n.style || {}), i = q("id", n.htmlId), a = q("class", n.htmlClass), o = n.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1277
- W(t, o, n.style, "tablet", n.styleTablet), W(t, o, n.style, "mobile", n.styleMobile);
1271
+ let r = R(n.style || {}), i = W("id", n.htmlId), a = W("class", n.htmlClass), o = n.id || `row-${Math.random().toString(36).substring(2, 9)}`;
1272
+ V(t, o, n.style, "tablet", n.styleTablet), V(t, o, n.style, "mobile", n.styleMobile);
1278
1273
  let s = `\n <!-- ROW START: ${n.id || "row"} -->`;
1279
1274
  s += `\n <div data-plexo-id="${o}"${i}${a} class="plexo-row" style="display: flex; flex-wrap: wrap; margin-left: -8px; margin-right: -8px; ${r}">`;
1280
1275
  let c = Array.isArray(n.columns) ? n.columns : [];
1281
1276
  for (let e of c) {
1282
1277
  if (!e) continue;
1283
- let n = e.styles || e.style || {}, r = V(n), i = q("id", e.attrs?.htmlId), a = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", o = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1284
- W(t, o, n, "tablet", e.stylesTablet), W(t, o, n, "mobile", e.stylesMobile), s += `\n <!-- COLUMN START: ${e.id || "col"} -->`, s += `\n <div data-plexo-id="${o}"${i} class="plexo-col${a}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; ${r}">`;
1278
+ let n = e.styles || e.style || {}, r = R(n), i = W("id", e.attrs?.htmlId), a = e.attrs?.htmlClass ? ` ${e.attrs.htmlClass}` : "", o = e.id || `col-${Math.random().toString(36).substring(2, 9)}`;
1279
+ V(t, o, n, "tablet", e.stylesTablet), V(t, o, n, "mobile", e.stylesMobile), s += `\n <!-- COLUMN START: ${e.id || "col"} -->`, s += `\n <div data-plexo-id="${o}"${i} class="plexo-col${a}" style="box-sizing: border-box; padding-left: 8px; padding-right: 8px; width: ${e.width || "100%"}; ${r}">`;
1285
1280
  let c = Array.isArray(e.elements) ? e.elements : [];
1286
1281
  for (let e of c) {
1287
1282
  if (!e) continue;
1288
- let n = e.attributes || {}, r = typeof n.htmlClassNames == "string" ? n.htmlClassNames : typeof n.htmlClass == "string" ? n.htmlClass : typeof n.className == "string" ? n.className : "", i = q("id", n.htmlId), a = q("class", r), o = e.style?.display, c = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
1289
- W(t, e.id, e.style, "tablet", e.styleTablet), W(t, e.id, e.style, "mobile", e.styleMobile), s += `\n <div${i}${a} style="${c}">`, s += `\n ${Z(e)}`, s += "\n </div>";
1283
+ let n = e.attributes || {}, r = typeof n.htmlClassNames == "string" ? n.htmlClassNames : typeof n.htmlClass == "string" ? n.htmlClass : typeof n.className == "string" ? n.className : "", i = W("id", n.htmlId), a = W("class", r), o = e.style?.display, c = o === "inline-block" || o === "inline" || o === "inline-flex" ? `margin-bottom: 16px; display: ${o}; vertical-align: top;` : "margin-bottom: 16px;";
1284
+ V(t, e.id, e.style, "tablet", e.styleTablet), V(t, e.id, e.style, "mobile", e.styleMobile), s += `\n <div${i}${a} style="${c}">`, s += `\n ${J(e)}`, s += "\n </div>";
1290
1285
  }
1291
1286
  let l = Array.isArray(e.nestedRows) ? e.nestedRows : [];
1292
- for (let e of l) s += Q(e, t);
1287
+ for (let e of l) s += Y(e, t);
1293
1288
  s += "\n </div>";
1294
1289
  }
1295
1290
  return s += "\n </div>", s;
1296
- }, $ = (e) => {
1291
+ }, X = (e) => {
1297
1292
  if (!e || typeof e != "object") return "<!-- Empty template -->";
1298
1293
  let t = e.designJson || e.template || e, n = t.body || (Array.isArray(t.rows) ? {
1299
1294
  style: t.style || {},
@@ -1320,20 +1315,20 @@ var Z = (h) => {
1320
1315
  "textColor"
1321
1316
  ], a = {};
1322
1317
  for (let e of Object.keys(r)) i.includes(e) || (a[e] = r[e]);
1323
- let o = V(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 = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], p = T(w(f, [r.fontFamily])), m = {
1318
+ let o = R(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 = W("id", r.htmlId), l = W("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 = Array.isArray(n.rows) ? n.rows : Array.isArray(t.rows) ? t.rows : Array.isArray(e.rows) ? e.rows : [], p = x(b(f, [r.fontFamily])), m = {
1324
1319
  tablet: [],
1325
1320
  mobile: []
1326
1321
  }, h = "";
1327
- for (let e of f) h += Q(e, m);
1322
+ for (let e of f) h += Y(e, m);
1328
1323
  let g = m.tablet.length ? `\n ${m.tablet.join("\n ")}` : "", _ = m.mobile.length ? `\n ${m.mobile.join("\n ")}` : "", v = `<!DOCTYPE html>
1329
1324
  <html>
1330
1325
  <head>
1331
1326
  <meta charset="utf-8">
1332
- <title>${K(s)}</title>
1327
+ <title>${U(s)}</title>
1333
1328
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
1334
1329
  ${p ? `<link rel="stylesheet" href="${p}">` : ""}
1335
1330
  <style>
1336
- body { margin: 0; font-family: ${L}; }
1331
+ body { margin: 0; font-family: ${P}; }
1337
1332
  .plexo-row {
1338
1333
  display: flex;
1339
1334
  flex-wrap: wrap;
@@ -1363,14 +1358,14 @@ ${d ? ` <script>\n${d}\n <\/script>` : ""}
1363
1358
  </body>
1364
1359
  </html>`, v = v.replace(/<span[^>]*data-merge-val="([^"]*)"[^>]*>[\s\S]*?<\/span>/gi, "$1"), v;
1365
1360
  };
1366
- function te(e) {
1367
- return $(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1361
+ function Z(e) {
1362
+ return X(e).replace(/<[^>]*>/g, " ").replace(/\s+/g, " ").trim();
1368
1363
  }
1369
- function ne(e) {
1370
- return $(e);
1364
+ function Q(e) {
1365
+ return X(e);
1371
1366
  }
1372
- function re(e) {
1367
+ function $(e) {
1373
1368
  return e;
1374
1369
  }
1375
1370
  //#endregion
1376
- export { S as _, ne as a, g as b, G as c, I as d, T as f, b as g, _ as h, $ as i, H as l, x as m, J as n, te as o, w as p, W as r, B as s, L as t, re as u, v, h as x, y };
1371
+ export { v as _, Q as a, f as b, H as c, N as d, x as f, g, p as h, X as i, z as l, _ as m, G as n, Z as o, b as p, V as r, L as s, P as t, $ as u, m as v, d as x, h as y };