@myissue/vue-website-page-builder 3.5.45 → 3.5.46
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.
|
@@ -2,7 +2,7 @@ var ER = Object.defineProperty;
|
|
|
2
2
|
var AR = (o, e, t) => e in o ? ER(o, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : o[e] = t;
|
|
3
3
|
var Ae = (o, e, t) => AR(o, typeof e != "symbol" ? e + "" : e, t);
|
|
4
4
|
import * as ou from "vue";
|
|
5
|
-
import { ref as S, readonly as $R, defineComponent as ae, computed as L, openBlock as f, createBlock as be, Teleport as wn, createElementVNode as p, createElementBlock as w, normalizeStyle as He, normalizeClass as O, toDisplayString as y, unref as g, renderSlot as So, createCommentVNode as E, watchEffect as ui, Fragment as re, withCtx as U, shallowRef as _R, onMounted as bo, onBeforeUnmount as pr, h as mn, getCurrentInstance as bm, nextTick as
|
|
5
|
+
import { ref as S, readonly as $R, defineComponent as ae, computed as L, openBlock as f, createBlock as be, Teleport as wn, createElementVNode as p, createElementBlock as w, normalizeStyle as He, normalizeClass as O, toDisplayString as y, unref as g, renderSlot as So, createCommentVNode as E, watchEffect as ui, Fragment as re, withCtx as U, shallowRef as _R, onMounted as bo, onBeforeUnmount as pr, h as mn, getCurrentInstance as bm, nextTick as ce, markRaw as $r, customRef as BR, effectScope as mm, toRaw as Pt, watch as le, hasInjectionContext as IR, inject as nr, reactive as HR, isRef as ca, isReactive as ec, toRef as cd, getCurrentScope as DR, onScopeDispose as RR, toRefs as ru, withModifiers as Te, withDirectives as Ie, renderList as ye, vModelSelect as Lt, onBeforeMount as zR, createVNode as z, vModelText as Po, Transition as zo, provide as Bo, resolveDynamicComponent as Il, cloneVNode as OR, onUnmounted as gm, createStaticVNode as tc, createTextVNode as Ne, withKeys as ua, useModel as eo, mergeModels as xm, TransitionGroup as hm, useId as NR, vShow as Hr } from "vue";
|
|
6
6
|
const fm = "تم النسخ", ym = "HTML", vm = "قابل للتحرير", wm = "أسطر", Sm = "التخطيط", km = "الألوان", Cm = "التباعد", Tm = "الحدود", Pm = "متقدم", Mm = "أساسي", Lm = "ثانوي", Em = "معاينة", Am = "Applied", $m = "Undo", _m = "Redo", Bm = "of", Im = "حفظ", Hm = "خيارات", Dm = "الصورة الرمزية", Rm = "نشر", zm = "مكون", Om = "أنماط", Nm = "الإعدادات", Fm = "أدوات", jm = "الطباعة", Vm = "الخط", qm = "اختر", Um = "موروث", Wm = "الحشو", Gm = "الهامش", Km = "عام", Jm = "محدد", Ym = "الحدود", Qm = "شفاف", Xm = "إضافة", Zm = "المنتجات", eg = "تصفح", tg = "الفئة", og = "نظيف", rg = "بحدود", ng = "ظل", ig = "مرتفع", ag = "محدد", sg = "إزالة", lg = "الخاصية", dg = "القيمة", pg = "إغلاق", cg = "التحرير", ug = "الخصائص", bg = "حذف", mg = "الجوال", gg = "غامق", xg = "رابط", hg = "قائمة", fg = "بحث", yg = "أفقي", vg = "عمودي", wg = "مربع", Sg = "الصور", kg = "السابق", Cg = "التالي", Tg = "معلومات", Pg = "نص", Mg = "الأنواع", Lg = "السمات", Eg = "التسويق", Ag = "بطاقات", $g = "شرائح", _g = "القسم الرئيسي", Bg = "الميزات", Ig = "التسعير", Hg = "الفريق", Dg = "الأسئلة الشائعة", Rg = "اتصل", zg = "أزرار", Og = "المكونات", Ng = "مقالة", Fg = "مصفوفة", jg = "المحتوى", Vg = "عنصر", qg = "مكون", Ug = "الكل", Wg = "صورة", Gg = "التعتيم", Kg = "التطبيق", Jg = "الإصدار", Yg = "الخاصية", Qg = "القيمة", Xg = "العنوان", Zg = "المعرّف", ex = "الإعداد", tx = "المظهر", ox = "اللغة", rx = "الإشعارات", nx = "مفعّل", ix = "معطّل", ax = "الشعار", sx = "الوضع", lx = "التكوين", dx = "السابق", px = "العناوين", cx = "الوسائط", ux = "الروابط", bx = "أعلى", mx = "أسفل", gx = "يسار", xx = "يمين", hx = "عنصر", fx = "عمودي", yx = "أفقي", vx = "تغطية", wx = "احتواء", Sx = "الشكل", kx = "تلقائي", Cx = "مربع", Tx = "استبدال", Px = "هبوط", Mx = "مؤسسي", Lx = "Saved", Ex = "إعادة تعيين", Ax = "لون مميز", $x = "تمييز", _x = "محايد", Bx = "فاتح", FR = {
|
|
7
7
|
"Reset Page": "إعادة تعيين الصفحة",
|
|
8
8
|
"Global Page Styles": "أنماط الصفحة العامة",
|
|
@@ -12713,8 +12713,8 @@ class x9 {
|
|
|
12713
12713
|
let h = d == s.childCount;
|
|
12714
12714
|
h || (m = -1), this.placed = Di(this.placed, t, oe.from(c)), this.frontier[t].match = u, h && m < 0 && r && r.type == this.frontier[this.depth].type && this.frontier.length > 1 && this.closeFrontierNode();
|
|
12715
12715
|
for (let x = 0, v = s; x < m; x++) {
|
|
12716
|
-
let
|
|
12717
|
-
this.frontier.push({ type:
|
|
12716
|
+
let k = v.lastChild;
|
|
12717
|
+
this.frontier.push({ type: k.type, match: k.contentMatchAt(k.childCount) }), v = k.content;
|
|
12718
12718
|
}
|
|
12719
12719
|
this.unplaced = h ? e == 0 ? me.empty : new me(Hi(a.content, e - 1, 1), e - 1, m < 0 ? a.openEnd : e - 1) : new me(Hi(a.content, e, d), a.openStart, a.openEnd);
|
|
12720
12720
|
}
|
|
@@ -12831,11 +12831,11 @@ function y9(o, e, t, r) {
|
|
|
12831
12831
|
let m = (b + c + 1) % (r.openStart + 1), h = d[m];
|
|
12832
12832
|
if (h)
|
|
12833
12833
|
for (let x = 0; x < a.length; x++) {
|
|
12834
|
-
let v = a[(x + l) % a.length],
|
|
12835
|
-
v < 0 && (
|
|
12836
|
-
let T = n.node(v - 1),
|
|
12837
|
-
if (T.canReplaceWith(
|
|
12838
|
-
return o.replace(n.before(v),
|
|
12834
|
+
let v = a[(x + l) % a.length], k = !0;
|
|
12835
|
+
v < 0 && (k = !1, v = -v);
|
|
12836
|
+
let T = n.node(v - 1), C = n.index(v - 1);
|
|
12837
|
+
if (T.canReplaceWith(C, C, h.type, h.marks))
|
|
12838
|
+
return o.replace(n.before(v), k ? i.after(v) : t, new me(TI(r.content, 0, r.openStart, m), m, r.openEnd));
|
|
12839
12839
|
}
|
|
12840
12840
|
}
|
|
12841
12841
|
let u = o.steps.length;
|
|
@@ -14299,8 +14299,8 @@ function WI(o, e, t, r) {
|
|
|
14299
14299
|
if (d && (a = (s = n.contentMatchAt(n.childCount)).findWrapping(i.type)) && s.matchType(a[0] || i.type).validEnd) {
|
|
14300
14300
|
if (t) {
|
|
14301
14301
|
let m = e.pos + i.nodeSize, h = oe.empty;
|
|
14302
|
-
for (let
|
|
14303
|
-
h = oe.from(a[
|
|
14302
|
+
for (let k = a.length - 1; k >= 0; k--)
|
|
14303
|
+
h = oe.from(a[k].create(null, h));
|
|
14304
14304
|
h = oe.from(n.copy(h));
|
|
14305
14305
|
let x = o.tr.step(new Qt(e.pos - 1, m, e.pos, m, new me(h, 1, 0), a.length, !0)), v = x.doc.resolve(m + 2 * a.length);
|
|
14306
14306
|
v.nodeAfter && v.nodeAfter.type == n.type && Vr(x.doc, v.pos) && x.join(v.pos), t(x.scrollIntoView());
|
|
@@ -14319,10 +14319,10 @@ function WI(o, e, t, r) {
|
|
|
14319
14319
|
v++;
|
|
14320
14320
|
if (m.canReplace(m.childCount, m.childCount, x.content)) {
|
|
14321
14321
|
if (t) {
|
|
14322
|
-
let
|
|
14323
|
-
for (let
|
|
14324
|
-
|
|
14325
|
-
let T = o.tr.step(new Qt(e.pos - h.length, e.pos + i.nodeSize, e.pos + v, e.pos + i.nodeSize - v, new me(
|
|
14322
|
+
let k = oe.empty;
|
|
14323
|
+
for (let C = h.length - 1; C >= 0; C--)
|
|
14324
|
+
k = oe.from(h[C].copy(k));
|
|
14325
|
+
let T = o.tr.step(new Qt(e.pos - h.length, e.pos + i.nodeSize, e.pos + v, e.pos + i.nodeSize - v, new me(k, h.length, 0), 0, !0));
|
|
14326
14326
|
t(T.scrollIntoView());
|
|
14327
14327
|
}
|
|
14328
14328
|
return !0;
|
|
@@ -15191,8 +15191,8 @@ class _a {
|
|
|
15191
15191
|
v.nodeName == "BR" && (s = l = { node: v.parentNode, offset: yt(v) + 1 });
|
|
15192
15192
|
break;
|
|
15193
15193
|
}
|
|
15194
|
-
let
|
|
15195
|
-
if (
|
|
15194
|
+
let k = x.pmViewDesc;
|
|
15195
|
+
if (k && k.node && k.node.isBlock)
|
|
15196
15196
|
break;
|
|
15197
15197
|
}
|
|
15198
15198
|
} else {
|
|
@@ -15898,8 +15898,8 @@ function SO(o, e, t, r) {
|
|
|
15898
15898
|
if (b.isText) {
|
|
15899
15899
|
let v = h;
|
|
15900
15900
|
a < n.length && n[a].from < v && (v = n[a].from);
|
|
15901
|
-
for (let
|
|
15902
|
-
s[
|
|
15901
|
+
for (let k = 0; k < s.length; k++)
|
|
15902
|
+
s[k].to < v && (v = s[k].to);
|
|
15903
15903
|
v < h && (l = b.cut(v - i), b = b.cut(0, v - i), h = v, m = -1);
|
|
15904
15904
|
} else
|
|
15905
15905
|
for (; a < n.length && n[a].to < h; )
|
|
@@ -16978,7 +16978,7 @@ function dN(o, e, t) {
|
|
|
16978
16978
|
l.setSelection(new Se(b));
|
|
16979
16979
|
else {
|
|
16980
16980
|
let m = l.mapping.map(s);
|
|
16981
|
-
l.mapping.maps[l.mapping.maps.length - 1].forEach((h, x, v,
|
|
16981
|
+
l.mapping.maps[l.mapping.maps.length - 1].forEach((h, x, v, k) => m = k), l.setSelection(bc(o, b, l.doc.resolve(m)));
|
|
16982
16982
|
}
|
|
16983
16983
|
o.focus(), o.dispatch(l.setMeta("uiEvent", "drop"));
|
|
16984
16984
|
}
|
|
@@ -17385,12 +17385,12 @@ function pN(o, e, t, r, n, i, a) {
|
|
|
17385
17385
|
let u = 0;
|
|
17386
17386
|
t.maps[d].forEach((b, m, h, x) => {
|
|
17387
17387
|
let v = x - h - (m - b);
|
|
17388
|
-
for (let
|
|
17389
|
-
let T = s[
|
|
17388
|
+
for (let k = 0; k < s.length; k += 3) {
|
|
17389
|
+
let T = s[k + 1];
|
|
17390
17390
|
if (T < 0 || b > T + c - u)
|
|
17391
17391
|
continue;
|
|
17392
|
-
let
|
|
17393
|
-
m >=
|
|
17392
|
+
let C = s[k] + c - u;
|
|
17393
|
+
m >= C ? s[k + 1] = b <= C ? -2 : -1 : b >= c && v && (s[k] += v, s[k + 1] += v);
|
|
17394
17394
|
}
|
|
17395
17395
|
u += v;
|
|
17396
17396
|
}), c = t.maps[d].map(c, -1);
|
|
@@ -17409,8 +17409,8 @@ function pN(o, e, t, r, n, i, a) {
|
|
|
17409
17409
|
}
|
|
17410
17410
|
let b = t.map(o[d + 1] + i, -1), m = b - n, { index: h, offset: x } = r.content.findIndex(u), v = r.maybeChild(h);
|
|
17411
17411
|
if (v && x == u && x + v.nodeSize == m) {
|
|
17412
|
-
let
|
|
17413
|
-
|
|
17412
|
+
let k = s[d + 2].mapInner(t, v, c + 1, o[d] + i + 1, a);
|
|
17413
|
+
k != Tt ? (s[d] = u, s[d + 1] = m, s[d + 2] = k) : (s[d + 1] = -2, l = !0);
|
|
17414
17414
|
} else
|
|
17415
17415
|
l = !0;
|
|
17416
17416
|
}
|
|
@@ -17746,8 +17746,8 @@ function vN(o, e, t) {
|
|
|
17746
17746
|
let { node: r, fromOffset: n, toOffset: i, from: a, to: s } = o.docView.parseRange(e, t), l = o.domSelectionRange(), d, c = l.anchorNode;
|
|
17747
17747
|
if (c && o.dom.contains(c.nodeType == 1 ? c : c.parentNode) && (d = [{ node: c, offset: l.anchorOffset }], zl(l) || d.push({ node: l.focusNode, offset: l.focusOffset })), ct && o.input.lastKeyCode === 8)
|
|
17748
17748
|
for (let v = i; v > n; v--) {
|
|
17749
|
-
let
|
|
17750
|
-
if (
|
|
17749
|
+
let k = r.childNodes[v - 1], T = k.pmViewDesc;
|
|
17750
|
+
if (k.nodeName == "BR" && !T) {
|
|
17751
17751
|
i = v;
|
|
17752
17752
|
break;
|
|
17753
17753
|
}
|
|
@@ -17766,8 +17766,8 @@ function vN(o, e, t) {
|
|
|
17766
17766
|
context: m
|
|
17767
17767
|
});
|
|
17768
17768
|
if (d && d[0].pos != null) {
|
|
17769
|
-
let v = d[0].pos,
|
|
17770
|
-
|
|
17769
|
+
let v = d[0].pos, k = d[1] && d[1].pos;
|
|
17770
|
+
k == null && (k = v), h = { anchor: v + a, head: k + a };
|
|
17771
17771
|
}
|
|
17772
17772
|
return { doc: x, sel: h, from: a, to: s };
|
|
17773
17773
|
}
|
|
@@ -17821,7 +17821,7 @@ function kN(o, e, t, r, n) {
|
|
|
17821
17821
|
return;
|
|
17822
17822
|
}
|
|
17823
17823
|
o.state.selection.from < o.state.selection.to && h.start == h.endB && o.state.selection instanceof Pe && (h.start > o.state.selection.from && h.start <= o.state.selection.from + 2 && o.state.selection.from >= d.from ? h.start = o.state.selection.from : h.endA < o.state.selection.to && h.endA >= o.state.selection.to - 2 && o.state.selection.to <= d.to && (h.endB += o.state.selection.to - h.endA, h.endA = o.state.selection.to)), Yt && Rr <= 11 && h.endB == h.start + 1 && h.endA == h.start && h.start > d.from && d.doc.textBetween(h.start - d.from - 1, h.start - d.from + 1) == " " && (h.start--, h.endA--, h.endB--);
|
|
17824
|
-
let x = d.doc.resolveNoCache(h.start - d.from), v = d.doc.resolveNoCache(h.endB - d.from),
|
|
17824
|
+
let x = d.doc.resolveNoCache(h.start - d.from), v = d.doc.resolveNoCache(h.endB - d.from), k = c.resolve(h.start), T = x.sameParent(v) && x.parent.inlineContent && k.end() >= h.endA;
|
|
17825
17825
|
if ((ni && o.input.lastIOSEnter > Date.now() - 225 && (!T || n.some((P) => P.nodeName == "DIV" || P.nodeName == "P")) || !T && x.pos < d.doc.content.size && (!x.sameParent(v) || !x.parent.inlineContent) && x.pos < v.pos && !/\S/.test(d.doc.textBetween(x.pos, v.pos, "", ""))) && o.someProp("handleKeyDown", (P) => P(o, on(13, "Enter")))) {
|
|
17826
17826
|
o.input.lastIOSEnter = 0;
|
|
17827
17827
|
return;
|
|
@@ -17835,28 +17835,28 @@ function kN(o, e, t, r, n) {
|
|
|
17835
17835
|
return P(o, on(13, "Enter"));
|
|
17836
17836
|
});
|
|
17837
17837
|
}, 20));
|
|
17838
|
-
let
|
|
17839
|
-
let I = P || o.state.tr.replace(
|
|
17838
|
+
let C = h.start, B = h.endA, A = (P) => {
|
|
17839
|
+
let I = P || o.state.tr.replace(C, B, d.doc.slice(h.start - d.from, h.endB - d.from));
|
|
17840
17840
|
if (d.sel) {
|
|
17841
17841
|
let $ = Qu(o, I.doc, d.sel);
|
|
17842
|
-
$ && !(ct && o.composing && $.empty && (h.start != h.endB || o.input.lastChromeDelete < Date.now() - 100) && ($.head ==
|
|
17842
|
+
$ && !(ct && o.composing && $.empty && (h.start != h.endB || o.input.lastChromeDelete < Date.now() - 100) && ($.head == C || $.head == I.mapping.map(B) - 1) || Yt && $.empty && $.head == C) && I.setSelection($);
|
|
17843
17843
|
}
|
|
17844
17844
|
return i && I.setMeta("composition", i), I.scrollIntoView();
|
|
17845
17845
|
}, H;
|
|
17846
17846
|
if (T)
|
|
17847
17847
|
if (x.pos == v.pos) {
|
|
17848
17848
|
Yt && Rr <= 11 && x.parentOffset == 0 && (o.domObserver.suppressSelectionUpdates(), setTimeout(() => sr(o), 20));
|
|
17849
|
-
let P = A(o.state.tr.delete(
|
|
17849
|
+
let P = A(o.state.tr.delete(C, B)), I = c.resolve(h.start).marksAcross(c.resolve(h.endA));
|
|
17850
17850
|
I && P.ensureMarks(I), o.dispatch(P);
|
|
17851
17851
|
} else if (
|
|
17852
17852
|
// Adding or removing a mark
|
|
17853
|
-
h.endA == h.endB && (H = CN(x.parent.content.cut(x.parentOffset, v.parentOffset),
|
|
17853
|
+
h.endA == h.endB && (H = CN(x.parent.content.cut(x.parentOffset, v.parentOffset), k.parent.content.cut(k.parentOffset, h.endA - k.start())))
|
|
17854
17854
|
) {
|
|
17855
17855
|
let P = A(o.state.tr);
|
|
17856
|
-
H.type == "add" ? P.addMark(
|
|
17856
|
+
H.type == "add" ? P.addMark(C, B, H.mark) : P.removeMark(C, B, H.mark), o.dispatch(P);
|
|
17857
17857
|
} else if (x.parent.child(x.index()).isText && x.index() == v.index() - (v.textOffset ? 0 : 1)) {
|
|
17858
|
-
let P = x.parent.textBetween(x.parentOffset, v.parentOffset), I = () => A(o.state.tr.insertText(P,
|
|
17859
|
-
o.someProp("handleTextInput", ($) => $(o,
|
|
17858
|
+
let P = x.parent.textBetween(x.parentOffset, v.parentOffset), I = () => A(o.state.tr.insertText(P, C, B));
|
|
17859
|
+
o.someProp("handleTextInput", ($) => $(o, C, B, P, I)) || o.dispatch(I());
|
|
17860
17860
|
} else
|
|
17861
17861
|
o.dispatch(A());
|
|
17862
17862
|
else
|
|
@@ -18959,15 +18959,15 @@ var iF = (o) => !("type" in o), aF = (o, e, t) => ({ tr: r, dispatch: n, editor:
|
|
|
18959
18959
|
x = e.map((v) => v.text || "").join("");
|
|
18960
18960
|
else if (e instanceof oe) {
|
|
18961
18961
|
let v = "";
|
|
18962
|
-
e.forEach((
|
|
18963
|
-
|
|
18962
|
+
e.forEach((k) => {
|
|
18963
|
+
k.text && (v += k.text);
|
|
18964
18964
|
}), x = v;
|
|
18965
18965
|
} else typeof e == "object" && e && e.text ? x = e.text : x = e;
|
|
18966
18966
|
r.insertText(x, c, u);
|
|
18967
18967
|
} else {
|
|
18968
18968
|
x = s;
|
|
18969
|
-
const v = r.doc.resolve(c),
|
|
18970
|
-
T &&
|
|
18969
|
+
const v = r.doc.resolve(c), k = v.node(), T = v.parentOffset === 0, C = k.isText || k.isTextblock, B = k.content.size > 0;
|
|
18970
|
+
T && C && B && m && (c = Math.max(0, c - 1)), r.replaceWith(c, u, x);
|
|
18971
18971
|
}
|
|
18972
18972
|
t.updateSelection && nF(r, r.steps.length - 1, -1), t.applyInputRules && r.setMeta("applyInputRules", { from: c, text: x }), t.applyPasteRules && r.setMeta("applyPasteRules", { from: c, text: x });
|
|
18973
18973
|
}
|
|
@@ -19223,13 +19223,13 @@ function FH(o) {
|
|
|
19223
19223
|
u().forEach((m) => {
|
|
19224
19224
|
let h;
|
|
19225
19225
|
Array.isArray(m.types) ? h = m.types : m.types === "*" ? h = l : m.types === "nodes" ? h = a : m.types === "marks" ? h = s : h = [], h.forEach((x) => {
|
|
19226
|
-
Object.entries(m.attributes).forEach(([v,
|
|
19226
|
+
Object.entries(m.attributes).forEach(([v, k]) => {
|
|
19227
19227
|
e.push({
|
|
19228
19228
|
type: x,
|
|
19229
19229
|
name: v,
|
|
19230
19230
|
attribute: {
|
|
19231
19231
|
...i,
|
|
19232
|
-
...
|
|
19232
|
+
...k
|
|
19233
19233
|
}
|
|
19234
19234
|
});
|
|
19235
19235
|
});
|
|
@@ -19366,21 +19366,21 @@ function DF(o, e) {
|
|
|
19366
19366
|
const r = FH(o), { nodeExtensions: n, markExtensions: i } = ii(o), a = (t = n.find((d) => fe(d, "topNode"))) == null ? void 0 : t.name, s = Object.fromEntries(
|
|
19367
19367
|
n.map((d) => {
|
|
19368
19368
|
const c = r.filter(
|
|
19369
|
-
(
|
|
19369
|
+
(k) => k.type === d.name
|
|
19370
19370
|
), u = {
|
|
19371
19371
|
name: d.name,
|
|
19372
19372
|
options: d.options,
|
|
19373
19373
|
storage: d.storage,
|
|
19374
19374
|
editor: e
|
|
19375
|
-
}, b = o.reduce((
|
|
19376
|
-
const
|
|
19375
|
+
}, b = o.reduce((k, T) => {
|
|
19376
|
+
const C = fe(
|
|
19377
19377
|
T,
|
|
19378
19378
|
"extendNodeSchema",
|
|
19379
19379
|
u
|
|
19380
19380
|
);
|
|
19381
19381
|
return {
|
|
19382
|
-
...
|
|
19383
|
-
...
|
|
19382
|
+
...k,
|
|
19383
|
+
...C ? C(d) : {}
|
|
19384
19384
|
};
|
|
19385
19385
|
}, {}), m = db({
|
|
19386
19386
|
...b,
|
|
@@ -19419,16 +19419,16 @@ function DF(o, e) {
|
|
|
19419
19419
|
fe(d, "parseHTML", u)
|
|
19420
19420
|
);
|
|
19421
19421
|
h && (m.parseDOM = h.map(
|
|
19422
|
-
(
|
|
19422
|
+
(k) => lb(k, c)
|
|
19423
19423
|
));
|
|
19424
19424
|
const x = fe(
|
|
19425
19425
|
d,
|
|
19426
19426
|
"renderHTML",
|
|
19427
19427
|
u
|
|
19428
19428
|
);
|
|
19429
|
-
x && (m.toDOM = (
|
|
19430
|
-
node:
|
|
19431
|
-
HTMLAttributes: wa(
|
|
19429
|
+
x && (m.toDOM = (k) => x({
|
|
19430
|
+
node: k,
|
|
19431
|
+
HTMLAttributes: wa(k, c)
|
|
19432
19432
|
}));
|
|
19433
19433
|
const v = fe(
|
|
19434
19434
|
d,
|
|
@@ -19446,9 +19446,9 @@ function DF(o, e) {
|
|
|
19446
19446
|
options: d.options,
|
|
19447
19447
|
storage: d.storage,
|
|
19448
19448
|
editor: e
|
|
19449
|
-
}, b = o.reduce((v,
|
|
19449
|
+
}, b = o.reduce((v, k) => {
|
|
19450
19450
|
const T = fe(
|
|
19451
|
-
|
|
19451
|
+
k,
|
|
19452
19452
|
"extendMarkSchema",
|
|
19453
19453
|
u
|
|
19454
19454
|
);
|
|
@@ -19665,11 +19665,11 @@ function Cp(o, e, t = {}) {
|
|
|
19665
19665
|
return !1;
|
|
19666
19666
|
if (!x.isText && !x.marks.length)
|
|
19667
19667
|
return;
|
|
19668
|
-
const
|
|
19669
|
-
a +=
|
|
19668
|
+
const k = Math.max(m, v), T = Math.min(h, v + x.nodeSize), C = T - k;
|
|
19669
|
+
a += C, s.push(
|
|
19670
19670
|
...x.marks.map((B) => ({
|
|
19671
19671
|
mark: B,
|
|
19672
|
-
from:
|
|
19672
|
+
from: k,
|
|
19673
19673
|
to: T
|
|
19674
19674
|
}))
|
|
19675
19675
|
);
|
|
@@ -19808,12 +19808,12 @@ var YF = (o, e = {}) => ({ tr: t, state: r, dispatch: n }) => {
|
|
|
19808
19808
|
const c = d.$from.pos, u = d.$to.pos;
|
|
19809
19809
|
r.doc.nodesBetween(c, u, (b, m) => {
|
|
19810
19810
|
const h = Math.max(m, c), x = Math.min(m + b.nodeSize, u);
|
|
19811
|
-
b.marks.find((
|
|
19812
|
-
l ===
|
|
19811
|
+
b.marks.find((k) => k.type === l) ? b.marks.forEach((k) => {
|
|
19812
|
+
l === k.type && t.addMark(
|
|
19813
19813
|
h,
|
|
19814
19814
|
x,
|
|
19815
19815
|
l.create({
|
|
19816
|
-
...
|
|
19816
|
+
...k.attrs,
|
|
19817
19817
|
...e
|
|
19818
19818
|
})
|
|
19819
19819
|
);
|
|
@@ -19900,20 +19900,20 @@ var rj = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
19900
19900
|
if (l.depth === 2 || l.node(-3).type !== s || l.index(-2) !== l.node(-2).childCount - 1)
|
|
19901
19901
|
return !1;
|
|
19902
19902
|
if (n) {
|
|
19903
|
-
let
|
|
19903
|
+
let k = oe.empty;
|
|
19904
19904
|
const T = l.index(-1) ? 1 : l.index(-2) ? 2 : 3;
|
|
19905
19905
|
for (let I = l.depth - T; I >= l.depth - 3; I -= 1)
|
|
19906
|
-
|
|
19907
|
-
const
|
|
19906
|
+
k = oe.from(l.node(I).copy(k));
|
|
19907
|
+
const C = (
|
|
19908
19908
|
// oxlint-disable-next-line no-nested-ternary
|
|
19909
19909
|
l.indexAfter(-1) < l.node(-2).childCount ? 1 : l.indexAfter(-2) < l.node(-3).childCount ? 2 : 3
|
|
19910
19910
|
), B = {
|
|
19911
19911
|
...Ts(b, l.node().type.name, l.node().attrs),
|
|
19912
19912
|
...e
|
|
19913
19913
|
}, A = ((a = s.contentMatch.defaultType) == null ? void 0 : a.createAndFill(B)) || void 0;
|
|
19914
|
-
|
|
19914
|
+
k = k.append(oe.from(s.createAndFill(null, A) || void 0));
|
|
19915
19915
|
const H = l.before(l.depth - (T - 1));
|
|
19916
|
-
t.replace(H, l.after(-
|
|
19916
|
+
t.replace(H, l.after(-C), new me(k, 4 - T, 0));
|
|
19917
19917
|
let P = -1;
|
|
19918
19918
|
t.doc.nodesBetween(H, t.doc.content.size, (I, $) => {
|
|
19919
19919
|
if (P > -1)
|
|
@@ -19938,10 +19938,10 @@ var rj = ({ keepMarks: o = !0 } = {}) => ({ tr: e, state: t, dispatch: r, editor
|
|
|
19938
19938
|
if (!ir(t.doc, l.pos, 2))
|
|
19939
19939
|
return !1;
|
|
19940
19940
|
if (n) {
|
|
19941
|
-
const { selection:
|
|
19941
|
+
const { selection: k, storedMarks: T } = r, { splittableMarks: C } = i.extensionManager, B = T || k.$to.parentOffset && k.$from.marks();
|
|
19942
19942
|
if (t.split(l.pos, 2, v).scrollIntoView(), !B || !n)
|
|
19943
19943
|
return !0;
|
|
19944
|
-
const A = B.filter((H) =>
|
|
19944
|
+
const A = B.filter((H) => C.includes(H.type.name));
|
|
19945
19945
|
t.ensureMarks(A);
|
|
19946
19946
|
}
|
|
19947
19947
|
return !0;
|
|
@@ -19979,13 +19979,13 @@ function ij(o) {
|
|
|
19979
19979
|
return Pe.between(r, n);
|
|
19980
19980
|
}
|
|
19981
19981
|
var aj = (o, e, t, r = {}) => ({ editor: n, tr: i, state: a, dispatch: s, chain: l, commands: d, can: c }) => {
|
|
19982
|
-
const { extensions: u, splittableMarks: b } = n.extensionManager, m = rt(o, a.schema), h = rt(e, a.schema), { selection: x, storedMarks: v } = a, { $from:
|
|
19983
|
-
if (!
|
|
19982
|
+
const { extensions: u, splittableMarks: b } = n.extensionManager, m = rt(o, a.schema), h = rt(e, a.schema), { selection: x, storedMarks: v } = a, { $from: k, $to: T } = x, C = k.blockRange(T), B = v || x.$to.parentOffset && x.$from.marks();
|
|
19983
|
+
if (!C)
|
|
19984
19984
|
return !1;
|
|
19985
19985
|
const A = Vl((N) => Pd(N.type.name, u))(x), H = x.from === 0 && x.to === a.doc.content.size, P = a.doc.content.content, I = P.length === 1 ? P[0] : null, $ = H && I && Pd(I.type.name, u) ? {
|
|
19986
19986
|
node: I,
|
|
19987
19987
|
pos: 0
|
|
19988
|
-
} : null, M = A ?? $, _ = !!A &&
|
|
19988
|
+
} : null, M = A ?? $, _ = !!A && C.depth >= 1 && C.depth - A.depth <= 1, K = !!$;
|
|
19989
19989
|
if ((_ || K) && M) {
|
|
19990
19990
|
if (M.node.type === m)
|
|
19991
19991
|
return H && K ? l().command(({ tr: N, dispatch: F }) => {
|
|
@@ -20080,17 +20080,17 @@ var aj = (o, e, t, r = {}) => ({ editor: n, tr: i, state: a, dispatch: s, chain:
|
|
|
20080
20080
|
return t.selection.ranges.forEach((d) => {
|
|
20081
20081
|
const c = d.$from.pos, u = d.$to.pos;
|
|
20082
20082
|
let b, m, h, x;
|
|
20083
|
-
t.selection.empty ? r.doc.nodesBetween(c, u, (v,
|
|
20084
|
-
i && i === v.type && (l = !0, h = Math.max(
|
|
20085
|
-
}) : r.doc.nodesBetween(c, u, (v,
|
|
20086
|
-
|
|
20083
|
+
t.selection.empty ? r.doc.nodesBetween(c, u, (v, k) => {
|
|
20084
|
+
i && i === v.type && (l = !0, h = Math.max(k, c), x = Math.min(k + v.nodeSize, u), b = k, m = v);
|
|
20085
|
+
}) : r.doc.nodesBetween(c, u, (v, k) => {
|
|
20086
|
+
k < c && i && i === v.type && (l = !0, h = Math.max(k, c), x = Math.min(k + v.nodeSize, u), b = k, m = v), k >= c && k <= u && (i && i === v.type && (l = !0, n && t.setNodeMarkup(k, void 0, {
|
|
20087
20087
|
...v.attrs,
|
|
20088
20088
|
...e
|
|
20089
20089
|
})), a && v.marks.length && v.marks.forEach((T) => {
|
|
20090
20090
|
if (a === T.type && (l = !0, n)) {
|
|
20091
|
-
const
|
|
20091
|
+
const C = Math.max(k, c), B = Math.min(k + v.nodeSize, u);
|
|
20092
20092
|
t.addMark(
|
|
20093
|
-
|
|
20093
|
+
C,
|
|
20094
20094
|
B,
|
|
20095
20095
|
a.create({
|
|
20096
20096
|
...T.attrs,
|
|
@@ -20304,9 +20304,9 @@ function kj(o) {
|
|
|
20304
20304
|
const x = new RegExp(`^:::${d}(?:\\s+\\{([^}]*)\\})?\\s*\\n`), v = u.match(x);
|
|
20305
20305
|
if (!v)
|
|
20306
20306
|
return;
|
|
20307
|
-
const [
|
|
20307
|
+
const [k, T = ""] = v, C = n(T);
|
|
20308
20308
|
let B = 1;
|
|
20309
|
-
const A =
|
|
20309
|
+
const A = k.length;
|
|
20310
20310
|
let H = "";
|
|
20311
20311
|
const P = /^:::([\w-]*)(\s.*)?/gm, I = u.slice(A);
|
|
20312
20312
|
for (P.lastIndex = 0; ; ) {
|
|
@@ -20338,7 +20338,7 @@ function kj(o) {
|
|
|
20338
20338
|
return {
|
|
20339
20339
|
type: e,
|
|
20340
20340
|
raw: N,
|
|
20341
|
-
attributes:
|
|
20341
|
+
attributes: C,
|
|
20342
20342
|
content: H,
|
|
20343
20343
|
tokens: F
|
|
20344
20344
|
};
|
|
@@ -20390,10 +20390,10 @@ function Pj(o) {
|
|
|
20390
20390
|
return l.forEach((h) => {
|
|
20391
20391
|
const x = typeof h == "string" ? h : h.name, v = typeof h == "string" ? void 0 : h.skipIfDefault;
|
|
20392
20392
|
if (x in b) {
|
|
20393
|
-
const
|
|
20394
|
-
if (v !== void 0 &&
|
|
20393
|
+
const k = b[x];
|
|
20394
|
+
if (v !== void 0 && k === v)
|
|
20395
20395
|
return;
|
|
20396
|
-
m[x] =
|
|
20396
|
+
m[x] = k;
|
|
20397
20397
|
}
|
|
20398
20398
|
}), m;
|
|
20399
20399
|
}, u = d.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
@@ -20418,26 +20418,26 @@ function Pj(o) {
|
|
|
20418
20418
|
), v = b.match(x);
|
|
20419
20419
|
if (!v)
|
|
20420
20420
|
return;
|
|
20421
|
-
let
|
|
20421
|
+
let k = "", T = "";
|
|
20422
20422
|
if (s) {
|
|
20423
20423
|
const [, B] = v;
|
|
20424
20424
|
T = B;
|
|
20425
20425
|
} else {
|
|
20426
20426
|
const [, B, A] = v;
|
|
20427
|
-
T = B,
|
|
20427
|
+
T = B, k = A || "";
|
|
20428
20428
|
}
|
|
20429
|
-
const
|
|
20429
|
+
const C = n(T.trim());
|
|
20430
20430
|
return {
|
|
20431
20431
|
type: e,
|
|
20432
20432
|
raw: v[0],
|
|
20433
|
-
content:
|
|
20434
|
-
attributes:
|
|
20433
|
+
content: k.trim(),
|
|
20434
|
+
attributes: C
|
|
20435
20435
|
};
|
|
20436
20436
|
}
|
|
20437
20437
|
},
|
|
20438
20438
|
renderMarkdown: (b) => {
|
|
20439
20439
|
let m = "";
|
|
20440
|
-
r ? m = r(b) : b.content && b.content.length > 0 && (m = b.content.filter((
|
|
20440
|
+
r ? m = r(b) : b.content && b.content.length > 0 && (m = b.content.filter((k) => k.type === "text").map((k) => k.text).join(""));
|
|
20441
20441
|
const h = c(b.attrs || {}), x = i(h), v = x ? ` ${x}` : "";
|
|
20442
20442
|
return s ? `[${d}${v}]` : `[${d}${v}]${m}[/${d}]`;
|
|
20443
20443
|
}
|
|
@@ -20464,7 +20464,7 @@ function Tp(o, e, t) {
|
|
|
20464
20464
|
const h = e.extractItemData(m), { indentLevel: x, mainContent: v } = h;
|
|
20465
20465
|
d = `${d}${b}
|
|
20466
20466
|
`;
|
|
20467
|
-
const
|
|
20467
|
+
const k = [v];
|
|
20468
20468
|
for (c += 1; c < s.length; ) {
|
|
20469
20469
|
const A = s[c];
|
|
20470
20470
|
if (A.trim() === "") {
|
|
@@ -20472,22 +20472,22 @@ function Tp(o, e, t) {
|
|
|
20472
20472
|
if (P === -1)
|
|
20473
20473
|
break;
|
|
20474
20474
|
if ((((n = (r = s[c + 1 + P].match(/^(\s*)/)) == null ? void 0 : r[1]) == null ? void 0 : n.length) || 0) > x) {
|
|
20475
|
-
|
|
20475
|
+
k.push(A), d = `${d}${A}
|
|
20476
20476
|
`, c += 1;
|
|
20477
20477
|
continue;
|
|
20478
20478
|
} else
|
|
20479
20479
|
break;
|
|
20480
20480
|
}
|
|
20481
20481
|
if ((((a = (i = A.match(/^(\s*)/)) == null ? void 0 : i[1]) == null ? void 0 : a.length) || 0) > x)
|
|
20482
|
-
|
|
20482
|
+
k.push(A), d = `${d}${A}
|
|
20483
20483
|
`, c += 1;
|
|
20484
20484
|
else
|
|
20485
20485
|
break;
|
|
20486
20486
|
}
|
|
20487
20487
|
let T;
|
|
20488
|
-
const
|
|
20489
|
-
if (
|
|
20490
|
-
const A =
|
|
20488
|
+
const C = k.slice(1);
|
|
20489
|
+
if (C.length > 0) {
|
|
20490
|
+
const A = C.map((H) => H.slice(x + u)).join(`
|
|
20491
20491
|
`);
|
|
20492
20492
|
A.trim() && (e.customNestedParser ? T = e.customNestedParser(A) : T = t.blockTokens(A));
|
|
20493
20493
|
}
|
|
@@ -20589,7 +20589,7 @@ function Xa(o) {
|
|
|
20589
20589
|
}), v = {
|
|
20590
20590
|
from: r - (m[0].length - i.length),
|
|
20591
20591
|
to: n
|
|
20592
|
-
}, { commands:
|
|
20592
|
+
}, { commands: k, chain: T, can: C } = new Fl({
|
|
20593
20593
|
editor: t,
|
|
20594
20594
|
state: x
|
|
20595
20595
|
});
|
|
@@ -20597,9 +20597,9 @@ function Xa(o) {
|
|
|
20597
20597
|
state: x,
|
|
20598
20598
|
range: v,
|
|
20599
20599
|
match: m,
|
|
20600
|
-
commands:
|
|
20600
|
+
commands: k,
|
|
20601
20601
|
chain: T,
|
|
20602
|
-
can:
|
|
20602
|
+
can: C
|
|
20603
20603
|
}) === null || !h.steps.length || (b.undoable && h.setMeta(s, {
|
|
20604
20604
|
transform: h,
|
|
20605
20605
|
from: r,
|
|
@@ -20770,10 +20770,10 @@ function _j(o) {
|
|
|
20770
20770
|
state: t
|
|
20771
20771
|
}), u = [];
|
|
20772
20772
|
return t.doc.nodesBetween(r, n, (m, h) => {
|
|
20773
|
-
var x, v,
|
|
20773
|
+
var x, v, k, T, C;
|
|
20774
20774
|
if ((v = (x = m.type) == null ? void 0 : x.spec) != null && v.code || !(m.isText || m.isTextblock || m.isInline))
|
|
20775
20775
|
return;
|
|
20776
|
-
const B = (
|
|
20776
|
+
const B = (C = (T = (k = m.content) == null ? void 0 : k.size) != null ? T : m.nodeSize) != null ? C : 0, A = Math.max(r, h), H = Math.min(n, h + B);
|
|
20777
20777
|
if (A >= H)
|
|
20778
20778
|
return;
|
|
20779
20779
|
const P = m.isText ? m.text || "" : m.textBetween(A - h, H - h, void 0, "");
|
|
@@ -20878,13 +20878,13 @@ function Ij(o) {
|
|
|
20878
20878
|
}
|
|
20879
20879
|
},
|
|
20880
20880
|
appendTransaction: (u, b, m) => {
|
|
20881
|
-
const h = u[0], x = h.getMeta("uiEvent") === "paste" && !n, v = h.getMeta("uiEvent") === "drop" && !i,
|
|
20881
|
+
const h = u[0], x = h.getMeta("uiEvent") === "paste" && !n, v = h.getMeta("uiEvent") === "drop" && !i, k = h.getMeta("applyPasteRules"), T = !!k;
|
|
20882
20882
|
if (!x && !v && !T)
|
|
20883
20883
|
return;
|
|
20884
20884
|
if (T) {
|
|
20885
|
-
let { text: A } =
|
|
20885
|
+
let { text: A } = k;
|
|
20886
20886
|
typeof A == "string" ? A = A : A = Cc(oe.from(A), m.schema);
|
|
20887
|
-
const { from: H } =
|
|
20887
|
+
const { from: H } = k, P = H + A.length, I = Bj(A);
|
|
20888
20888
|
return l({
|
|
20889
20889
|
rule: c,
|
|
20890
20890
|
state: m,
|
|
@@ -20893,12 +20893,12 @@ function Ij(o) {
|
|
|
20893
20893
|
pasteEvt: I
|
|
20894
20894
|
});
|
|
20895
20895
|
}
|
|
20896
|
-
const
|
|
20897
|
-
if (!(!yj(
|
|
20896
|
+
const C = b.doc.content.findDiffStart(m.doc.content), B = b.doc.content.findDiffEnd(m.doc.content);
|
|
20897
|
+
if (!(!yj(C) || !B || C === B.b))
|
|
20898
20898
|
return l({
|
|
20899
20899
|
rule: c,
|
|
20900
20900
|
state: m,
|
|
20901
|
-
from:
|
|
20901
|
+
from: C,
|
|
20902
20902
|
to: B,
|
|
20903
20903
|
pasteEvt: a
|
|
20904
20904
|
});
|
|
@@ -21288,7 +21288,7 @@ var Ke = class e7 extends Ec {
|
|
|
21288
21288
|
m.oldRange.from,
|
|
21289
21289
|
m.oldRange.to,
|
|
21290
21290
|
(h, x) => {
|
|
21291
|
-
const v = x + h.nodeSize - 2,
|
|
21291
|
+
const v = x + h.nodeSize - 2, k = m.oldRange.from <= x && v <= m.oldRange.to;
|
|
21292
21292
|
this.editor.emit("delete", {
|
|
21293
21293
|
type: "node",
|
|
21294
21294
|
node: h,
|
|
@@ -21298,7 +21298,7 @@ var Ke = class e7 extends Ec {
|
|
|
21298
21298
|
newTo: c.mapping.map(v),
|
|
21299
21299
|
deletedRange: m.oldRange,
|
|
21300
21300
|
newRange: m.newRange,
|
|
21301
|
-
partial: !
|
|
21301
|
+
partial: !k,
|
|
21302
21302
|
editor: this.editor,
|
|
21303
21303
|
transaction: o,
|
|
21304
21304
|
combinedTransform: c
|
|
@@ -21310,18 +21310,18 @@ var Ke = class e7 extends Ec {
|
|
|
21310
21310
|
c.steps.forEach((m, h) => {
|
|
21311
21311
|
var x, v;
|
|
21312
21312
|
if (m instanceof bi) {
|
|
21313
|
-
const
|
|
21313
|
+
const k = b.slice(h).map(m.from, -1), T = b.slice(h).map(m.to), C = b.invert().map(k, -1), B = b.invert().map(T), A = k > 0 ? (x = c.doc.nodeAt(k - 1)) == null ? void 0 : x.marks.some((P) => P.eq(m.mark)) : !1, H = (v = c.doc.nodeAt(T)) == null ? void 0 : v.marks.some((P) => P.eq(m.mark));
|
|
21314
21314
|
this.editor.emit("delete", {
|
|
21315
21315
|
type: "mark",
|
|
21316
21316
|
mark: m.mark,
|
|
21317
21317
|
from: m.from,
|
|
21318
21318
|
to: m.to,
|
|
21319
21319
|
deletedRange: {
|
|
21320
|
-
from:
|
|
21320
|
+
from: C,
|
|
21321
21321
|
to: B
|
|
21322
21322
|
},
|
|
21323
21323
|
newRange: {
|
|
21324
|
-
from:
|
|
21324
|
+
from: k,
|
|
21325
21325
|
to: T
|
|
21326
21326
|
},
|
|
21327
21327
|
partial: !!(H || A),
|
|
@@ -21396,8 +21396,8 @@ var Ke = class e7 extends Ec {
|
|
|
21396
21396
|
() => a.undoInputRule(),
|
|
21397
21397
|
// maybe convert first text block node to default node
|
|
21398
21398
|
() => a.command(({ tr: s }) => {
|
|
21399
|
-
const { selection: l, doc: d } = s, { empty: c, $anchor: u } = l, { pos: b, parent: m } = u, h = u.parent.isTextblock && b > 0 ? s.doc.resolve(b - 1) : u, x = h.parent.type.spec.isolating, v = u.pos - u.parentOffset,
|
|
21400
|
-
return !c || !m.type.isTextblock || m.textContent.length || !
|
|
21399
|
+
const { selection: l, doc: d } = s, { empty: c, $anchor: u } = l, { pos: b, parent: m } = u, h = u.parent.isTextblock && b > 0 ? s.doc.resolve(b - 1) : u, x = h.parent.type.spec.isolating, v = u.pos - u.parentOffset, k = x && h.parent.childCount === 1 ? v === u.pos : Ee.atStart(d).from === b;
|
|
21400
|
+
return !c || !m.type.isTextblock || m.textContent.length || !k || k && u.parent.type.name === "paragraph" ? !1 : a.clearNodes();
|
|
21401
21401
|
}),
|
|
21402
21402
|
() => a.deleteSelection(),
|
|
21403
21403
|
() => a.joinBackward(),
|
|
@@ -22302,7 +22302,7 @@ function fn(o) {
|
|
|
22302
22302
|
let d = t.to;
|
|
22303
22303
|
if (s) {
|
|
22304
22304
|
const c = l.search(/\S/), u = t.from + l.indexOf(s), b = u + s.length;
|
|
22305
|
-
if (Tc(t.from, t.to, e.doc).filter((x) => x.mark.type.excluded.find((
|
|
22305
|
+
if (Tc(t.from, t.to, e.doc).filter((x) => x.mark.type.excluded.find((k) => k === o.type && k !== x.mark.type)).filter((x) => x.to > u).length)
|
|
22306
22306
|
return null;
|
|
22307
22307
|
b < t.to && a.delete(b, t.to), u > t.from && a.delete(t.from + c, u), d = t.from + c + s.length, a.addMark(t.from + c, d, o.type.create(i || {})), r.index !== void 0 && r.input !== void 0 && r.index + r[0].length >= r.input.length || a.removeStoredMark(o.type);
|
|
22308
22308
|
}
|
|
@@ -22361,7 +22361,7 @@ var b7 = class extends zj {
|
|
|
22361
22361
|
const e = S(), t = bm();
|
|
22362
22362
|
return ui(() => {
|
|
22363
22363
|
const r = o.editor;
|
|
22364
|
-
r && r.options.element && e.value &&
|
|
22364
|
+
r && r.options.element && e.value && ce(() => {
|
|
22365
22365
|
var n;
|
|
22366
22366
|
if (!e.value || !((n = r.view.dom) != null && n.parentNode))
|
|
22367
22367
|
return;
|
|
@@ -24239,13 +24239,13 @@ ${t}
|
|
|
24239
24239
|
}
|
|
24240
24240
|
x += m[H].length + 1;
|
|
24241
24241
|
}
|
|
24242
|
-
const T = ((l = m[h].match(/^ */)) == null ? void 0 : l[0]) || "",
|
|
24243
|
-
if (
|
|
24242
|
+
const T = ((l = m[h].match(/^ */)) == null ? void 0 : l[0]) || "", C = Math.min(T.length, t);
|
|
24243
|
+
if (C === 0)
|
|
24244
24244
|
return !0;
|
|
24245
24245
|
let B = c;
|
|
24246
24246
|
for (let H = 0; H < h; H += 1)
|
|
24247
24247
|
B += m[H].length + 1;
|
|
24248
|
-
return s.delete(B, B +
|
|
24248
|
+
return s.delete(B, B + C), d - B <= C && s.setSelection(Pe.create(s.doc, B)), !0;
|
|
24249
24249
|
}) : o.commands.command(({ tr: s }) => {
|
|
24250
24250
|
const { from: l, to: d } = n, b = r.doc.textBetween(l, d, `
|
|
24251
24251
|
`, `
|
|
@@ -25155,12 +25155,12 @@ function $V({
|
|
|
25155
25155
|
ee(h, io, h), $e(h, o.domain, u), $e(m, o.domain, u), ee(m, Ao, b), ee(m, io, h);
|
|
25156
25156
|
const x = ee(a, io), v = ee(a, Ao);
|
|
25157
25157
|
ee(x, io, x), $e(x, o.domain, a), $e(v, r, i), $e(v, o.domain, a);
|
|
25158
|
-
const
|
|
25159
|
-
$e(v, o.tld,
|
|
25160
|
-
const T = ee(
|
|
25161
|
-
$e(T, o.numeric,
|
|
25158
|
+
const k = no(is);
|
|
25159
|
+
$e(v, o.tld, k), $e(v, o.utld, k), $e(k, o.domain, a), $e(k, r, i), ee(k, Ao, v), ee(k, io, x), ee(k, Pr, d);
|
|
25160
|
+
const T = ee(k, ln), C = no(is);
|
|
25161
|
+
$e(T, o.numeric, C);
|
|
25162
25162
|
const B = no(is), A = no();
|
|
25163
|
-
$e(B, e, B), $e(B, t, A), $e(A, e, B), $e(A, t, A), ee(
|
|
25163
|
+
$e(B, e, B), $e(B, t, A), $e(A, e, B), $e(A, t, A), ee(k, $o, B), ee(C, $o, B);
|
|
25164
25164
|
const H = ee(s, ln), P = ee(l, ln), I = ee(P, $o), $ = ee(I, $o);
|
|
25165
25165
|
$e(s, o.domain, a), ee(s, Ao, v), ee(s, io, x), $e(l, o.domain, a), ee(l, Ao, v), ee(l, io, x), $e(H, o.domain, B), ee(H, $o, B), ee(H, sa, B), $e($, o.domain, B), $e($, e, B), ee($, $o, B);
|
|
25166
25166
|
const M = [
|
|
@@ -25189,7 +25189,7 @@ function $V({
|
|
|
25189
25189
|
const V = no();
|
|
25190
25190
|
$e(F, t, V), ee(F, N, B), $e(G, e, G), $e(G, t, V), $e(V, e, G), $e(V, t, V), ee(G, N, B), ee(V, N, B);
|
|
25191
25191
|
}
|
|
25192
|
-
return ee(n, Ca,
|
|
25192
|
+
return ee(n, Ca, k), ee(n, Bc, AV), {
|
|
25193
25193
|
start: n,
|
|
25194
25194
|
tokens: D7
|
|
25195
25195
|
};
|
|
@@ -25314,22 +25314,22 @@ function FV(o) {
|
|
|
25314
25314
|
if (!h)
|
|
25315
25315
|
return !1;
|
|
25316
25316
|
const v = Oc(h).map(
|
|
25317
|
-
(
|
|
25317
|
+
(k) => k.toObject(o.defaultProtocol)
|
|
25318
25318
|
);
|
|
25319
25319
|
if (!NV(v))
|
|
25320
25320
|
return !1;
|
|
25321
|
-
v.filter((
|
|
25322
|
-
...
|
|
25323
|
-
from: x +
|
|
25324
|
-
to: x +
|
|
25325
|
-
})).filter((
|
|
25326
|
-
Tc(
|
|
25321
|
+
v.filter((k) => k.isLink).map((k) => ({
|
|
25322
|
+
...k,
|
|
25323
|
+
from: x + k.start + 1,
|
|
25324
|
+
to: x + k.end + 1
|
|
25325
|
+
})).filter((k) => r.schema.marks.code ? !r.doc.rangeHasMark(k.from, k.to, r.schema.marks.code) : !0).filter((k) => o.validate(k.value)).filter((k) => o.shouldAutoLink(k.value)).forEach((k) => {
|
|
25326
|
+
Tc(k.from, k.to, r.doc).some(
|
|
25327
25327
|
(T) => T.mark.type === o.type
|
|
25328
25328
|
) || a.addMark(
|
|
25329
|
-
|
|
25330
|
-
|
|
25329
|
+
k.from,
|
|
25330
|
+
k.to,
|
|
25331
25331
|
o.type.create({
|
|
25332
|
-
href:
|
|
25332
|
+
href: k.href
|
|
25333
25333
|
})
|
|
25334
25334
|
);
|
|
25335
25335
|
});
|
|
@@ -26133,18 +26133,18 @@ function xq(o) {
|
|
|
26133
26133
|
const [, a, s, l, d] = i, c = a.length, u = parseInt(s, 10), b = isNaN(u) ? Kl(s) : void 0, m = isNaN(u) ? Vc(s) : u, h = [d];
|
|
26134
26134
|
let x = t + 1;
|
|
26135
26135
|
const v = [n];
|
|
26136
|
-
let
|
|
26136
|
+
let k = !1;
|
|
26137
26137
|
for (; x < o.length; ) {
|
|
26138
26138
|
const T = o[x];
|
|
26139
26139
|
if (T.match(Np))
|
|
26140
26140
|
break;
|
|
26141
26141
|
if (T.trim() === "")
|
|
26142
|
-
v.push(T), h.push(""),
|
|
26142
|
+
v.push(T), h.push(""), k = !0, x += 1;
|
|
26143
26143
|
else if (T.match(uq)) {
|
|
26144
26144
|
const B = T.length - T.trimStart().length, A = c + s.length + 1;
|
|
26145
26145
|
v.push(T), h.push(T.slice(Math.min(B, A))), x += 1;
|
|
26146
26146
|
} else {
|
|
26147
|
-
if (
|
|
26147
|
+
if (k)
|
|
26148
26148
|
break;
|
|
26149
26149
|
v.push(T), h.push(T), x += 1;
|
|
26150
26150
|
}
|
|
@@ -26563,8 +26563,8 @@ var Y7 = to.create({
|
|
|
26563
26563
|
const b = r.extensionManager.attributes, m = wa(u, b), h = new Set(Object.keys(m)), x = this.options.HTMLAttributes;
|
|
26564
26564
|
return c.forEach((v) => {
|
|
26565
26565
|
h.has(v) || (v in x ? n.setAttribute(v, x[v]) : n.removeAttribute(v));
|
|
26566
|
-
}), Object.entries(m).forEach(([v,
|
|
26567
|
-
|
|
26566
|
+
}), Object.entries(m).forEach(([v, k]) => {
|
|
26567
|
+
k == null ? v in x ? n.setAttribute(v, x[v]) : n.removeAttribute(v) : n.setAttribute(v, k);
|
|
26568
26568
|
}), c = h, !0;
|
|
26569
26569
|
}
|
|
26570
26570
|
};
|
|
@@ -27697,13 +27697,13 @@ function Yq({
|
|
|
27697
27697
|
} else {
|
|
27698
27698
|
const b = Pa.getState(o.state), m = (i = b == null ? void 0 : b.topPos) != null ? i : 0, h = (a = b == null ? void 0 : b.bottomPos) != null ? a : r.content.size;
|
|
27699
27699
|
r.nodesBetween(m, h, (x, v) => {
|
|
27700
|
-
const
|
|
27701
|
-
return x.type.isTextblock && (
|
|
27700
|
+
const k = l >= v && l <= v + x.nodeSize, T = !x.isLeaf && Sa(x);
|
|
27701
|
+
return x.type.isTextblock && (k || !e.showOnlyCurrent) && T && d.push(
|
|
27702
27702
|
Hb({
|
|
27703
27703
|
editor: o,
|
|
27704
27704
|
isEmptyDoc: c,
|
|
27705
27705
|
dataAttribute: t,
|
|
27706
|
-
hasAnchor:
|
|
27706
|
+
hasAnchor: k,
|
|
27707
27707
|
placeholder: e.placeholder,
|
|
27708
27708
|
classes: {
|
|
27709
27709
|
emptyEditor: e.emptyEditorClass,
|
|
@@ -27711,7 +27711,7 @@ function Yq({
|
|
|
27711
27711
|
editor: o,
|
|
27712
27712
|
node: x,
|
|
27713
27713
|
pos: v,
|
|
27714
|
-
hasAnchor:
|
|
27714
|
+
hasAnchor: k
|
|
27715
27715
|
})
|
|
27716
27716
|
},
|
|
27717
27717
|
node: x,
|
|
@@ -28710,7 +28710,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28710
28710
|
!i && !h && (process.env.NODE_ENV === "production" || !n) && (r.state.value[o] = {});
|
|
28711
28711
|
const x = S({});
|
|
28712
28712
|
let v;
|
|
28713
|
-
function
|
|
28713
|
+
function k(M) {
|
|
28714
28714
|
let _;
|
|
28715
28715
|
d = c = !1, process.env.NODE_ENV !== "production" && (m = []), typeof M == "function" ? (M(r.state.value[o]), _ = {
|
|
28716
28716
|
type: Io.patchFunction,
|
|
@@ -28723,7 +28723,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28723
28723
|
events: m
|
|
28724
28724
|
});
|
|
28725
28725
|
const K = v = Symbol();
|
|
28726
|
-
|
|
28726
|
+
ce().then(() => {
|
|
28727
28727
|
v === K && (d = !0);
|
|
28728
28728
|
}), c = !0, Rn(u, _, r.state.value[o]);
|
|
28729
28729
|
}
|
|
@@ -28738,7 +28738,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28738
28738
|
throw new Error(`🍍: Store "${o}" is built using the setup syntax and does not implement $reset().`);
|
|
28739
28739
|
} : xD
|
|
28740
28740
|
);
|
|
28741
|
-
function
|
|
28741
|
+
function C() {
|
|
28742
28742
|
a.stop(), u = [], b = [], r._s.delete(o);
|
|
28743
28743
|
}
|
|
28744
28744
|
const B = (M, _ = "") => {
|
|
@@ -28779,7 +28779,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28779
28779
|
// _s: scope,
|
|
28780
28780
|
$id: o,
|
|
28781
28781
|
$onAction: Nb.bind(null, b),
|
|
28782
|
-
$patch:
|
|
28782
|
+
$patch: k,
|
|
28783
28783
|
$reset: T,
|
|
28784
28784
|
$subscribe(M, _ = {}) {
|
|
28785
28785
|
const K = Nb(u, M, _.detached, () => N()), N = a.run(() => le(() => r.state.value[o], (F) => {
|
|
@@ -28791,7 +28791,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28791
28791
|
}, ao({}, l, _)));
|
|
28792
28792
|
return K;
|
|
28793
28793
|
},
|
|
28794
|
-
$dispose:
|
|
28794
|
+
$dispose: C
|
|
28795
28795
|
}, P = HR(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && _r ? ao(
|
|
28796
28796
|
{
|
|
28797
28797
|
_hmrPayload: A,
|
|
@@ -28822,7 +28822,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28822
28822
|
set: (M) => {
|
|
28823
28823
|
if (process.env.NODE_ENV !== "production" && n)
|
|
28824
28824
|
throw new Error("cannot set hotState");
|
|
28825
|
-
|
|
28825
|
+
k((_) => {
|
|
28826
28826
|
ao(_, M);
|
|
28827
28827
|
});
|
|
28828
28828
|
}
|
|
@@ -28835,7 +28835,7 @@ function Vp(o, e, t = {}, r, n, i) {
|
|
|
28835
28835
|
ds(P, _, cd(M.$state, _));
|
|
28836
28836
|
}), Object.keys(P.$state).forEach((_) => {
|
|
28837
28837
|
_ in M.$state || jd(P, _);
|
|
28838
|
-
}), d = !1, c = !1, r.state.value[o] = cd(M._hmrPayload, "hotState"), c = !0,
|
|
28838
|
+
}), d = !1, c = !1, r.state.value[o] = cd(M._hmrPayload, "hotState"), c = !0, ce().then(() => {
|
|
28839
28839
|
d = !0;
|
|
28840
28840
|
});
|
|
28841
28841
|
for (const _ in M._hmrPayload.actions) {
|
|
@@ -29334,7 +29334,7 @@ const OU = /* @__PURE__ */ zU("pageBuilderState", {
|
|
|
29334
29334
|
this.element = null;
|
|
29335
29335
|
return;
|
|
29336
29336
|
}
|
|
29337
|
-
this.element = null,
|
|
29337
|
+
this.element = null, ce(() => {
|
|
29338
29338
|
this.element = o;
|
|
29339
29339
|
});
|
|
29340
29340
|
}
|
|
@@ -29344,12 +29344,12 @@ const OU = /* @__PURE__ */ zU("pageBuilderState", {
|
|
|
29344
29344
|
this.element = null, this.component = null;
|
|
29345
29345
|
return;
|
|
29346
29346
|
}
|
|
29347
|
-
this.component = null,
|
|
29347
|
+
this.component = null, ce(() => {
|
|
29348
29348
|
this.component = o;
|
|
29349
29349
|
});
|
|
29350
29350
|
},
|
|
29351
29351
|
setComponents(o) {
|
|
29352
|
-
this.components = [],
|
|
29352
|
+
this.components = [], ce(() => {
|
|
29353
29353
|
this.components = o || [];
|
|
29354
29354
|
});
|
|
29355
29355
|
},
|
|
@@ -29893,7 +29893,7 @@ const YU = { class: "pbx-my-2 pbx-py-2" }, QU = {
|
|
|
29893
29893
|
}, $D = /* @__PURE__ */ ae({
|
|
29894
29894
|
__name: "TypographyForTipTap",
|
|
29895
29895
|
setup(o) {
|
|
29896
|
-
const { translate: e } = ke(), t = qe(), r = je, n = S(null), i = S(null), a = S(null), s = S(null), l = S(null), d = S(null), c = S(""), u = S(null), b = L(() => r.getElement), m = L(() => r.getFontBase), h = L(() => r.getFontDesktop), x = L(() => r.getFontTablet), v = L(() => r.getFontMobile),
|
|
29896
|
+
const { translate: e } = ke(), t = qe(), r = je, n = S(null), i = S(null), a = S(null), s = S(null), l = S(null), d = S(null), c = S(""), u = S(null), b = L(() => r.getElement), m = L(() => r.getFontBase), h = L(() => r.getFontDesktop), x = L(() => r.getFontTablet), v = L(() => r.getFontMobile), k = L(() => r.getFontWeight), T = L(() => r.getFontFamily), C = L(() => r.getFontStyle), B = L(() => r.getPageBuilderConfig), A = L(
|
|
29897
29897
|
() => {
|
|
29898
29898
|
var _;
|
|
29899
29899
|
return LD((_ = B.value) == null ? void 0 : _.userSettings);
|
|
@@ -29901,7 +29901,7 @@ const YU = { class: "pbx-my-2 pbx-py-2" }, QU = {
|
|
|
29901
29901
|
), H = L(() => !!(d.value && d.value !== "none")), P = function() {
|
|
29902
29902
|
t.handleFontFamily(d.value == null ? "none" : d.value);
|
|
29903
29903
|
}, I = async () => {
|
|
29904
|
-
if (await
|
|
29904
|
+
if (await ce(), !(b.value instanceof HTMLElement)) {
|
|
29905
29905
|
c.value = "";
|
|
29906
29906
|
return;
|
|
29907
29907
|
}
|
|
@@ -29941,7 +29941,7 @@ const YU = { class: "pbx-my-2 pbx-py-2" }, QU = {
|
|
|
29941
29941
|
},
|
|
29942
29942
|
{ immediate: !0 }
|
|
29943
29943
|
), le(
|
|
29944
|
-
|
|
29944
|
+
k,
|
|
29945
29945
|
async (_) => {
|
|
29946
29946
|
l.value = _, await M();
|
|
29947
29947
|
},
|
|
@@ -29953,7 +29953,7 @@ const YU = { class: "pbx-my-2 pbx-py-2" }, QU = {
|
|
|
29953
29953
|
},
|
|
29954
29954
|
{ immediate: !0 }
|
|
29955
29955
|
), le(b, I, { immediate: !0, flush: "post" }), le(
|
|
29956
|
-
|
|
29956
|
+
C,
|
|
29957
29957
|
async (_) => {
|
|
29958
29958
|
u.value = _, await M();
|
|
29959
29959
|
},
|
|
@@ -30048,7 +30048,7 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30048
30048
|
}, bW = { class: "pbx-myPrimaryInputError pbx-mt-2 pbx-mb-0 pbx-py-0 pbx-self-start" }, mW = { class: "pbx-blockease-linear pbx-duration-200 pbx-block pbx-ease-linear" }, gW = { key: 0 }, xW = { class: "pbx-rounded-lg pbx-px-2" }, hW = { class: "pbx-flex pbx-flex-wrap pbx-items-center pbx-gap-2 pbx-border-solid pbx-px-4 pbx-border pbx-border-gray-200 pbx-mb-4 pbx-py-2" }, fW = /* @__PURE__ */ ae({
|
|
30049
30049
|
__name: "TipTapInput",
|
|
30050
30050
|
setup(o) {
|
|
30051
|
-
const e = qe(), { translate: t } = ke(), r = je, n = S(!1), i = S(""), a = S(1), s = S(""), l = S(""), d = S(""), c = S(null), u = S(null), b = S(null), m = S(null), h = S(null), x = L(() => r.getElement), v = S(""),
|
|
30051
|
+
const e = qe(), { translate: t } = ke(), r = je, n = S(!1), i = S(""), a = S(1), s = S(""), l = S(""), d = S(""), c = S(null), u = S(null), b = S(null), m = S(null), h = S(null), x = L(() => r.getElement), v = S(""), k = L(() => C != null && C.value ? C == null ? void 0 : C.value.getHTML() : null), T = S(0);
|
|
30052
30052
|
le(x, (de) => {
|
|
30053
30053
|
const Q = document.createElement("div");
|
|
30054
30054
|
if (de) {
|
|
@@ -30057,7 +30057,7 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30057
30057
|
T.value = (Ce == null ? void 0 : Ce.length) ?? 0;
|
|
30058
30058
|
}
|
|
30059
30059
|
});
|
|
30060
|
-
const
|
|
30060
|
+
const C = Fj({
|
|
30061
30061
|
content: "",
|
|
30062
30062
|
extensions: [
|
|
30063
30063
|
rD.configure({
|
|
@@ -30076,11 +30076,11 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30076
30076
|
}
|
|
30077
30077
|
}
|
|
30078
30078
|
});
|
|
30079
|
-
le(
|
|
30079
|
+
le(k, async (de) => {
|
|
30080
30080
|
e.isSelectedElementValidText() && x.value && (r.setTextAreaVueModel(de), typeof de == "string" && de !== v.value && await e.handleTextInput(de));
|
|
30081
30081
|
});
|
|
30082
30082
|
const B = function() {
|
|
30083
|
-
e.isSelectedElementValidText() &&
|
|
30083
|
+
e.isSelectedElementValidText() && C != null && C.value && x.value && (C == null || C.value.commands.setContent(x.value.innerHTML));
|
|
30084
30084
|
};
|
|
30085
30085
|
le(x, () => {
|
|
30086
30086
|
B();
|
|
@@ -30091,13 +30091,13 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30091
30091
|
});
|
|
30092
30092
|
const I = function() {
|
|
30093
30093
|
var de;
|
|
30094
|
-
A.value = (de =
|
|
30094
|
+
A.value = (de = C == null ? void 0 : C.value) == null ? void 0 : de.getAttributes("link").href, n.value = !0, i.value = "success", a.value = 2, s.value = t("Enter URL"), l.value = t(
|
|
30095
30095
|
"Add a valid URL to transform the selected text into a clickable hyperlink that directs users to the specified web address."
|
|
30096
30096
|
), d.value = t("Close"), c.value = A.value ? "Remove url" : null, u.value = t("Save"), b.value = function() {
|
|
30097
30097
|
n.value = !1, P.value = null;
|
|
30098
30098
|
}, m.value = function() {
|
|
30099
30099
|
var Q;
|
|
30100
|
-
(Q =
|
|
30100
|
+
(Q = C == null ? void 0 : C.value) == null || Q.chain().focus().extendMarkRange("link").unsetLink().run(), n.value = !1;
|
|
30101
30101
|
}, h.value = function() {
|
|
30102
30102
|
const Q = $();
|
|
30103
30103
|
Q || (Q || M(), n.value = !1);
|
|
@@ -30108,36 +30108,36 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30108
30108
|
return S(Qc(de)).value === !1 ? (P.value = "The provided URL is invalid. Use an internal path like '/page' or a full URL such as 'https://example.com'.", !0) : !1;
|
|
30109
30109
|
}, M = function() {
|
|
30110
30110
|
var de;
|
|
30111
|
-
(de =
|
|
30111
|
+
(de = C == null ? void 0 : C.value) == null || de.chain().focus().extendMarkRange("link").setLink({ href: H.value.trim() }).run();
|
|
30112
30112
|
}, _ = S(!1), K = function() {
|
|
30113
30113
|
_.value = !_.value;
|
|
30114
30114
|
}, N = function(...de) {
|
|
30115
30115
|
var Q;
|
|
30116
|
-
return ((Q =
|
|
30116
|
+
return ((Q = C.value) == null ? void 0 : Q.isActive(...de)) ?? !1;
|
|
30117
30117
|
}, F = function(de) {
|
|
30118
30118
|
var Q;
|
|
30119
|
-
return ((Q =
|
|
30119
|
+
return ((Q = C.value) == null ? void 0 : Q.isActive("heading", { level: de })) ?? !1;
|
|
30120
30120
|
}, G = function() {
|
|
30121
30121
|
var de;
|
|
30122
|
-
(de =
|
|
30122
|
+
(de = C.value) == null || de.chain().focus().toggleBold().run();
|
|
30123
30123
|
}, V = function(de) {
|
|
30124
30124
|
var Q;
|
|
30125
|
-
(Q =
|
|
30125
|
+
(Q = C.value) == null || Q.chain().focus().toggleHeading({ level: de }).run();
|
|
30126
30126
|
}, Z = function() {
|
|
30127
30127
|
var de;
|
|
30128
|
-
(de =
|
|
30128
|
+
(de = C.value) == null || de.chain().focus().toggleBulletList().run();
|
|
30129
30129
|
}, se = function(de) {
|
|
30130
|
-
if (
|
|
30131
|
-
if (
|
|
30132
|
-
|
|
30130
|
+
if (C.value) {
|
|
30131
|
+
if (C.value.isActive({ textAlign: de })) {
|
|
30132
|
+
C.value.chain().focus().unsetTextAlign().run();
|
|
30133
30133
|
return;
|
|
30134
30134
|
}
|
|
30135
|
-
|
|
30135
|
+
C.value.chain().focus().setTextAlign(de).run();
|
|
30136
30136
|
}
|
|
30137
30137
|
};
|
|
30138
30138
|
return zR(() => {
|
|
30139
30139
|
var de;
|
|
30140
|
-
(de =
|
|
30140
|
+
(de = C == null ? void 0 : C.value) == null || de.destroy();
|
|
30141
30141
|
}), bo(() => {
|
|
30142
30142
|
B();
|
|
30143
30143
|
}), (de, Q) => (f(), w("div", null, [
|
|
@@ -30188,7 +30188,7 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30188
30188
|
_: 1
|
|
30189
30189
|
}, 8, ["showDynamicModalBuilder", "type", "gridColumnAmount", "title", "description", "firstButtonText", "secondButtonText", "thirdButtonText"]),
|
|
30190
30190
|
p("div", mW, [
|
|
30191
|
-
g(e).isSelectedElementValidText() && g(
|
|
30191
|
+
g(e).isSelectedElementValidText() && g(C) ? (f(), w("div", gW, [
|
|
30192
30192
|
p("div", xW, [
|
|
30193
30193
|
p("div", hW, [
|
|
30194
30194
|
p("div", {
|
|
@@ -30306,10 +30306,10 @@ const pW = { class: "pbx-myInputGroup" }, cW = {
|
|
|
30306
30306
|
})
|
|
30307
30307
|
])
|
|
30308
30308
|
]),
|
|
30309
|
-
g(
|
|
30309
|
+
g(C) ? (f(), be(g(Nj), {
|
|
30310
30310
|
key: 0,
|
|
30311
30311
|
id: "page-builder-editor",
|
|
30312
|
-
editor: g(
|
|
30312
|
+
editor: g(C),
|
|
30313
30313
|
class: "pbx-p-2 pbx-prounded-lg lg:pbx-min-h-[20rem] lg:pbx-max-h-[30rem] md:pbx-min-h-[20rem] md:pbx-max-h-[20rem] pbx-min-h-[20rem] pbx-max-h-[20rem] pbx-overflow-y-auto"
|
|
30314
30314
|
}, null, 8, ["editor"])) : E("", !0)
|
|
30315
30315
|
])
|
|
@@ -30457,17 +30457,17 @@ const Yl = function(e = 200) {
|
|
|
30457
30457
|
width: `${ps}px`
|
|
30458
30458
|
}), u = S(!1), b = S(""), m = S(null), h = L(() => t.getElement), x = L(() => t.getInlineTipTapEditor), v = function() {
|
|
30459
30459
|
n.value && (b.value = n.value.getAttributes("link").href || "", m.value = null, u.value = !0);
|
|
30460
|
-
},
|
|
30460
|
+
}, k = function() {
|
|
30461
30461
|
u.value = !1, m.value = null;
|
|
30462
30462
|
}, T = function() {
|
|
30463
30463
|
var te;
|
|
30464
|
-
(te = n.value) == null || te.chain().focus().extendMarkRange("link").unsetLink().run(),
|
|
30465
|
-
},
|
|
30464
|
+
(te = n.value) == null || te.chain().focus().extendMarkRange("link").unsetLink().run(), k();
|
|
30465
|
+
}, C = function() {
|
|
30466
30466
|
m.value = null;
|
|
30467
30467
|
const te = b.value.trim();
|
|
30468
30468
|
return Qc(te) ? !0 : (m.value = "The provided URL is invalid. Use an internal path like '/page' or a full URL such as 'https://example.com'.", !1);
|
|
30469
30469
|
}, B = function() {
|
|
30470
|
-
!n.value || !
|
|
30470
|
+
!n.value || !C() || (n.value.chain().focus().extendMarkRange("link").setLink({ href: b.value.trim() }).run(), k());
|
|
30471
30471
|
}, A = function(...te) {
|
|
30472
30472
|
var J;
|
|
30473
30473
|
return ((J = n.value) == null ? void 0 : J.isActive(...te)) ?? !1;
|
|
@@ -30515,7 +30515,7 @@ const Yl = function(e = 200) {
|
|
|
30515
30515
|
}
|
|
30516
30516
|
N(), F = requestAnimationFrame(G);
|
|
30517
30517
|
}, V = function() {
|
|
30518
|
-
cancelAnimationFrame(F),
|
|
30518
|
+
cancelAnimationFrame(F), ce(() => {
|
|
30519
30519
|
N(), F = requestAnimationFrame(G);
|
|
30520
30520
|
});
|
|
30521
30521
|
}, Z = function() {
|
|
@@ -30574,10 +30574,10 @@ const Yl = function(e = 200) {
|
|
|
30574
30574
|
_e.destroy(), J.innerHTML = De, J.removeAttribute("data-pbx-inline-tiptap"), J.removeAttribute("data-pbx-inline-original-html"), t.setTextAreaVueModel(De);
|
|
30575
30575
|
}
|
|
30576
30576
|
n.value = null, i.value = null, a.value = "", s.value = !1;
|
|
30577
|
-
},
|
|
30577
|
+
}, ue = async function() {
|
|
30578
30578
|
const te = h.value;
|
|
30579
30579
|
if (!te || n.value || !e.isSelectedElementValidText()) return;
|
|
30580
|
-
await
|
|
30580
|
+
await ce(), a.value = te.innerHTML, i.value = te, te.innerHTML = "", te.setAttribute("data-pbx-inline-tiptap", ""), te.setAttribute("data-pbx-inline-original-html", a.value);
|
|
30581
30581
|
const J = Jb(te, {
|
|
30582
30582
|
lang: t.getCurrentLanguage,
|
|
30583
30583
|
text: a.value
|
|
@@ -30608,7 +30608,7 @@ const Yl = function(e = 200) {
|
|
|
30608
30608
|
t.setTextAreaVueModel(bt(De));
|
|
30609
30609
|
}
|
|
30610
30610
|
});
|
|
30611
|
-
n.value = _e, await
|
|
30611
|
+
n.value = _e, await ce(), _t(_e, te, a.value);
|
|
30612
30612
|
}, ne = async function() {
|
|
30613
30613
|
if (n.value)
|
|
30614
30614
|
try {
|
|
@@ -30642,7 +30642,7 @@ const Yl = function(e = 200) {
|
|
|
30642
30642
|
if (te) {
|
|
30643
30643
|
if (!J && (n.value || i.value))
|
|
30644
30644
|
return;
|
|
30645
|
-
n.value && i.value !== J && ve(St(n.value)), await
|
|
30645
|
+
n.value && i.value !== J && ve(St(n.value)), await ue();
|
|
30646
30646
|
return;
|
|
30647
30647
|
}
|
|
30648
30648
|
n.value && ve(St(n.value));
|
|
@@ -30680,7 +30680,7 @@ const Yl = function(e = 200) {
|
|
|
30680
30680
|
firstButtonText: g(r)("Close"),
|
|
30681
30681
|
secondButtonText: b.value ? g(r)("Remove url") : void 0,
|
|
30682
30682
|
thirdButtonText: g(r)("Save"),
|
|
30683
|
-
onFirstModalButtonFunctionDynamicModalBuilder:
|
|
30683
|
+
onFirstModalButtonFunctionDynamicModalBuilder: k,
|
|
30684
30684
|
onSecondModalButtonFunctionDynamicModalBuilder: T,
|
|
30685
30685
|
onThirdModalButtonFunctionDynamicModalBuilder: B
|
|
30686
30686
|
}, {
|
|
@@ -31063,7 +31063,7 @@ function Ud({ props: o, attrs: e, slots: t, slot: r, name: n }) {
|
|
|
31063
31063
|
if (s === "template") {
|
|
31064
31064
|
if (d = DD(d ?? []), Object.keys(l).length > 0 || Object.keys(e).length > 0) {
|
|
31065
31065
|
let [u, ...b] = d ?? [];
|
|
31066
|
-
if (!hG(u) || b.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l).concat(Object.keys(e)).map((x) => x.trim()).filter((x, v,
|
|
31066
|
+
if (!hG(u) || b.length > 0) throw new Error(['Passing props on "template"!', "", `The current component <${n} /> is rendering a "template".`, "However we need to passthrough the following props:", Object.keys(l).concat(Object.keys(e)).map((x) => x.trim()).filter((x, v, k) => k.indexOf(x) === v).sort((x, v) => x.localeCompare(v)).map((x) => ` - ${x}`).join(`
|
|
31067
31067
|
`), "", "You can apply a few solutions:", ['Add an `as="..."` prop, to ensure that we render an actual element instead of a "template".', "Render a single element as the child so that we can forward the props onto that element."].map((x) => ` - ${x}`).join(`
|
|
31068
31068
|
`)].join(`
|
|
31069
31069
|
`));
|
|
@@ -31225,71 +31225,71 @@ function Ha(o) {
|
|
|
31225
31225
|
}
|
|
31226
31226
|
let Da = ae({ name: "Listbox", emits: { "update:modelValue": (o) => !0 }, props: { as: { type: [Object, String], default: "template" }, disabled: { type: [Boolean], default: !1 }, by: { type: [String, Function], default: () => TG }, horizontal: { type: [Boolean], default: !1 }, modelValue: { type: [Object, String, Number, Boolean], default: void 0 }, defaultValue: { type: [Object, String, Number, Boolean], default: void 0 }, form: { type: String, optional: !0 }, name: { type: String, optional: !0 }, multiple: { type: [Boolean], default: !1 } }, inheritAttrs: !1, setup(o, { slots: e, attrs: t, emit: r }) {
|
|
31227
31227
|
let n = S(1), i = S(null), a = S(null), s = S(null), l = S([]), d = S(""), c = S(null), u = S(1);
|
|
31228
|
-
function b(
|
|
31229
|
-
let B = c.value !== null ? l.value[c.value] : null, A = sG(
|
|
31228
|
+
function b(C = (B) => B) {
|
|
31229
|
+
let B = c.value !== null ? l.value[c.value] : null, A = sG(C(l.value.slice()), (P) => Xe(P.dataRef.domRef)), H = B ? A.indexOf(B) : null;
|
|
31230
31230
|
return H === -1 && (H = null), { options: A, activeOptionIndex: H };
|
|
31231
31231
|
}
|
|
31232
|
-
let m = L(() => o.multiple ? 1 : 0), [h, x] = YW(L(() => o.modelValue), (
|
|
31232
|
+
let m = L(() => o.multiple ? 1 : 0), [h, x] = YW(L(() => o.modelValue), (C) => r("update:modelValue", C), L(() => o.defaultValue)), v = L(() => h.value === void 0 ? To(m.value, { 1: [], 0: void 0 }) : h.value), k = { listboxState: n, value: v, mode: m, compare(C, B) {
|
|
31233
31233
|
if (typeof o.by == "string") {
|
|
31234
31234
|
let A = o.by;
|
|
31235
|
-
return (
|
|
31235
|
+
return (C == null ? void 0 : C[A]) === (B == null ? void 0 : B[A]);
|
|
31236
31236
|
}
|
|
31237
|
-
return o.by(
|
|
31237
|
+
return o.by(C, B);
|
|
31238
31238
|
}, orientation: L(() => o.horizontal ? "horizontal" : "vertical"), labelRef: i, buttonRef: a, optionsRef: s, disabled: L(() => o.disabled), options: l, searchQuery: d, activeOptionIndex: c, activationTrigger: u, closeListbox() {
|
|
31239
31239
|
o.disabled || n.value !== 1 && (n.value = 1, c.value = null);
|
|
31240
31240
|
}, openListbox() {
|
|
31241
31241
|
o.disabled || n.value !== 0 && (n.value = 0);
|
|
31242
|
-
}, goToOption(
|
|
31242
|
+
}, goToOption(C, B, A) {
|
|
31243
31243
|
if (o.disabled || n.value === 1) return;
|
|
31244
|
-
let H = b(), P = SG(
|
|
31244
|
+
let H = b(), P = SG(C === Ot.Specific ? { focus: Ot.Specific, id: B } : { focus: C }, { resolveItems: () => H.options, resolveActiveIndex: () => H.activeOptionIndex, resolveId: (I) => I.id, resolveDisabled: (I) => I.dataRef.disabled });
|
|
31245
31245
|
d.value = "", c.value = P, u.value = A ?? 1, l.value = H.options;
|
|
31246
|
-
}, search(
|
|
31246
|
+
}, search(C) {
|
|
31247
31247
|
if (o.disabled || n.value === 1) return;
|
|
31248
31248
|
let B = d.value !== "" ? 0 : 1;
|
|
31249
|
-
d.value +=
|
|
31249
|
+
d.value += C.toLowerCase();
|
|
31250
31250
|
let A = (c.value !== null ? l.value.slice(c.value + B).concat(l.value.slice(0, c.value + B)) : l.value).find((P) => P.dataRef.textValue.startsWith(d.value) && !P.dataRef.disabled), H = A ? l.value.indexOf(A) : -1;
|
|
31251
31251
|
H === -1 || H === c.value || (c.value = H, u.value = 1);
|
|
31252
31252
|
}, clearSearch() {
|
|
31253
31253
|
o.disabled || n.value !== 1 && d.value !== "" && (d.value = "");
|
|
31254
|
-
}, registerOption(
|
|
31255
|
-
let A = b((H) => [...H, { id:
|
|
31254
|
+
}, registerOption(C, B) {
|
|
31255
|
+
let A = b((H) => [...H, { id: C, dataRef: B }]);
|
|
31256
31256
|
l.value = A.options, c.value = A.activeOptionIndex;
|
|
31257
|
-
}, unregisterOption(
|
|
31257
|
+
}, unregisterOption(C) {
|
|
31258
31258
|
let B = b((A) => {
|
|
31259
|
-
let H = A.findIndex((P) => P.id ===
|
|
31259
|
+
let H = A.findIndex((P) => P.id === C);
|
|
31260
31260
|
return H !== -1 && A.splice(H, 1), A;
|
|
31261
31261
|
});
|
|
31262
31262
|
l.value = B.options, c.value = B.activeOptionIndex, u.value = 1;
|
|
31263
|
-
}, theirOnChange(
|
|
31264
|
-
o.disabled || x(
|
|
31265
|
-
}, select(
|
|
31266
|
-
o.disabled || x(To(m.value, { 0: () =>
|
|
31267
|
-
let B = Pt(
|
|
31263
|
+
}, theirOnChange(C) {
|
|
31264
|
+
o.disabled || x(C);
|
|
31265
|
+
}, select(C) {
|
|
31266
|
+
o.disabled || x(To(m.value, { 0: () => C, 1: () => {
|
|
31267
|
+
let B = Pt(k.value.value).slice(), A = Pt(C), H = B.findIndex((P) => k.compare(A, Pt(P)));
|
|
31268
31268
|
return H === -1 ? B.push(A) : B.splice(H, 1), B;
|
|
31269
31269
|
} }));
|
|
31270
31270
|
} };
|
|
31271
|
-
uG([a, s], (
|
|
31271
|
+
uG([a, s], (C, B) => {
|
|
31272
31272
|
var A;
|
|
31273
|
-
|
|
31274
|
-
}, L(() => n.value === 0)), Bo(qD,
|
|
31273
|
+
k.closeListbox(), HD(B, eu.Loose) || (C.preventDefault(), (A = Xe(a)) == null || A.focus());
|
|
31274
|
+
}, L(() => n.value === 0)), Bo(qD, k), vG(L(() => To(n.value, { 0: La.Open, 1: La.Closed })));
|
|
31275
31275
|
let T = L(() => {
|
|
31276
|
-
var
|
|
31277
|
-
return (
|
|
31276
|
+
var C;
|
|
31277
|
+
return (C = Xe(a)) == null ? void 0 : C.closest("form");
|
|
31278
31278
|
});
|
|
31279
31279
|
return bo(() => {
|
|
31280
31280
|
le([T], () => {
|
|
31281
31281
|
if (!T.value || o.defaultValue === void 0) return;
|
|
31282
|
-
function
|
|
31283
|
-
|
|
31282
|
+
function C() {
|
|
31283
|
+
k.theirOnChange(o.defaultValue);
|
|
31284
31284
|
}
|
|
31285
|
-
return T.value.addEventListener("reset",
|
|
31285
|
+
return T.value.addEventListener("reset", C), () => {
|
|
31286
31286
|
var B;
|
|
31287
|
-
(B = T.value) == null || B.removeEventListener("reset",
|
|
31287
|
+
(B = T.value) == null || B.removeEventListener("reset", C);
|
|
31288
31288
|
};
|
|
31289
31289
|
}, { immediate: !0 });
|
|
31290
31290
|
}), () => {
|
|
31291
|
-
let { name:
|
|
31292
|
-
return mn(re, [...
|
|
31291
|
+
let { name: C, modelValue: B, disabled: A, form: H, ...P } = o, I = { open: n.value === 0, disabled: A, value: v.value };
|
|
31292
|
+
return mn(re, [...C != null && v.value != null ? FD({ [C]: v.value }).map(([$, M]) => mn(fG, xG({ features: OD.Hidden, key: $, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: H, disabled: A, name: $, value: M }))) : [], gi({ ourProps: {}, theirProps: { ...t, ...zD(P, ["defaultValue", "onUpdate:modelValue", "horizontal", "multiple", "by"]) }, slot: I, slots: e, attrs: t, name: "Listbox" })]);
|
|
31293
31293
|
};
|
|
31294
31294
|
} });
|
|
31295
31295
|
ae({ name: "ListboxLabel", props: { as: { type: [Object, String], default: "label" }, id: { type: String, default: null } }, setup(o, { attrs: e, slots: t }) {
|
|
@@ -31313,13 +31313,13 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31313
31313
|
case lt.Space:
|
|
31314
31314
|
case lt.Enter:
|
|
31315
31315
|
case lt.ArrowDown:
|
|
31316
|
-
u.preventDefault(), a.openListbox(),
|
|
31316
|
+
u.preventDefault(), a.openListbox(), ce(() => {
|
|
31317
31317
|
var b;
|
|
31318
31318
|
(b = Xe(a.optionsRef)) == null || b.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Ot.First);
|
|
31319
31319
|
});
|
|
31320
31320
|
break;
|
|
31321
31321
|
case lt.ArrowUp:
|
|
31322
|
-
u.preventDefault(), a.openListbox(),
|
|
31322
|
+
u.preventDefault(), a.openListbox(), ce(() => {
|
|
31323
31323
|
var b;
|
|
31324
31324
|
(b = Xe(a.optionsRef)) == null || b.focus({ preventScroll: !0 }), a.value.value || a.goToOption(Ot.Last);
|
|
31325
31325
|
});
|
|
@@ -31334,7 +31334,7 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31334
31334
|
}
|
|
31335
31335
|
}
|
|
31336
31336
|
function d(u) {
|
|
31337
|
-
a.disabled.value || (a.listboxState.value === 0 ? (a.closeListbox(),
|
|
31337
|
+
a.disabled.value || (a.listboxState.value === 0 ? (a.closeListbox(), ce(() => {
|
|
31338
31338
|
var b;
|
|
31339
31339
|
return (b = Xe(a.buttonRef)) == null ? void 0 : b.focus({ preventScroll: !0 });
|
|
31340
31340
|
})) : (u.preventDefault(), a.openListbox(), EG(() => {
|
|
@@ -31361,7 +31361,7 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31361
31361
|
let b = a.options.value[a.activeOptionIndex.value];
|
|
31362
31362
|
a.select(b.dataRef.value);
|
|
31363
31363
|
}
|
|
31364
|
-
a.mode.value === 0 && (a.closeListbox(),
|
|
31364
|
+
a.mode.value === 0 && (a.closeListbox(), ce(() => {
|
|
31365
31365
|
var b;
|
|
31366
31366
|
return (b = Xe(a.buttonRef)) == null ? void 0 : b.focus({ preventScroll: !0 });
|
|
31367
31367
|
}));
|
|
@@ -31377,7 +31377,7 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31377
31377
|
case lt.PageDown:
|
|
31378
31378
|
return u.preventDefault(), u.stopPropagation(), a.goToOption(Ot.Last);
|
|
31379
31379
|
case lt.Escape:
|
|
31380
|
-
u.preventDefault(), u.stopPropagation(), a.closeListbox(),
|
|
31380
|
+
u.preventDefault(), u.stopPropagation(), a.closeListbox(), ce(() => {
|
|
31381
31381
|
var b;
|
|
31382
31382
|
return (b = Xe(a.buttonRef)) == null ? void 0 : b.focus({ preventScroll: !0 });
|
|
31383
31383
|
});
|
|
@@ -31400,10 +31400,10 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31400
31400
|
var n;
|
|
31401
31401
|
let i = (n = o.id) != null ? n : `headlessui-listbox-option-${Ql()}`, a = Ha("ListboxOption"), s = S(null);
|
|
31402
31402
|
r({ el: s, $el: s });
|
|
31403
|
-
let l = L(() => a.activeOptionIndex.value !== null ? a.options.value[a.activeOptionIndex.value].id === i : !1), d = L(() => To(a.mode.value, { 0: () => a.compare(Pt(a.value.value), Pt(o.value)), 1: () => Pt(a.value.value).some((
|
|
31404
|
-
var
|
|
31403
|
+
let l = L(() => a.activeOptionIndex.value !== null ? a.options.value[a.activeOptionIndex.value].id === i : !1), d = L(() => To(a.mode.value, { 0: () => a.compare(Pt(a.value.value), Pt(o.value)), 1: () => Pt(a.value.value).some((C) => a.compare(Pt(C), Pt(o.value))) })), c = L(() => To(a.mode.value, { 1: () => {
|
|
31404
|
+
var C;
|
|
31405
31405
|
let B = Pt(a.value.value);
|
|
31406
|
-
return ((
|
|
31406
|
+
return ((C = a.options.value.find((A) => B.some((H) => a.compare(Pt(H), Pt(A.dataRef.value))))) == null ? void 0 : C.id) === i;
|
|
31407
31407
|
}, 0: () => d.value })), u = CG(s), b = L(() => ({ disabled: o.disabled, value: o.value, get textValue() {
|
|
31408
31408
|
return u();
|
|
31409
31409
|
}, domRef: s }));
|
|
@@ -31416,14 +31416,14 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31416
31416
|
} });
|
|
31417
31417
|
}, { immediate: !0 });
|
|
31418
31418
|
}), ui(() => {
|
|
31419
|
-
a.listboxState.value === 0 && l.value && a.activationTrigger.value !== 0 &&
|
|
31420
|
-
var
|
|
31421
|
-
return (B = (
|
|
31419
|
+
a.listboxState.value === 0 && l.value && a.activationTrigger.value !== 0 && ce(() => {
|
|
31420
|
+
var C, B;
|
|
31421
|
+
return (B = (C = Xe(s)) == null ? void 0 : C.scrollIntoView) == null ? void 0 : B.call(C, { block: "nearest" });
|
|
31422
31422
|
});
|
|
31423
31423
|
});
|
|
31424
|
-
function m(
|
|
31425
|
-
if (o.disabled) return
|
|
31426
|
-
a.select(o.value), a.mode.value === 0 && (a.closeListbox(),
|
|
31424
|
+
function m(C) {
|
|
31425
|
+
if (o.disabled) return C.preventDefault();
|
|
31426
|
+
a.select(o.value), a.mode.value === 0 && (a.closeListbox(), ce(() => {
|
|
31427
31427
|
var B;
|
|
31428
31428
|
return (B = Xe(a.buttonRef)) == null ? void 0 : B.focus({ preventScroll: !0 });
|
|
31429
31429
|
}));
|
|
@@ -31433,17 +31433,17 @@ let Ra = ae({ name: "ListboxButton", props: { as: { type: [Object, String], defa
|
|
|
31433
31433
|
a.goToOption(Ot.Specific, i);
|
|
31434
31434
|
}
|
|
31435
31435
|
let x = mG();
|
|
31436
|
-
function v(
|
|
31437
|
-
x.update(
|
|
31436
|
+
function v(C) {
|
|
31437
|
+
x.update(C);
|
|
31438
31438
|
}
|
|
31439
|
-
function C
|
|
31440
|
-
x.wasMoved(
|
|
31439
|
+
function k(C) {
|
|
31440
|
+
x.wasMoved(C) && (o.disabled || l.value || a.goToOption(Ot.Specific, i, 0));
|
|
31441
31441
|
}
|
|
31442
|
-
function T(
|
|
31443
|
-
x.wasMoved(
|
|
31442
|
+
function T(C) {
|
|
31443
|
+
x.wasMoved(C) && (o.disabled || l.value && a.goToOption(Ot.Nothing));
|
|
31444
31444
|
}
|
|
31445
31445
|
return () => {
|
|
31446
|
-
let { disabled:
|
|
31446
|
+
let { disabled: C } = o, B = { active: l.value, selected: d.value, disabled: C }, { value: A, disabled: H, ...P } = o, I = { id: i, ref: s, role: "option", tabIndex: C === !0 ? void 0 : -1, "aria-disabled": C === !0 ? !0 : void 0, "aria-selected": d.value, disabled: void 0, onClick: m, onFocus: h, onPointerenter: v, onMouseenter: v, onPointermove: k, onMousemove: k, onPointerleave: T, onMouseleave: T };
|
|
31447
31447
|
return gi({ ourProps: I, theirProps: P, slot: B, attrs: t, slots: e, name: "ListboxOption" });
|
|
31448
31448
|
};
|
|
31449
31449
|
} });
|
|
@@ -32028,11 +32028,11 @@ function JD(o = {}) {
|
|
|
32028
32028
|
}), a = function() {
|
|
32029
32029
|
const v = t.value;
|
|
32030
32030
|
if (!v) return;
|
|
32031
|
-
const
|
|
32032
|
-
let
|
|
32033
|
-
|
|
32034
|
-
top: `${Xc(
|
|
32035
|
-
left: `${Math.round(
|
|
32031
|
+
const k = v.getBoundingClientRect(), T = 8;
|
|
32032
|
+
let C = k.left + k.width / 2 - e / 2;
|
|
32033
|
+
C = Math.max(T, Math.min(C, window.innerWidth - e - T)), i.value = {
|
|
32034
|
+
top: `${Xc(k.bottom)}px`,
|
|
32035
|
+
left: `${Math.round(C)}px`,
|
|
32036
32036
|
width: `${e}px`
|
|
32037
32037
|
};
|
|
32038
32038
|
};
|
|
@@ -32044,14 +32044,14 @@ function JD(o = {}) {
|
|
|
32044
32044
|
}
|
|
32045
32045
|
a(), s = requestAnimationFrame(l);
|
|
32046
32046
|
}, d = function() {
|
|
32047
|
-
cancelAnimationFrame(s),
|
|
32047
|
+
cancelAnimationFrame(s), ce(() => {
|
|
32048
32048
|
a(), s = requestAnimationFrame(l);
|
|
32049
32049
|
});
|
|
32050
32050
|
}, c = function() {
|
|
32051
32051
|
cancelAnimationFrame(s), s = 0;
|
|
32052
32052
|
}, u = function(v) {
|
|
32053
|
-
var
|
|
32054
|
-
n.value && v.target instanceof Node && ((
|
|
32053
|
+
var k, T;
|
|
32054
|
+
n.value && v.target instanceof Node && ((k = t.value) != null && k.contains(v.target) || (T = r.value) != null && T.contains(v.target) || v.target instanceof Element && v.target.closest("#pbx-modal") || (n.value = !1));
|
|
32055
32055
|
}, b = function() {
|
|
32056
32056
|
n.value = !0;
|
|
32057
32057
|
}, m = function() {
|
|
@@ -32205,14 +32205,14 @@ const zG = { class: "pbx-flex pbx-w-full pbx-flex-col pbx-gap-3" }, OG = { class
|
|
|
32205
32205
|
backgroundColor: `hsl(${n.value}, 100%, 50%)`,
|
|
32206
32206
|
borderRadius: "50%",
|
|
32207
32207
|
boxShadow: "0 0 0 2px #ffffff, 0 0 0 3px rgba(0, 0, 0, 0.25)"
|
|
32208
|
-
})),
|
|
32208
|
+
})), k = L(() => ({
|
|
32209
32209
|
backgroundColor: b.value
|
|
32210
32210
|
}));
|
|
32211
32211
|
function T(F, G = !1) {
|
|
32212
32212
|
const V = Lr(F) ?? Lr(t.modelValue) ?? "#000000", Z = DG(V);
|
|
32213
32213
|
n.value = Z.h, i.value = Z.s, a.value = Z.v, s.value = V, G && r("update:modelValue", V), B();
|
|
32214
32214
|
}
|
|
32215
|
-
function
|
|
32215
|
+
function C() {
|
|
32216
32216
|
const F = b.value;
|
|
32217
32217
|
s.value = F, r("update:modelValue", F);
|
|
32218
32218
|
}
|
|
@@ -32233,7 +32233,7 @@ const zG = { class: "pbx-flex pbx-w-full pbx-flex-col pbx-gap-3" }, OG = { class
|
|
|
32233
32233
|
const Z = V.getBoundingClientRect();
|
|
32234
32234
|
if (!Z.width || !Z.height) return;
|
|
32235
32235
|
const se = Math.max(0, Math.min(F - Z.left, Z.width)), de = Math.max(0, Math.min(G - Z.top, Z.height));
|
|
32236
|
-
i.value = se / Z.width * 100, a.value = 100 - de / Z.height * 100,
|
|
32236
|
+
i.value = se / Z.width * 100, a.value = 100 - de / Z.height * 100, C();
|
|
32237
32237
|
}
|
|
32238
32238
|
function H(F) {
|
|
32239
32239
|
const G = d.value;
|
|
@@ -32241,7 +32241,7 @@ const zG = { class: "pbx-flex pbx-w-full pbx-flex-col pbx-gap-3" }, OG = { class
|
|
|
32241
32241
|
const V = G.getBoundingClientRect();
|
|
32242
32242
|
if (!V.width) return;
|
|
32243
32243
|
const Z = Math.max(0, Math.min(F - V.left, V.width));
|
|
32244
|
-
n.value = Z / V.width * 360,
|
|
32244
|
+
n.value = Z / V.width * 360, C(), B();
|
|
32245
32245
|
}
|
|
32246
32246
|
function P() {
|
|
32247
32247
|
c.value = !1, u.value = !1, window.removeEventListener("pointermove", I), window.removeEventListener("pointerup", $), window.removeEventListener("pointercancel", $);
|
|
@@ -32278,11 +32278,11 @@ const zG = { class: "pbx-flex pbx-w-full pbx-flex-col pbx-gap-3" }, OG = { class
|
|
|
32278
32278
|
Lr(F) !== Lr(b.value) && T(F);
|
|
32279
32279
|
}
|
|
32280
32280
|
), le(n, () => {
|
|
32281
|
-
|
|
32281
|
+
ce(B);
|
|
32282
32282
|
}), le(l, (F) => {
|
|
32283
32283
|
F && B();
|
|
32284
32284
|
}), bo(() => {
|
|
32285
|
-
T(t.modelValue),
|
|
32285
|
+
T(t.modelValue), ce(B);
|
|
32286
32286
|
}), pr(() => {
|
|
32287
32287
|
P();
|
|
32288
32288
|
}), (F, G) => (f(), w("div", zG, [
|
|
@@ -32343,7 +32343,7 @@ const zG = { class: "pbx-flex pbx-w-full pbx-flex-col pbx-gap-3" }, OG = { class
|
|
|
32343
32343
|
o.showHexInput !== !1 ? (f(), w("div", NG, [
|
|
32344
32344
|
p("div", {
|
|
32345
32345
|
class: "pbx-h-9 pbx-w-9 pbx-shrink-0 pbx-rounded-md pbx-border pbx-border-solid pbx-border-gray-200",
|
|
32346
|
-
style: He(
|
|
32346
|
+
style: He(k.value)
|
|
32347
32347
|
}, null, 4),
|
|
32348
32348
|
p("div", FG, [
|
|
32349
32349
|
G[1] || (G[1] = p("label", {
|
|
@@ -32474,14 +32474,14 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32474
32474
|
), h = L(
|
|
32475
32475
|
() => !!s.value && c.value === s.value
|
|
32476
32476
|
), x = L(() => !!s.value), v = L(() => s.value ?? "");
|
|
32477
|
-
function
|
|
32477
|
+
function k(I) {
|
|
32478
32478
|
a.value = I.target.value;
|
|
32479
32479
|
}
|
|
32480
32480
|
function T() {
|
|
32481
32481
|
const I = vo(a.value);
|
|
32482
32482
|
I && (a.value = I);
|
|
32483
32483
|
}
|
|
32484
|
-
function
|
|
32484
|
+
function C(I) {
|
|
32485
32485
|
a.value = vo(I) ?? I;
|
|
32486
32486
|
}
|
|
32487
32487
|
function B() {
|
|
@@ -32548,7 +32548,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32548
32548
|
placeholder: "#rrggbb",
|
|
32549
32549
|
spellcheck: "false",
|
|
32550
32550
|
class: "pbx-myPrimaryInput pbx-w-full pbx-min-w-0",
|
|
32551
|
-
onInput:
|
|
32551
|
+
onInput: k,
|
|
32552
32552
|
onBlur: T,
|
|
32553
32553
|
onKeydown: ua(A, ["enter"])
|
|
32554
32554
|
}, null, 40, uK),
|
|
@@ -32571,7 +32571,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32571
32571
|
z(XD, {
|
|
32572
32572
|
"model-value": u.value,
|
|
32573
32573
|
"show-hex-input": !1,
|
|
32574
|
-
"onUpdate:modelValue":
|
|
32574
|
+
"onUpdate:modelValue": C
|
|
32575
32575
|
}, null, 8, ["model-value"])
|
|
32576
32576
|
])
|
|
32577
32577
|
])
|
|
@@ -32629,11 +32629,11 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32629
32629
|
} = JD({ width: 224 }), h = S(!1), x = L(() => {
|
|
32630
32630
|
var I;
|
|
32631
32631
|
return (I = n.value) != null && I.startsWith("custom:") ? n.value.replace("custom:", "") : "";
|
|
32632
|
-
}), v = L(() => x.value ? "" : !n.value || n.value === "none" ? "pbx-bg-black" : n.value.startsWith("pbx-text-") ? `pbx-bg-${n.value.replace("pbx-text-", "")}` : "pbx-bg-black"),
|
|
32632
|
+
}), v = L(() => x.value ? "" : !n.value || n.value === "none" ? "pbx-bg-black" : n.value.startsWith("pbx-text-") ? `pbx-bg-${n.value.replace("pbx-text-", "")}` : "pbx-bg-black"), k = L(() => {
|
|
32633
32633
|
if (x.value)
|
|
32634
32634
|
return { backgroundColor: x.value };
|
|
32635
32635
|
}), T = L(() => Xn.textColorVariables.filter((I) => I !== "none"));
|
|
32636
|
-
function
|
|
32636
|
+
function C(I) {
|
|
32637
32637
|
n.value = `custom:${I}`, t.handleCustomTextColor(I), b();
|
|
32638
32638
|
}
|
|
32639
32639
|
function B(I) {
|
|
@@ -32725,7 +32725,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32725
32725
|
as: "template",
|
|
32726
32726
|
key: M.id,
|
|
32727
32727
|
value: `custom:${M.color}`,
|
|
32728
|
-
onClick: (_) =>
|
|
32728
|
+
onClick: (_) => C(M.color)
|
|
32729
32729
|
}, {
|
|
32730
32730
|
default: U(({ active: _ }) => [
|
|
32731
32731
|
p("li", {
|
|
@@ -32800,7 +32800,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32800
32800
|
}, " A ", 2),
|
|
32801
32801
|
p("span", {
|
|
32802
32802
|
class: O(["pbx-mt-0.5 pbx-h-1 pbx-w-4 pbx-rounded-full pbx-shrink-0", v.value]),
|
|
32803
|
-
style: He(
|
|
32803
|
+
style: He(k.value)
|
|
32804
32804
|
}, null, 6)
|
|
32805
32805
|
])
|
|
32806
32806
|
], 10, $K),
|
|
@@ -32844,7 +32844,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32844
32844
|
class: O(["pbx-font-sans pbx-w-full pbx-flex pbx-items-center pbx-gap-3 pbx-cursor-pointer pbx-py-2 pbx-px-2 pbx-rounded-none pbx-border-0 pbx-bg-transparent pbx-text-left pbx-text-myPrimaryDarkGrayColor hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white", {
|
|
32845
32845
|
"pbx-bg-myPrimaryLinkColor pbx-text-myPrimaryDarkGrayColor": n.value === `custom:${M.color}`
|
|
32846
32846
|
}]),
|
|
32847
|
-
onClick: (_) =>
|
|
32847
|
+
onClick: (_) => C(M.color)
|
|
32848
32848
|
}, [
|
|
32849
32849
|
p("div", {
|
|
32850
32850
|
class: "pbx-aspect-square pbx-w-6 pbx-h-6 pbx-border-solid pbx-border pbx-border-gray-100 pbx-rounded-sm pbx-shrink-0",
|
|
@@ -32922,10 +32922,10 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32922
32922
|
} = JD({ width: 224 }), h = S(!1), x = L(() => {
|
|
32923
32923
|
var $;
|
|
32924
32924
|
return ($ = n.value) != null && $.startsWith("custom:") ? n.value.replace("custom:", "") : "";
|
|
32925
|
-
}), v = L(() => x.value ? "" : !n.value || n.value === "none" ? "pbx-bg-transparent" : n.value.startsWith("pbx-bg-") ? n.value : "pbx-bg-transparent"),
|
|
32925
|
+
}), v = L(() => x.value ? "" : !n.value || n.value === "none" ? "pbx-bg-transparent" : n.value.startsWith("pbx-bg-") ? n.value : "pbx-bg-transparent"), k = L(() => {
|
|
32926
32926
|
if (x.value)
|
|
32927
32927
|
return { backgroundColor: x.value };
|
|
32928
|
-
}), T = L(() => !n.value || n.value === "none"),
|
|
32928
|
+
}), T = L(() => !n.value || n.value === "none"), C = L(() => Xn.backgroundColorVariables.filter(($) => $ !== "none"));
|
|
32929
32929
|
function B($) {
|
|
32930
32930
|
n.value = `custom:${$}`, t.handleCustomBackgroundColor($), b();
|
|
32931
32931
|
}
|
|
@@ -32966,7 +32966,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
32966
32966
|
x.value || T.value ? "" : v.value
|
|
32967
32967
|
]),
|
|
32968
32968
|
style: He(
|
|
32969
|
-
x.value ? { backgroundColor: x.value } : T.value ? g(bs) :
|
|
32969
|
+
x.value ? { backgroundColor: x.value } : T.value ? g(bs) : k.value
|
|
32970
32970
|
)
|
|
32971
32971
|
}, null, 6),
|
|
32972
32972
|
p("div", null, y(g(e)("Background Color")), 1)
|
|
@@ -33012,7 +33012,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
33012
33012
|
"model-value": x.value,
|
|
33013
33013
|
onOpen: P
|
|
33014
33014
|
}, null, 8, ["model-value"]),
|
|
33015
|
-
g(s).length > 0 ||
|
|
33015
|
+
g(s).length > 0 || C.value.length > 0 ? (f(), w("div", qK)) : E("", !0),
|
|
33016
33016
|
g(s).length > 0 ? (f(), w(re, { key: 1 }, [
|
|
33017
33017
|
p("div", UK, y(g(e)("Theme Color Presets")), 1),
|
|
33018
33018
|
(f(!0), w(re, null, ye(g(s), (_) => (f(), be(g(lr), {
|
|
@@ -33039,10 +33039,10 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
33039
33039
|
]),
|
|
33040
33040
|
_: 2
|
|
33041
33041
|
}, 1032, ["value", "onClick"]))), 128)),
|
|
33042
|
-
|
|
33042
|
+
C.value.length > 0 ? (f(), w("div", KK)) : E("", !0)
|
|
33043
33043
|
], 64)) : E("", !0),
|
|
33044
|
-
|
|
33045
|
-
(f(!0), w(re, null, ye(
|
|
33044
|
+
C.value.length > 0 ? (f(), w("div", JK, y(g(e)("Built-in colors")), 1)) : E("", !0),
|
|
33045
|
+
(f(!0), w(re, null, ye(C.value, (_) => (f(), be(g(lr), {
|
|
33046
33046
|
as: "template",
|
|
33047
33047
|
onClick: M[1] || (M[1] = (K) => g(t).handleBackgroundColor(n.value ?? void 0)),
|
|
33048
33048
|
key: _,
|
|
@@ -33090,7 +33090,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
33090
33090
|
}, [
|
|
33091
33091
|
p("span", {
|
|
33092
33092
|
class: O(["pbx-h-5 pbx-w-5 pbx-rounded-full pbx-border pbx-border-solid pbx-border-gray-300 pbx-shrink-0", T.value ? "" : v.value]),
|
|
33093
|
-
style: He(T.value ? g(bs) :
|
|
33093
|
+
style: He(T.value ? g(bs) : k.value),
|
|
33094
33094
|
"aria-hidden": "true"
|
|
33095
33095
|
}, null, 6)
|
|
33096
33096
|
], 10, ZK),
|
|
@@ -33128,7 +33128,7 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
33128
33128
|
"model-value": x.value,
|
|
33129
33129
|
onOpen: P
|
|
33130
33130
|
}, null, 8, ["model-value"]),
|
|
33131
|
-
g(s).length > 0 ||
|
|
33131
|
+
g(s).length > 0 || C.value.length > 0 ? (f(), w("div", eJ)) : E("", !0),
|
|
33132
33132
|
g(s).length > 0 ? (f(), w(re, { key: 1 }, [
|
|
33133
33133
|
p("div", tJ, y(g(e)("Theme Color Presets")), 1),
|
|
33134
33134
|
(f(!0), w(re, null, ye(g(s), (_) => (f(), w("button", {
|
|
@@ -33145,10 +33145,10 @@ const UG = { class: "pbx-min-h-[45rem]" }, WG = { class: "pbx-myPrimaryParagraph
|
|
|
33145
33145
|
}, null, 4),
|
|
33146
33146
|
p("span", null, y(g(e)(_.label)), 1)
|
|
33147
33147
|
], 10, oJ))), 128)),
|
|
33148
|
-
|
|
33148
|
+
C.value.length > 0 ? (f(), w("div", rJ)) : E("", !0)
|
|
33149
33149
|
], 64)) : E("", !0),
|
|
33150
|
-
|
|
33151
|
-
(f(!0), w(re, null, ye(
|
|
33150
|
+
C.value.length > 0 ? (f(), w("div", nJ, y(g(e)("Built-in colors")), 1)) : E("", !0),
|
|
33151
|
+
(f(!0), w(re, null, ye(C.value, (_) => (f(), w("button", {
|
|
33152
33152
|
key: _,
|
|
33153
33153
|
type: "button",
|
|
33154
33154
|
class: O(["pbx-font-sans pbx-w-full pbx-flex pbx-items-center pbx-gap-3 pbx-cursor-pointer pbx-py-2 pbx-px-2 pbx-rounded-none pbx-border-0 pbx-bg-transparent pbx-text-left pbx-text-myPrimaryDarkGrayColor hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white", {
|
|
@@ -33785,7 +33785,7 @@ const fo = {
|
|
|
33785
33785
|
var X;
|
|
33786
33786
|
return (X = c.value) == null ? void 0 : X.tagName;
|
|
33787
33787
|
});
|
|
33788
|
-
const u = L(() => i.canMoveUp()), b = L(() => i.canMoveDown()), m = L(() => !c.value || !Xt.value ? !1 : !!i.findReverseableContainer()), h = S(0), x = S(!1), v = L(() => !!(c.value instanceof HTMLElement && c.value.closest("[data-isl]"))),
|
|
33788
|
+
const u = L(() => i.canMoveUp()), b = L(() => i.canMoveDown()), m = L(() => !c.value || !Xt.value ? !1 : !!i.findReverseableContainer()), h = S(0), x = S(!1), v = L(() => !!(c.value instanceof HTMLElement && c.value.closest("[data-isl]"))), k = L(() => {
|
|
33789
33789
|
var X;
|
|
33790
33790
|
return h.value, c.value instanceof HTMLElement ? ((X = c.value.closest("[data-isl]")) == null ? void 0 : X.hasAttribute("data-isl-auto")) ?? !1 : !1;
|
|
33791
33791
|
}), T = L(() => {
|
|
@@ -33794,20 +33794,20 @@ const fo = {
|
|
|
33794
33794
|
if (!X) return 3;
|
|
33795
33795
|
const D = X.querySelector(".pbx-isl-t");
|
|
33796
33796
|
return D ? D.children.length : 3;
|
|
33797
|
-
}),
|
|
33797
|
+
}), C = S(0), B = S(!1), A = S(0), H = L(() => (A.value, i.isSelectedElementImage())), P = L(() => l.getImageSettingsPanelOpen), I = () => {
|
|
33798
33798
|
A.value++, s("open-image-settings");
|
|
33799
|
-
}, $ = L(() => (
|
|
33800
|
-
|
|
33799
|
+
}, $ = L(() => (C.value, i.isSelectedComponentTopElement())), M = L(() => (C.value, i.selectedComponentIsFullWidth())), _ = () => {
|
|
33800
|
+
C.value++, B.value = !0;
|
|
33801
33801
|
}, K = async (X) => {
|
|
33802
33802
|
const D = i.setSelectedComponentFullWidth(X);
|
|
33803
|
-
|
|
33803
|
+
C.value++, await D, C.value++;
|
|
33804
33804
|
}, N = S(0), F = S(!1), G = S(fo.layout), V = S(
|
|
33805
33805
|
fo.mobileColumns
|
|
33806
33806
|
), Z = S(
|
|
33807
33807
|
fo.cardStyle
|
|
33808
33808
|
), se = S(fo.roundedImages), de = S(fo.openInNewTab), Q = S(
|
|
33809
33809
|
fo.buttonStyle
|
|
33810
|
-
), Ce = S(fo.roundedButtons), Ve = S(fo.hidePrice), _t = S(fo.hideImage), bt = S(fo.hideButton), St = S(!1), Be = S(!1), ve = S(!1),
|
|
33810
|
+
), Ce = S(fo.roundedButtons), Ve = S(fo.hidePrice), _t = S(fo.hideImage), bt = S(fo.hideButton), St = S(!1), Be = S(!1), ve = S(!1), ue = S(!1);
|
|
33811
33811
|
let ne = !1, pe = !1, ie = null, Y = null;
|
|
33812
33812
|
const Qe = () => Y ? G.value === Y.layout && V.value === Y.mobileColumns && Z.value === Y.cardStyle && se.value === Y.roundedImages && de.value === Y.openInNewTab && Q.value === Y.buttonStyle && Ce.value === Y.roundedButtons && Ve.value === Y.hidePrice && _t.value === Y.hideImage && bt.value === Y.hideButton : !0, te = () => {
|
|
33813
33813
|
pe = !0, ie && clearTimeout(ie), ie = setTimeout(() => {
|
|
@@ -33828,7 +33828,7 @@ const fo = {
|
|
|
33828
33828
|
hidePrice: st,
|
|
33829
33829
|
hideImage: j,
|
|
33830
33830
|
hideButton: R
|
|
33831
|
-
}, G.value = X.layout, V.value = D, Z.value = q, se.value = we, de.value = Re, Q.value = Oe, Ce.value = at, Ve.value = st, _t.value = j, bt.value = R, St.value = he.hasPrices, Be.value = he.hasImages, ve.value = he.hasButtons,
|
|
33831
|
+
}, G.value = X.layout, V.value = D, Z.value = q, se.value = we, de.value = Re, Q.value = Oe, Ce.value = at, Ve.value = st, _t.value = j, bt.value = R, St.value = he.hasPrices, Be.value = he.hasImages, ve.value = he.hasButtons, ue.value = he.hasLinks, N.value++, F.value = !0;
|
|
33832
33832
|
}, Bt = () => {
|
|
33833
33833
|
J(), F.value = !1, Y = null;
|
|
33834
33834
|
}, Ut = async () => {
|
|
@@ -34064,7 +34064,7 @@ const fo = {
|
|
|
34064
34064
|
}
|
|
34065
34065
|
Vo(), ho = requestAnimationFrame(Yr);
|
|
34066
34066
|
}, sd = function() {
|
|
34067
|
-
cancelAnimationFrame(ho),
|
|
34067
|
+
cancelAnimationFrame(ho), ce(() => {
|
|
34068
34068
|
Vo(), ho = requestAnimationFrame(Yr);
|
|
34069
34069
|
});
|
|
34070
34070
|
}, ld = function() {
|
|
@@ -34346,7 +34346,7 @@ const fo = {
|
|
|
34346
34346
|
key: 7,
|
|
34347
34347
|
onClick: D[11] || (D[11] = (q) => x.value = !0),
|
|
34348
34348
|
class: O([
|
|
34349
|
-
|
|
34349
|
+
k.value ? "pbx-bg-myPrimaryLinkColor pbx-text-white" : "pbx-bg-gray-100 pbx-text-myPrimaryDarkGrayColor",
|
|
34350
34350
|
"pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-flex pbx-items-center pbx-justify-center pbx-rounded-xl hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white"
|
|
34351
34351
|
]),
|
|
34352
34352
|
title: g(r)("Slider Settings")
|
|
@@ -34424,7 +34424,7 @@ const fo = {
|
|
|
34424
34424
|
"has-product-prices": St.value,
|
|
34425
34425
|
"has-product-images": Be.value,
|
|
34426
34426
|
"has-product-buttons": ve.value,
|
|
34427
|
-
"has-product-links":
|
|
34427
|
+
"has-product-links": ue.value,
|
|
34428
34428
|
translate: g(r),
|
|
34429
34429
|
compact: ""
|
|
34430
34430
|
}, null, 8, ["layout", "mobile-columns", "card-style", "rounded-images", "open-in-new-tab", "button-style", "rounded-buttons", "hide-price", "hide-image", "hide-button", "has-product-prices", "has-product-images", "has-product-buttons", "has-product-links", "translate"])
|
|
@@ -34449,28 +34449,28 @@ const fo = {
|
|
|
34449
34449
|
p("div", rQ, [
|
|
34450
34450
|
p("div", nQ, [
|
|
34451
34451
|
p("div", {
|
|
34452
|
-
class: O(["pbx-flex pbx-items-center pbx-justify-between pbx-px-4 pbx-py-3",
|
|
34452
|
+
class: O(["pbx-flex pbx-items-center pbx-justify-between pbx-px-4 pbx-py-3", k.value ? "pbx-bg-myPrimaryLinkColor" : "pbx-bg-gray-50"])
|
|
34453
34453
|
}, [
|
|
34454
34454
|
p("div", iQ, [
|
|
34455
34455
|
p("span", {
|
|
34456
34456
|
class: O([
|
|
34457
34457
|
"material-symbols-outlined pbx-materialIconXl",
|
|
34458
|
-
|
|
34458
|
+
k.value ? "pbx-text-white" : "pbx-text-myPrimaryDarkGrayColor"
|
|
34459
34459
|
])
|
|
34460
34460
|
}, "autoplay", 2),
|
|
34461
34461
|
p("span", {
|
|
34462
34462
|
class: O([
|
|
34463
34463
|
"pbx-text-sm pbx-font-semibold",
|
|
34464
|
-
|
|
34464
|
+
k.value ? "pbx-text-white" : "pbx-text-myPrimaryDarkGrayColor"
|
|
34465
34465
|
])
|
|
34466
34466
|
}, y(g(r)("Auto Rotate")), 3)
|
|
34467
34467
|
]),
|
|
34468
34468
|
z(ko, {
|
|
34469
|
-
"model-value":
|
|
34469
|
+
"model-value": k.value,
|
|
34470
34470
|
"onUpdate:modelValue": go
|
|
34471
34471
|
}, null, 8, ["model-value"])
|
|
34472
34472
|
], 2),
|
|
34473
|
-
|
|
34473
|
+
k.value ? (f(), w("div", aQ, [
|
|
34474
34474
|
p("p", sQ, y(g(r)("Rotation Speed (s)")), 1),
|
|
34475
34475
|
p("div", lQ, [
|
|
34476
34476
|
(f(), w(re, null, ye([1, 2, 3, 4, 5], (q) => p("button", {
|
|
@@ -35399,8 +35399,8 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35399
35399
|
}), A = H.body.innerHTML;
|
|
35400
35400
|
}
|
|
35401
35401
|
return `<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=${e.renderWidth}"><style>${x}</style><style>${DQ}</style></head><body style="overflow:hidden">${A}</body></html>`;
|
|
35402
|
-
}),
|
|
35403
|
-
let T = null,
|
|
35402
|
+
}), k = S(null);
|
|
35403
|
+
let T = null, C = null;
|
|
35404
35404
|
function B(A) {
|
|
35405
35405
|
var P, I;
|
|
35406
35406
|
const H = A.target;
|
|
@@ -35414,20 +35414,20 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35414
35414
|
}
|
|
35415
35415
|
return bo(() => {
|
|
35416
35416
|
var A;
|
|
35417
|
-
|
|
35417
|
+
k.value && (typeof IntersectionObserver > "u" ? c.value = !0 : (T = new IntersectionObserver(
|
|
35418
35418
|
(H) => {
|
|
35419
35419
|
H[0].isIntersecting && (c.value = !0, T == null || T.disconnect(), T = null);
|
|
35420
35420
|
},
|
|
35421
35421
|
{ rootMargin: "300px" }
|
|
35422
|
-
), T.observe(
|
|
35422
|
+
), T.observe(k.value)), typeof window < "u" && "ResizeObserver" in window ? (C = new window.ResizeObserver((H) => {
|
|
35423
35423
|
const P = H[0].contentRect.width;
|
|
35424
35424
|
P > 0 && (t.value = P);
|
|
35425
|
-
}),
|
|
35425
|
+
}), k.value && C.observe(k.value)) : t.value = ((A = k.value) == null ? void 0 : A.clientWidth) || 320);
|
|
35426
35426
|
}), gm(() => {
|
|
35427
|
-
T == null || T.disconnect(), T = null,
|
|
35427
|
+
T == null || T.disconnect(), T = null, C == null || C.disconnect(), C = null;
|
|
35428
35428
|
}), (A, H) => (f(), w("div", {
|
|
35429
35429
|
ref_key: "wrapper",
|
|
35430
|
-
ref:
|
|
35430
|
+
ref: k,
|
|
35431
35431
|
class: "pbx-relative pbx-overflow-hidden pbx-w-full pbx-min-h-[12rem]",
|
|
35432
35432
|
style: He({
|
|
35433
35433
|
height: `${s.value}px`,
|
|
@@ -35587,14 +35587,14 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35587
35587
|
), v = L(() => {
|
|
35588
35588
|
const pe = Kd[0].components.data.map((ie) => ie.category);
|
|
35589
35589
|
return ["All", ...new Set(pe)];
|
|
35590
|
-
}),
|
|
35590
|
+
}), k = L(() => {
|
|
35591
35591
|
const pe = a.value.trim().toLowerCase(), ie = !pe && d.value !== "All" ? Kd[0].components.data.filter((Y) => Y.category === d.value) : Kd[0].components.data;
|
|
35592
35592
|
return pe ? ie.filter((Y) => Y.title.toLowerCase().includes(pe)) : ie;
|
|
35593
|
-
}), T = S(1),
|
|
35594
|
-
() => Math.max(1, Math.ceil(
|
|
35593
|
+
}), T = S(1), C = L(
|
|
35594
|
+
() => Math.max(1, Math.ceil(k.value.length / Qd))
|
|
35595
35595
|
), B = L(() => {
|
|
35596
35596
|
const pe = (T.value - 1) * Qd;
|
|
35597
|
-
return
|
|
35597
|
+
return k.value.slice(pe, pe + Qd);
|
|
35598
35598
|
});
|
|
35599
35599
|
le([d, a], () => {
|
|
35600
35600
|
T.value = 1;
|
|
@@ -35644,7 +35644,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35644
35644
|
St(pe);
|
|
35645
35645
|
}, ve = async function(pe) {
|
|
35646
35646
|
i.value = !0;
|
|
35647
|
-
const ie =
|
|
35647
|
+
const ie = ue(pe), Y = ie.html_code.replace(/Layouts and visual\./g, e("Layouts and visual.")).replace(
|
|
35648
35648
|
/Start customizing by editing this default text directly in the editor\./g,
|
|
35649
35649
|
e("Start customizing by editing this default text directly in the editor.")
|
|
35650
35650
|
), Qe = {
|
|
@@ -35653,7 +35653,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35653
35653
|
title: ie.title
|
|
35654
35654
|
};
|
|
35655
35655
|
await r.addComponent(Qe), t(e("Component added to page"), "success"), $(), i.value = !1;
|
|
35656
|
-
},
|
|
35656
|
+
}, ue = (pe) => {
|
|
35657
35657
|
if (!pe.title.includes("Button")) return pe;
|
|
35658
35658
|
const Y = new DOMParser().parseFromString(pe.html_code, "text/html");
|
|
35659
35659
|
return Y.querySelectorAll("#linktree").forEach((te) => {
|
|
@@ -35854,8 +35854,8 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35854
35854
|
_: 2
|
|
35855
35855
|
}, 1032, ["title", "description", "onClick"]))), 128))
|
|
35856
35856
|
])) : E("", !0),
|
|
35857
|
-
|
|
35858
|
-
|
|
35857
|
+
k.value.length ? E("", !0) : (f(), w("p", zX, y(g(e)("No components found.")), 1)),
|
|
35858
|
+
C.value > 1 ? (f(), w("div", OX, [
|
|
35859
35859
|
p("button", {
|
|
35860
35860
|
type: "button",
|
|
35861
35861
|
class: O(["pbx-text-xs pbx-h-10 pbx-px-2 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-outline-none focus-visible:pbx-ring-2 focus-visible:pbx-ring-myPrimaryLinkColor/30 pbx-text-black", T.value === 1 ? "pbx-opacity-40 pbx-cursor-not-allowed" : ""]),
|
|
@@ -35863,7 +35863,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35863
35863
|
onClick: ie[5] || (ie[5] = (Y) => T.value--)
|
|
35864
35864
|
}, y(g(e)("Previous")), 11, NX),
|
|
35865
35865
|
p("div", FX, [
|
|
35866
|
-
(f(!0), w(re, null, ye(
|
|
35866
|
+
(f(!0), w(re, null, ye(C.value, (Y) => (f(), w("button", {
|
|
35867
35867
|
key: Y,
|
|
35868
35868
|
type: "button",
|
|
35869
35869
|
class: O([
|
|
@@ -35877,9 +35877,9 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
35877
35877
|
type: "button",
|
|
35878
35878
|
class: O([
|
|
35879
35879
|
"pbx-text-xs pbx-h-10 pbx-px-2 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-outline-none focus-visible:pbx-ring-2 focus-visible:pbx-ring-myPrimaryLinkColor/30 pbx-text-black",
|
|
35880
|
-
T.value ===
|
|
35880
|
+
T.value === C.value ? "pbx-opacity-40 pbx-cursor-not-allowed" : ""
|
|
35881
35881
|
]),
|
|
35882
|
-
disabled: T.value ===
|
|
35882
|
+
disabled: T.value === C.value,
|
|
35883
35883
|
onClick: ie[6] || (ie[6] = (Y) => T.value++)
|
|
35884
35884
|
}, y(g(e)("Next")), 11, VX)
|
|
35885
35885
|
])) : E("", !0)
|
|
@@ -36037,15 +36037,15 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36037
36037
|
showSampleCatalogBanner: { type: Boolean }
|
|
36038
36038
|
},
|
|
36039
36039
|
setup(o) {
|
|
36040
|
-
const e = o, t = qe(), { closeProductLibraryModal: r } = uR(), { translate: n } = ke(), { showToast: i } = wt(), a = S(!1), s = S(""), l = S(/* @__PURE__ */ new Map()), d = S([]), c = S("grid-3"), u = S(2), b = S("minimal"), m = S(!0), h = S(!0), x = S("button"), v = S(!0),
|
|
36040
|
+
const e = o, t = qe(), { closeProductLibraryModal: r } = uR(), { translate: n } = ke(), { showToast: i } = wt(), a = S(!1), s = S(""), l = S(/* @__PURE__ */ new Map()), d = S([]), c = S("grid-3"), u = S(2), b = S("minimal"), m = S(!0), h = S(!0), x = S("button"), v = S(!0), k = S(!1), T = S(!1), C = S(!1), B = S(null);
|
|
36041
36041
|
let A = null;
|
|
36042
36042
|
const H = L(() => vJ(e.products)), P = L(() => yJ(e.products)), I = L(() => wJ(e.products)), $ = L(() => SJ(e.products)), M = oR, _ = rR;
|
|
36043
36043
|
function K(ve) {
|
|
36044
36044
|
return ve.id != null ? ve.id : ve.title != null ? ve.title : ve;
|
|
36045
36045
|
}
|
|
36046
36046
|
const N = L(() => {
|
|
36047
|
-
const ve = s.value.trim().toLowerCase(),
|
|
36048
|
-
return
|
|
36047
|
+
const ve = s.value.trim().toLowerCase(), ue = ve ? e.products.filter((pe) => [pe.title, pe.description, pe.sku, pe.badge].filter(Boolean).join(" ").toLowerCase().includes(ve)) : e.products, ne = /* @__PURE__ */ new Set();
|
|
36048
|
+
return ue.filter((pe) => {
|
|
36049
36049
|
const ie = K(pe);
|
|
36050
36050
|
return ne.has(ie) ? !1 : (ne.add(ie), !0);
|
|
36051
36051
|
});
|
|
@@ -36055,25 +36055,25 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36055
36055
|
() => _.find((ve) => ve.value === b.value) ?? _[0]
|
|
36056
36056
|
);
|
|
36057
36057
|
function Z(ve) {
|
|
36058
|
-
const
|
|
36059
|
-
ne.has(
|
|
36058
|
+
const ue = K(ve), ne = new Map(l.value);
|
|
36059
|
+
ne.has(ue) ? (ne.delete(ue), d.value = d.value.filter((pe) => K(pe) !== ue)) : (ne.set(ue, ve), d.value = [...d.value, ve]), l.value = ne;
|
|
36060
36060
|
}
|
|
36061
36061
|
function se(ve) {
|
|
36062
36062
|
return l.value.has(K(ve));
|
|
36063
36063
|
}
|
|
36064
36064
|
function de(ve) {
|
|
36065
|
-
const
|
|
36066
|
-
ne.delete(
|
|
36065
|
+
const ue = K(ve), ne = new Map(l.value);
|
|
36066
|
+
ne.delete(ue), l.value = ne, d.value = d.value.filter((pe) => K(pe) !== ue);
|
|
36067
36067
|
}
|
|
36068
36068
|
function Q(ve) {
|
|
36069
36069
|
if (ve === 0) return;
|
|
36070
|
-
const
|
|
36071
|
-
[
|
|
36070
|
+
const ue = [...d.value];
|
|
36071
|
+
[ue[ve - 1], ue[ve]] = [ue[ve], ue[ve - 1]], d.value = ue, Ve(ue[ve - 1]);
|
|
36072
36072
|
}
|
|
36073
36073
|
function Ce(ve) {
|
|
36074
36074
|
if (ve === d.value.length - 1) return;
|
|
36075
|
-
const
|
|
36076
|
-
[
|
|
36075
|
+
const ue = [...d.value];
|
|
36076
|
+
[ue[ve], ue[ve + 1]] = [ue[ve + 1], ue[ve]], d.value = ue, Ve(ue[ve + 1]);
|
|
36077
36077
|
}
|
|
36078
36078
|
function Ve(ve) {
|
|
36079
36079
|
B.value = K(ve), A && clearTimeout(A), A = setTimeout(() => {
|
|
@@ -36101,7 +36101,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36101
36101
|
]);
|
|
36102
36102
|
function St(ve) {
|
|
36103
36103
|
return Object.entries(ve).filter(
|
|
36104
|
-
([
|
|
36104
|
+
([ue, ne]) => !bt.has(ue) && ne != null && ne !== ""
|
|
36105
36105
|
);
|
|
36106
36106
|
}
|
|
36107
36107
|
async function Be() {
|
|
@@ -36118,18 +36118,18 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36118
36118
|
openInNewTab: h.value,
|
|
36119
36119
|
buttonStyle: x.value,
|
|
36120
36120
|
roundedButtons: v.value,
|
|
36121
|
-
hidePrice:
|
|
36121
|
+
hidePrice: k.value,
|
|
36122
36122
|
hideImage: T.value,
|
|
36123
|
-
hideButton:
|
|
36123
|
+
hideButton: C.value
|
|
36124
36124
|
}), i(n("Products added to page"), "success"), r();
|
|
36125
36125
|
} finally {
|
|
36126
36126
|
a.value = !1;
|
|
36127
36127
|
}
|
|
36128
36128
|
}
|
|
36129
|
-
return (ve,
|
|
36129
|
+
return (ve, ue) => (f(), w("div", null, [
|
|
36130
36130
|
p("div", null, [
|
|
36131
36131
|
o.showSampleCatalogBanner ? (f(), w("div", YX, [
|
|
36132
|
-
|
|
36132
|
+
ue[12] || (ue[12] = p("span", { class: "pbx-productSampleCatalogBannerIcon" }, [
|
|
36133
36133
|
p("span", {
|
|
36134
36134
|
class: "material-symbols-outlined",
|
|
36135
36135
|
"aria-hidden": "true"
|
|
@@ -36140,14 +36140,14 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36140
36140
|
])
|
|
36141
36141
|
])) : E("", !0),
|
|
36142
36142
|
p("form", {
|
|
36143
|
-
onSubmit:
|
|
36143
|
+
onSubmit: ue[1] || (ue[1] = Te(() => {
|
|
36144
36144
|
}, ["prevent"]))
|
|
36145
36145
|
}, [
|
|
36146
36146
|
p("div", ZX, [
|
|
36147
36147
|
p("div", eZ, [
|
|
36148
36148
|
p("label", tZ, y(g(n)("Search products")), 1),
|
|
36149
36149
|
Ie(p("input", {
|
|
36150
|
-
"onUpdate:modelValue":
|
|
36150
|
+
"onUpdate:modelValue": ue[0] || (ue[0] = (ne) => s.value = ne),
|
|
36151
36151
|
type: "search",
|
|
36152
36152
|
id: "search-products",
|
|
36153
36153
|
class: "pbx-myPrimarySearchInput pbx-w-full pbx-pl-10 pbx-border-0",
|
|
@@ -36156,7 +36156,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36156
36156
|
}, null, 8, oZ), [
|
|
36157
36157
|
[Po, s.value]
|
|
36158
36158
|
]),
|
|
36159
|
-
|
|
36159
|
+
ue[13] || (ue[13] = p("div", { class: "pbx-flex pbx-absolute pbx-inset-y-0 pbx-left-0 pbx-items-center pbx-pl-3 pbx-pointer-events-none" }, [
|
|
36160
36160
|
p("span", { class: "material-symbols-outlined" }, " search ")
|
|
36161
36161
|
], -1))
|
|
36162
36162
|
]),
|
|
@@ -36166,25 +36166,25 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36166
36166
|
p("div", nZ, [
|
|
36167
36167
|
z(cR, {
|
|
36168
36168
|
layout: c.value,
|
|
36169
|
-
"onUpdate:layout":
|
|
36169
|
+
"onUpdate:layout": ue[2] || (ue[2] = (ne) => c.value = ne),
|
|
36170
36170
|
"mobile-columns": u.value,
|
|
36171
|
-
"onUpdate:mobileColumns":
|
|
36171
|
+
"onUpdate:mobileColumns": ue[3] || (ue[3] = (ne) => u.value = ne),
|
|
36172
36172
|
"card-style": b.value,
|
|
36173
|
-
"onUpdate:cardStyle":
|
|
36173
|
+
"onUpdate:cardStyle": ue[4] || (ue[4] = (ne) => b.value = ne),
|
|
36174
36174
|
"rounded-images": m.value,
|
|
36175
|
-
"onUpdate:roundedImages":
|
|
36175
|
+
"onUpdate:roundedImages": ue[5] || (ue[5] = (ne) => m.value = ne),
|
|
36176
36176
|
"open-in-new-tab": h.value,
|
|
36177
|
-
"onUpdate:openInNewTab":
|
|
36177
|
+
"onUpdate:openInNewTab": ue[6] || (ue[6] = (ne) => h.value = ne),
|
|
36178
36178
|
"button-style": x.value,
|
|
36179
|
-
"onUpdate:buttonStyle":
|
|
36179
|
+
"onUpdate:buttonStyle": ue[7] || (ue[7] = (ne) => x.value = ne),
|
|
36180
36180
|
"rounded-buttons": v.value,
|
|
36181
|
-
"onUpdate:roundedButtons":
|
|
36182
|
-
"hide-price":
|
|
36183
|
-
"onUpdate:hidePrice":
|
|
36181
|
+
"onUpdate:roundedButtons": ue[8] || (ue[8] = (ne) => v.value = ne),
|
|
36182
|
+
"hide-price": k.value,
|
|
36183
|
+
"onUpdate:hidePrice": ue[9] || (ue[9] = (ne) => k.value = ne),
|
|
36184
36184
|
"hide-image": T.value,
|
|
36185
|
-
"onUpdate:hideImage":
|
|
36186
|
-
"hide-button":
|
|
36187
|
-
"onUpdate:hideButton":
|
|
36185
|
+
"onUpdate:hideImage": ue[10] || (ue[10] = (ne) => T.value = ne),
|
|
36186
|
+
"hide-button": C.value,
|
|
36187
|
+
"onUpdate:hideButton": ue[11] || (ue[11] = (ne) => C.value = ne),
|
|
36188
36188
|
"has-product-prices": H.value,
|
|
36189
36189
|
"has-product-images": P.value,
|
|
36190
36190
|
"has-product-buttons": I.value,
|
|
@@ -36304,7 +36304,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36304
36304
|
disabled: pe === 0,
|
|
36305
36305
|
"aria-label": g(n)("Move up"),
|
|
36306
36306
|
onClick: Te((ie) => Q(pe), ["stop"])
|
|
36307
|
-
}, [...
|
|
36307
|
+
}, [...ue[14] || (ue[14] = [
|
|
36308
36308
|
p("span", {
|
|
36309
36309
|
class: "material-symbols-outlined",
|
|
36310
36310
|
style: { "font-size": "14px" }
|
|
@@ -36316,7 +36316,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36316
36316
|
disabled: pe === F.value.length - 1,
|
|
36317
36317
|
"aria-label": g(n)("Move down"),
|
|
36318
36318
|
onClick: Te((ie) => Ce(pe), ["stop"])
|
|
36319
|
-
}, [...
|
|
36319
|
+
}, [...ue[15] || (ue[15] = [
|
|
36320
36320
|
p("span", {
|
|
36321
36321
|
class: "material-symbols-outlined",
|
|
36322
36322
|
style: { "font-size": "14px" }
|
|
@@ -36329,7 +36329,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36329
36329
|
"aria-label": g(n)("Remove"),
|
|
36330
36330
|
title: g(n)("Remove"),
|
|
36331
36331
|
onClick: Te((ie) => de(ne), ["stop"])
|
|
36332
|
-
}, [...
|
|
36332
|
+
}, [...ue[16] || (ue[16] = [
|
|
36333
36333
|
p("span", { class: "material-symbols-outlined pbx-materialIconLg" }, "close", -1)
|
|
36334
36334
|
])], 8, XZ)
|
|
36335
36335
|
], 2))), 128))
|
|
@@ -36377,7 +36377,7 @@ const NQ = /* @__PURE__ */ Cn(RQ, [["render", OQ]]), FQ = ["srcdoc"], Yd = 280,
|
|
|
36377
36377
|
])
|
|
36378
36378
|
])
|
|
36379
36379
|
]),
|
|
36380
|
-
|
|
36380
|
+
ue[17] || (ue[17] = p("div", null, [
|
|
36381
36381
|
p("button", { class: "pbx-sr-only" }, "Focusable fallback")
|
|
36382
36382
|
], -1))
|
|
36383
36383
|
])
|
|
@@ -37023,13 +37023,13 @@ function dte(o) {
|
|
|
37023
37023
|
const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGroup" }, ute = ["src"], bte = { class: "pbx-editorFieldGroup pbx-rounded-lg pbx-border pbx-border-solid pbx-border-gray-200 pbx-bg-gray-50 pbx-px-4 pbx-py-8 pbx-text-center" }, mte = { class: "pbx-editorSectionDesc pbx-mb-0" }, gte = /* @__PURE__ */ ae({
|
|
37024
37024
|
__name: "ImageEditor",
|
|
37025
37025
|
setup(o) {
|
|
37026
|
-
const { translate: e } = ke(), t = je, r = nr("CustomMediaComponent", null), n = S(null), i = S(!1), a = S(!1), s = S(""), l = S(""), d = S(""), c = S(null), u = S(null), b = S(null), m = L(() => (t.getBasePrimaryImage &&
|
|
37026
|
+
const { translate: e } = ke(), t = je, r = nr("CustomMediaComponent", null), n = S(null), i = S(!1), a = S(!1), s = S(""), l = S(""), d = S(""), c = S(null), u = S(null), b = S(null), m = L(() => (t.getBasePrimaryImage && k(t.getBasePrimaryImage), t.getBasePrimaryImage));
|
|
37027
37027
|
function h(T) {
|
|
37028
37028
|
return T ? T.tagName === "IMG" ? !0 : !!t.getBasePrimaryImage : !1;
|
|
37029
37029
|
}
|
|
37030
37030
|
function x(T) {
|
|
37031
|
-
var
|
|
37032
|
-
h(T) && ((
|
|
37031
|
+
var C;
|
|
37032
|
+
h(T) && ((C = n.value) == null || C.open());
|
|
37033
37033
|
}
|
|
37034
37034
|
le(
|
|
37035
37035
|
() => t.getElement,
|
|
@@ -37043,7 +37043,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37043
37043
|
x(t.getElement);
|
|
37044
37044
|
}
|
|
37045
37045
|
), bo(() => {
|
|
37046
|
-
|
|
37046
|
+
ce(() => {
|
|
37047
37047
|
x(t.getElement);
|
|
37048
37048
|
});
|
|
37049
37049
|
});
|
|
@@ -37051,10 +37051,10 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37051
37051
|
a.value = !0, s.value = e("Media Library"), l.value = null, d.value = e("Close"), c.value = e("Select image"), b.value = function() {
|
|
37052
37052
|
a.value = !1;
|
|
37053
37053
|
};
|
|
37054
|
-
},
|
|
37054
|
+
}, k = async function(T) {
|
|
37055
37055
|
i.value = !0, T && typeof T == "string" && T.length > 2 && (await dte(T), await et(200), i.value = !1);
|
|
37056
37056
|
};
|
|
37057
|
-
return (T,
|
|
37057
|
+
return (T, C) => (f(), w(re, null, [
|
|
37058
37058
|
z(ot, {
|
|
37059
37059
|
ref_key: "imageAccordionRef",
|
|
37060
37060
|
ref: n
|
|
@@ -37063,7 +37063,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37063
37063
|
Ne(y(g(e)("Image")), 1)
|
|
37064
37064
|
]),
|
|
37065
37065
|
content: U(() => [
|
|
37066
|
-
Ie(p("div", pte, [...
|
|
37066
|
+
Ie(p("div", pte, [...C[1] || (C[1] = [
|
|
37067
37067
|
p("div", { class: "pbx-flex pbx-min-h-40 pbx-items-center pbx-justify-center" }, [
|
|
37068
37068
|
p("div", { class: "pbx-inline-block pbx-h-8 pbx-w-8 pbx-animate-spin pbx-rounded-full pbx-border-4 pbx-border-solid pbx-border-current pbx-border-r-transparent pbx-align-[-0.125em] motion-reduce:pbx-animate-[spin_1.5s_linear_infinite]" }, [
|
|
37069
37069
|
p("span", { class: "!pbx-absolute !pbx-m-px !pbx-h-px !pbx-w-px !pbx-overflow-hidden !pbx-whitespace-nowrap !pbx-border-0 !pbx-p-0 !pbx-[clip:rect(0,0,0,0)]" }, "Loading...")
|
|
@@ -37098,7 +37098,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37098
37098
|
secondButtonText: c.value ?? void 0,
|
|
37099
37099
|
thirdButtonText: u.value ?? void 0,
|
|
37100
37100
|
customMediaComponent: g(r) ?? void 0,
|
|
37101
|
-
onFirstMediaButtonFunction:
|
|
37101
|
+
onFirstMediaButtonFunction: C[0] || (C[0] = () => {
|
|
37102
37102
|
var B;
|
|
37103
37103
|
return (B = b.value) == null ? void 0 : B.call(b);
|
|
37104
37104
|
})
|
|
@@ -37853,11 +37853,11 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37853
37853
|
() => i.value ? n.getFontHorizontalPadding : n.getFontHorizontalMargin
|
|
37854
37854
|
), v = L(
|
|
37855
37855
|
() => i.value ? n.getFontTopPadding : n.getFontTopMargin
|
|
37856
|
-
),
|
|
37856
|
+
), k = L(
|
|
37857
37857
|
() => i.value ? n.getFontRightPadding : n.getFontRightMargin
|
|
37858
37858
|
), T = L(
|
|
37859
37859
|
() => i.value ? n.getFontBottomPadding : n.getFontBottomMargin
|
|
37860
|
-
),
|
|
37860
|
+
), C = L(
|
|
37861
37861
|
() => i.value ? n.getFontLeftPadding : n.getFontLeftMargin
|
|
37862
37862
|
);
|
|
37863
37863
|
le(
|
|
@@ -37879,7 +37879,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37879
37879
|
},
|
|
37880
37880
|
{ immediate: !0 }
|
|
37881
37881
|
), le(
|
|
37882
|
-
|
|
37882
|
+
k,
|
|
37883
37883
|
async (V) => {
|
|
37884
37884
|
u.value = V, await r.initializeElementStyles();
|
|
37885
37885
|
},
|
|
@@ -37891,7 +37891,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
37891
37891
|
},
|
|
37892
37892
|
{ immediate: !0 }
|
|
37893
37893
|
), le(
|
|
37894
|
-
|
|
37894
|
+
C,
|
|
37895
37895
|
async (V) => {
|
|
37896
37896
|
m.value = V, await r.initializeElementStyles();
|
|
37897
37897
|
},
|
|
@@ -38682,21 +38682,21 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
38682
38682
|
s(P.id, { color: I });
|
|
38683
38683
|
}
|
|
38684
38684
|
const v = S(null);
|
|
38685
|
-
function
|
|
38685
|
+
function k(P) {
|
|
38686
38686
|
v.value = v.value === P ? null : P;
|
|
38687
38687
|
}
|
|
38688
38688
|
function T() {
|
|
38689
38689
|
v.value = null;
|
|
38690
38690
|
}
|
|
38691
|
-
const
|
|
38691
|
+
const C = S(!1);
|
|
38692
38692
|
function B() {
|
|
38693
|
-
|
|
38693
|
+
C.value = !0;
|
|
38694
38694
|
}
|
|
38695
38695
|
function A() {
|
|
38696
|
-
|
|
38696
|
+
C.value = !1;
|
|
38697
38697
|
}
|
|
38698
38698
|
function H() {
|
|
38699
|
-
l(), d.value = {},
|
|
38699
|
+
l(), d.value = {}, C.value = !1, t(e("Theme colors reset to defaults"), "success");
|
|
38700
38700
|
}
|
|
38701
38701
|
return (P, I) => (f(), w(re, null, [
|
|
38702
38702
|
p("div", {
|
|
@@ -38742,7 +38742,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
38742
38742
|
title: $.color,
|
|
38743
38743
|
class: "pbx-cursor-pointer pbx-border-0 pbx-p-0 pbx-bg-transparent pbx-block pbx-flex-shrink-0",
|
|
38744
38744
|
style: { width: "2rem", height: "2rem" },
|
|
38745
|
-
onClick: Te((M) =>
|
|
38745
|
+
onClick: Te((M) => k($.id), ["stop"])
|
|
38746
38746
|
}, [
|
|
38747
38747
|
p("span", {
|
|
38748
38748
|
style: He([{ backgroundColor: $.color }, { display: "block", width: "60%", height: "60%", "border-radius": "9999px", border: "1px solid rgba(0, 0, 0, 0.1)", "box-shadow": `0 1px 4px rgba(0, 0, 0, 0.1),
|
|
@@ -38787,7 +38787,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
38787
38787
|
])
|
|
38788
38788
|
], 2),
|
|
38789
38789
|
z(Kt, {
|
|
38790
|
-
showDynamicModalBuilder:
|
|
38790
|
+
showDynamicModalBuilder: C.value,
|
|
38791
38791
|
type: "delete",
|
|
38792
38792
|
gridColumnAmount: 2,
|
|
38793
38793
|
title: g(e)("Reset to provided defaults"),
|
|
@@ -39097,7 +39097,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
39097
39097
|
n.value = !0, await r.clearHtmlSelection(), await r.handleFormSubmission(), await et(500), i.value = !1, n.value = !1, t(e("All components removed"), "success");
|
|
39098
39098
|
};
|
|
39099
39099
|
};
|
|
39100
|
-
return (
|
|
39100
|
+
return (k, T) => (f(), w(re, null, [
|
|
39101
39101
|
z(ot, null, {
|
|
39102
39102
|
title: U(() => [
|
|
39103
39103
|
Ne(y(g(e)("Page layout")), 1)
|
|
@@ -39133,16 +39133,16 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
39133
39133
|
secondButtonText: u.value ?? void 0,
|
|
39134
39134
|
thirdButtonText: b.value ?? void 0,
|
|
39135
39135
|
onFirstModalButtonFunctionDynamicModalBuilder: T[0] || (T[0] = () => {
|
|
39136
|
-
var
|
|
39137
|
-
return (
|
|
39136
|
+
var C;
|
|
39137
|
+
return (C = m.value) == null ? void 0 : C.call(m);
|
|
39138
39138
|
}),
|
|
39139
39139
|
onSecondModalButtonFunctionDynamicModalBuilder: T[1] || (T[1] = () => {
|
|
39140
|
-
var
|
|
39141
|
-
return (
|
|
39140
|
+
var C;
|
|
39141
|
+
return (C = h.value) == null ? void 0 : C.call(h);
|
|
39142
39142
|
}),
|
|
39143
39143
|
onThirdModalButtonFunctionDynamicModalBuilder: T[2] || (T[2] = () => {
|
|
39144
|
-
var
|
|
39145
|
-
return (
|
|
39144
|
+
var C;
|
|
39145
|
+
return (C = x.value) == null ? void 0 : C.call(x);
|
|
39146
39146
|
})
|
|
39147
39147
|
}, {
|
|
39148
39148
|
default: U(() => [...T[5] || (T[5] = [
|
|
@@ -39221,7 +39221,7 @@ const pte = { class: "pbx-editorFieldGroup" }, cte = { class: "pbx-editorFieldGr
|
|
|
39221
39221
|
}
|
|
39222
39222
|
}), Ar = function(o) {
|
|
39223
39223
|
return !o || typeof o == "object" && o.constructor === Object && Object.keys(o).length === 0;
|
|
39224
|
-
}, Dre = "3.5.
|
|
39224
|
+
}, Dre = "3.5.46", Rre = (o) => /^[a-z][a-z0-9+.-]*:/i.test(o) || o.startsWith("//");
|
|
39225
39225
|
function kR(o, e) {
|
|
39226
39226
|
if (!o)
|
|
39227
39227
|
return console.warn("No valid pagebuilder element passed"), "";
|
|
@@ -39357,13 +39357,13 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
39357
39357
|
function v(N) {
|
|
39358
39358
|
return N ? N.tagName.toLowerCase() : "—";
|
|
39359
39359
|
}
|
|
39360
|
-
function
|
|
39360
|
+
function k(N) {
|
|
39361
39361
|
return N ? "object" : "—";
|
|
39362
39362
|
}
|
|
39363
39363
|
function T(N) {
|
|
39364
39364
|
return N.length ? `${e("array")} · ${N.length}` : e("array");
|
|
39365
39365
|
}
|
|
39366
|
-
const
|
|
39366
|
+
const C = L(() => [
|
|
39367
39367
|
{
|
|
39368
39368
|
label: e("Element type:"),
|
|
39369
39369
|
value: v(i.value),
|
|
@@ -39371,7 +39371,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
39371
39371
|
},
|
|
39372
39372
|
{
|
|
39373
39373
|
label: e("Component type:"),
|
|
39374
|
-
value:
|
|
39374
|
+
value: k(a.value),
|
|
39375
39375
|
tone: a.value ? "active" : "muted"
|
|
39376
39376
|
},
|
|
39377
39377
|
{
|
|
@@ -39416,7 +39416,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
39416
39416
|
p("div", qre, [
|
|
39417
39417
|
p("h4", Ure, y(g(e)("Types")), 1),
|
|
39418
39418
|
p("div", Wre, [
|
|
39419
|
-
(f(!0), w(re, null, ye(
|
|
39419
|
+
(f(!0), w(re, null, ye(C.value, (G) => (f(), w("div", {
|
|
39420
39420
|
key: G.label,
|
|
39421
39421
|
class: "pbx-inspectorRow"
|
|
39422
39422
|
}, [
|
|
@@ -39682,7 +39682,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
39682
39682
|
() => e.embeddedSection === "overviewConfig" || !e.embeddedSection && d.value === "overview"
|
|
39683
39683
|
), v = L(
|
|
39684
39684
|
() => e.embeddedSection === "download" || !e.embeddedSection && d.value === "download"
|
|
39685
|
-
),
|
|
39685
|
+
), k = L(
|
|
39686
39686
|
() => e.embeddedSection === "selectedHtml" || !e.embeddedSection && d.value === "viewHTMLConfig"
|
|
39687
39687
|
);
|
|
39688
39688
|
function T(B, A) {
|
|
@@ -39728,7 +39728,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
39728
39728
|
`, M = document.createElement("a");
|
|
39729
39729
|
M.setAttribute("href", "data:text/html;charset=utf-8," + encodeURIComponent($)), M.setAttribute("download", B), M.style.display = "none", document.body.appendChild(M), M.click(), document.body.removeChild(M);
|
|
39730
39730
|
}
|
|
39731
|
-
function
|
|
39731
|
+
function C() {
|
|
39732
39732
|
const B = document.getElementById("pagebuilder");
|
|
39733
39733
|
if (!B) return;
|
|
39734
39734
|
let A = kR(B);
|
|
@@ -40103,7 +40103,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40103
40103
|
)), 3),
|
|
40104
40104
|
p("div", hse, [
|
|
40105
40105
|
p("button", {
|
|
40106
|
-
onClick:
|
|
40106
|
+
onClick: C,
|
|
40107
40107
|
type: "button",
|
|
40108
40108
|
class: "pbx-myPrimaryButton"
|
|
40109
40109
|
}, [
|
|
@@ -40116,7 +40116,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40116
40116
|
)), 1)
|
|
40117
40117
|
]))
|
|
40118
40118
|
], 2)) : E("", !0),
|
|
40119
|
-
|
|
40119
|
+
k.value ? (f(), w("div", {
|
|
40120
40120
|
key: 3,
|
|
40121
40121
|
class: O(n.value ? "" : "pbx-min-h-screen pbx-mt-4")
|
|
40122
40122
|
}, [
|
|
@@ -40214,7 +40214,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40214
40214
|
}, Ose = /* @__PURE__ */ ae({
|
|
40215
40215
|
__name: "TypographyControl",
|
|
40216
40216
|
setup(o) {
|
|
40217
|
-
const { translate: e } = ke(), t = qe(), r = je, n = S(null), i = S(null), a = S(null), s = S(null), l = S(null), d = S(null), c = S(""), u = S(null), b = L(() => r.getElement), m = L(() => r.getFontBase), h = L(() => r.getFontDesktop), x = L(() => r.getFontTablet), v = L(() => r.getFontMobile),
|
|
40217
|
+
const { translate: e } = ke(), t = qe(), r = je, n = S(null), i = S(null), a = S(null), s = S(null), l = S(null), d = S(null), c = S(""), u = S(null), b = L(() => r.getElement), m = L(() => r.getFontBase), h = L(() => r.getFontDesktop), x = L(() => r.getFontTablet), v = L(() => r.getFontMobile), k = L(() => r.getFontWeight), T = L(() => r.getFontFamily), C = L(() => r.getFontStyle), B = L(() => r.getPageBuilderConfig), A = L(
|
|
40218
40218
|
() => {
|
|
40219
40219
|
var $;
|
|
40220
40220
|
return LD(($ = B.value) == null ? void 0 : $.userSettings);
|
|
@@ -40222,7 +40222,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40222
40222
|
), H = L(() => !!(d.value && d.value !== "none")), P = function() {
|
|
40223
40223
|
t.handleFontFamily(d.value == null ? "none" : d.value);
|
|
40224
40224
|
}, I = async () => {
|
|
40225
|
-
if (await
|
|
40225
|
+
if (await ce(), !(b.value instanceof HTMLElement)) {
|
|
40226
40226
|
c.value = "";
|
|
40227
40227
|
return;
|
|
40228
40228
|
}
|
|
@@ -40260,7 +40260,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40260
40260
|
},
|
|
40261
40261
|
{ immediate: !0 }
|
|
40262
40262
|
), le(
|
|
40263
|
-
|
|
40263
|
+
k,
|
|
40264
40264
|
async ($) => {
|
|
40265
40265
|
l.value = $, await t.initializeElementStyles();
|
|
40266
40266
|
},
|
|
@@ -40272,7 +40272,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40272
40272
|
},
|
|
40273
40273
|
{ immediate: !0 }
|
|
40274
40274
|
), le(b, I, { immediate: !0, flush: "post" }), le(
|
|
40275
|
-
|
|
40275
|
+
C,
|
|
40276
40276
|
async ($) => {
|
|
40277
40277
|
u.value = $, await t.initializeElementStyles();
|
|
40278
40278
|
},
|
|
@@ -40474,7 +40474,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40474
40474
|
le(
|
|
40475
40475
|
() => n.getElement,
|
|
40476
40476
|
(T) => {
|
|
40477
|
-
(T == null ? void 0 : T.tagName) === "IMG" && (i.value = "styles"),
|
|
40477
|
+
(T == null ? void 0 : T.tagName) === "IMG" && (i.value = "styles"), ce(() => {
|
|
40478
40478
|
c.value && (c.value.scrollTop = u);
|
|
40479
40479
|
});
|
|
40480
40480
|
}
|
|
@@ -40483,13 +40483,13 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40483
40483
|
c.value && (u = c.value.scrollTop);
|
|
40484
40484
|
}
|
|
40485
40485
|
function m(T) {
|
|
40486
|
-
i.value = T,
|
|
40486
|
+
i.value = T, ce(() => {
|
|
40487
40487
|
c.value && (c.value.scrollTop = 0, u = 0);
|
|
40488
40488
|
});
|
|
40489
40489
|
}
|
|
40490
40490
|
const h = S(!1), x = S(!1), v = async function() {
|
|
40491
40491
|
h.value = !0, x.value = !0, await et(200), n.setToggleGlobalHtmlMode(!0), await r.globalPageStyles(), x.value = !1;
|
|
40492
|
-
},
|
|
40492
|
+
}, k = async function() {
|
|
40493
40493
|
x.value = !0, await et(200);
|
|
40494
40494
|
try {
|
|
40495
40495
|
await r.handleManualSave(), t(e("Page saved successfully"), "success");
|
|
@@ -40500,15 +40500,15 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40500
40500
|
const T = document.querySelector("[data-pagebuilder-content]");
|
|
40501
40501
|
T && T.removeAttribute("data-global-selected"), h.value = !1, x.value = !1;
|
|
40502
40502
|
};
|
|
40503
|
-
return (T,
|
|
40503
|
+
return (T, C) => (f(), w(re, null, [
|
|
40504
40504
|
p("div", Sle, [
|
|
40505
40505
|
p("div", kle, [
|
|
40506
40506
|
p("button", {
|
|
40507
40507
|
type: "button",
|
|
40508
|
-
onClick:
|
|
40508
|
+
onClick: C[0] || (C[0] = (B) => T.$emit("closeEditor")),
|
|
40509
40509
|
"aria-label": g(e)("Close properties panel"),
|
|
40510
40510
|
class: "pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor hover:pbx-text-white focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
40511
|
-
}, [...
|
|
40511
|
+
}, [...C[4] || (C[4] = [
|
|
40512
40512
|
p("span", {
|
|
40513
40513
|
class: "material-symbols-outlined",
|
|
40514
40514
|
"aria-hidden": "true"
|
|
@@ -40537,7 +40537,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40537
40537
|
"pbx-rounded-lg pbx-py-2 pbx-text-sm pbx-font-medium pbx-transition-colors pbx-border-0 pbx-cursor-pointer pbx-font-sans",
|
|
40538
40538
|
i.value === "styles" ? "pbx-bg-myPrimaryLinkColor pbx-text-white pbx-shadow-sm" : "pbx-bg-transparent pbx-text-myPrimaryDarkGrayColor hover:pbx-bg-gray-50"
|
|
40539
40539
|
]),
|
|
40540
|
-
onClick:
|
|
40540
|
+
onClick: C[1] || (C[1] = (B) => m("styles"))
|
|
40541
40541
|
}, y(g(e)("Styles")), 11, Ele),
|
|
40542
40542
|
p("button", {
|
|
40543
40543
|
type: "button",
|
|
@@ -40547,7 +40547,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40547
40547
|
"pbx-rounded-lg pbx-py-2 pbx-text-sm pbx-font-medium pbx-transition-colors pbx-border-0 pbx-cursor-pointer pbx-font-sans",
|
|
40548
40548
|
i.value === "settings" ? "pbx-bg-myPrimaryLinkColor pbx-text-white pbx-shadow-sm" : "pbx-bg-transparent pbx-text-myPrimaryDarkGrayColor hover:pbx-bg-gray-50"
|
|
40549
40549
|
]),
|
|
40550
|
-
onClick:
|
|
40550
|
+
onClick: C[2] || (C[2] = (B) => m("settings"))
|
|
40551
40551
|
}, y(g(e)("Settings")), 11, Ale),
|
|
40552
40552
|
p("button", {
|
|
40553
40553
|
type: "button",
|
|
@@ -40557,7 +40557,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40557
40557
|
"pbx-rounded-lg pbx-py-2 pbx-text-sm pbx-font-medium pbx-transition-colors pbx-border-0 pbx-cursor-pointer pbx-font-sans",
|
|
40558
40558
|
i.value === "tools" ? "pbx-bg-myPrimaryLinkColor pbx-text-white pbx-shadow-sm" : "pbx-bg-transparent pbx-text-myPrimaryDarkGrayColor hover:pbx-bg-gray-50"
|
|
40559
40559
|
]),
|
|
40560
|
-
onClick:
|
|
40560
|
+
onClick: C[3] || (C[3] = (B) => m("tools"))
|
|
40561
40561
|
}, y(g(e)("Tools")), 11, $le)
|
|
40562
40562
|
], 8, Lle)
|
|
40563
40563
|
]),
|
|
@@ -40607,7 +40607,7 @@ const zre = ["title", "aria-label"], Ore = { class: "pbx-inspectorIdChipText" },
|
|
|
40607
40607
|
maxWidth: "5xl",
|
|
40608
40608
|
showModalBuilder: h.value,
|
|
40609
40609
|
title: g(e)("Page Design"),
|
|
40610
|
-
onCloseMainModalBuilder:
|
|
40610
|
+
onCloseMainModalBuilder: k,
|
|
40611
40611
|
minHeight: "",
|
|
40612
40612
|
maxHeight: ""
|
|
40613
40613
|
}, {
|
|
@@ -40720,13 +40720,13 @@ const CR = /* @__PURE__ */ Cn(Kle, [["render", Jle]]), Yle = { class: "pbx-text-
|
|
|
40720
40720
|
async function v() {
|
|
40721
40721
|
a.value++, await n.handleAutoSave();
|
|
40722
40722
|
}
|
|
40723
|
-
async function
|
|
40723
|
+
async function k(H) {
|
|
40724
40724
|
n.handleImageObjectFit(H), await v();
|
|
40725
40725
|
}
|
|
40726
40726
|
async function T(H) {
|
|
40727
40727
|
n.handleImageObjectPosition(H), await v();
|
|
40728
40728
|
}
|
|
40729
|
-
async function
|
|
40729
|
+
async function C(H) {
|
|
40730
40730
|
n.handleImageAspectRatio(H), await v();
|
|
40731
40731
|
}
|
|
40732
40732
|
async function B() {
|
|
@@ -40761,7 +40761,7 @@ const CR = /* @__PURE__ */ Cn(Kle, [["render", Jle]]), Yle = { class: "pbx-text-
|
|
|
40761
40761
|
"pbx-font-sans pbx-flex-1 pbx-rounded-xl pbx-border pbx-border-solid pbx-px-4 pbx-py-3 pbx-text-sm pbx-font-medium pbx-cursor-pointer pbx-transition-colors",
|
|
40762
40762
|
u.value === "pbx-object-cover" ? "pbx-border-myPrimaryLinkColor pbx-bg-myPrimaryLinkColor pbx-text-white" : "pbx-border-gray-200 pbx-bg-white pbx-text-gray-700 hover:pbx-border-gray-300"
|
|
40763
40763
|
]),
|
|
40764
|
-
onClick: P[0] || (P[0] = (I) =>
|
|
40764
|
+
onClick: P[0] || (P[0] = (I) => k("pbx-object-cover"))
|
|
40765
40765
|
}, y(g(t)("Cover")), 3),
|
|
40766
40766
|
p("button", {
|
|
40767
40767
|
type: "button",
|
|
@@ -40769,7 +40769,7 @@ const CR = /* @__PURE__ */ Cn(Kle, [["render", Jle]]), Yle = { class: "pbx-text-
|
|
|
40769
40769
|
"pbx-font-sans pbx-flex-1 pbx-rounded-xl pbx-border pbx-border-solid pbx-px-4 pbx-py-3 pbx-text-sm pbx-font-medium pbx-cursor-pointer pbx-transition-colors",
|
|
40770
40770
|
u.value === "pbx-object-contain" ? "pbx-border-myPrimaryLinkColor pbx-bg-myPrimaryLinkColor pbx-text-white" : "pbx-border-gray-200 pbx-bg-white pbx-text-gray-700 hover:pbx-border-gray-300"
|
|
40771
40771
|
]),
|
|
40772
|
-
onClick: P[1] || (P[1] = (I) =>
|
|
40772
|
+
onClick: P[1] || (P[1] = (I) => k("pbx-object-contain"))
|
|
40773
40773
|
}, y(g(t)("Contain")), 3)
|
|
40774
40774
|
]),
|
|
40775
40775
|
p("p", Xle, y(g(t)("Cover fills the frame and may crop. Contain shows the full image.")), 1)
|
|
@@ -40803,7 +40803,7 @@ const CR = /* @__PURE__ */ Cn(Kle, [["render", Jle]]), Yle = { class: "pbx-text-
|
|
|
40803
40803
|
"pbx-font-sans pbx-rounded-xl pbx-border pbx-border-solid pbx-px-3 pbx-py-2.5 pbx-text-sm pbx-font-medium pbx-cursor-pointer pbx-transition-colors",
|
|
40804
40804
|
m.value === I.id ? "pbx-border-myPrimaryLinkColor pbx-bg-myPrimaryLinkColor pbx-text-white" : "pbx-border-gray-200 pbx-bg-white pbx-text-gray-700 hover:pbx-border-gray-300"
|
|
40805
40805
|
]),
|
|
40806
|
-
onClick: ($) =>
|
|
40806
|
+
onClick: ($) => C(I.id)
|
|
40807
40807
|
}, y(g(t)(I.labelKey)), 11, ide)), 64))
|
|
40808
40808
|
])
|
|
40809
40809
|
]),
|
|
@@ -41267,8 +41267,8 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41267
41267
|
error: u,
|
|
41268
41268
|
closeHtmlEditor: b,
|
|
41269
41269
|
saveHtmlEditor: m
|
|
41270
|
-
} = td(), h = o, { translate: x, loadTranslations: v } = ke(), { showToast:
|
|
41271
|
-
Bo("pageBuilderStateStore",
|
|
41270
|
+
} = td(), h = o, { translate: x, loadTranslations: v } = ke(), { showToast: k } = wt(), T = hD, C = je;
|
|
41271
|
+
Bo("pageBuilderStateStore", C), Bo("internalPinia", T), Bo("CustomMediaComponent", h.CustomMediaLibraryComponent), Bo("DisplayProductsComponent", h.DisplayProducts), Bo("CustomBuilderComponents", h.CustomBuilderComponents);
|
|
41272
41272
|
const B = L(
|
|
41273
41273
|
() => !!h.DisplayProducts || h.enableDefaultProducts
|
|
41274
41274
|
), A = e, H = S(1), P = S(""), I = S(!1), $ = S(""), M = S(""), _ = S(""), K = S(null), N = S(null), F = S(null), G = S(null), V = S(null), Z = async function() {
|
|
@@ -41283,19 +41283,19 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41283
41283
|
}, se = function() {
|
|
41284
41284
|
I.value = !1, A("handleClosePageBuilder");
|
|
41285
41285
|
}, de = async function() {
|
|
41286
|
-
|
|
41286
|
+
C.setIsLoadingGlobal(!0);
|
|
41287
41287
|
try {
|
|
41288
|
-
await t.handleManualSave(),
|
|
41288
|
+
await t.handleManualSave(), k(x("Page saved successfully"), "success");
|
|
41289
41289
|
} catch {
|
|
41290
|
-
|
|
41290
|
+
k(x("Could not save page"), "error");
|
|
41291
41291
|
}
|
|
41292
|
-
|
|
41292
|
+
C.setIsLoadingGlobal(!1), A("handlePublishPageBuilder");
|
|
41293
41293
|
};
|
|
41294
41294
|
async function Q() {
|
|
41295
41295
|
try {
|
|
41296
|
-
await t.handleManualSave(),
|
|
41296
|
+
await t.handleManualSave(), k(x("Page saved successfully"), "success");
|
|
41297
41297
|
} catch {
|
|
41298
|
-
|
|
41298
|
+
k(x("Could not save page"), "error");
|
|
41299
41299
|
}
|
|
41300
41300
|
}
|
|
41301
41301
|
Bo("closeAddComponentModal", () => {
|
|
@@ -41311,15 +41311,15 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41311
41311
|
R.lang = j, localStorage.setItem("userSettingsPageBuilder", JSON.stringify(R)), bt.value = !1;
|
|
41312
41312
|
}
|
|
41313
41313
|
});
|
|
41314
|
-
const St = L(() =>
|
|
41314
|
+
const St = L(() => C.getBuilderStarted), Be = L(() => C.getPageBuilderConfig), ve = L(
|
|
41315
41315
|
() => {
|
|
41316
41316
|
var j;
|
|
41317
41317
|
return TD((j = Be.value) == null ? void 0 : j.userSettings);
|
|
41318
41318
|
}
|
|
41319
|
-
),
|
|
41319
|
+
), ue = L(() => {
|
|
41320
41320
|
var ge, Ht;
|
|
41321
|
-
|
|
41322
|
-
const j = (Ht = Be.value) == null ? void 0 : Ht.userSettings, R =
|
|
41321
|
+
C.getFontFamily, C.getToggleGlobalHtmlMode, (ge = C.getComponents) == null || ge.length;
|
|
41322
|
+
const j = (Ht = Be.value) == null ? void 0 : Ht.userSettings, R = C.getToggleGlobalHtmlMode, he = C.getFontFamily;
|
|
41323
41323
|
if (R && he && he !== "none")
|
|
41324
41324
|
return he;
|
|
41325
41325
|
const W = document.getElementById("pagebuilder"), Me = W ? PD(W, j) : void 0;
|
|
@@ -41329,11 +41329,11 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41329
41329
|
}) ? Me : ve.value;
|
|
41330
41330
|
}), ne = L(() => {
|
|
41331
41331
|
var he, W;
|
|
41332
|
-
|
|
41332
|
+
C.getFontFamily, C.getToggleGlobalHtmlMode, (he = C.getComponents) == null || he.length;
|
|
41333
41333
|
const j = (W = Be.value) == null ? void 0 : W.userSettings, R = document.getElementById("pagebuilder");
|
|
41334
41334
|
return Wp(R, j, {
|
|
41335
|
-
globalPageDesignMode:
|
|
41336
|
-
selectedFontClass:
|
|
41335
|
+
globalPageDesignMode: C.getToggleGlobalHtmlMode,
|
|
41336
|
+
selectedFontClass: C.getFontFamily
|
|
41337
41337
|
});
|
|
41338
41338
|
}), pe = L(
|
|
41339
41339
|
() => {
|
|
@@ -41365,12 +41365,12 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41365
41365
|
},
|
|
41366
41366
|
{ immediate: !0 }
|
|
41367
41367
|
);
|
|
41368
|
-
const Y = L(() =>
|
|
41368
|
+
const Y = L(() => C.getCurrentLanguage);
|
|
41369
41369
|
le(Y, (j) => {
|
|
41370
41370
|
j && j !== Ve.value && (Ve.value = j);
|
|
41371
41371
|
});
|
|
41372
|
-
const Qe = L(() =>
|
|
41373
|
-
localStorage.setItem("preview-font-class",
|
|
41372
|
+
const Qe = L(() => C.getMenuRight), te = S(!1), J = S(""), _e = S(""), De = function() {
|
|
41373
|
+
localStorage.setItem("preview-font-class", ue.value), localStorage.setItem(
|
|
41374
41374
|
"preview-element-fonts",
|
|
41375
41375
|
JSON.stringify(ne.value ? {} : ie.value)
|
|
41376
41376
|
);
|
|
@@ -41393,14 +41393,14 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41393
41393
|
ur.value = !1;
|
|
41394
41394
|
};
|
|
41395
41395
|
}, xo = S(!1), br = S(""), Tn = async function() {
|
|
41396
|
-
await t.clearHtmlSelection(),
|
|
41396
|
+
await t.clearHtmlSelection(), C.setAddComponentAddIndex(null), C.setComponentArrayAddMethod("unshift"), br.value = x("Add Products to Page"), xo.value = !0;
|
|
41397
41397
|
}, Pn = () => {
|
|
41398
41398
|
xo.value = !1;
|
|
41399
41399
|
}, mr = function(j) {
|
|
41400
|
-
|
|
41400
|
+
C.setAddComponentAddIndex(j), C.setComponentArrayAddMethod("insert"), Wr();
|
|
41401
41401
|
}, oo = async function(j) {
|
|
41402
|
-
await t.clearHtmlSelection(),
|
|
41403
|
-
}, mt = L(() =>
|
|
41402
|
+
await t.clearHtmlSelection(), C.setAddComponentAddIndex(j), C.setComponentArrayAddMethod("insert"), br.value = x("Add Products to Page"), xo.value = !0;
|
|
41403
|
+
}, mt = L(() => C.getElement), kt = L(() => C.getComponents), nd = L(() => C.getHasLocalDraftForUpdate);
|
|
41404
41404
|
le(nd, (j) => {
|
|
41405
41405
|
j && sd();
|
|
41406
41406
|
});
|
|
@@ -41417,23 +41417,23 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41417
41417
|
}, 200);
|
|
41418
41418
|
});
|
|
41419
41419
|
const fi = function(j) {
|
|
41420
|
-
|
|
41420
|
+
C.getInlineTipTapEditor || C.setComponent(j);
|
|
41421
41421
|
}, Fa = async function(j) {
|
|
41422
41422
|
await t.openInlineTipTapFromEvent(j);
|
|
41423
41423
|
}, yi = function(j) {
|
|
41424
|
-
if (!
|
|
41424
|
+
if (!C.getInlineTipTapEditor || !(j.target instanceof Node)) return;
|
|
41425
41425
|
const R = document.querySelector("#pagebuilder [data-pbx-inline-tiptap]"), he = R == null ? void 0 : R.querySelector(".ProseMirror"), W = j.target instanceof Element ? j.target.closest("[data-pbx-inline-editor-ui]") : null, Me = j.target instanceof Element ? j.target.closest("#pbx-modal") : null;
|
|
41426
41426
|
if (he != null && he.contains(j.target) || W || Me || BD(j.target)) return;
|
|
41427
41427
|
const ge = t.findEditableElementFromEventTarget(j.target);
|
|
41428
41428
|
j.preventDefault(), j.stopPropagation(), j.stopImmediatePropagation(), t.finishActiveInlineTipTapEditorFromDom(ge);
|
|
41429
|
-
}, vi = L(() =>
|
|
41429
|
+
}, vi = L(() => C.getIsLoadingGlobal), Mn = L(() => C.getIsSaving), wi = S(null), Gr = S(null), ad = L(() => C.getIsLoadingResumeEditing), Mo = L(() => C.getIsRestoring), jo = S(1), Kr = S(""), Jr = S(!1), ja = S(""), It = S(""), Ln = S(""), Si = S(null), ki = S(null), Vo = S(null), ho = S(null), Yr = S(null), sd = async function() {
|
|
41430
41430
|
Kr.value = "warning", Jr.value = !0, ja.value = x("Continue Your Work?"), It.value = x(
|
|
41431
41431
|
"We noticed you have some changes that weren’t saved last time. Would you like to pick up where you left off, or use the version that’s currently loaded from the database?"
|
|
41432
41432
|
), Ln.value = x("Use Saved Version"), Si.value = null, ki.value = x("Continue Where I Left Off"), Vo.value = async function() {
|
|
41433
|
-
|
|
41433
|
+
C.setHasLocalDraftForUpdate(!1), Jr.value = !1;
|
|
41434
41434
|
}, ho.value = function() {
|
|
41435
41435
|
}, Yr.value = async function() {
|
|
41436
|
-
await t.resumeEditingFromDraft(),
|
|
41436
|
+
await t.resumeEditingFromDraft(), C.setHasLocalDraftForUpdate(!1), Jr.value = !1;
|
|
41437
41437
|
};
|
|
41438
41438
|
}, ld = S(1), Va = S(""), gr = S(!1), En = S(""), xr = S(""), qo = S(""), ro = S(null), Ci = S(null), An = S(null), $n = S(null), hr = S(null), Uo = async function() {
|
|
41439
41439
|
await t.clearHtmlSelection(), Va.value = "success", gr.value = !0, En.value = x("Do you want to reset this page?"), xr.value = x(
|
|
@@ -41443,9 +41443,9 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41443
41443
|
}, $n.value = async function() {
|
|
41444
41444
|
}, hr.value = async function() {
|
|
41445
41445
|
try {
|
|
41446
|
-
await t.restoreOriginalContent(),
|
|
41446
|
+
await t.restoreOriginalContent(), k(x("Page restored to original version"), "success");
|
|
41447
41447
|
} catch {
|
|
41448
|
-
|
|
41448
|
+
k(x("Could not restore page"), "error");
|
|
41449
41449
|
}
|
|
41450
41450
|
gr.value = !1;
|
|
41451
41451
|
};
|
|
@@ -41459,9 +41459,9 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41459
41459
|
Lo.value = !1, t.setImageSettingsModalOpen(!1);
|
|
41460
41460
|
};
|
|
41461
41461
|
Zde({
|
|
41462
|
-
canUndo: () =>
|
|
41463
|
-
canRedo: () =>
|
|
41464
|
-
isBlocked: () => vi.value || bt.value ||
|
|
41462
|
+
canUndo: () => C.getHistoryIndex > 0,
|
|
41463
|
+
canRedo: () => C.getHistoryIndex < C.getHistoryLength - 1,
|
|
41464
|
+
isBlocked: () => vi.value || bt.value || C.getInlineTipTapEditor || ur.value || xo.value || I.value || Jr.value || gr.value || s.value || r.value || te.value || go.value || Lo.value,
|
|
41465
41465
|
onUndo: async () => {
|
|
41466
41466
|
var j;
|
|
41467
41467
|
await ((j = wi.value) == null ? void 0 : j.handleUndo());
|
|
@@ -41478,7 +41478,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41478
41478
|
var j;
|
|
41479
41479
|
(j = Gr.value) == null || j.openDeleteConfirm();
|
|
41480
41480
|
},
|
|
41481
|
-
hasSelection: () => !!
|
|
41481
|
+
hasSelection: () => !!C.getElement
|
|
41482
41482
|
});
|
|
41483
41483
|
const fr = function() {
|
|
41484
41484
|
St.value || (No.value = !0);
|
|
@@ -41559,14 +41559,14 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41559
41559
|
});
|
|
41560
41560
|
}
|
|
41561
41561
|
le(
|
|
41562
|
-
() =>
|
|
41562
|
+
() => C.getInlineTipTapEditor,
|
|
41563
41563
|
() => {
|
|
41564
|
-
|
|
41564
|
+
ce(we);
|
|
41565
41565
|
}
|
|
41566
41566
|
), le(mt, () => {
|
|
41567
|
-
|
|
41567
|
+
ce(we);
|
|
41568
41568
|
}), le(kt, () => {
|
|
41569
|
-
|
|
41569
|
+
ce(we);
|
|
41570
41570
|
});
|
|
41571
41571
|
const at = function() {
|
|
41572
41572
|
we();
|
|
@@ -41848,7 +41848,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41848
41848
|
"aria-label": g(x)("Add components"),
|
|
41849
41849
|
title: g(x)("Add components"),
|
|
41850
41850
|
onClick: R[14] || (R[14] = () => {
|
|
41851
|
-
g(
|
|
41851
|
+
g(C).setComponentArrayAddMethod("unshift"), Wr();
|
|
41852
41852
|
})
|
|
41853
41853
|
}, [
|
|
41854
41854
|
p("span", gpe, [
|
|
@@ -41875,7 +41875,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41875
41875
|
"aria-label": g(x)("Desktop preview"),
|
|
41876
41876
|
title: g(x)("Desktop preview"),
|
|
41877
41877
|
onClick: R[15] || (R[15] = async () => {
|
|
41878
|
-
g(
|
|
41878
|
+
g(C).setMenuRight(!1), g(C).setElement(null), await g(t).clearHtmlSelection(), Ut();
|
|
41879
41879
|
})
|
|
41880
41880
|
}, [
|
|
41881
41881
|
p("span", vpe, [
|
|
@@ -41896,7 +41896,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41896
41896
|
"aria-label": g(x)("Mobile preview"),
|
|
41897
41897
|
title: g(x)("Mobile preview"),
|
|
41898
41898
|
onClick: R[16] || (R[16] = async () => {
|
|
41899
|
-
g(
|
|
41899
|
+
g(C).setMenuRight(!1), g(C).setElement(null), await g(t).clearHtmlSelection(), xi();
|
|
41900
41900
|
})
|
|
41901
41901
|
}, [
|
|
41902
41902
|
p("span", kpe, [
|
|
@@ -41993,7 +41993,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
41993
41993
|
ref_key: "pageBuilderCanvas",
|
|
41994
41994
|
ref: _n,
|
|
41995
41995
|
"data-builder-canvas": "",
|
|
41996
|
-
class: O([
|
|
41996
|
+
class: O([ue.value, "pbx-text-black"]),
|
|
41997
41997
|
onDblclickCapture: Fa
|
|
41998
41998
|
}, [
|
|
41999
41999
|
Array.isArray(kt.value) && kt.value.length === 0 ? (f(), w("div", Ipe, [
|
|
@@ -42095,7 +42095,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
42095
42095
|
]])
|
|
42096
42096
|
}, [
|
|
42097
42097
|
z(zle, {
|
|
42098
|
-
onCloseEditor: R[27] || (R[27] = (W) => g(
|
|
42098
|
+
onCloseEditor: R[27] || (R[27] = (W) => g(C).setMenuRight(!1))
|
|
42099
42099
|
})
|
|
42100
42100
|
], 2)) : (f(), w("div", {
|
|
42101
42101
|
key: 1,
|
|
@@ -42118,7 +42118,7 @@ const ope = { class: "lg:pbx-min-w-full lg:pbx-max-w-full lg:pbx-w-full pbx-mx-a
|
|
|
42118
42118
|
}, [
|
|
42119
42119
|
Qe.value ? E("", !0) : (f(), w("button", {
|
|
42120
42120
|
key: 0,
|
|
42121
|
-
onClick: R[28] || (R[28] = (W) => g(
|
|
42121
|
+
onClick: R[28] || (R[28] = (W) => g(C).setMenuRight(!0)),
|
|
42122
42122
|
type: "button",
|
|
42123
42123
|
class: "pbx-h-10 pbx-w-10 pbx-cursor-pointer pbx-rounded-full pbx-flex pbx-items-center pbx-border-none pbx-justify-center pbx-bg-gray-50 pbx-aspect-square hover:pbx-bg-myPrimaryLinkColor focus-visible:pbx-ring-0 pbx-text-black hover:pbx-text-white"
|
|
42124
42124
|
}, [
|
|
@@ -42256,22 +42256,22 @@ function lce(o, e = {}, t = !1) {
|
|
|
42256
42256
|
const r = e.cardStyle ?? "minimal", n = e.roundedImages ?? !1, i = e.openInNewTab ?? !1, a = e.buttonStyle ?? "text", s = e.roundedButtons ?? !1, l = e.hidePrice ?? !1, d = e.hideImage ?? !1, c = e.hideButton ?? !1, u = sce(i), b = _l[r] ?? _l.minimal, m = [
|
|
42257
42257
|
iR(n),
|
|
42258
42258
|
d ? op : ""
|
|
42259
|
-
].filter(Boolean).join(" "), h = o.id != null ? String(o.id) : "", x = o.title ? ft(o.title) : "", v = o.description ? ft(o.description) : "",
|
|
42259
|
+
].filter(Boolean).join(" "), h = o.id != null ? String(o.id) : "", x = o.title ? ft(o.title) : "", v = o.description ? ft(o.description) : "", k = o.price != null ? ft(String(o.price)) : "", T = o.compareAtPrice != null ? ft(String(o.compareAtPrice)) : "", C = o.badge ? ft(o.badge) : "", B = o.image ? ft(o.image) : "", A = o.imageAlt ? ft(o.imageAlt) : x || "Product", H = o.url ? ft(o.url) : "", P = o.buttonText ? ft(o.buttonText) : "";
|
|
42260
42260
|
let I = "";
|
|
42261
42261
|
if (B) {
|
|
42262
42262
|
const V = `<img class="object-cover w-full object-top aspect-square " src="${B}" alt="${A}">`;
|
|
42263
42263
|
I = H ? `<div class="${m}" data-pb-no-inline-text><a href="${H}"${u}>${V}</a></div>` : `<div class="${m}" data-pb-no-inline-text>${V}</div>`;
|
|
42264
42264
|
}
|
|
42265
|
-
const $ =
|
|
42265
|
+
const $ = C ? `<div class="product-card-badge text-xs font-medium uppercase tracking-wide text-gray-500 pt-2"><p>${C}</p></div>` : t ? '<div class="product-card-badge text-xs font-medium uppercase tracking-wide text-gray-500 pt-2 min-h-6"></div>' : "", M = x ? `<div class="product-card-title text-lg font-semibold text-gray-900 pt-2 min-h-16">${H ? `<p><a href="${H}"${u}>${x}</a></p>` : `<p>${x}</p>`}</div>` : "", _ = v ? `<div class="product-card-description text-sm text-gray-600 pt-1"><p>${v}</p></div>` : "", K = Object.entries(o).filter(
|
|
42266
42266
|
([V, Z]) => !ace.has(V) && Z != null && String(Z).trim() !== ""
|
|
42267
42267
|
), N = K.length ? `<div class="product-card-custom-fields text-sm text-gray-600 pt-1">${K.map(([V, Z]) => `<div class="product-card-custom-field product-card-custom-field-${V.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}"><p><strong>${ft(V)}</strong>: ${ft(String(Z))}</p></div>`).join("")}</div>` : "";
|
|
42268
42268
|
let F = "";
|
|
42269
|
-
if (!!(
|
|
42269
|
+
if (!!(k || T || H && P)) {
|
|
42270
42270
|
let V = "";
|
|
42271
|
-
if (
|
|
42271
|
+
if (k || T) {
|
|
42272
42272
|
const de = [
|
|
42273
42273
|
T ? `<div class="product-card-compare text-sm line-through text-gray-400"><p>${T}</p></div>` : "",
|
|
42274
|
-
|
|
42274
|
+
k ? `<div class="product-card-price text-2xl font-semibold text-gray-900"><p>${k}</p></div>` : ""
|
|
42275
42275
|
].filter(Boolean);
|
|
42276
42276
|
V = `<div class="${[
|
|
42277
42277
|
"product-card-price-row flex flex-wrap items-baseline gap-2 pt-2",
|
|
@@ -42298,7 +42298,7 @@ function lce(o, e = {}, t = !1) {
|
|
|
42298
42298
|
}
|
|
42299
42299
|
function dce(o, e = "grid-3", t = "Products", r = {}) {
|
|
42300
42300
|
if (!o.length) return "";
|
|
42301
|
-
const n = o.map((
|
|
42301
|
+
const n = o.map((k) => k.id != null ? String(k.id) : "").filter(Boolean).join(","), i = r.mobileColumns === 2 ? 2 : 1, a = r.cardStyle ?? "minimal", s = r.roundedImages ?? !1, l = r.openInNewTab ?? !1, d = r.buttonStyle ?? "text", c = r.roundedButtons ?? !1, u = r.hidePrice ?? !1, b = r.hideImage ?? !1, m = r.hideButton ?? !1, h = o.some((k) => !!k.badge), x = o.map((k) => lce(k, r, h)).join(`
|
|
42302
42302
|
`), v = nR(e, i);
|
|
42303
42303
|
return `<section data-component-title="${ft(t)}" data-pbx-product-section="true" data-pbx-product-ids="${ft(n)}" data-pbx-product-layout="${ft(String(e))}" data-pbx-product-mobile-cols="${i}" data-pbx-product-card-style="${ft(a)}" data-pbx-product-rounded-images="${s ? "true" : "false"}" data-pbx-product-open-in-new-tab="${l ? "true" : "false"}" data-pbx-product-button-style="${ft(d)}" data-pbx-product-rounded-buttons="${c ? "true" : "false"}" data-pbx-product-hide-price="${u ? "true" : "false"}" data-pbx-product-hide-image="${b ? "true" : "false"}" data-pbx-product-hide-button="${m ? "true" : "false"}">
|
|
42304
42304
|
<div class="pbx-py-8 pbx-px-4"><div class="pbx-mx-auto pbx-max-w-7xl"><div class="${v}" data-pbx-product-grid="true">
|
|
@@ -42432,7 +42432,7 @@ class bce {
|
|
|
42432
42432
|
*/
|
|
42433
42433
|
Ae(this, "addListenersToEditableElements", async () => {
|
|
42434
42434
|
const e = document.querySelector("#pagebuilder");
|
|
42435
|
-
e && (await
|
|
42435
|
+
e && (await ce(), this.attachCanvasInlineEditListeners(e), e.querySelectorAll("section *").forEach((t) => {
|
|
42436
42436
|
if (this.isEditableElement(t)) {
|
|
42437
42437
|
const r = t;
|
|
42438
42438
|
if (this.elementsWithListeners.has(r)) {
|
|
@@ -42530,7 +42530,7 @@ class bce {
|
|
|
42530
42530
|
*/
|
|
42531
42531
|
Ae(this, "handleTextInput", async (e) => {
|
|
42532
42532
|
var t;
|
|
42533
|
-
typeof ((t = this.getElement.value) == null ? void 0 : t.innerHTML) == "string" && (typeof this.getElement.value.innerHTML == "string" && (await
|
|
42533
|
+
typeof ((t = this.getElement.value) == null ? void 0 : t.innerHTML) == "string" && (typeof this.getElement.value.innerHTML == "string" && (await ce(), this.getElement.value.textContent = e, this.pageBuilderStateStore.setTextAreaVueModel(this.getElement.value.innerHTML), this.getElement.value.innerHTML = e), this.ensureTextAreaHasContent());
|
|
42534
42534
|
});
|
|
42535
42535
|
this.hasStartedEditing = !1, this.pageBuilderStateStore = e;
|
|
42536
42536
|
const { translate: t } = ke();
|
|
@@ -42765,27 +42765,33 @@ class bce {
|
|
|
42765
42765
|
* @returns {Promise<StartBuilderResult>} A result object indicating success or failure.
|
|
42766
42766
|
*/
|
|
42767
42767
|
async startBuilder(e, t) {
|
|
42768
|
-
var d, c;
|
|
42769
|
-
const r = ++this.activeBuilderSessionToken, n = document.querySelector("#pagebuilder");
|
|
42770
|
-
|
|
42768
|
+
var d, c, u;
|
|
42769
|
+
const r = ++this.activeBuilderSessionToken, n = document.querySelector("#pagebuilder"), i = !!(n != null && n.querySelector("section[data-componentid]"));
|
|
42770
|
+
i || (this.hasCompletedBuilderMount = !1, this.builderMountPromise = null, this.pendingMountComponents = null, this.isPageBuilderMissingOnStart = !1), typeof this.pageBuilderStateStore.setInlineTipTapEditor == "function" && this.pageBuilderStateStore.setInlineTipTapEditor(!1), typeof this.pageBuilderStateStore.setShowModalTipTap == "function" && this.pageBuilderStateStore.setShowModalTipTap(!1), typeof this.pageBuilderStateStore.setImageSettingsPanelOpen == "function" && this.pageBuilderStateStore.setImageSettingsPanelOpen(!1), typeof this.pageBuilderStateStore.setElement == "function" && this.pageBuilderStateStore.setElement(null), typeof this.pageBuilderStateStore.setComponent == "function" && this.pageBuilderStateStore.setComponent(null), typeof this.pageBuilderStateStore.setIsLoadingGlobal == "function" && this.pageBuilderStateStore.setIsLoadingGlobal(!1), this.pageBuilderStateStore.setBuilderStarted(!0);
|
|
42771
42771
|
const a = document.querySelector("#pagebuilder"), s = this.readCurrentPageSettings();
|
|
42772
42772
|
this.hasMeaningfulPageSettings(s) && (this._lastKnownPageSettings = s);
|
|
42773
42773
|
let l;
|
|
42774
42774
|
try {
|
|
42775
42775
|
this.originalComponents = t, this.pageBuilderStateStore.setPageBuilderConfig(e);
|
|
42776
|
-
const
|
|
42777
|
-
!(
|
|
42778
|
-
const
|
|
42779
|
-
this.updateLocalStorageItemName(), this.initializeHistory(),
|
|
42780
|
-
|
|
42776
|
+
const b = JSON.parse(localStorage.getItem("userSettingsPageBuilder") ?? "null");
|
|
42777
|
+
!(b != null && b.lang) && ((c = (d = e.userSettings) == null ? void 0 : d.language) != null && c.default) && this.changeLanguage(e.userSettings.language.default), this.validateConfig(e), l = this.validateUserProvidedComponents(t);
|
|
42778
|
+
const m = Array.isArray(t) && t.length > 0 ? t : null, h = m !== null;
|
|
42779
|
+
if (this.updateLocalStorageItemName(), this.initializeHistory(), h && (this.savedMountComponents = m), a || (this.isPageBuilderMissingOnStart = !0), h && !a && (this.pendingMountComponents = m), a && (!t || Array.isArray(t)) && await this.completeBuilderInitializationWithSession(
|
|
42780
|
+
h ? m : void 0,
|
|
42781
42781
|
r
|
|
42782
|
-
), a && await this.addListenersToEditableElements()
|
|
42783
|
-
|
|
42782
|
+
), a && await this.addListenersToEditableElements(), i && a) {
|
|
42783
|
+
const v = ((u = this.pageBuilderStateStore.getPageBuilderConfig) == null ? void 0 : u.pageSettings) ?? null;
|
|
42784
|
+
if (this.hasMeaningfulPageSettings(v)) {
|
|
42785
|
+
const k = this.convertStyleObjectToString(v.style), T = a.getAttribute("style") || "";
|
|
42786
|
+
k.trim() && !T.trim() && (await ce(), this.applyPageSettingsToPage(v));
|
|
42787
|
+
}
|
|
42788
|
+
}
|
|
42789
|
+
const x = {
|
|
42784
42790
|
message: "Page builder started successfully."
|
|
42785
42791
|
};
|
|
42786
|
-
return l && (
|
|
42787
|
-
} catch (
|
|
42788
|
-
return console.error("Not able to start the Page Builder",
|
|
42792
|
+
return l && (x.validation = l), Array.isArray(t) && t.length >= 0 && (x.passedComponentsArray = t), x;
|
|
42793
|
+
} catch (b) {
|
|
42794
|
+
return console.error("Not able to start the Page Builder", b), {
|
|
42789
42795
|
error: !0,
|
|
42790
42796
|
reason: "Failed to start the Page Builder due to an unexpected error."
|
|
42791
42797
|
};
|
|
@@ -42964,7 +42970,7 @@ class bce {
|
|
|
42964
42970
|
*/
|
|
42965
42971
|
async clearClassesFromPage() {
|
|
42966
42972
|
const e = document.querySelector("#pagebuilder");
|
|
42967
|
-
e == null || e.removeAttribute("class"), this.initializeElementStyles(), await
|
|
42973
|
+
e == null || e.removeAttribute("class"), this.initializeElementStyles(), await ce();
|
|
42968
42974
|
}
|
|
42969
42975
|
/**
|
|
42970
42976
|
* Removes all inline styles from the main page builder container.
|
|
@@ -42972,7 +42978,7 @@ class bce {
|
|
|
42972
42978
|
*/
|
|
42973
42979
|
async clearInlineStylesFromPage() {
|
|
42974
42980
|
const e = document.querySelector("#pagebuilder");
|
|
42975
|
-
e == null || e.removeAttribute("style"), this.initializeElementStyles(), await
|
|
42981
|
+
e == null || e.removeAttribute("style"), this.initializeElementStyles(), await ce();
|
|
42976
42982
|
}
|
|
42977
42983
|
/**
|
|
42978
42984
|
* Selects the main page builder container for global styling.
|
|
@@ -42986,7 +42992,7 @@ class bce {
|
|
|
42986
42992
|
}), this.globalStylesObserver.observe(e, {
|
|
42987
42993
|
attributes: !0,
|
|
42988
42994
|
attributeFilter: ["class", "style", "data-meta-title", "data-meta-description"]
|
|
42989
|
-
}), await
|
|
42995
|
+
}), await ce());
|
|
42990
42996
|
}
|
|
42991
42997
|
/**
|
|
42992
42998
|
* Disconnects the MutationObserver that tracks global page style changes.
|
|
@@ -43069,7 +43075,7 @@ class bce {
|
|
|
43069
43075
|
* @returns {Promise<void>}
|
|
43070
43076
|
*/
|
|
43071
43077
|
async toggleTipTapModal(e) {
|
|
43072
|
-
this.pageBuilderStateStore.setShowModalTipTap(e), await
|
|
43078
|
+
this.pageBuilderStateStore.setShowModalTipTap(e), await ce(), await this.addListenersToEditableElements(), e || await this.handleAutoSave();
|
|
43073
43079
|
}
|
|
43074
43080
|
/**
|
|
43075
43081
|
* Toggles direct, in-canvas rich text editing for the selected element.
|
|
@@ -43077,7 +43083,7 @@ class bce {
|
|
|
43077
43083
|
* @returns {Promise<void>}
|
|
43078
43084
|
*/
|
|
43079
43085
|
async toggleInlineTipTapEditor(e) {
|
|
43080
|
-
e && !this.isValidTextElement(this.getElement.value) || (this.pageBuilderStateStore.setInlineTipTapEditor(e), await
|
|
43086
|
+
e && !this.isValidTextElement(this.getElement.value) || (this.pageBuilderStateStore.setInlineTipTapEditor(e), await ce(), await this.addListenersToEditableElements(), e || await this.handleAutoSave());
|
|
43081
43087
|
}
|
|
43082
43088
|
/**
|
|
43083
43089
|
* Restores normal builder selection after an inline TipTap editor has been torn down.
|
|
@@ -43086,13 +43092,13 @@ class bce {
|
|
|
43086
43092
|
* @returns {Promise<void>}
|
|
43087
43093
|
*/
|
|
43088
43094
|
async finishInlineTipTapEditor(e, t = !0) {
|
|
43089
|
-
if (this.pageBuilderStateStore.setInlineTipTapEditor(!1), await
|
|
43095
|
+
if (this.pageBuilderStateStore.setInlineTipTapEditor(!1), await ce(), e) {
|
|
43090
43096
|
const r = document.querySelector("#pagebuilder");
|
|
43091
43097
|
r == null || r.querySelectorAll("[hovered]").forEach((n) => n.removeAttribute("hovered")), r == null || r.querySelectorAll("[selected]").forEach((n) => {
|
|
43092
43098
|
n !== e && n.removeAttribute("selected");
|
|
43093
43099
|
}), e.removeAttribute("data-pbx-inline-tiptap"), e.setAttribute("selected", ""), this.pageBuilderStateStore.setElement(e);
|
|
43094
43100
|
}
|
|
43095
|
-
await
|
|
43101
|
+
await ce(), await this.addListenersToEditableElements(), await this.initializeElementStyles(), await this.addListenersToEditableElements(), t && await this.handleAutoSave();
|
|
43096
43102
|
}
|
|
43097
43103
|
/**
|
|
43098
43104
|
* Wraps an element in a div if it's an excluded tag and adjacent to an image.
|
|
@@ -43264,7 +43270,7 @@ class bce {
|
|
|
43264
43270
|
t.innerHTML = i, t.removeAttribute("data-pbx-inline-tiptap"), t.removeAttribute("data-pbx-inline-original-html"), this.pageBuilderStateStore.setTextAreaVueModel(i), this.pageBuilderStateStore.setElement(t), await this.finishInlineTipTapEditor(t), e && e !== t && await this.selectEditableElement(e);
|
|
43265
43271
|
}
|
|
43266
43272
|
async openInlineTipTapForElement(e) {
|
|
43267
|
-
this.isValidTextElement(e) && (await this.selectEditableElement(e, !1), await
|
|
43273
|
+
this.isValidTextElement(e) && (await this.selectEditableElement(e, !1), await ce(), await this.addListenersToEditableElements());
|
|
43268
43274
|
}
|
|
43269
43275
|
/**
|
|
43270
43276
|
* Selects an editable builder element and syncs builder state.
|
|
@@ -43277,7 +43283,7 @@ class bce {
|
|
|
43277
43283
|
if (!r) return;
|
|
43278
43284
|
this.pageBuilderStateStore.setMenuRight(!0);
|
|
43279
43285
|
const n = r.querySelector("[selected]");
|
|
43280
|
-
n && n.removeAttribute("selected"), e.removeAttribute("hovered"), e.setAttribute("selected", ""), this.pageBuilderStateStore.setElement(e), await
|
|
43286
|
+
n && n.removeAttribute("selected"), e.removeAttribute("hovered"), e.setAttribute("selected", ""), this.pageBuilderStateStore.setElement(e), await ce(), await this.initializeElementStyles(), t && await this.handleAutoSave();
|
|
43281
43287
|
}
|
|
43282
43288
|
getHistoryBaseKey() {
|
|
43283
43289
|
return this.getLocalStorageItemName.value;
|
|
@@ -43815,10 +43821,10 @@ class bce {
|
|
|
43815
43821
|
const e = this.findReverseableContainer();
|
|
43816
43822
|
if (!e) return;
|
|
43817
43823
|
const t = Array.from(e.children);
|
|
43818
|
-
t.length === 2 && (e.insertBefore(t[1], t[0]), await this.syncDomToStoreOnly(), await
|
|
43824
|
+
t.length === 2 && (e.insertBefore(t[1], t[0]), await this.syncDomToStoreOnly(), await ce(), this.saveDomComponentsToLocalStorage(), await this.handleAutoSave(), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.clearHtmlSelection(), await ce(), await this.addListenersToEditableElements());
|
|
43819
43825
|
}
|
|
43820
43826
|
async duplicateComponent() {
|
|
43821
|
-
await this.syncDomToStoreOnly(), await
|
|
43827
|
+
await this.syncDomToStoreOnly(), await ce();
|
|
43822
43828
|
const e = this.pageBuilderStateStore.getComponents, t = this.getComponent.value;
|
|
43823
43829
|
if (!e || !t) return;
|
|
43824
43830
|
const r = e.findIndex(
|
|
@@ -43830,14 +43836,14 @@ class bce {
|
|
|
43830
43836
|
n,
|
|
43831
43837
|
...e.slice(r + 1)
|
|
43832
43838
|
];
|
|
43833
|
-
await this.setComponentsPreservingPageSettings(i), await
|
|
43839
|
+
await this.setComponentsPreservingPageSettings(i), await ce(), await this.addListenersToEditableElements(), this.pageBuilderStateStore.setComponent(n), this.pageBuilderStateStore.setElement(null), await this.handleAutoSave();
|
|
43834
43840
|
}
|
|
43835
43841
|
/**
|
|
43836
43842
|
* Deletes the currently selected component from the DOM and the state.
|
|
43837
43843
|
* @returns {Promise<void>}
|
|
43838
43844
|
*/
|
|
43839
43845
|
async deleteComponentFromDOM() {
|
|
43840
|
-
await this.syncDomToStoreOnly(), await
|
|
43846
|
+
await this.syncDomToStoreOnly(), await ce();
|
|
43841
43847
|
const e = this.pageBuilderStateStore.getComponents;
|
|
43842
43848
|
if (!e) return;
|
|
43843
43849
|
const t = e.findIndex(
|
|
@@ -43849,7 +43855,7 @@ class bce {
|
|
|
43849
43855
|
...e.slice(0, t),
|
|
43850
43856
|
...e.slice(t + 1)
|
|
43851
43857
|
];
|
|
43852
|
-
await this.setComponentsPreservingPageSettings(r), await
|
|
43858
|
+
await this.setComponentsPreservingPageSettings(r), await ce(), await this.addListenersToEditableElements(), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.handleAutoSave();
|
|
43853
43859
|
}
|
|
43854
43860
|
/**
|
|
43855
43861
|
* Duplicates the currently selected element and inserts the copy immediately
|
|
@@ -43874,7 +43880,7 @@ class bce {
|
|
|
43874
43880
|
return;
|
|
43875
43881
|
}
|
|
43876
43882
|
const t = e.closest("section");
|
|
43877
|
-
e.tagName === "SECTION" ? await this.deleteComponentFromDOM() : (e.remove(), t && this.isSectionEmpty(t) && t.remove(), await this.syncDomToStoreOnly(), this.saveDomComponentsToLocalStorage()), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.clearHtmlSelection(), await
|
|
43883
|
+
e.tagName === "SECTION" ? await this.deleteComponentFromDOM() : (e.remove(), t && this.isSectionEmpty(t) && t.remove(), await this.syncDomToStoreOnly(), this.saveDomComponentsToLocalStorage()), this.pageBuilderStateStore.setComponent(null), this.pageBuilderStateStore.setElement(null), await this.clearHtmlSelection(), await ce(), await this.addListenersToEditableElements();
|
|
43878
43884
|
}
|
|
43879
43885
|
/**
|
|
43880
43886
|
* Removes a CSS class from the currently selected element.
|
|
@@ -43898,7 +43904,7 @@ class bce {
|
|
|
43898
43904
|
const n = r + e;
|
|
43899
43905
|
if (n < 0 || n >= this.getComponents.value.length)
|
|
43900
43906
|
return;
|
|
43901
|
-
this.getComponents.value.splice(r, 1), this.getComponents.value.splice(n, 0, t), await
|
|
43907
|
+
this.getComponents.value.splice(r, 1), this.getComponents.value.splice(n, 0, t), await ce();
|
|
43902
43908
|
const i = document.querySelector("#page-builder-wrapper"), a = i == null ? void 0 : i.querySelector(
|
|
43903
43909
|
`section[data-componentid="${t.id}"]`
|
|
43904
43910
|
);
|
|
@@ -44015,17 +44021,17 @@ class bce {
|
|
|
44015
44021
|
}), await this.setComponentsPreservingPageSettings(t);
|
|
44016
44022
|
}
|
|
44017
44023
|
async generateHtmlFromComponents() {
|
|
44018
|
-
await this.syncDomToStoreOnly(), await
|
|
44024
|
+
await this.syncDomToStoreOnly(), await ce();
|
|
44019
44025
|
const e = this.pageBuilderStateStore.getComponents;
|
|
44020
|
-
return Array.isArray(e) ? (await
|
|
44026
|
+
return Array.isArray(e) ? (await ce(), await this.addListenersToEditableElements(), e.map((t) => t.html_code.replace(/data-componentid="[^"]*"/g, "").replace(/\s{2,}/g, " ")).join(`
|
|
44021
44027
|
`)) : "";
|
|
44022
44028
|
}
|
|
44023
44029
|
async generateFullPageHtml() {
|
|
44024
|
-
await this.syncDomToStoreOnly(), await
|
|
44030
|
+
await this.syncDomToStoreOnly(), await ce();
|
|
44025
44031
|
const e = this.pageBuilderStateStore.getComponents;
|
|
44026
44032
|
if (!Array.isArray(e))
|
|
44027
44033
|
return "";
|
|
44028
|
-
await
|
|
44034
|
+
await ce(), await this.addListenersToEditableElements();
|
|
44029
44035
|
const t = this.readCurrentPageSettings() ?? this._lastKnownPageSettings, r = document.createElement("div");
|
|
44030
44036
|
if (r.setAttribute("id", "pagebuilder"), t != null && t.classes && r.setAttribute("class", t.classes), t != null && t.style) {
|
|
44031
44037
|
const n = typeof t.style == "string" ? t.style : this.convertStyleObjectToString(t.style) || "";
|
|
@@ -44082,8 +44088,8 @@ class bce {
|
|
|
44082
44088
|
let m = Zn.getHistory(a);
|
|
44083
44089
|
const h = m[m.length - 1];
|
|
44084
44090
|
if (h) {
|
|
44085
|
-
const x = JSON.stringify(h.components), v = JSON.stringify(i.components),
|
|
44086
|
-
if (x === v &&
|
|
44091
|
+
const x = JSON.stringify(h.components), v = JSON.stringify(i.components), k = JSON.stringify(h.pageSettings), T = JSON.stringify(i.pageSettings);
|
|
44092
|
+
if (x === v && k === T)
|
|
44087
44093
|
return;
|
|
44088
44094
|
}
|
|
44089
44095
|
this.pageBuilderStateStore.getHistoryIndex < m.length - 1 && (m = m.slice(0, this.pageBuilderStateStore.getHistoryIndex + 1)), m.push(i), m.length > 10 && (m = m.slice(m.length - 10)), localStorage.setItem(a + "-history", JSON.stringify(m)), this.pageBuilderStateStore.setHistoryIndex(m.length - 1), this.pageBuilderStateStore.setHistoryLength(m.length);
|
|
@@ -44097,7 +44103,7 @@ class bce {
|
|
|
44097
44103
|
* @private
|
|
44098
44104
|
*/
|
|
44099
44105
|
async removeCurrentComponentsFromLocalStorage() {
|
|
44100
|
-
this.updateLocalStorageItemName(), await
|
|
44106
|
+
this.updateLocalStorageItemName(), await ce();
|
|
44101
44107
|
const e = this.getLocalStorageItemName.value;
|
|
44102
44108
|
e && localStorage.removeItem(e);
|
|
44103
44109
|
}
|
|
@@ -44186,7 +44192,7 @@ class bce {
|
|
|
44186
44192
|
async setComponentsPreservingPageSettings(e) {
|
|
44187
44193
|
var n;
|
|
44188
44194
|
const t = this.readCurrentPageSettings() ?? this._lastKnownPageSettings ?? null, r = this.globalStylesObserver !== null;
|
|
44189
|
-
(n = this.globalStylesObserver) == null || n.disconnect(), this.pageBuilderStateStore.setComponents(e), await
|
|
44195
|
+
(n = this.globalStylesObserver) == null || n.disconnect(), this.pageBuilderStateStore.setComponents(e), await ce(), await ce(), t && (t.classes || t.style) && this.applyPageSettingsToPage(t), r && this.reconnectGlobalStylesObserver();
|
|
44190
44196
|
}
|
|
44191
44197
|
/**
|
|
44192
44198
|
* Parses a CSS style string into a key-value object.
|
|
@@ -44242,7 +44248,7 @@ class bce {
|
|
|
44242
44248
|
* Call this after programmatically inserting elements into the builder canvas.
|
|
44243
44249
|
*/
|
|
44244
44250
|
async refreshListeners() {
|
|
44245
|
-
await
|
|
44251
|
+
await ce(), await this.addListenersToEditableElements();
|
|
44246
44252
|
}
|
|
44247
44253
|
/**
|
|
44248
44254
|
* Resumes editing from a draft saved in local storage.
|
|
@@ -44251,7 +44257,7 @@ class bce {
|
|
|
44251
44257
|
async resumeEditingFromDraft() {
|
|
44252
44258
|
this.updateLocalStorageItemName();
|
|
44253
44259
|
const e = this.getSavedPageHtml();
|
|
44254
|
-
e && (this.pageBuilderStateStore.setIsLoadingResumeEditing(!0), await et(400), await this.mountComponentsToDOM(e), this.pageBuilderStateStore.setIsLoadingResumeEditing(!1)), await
|
|
44260
|
+
e && (this.pageBuilderStateStore.setIsLoadingResumeEditing(!0), await et(400), await this.mountComponentsToDOM(e), this.pageBuilderStateStore.setIsLoadingResumeEditing(!1)), await ce(), await this.addListenersToEditableElements(), this.pageBuilderStateStore.setIsLoadingResumeEditing(!1);
|
|
44255
44261
|
}
|
|
44256
44262
|
/**
|
|
44257
44263
|
* Restores the original content that was loaded when the builder started.
|
|
@@ -44263,10 +44269,10 @@ class bce {
|
|
|
44263
44269
|
const e = this.renderComponentsToHtml(this.originalComponents);
|
|
44264
44270
|
await this.mountComponentsToDOM(e), this.removeCurrentComponentsFromLocalStorage();
|
|
44265
44271
|
}
|
|
44266
|
-
await
|
|
44272
|
+
await ce(), await this.addListenersToEditableElements(), this.pageBuilderStateStore.setIsRestoring(!1);
|
|
44267
44273
|
}
|
|
44268
44274
|
async returnLatestComponents() {
|
|
44269
|
-
return await this.syncDomToStoreOnly(), await
|
|
44275
|
+
return await this.syncDomToStoreOnly(), await ce(), await this.addListenersToEditableElements(), this.pageBuilderStateStore.getComponents;
|
|
44270
44276
|
}
|
|
44271
44277
|
/**
|
|
44272
44278
|
* Gets the local storage key for the current resource.
|
|
@@ -44304,7 +44310,7 @@ ${s}
|
|
|
44304
44310
|
* @returns {Promise<void>}
|
|
44305
44311
|
*/
|
|
44306
44312
|
async applySelectedImage(e) {
|
|
44307
|
-
this.pageBuilderStateStore.setApplyImageToSelection(e), this.getElement.value && this.getApplyImageToSelection.value && this.getApplyImageToSelection.value.src && (await
|
|
44313
|
+
this.pageBuilderStateStore.setApplyImageToSelection(e), this.getElement.value && this.getApplyImageToSelection.value && this.getApplyImageToSelection.value.src && (await ce(), this.pageBuilderStateStore.setBasePrimaryImage(`${this.getApplyImageToSelection.value.src}`), await this.handleAutoSave());
|
|
44308
44314
|
}
|
|
44309
44315
|
/**
|
|
44310
44316
|
* Sets the base primary image from the currently selected element if it's an image.
|
|
@@ -44487,13 +44493,13 @@ ${s}
|
|
|
44487
44493
|
details: `Found ${v.length} image(s)`,
|
|
44488
44494
|
category: "Media"
|
|
44489
44495
|
});
|
|
44490
|
-
const
|
|
44496
|
+
const k = v.filter(
|
|
44491
44497
|
(A) => !A.getAttribute("alt") || A.getAttribute("alt").trim() === ""
|
|
44492
44498
|
);
|
|
44493
44499
|
i.push({
|
|
44494
44500
|
check: "All images have alt text",
|
|
44495
|
-
passed: v.length === 0 ||
|
|
44496
|
-
details: v.length === 0 ? "No images found" :
|
|
44501
|
+
passed: v.length === 0 || k.length === 0,
|
|
44502
|
+
details: v.length === 0 ? "No images found" : k.length === 0 ? `All ${v.length} image(s) have alt text` : `${k.length} of ${v.length} image(s) are missing alt text`,
|
|
44497
44503
|
category: "Media"
|
|
44498
44504
|
});
|
|
44499
44505
|
const T = [...n.querySelectorAll("a[href]")].filter(
|
|
@@ -44505,9 +44511,9 @@ ${s}
|
|
|
44505
44511
|
details: `Found ${T.length} link(s)`,
|
|
44506
44512
|
category: "Links"
|
|
44507
44513
|
});
|
|
44508
|
-
const
|
|
44514
|
+
const C = i.filter((A) => A.passed).length;
|
|
44509
44515
|
return {
|
|
44510
|
-
score: Math.round(
|
|
44516
|
+
score: Math.round(C / i.length * 100),
|
|
44511
44517
|
checks: i
|
|
44512
44518
|
};
|
|
44513
44519
|
}
|
|
@@ -44528,26 +44534,26 @@ ${s}
|
|
|
44528
44534
|
let i = t;
|
|
44529
44535
|
if (this.getComponentArrayAddMethod.value === "insert" && typeof t == "number" && t >= 0) {
|
|
44530
44536
|
const s = this.readCurrentPageSettings() ?? this._lastKnownPageSettings;
|
|
44531
|
-
(r = this.globalStylesObserver) == null || r.disconnect(), await this.syncDomToStoreOnly(), await
|
|
44537
|
+
(r = this.globalStylesObserver) == null || r.disconnect(), await this.syncDomToStoreOnly(), await ce();
|
|
44532
44538
|
const l = this.pageBuilderStateStore.getComponents || [], d = [
|
|
44533
44539
|
...l.slice(0, t),
|
|
44534
44540
|
n,
|
|
44535
44541
|
...l.slice(t)
|
|
44536
44542
|
];
|
|
44537
|
-
this.pageBuilderStateStore.setComponents(d), i = t, await
|
|
44543
|
+
this.pageBuilderStateStore.setComponents(d), i = t, await ce(), await ce(), s && (s.classes || s.style) && this.applyPageSettingsToPage(s), this.globalStylesObserver !== null && this.reconnectGlobalStylesObserver();
|
|
44538
44544
|
} else {
|
|
44539
44545
|
const s = this.readCurrentPageSettings() ?? this._lastKnownPageSettings;
|
|
44540
44546
|
this.pageBuilderStateStore.setPushComponents({
|
|
44541
44547
|
component: n,
|
|
44542
44548
|
componentArrayAddMethod: this.getComponentArrayAddMethod.value ? this.getComponentArrayAddMethod.value : "push"
|
|
44543
|
-
}), s && (s.classes || s.style) && (await
|
|
44549
|
+
}), s && (s.classes || s.style) && (await ce(), await ce(), this.applyPageSettingsToPage(s));
|
|
44544
44550
|
}
|
|
44545
44551
|
const a = document.querySelector("#page-builder-wrapper");
|
|
44546
44552
|
if (a && (this.getComponentArrayAddMethod.value === "push" && a.scrollTo({
|
|
44547
44553
|
top: a.scrollHeight + 50,
|
|
44548
44554
|
behavior: "smooth"
|
|
44549
44555
|
}), this.getComponentArrayAddMethod.value === "insert" && typeof i == "number")) {
|
|
44550
|
-
this.saveDomComponentsToLocalStorage(), await
|
|
44556
|
+
this.saveDomComponentsToLocalStorage(), await ce(), await ce();
|
|
44551
44557
|
const s = a.querySelectorAll("section[data-componentid]");
|
|
44552
44558
|
if (s.length > 0) {
|
|
44553
44559
|
const l = Math.max(0, Math.min(i, s.length - 1)), d = s[l];
|
|
@@ -44557,7 +44563,7 @@ ${s}
|
|
|
44557
44563
|
});
|
|
44558
44564
|
}
|
|
44559
44565
|
}
|
|
44560
|
-
await
|
|
44566
|
+
await ce(), await this.addListenersToEditableElements(), await this.handleAutoSave();
|
|
44561
44567
|
} catch (n) {
|
|
44562
44568
|
console.error("Error adding component:", n);
|
|
44563
44569
|
} finally {
|
|
@@ -44710,7 +44716,7 @@ ${s}
|
|
|
44710
44716
|
if (!r)
|
|
44711
44717
|
return this.translate("Could not parse element from HTML string.");
|
|
44712
44718
|
const n = this.pageBuilderStateStore.getElement;
|
|
44713
|
-
return n && n.parentElement && (n.replaceWith(r), this.pageBuilderStateStore.setElement(r)), await this.addListenersToEditableElements(), await
|
|
44719
|
+
return n && n.parentElement && (n.replaceWith(r), this.pageBuilderStateStore.setElement(r)), await this.addListenersToEditableElements(), await ce(), null;
|
|
44714
44720
|
}
|
|
44715
44721
|
validateMountingHTML(e, t) {
|
|
44716
44722
|
const r = e.trim(), n = e.match(/<section\b[^>]*>/gi) || [], i = e.match(/<\/section>/gi) || [];
|
|
@@ -44756,7 +44762,7 @@ ${s}
|
|
|
44756
44762
|
return i;
|
|
44757
44763
|
}
|
|
44758
44764
|
const n = this.validateMountingHTML(t);
|
|
44759
|
-
return n || (await this.mountComponentsToDOM(t), await this.addListenersToEditableElements(), await
|
|
44765
|
+
return n || (await this.mountComponentsToDOM(t), await this.addListenersToEditableElements(), await ce(), null);
|
|
44760
44766
|
}
|
|
44761
44767
|
/**
|
|
44762
44768
|
* Mounts builder components to the DOM from an HTML string.
|
|
@@ -44781,8 +44787,8 @@ ${s}
|
|
|
44781
44787
|
let u = null;
|
|
44782
44788
|
const b = this.readCurrentPageSettings();
|
|
44783
44789
|
if (t) {
|
|
44784
|
-
const x = ((a = this.pageBuilderStateStore.getPageBuilderConfig) == null ? void 0 : a.pageSettings) ?? null, v = this._lastKnownPageSettings,
|
|
44785
|
-
u = this.hasMeaningfulPageSettings(x) ? x : this.hasMeaningfulPageSettings(v) ? v : this.hasMeaningfulPageSettings(
|
|
44790
|
+
const x = ((a = this.pageBuilderStateStore.getPageBuilderConfig) == null ? void 0 : a.pageSettings) ?? null, v = this._lastKnownPageSettings, k = b;
|
|
44791
|
+
u = this.hasMeaningfulPageSettings(x) ? x : this.hasMeaningfulPageSettings(v) ? v : this.hasMeaningfulPageSettings(k) ? k : null;
|
|
44786
44792
|
}
|
|
44787
44793
|
if (!t && !r && !u && c && this.isPageBuilderMissingOnStart && (u = {
|
|
44788
44794
|
classes: c.className || "",
|
|
@@ -44799,33 +44805,33 @@ ${s}
|
|
|
44799
44805
|
!r && u && (this._pendingPageSettings = u), r && (this._pendingPageSettings = r);
|
|
44800
44806
|
const m = d.querySelectorAll("section"), h = [];
|
|
44801
44807
|
if (m.forEach((x) => {
|
|
44802
|
-
x.querySelectorAll("[class]").forEach((
|
|
44803
|
-
|
|
44808
|
+
x.querySelectorAll("[class]").forEach((C) => {
|
|
44809
|
+
C.setAttribute(
|
|
44804
44810
|
"class",
|
|
44805
|
-
this.addTailwindPrefixToClasses(
|
|
44811
|
+
this.addTailwindPrefixToClasses(C.getAttribute("class") || "", "pbx-")
|
|
44806
44812
|
);
|
|
44807
44813
|
});
|
|
44808
44814
|
const v = x;
|
|
44809
44815
|
v.hasAttribute("data-componentid") || v.setAttribute("data-componentid", um());
|
|
44810
|
-
const
|
|
44816
|
+
const k = v.getAttribute("data-componentid"), T = v.getAttribute("data-component-title") || "Untitled Component";
|
|
44811
44817
|
v.setAttribute("data-component-title", T), h.push({
|
|
44812
44818
|
html_code: v.outerHTML,
|
|
44813
|
-
id:
|
|
44819
|
+
id: k,
|
|
44814
44820
|
title: T
|
|
44815
44821
|
});
|
|
44816
|
-
}), this.pageBuilderStateStore.setComponents(h), await this.clearHtmlSelection(), await
|
|
44822
|
+
}), this.pageBuilderStateStore.setComponents(h), await this.clearHtmlSelection(), await ce(), this._pendingPageSettings) {
|
|
44817
44823
|
const x = this._pendingPageSettings;
|
|
44818
44824
|
this._pendingPageSettings = null;
|
|
44819
|
-
const v = document.querySelector("#pagebuilder"),
|
|
44825
|
+
const v = document.querySelector("#pagebuilder"), k = {
|
|
44820
44826
|
classes: x.classes || "",
|
|
44821
44827
|
style: this.convertStyleObjectToString(x.style) || "",
|
|
44822
44828
|
meta: Ji(x)
|
|
44823
44829
|
};
|
|
44824
|
-
v ? this.applyPageSettingsToPage(
|
|
44830
|
+
v ? this.applyPageSettingsToPage(k) : this._lastKnownPageSettings = k;
|
|
44825
44831
|
}
|
|
44826
44832
|
await this.addListenersToEditableElements();
|
|
44827
44833
|
} catch (l) {
|
|
44828
|
-
console.error("Error parsing HTML components:", l), this.deleteAllComponentsFromDOM(), await this.clearHtmlSelection(), await
|
|
44834
|
+
console.error("Error parsing HTML components:", l), this.deleteAllComponentsFromDOM(), await this.clearHtmlSelection(), await ce(), await this.addListenersToEditableElements();
|
|
44829
44835
|
}
|
|
44830
44836
|
}
|
|
44831
44837
|
updateLocalStorageItemName() {
|
|
@@ -44897,7 +44903,7 @@ ${s}
|
|
|
44897
44903
|
* Initializes the styles for the currently selected element.
|
|
44898
44904
|
*/
|
|
44899
44905
|
async initializeElementStyles() {
|
|
44900
|
-
await
|
|
44906
|
+
await ce(), this.setBasePrimaryImageFromSelectedElement(), this.handleHyperlink(void 0, null, !1), this.handleOpacity(void 0), this.handleBackgroundOpacity(void 0), this.handleBackgroundColor(void 0), this.handleTextColor(void 0), this.handleBorderStyle(void 0), this.handleBorderWidth(void 0), this.handleBorderColor(void 0), this.handleBorderRadiusGlobal(void 0), this.handleBorderRadiusTopLeft(void 0), this.handleBorderRadiusTopRight(void 0), this.handleBorderRadiusBottomleft(void 0), this.handleBorderRadiusBottomRight(void 0), this.handleFontSizeBase(void 0), this.handleFontSizeDesktop(void 0), this.handleFontSizeTablet(void 0), this.handleFontSizeMobile(void 0), this.handleFontWeight(void 0), this.handleFontFamily(void 0), this.handleFontStyle(void 0), this.handleVerticalPadding(void 0), this.handleHorizontalPadding(void 0), this.handleTopPadding(void 0), this.handleRightPadding(void 0), this.handleBottomPadding(void 0), this.handleLeftPadding(void 0), this.handleVerticalMargin(void 0), this.handleHorizontalMargin(void 0), this.handleTopMargin(void 0), this.handleRightMargin(void 0), this.handleBottomMargin(void 0), this.handleLeftMargin(void 0), this.isSelectedElementImage() && (this.handleImageObjectFit(void 0), this.handleImageObjectPosition(void 0), this.handleImageAspectRatio(void 0)), await this.syncCurrentClasses(), await this.syncCurrentStyles();
|
|
44901
44907
|
}
|
|
44902
44908
|
}
|
|
44903
44909
|
const Mce = {
|