@charisol/plexo-sdk 1.1.3 → 1.1.4
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.
- package/dist/{compiler-Do7SiKdp.js → compiler-BpXCk9OP.js} +177 -189
- package/dist/compiler.js +1 -1
- package/dist/compilerClient.js +94 -90
- package/dist/{iconSvgStatic-DKNX8fUj.js → iconSvgStatic-CeiuMavi.js} +62 -50
- package/dist/index.js +387 -387
- package/dist/utilities/elementResolvers.d.ts +8 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l,
|
|
2
|
-
import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as ee, i as C, m as w, n as T, o as te, p as ne, r as re, u as ie, x as ae, y as oe } from "./compiler-
|
|
1
|
+
import { _ as e, a as t, c as n, d as r, f as i, g as a, h as o, i as s, l as c, m as l, o as u, p as d, r as f, s as p, u as m, v as h } from "./iconSvgStatic-CeiuMavi.js";
|
|
2
|
+
import { _ as g, a as _, b as v, c as y, d as b, f as x, g as S, h as ee, i as C, m as w, n as T, o as te, p as ne, r as re, u as ie, x as ae, y as oe } from "./compiler-BpXCk9OP.js";
|
|
3
3
|
import { parseJsonToTargetFormat as se } from "./compilerClient.js";
|
|
4
4
|
import ce, { createContext as le, createElement as E, forwardRef as ue, useCallback as de, useContext as fe, useEffect as D, useImperativeHandle as pe, useMemo as me, useRef as he, useState as O } from "react";
|
|
5
5
|
import { DndContext as ge, DragOverlay as k, PointerSensor as _e, TouchSensor as A, pointerWithin as ve, rectIntersection as ye, useDraggable as be, useDroppable as xe, useSensor as j, useSensors as Se } from "@dnd-kit/core";
|
|
@@ -206,47 +206,47 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
206
206
|
template: r
|
|
207
207
|
} : {};
|
|
208
208
|
}),
|
|
209
|
-
addElement: (n, r, i,
|
|
210
|
-
let n = JSON.parse(JSON.stringify(t.template)),
|
|
209
|
+
addElement: (n, r, i, a) => t((t) => {
|
|
210
|
+
let n = JSON.parse(JSON.stringify(t.template)), o = (e, t) => {
|
|
211
211
|
for (let n of e) for (let e of n.columns) {
|
|
212
212
|
if (e.id === t) return e;
|
|
213
|
-
let n =
|
|
213
|
+
let n = o(e.nestedRows || [], t);
|
|
214
214
|
if (n) return n;
|
|
215
215
|
}
|
|
216
216
|
return null;
|
|
217
|
-
},
|
|
218
|
-
if (!
|
|
219
|
-
let
|
|
220
|
-
return
|
|
217
|
+
}, s = o(n.body.rows, r);
|
|
218
|
+
if (!s) return {};
|
|
219
|
+
let c = Me(i), l = e(s);
|
|
220
|
+
return s.elements.push(c), s.childOrder = h(l, c.id, a), {
|
|
221
221
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
222
222
|
future: [],
|
|
223
223
|
template: n
|
|
224
224
|
};
|
|
225
225
|
}),
|
|
226
|
-
moveElement: (n, r, i,
|
|
227
|
-
let r = JSON.parse(JSON.stringify(t.template)),
|
|
226
|
+
moveElement: (n, r, i, a) => t((t) => {
|
|
227
|
+
let r = JSON.parse(JSON.stringify(t.template)), o = (e, t) => {
|
|
228
228
|
for (let n of e) for (let e of n.columns) {
|
|
229
229
|
if (e.id === t) return e;
|
|
230
|
-
let n =
|
|
230
|
+
let n = o(e.nestedRows || [], t);
|
|
231
231
|
if (n) return n;
|
|
232
232
|
}
|
|
233
233
|
return null;
|
|
234
|
-
},
|
|
234
|
+
}, s = o(r.body.rows, i), c = s ? e(s).indexOf(n) : -1, l = (e) => {
|
|
235
235
|
for (let t of e) for (let e of t.columns) {
|
|
236
236
|
let t = e.elements.findIndex((e) => e.id === n);
|
|
237
237
|
if (t !== -1) return e.elements.splice(t, 1)[0];
|
|
238
|
-
let r =
|
|
238
|
+
let r = l(e.nestedRows || []);
|
|
239
239
|
if (r) return r;
|
|
240
240
|
}
|
|
241
241
|
return null;
|
|
242
|
-
},
|
|
242
|
+
}, u = l(r.body.rows);
|
|
243
|
+
if (!u) return {};
|
|
244
|
+
let d = o(r.body.rows, i);
|
|
243
245
|
if (!d) return {};
|
|
244
|
-
let f =
|
|
245
|
-
|
|
246
|
-
let p
|
|
247
|
-
f.
|
|
248
|
-
let m;
|
|
249
|
-
return typeof o == "number" ? (m = o, l !== -1 && l < m && --m) : m = p.length, f.childOrder = e(p, n, m), {
|
|
246
|
+
let f = e(d).filter((e) => e !== n);
|
|
247
|
+
d.elements.push(u);
|
|
248
|
+
let p;
|
|
249
|
+
return typeof a == "number" ? (p = a, c !== -1 && c < p && --p) : p = f.length, d.childOrder = h(f, n, p), {
|
|
250
250
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
251
251
|
future: [],
|
|
252
252
|
template: r
|
|
@@ -299,21 +299,21 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
299
299
|
};
|
|
300
300
|
}),
|
|
301
301
|
duplicateElement: (n) => t((t) => {
|
|
302
|
-
let r = JSON.parse(JSON.stringify(t.template)), i = null,
|
|
302
|
+
let r = JSON.parse(JSON.stringify(t.template)), i = null, a = -1, o = null, s = (e) => {
|
|
303
303
|
for (let t of e) for (let e of t.columns) {
|
|
304
304
|
let t = e.elements.findIndex((e) => e.id === n);
|
|
305
|
-
if (t !== -1) return i = e,
|
|
306
|
-
if (
|
|
305
|
+
if (t !== -1) return i = e, a = t, o = e.elements[t], !0;
|
|
306
|
+
if (s(e.nestedRows || [])) return !0;
|
|
307
307
|
}
|
|
308
308
|
return !1;
|
|
309
309
|
};
|
|
310
|
-
if (
|
|
311
|
-
let
|
|
312
|
-
|
|
313
|
-
let
|
|
314
|
-
|
|
315
|
-
let
|
|
316
|
-
return
|
|
310
|
+
if (s(r.body.rows), !i || !o) return {};
|
|
311
|
+
let c = JSON.parse(JSON.stringify(o));
|
|
312
|
+
c.id = `elem-${c.type}-${Date.now()}`;
|
|
313
|
+
let l = i, u = e(l);
|
|
314
|
+
l.elements.splice(a + 1, 0, c);
|
|
315
|
+
let d = u.indexOf(n);
|
|
316
|
+
return l.childOrder = h(u, c.id, d === -1 ? void 0 : d + 1), {
|
|
317
317
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
318
318
|
future: [],
|
|
319
319
|
template: r
|
|
@@ -523,19 +523,19 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
523
523
|
template: i
|
|
524
524
|
}) : {};
|
|
525
525
|
}),
|
|
526
|
-
nestRowInColumn: (n, r, i,
|
|
527
|
-
let
|
|
528
|
-
if (
|
|
529
|
-
let [
|
|
526
|
+
nestRowInColumn: (n, r, i, a) => t((t) => {
|
|
527
|
+
let o = JSON.parse(JSON.stringify(t.template)), s = o.body.rows.findIndex((e) => e.id === n);
|
|
528
|
+
if (s === -1) return {};
|
|
529
|
+
let [c] = o.body.rows.splice(s, 1), l = o.body.rows.find((e) => e.id === r);
|
|
530
|
+
if (!l) return {};
|
|
531
|
+
let u = l.columns.find((e) => e.id === i);
|
|
530
532
|
if (!u) return {};
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
let f = a(d);
|
|
535
|
-
return d.nestedRows.push(l), d.childOrder = e(f, n, o), {
|
|
533
|
+
u.nestedRows ||= [];
|
|
534
|
+
let d = e(u);
|
|
535
|
+
return u.nestedRows.push(c), u.childOrder = h(d, n, a), {
|
|
536
536
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
537
537
|
future: [],
|
|
538
|
-
template:
|
|
538
|
+
template: o
|
|
539
539
|
};
|
|
540
540
|
}),
|
|
541
541
|
moveNestedRowToTopLevel: (e, n, r, i) => t((t) => {
|
|
@@ -561,20 +561,20 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
561
561
|
template: a
|
|
562
562
|
};
|
|
563
563
|
}),
|
|
564
|
-
moveNestedRowBetweenColumns: (n, r, i, o, s
|
|
565
|
-
let
|
|
564
|
+
moveNestedRowBetweenColumns: (n, r, i, a, o, s) => t((t) => {
|
|
565
|
+
let c = JSON.parse(JSON.stringify(t.template)), l = (e, t, n) => {
|
|
566
566
|
for (let r of e) {
|
|
567
567
|
if (r.id === n) {
|
|
568
568
|
let e = r.columns.find((e) => e.id === t);
|
|
569
569
|
if (e) return e;
|
|
570
570
|
}
|
|
571
571
|
for (let e of r.columns) {
|
|
572
|
-
let r =
|
|
572
|
+
let r = l(e.nestedRows || [], t, n);
|
|
573
573
|
if (r) return r;
|
|
574
574
|
}
|
|
575
575
|
}
|
|
576
576
|
return null;
|
|
577
|
-
},
|
|
577
|
+
}, u = l(c.body.rows, o, a), d = u ? e(u).indexOf(n) : -1, f = (e) => {
|
|
578
578
|
for (let t of e) for (let e of t.columns) {
|
|
579
579
|
if (e.id === i && t.id === r) {
|
|
580
580
|
let t = (e.nestedRows || []).findIndex((e) => e.id === n);
|
|
@@ -583,22 +583,22 @@ var R = Object.defineProperty, Ee = (e, t) => {
|
|
|
583
583
|
return n;
|
|
584
584
|
}
|
|
585
585
|
}
|
|
586
|
-
let a =
|
|
586
|
+
let a = f(e.nestedRows || []);
|
|
587
587
|
if (a) return a;
|
|
588
588
|
}
|
|
589
589
|
return null;
|
|
590
|
-
},
|
|
590
|
+
}, p = f(c.body.rows);
|
|
591
|
+
if (!p) return {};
|
|
592
|
+
let m = l(c.body.rows, o, a);
|
|
591
593
|
if (!m) return {};
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
let g = a(h).filter((e) => e !== n);
|
|
596
|
-
h.nestedRows.push(m);
|
|
594
|
+
m.nestedRows ||= [];
|
|
595
|
+
let g = e(m).filter((e) => e !== n);
|
|
596
|
+
m.nestedRows.push(p);
|
|
597
597
|
let _;
|
|
598
|
-
return typeof
|
|
598
|
+
return typeof s == "number" ? (_ = s, d !== -1 && d < _ && --_) : _ = g.length, m.childOrder = h(g, n, _), {
|
|
599
599
|
past: [...t.past, JSON.parse(JSON.stringify(t.template))],
|
|
600
600
|
future: [],
|
|
601
|
-
template:
|
|
601
|
+
template: c
|
|
602
602
|
};
|
|
603
603
|
})
|
|
604
604
|
})), Fe = "https://plexo.charisol.io";
|
|
@@ -45488,7 +45488,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45488
45488
|
style: a
|
|
45489
45489
|
}), /* @__PURE__ */ P(ce.Fragment, { children: [o, s] }, t);
|
|
45490
45490
|
}, GV = (e) => {
|
|
45491
|
-
let t = BV(e.style), n =
|
|
45491
|
+
let t = BV(e.style), n = i(e), r = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
|
|
45492
45492
|
return /* @__PURE__ */ N("div", {
|
|
45493
45493
|
"data-plexo-id": e.id,
|
|
45494
45494
|
style: {
|
|
@@ -45497,7 +45497,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45497
45497
|
display: "flex",
|
|
45498
45498
|
flexWrap: "wrap",
|
|
45499
45499
|
gap: e.style?.iconSpacing || "8px",
|
|
45500
|
-
justifyContent:
|
|
45500
|
+
justifyContent: r
|
|
45501
45501
|
},
|
|
45502
45502
|
children: n.map((e, t) => /* @__PURE__ */ N("a", {
|
|
45503
45503
|
href: e.url,
|
|
@@ -45518,7 +45518,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45518
45518
|
}, t))
|
|
45519
45519
|
}, e.id);
|
|
45520
45520
|
}, KV = (e) => {
|
|
45521
|
-
let t = BV(e.style), n =
|
|
45521
|
+
let t = BV(e.style), n = r(e), i = t.textAlign === "center" ? "center" : t.textAlign === "right" ? "flex-end" : "flex-start";
|
|
45522
45522
|
return /* @__PURE__ */ N("div", {
|
|
45523
45523
|
"data-plexo-id": e.id,
|
|
45524
45524
|
style: {
|
|
@@ -45526,7 +45526,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45526
45526
|
display: "flex",
|
|
45527
45527
|
flexWrap: "wrap",
|
|
45528
45528
|
gap: 16,
|
|
45529
|
-
justifyContent:
|
|
45529
|
+
justifyContent: i
|
|
45530
45530
|
},
|
|
45531
45531
|
children: n.map((e, n) => /* @__PURE__ */ N("a", {
|
|
45532
45532
|
href: e.href,
|
|
@@ -45539,7 +45539,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45539
45539
|
}, n))
|
|
45540
45540
|
}, e.id);
|
|
45541
45541
|
}, qV = (e) => {
|
|
45542
|
-
let t = BV(e.style), n = e.attributes || {}, r = t.fontSize || `${n.iconSize || 48}px`, i = t.color || "#1e293b", a = parseInt(String(r), 10) || 48, o = pN[
|
|
45542
|
+
let t = BV(e.style), n = e.attributes || {}, r = t.fontSize || `${n.iconSize || 48}px`, i = t.color || "#1e293b", a = parseInt(String(r), 10) || 48, o = pN[m(n.iconName, Object.keys(pN))] || sc, s = t.textAlign === "right" ? "flex-end" : t.textAlign === "left" ? "flex-start" : "center", c = typeof n.href == "string" ? n.href.trim() : "", l = /* @__PURE__ */ N("span", {
|
|
45543
45543
|
style: {
|
|
45544
45544
|
display: "inline-flex",
|
|
45545
45545
|
alignItems: "center",
|
|
@@ -45558,19 +45558,19 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45558
45558
|
display: "flex",
|
|
45559
45559
|
justifyContent: s
|
|
45560
45560
|
},
|
|
45561
|
-
children:
|
|
45561
|
+
children: c ? /* @__PURE__ */ N("a", {
|
|
45562
45562
|
"data-plexo-id": e.id,
|
|
45563
|
-
href:
|
|
45563
|
+
href: c,
|
|
45564
45564
|
target: n.openInNewTab ? "_blank" : "_self",
|
|
45565
45565
|
style: { textDecoration: "none" },
|
|
45566
|
-
children:
|
|
45566
|
+
children: l
|
|
45567
45567
|
}) : /* @__PURE__ */ N("span", {
|
|
45568
45568
|
"data-plexo-id": e.id,
|
|
45569
|
-
children:
|
|
45569
|
+
children: l
|
|
45570
45570
|
})
|
|
45571
45571
|
}, e.id);
|
|
45572
45572
|
}, JV = (e) => {
|
|
45573
|
-
let t = BV(e.style), n =
|
|
45573
|
+
let t = BV(e.style), n = d(e), r = `${t.borderWidth || "1px"} ${t.borderStyle || "solid"} ${t.borderColor || "#cbd5e1"}`, i = (e, i, a, o) => {
|
|
45574
45574
|
let s = a ? "th" : "td", c = a ? t.headerBgColor || "#f8fafc" : n.striped && i % 2 == 1 ? "#f8fafc" : t.contentBgColor || "#ffffff", l = a ? t.headerTextColor || "#1e293b" : t.contentTextColor || "#475569", u = a ? t.headerTextAlign || "left" : t.contentTextAlign || "left";
|
|
45575
45575
|
return /* @__PURE__ */ N("tr", { children: e.map((e, n) => /* @__PURE__ */ N(s, {
|
|
45576
45576
|
style: {
|
|
@@ -45585,7 +45585,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45585
45585
|
},
|
|
45586
45586
|
children: e || "\xA0"
|
|
45587
45587
|
}, n)) }, o);
|
|
45588
|
-
},
|
|
45588
|
+
}, a = +!!n.enableHeader, o = n.enableFooter ? n.cells.length - 1 : n.cells.length;
|
|
45589
45589
|
return /* @__PURE__ */ N("div", {
|
|
45590
45590
|
"data-plexo-id": e.id,
|
|
45591
45591
|
style: {
|
|
@@ -45599,14 +45599,14 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45599
45599
|
width: "100%"
|
|
45600
45600
|
},
|
|
45601
45601
|
children: [
|
|
45602
|
-
n.enableHeader && n.cells.length > 0 && /* @__PURE__ */ N("thead", { children:
|
|
45603
|
-
/* @__PURE__ */ N("tbody", { children: n.cells.slice(
|
|
45604
|
-
n.enableFooter && n.cells.length >
|
|
45602
|
+
n.enableHeader && n.cells.length > 0 && /* @__PURE__ */ N("thead", { children: i(n.cells[0], 0, !0, "head") }),
|
|
45603
|
+
/* @__PURE__ */ N("tbody", { children: n.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, t, !1, `body-${t}`)) }),
|
|
45604
|
+
n.enableFooter && n.cells.length > a && /* @__PURE__ */ N("tfoot", { children: i(n.cells[n.cells.length - 1], n.cells.length - 1, !1, "foot") })
|
|
45605
45605
|
]
|
|
45606
45606
|
})
|
|
45607
45607
|
}, e.id);
|
|
45608
45608
|
}, YV = (e) => {
|
|
45609
|
-
let t = BV(e.style), n = e.attributes || {}, r =
|
|
45609
|
+
let t = BV(e.style), n = e.attributes || {}, r = o(n.videoUrl), i = n.linkType === "email" ? `mailto:${n.href || ""}` : n.href || n.videoUrl || "#", a = n.target || "_blank";
|
|
45610
45610
|
return /* @__PURE__ */ N("div", {
|
|
45611
45611
|
"data-plexo-id": e.id,
|
|
45612
45612
|
style: {
|
|
@@ -45661,7 +45661,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45661
45661
|
let e = setInterval(() => i(Date.now()), 1e3);
|
|
45662
45662
|
return () => clearInterval(e);
|
|
45663
45663
|
}, []);
|
|
45664
|
-
let a =
|
|
45664
|
+
let a = l(n.targetDate, n.timezone, r), o = n.showLabels !== !1, s = {
|
|
45665
45665
|
fontFamily: t.digitsFontFamily,
|
|
45666
45666
|
fontSize: t.digitsFontSize || "40px",
|
|
45667
45667
|
color: t.digitsColor || "#1e293b",
|
|
@@ -45670,7 +45670,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45670
45670
|
fontFamily: t.labelsFontFamily,
|
|
45671
45671
|
fontSize: t.labelsFontSize || "16px",
|
|
45672
45672
|
color: t.labelsColor || "#64748b"
|
|
45673
|
-
},
|
|
45673
|
+
}, u = (e, t, n) => /* @__PURE__ */ P("div", {
|
|
45674
45674
|
style: {
|
|
45675
45675
|
display: "inline-flex",
|
|
45676
45676
|
flexDirection: "column",
|
|
@@ -45694,10 +45694,10 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45694
45694
|
textAlign: "center"
|
|
45695
45695
|
},
|
|
45696
45696
|
children: /* @__PURE__ */ P("div", { children: [
|
|
45697
|
-
|
|
45698
|
-
|
|
45699
|
-
|
|
45700
|
-
|
|
45697
|
+
u("Days", a.days, "d"),
|
|
45698
|
+
u("Hours", a.hours, "h"),
|
|
45699
|
+
u("Mins", a.minutes, "m"),
|
|
45700
|
+
u("Secs", a.seconds, "s")
|
|
45701
45701
|
] })
|
|
45702
45702
|
});
|
|
45703
45703
|
}, ZV = ({ elem: e }) => {
|
|
@@ -45806,7 +45806,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45806
45806
|
]
|
|
45807
45807
|
});
|
|
45808
45808
|
}, QV = ({ elem: e }) => {
|
|
45809
|
-
let t = BV(e.style), n = e.attributes || {}, r = me(() =>
|
|
45809
|
+
let t = BV(e.style), n = e.attributes || {}, r = me(() => f(e), [e]), i = n.mode === "multi" ? "multi" : "single", a = n.iconStyle || "chevron", o = n.iconPosition === "left", s = n.showDividers !== !1, c = n.animation !== "none", [l, u] = O(me(() => {
|
|
45810
45810
|
let e = /* @__PURE__ */ new Set(), t = (n, r) => {
|
|
45811
45811
|
n.forEach((n, i) => {
|
|
45812
45812
|
let a = r ? `${r}.${i}` : `${i}`;
|
|
@@ -45814,8 +45814,8 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45814
45814
|
});
|
|
45815
45815
|
};
|
|
45816
45816
|
return t(r, ""), e;
|
|
45817
|
-
}, [r])),
|
|
45818
|
-
|
|
45817
|
+
}, [r])), d = (e, t) => {
|
|
45818
|
+
u((n) => {
|
|
45819
45819
|
let r = new Set(n), a = r.has(e);
|
|
45820
45820
|
return i !== "multi" && t.forEach((e) => r.delete(e)), a ? r.delete(e) : r.add(e), r;
|
|
45821
45821
|
});
|
|
@@ -45863,7 +45863,7 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45863
45863
|
children: [/* @__PURE__ */ P("button", {
|
|
45864
45864
|
type: "button",
|
|
45865
45865
|
"aria-expanded": u,
|
|
45866
|
-
onClick: () =>
|
|
45866
|
+
onClick: () => d(a, r),
|
|
45867
45867
|
style: {
|
|
45868
45868
|
width: "100%",
|
|
45869
45869
|
display: "flex",
|
|
@@ -45925,31 +45925,31 @@ var HV = ({ html: e, className: t, style: n, tag: r = "div", dataPlexoId: i }) =
|
|
|
45925
45925
|
function $V(e) {
|
|
45926
45926
|
return null;
|
|
45927
45927
|
}
|
|
45928
|
-
var eH = ({ template:
|
|
45929
|
-
let
|
|
45928
|
+
var eH = ({ template: r, customCss: i, className: a, style: o }) => {
|
|
45929
|
+
let s = me(() => {
|
|
45930
45930
|
try {
|
|
45931
|
-
let
|
|
45932
|
-
typeof
|
|
45933
|
-
let
|
|
45934
|
-
return
|
|
45931
|
+
let e = r;
|
|
45932
|
+
typeof r == "string" && (e = EV(r));
|
|
45933
|
+
let t = TV(e), n = RV.safeParse(t);
|
|
45934
|
+
return n.success ? n.data : (console.error("PlexoRenderer schema validation failed:", n.error), null);
|
|
45935
45935
|
} catch (e) {
|
|
45936
45936
|
return console.error("PlexoRenderer validation error:", e), null;
|
|
45937
45937
|
}
|
|
45938
|
-
}, [
|
|
45939
|
-
if (!
|
|
45940
|
-
let e =
|
|
45938
|
+
}, [r]), l = me(() => {
|
|
45939
|
+
if (!s) return null;
|
|
45940
|
+
let e = s.body;
|
|
45941
45941
|
return x(ne(e.rows, [e.style?.fontFamily]));
|
|
45942
|
-
}, [
|
|
45943
|
-
if (!
|
|
45942
|
+
}, [s]);
|
|
45943
|
+
if (!s) return /* @__PURE__ */ N("div", {
|
|
45944
45944
|
className: "p-4 border border-rose-500 bg-rose-50/50 text-rose-700 rounded text-sm font-semibold",
|
|
45945
45945
|
children: "Error loading template: Security validation failed."
|
|
45946
45946
|
});
|
|
45947
|
-
let { body:
|
|
45947
|
+
let { body: d } = s, f = BV(d.style), m = {
|
|
45948
45948
|
tablet: [],
|
|
45949
45949
|
mobile: []
|
|
45950
45950
|
}, h = (e) => {
|
|
45951
|
-
let
|
|
45952
|
-
switch (re(
|
|
45951
|
+
let r = BV(e.style), a = e.attributes || {};
|
|
45952
|
+
switch (re(m, e.id, e.style, "tablet", e.styleTablet), re(m, e.id, e.style, "mobile", e.styleMobile), e.type) {
|
|
45953
45953
|
case "text":
|
|
45954
45954
|
case "paragraph": {
|
|
45955
45955
|
let t = e.type === "paragraph" ? "p" : "div";
|
|
@@ -45957,7 +45957,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
45957
45957
|
dataPlexoId: e.id,
|
|
45958
45958
|
tag: t,
|
|
45959
45959
|
html: a.text || "",
|
|
45960
|
-
style:
|
|
45960
|
+
style: r,
|
|
45961
45961
|
className: "plexo-element-text"
|
|
45962
45962
|
}, e.id);
|
|
45963
45963
|
}
|
|
@@ -45974,32 +45974,32 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
45974
45974
|
dataPlexoId: e.id,
|
|
45975
45975
|
tag: n,
|
|
45976
45976
|
html: a.text || "",
|
|
45977
|
-
style:
|
|
45977
|
+
style: r,
|
|
45978
45978
|
className: "plexo-element-heading"
|
|
45979
45979
|
}, e.id);
|
|
45980
45980
|
}
|
|
45981
45981
|
case "button": {
|
|
45982
|
-
let
|
|
45983
|
-
return
|
|
45982
|
+
let n = typeof a.href == "string" ? a.href.trim() : "", i = n && !n.toLowerCase().startsWith("javascript:") && !n.toLowerCase().startsWith("data:"), o = t(e);
|
|
45983
|
+
return i ? /* @__PURE__ */ N("a", {
|
|
45984
45984
|
"data-plexo-id": e.id,
|
|
45985
|
-
href:
|
|
45985
|
+
href: n,
|
|
45986
45986
|
target: "_blank",
|
|
45987
45987
|
rel: "noopener noreferrer",
|
|
45988
45988
|
style: {
|
|
45989
45989
|
display: "inline-block",
|
|
45990
45990
|
textDecoration: "none",
|
|
45991
|
-
...
|
|
45992
|
-
width:
|
|
45993
|
-
height:
|
|
45991
|
+
...r,
|
|
45992
|
+
width: o.width,
|
|
45993
|
+
height: o.height
|
|
45994
45994
|
},
|
|
45995
45995
|
className: "plexo-element-button",
|
|
45996
45996
|
children: a.text || "Button"
|
|
45997
45997
|
}, e.id) : /* @__PURE__ */ N("button", {
|
|
45998
45998
|
"data-plexo-id": e.id,
|
|
45999
45999
|
style: {
|
|
46000
|
-
...
|
|
46001
|
-
width:
|
|
46002
|
-
height:
|
|
46000
|
+
...r,
|
|
46001
|
+
width: o.width,
|
|
46002
|
+
height: o.height
|
|
46003
46003
|
},
|
|
46004
46004
|
className: "plexo-element-button",
|
|
46005
46005
|
disabled: !0,
|
|
@@ -46007,16 +46007,16 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46007
46007
|
}, e.id);
|
|
46008
46008
|
}
|
|
46009
46009
|
case "image": {
|
|
46010
|
-
let t = typeof a.src == "string" ? a.src.trim() : "",
|
|
46010
|
+
let t = typeof a.src == "string" ? a.src.trim() : "", n = t && !t.toLowerCase().startsWith("javascript:") && !t.toLowerCase().startsWith("data:"), i = c(e);
|
|
46011
46011
|
return /* @__PURE__ */ N("img", {
|
|
46012
46012
|
"data-plexo-id": e.id,
|
|
46013
|
-
src:
|
|
46013
|
+
src: n ? t : "",
|
|
46014
46014
|
alt: a.alt || "",
|
|
46015
46015
|
style: {
|
|
46016
46016
|
maxWidth: "100%",
|
|
46017
|
-
...
|
|
46018
|
-
width:
|
|
46019
|
-
height:
|
|
46017
|
+
...r,
|
|
46018
|
+
width: i.width,
|
|
46019
|
+
height: i.height
|
|
46020
46020
|
},
|
|
46021
46021
|
className: "plexo-element-image"
|
|
46022
46022
|
}, e.id);
|
|
@@ -46024,27 +46024,27 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46024
46024
|
case "spacer": return /* @__PURE__ */ N("div", {
|
|
46025
46025
|
"data-plexo-id": e.id,
|
|
46026
46026
|
style: {
|
|
46027
|
-
height:
|
|
46028
|
-
...
|
|
46027
|
+
height: r.height || "24px",
|
|
46028
|
+
...r
|
|
46029
46029
|
},
|
|
46030
46030
|
className: "plexo-element-spacer"
|
|
46031
46031
|
}, e.id);
|
|
46032
46032
|
case "divider": return /* @__PURE__ */ N("div", {
|
|
46033
46033
|
"data-plexo-id": e.id,
|
|
46034
46034
|
style: {
|
|
46035
|
-
padding:
|
|
46036
|
-
...
|
|
46035
|
+
padding: r.padding || "12px 0px",
|
|
46036
|
+
...r
|
|
46037
46037
|
},
|
|
46038
46038
|
className: "plexo-element-divider",
|
|
46039
46039
|
children: /* @__PURE__ */ N("hr", { style: {
|
|
46040
46040
|
border: "none",
|
|
46041
|
-
borderTop: `${
|
|
46041
|
+
borderTop: `${r.borderWidth || "1px"} ${r.borderStyle || "solid"} ${r.borderColor || "#cbd5e1"}`,
|
|
46042
46042
|
margin: 0
|
|
46043
46043
|
} })
|
|
46044
46044
|
}, e.id);
|
|
46045
46045
|
case "card": return /* @__PURE__ */ P("div", {
|
|
46046
46046
|
"data-plexo-id": e.id,
|
|
46047
|
-
style:
|
|
46047
|
+
style: r,
|
|
46048
46048
|
className: "plexo-element-card",
|
|
46049
46049
|
children: [a.title && /* @__PURE__ */ N("h3", {
|
|
46050
46050
|
style: {
|
|
@@ -46058,17 +46058,17 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46058
46058
|
})]
|
|
46059
46059
|
}, e.id);
|
|
46060
46060
|
case "html": {
|
|
46061
|
-
let t = `<!DOCTYPE html><html><head><meta charset="utf-8">${
|
|
46061
|
+
let t = `<!DOCTYPE html><html><head><meta charset="utf-8">${i ? `<style>${i}</style>` : ""}</head><body>${a.htmlContent || ""}</body></html>`;
|
|
46062
46062
|
return /* @__PURE__ */ N("div", {
|
|
46063
46063
|
"data-plexo-id": e.id,
|
|
46064
|
-
style:
|
|
46064
|
+
style: r,
|
|
46065
46065
|
className: "plexo-element-html",
|
|
46066
46066
|
children: /* @__PURE__ */ N("iframe", {
|
|
46067
46067
|
srcDoc: t,
|
|
46068
46068
|
sandbox: "allow-scripts",
|
|
46069
46069
|
style: {
|
|
46070
46070
|
width: "100%",
|
|
46071
|
-
height:
|
|
46071
|
+
height: n(e, "300px"),
|
|
46072
46072
|
border: "none",
|
|
46073
46073
|
backgroundColor: "transparent"
|
|
46074
46074
|
},
|
|
@@ -46077,46 +46077,46 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46077
46077
|
}, e.id);
|
|
46078
46078
|
}
|
|
46079
46079
|
case "form_container": {
|
|
46080
|
-
let
|
|
46080
|
+
let t = e.style || {}, n = {
|
|
46081
46081
|
...y(),
|
|
46082
|
-
...
|
|
46083
|
-
},
|
|
46084
|
-
for (let e of Object.keys(
|
|
46085
|
-
|
|
46086
|
-
let
|
|
46082
|
+
...t
|
|
46083
|
+
}, r = {};
|
|
46084
|
+
for (let e of Object.keys(n)) T.includes(e) || (r[e] = n[e]);
|
|
46085
|
+
r.height = u(e);
|
|
46086
|
+
let i = BV(r), o = p(Array.isArray(a.fields) ? a.fields : []), s = n.fieldSpacing || "12px", c = a.buttonAutoWidth === !1 ? n.buttonWidth || "100%" : "auto", l = n.buttonAlign === "left" ? "flex-start" : n.buttonAlign === "right" ? "flex-end" : "center", d = {
|
|
46087
46087
|
border: 0,
|
|
46088
46088
|
cursor: "pointer",
|
|
46089
46089
|
...BV({
|
|
46090
|
-
backgroundColor:
|
|
46091
|
-
color:
|
|
46092
|
-
borderRadius:
|
|
46093
|
-
paddingTop:
|
|
46094
|
-
paddingBottom:
|
|
46095
|
-
paddingLeft:
|
|
46096
|
-
paddingRight:
|
|
46097
|
-
fontSize:
|
|
46098
|
-
fontWeight:
|
|
46099
|
-
width:
|
|
46090
|
+
backgroundColor: n.buttonBackgroundColor,
|
|
46091
|
+
color: n.buttonTextColor,
|
|
46092
|
+
borderRadius: n.buttonBorderRadius,
|
|
46093
|
+
paddingTop: n.buttonPaddingTop,
|
|
46094
|
+
paddingBottom: n.buttonPaddingBottom,
|
|
46095
|
+
paddingLeft: n.buttonPaddingLeft,
|
|
46096
|
+
paddingRight: n.buttonPaddingRight,
|
|
46097
|
+
fontSize: n.buttonFontSize,
|
|
46098
|
+
fontWeight: n.buttonFontWeight,
|
|
46099
|
+
width: c
|
|
46100
46100
|
})
|
|
46101
|
-
},
|
|
46101
|
+
}, f = typeof a.actionUrl == "string" ? a.actionUrl : typeof a.action == "string" ? a.action : "#", m = typeof a.method == "string" ? a.method : "POST", h = a.submitLabel || "Submit";
|
|
46102
46102
|
return /* @__PURE__ */ P("form", {
|
|
46103
46103
|
"data-plexo-id": e.id,
|
|
46104
|
-
action:
|
|
46104
|
+
action: f,
|
|
46105
46105
|
method: m,
|
|
46106
|
-
style:
|
|
46106
|
+
style: i,
|
|
46107
46107
|
className: "plexo-element-form",
|
|
46108
|
-
children: [
|
|
46109
|
-
style: { marginBottom:
|
|
46108
|
+
children: [o.map((e, t) => /* @__PURE__ */ N("div", {
|
|
46109
|
+
style: { marginBottom: s },
|
|
46110
46110
|
children: WV(e, t)
|
|
46111
46111
|
}, e?.name || e?.label || t)), /* @__PURE__ */ N("div", {
|
|
46112
46112
|
style: {
|
|
46113
46113
|
display: "flex",
|
|
46114
46114
|
width: "100%",
|
|
46115
|
-
justifyContent:
|
|
46115
|
+
justifyContent: l
|
|
46116
46116
|
},
|
|
46117
46117
|
children: /* @__PURE__ */ N("button", {
|
|
46118
46118
|
type: "submit",
|
|
46119
|
-
style:
|
|
46119
|
+
style: d,
|
|
46120
46120
|
children: h
|
|
46121
46121
|
})
|
|
46122
46122
|
})]
|
|
@@ -46135,7 +46135,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46135
46135
|
boxSizing: "border-box",
|
|
46136
46136
|
padding: "10px 12px",
|
|
46137
46137
|
...UV,
|
|
46138
|
-
...
|
|
46138
|
+
...r
|
|
46139
46139
|
}
|
|
46140
46140
|
}, e.id);
|
|
46141
46141
|
}
|
|
@@ -46151,7 +46151,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46151
46151
|
boxSizing: "border-box",
|
|
46152
46152
|
padding: "10px 12px",
|
|
46153
46153
|
...UV,
|
|
46154
|
-
...
|
|
46154
|
+
...r
|
|
46155
46155
|
}
|
|
46156
46156
|
}, e.id);
|
|
46157
46157
|
}
|
|
@@ -46166,7 +46166,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46166
46166
|
boxSizing: "border-box",
|
|
46167
46167
|
padding: "10px 12px",
|
|
46168
46168
|
...UV,
|
|
46169
|
-
...
|
|
46169
|
+
...r
|
|
46170
46170
|
},
|
|
46171
46171
|
children: n.map((e, t) => /* @__PURE__ */ N("option", {
|
|
46172
46172
|
value: e?.value ?? "",
|
|
@@ -46184,27 +46184,27 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46184
46184
|
case "accordion": return /* @__PURE__ */ N(QV, { elem: e }, e.id);
|
|
46185
46185
|
default: return $V(e.type);
|
|
46186
46186
|
}
|
|
46187
|
-
}, g = (
|
|
46188
|
-
let
|
|
46189
|
-
return re(
|
|
46190
|
-
"data-plexo-id":
|
|
46187
|
+
}, g = (t) => {
|
|
46188
|
+
let n = BV(t.styles);
|
|
46189
|
+
return re(m, t.id, t.styles, "tablet", t.stylesTablet), re(m, t.id, t.styles, "mobile", t.stylesMobile), /* @__PURE__ */ N("div", {
|
|
46190
|
+
"data-plexo-id": t.id,
|
|
46191
46191
|
style: {
|
|
46192
|
-
width:
|
|
46192
|
+
width: t.width || "100%",
|
|
46193
46193
|
display: "flex",
|
|
46194
46194
|
flexDirection: "column",
|
|
46195
|
-
...
|
|
46195
|
+
...n
|
|
46196
46196
|
},
|
|
46197
46197
|
className: "plexo-column",
|
|
46198
|
-
children:
|
|
46199
|
-
let n =
|
|
46198
|
+
children: e(t).map((e) => {
|
|
46199
|
+
let n = t.elements.find((t) => t.id === e);
|
|
46200
46200
|
if (n) return h(n);
|
|
46201
|
-
let r =
|
|
46201
|
+
let r = t.nestedRows?.find((t) => t.id === e);
|
|
46202
46202
|
return r ? _(r) : null;
|
|
46203
46203
|
})
|
|
46204
|
-
},
|
|
46204
|
+
}, t.id);
|
|
46205
46205
|
}, _ = (e) => {
|
|
46206
46206
|
let t = BV(e.style);
|
|
46207
|
-
return re(
|
|
46207
|
+
return re(m, e.id, e.style, "tablet", e.styleTablet), re(m, e.id, e.style, "mobile", e.styleMobile), /* @__PURE__ */ N("div", {
|
|
46208
46208
|
id: e.htmlId,
|
|
46209
46209
|
"data-plexo-id": e.id,
|
|
46210
46210
|
className: `plexo-row ${e.htmlClass || ""}`,
|
|
@@ -46217,13 +46217,13 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46217
46217
|
},
|
|
46218
46218
|
children: e.columns.map(g)
|
|
46219
46219
|
}, e.id);
|
|
46220
|
-
}, v =
|
|
46220
|
+
}, v = d.rows.map(_), b = m.tablet.length ? `\n ${m.tablet.join("\n ")}` : "", S = m.mobile.length ? `\n ${m.mobile.join("\n ")}` : "";
|
|
46221
46221
|
return /* @__PURE__ */ P("div", {
|
|
46222
46222
|
style: {
|
|
46223
46223
|
...f,
|
|
46224
46224
|
...o
|
|
46225
46225
|
},
|
|
46226
|
-
className: `plexo-renderer-root ${
|
|
46226
|
+
className: `plexo-renderer-root ${a || ""}`,
|
|
46227
46227
|
children: [
|
|
46228
46228
|
l && /* @__PURE__ */ N("link", {
|
|
46229
46229
|
rel: "stylesheet",
|
|
@@ -46237,7 +46237,7 @@ var eH = ({ template: e, customCss: r, className: i, style: o }) => {
|
|
|
46237
46237
|
.plexo-column { width: 100% !important; max-width: 100% !important; margin-bottom: 16px; }${S}
|
|
46238
46238
|
}
|
|
46239
46239
|
` }),
|
|
46240
|
-
|
|
46240
|
+
i && /* @__PURE__ */ N("style", { children: i }),
|
|
46241
46241
|
v
|
|
46242
46242
|
]
|
|
46243
46243
|
});
|
|
@@ -52668,7 +52668,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52668
52668
|
defaultOpen: !1,
|
|
52669
52669
|
children: []
|
|
52670
52670
|
}), ZU = (e) => {
|
|
52671
|
-
let { selectedElement: t, currentAttrs: n, currentStyles: r, openAccordions: i, toggleAccordion:
|
|
52671
|
+
let { selectedElement: t, currentAttrs: n, currentStyles: r, openAccordions: i, toggleAccordion: o, onTransientAttrChange: s, onTransientStyleChange: c, AccordionSection: l, InlineTextInput: u, InlineSelect: d, InlineColorPicker: f, InlineCounter: p, Toggle: m, InlineTextArea: h, SpacingControls: g, BorderRadiusControls: _ } = e, [v, y] = O(0), [b, x] = O(null);
|
|
52672
52672
|
if (!t || t.type !== "accordion") return null;
|
|
52673
52673
|
let S = Array.isArray(n.items) ? n.items : [], ee = n.mode === "multi" ? "multi" : "single", C = (e) => s("items", e), w = S.length ? Math.min(v, S.length - 1) : 0, T = S[w], te = Array.isArray(T?.children) ? T.children : [], ne = b !== null && te.length ? Math.min(b, te.length - 1) : null, re = ne === null ? null : te[ne], ie = () => {
|
|
52674
52674
|
let e = [...S, XU(`Item ${S.length + 1}`, "Panel content goes here.")];
|
|
@@ -52686,7 +52686,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52686
52686
|
...n,
|
|
52687
52687
|
...t
|
|
52688
52688
|
} : n));
|
|
52689
|
-
}, ce = (e) => C(
|
|
52689
|
+
}, ce = (e) => C(a(S, [e], ee)), le = (e, t) => C(a(S, [e, t], ee)), E = (e) => {
|
|
52690
52690
|
let t = S.map((t, n) => {
|
|
52691
52691
|
if (n !== e) return t;
|
|
52692
52692
|
let r = Array.isArray(t.children) ? t.children : [];
|
|
@@ -52723,7 +52723,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52723
52723
|
/* @__PURE__ */ N(l, {
|
|
52724
52724
|
title: "Items",
|
|
52725
52725
|
isOpen: i.link,
|
|
52726
|
-
onToggle: () =>
|
|
52726
|
+
onToggle: () => o("link"),
|
|
52727
52727
|
children: /* @__PURE__ */ P("div", {
|
|
52728
52728
|
className: "flex flex-col gap-2",
|
|
52729
52729
|
children: [
|
|
@@ -52867,7 +52867,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52867
52867
|
/* @__PURE__ */ N(l, {
|
|
52868
52868
|
title: "Behavior",
|
|
52869
52869
|
isOpen: i.typography,
|
|
52870
|
-
onToggle: () =>
|
|
52870
|
+
onToggle: () => o("typography"),
|
|
52871
52871
|
children: /* @__PURE__ */ P("div", {
|
|
52872
52872
|
className: "flex flex-col gap-1",
|
|
52873
52873
|
children: [
|
|
@@ -52934,7 +52934,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
52934
52934
|
/* @__PURE__ */ N(l, {
|
|
52935
52935
|
title: "Header styling",
|
|
52936
52936
|
isOpen: i.styling,
|
|
52937
|
-
onToggle: () =>
|
|
52937
|
+
onToggle: () => o("styling"),
|
|
52938
52938
|
children: /* @__PURE__ */ P("div", {
|
|
52939
52939
|
className: "flex flex-col gap-1",
|
|
52940
52940
|
children: [
|
|
@@ -53009,7 +53009,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53009
53009
|
/* @__PURE__ */ N(l, {
|
|
53010
53010
|
title: "Content & layout",
|
|
53011
53011
|
isOpen: i.spacing,
|
|
53012
|
-
onToggle: () =>
|
|
53012
|
+
onToggle: () => o("spacing"),
|
|
53013
53013
|
children: /* @__PURE__ */ P("div", {
|
|
53014
53014
|
className: "flex flex-col gap-1",
|
|
53015
53015
|
children: [
|
|
@@ -53264,18 +53264,18 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53264
53264
|
...e,
|
|
53265
53265
|
parentRowId: e.parentRowId,
|
|
53266
53266
|
parentColId: e.parentColId
|
|
53267
|
-
}) : /* @__PURE__ */ N(rW, { ...e }), oW = ({ col:
|
|
53267
|
+
}) : /* @__PURE__ */ N(rW, { ...e }), oW = ({ col: t, rowId: n, parentRowId: r, parentColId: i, selectedColumnId: a, selectColumn: o, previewMode: s, children: c, deviceView: l }) => {
|
|
53268
53268
|
let { setNodeRef: u, isOver: d } = xe({
|
|
53269
|
-
id:
|
|
53269
|
+
id: t.id,
|
|
53270
53270
|
data: {
|
|
53271
53271
|
type: "column",
|
|
53272
|
-
id:
|
|
53273
|
-
rowId:
|
|
53274
|
-
parentRowId:
|
|
53275
|
-
parentColId:
|
|
53272
|
+
id: t.id,
|
|
53273
|
+
rowId: n,
|
|
53274
|
+
parentRowId: r,
|
|
53275
|
+
parentColId: i
|
|
53276
53276
|
},
|
|
53277
53277
|
disabled: s
|
|
53278
|
-
}), f =
|
|
53278
|
+
}), f = a === t.id, p = e(t), m = l === "tablet" ? "tablet" : l === "mobile" ? "mobile" : null, h = m === "tablet" ? t.stylesTablet : m === "mobile" ? t.stylesMobile : void 0, g = b(t.styles, h, m), _ = g.display, v = _ === "flex" || _ === "block" || _ === "inline-flex", y = v ? "min-h-[50px] h-full" : "flex flex-col gap-2.5 min-h-[50px] h-full", x = v ? {
|
|
53279
53279
|
display: _,
|
|
53280
53280
|
flexDirection: g.flexDirection,
|
|
53281
53281
|
flexWrap: g.flexWrap,
|
|
@@ -53285,21 +53285,21 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53285
53285
|
} : { justifyContent: g.justifyContent || "flex-start" };
|
|
53286
53286
|
return /* @__PURE__ */ P("div", {
|
|
53287
53287
|
ref: u,
|
|
53288
|
-
id:
|
|
53288
|
+
id: t.id,
|
|
53289
53289
|
"data-plexo-node-type": "column",
|
|
53290
|
-
onClick: (
|
|
53291
|
-
s || (
|
|
53290
|
+
onClick: (e) => {
|
|
53291
|
+
s || (e.stopPropagation(), o(t.id));
|
|
53292
53292
|
},
|
|
53293
53293
|
className: `plexo-editor-col relative transition duration-150 p-2 min-h-[90px] flex flex-col gap-2 rounded ${s ? "cursor-default" : "cursor-pointer"} ${!s && d ? "outline outline-1 outline-dashed outline-indigo-500 bg-indigo-500/5" : !s && f ? "outline outline-1 outline-indigo-500 bg-indigo-500/5" : s ? "" : "hover:outline hover:outline-1 hover:outline-slate-200 bg-slate-55"}`,
|
|
53294
53294
|
style: {
|
|
53295
|
-
width:
|
|
53295
|
+
width: t.width,
|
|
53296
53296
|
...g
|
|
53297
53297
|
},
|
|
53298
53298
|
children: [!s && f && /* @__PURE__ */ P("span", {
|
|
53299
53299
|
className: "absolute -top-3 left-2 bg-[#0c1221] border border-slate-700 text-slate-200 font-mono text-[8px] px-2 py-0.5 rounded-md font-bold z-30 pointer-events-none shadow-sm",
|
|
53300
53300
|
children: [
|
|
53301
53301
|
"Column (",
|
|
53302
|
-
|
|
53302
|
+
t.width,
|
|
53303
53303
|
")"
|
|
53304
53304
|
]
|
|
53305
53305
|
}), /* @__PURE__ */ N(F, {
|
|
@@ -53668,14 +53668,14 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53668
53668
|
]
|
|
53669
53669
|
})]
|
|
53670
53670
|
});
|
|
53671
|
-
}, lW = ({ elem: e, columnId:
|
|
53671
|
+
}, lW = ({ elem: e, columnId: r, rowId: o, selectedElementId: m, selectElement: h, deviceView: g, transientStyle: _, transientAttr: v, updateElement: y, onTransientStyleChange: x, onTransientAttrChange: S, clearTransientOverrides: ee, duplicateElement: C, deleteElement: w, previewMode: T, useAi: te, aiProvider: ne, aiTier: re, apiKey: ie, externalUserId: ae, templateKind: oe, onRequestComment: se, ICONS: le, getFormFields: E, getDefaultStyle: ue, isElementHiddenForView: de, renderSocialIcon: pe, onNotify: me, textColor: ge = "#e2e8f0", backgroundColor: k = "#0e1526", customCss: _e = "", mergeTags: A = [], themeBgColor: ve = "#273df2" }) => {
|
|
53672
53672
|
let { attributes: ye, listeners: be, setNodeRef: xe, transform: j, transition: Se, isDragging: Ce, isOver: M } = I({
|
|
53673
53673
|
id: e.id,
|
|
53674
53674
|
data: {
|
|
53675
53675
|
type: "element",
|
|
53676
53676
|
id: e.id,
|
|
53677
|
-
columnId:
|
|
53678
|
-
rowId:
|
|
53677
|
+
columnId: r,
|
|
53678
|
+
rowId: o
|
|
53679
53679
|
},
|
|
53680
53680
|
disabled: T
|
|
53681
53681
|
}), F = fe(Ae), L = M && F.overId === e.id && F.edge === "bottom", [Te, R] = O(!1), [Ee, De] = O(!1), [Oe, ke] = O(""), je = Be({
|
|
@@ -53755,7 +53755,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53755
53755
|
display: rt,
|
|
53756
53756
|
verticalAlign: "top"
|
|
53757
53757
|
} : {}
|
|
53758
|
-
}, ot =
|
|
53758
|
+
}, ot = m === e.id;
|
|
53759
53759
|
if (D(() => {
|
|
53760
53760
|
if (Je.current && document.activeElement !== Je.current) {
|
|
53761
53761
|
let t = e.type === "heading" ? "Heading Title" : e.type === "text" ? "Empty Text Block" : "Paragraph layout text content.", n = U.text || t;
|
|
@@ -53786,7 +53786,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
53786
53786
|
"h2",
|
|
53787
53787
|
"h3",
|
|
53788
53788
|
"h4"
|
|
53789
|
-
].includes(String(U.headingType || "").toLowerCase()) ? String(U.headingType).toLowerCase() : "h2", ut = e.type === "form_container" ? ue("form_container") : null, dt = e.type === "form_container" ?
|
|
53789
|
+
].includes(String(U.headingType || "").toLowerCase()) ? String(U.headingType).toLowerCase() : "h2", ut = e.type === "form_container" ? ue("form_container") : null, dt = e.type === "form_container" ? p(E(U)).map((e) => /* @__PURE__ */ P("div", {
|
|
53790
53790
|
className: "flex flex-col gap-1.5",
|
|
53791
53791
|
children: [e.showLabel !== !1 && /* @__PURE__ */ P("label", {
|
|
53792
53792
|
className: "font-bold uppercase tracking-[0.18em]",
|
|
@@ -54418,10 +54418,10 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54418
54418
|
marginRight: H.marginRight,
|
|
54419
54419
|
marginBottom: H.marginBottom,
|
|
54420
54420
|
marginLeft: H.marginLeft,
|
|
54421
|
-
paddingTop:
|
|
54422
|
-
paddingBottom:
|
|
54423
|
-
paddingLeft:
|
|
54424
|
-
paddingRight:
|
|
54421
|
+
paddingTop: s(H.paddingTop, H.padding, "top", "10px"),
|
|
54422
|
+
paddingBottom: s(H.paddingBottom, H.padding, "bottom", "10px"),
|
|
54423
|
+
paddingLeft: s(H.paddingLeft, H.padding, "left", "20px"),
|
|
54424
|
+
paddingRight: s(H.paddingRight, H.padding, "right", "20px"),
|
|
54425
54425
|
borderRadius: H.borderRadius,
|
|
54426
54426
|
textAlign: H.textAlign,
|
|
54427
54427
|
fontWeight: H.fontWeight,
|
|
@@ -54431,7 +54431,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54431
54431
|
borderWidth: H.borderWidth,
|
|
54432
54432
|
borderStyle: H.borderStyle,
|
|
54433
54433
|
borderColor: H.borderColor,
|
|
54434
|
-
...
|
|
54434
|
+
...t(e),
|
|
54435
54435
|
maxWidth: "100%"
|
|
54436
54436
|
},
|
|
54437
54437
|
className: "inline-flex items-center justify-center",
|
|
@@ -54467,7 +54467,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54467
54467
|
alt: U.alt || "",
|
|
54468
54468
|
style: {
|
|
54469
54469
|
borderRadius: H.borderRadius,
|
|
54470
|
-
...
|
|
54470
|
+
...c(e)
|
|
54471
54471
|
},
|
|
54472
54472
|
className: "pointer-events-none"
|
|
54473
54473
|
})
|
|
@@ -54510,7 +54510,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54510
54510
|
backgroundColor: H.backgroundColor,
|
|
54511
54511
|
borderRadius: H.borderRadius,
|
|
54512
54512
|
width: H.width || "100%",
|
|
54513
|
-
height:
|
|
54513
|
+
height: u(e),
|
|
54514
54514
|
padding: H.padding || ut?.padding,
|
|
54515
54515
|
paddingTop: H.paddingTop || ut?.paddingTop,
|
|
54516
54516
|
paddingRight: H.paddingRight || ut?.paddingRight,
|
|
@@ -54540,14 +54540,14 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54540
54540
|
backgroundColor: H.buttonBackgroundColor || "#0f172a",
|
|
54541
54541
|
color: H.buttonTextColor || "#ffffff",
|
|
54542
54542
|
borderRadius: H.buttonBorderRadius || "12px",
|
|
54543
|
-
paddingTop:
|
|
54544
|
-
paddingBottom:
|
|
54545
|
-
paddingLeft:
|
|
54546
|
-
paddingRight:
|
|
54547
|
-
marginTop:
|
|
54548
|
-
marginBottom:
|
|
54549
|
-
marginLeft:
|
|
54550
|
-
marginRight:
|
|
54543
|
+
paddingTop: s(H.buttonPaddingTop, H.buttonPadding, "top", "10px"),
|
|
54544
|
+
paddingBottom: s(H.buttonPaddingBottom, H.buttonPadding, "bottom", "10px"),
|
|
54545
|
+
paddingLeft: s(H.buttonPaddingLeft, H.buttonPadding, "left", "14px"),
|
|
54546
|
+
paddingRight: s(H.buttonPaddingRight, H.buttonPadding, "right", "14px"),
|
|
54547
|
+
marginTop: s(H.buttonMarginTop, H.buttonMargin, "top"),
|
|
54548
|
+
marginBottom: s(H.buttonMarginBottom, H.buttonMargin, "bottom"),
|
|
54549
|
+
marginLeft: s(H.buttonMarginLeft, H.buttonMargin, "left"),
|
|
54550
|
+
marginRight: s(H.buttonMarginRight, H.buttonMargin, "right"),
|
|
54551
54551
|
fontSize: H.buttonFontSize || "13px",
|
|
54552
54552
|
fontWeight: H.buttonFontWeight || "700",
|
|
54553
54553
|
width: U.buttonAutoWidth === !1 ? H.buttonWidth || "100%" : "auto",
|
|
@@ -54677,7 +54677,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54677
54677
|
style: {
|
|
54678
54678
|
width: "100%",
|
|
54679
54679
|
border: "none",
|
|
54680
|
-
height:
|
|
54680
|
+
height: n(e, "100vh"),
|
|
54681
54681
|
backgroundColor: "transparent"
|
|
54682
54682
|
},
|
|
54683
54683
|
sandbox: "allow-scripts",
|
|
@@ -54688,10 +54688,10 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54688
54688
|
})
|
|
54689
54689
|
}),
|
|
54690
54690
|
e.type === "table" && (() => {
|
|
54691
|
-
let t =
|
|
54691
|
+
let t = d(e), n = `${H.borderWidth || "1px"} ${H.borderStyle || "solid"} ${H.borderColor || "#cbd5e1"}`, r = (e, n, r) => {
|
|
54692
54692
|
let i = t.cells.map((e) => [...e]);
|
|
54693
54693
|
i[e][n] = r, S("cells", i);
|
|
54694
|
-
},
|
|
54694
|
+
}, i = (e, i, a, o) => {
|
|
54695
54695
|
let s = a ? "th" : "td", c = a ? H.headerBgColor || "#f8fafc" : t.striped && i % 2 == 1 ? "#f8fafc" : H.contentBgColor || "#ffffff", l = a ? H.headerTextColor || "#1e293b" : H.contentTextColor || "#475569", u = (a ? H.headerTextAlign : H.contentTextAlign) || "left";
|
|
54696
54696
|
return /* @__PURE__ */ N("tr", { children: e.map((e, t) => /* @__PURE__ */ N(s, {
|
|
54697
54697
|
contentEditable: !T,
|
|
@@ -54712,7 +54712,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54712
54712
|
},
|
|
54713
54713
|
children: e
|
|
54714
54714
|
}, t)) }, o);
|
|
54715
|
-
},
|
|
54715
|
+
}, a = +!!t.enableHeader, o = t.enableFooter ? t.cells.length - 1 : t.cells.length;
|
|
54716
54716
|
return /* @__PURE__ */ N("div", {
|
|
54717
54717
|
style: {
|
|
54718
54718
|
padding: H.padding,
|
|
@@ -54725,15 +54725,15 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54725
54725
|
width: "100%"
|
|
54726
54726
|
},
|
|
54727
54727
|
children: [
|
|
54728
|
-
t.enableHeader && t.cells.length > 0 && /* @__PURE__ */ N("thead", { children:
|
|
54729
|
-
/* @__PURE__ */ N("tbody", { children: t.cells.slice(
|
|
54730
|
-
t.enableFooter && t.cells.length >
|
|
54728
|
+
t.enableHeader && t.cells.length > 0 && /* @__PURE__ */ N("thead", { children: i(t.cells[0], 0, !0, "head") }),
|
|
54729
|
+
/* @__PURE__ */ N("tbody", { children: t.cells.slice(a, Math.max(a, o)).map((e, t) => i(e, a + t, !1, `body-${t}`)) }),
|
|
54730
|
+
t.enableFooter && t.cells.length > a && /* @__PURE__ */ N("tfoot", { children: i(t.cells[t.cells.length - 1], t.cells.length - 1, !1, "foot") })
|
|
54731
54731
|
]
|
|
54732
54732
|
})
|
|
54733
54733
|
});
|
|
54734
54734
|
})(),
|
|
54735
54735
|
e.type === "timer" && (() => {
|
|
54736
|
-
let e =
|
|
54736
|
+
let e = l(U.targetDate, U.timezone), t = U.showLabels !== !1, n = (e, n, r) => /* @__PURE__ */ P("div", {
|
|
54737
54737
|
className: "flex flex-col items-center bg-slate-100 rounded px-2.5 py-1.5 min-w-[45px]",
|
|
54738
54738
|
children: [/* @__PURE__ */ N("span", {
|
|
54739
54739
|
className: "text-sm font-extrabold",
|
|
@@ -54777,12 +54777,12 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54777
54777
|
});
|
|
54778
54778
|
})(),
|
|
54779
54779
|
e.type === "accordion" && (() => {
|
|
54780
|
-
let t = U.mode === "multi" ? "multi" : "single", n = U.iconStyle || "chevron", r = U.iconPosition === "left", i = U.showDividers !== !1,
|
|
54780
|
+
let t = U.mode === "multi" ? "multi" : "single", n = U.iconStyle || "chevron", r = U.iconPosition === "left", i = U.showDividers !== !1, o = U.animation !== "none", s = f({
|
|
54781
54781
|
...e,
|
|
54782
54782
|
attributes: U
|
|
54783
54783
|
}), c = (n, r) => {
|
|
54784
54784
|
r.stopPropagation();
|
|
54785
|
-
let i =
|
|
54785
|
+
let i = a(U.items || [], n, t);
|
|
54786
54786
|
y(e.id, { attributes: {
|
|
54787
54787
|
...e.attributes,
|
|
54788
54788
|
items: i
|
|
@@ -54813,18 +54813,18 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54813
54813
|
strokeLinejoin: "round",
|
|
54814
54814
|
d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
|
|
54815
54815
|
})
|
|
54816
|
-
}),
|
|
54817
|
-
let s = [...t,
|
|
54816
|
+
}), u = (e, t) => /* @__PURE__ */ N("div", { children: e.map((n, a) => {
|
|
54817
|
+
let s = [...t, a], d = n.defaultOpen;
|
|
54818
54818
|
return /* @__PURE__ */ P("div", {
|
|
54819
|
-
style: { borderBottom: i &&
|
|
54819
|
+
style: { borderBottom: i && a < e.length - 1 ? `1px solid ${H.dividerColor || "#e2e8f0"}` : void 0 },
|
|
54820
54820
|
children: [/* @__PURE__ */ P("button", {
|
|
54821
54821
|
type: "button",
|
|
54822
54822
|
onClick: (e) => c(s, e),
|
|
54823
54823
|
className: "w-full flex items-center gap-2 text-left cursor-pointer transition-colors",
|
|
54824
54824
|
style: {
|
|
54825
54825
|
padding: H.padding || "14px",
|
|
54826
|
-
backgroundColor:
|
|
54827
|
-
color:
|
|
54826
|
+
backgroundColor: d ? H.headerActiveBackgroundColor || H.headerBackgroundColor || "#ffffff" : H.headerBackgroundColor || "#ffffff",
|
|
54827
|
+
color: d ? H.headerActiveTextColor || H.headerTextColor || "#0f172a" : H.headerTextColor || "#0f172a",
|
|
54828
54828
|
fontSize: H.headerFontSize || "14px",
|
|
54829
54829
|
fontWeight: H.headerFontWeight || 600,
|
|
54830
54830
|
fontFamily: H.headerFontFamily,
|
|
@@ -54833,12 +54833,12 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54833
54833
|
children: [/* @__PURE__ */ N("span", {
|
|
54834
54834
|
className: "flex-1",
|
|
54835
54835
|
children: n.title
|
|
54836
|
-
}), l(
|
|
54836
|
+
}), l(d)]
|
|
54837
54837
|
}), /* @__PURE__ */ N("div", {
|
|
54838
54838
|
style: {
|
|
54839
54839
|
display: "grid",
|
|
54840
|
-
gridTemplateRows:
|
|
54841
|
-
transition:
|
|
54840
|
+
gridTemplateRows: d ? "1fr" : "0fr",
|
|
54841
|
+
transition: o ? "grid-template-rows 0.25s ease" : void 0,
|
|
54842
54842
|
backgroundColor: H.contentBackgroundColor || "#ffffff"
|
|
54843
54843
|
},
|
|
54844
54844
|
children: /* @__PURE__ */ N("div", {
|
|
@@ -54852,7 +54852,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54852
54852
|
},
|
|
54853
54853
|
children: [n.content, n.children.length > 0 && /* @__PURE__ */ N("div", {
|
|
54854
54854
|
className: "mt-2.5",
|
|
54855
|
-
children:
|
|
54855
|
+
children: u(n.children, s)
|
|
54856
54856
|
})]
|
|
54857
54857
|
})
|
|
54858
54858
|
})
|
|
@@ -54870,7 +54870,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54870
54870
|
children: s.length === 0 ? /* @__PURE__ */ N("div", {
|
|
54871
54871
|
className: "text-slate-400 italic text-[11px] p-6 text-center",
|
|
54872
54872
|
children: "No accordion items yet — add one from the properties panel."
|
|
54873
|
-
}) :
|
|
54873
|
+
}) : u(s, [])
|
|
54874
54874
|
});
|
|
54875
54875
|
})(),
|
|
54876
54876
|
e.type === "carousel" && /* @__PURE__ */ P("div", {
|
|
@@ -54985,7 +54985,7 @@ var PU = ({ value: e, onChange: t, sitePages: n }) => {
|
|
|
54985
54985
|
justifyContent: H.textAlign === "center" ? "center" : H.textAlign === "right" ? "flex-end" : "flex-start"
|
|
54986
54986
|
},
|
|
54987
54987
|
className: "flex flex-wrap gap-2",
|
|
54988
|
-
children:
|
|
54988
|
+
children: i(e).map((e, t) => /* @__PURE__ */ N("span", {
|
|
54989
54989
|
className: "flex items-center justify-center border border-slate-200 transition overflow-hidden",
|
|
54990
54990
|
style: {
|
|
54991
54991
|
width: e.size,
|
|
@@ -55909,13 +55909,13 @@ var LW = (e) => ({ body: {
|
|
|
55909
55909
|
}, "image/jpeg", r);
|
|
55910
55910
|
}, o.onerror = () => i(e), o.src = a.target?.result;
|
|
55911
55911
|
}, a.onerror = () => i(e), a.readAsDataURL(e);
|
|
55912
|
-
}), HW = ue((
|
|
55913
|
-
let { showSaveButton:
|
|
55912
|
+
}), HW = ue((t, n) => {
|
|
55913
|
+
let { showSaveButton: r = !1, mode: i, apiKey: a, backgroundColor: o = "#0e1526", themeBgColor: s = "#4f46e5", themeFgColor: c = "#ffffff", textColor: l = "#e2e8f0", builderFontFamily: u = "'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif", initialTemplate: d, initialHtml: f, initialCss: p, initialJs: m, onSave: h, useAi: g, aiProvider: _, aiTier: v, externalUserId: y, onUpload: S, customUpload: w, disableImageUpload: T = !1, autoSave: re = !1, autoSaveDuration: ie = 3e3, unsplashKey: oe, pexelsKey: se, pixabayKey: ce, allowPublishLandingPage: le = !1, templateId: E, headerLeftContent: ue, headerRightContent: de, mergeTags: fe, readOnly: _e = !1, commentMode: A = !1, onRequestComment: ve } = t, ye = t.__internalPlan, be = FH(a, ye), xe = AH(be.plan), j = t.themeBgColor === void 0 ? be.branding?.brandColor ?? s : s, Se = he(null), { template: Ce, selectedElementId: F, selectedRowId: I, selectedColumnId: L, past: we, future: Te, selectElement: R, selectRow: Ee, selectColumn: De, undo: je, redo: Me, hydrateTemplate: Ne, addRow: Fe, moveRow: Le, addElement: z, moveElement: Re, updateElement: ze, deleteElement: Ve, duplicateElement: He, deleteRow: Ue, duplicateRow: We, updateRowStyle: Ge, updateRowAttrs: Ke, updateColumnStyle: qe, updateColumnAttrs: Je, updateTemplateBodyStyle: Ye, updateRowColumns: Xe, updateColumnWidth: B, addColumnToRow: Ze, deleteColumnFromRow: Qe, duplicateColumn: V, addUploadedImage: $e, addNestedRowToColumn: et, nestRowInColumn: tt, moveNestedRowToTopLevel: nt, moveNestedRowBetweenColumns: H } = Pe(), [U, rt] = O(null), it = Ce?.body?.publishConfig?.apiKeyOverride ?? "", at = () => it.trim() || a, ot = (e) => typeof window < "u" && (window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1") && window.location.port !== "3000" ? `http://localhost:3000${e}` : e, st = (e, t) => {
|
|
55914
55914
|
rt(t), Ft(e), R(null), Ee(null), De(null);
|
|
55915
55915
|
}, ct = {
|
|
55916
55916
|
useAi: Ce.body.aiConfig?.useAi ?? g,
|
|
55917
55917
|
tier: Ce.body.aiConfig?.tier || v
|
|
55918
|
-
}, lt = _ || be.aiProvider, ut = be.status === "valid" ? be.manageLandingPagePublishing : le, dt =
|
|
55918
|
+
}, lt = _ || be.aiProvider, ut = be.status === "valid" ? be.manageLandingPagePublishing : le, dt = i === "email" ? "EMAIL" : "LANDING_PAGE", [ft, pt] = O(null), [mt, ht] = O(ke), [gt, _t] = O("desktop"), [vt, yt] = O("600px"), [bt, xt] = O("imac"), [St, Ct] = O("design"), [wt, Tt] = O(!1), Et = _e || wt, [Dt, Ot] = O("light"), { width: kt, category: At } = OW(), jt = At !== "desktop", [Mt, Nt] = O(!1), [Pt, Ft] = O("content"), [It, Lt] = O("all"), [Rt, zt] = O([]), [Bt, Vt] = O(!1), [Ht, Ut] = O(null), [Wt, Gt] = O(0), [Kt, qt] = O(""), [Jt, Yt] = O(""), [Xt, Zt] = O([]);
|
|
55919
55919
|
D(() => {
|
|
55920
55920
|
let e = !1;
|
|
55921
55921
|
return (async () => {
|
|
@@ -55940,7 +55940,7 @@ var LW = (e) => ({ body: {
|
|
|
55940
55940
|
})(), () => {
|
|
55941
55941
|
e = !0;
|
|
55942
55942
|
};
|
|
55943
|
-
}, [
|
|
55943
|
+
}, [a, Ce.body.publishConfig?.apiKeyOverride]);
|
|
55944
55944
|
let [Qt, $t] = O({
|
|
55945
55945
|
actions: !0,
|
|
55946
55946
|
rowProps: !0,
|
|
@@ -55982,12 +55982,12 @@ var LW = (e) => ({ body: {
|
|
|
55982
55982
|
}
|
|
55983
55983
|
}), gn = hn.status === "loading", [_n, vn] = O(!1), [yn, bn] = O(null), xn = he(null), Sn = he(!1), Cn = he(null), [wn, Tn] = O([]);
|
|
55984
55984
|
D(() => {
|
|
55985
|
-
if (
|
|
55985
|
+
if (i !== "landing_page" || !E) {
|
|
55986
55986
|
Tn([]);
|
|
55987
55987
|
return;
|
|
55988
55988
|
}
|
|
55989
55989
|
let e = !1;
|
|
55990
|
-
return fetch(`${Ie(
|
|
55990
|
+
return fetch(`${Ie(a)}/api/templates/${E}/pages`, { headers: { "x-api-key": a } }).then((e) => e.ok ? e.json() : Promise.reject(e)).then((t) => {
|
|
55991
55991
|
e || Tn(t.pages ?? []);
|
|
55992
55992
|
}).catch(() => {
|
|
55993
55993
|
e || Tn([]);
|
|
@@ -55995,13 +55995,13 @@ var LW = (e) => ({ body: {
|
|
|
55995
55995
|
e = !0;
|
|
55996
55996
|
};
|
|
55997
55997
|
}, [
|
|
55998
|
-
|
|
55998
|
+
i,
|
|
55999
55999
|
E,
|
|
56000
|
-
|
|
56000
|
+
a
|
|
56001
56001
|
]);
|
|
56002
56002
|
let { sensors: En, getJson: Dn, exportDesign: On, handleBuiltInSave: kn } = TW({
|
|
56003
|
-
apiKey:
|
|
56004
|
-
mode:
|
|
56003
|
+
apiKey: a,
|
|
56004
|
+
mode: i,
|
|
56005
56005
|
onSave: h,
|
|
56006
56006
|
isSavingLayout: _n,
|
|
56007
56007
|
setIsSavingLayout: vn,
|
|
@@ -56029,7 +56029,7 @@ var LW = (e) => ({ body: {
|
|
|
56029
56029
|
}));
|
|
56030
56030
|
};
|
|
56031
56031
|
return e.addEventListener("click", t, { capture: !0 }), () => e.removeEventListener("click", t, { capture: !0 });
|
|
56032
|
-
}, [A, ve]), pe(
|
|
56032
|
+
}, [A, ve]), pe(n, () => ({
|
|
56033
56033
|
exportDesign: On,
|
|
56034
56034
|
getJson: Dn,
|
|
56035
56035
|
getNodeRect: jn,
|
|
@@ -56038,7 +56038,7 @@ var LW = (e) => ({ body: {
|
|
|
56038
56038
|
if (!re || !h) return;
|
|
56039
56039
|
let e = setInterval(async () => {
|
|
56040
56040
|
try {
|
|
56041
|
-
let e = await On(
|
|
56041
|
+
let e = await On(i);
|
|
56042
56042
|
h(e);
|
|
56043
56043
|
} catch (e) {
|
|
56044
56044
|
console.warn("Auto save failed:", e);
|
|
@@ -56049,7 +56049,7 @@ var LW = (e) => ({ body: {
|
|
|
56049
56049
|
re,
|
|
56050
56050
|
ie,
|
|
56051
56051
|
On,
|
|
56052
|
-
|
|
56052
|
+
i,
|
|
56053
56053
|
h
|
|
56054
56054
|
]), D(() => {
|
|
56055
56055
|
let e = f?.trim(), t, n, r = p === void 0 ? "__undefined__" : p, i = m === void 0 ? "__undefined__" : m;
|
|
@@ -56188,7 +56188,7 @@ var LW = (e) => ({ body: {
|
|
|
56188
56188
|
Kt,
|
|
56189
56189
|
It,
|
|
56190
56190
|
Wt,
|
|
56191
|
-
|
|
56191
|
+
a,
|
|
56192
56192
|
oe,
|
|
56193
56193
|
se,
|
|
56194
56194
|
ce
|
|
@@ -56267,20 +56267,20 @@ var LW = (e) => ({ body: {
|
|
|
56267
56267
|
}
|
|
56268
56268
|
}
|
|
56269
56269
|
return null;
|
|
56270
|
-
}, Jn = (
|
|
56271
|
-
if (
|
|
56272
|
-
let
|
|
56270
|
+
}, Jn = (t) => {
|
|
56271
|
+
if (t.type === "palette-merge-tag") {
|
|
56272
|
+
let e = t.mergeTagValue || "", n = K;
|
|
56273
56273
|
if (n && (n.type === "text" || n.type === "heading" || n.type === "paragraph" || n.type === "button")) {
|
|
56274
|
-
let
|
|
56274
|
+
let t = n.attributes?.text || "";
|
|
56275
56275
|
ze(n.id, { attributes: {
|
|
56276
56276
|
...n.attributes,
|
|
56277
|
-
text:
|
|
56277
|
+
text: t + e
|
|
56278
56278
|
} });
|
|
56279
|
-
} else navigator?.clipboard?.writeText && navigator.clipboard.writeText(
|
|
56279
|
+
} else navigator?.clipboard?.writeText && navigator.clipboard.writeText(e).catch(() => {});
|
|
56280
56280
|
return;
|
|
56281
56281
|
}
|
|
56282
|
-
if (
|
|
56283
|
-
let
|
|
56282
|
+
if (t.type === "palette-row") {
|
|
56283
|
+
let e = t.widths, n = e?.length || t.columnsCount || 1, r = `row-${Date.now()}`, i = {
|
|
56284
56284
|
id: r,
|
|
56285
56285
|
style: {
|
|
56286
56286
|
backgroundColor: "#ffffff",
|
|
@@ -56289,58 +56289,58 @@ var LW = (e) => ({ body: {
|
|
|
56289
56289
|
borderRadius: "8px",
|
|
56290
56290
|
border: "1px solid #e2e8f0"
|
|
56291
56291
|
},
|
|
56292
|
-
columns: Array.from({ length: n }).map((
|
|
56292
|
+
columns: Array.from({ length: n }).map((t, i) => ({
|
|
56293
56293
|
id: `col-${r}-${i + 1}`,
|
|
56294
|
-
width:
|
|
56294
|
+
width: e?.[i] || (n === 1 ? "100%" : n === 2 ? "50%" : `${(100 / n).toFixed(2)}%`),
|
|
56295
56295
|
elements: []
|
|
56296
56296
|
}))
|
|
56297
56297
|
};
|
|
56298
56298
|
Fe(i, W.body.rows.length);
|
|
56299
56299
|
return;
|
|
56300
56300
|
}
|
|
56301
|
-
let
|
|
56302
|
-
id:
|
|
56303
|
-
type:
|
|
56304
|
-
style: EH(
|
|
56305
|
-
attributes: OH(
|
|
56301
|
+
let n = t.elementType || "button", r = `elem-${n}-${Date.now()}`, i = {
|
|
56302
|
+
id: r,
|
|
56303
|
+
type: n,
|
|
56304
|
+
style: EH(n),
|
|
56305
|
+
attributes: OH(n)
|
|
56306
56306
|
};
|
|
56307
56307
|
if (F) {
|
|
56308
|
-
let
|
|
56309
|
-
for (let
|
|
56310
|
-
if (
|
|
56311
|
-
rowId:
|
|
56312
|
-
colId:
|
|
56313
|
-
idx:
|
|
56308
|
+
let t = (n) => {
|
|
56309
|
+
for (let r of n) for (let n of r.columns) {
|
|
56310
|
+
if (n.elements.some((e) => e.id === F)) return {
|
|
56311
|
+
rowId: r.id,
|
|
56312
|
+
colId: n.id,
|
|
56313
|
+
idx: e(n).indexOf(F)
|
|
56314
56314
|
};
|
|
56315
|
-
let
|
|
56316
|
-
if (
|
|
56315
|
+
let i = t(n.nestedRows || []);
|
|
56316
|
+
if (i) return i;
|
|
56317
56317
|
}
|
|
56318
56318
|
return null;
|
|
56319
|
-
},
|
|
56320
|
-
if (
|
|
56321
|
-
z(
|
|
56319
|
+
}, n = t(W.body.rows);
|
|
56320
|
+
if (n) {
|
|
56321
|
+
z(n.rowId, n.colId, i, n.idx + 1), R(r);
|
|
56322
56322
|
return;
|
|
56323
56323
|
}
|
|
56324
56324
|
}
|
|
56325
56325
|
if (L) {
|
|
56326
56326
|
let e = Gn(L);
|
|
56327
56327
|
if (e) {
|
|
56328
|
-
z(e, L,
|
|
56328
|
+
z(e, L, i), R(r);
|
|
56329
56329
|
return;
|
|
56330
56330
|
}
|
|
56331
56331
|
}
|
|
56332
56332
|
if (I) {
|
|
56333
56333
|
let e = Kn(I, W.body.rows);
|
|
56334
56334
|
if (e && e.columns.length > 0) {
|
|
56335
|
-
z(e.id, e.columns[0].id,
|
|
56335
|
+
z(e.id, e.columns[0].id, i), R(r);
|
|
56336
56336
|
return;
|
|
56337
56337
|
}
|
|
56338
56338
|
}
|
|
56339
|
-
let
|
|
56340
|
-
if (
|
|
56341
|
-
let e =
|
|
56339
|
+
let a = W.body.rows;
|
|
56340
|
+
if (a.length > 0) {
|
|
56341
|
+
let e = a[a.length - 1], t = e.columns[e.columns.length - 1];
|
|
56342
56342
|
if (t) {
|
|
56343
|
-
z(e.id, t.id,
|
|
56343
|
+
z(e.id, t.id, i), R(r);
|
|
56344
56344
|
return;
|
|
56345
56345
|
}
|
|
56346
56346
|
}
|
|
@@ -56359,7 +56359,7 @@ var LW = (e) => ({ body: {
|
|
|
56359
56359
|
width: "100%",
|
|
56360
56360
|
elements: []
|
|
56361
56361
|
}]
|
|
56362
|
-
},
|
|
56362
|
+
}, a.length), z(o, s, i), R(r);
|
|
56363
56363
|
}, Yn = (e, t) => {
|
|
56364
56364
|
if (t !== 0 && mt.overId === e && mt.edge === "top") return 0;
|
|
56365
56365
|
}, Xn = (e, t) => mt.overId === e && mt.edge === "bottom" ? t + 1 : t, Zn = (e) => {
|
|
@@ -56386,11 +56386,11 @@ var LW = (e) => ({ body: {
|
|
|
56386
56386
|
overId: n.id,
|
|
56387
56387
|
edge: a < i ? "top" : "bottom"
|
|
56388
56388
|
});
|
|
56389
|
-
}, $n = (
|
|
56389
|
+
}, $n = (t) => {
|
|
56390
56390
|
pt(null), ht(ke);
|
|
56391
|
-
let { active:
|
|
56392
|
-
if (!
|
|
56393
|
-
let
|
|
56391
|
+
let { active: n, over: r } = t;
|
|
56392
|
+
if (!r) return;
|
|
56393
|
+
let i = n.id, a = r.id, o = n.data.current, s = r.data.current;
|
|
56394
56394
|
if (o?.type === "palette-row") {
|
|
56395
56395
|
let e = o.widths, t = e?.length || o.columnsCount, n = `row-${Date.now()}`, r = {
|
|
56396
56396
|
id: n,
|
|
@@ -56408,14 +56408,14 @@ var LW = (e) => ({ body: {
|
|
|
56408
56408
|
}))
|
|
56409
56409
|
};
|
|
56410
56410
|
if (s?.type === "column") {
|
|
56411
|
-
let e =
|
|
56411
|
+
let e = a, t = qn(e, W.body.rows)?.rowId ?? W.body.rows.find((t) => t.columns.some((t) => t.id === e))?.id;
|
|
56412
56412
|
if (t) {
|
|
56413
56413
|
et(t, e, r);
|
|
56414
56414
|
return;
|
|
56415
56415
|
}
|
|
56416
56416
|
}
|
|
56417
56417
|
if (s?.type === "row") {
|
|
56418
|
-
let e =
|
|
56418
|
+
let e = a, t = (n) => {
|
|
56419
56419
|
for (let r of n) {
|
|
56420
56420
|
if (r.id === e) return r;
|
|
56421
56421
|
for (let e of r.columns) {
|
|
@@ -56441,98 +56441,98 @@ var LW = (e) => ({ body: {
|
|
|
56441
56441
|
return;
|
|
56442
56442
|
}
|
|
56443
56443
|
if (o?.type === "palette-element") {
|
|
56444
|
-
let
|
|
56445
|
-
id:
|
|
56446
|
-
type:
|
|
56447
|
-
style: EH(
|
|
56448
|
-
attributes: OH(
|
|
56444
|
+
let t = o.elementType, n = `elem-${t}-${Date.now()}`, r = {
|
|
56445
|
+
id: n,
|
|
56446
|
+
type: t,
|
|
56447
|
+
style: EH(t),
|
|
56448
|
+
attributes: OH(t)
|
|
56449
56449
|
};
|
|
56450
56450
|
if (s?.type === "column") {
|
|
56451
|
-
let
|
|
56452
|
-
if (
|
|
56453
|
-
let
|
|
56454
|
-
z(
|
|
56451
|
+
let t = Gn(a);
|
|
56452
|
+
if (t) {
|
|
56453
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56454
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56455
56455
|
}
|
|
56456
56456
|
} else if (s?.type === "element") {
|
|
56457
|
-
let
|
|
56458
|
-
if (
|
|
56459
|
-
let o = Kn(
|
|
56460
|
-
z(
|
|
56457
|
+
let t = s.columnId, i = s.rowId;
|
|
56458
|
+
if (t && i) {
|
|
56459
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56460
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56461
56461
|
}
|
|
56462
56462
|
} else if (s?.type === "row") {
|
|
56463
|
-
let e = Kn(
|
|
56464
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56463
|
+
let e = Kn(a, W.body.rows);
|
|
56464
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56465
56465
|
} else if (s?.type === "canvas") {
|
|
56466
|
-
let e = W.body.rows,
|
|
56467
|
-
|
|
56466
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56467
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56468
56468
|
}
|
|
56469
56469
|
return;
|
|
56470
56470
|
}
|
|
56471
56471
|
if (o?.type === "palette-merge-tag") {
|
|
56472
|
-
let
|
|
56473
|
-
id:
|
|
56472
|
+
let t = o.mergeTagValue, n = `elem-text-${Date.now()}`, r = {
|
|
56473
|
+
id: n,
|
|
56474
56474
|
type: "text",
|
|
56475
56475
|
style: EH("text"),
|
|
56476
56476
|
attributes: {
|
|
56477
56477
|
...OH("text"),
|
|
56478
|
-
text:
|
|
56478
|
+
text: t
|
|
56479
56479
|
}
|
|
56480
56480
|
};
|
|
56481
56481
|
if (s?.type === "column") {
|
|
56482
|
-
let
|
|
56483
|
-
if (
|
|
56484
|
-
let
|
|
56485
|
-
z(
|
|
56482
|
+
let t = Gn(a);
|
|
56483
|
+
if (t) {
|
|
56484
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56485
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56486
56486
|
}
|
|
56487
56487
|
} else if (s?.type === "element") {
|
|
56488
|
-
let
|
|
56489
|
-
if (
|
|
56490
|
-
let o = Kn(
|
|
56491
|
-
z(
|
|
56488
|
+
let t = s.columnId, i = s.rowId;
|
|
56489
|
+
if (t && i) {
|
|
56490
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56491
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56492
56492
|
}
|
|
56493
56493
|
} else if (s?.type === "row") {
|
|
56494
|
-
let e = Kn(
|
|
56495
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56494
|
+
let e = Kn(a, W.body.rows);
|
|
56495
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56496
56496
|
} else if (s?.type === "canvas") {
|
|
56497
|
-
let e = W.body.rows,
|
|
56498
|
-
|
|
56497
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56498
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56499
56499
|
}
|
|
56500
56500
|
return;
|
|
56501
56501
|
}
|
|
56502
56502
|
if (o?.type === "strata-component") {
|
|
56503
|
-
let
|
|
56504
|
-
id:
|
|
56505
|
-
type:
|
|
56503
|
+
let t = o.elementType || "button", n = `elem-${t}-${Date.now()}`, r = {
|
|
56504
|
+
id: n,
|
|
56505
|
+
type: t,
|
|
56506
56506
|
style: {
|
|
56507
|
-
...EH(
|
|
56507
|
+
...EH(t),
|
|
56508
56508
|
...o.strataProps || {}
|
|
56509
56509
|
},
|
|
56510
|
-
attributes: OH(
|
|
56510
|
+
attributes: OH(t)
|
|
56511
56511
|
};
|
|
56512
56512
|
if (s?.type === "column") {
|
|
56513
|
-
let
|
|
56514
|
-
if (
|
|
56515
|
-
let
|
|
56516
|
-
z(
|
|
56513
|
+
let t = Gn(a);
|
|
56514
|
+
if (t) {
|
|
56515
|
+
let i = Kn(t, W.body.rows)?.columns.find((e) => e.id === a);
|
|
56516
|
+
z(t, a, r, Yn(a, i ? e(i).length : 0)), R(n);
|
|
56517
56517
|
}
|
|
56518
56518
|
} else if (s?.type === "element") {
|
|
56519
|
-
let
|
|
56520
|
-
if (
|
|
56521
|
-
let o = Kn(
|
|
56522
|
-
z(
|
|
56519
|
+
let t = s.columnId, i = s.rowId;
|
|
56520
|
+
if (t && i) {
|
|
56521
|
+
let o = Kn(i, W.body.rows)?.columns.find((e) => e.id === t), s = o ? e(o).indexOf(a) : -1;
|
|
56522
|
+
z(i, t, r, s === -1 ? void 0 : Xn(a, s)), R(n);
|
|
56523
56523
|
}
|
|
56524
56524
|
} else if (s?.type === "row") {
|
|
56525
|
-
let e = Kn(
|
|
56526
|
-
e && e.columns.length > 0 && (z(e.id, e.columns[0].id,
|
|
56525
|
+
let e = Kn(a, W.body.rows);
|
|
56526
|
+
e && e.columns.length > 0 && (z(e.id, e.columns[0].id, r), R(n));
|
|
56527
56527
|
} else if (s?.type === "canvas") {
|
|
56528
|
-
let e = W.body.rows,
|
|
56529
|
-
|
|
56528
|
+
let e = W.body.rows, t = e[e.length - 1], i = t?.columns[t.columns.length - 1];
|
|
56529
|
+
t && i && (z(t.id, i.id, r), R(n));
|
|
56530
56530
|
}
|
|
56531
56531
|
return;
|
|
56532
56532
|
}
|
|
56533
56533
|
if (o?.type === "row") {
|
|
56534
|
-
if (
|
|
56535
|
-
let
|
|
56534
|
+
if (i === a) return;
|
|
56535
|
+
let t = !!o.parentRowId, n = o.parentRowId, r = o.parentColId, c = (e, t) => {
|
|
56536
56536
|
for (let n of e) for (let e of n.columns) {
|
|
56537
56537
|
if (e.id === t) return e;
|
|
56538
56538
|
let n = c(e.nestedRows || [], t);
|
|
@@ -56540,91 +56540,91 @@ var LW = (e) => ({ body: {
|
|
|
56540
56540
|
}
|
|
56541
56541
|
return null;
|
|
56542
56542
|
};
|
|
56543
|
-
if (
|
|
56544
|
-
if (s?.type === "canvas") nt(
|
|
56543
|
+
if (t && n && r) {
|
|
56544
|
+
if (s?.type === "canvas") nt(i, n, r);
|
|
56545
56545
|
else if (s?.type === "row") if (s.parentRowId) {
|
|
56546
|
-
let
|
|
56547
|
-
H(
|
|
56546
|
+
let t = s.parentRowId, o = s.parentColId, l = c(W.body.rows, o), u = l ? e(l).indexOf(a) : -1;
|
|
56547
|
+
H(i, n, r, t, o, u === -1 ? void 0 : Xn(a, u));
|
|
56548
56548
|
} else {
|
|
56549
|
-
let e = W.body.rows.findIndex((e) => e.id ===
|
|
56550
|
-
nt(
|
|
56549
|
+
let e = W.body.rows.findIndex((e) => e.id === a);
|
|
56550
|
+
nt(i, n, r, e === -1 ? void 0 : e);
|
|
56551
56551
|
}
|
|
56552
56552
|
else if (s?.type === "column") {
|
|
56553
|
-
let
|
|
56554
|
-
if (l) H(
|
|
56553
|
+
let t = a, o = c(W.body.rows, t), s = Yn(t, o ? e(o).length : 0), l = qn(t, W.body.rows);
|
|
56554
|
+
if (l) H(i, n, r, l.rowId, t, s);
|
|
56555
56555
|
else {
|
|
56556
|
-
let
|
|
56557
|
-
|
|
56556
|
+
let e = W.body.rows.find((e) => e.columns.some((e) => e.id === t));
|
|
56557
|
+
e && H(i, n, r, e.id, t, s);
|
|
56558
56558
|
}
|
|
56559
56559
|
} else if (s?.type === "element") {
|
|
56560
|
-
let
|
|
56561
|
-
if (
|
|
56562
|
-
let s = c(W.body.rows,
|
|
56563
|
-
H(
|
|
56560
|
+
let t = s.columnId, o = s.rowId;
|
|
56561
|
+
if (t && o) {
|
|
56562
|
+
let s = c(W.body.rows, t), l = s ? e(s).indexOf(a) : -1;
|
|
56563
|
+
H(i, n, r, o, t, l === -1 ? void 0 : Xn(a, l));
|
|
56564
56564
|
}
|
|
56565
56565
|
}
|
|
56566
56566
|
} else if (s?.type === "row" && !s.parentRowId) {
|
|
56567
|
-
let e = W.body.rows.findIndex((e) => e.id ===
|
|
56568
|
-
e !== -1 && Le(
|
|
56567
|
+
let e = W.body.rows.findIndex((e) => e.id === a);
|
|
56568
|
+
e !== -1 && Le(i, Xn(a, e));
|
|
56569
56569
|
} else if (s?.type === "column") {
|
|
56570
|
-
let
|
|
56571
|
-
if (
|
|
56572
|
-
let
|
|
56573
|
-
tt(
|
|
56570
|
+
let t = a, n = qn(t, W.body.rows)?.rowId ?? W.body.rows.find((e) => e.columns.some((e) => e.id === t))?.id;
|
|
56571
|
+
if (n && n !== i) {
|
|
56572
|
+
let r = Kn(n, W.body.rows)?.columns.find((e) => e.id === t);
|
|
56573
|
+
tt(i, n, t, Yn(t, r ? e(r).length : 0));
|
|
56574
56574
|
}
|
|
56575
56575
|
} else if (s?.type === "element") {
|
|
56576
|
-
let
|
|
56577
|
-
if (
|
|
56578
|
-
let
|
|
56579
|
-
tt(
|
|
56576
|
+
let t = s.columnId, n = s.rowId;
|
|
56577
|
+
if (t && n && n !== i) {
|
|
56578
|
+
let r = c(W.body.rows, t), o = r ? e(r).indexOf(a) : -1;
|
|
56579
|
+
tt(i, n, t, o === -1 ? void 0 : Xn(a, o));
|
|
56580
56580
|
}
|
|
56581
56581
|
} else if (s?.type === "row" && s.parentRowId) {
|
|
56582
56582
|
let e = s.parentRowId, t = s.parentColId;
|
|
56583
|
-
e && t && e !==
|
|
56583
|
+
e && t && e !== i && tt(i, e, t);
|
|
56584
56584
|
}
|
|
56585
56585
|
return;
|
|
56586
56586
|
}
|
|
56587
56587
|
if (o?.type === "element") {
|
|
56588
56588
|
if (s?.type === "column") {
|
|
56589
|
-
let e =
|
|
56589
|
+
let e = a, t = Gn(e);
|
|
56590
56590
|
if (t) {
|
|
56591
56591
|
let n = Kn(t, W.body.rows)?.columns.find((t) => t.id === e);
|
|
56592
|
-
Re(
|
|
56592
|
+
Re(i, t, e, Yn(e, n?.elements.length ?? 0));
|
|
56593
56593
|
}
|
|
56594
|
-
} else if (s?.type === "element" &&
|
|
56595
|
-
let
|
|
56596
|
-
if (
|
|
56597
|
-
let
|
|
56598
|
-
Re(
|
|
56594
|
+
} else if (s?.type === "element" && i !== a) {
|
|
56595
|
+
let t = s.columnId, n = s.rowId;
|
|
56596
|
+
if (t && n) {
|
|
56597
|
+
let r = Kn(n, W.body.rows)?.columns.find((e) => e.id === t), o = r ? e(r).indexOf(a) : -1;
|
|
56598
|
+
Re(i, n, t, o === -1 ? void 0 : Xn(a, o));
|
|
56599
56599
|
}
|
|
56600
56600
|
} else if (s?.type === "row") {
|
|
56601
|
-
let e = Kn(
|
|
56602
|
-
e && e.columns.length > 0 && Re(
|
|
56601
|
+
let e = Kn(a, W.body.rows);
|
|
56602
|
+
e && e.columns.length > 0 && Re(i, e.id, e.columns[0].id);
|
|
56603
56603
|
} else if (s?.type === "canvas") {
|
|
56604
56604
|
let e = W.body.rows, t = e[e.length - 1], n = t?.columns[t.columns.length - 1];
|
|
56605
|
-
t && n && Re(
|
|
56605
|
+
t && n && Re(i, t.id, n.id);
|
|
56606
56606
|
}
|
|
56607
56607
|
return;
|
|
56608
56608
|
}
|
|
56609
|
-
}, er = (
|
|
56610
|
-
row:
|
|
56611
|
-
parentRowId:
|
|
56612
|
-
parentColId:
|
|
56609
|
+
}, er = (t, n, r) => /* @__PURE__ */ N(aW, {
|
|
56610
|
+
row: t,
|
|
56611
|
+
parentRowId: n,
|
|
56612
|
+
parentColId: r,
|
|
56613
56613
|
selectedRowId: I,
|
|
56614
56614
|
selectRow: Ee,
|
|
56615
56615
|
previewMode: Et,
|
|
56616
56616
|
deviceView: gt,
|
|
56617
56617
|
selectedElementId: F,
|
|
56618
|
-
children:
|
|
56619
|
-
col:
|
|
56620
|
-
rowId:
|
|
56621
|
-
parentRowId:
|
|
56622
|
-
parentColId:
|
|
56618
|
+
children: t.columns.map((i) => /* @__PURE__ */ N(oW, {
|
|
56619
|
+
col: i,
|
|
56620
|
+
rowId: t.id,
|
|
56621
|
+
parentRowId: n,
|
|
56622
|
+
parentColId: r,
|
|
56623
56623
|
selectedColumnId: L,
|
|
56624
56624
|
selectColumn: De,
|
|
56625
56625
|
previewMode: Et,
|
|
56626
56626
|
deviceView: gt,
|
|
56627
|
-
children:
|
|
56627
|
+
children: i.elements.length === 0 && (i.nestedRows || []).length === 0 ? Et ? /* @__PURE__ */ N("div", { className: "min-h-[48px]" }) : /* @__PURE__ */ P("div", {
|
|
56628
56628
|
className: "flex-1 flex flex-col items-center justify-center gap-3 p-5 border border-dashed border-slate-700/40 rounded-lg bg-slate-900/20 text-center select-none min-h-[80px]",
|
|
56629
56629
|
children: [/* @__PURE__ */ N("span", {
|
|
56630
56630
|
className: "text-[9px] font-semibold uppercase tracking-widest text-slate-500",
|
|
@@ -56635,10 +56635,10 @@ var LW = (e) => ({ body: {
|
|
|
56635
56635
|
children: [
|
|
56636
56636
|
/* @__PURE__ */ P("button", {
|
|
56637
56637
|
title: "Add Heading",
|
|
56638
|
-
onClick: (
|
|
56639
|
-
|
|
56638
|
+
onClick: (e) => {
|
|
56639
|
+
e.stopPropagation();
|
|
56640
56640
|
let n = `elem-heading-${Date.now()}`;
|
|
56641
|
-
z(
|
|
56641
|
+
z(t.id, i.id, {
|
|
56642
56642
|
id: n,
|
|
56643
56643
|
type: "heading",
|
|
56644
56644
|
style: EH("heading"),
|
|
@@ -56654,10 +56654,10 @@ var LW = (e) => ({ body: {
|
|
|
56654
56654
|
}),
|
|
56655
56655
|
/* @__PURE__ */ P("button", {
|
|
56656
56656
|
title: "Add Image",
|
|
56657
|
-
onClick: (
|
|
56658
|
-
|
|
56657
|
+
onClick: (e) => {
|
|
56658
|
+
e.stopPropagation();
|
|
56659
56659
|
let n = `elem-image-${Date.now()}`;
|
|
56660
|
-
z(
|
|
56660
|
+
z(t.id, i.id, {
|
|
56661
56661
|
id: n,
|
|
56662
56662
|
type: "image",
|
|
56663
56663
|
style: EH("image"),
|
|
@@ -56673,10 +56673,10 @@ var LW = (e) => ({ body: {
|
|
|
56673
56673
|
}),
|
|
56674
56674
|
/* @__PURE__ */ P("button", {
|
|
56675
56675
|
title: "Add Button",
|
|
56676
|
-
onClick: (
|
|
56677
|
-
|
|
56676
|
+
onClick: (e) => {
|
|
56677
|
+
e.stopPropagation();
|
|
56678
56678
|
let n = `elem-button-${Date.now()}`;
|
|
56679
|
-
z(
|
|
56679
|
+
z(t.id, i.id, {
|
|
56680
56680
|
id: n,
|
|
56681
56681
|
type: "button",
|
|
56682
56682
|
style: EH("button"),
|
|
@@ -56692,12 +56692,12 @@ var LW = (e) => ({ body: {
|
|
|
56692
56692
|
})
|
|
56693
56693
|
]
|
|
56694
56694
|
})]
|
|
56695
|
-
}) : /* @__PURE__ */ N(M, { children:
|
|
56696
|
-
let n =
|
|
56695
|
+
}) : /* @__PURE__ */ N(M, { children: e(i).map((e) => {
|
|
56696
|
+
let n = i.elements.find((t) => t.id === e);
|
|
56697
56697
|
if (n) return /* @__PURE__ */ N(lW, {
|
|
56698
56698
|
elem: n,
|
|
56699
|
-
columnId:
|
|
56700
|
-
rowId:
|
|
56699
|
+
columnId: i.id,
|
|
56700
|
+
rowId: t.id,
|
|
56701
56701
|
deviceView: gt,
|
|
56702
56702
|
selectedElementId: F,
|
|
56703
56703
|
selectElement: R,
|
|
@@ -56729,11 +56729,11 @@ var LW = (e) => ({ body: {
|
|
|
56729
56729
|
mergeTags: fe || [],
|
|
56730
56730
|
themeBgColor: j
|
|
56731
56731
|
}, n.id);
|
|
56732
|
-
let
|
|
56733
|
-
return
|
|
56732
|
+
let r = (i.nestedRows || []).find((t) => t.id === e);
|
|
56733
|
+
return r ? er(r, t.id, i.id) : null;
|
|
56734
56734
|
}) })
|
|
56735
|
-
},
|
|
56736
|
-
},
|
|
56735
|
+
}, i.id))
|
|
56736
|
+
}, t.id), tr = () => {
|
|
56737
56737
|
if (F) {
|
|
56738
56738
|
let e = (t) => {
|
|
56739
56739
|
for (let n of t) for (let t of n.columns) {
|
|
@@ -56903,7 +56903,7 @@ var LW = (e) => ({ body: {
|
|
|
56903
56903
|
Pn("You do not have enough tokens to perform this action."), fn("");
|
|
56904
56904
|
return;
|
|
56905
56905
|
}
|
|
56906
|
-
if (!
|
|
56906
|
+
if (!a) {
|
|
56907
56907
|
Pn("AI configuration incomplete. Please check your AI settings.");
|
|
56908
56908
|
return;
|
|
56909
56909
|
}
|
|
@@ -57266,7 +57266,7 @@ var LW = (e) => ({ body: {
|
|
|
57266
57266
|
/* @__PURE__ */ N(IH, {
|
|
57267
57267
|
activeTab: St,
|
|
57268
57268
|
setActiveTab: Ct,
|
|
57269
|
-
showSaveButton:
|
|
57269
|
+
showSaveButton: r && !_e,
|
|
57270
57270
|
isSavingLayout: _n,
|
|
57271
57271
|
onSaveClick: kn,
|
|
57272
57272
|
theme: J,
|
|
@@ -58104,7 +58104,7 @@ var LW = (e) => ({ body: {
|
|
|
58104
58104
|
DraggablePaletteItem: QH,
|
|
58105
58105
|
ICONS: X,
|
|
58106
58106
|
tierFeatures: xe,
|
|
58107
|
-
templateKind:
|
|
58107
|
+
templateKind: i,
|
|
58108
58108
|
onTapAdd: At === "mobile" ? Jn : void 0
|
|
58109
58109
|
}),
|
|
58110
58110
|
Pt === "blocks" && /* @__PURE__ */ N(qH, {
|
|
@@ -58174,7 +58174,7 @@ var LW = (e) => ({ body: {
|
|
|
58174
58174
|
AccordionSection: JH
|
|
58175
58175
|
}),
|
|
58176
58176
|
Pt === "settings" && /* @__PURE__ */ N(wU, {
|
|
58177
|
-
apiKey:
|
|
58177
|
+
apiKey: a,
|
|
58178
58178
|
templateId: E,
|
|
58179
58179
|
theme: J,
|
|
58180
58180
|
manageLandingPagePublishing: ut,
|