@templatical/editor 0.8.4 → 0.8.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CnRXeK77.js → AiChatSidebar-uhkhnXQd.js} +1 -1
- package/dist/{AiFeatureMenu-BYDDrpj6.js → AiFeatureMenu-DXNKvXP5.js} +1 -1
- package/dist/{CloudEditor-B9a_K6Cm.js → CloudEditor-BSkPQjwo.js} +6 -6
- package/dist/{CollaboratorBar-HN4whzM-.js → CollaboratorBar-CP76Sh6c.js} +1 -1
- package/dist/{DesignReferenceSidebar-0GwjUn2V.js → DesignReferenceSidebar-CfJqJ7l6.js} +1 -1
- package/dist/{ModuleBrowserModal-DPZBsvqk.js → ModuleBrowserModal-BFQTm6uY.js} +4 -4
- package/dist/{ModulePreviewCanvas-CK4j11-e.js → ModulePreviewCanvas-DeqMpo73.js} +1 -1
- package/dist/{ParagraphEditor-DBus_iHH.js → ParagraphEditor-DqomSbW3.js} +13 -13
- package/dist/{SaveModuleDialog-DORRSbBo.js → SaveModuleDialog-DKcpPeWd.js} +2 -2
- package/dist/{SnapshotHistory-DTMVEk03.js → SnapshotHistory-Z9RQj53S.js} +1 -1
- package/dist/{TestEmailModal-DJmYp0Qi.js → TestEmailModal-C8DhylO1.js} +2 -2
- package/dist/{TitleEditor-70d9AF1V.js → TitleEditor-CgLrn6R3.js} +5 -5
- package/dist/{TplModal-BEfwlvPC.js → TplModal-CbwRwmR3.js} +1 -1
- package/dist/{blockTypeIcons-2DRoPa3K.js → blockTypeIcons-CccKujXP.js} +1 -1
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js → AiFeatureMenu-ChNv7XXj.js} +2 -2
- package/dist/cdn/chunks/{AiFeatureMenu-CcuKnisc.js.map → AiFeatureMenu-ChNv7XXj.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js → BlockIssueBadge-BovmWgok.js} +2 -2
- package/dist/cdn/chunks/{BlockIssueBadge-Sr3is7Wr.js.map → BlockIssueBadge-BovmWgok.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js → CloudEditor-CHF_P5OL.js} +7 -7
- package/dist/cdn/chunks/{CloudEditor-Bi10d2Gq.js.map → CloudEditor-CHF_P5OL.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js → CollaboratorBar-Bjr5YSh0.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-C0zeecvl.js.map → CollaboratorBar-Bjr5YSh0.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js → CountdownBlock-KyzvhjMF.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-CpSUUDDs.js.map → CountdownBlock-KyzvhjMF.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js → CountdownToolbar-bJtMHGYz.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-BBzdR-00.js.map → CountdownToolbar-bJtMHGYz.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js → IssuesPanel-DFSYTQXy.js} +3 -3
- package/dist/cdn/chunks/{IssuesPanel-Bthq6qoZ.js.map → IssuesPanel-DFSYTQXy.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-CFMd6M7E.js → ModuleBrowserModal-DS0BGRhZ.js} +5 -5
- package/dist/cdn/chunks/{ModuleBrowserModal-CFMd6M7E.js.map → ModuleBrowserModal-DS0BGRhZ.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js → ModulePreviewCanvas-Dwn2cA5a.js} +2 -2
- package/dist/cdn/chunks/{ModulePreviewCanvas-BkcPcF5C.js.map → ModulePreviewCanvas-Dwn2cA5a.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js → NumberWithSuffix-BNBeHv0P.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C2hH_ZIK.js.map → NumberWithSuffix-BNBeHv0P.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-BIWXLPfu.js → ParagraphEditor-C4TrTIOm.js} +16 -16
- package/dist/cdn/chunks/{ParagraphEditor-BIWXLPfu.js.map → ParagraphEditor-C4TrTIOm.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js → RichTextEditorContent-HNFFL4aK.js} +2 -2
- package/dist/cdn/chunks/{RichTextEditorContent-DU0gc4bi.js.map → RichTextEditorContent-HNFFL4aK.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-DR9EZlWe.js → SaveModuleDialog-CbHqqeID.js} +2 -2
- package/dist/cdn/chunks/{SaveModuleDialog-DR9EZlWe.js.map → SaveModuleDialog-CbHqqeID.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DZcx2N4R.js → TitleEditor-gr-eBUq_.js} +8 -8
- package/dist/cdn/chunks/{TitleEditor-DZcx2N4R.js.map → TitleEditor-gr-eBUq_.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js → blockTypeIcons-BUlgu9JL.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-eVGGIdne.js.map → blockTypeIcons-BUlgu9JL.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-CvCoOuWB.js → extensions-DK_lVs7A.js} +3 -3
- package/dist/cdn/chunks/{extensions-CvCoOuWB.js.map → extensions-DK_lVs7A.js.map} +1 -1
- package/dist/cdn/chunks/{features-CUYy5kZQ.js → features-LiilsBqW.js} +806 -773
- package/dist/cdn/chunks/features-LiilsBqW.js.map +1 -0
- package/dist/cdn/chunks/{icons-C4zY5-I3.js → icons-Bn2SIR30.js} +2 -2
- package/dist/cdn/chunks/{icons-C4zY5-I3.js.map → icons-Bn2SIR30.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-BNt3msId.js → media-library-Bb2PavAd.js} +3 -3
- package/dist/cdn/chunks/{media-library-BNt3msId.js.map → media-library-Bb2PavAd.js.map} +1 -1
- package/dist/cdn/chunks/{quality-BTPRPGB-.js → quality-Bpj6kNxR.js} +180 -154
- package/dist/cdn/chunks/{quality-BTPRPGB-.js.map → quality-Bpj6kNxR.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js → renderer-CYYyu-Di.js} +130 -96
- package/dist/cdn/chunks/{renderer-IOmuuZjJ.js.map → renderer-CYYyu-Di.js.map} +1 -1
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js → src-CQjZnxvw.js} +4 -4
- package/dist/cdn/chunks/{src-Dp0ZFQ4-.js.map → src-CQjZnxvw.js.map} +1 -1
- package/dist/cdn/chunks/{styles-DtgjgsBH.js → styles-5g8XOS68.js} +8 -8
- package/dist/cdn/chunks/{styles-DtgjgsBH.js.map → styles-5g8XOS68.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BErAJEvo.js → tiptap-BBbH3IT9.js} +849 -725
- package/dist/cdn/chunks/tiptap-BBbH3IT9.js.map +1 -0
- package/dist/cdn/editor.js +5 -5
- package/dist/{cloud-Dz8Ay2FM.js → cloud-VxYMtfXC.js} +1 -1
- package/dist/{dist-BygsE-n3.js → dist-BDgf2G-V.js} +453 -314
- package/dist/{dist-BtDBsF3N.js → dist-BxP6TB0l.js} +2 -2
- package/dist/{dist-DWhP3Dp2.js → dist-BzuC8o3y.js} +1209 -1217
- package/dist/{dist-v-O2Subd.js → dist-C0jo8wtG.js} +2 -2
- package/dist/{dist-BTgujVMy.js → dist-C8wMh_gi.js} +2 -2
- package/dist/{dist-Cipw2HFH.js → dist-CIV3Brg-.js} +37 -4
- package/dist/{dist-BS5Oi67L.js → dist-CUpJmrjt.js} +2 -2
- package/dist/dist-D5lmdi1F.js +5 -0
- package/dist/{dist-T-ORzNfM.js → dist-D8C6jIXM.js} +168 -175
- package/dist/dist-DILjuzSv.js +5 -0
- package/dist/{dist-CDtcJMB2.js → dist-DXaxGLsw.js} +33 -33
- package/dist/{dist-DnGTaPRX.js → dist-DYO-w_Jf.js} +2 -2
- package/dist/{dist-CDZCyoRy.js → dist-UK-lbEBc.js} +2 -2
- package/dist/{extensions-BmGiz8Oo.js → extensions-DeNHyWwh.js} +27 -27
- package/dist/{styles-DFeOGKa_.js → styles-Bgqv7rLA.js} +4 -4
- package/dist/templatical-editor.js +3 -3
- package/dist/{useEditorCore-BXz-UXPd.js → useEditorCore-CaOVDL_m.js} +4 -4
- package/dist/{useMergeTag-CS2bmWA0.js → useMergeTag-RWsgUcSh.js} +1 -1
- package/package.json +21 -21
- package/dist/cdn/chunks/features-CUYy5kZQ.js.map +0 -1
- package/dist/cdn/chunks/tiptap-BErAJEvo.js.map +0 -1
- package/dist/dist-BySzGkeC.js +0 -5
- package/dist/dist-D7JUZ2Kd.js +0 -5
|
@@ -374,7 +374,7 @@ function mt(e, t) {
|
|
|
374
374
|
return n ? n.label : e;
|
|
375
375
|
}
|
|
376
376
|
function ht(e, t) {
|
|
377
|
-
return e
|
|
377
|
+
return bt(e, "data-merge-tag", (e) => mt(e, t));
|
|
378
378
|
}
|
|
379
379
|
function gt(e, t) {
|
|
380
380
|
if (!e) return !1;
|
|
@@ -389,11 +389,44 @@ function vt(e, t) {
|
|
|
389
389
|
return r && r[1] ? r[1].toUpperCase() : e;
|
|
390
390
|
}
|
|
391
391
|
function yt(e, t) {
|
|
392
|
-
return e
|
|
392
|
+
return bt(e, "data-logic-merge-tag", (e) => vt(e, t));
|
|
393
|
+
}
|
|
394
|
+
function bt(e, t, n) {
|
|
395
|
+
let r = RegExp(`(?:^|\\s)${t}="([^"<>]*)"`), i = "", a = 0;
|
|
396
|
+
for (; a < e.length;) {
|
|
397
|
+
let t = e.indexOf("<span", a);
|
|
398
|
+
if (t === -1) {
|
|
399
|
+
i += e.substring(a);
|
|
400
|
+
break;
|
|
401
|
+
}
|
|
402
|
+
let o = e[t + 5];
|
|
403
|
+
if (o !== ">" && o !== " " && o !== " " && o !== "\n" && o !== "\r" && o !== "/") {
|
|
404
|
+
i += e.substring(a, t + 5), a = t + 5;
|
|
405
|
+
continue;
|
|
406
|
+
}
|
|
407
|
+
let s = e.indexOf(">", t + 5);
|
|
408
|
+
if (s === -1) {
|
|
409
|
+
i += e.substring(a);
|
|
410
|
+
break;
|
|
411
|
+
}
|
|
412
|
+
let c = e.indexOf("</span>", s + 1);
|
|
413
|
+
if (c === -1) {
|
|
414
|
+
i += e.substring(a);
|
|
415
|
+
break;
|
|
416
|
+
}
|
|
417
|
+
let l = e.substring(t + 5, s), u = r.exec(l);
|
|
418
|
+
if (!u) {
|
|
419
|
+
i += e.substring(a, t + 5), a = t + 5;
|
|
420
|
+
continue;
|
|
421
|
+
}
|
|
422
|
+
let d = u[1], f = n(d);
|
|
423
|
+
i += e.substring(a, s + 1), i += f, i += "</span>", a = c + 7;
|
|
424
|
+
}
|
|
425
|
+
return i;
|
|
393
426
|
}
|
|
394
427
|
//#endregion
|
|
395
428
|
//#region ../types/src/config.ts
|
|
396
|
-
var
|
|
429
|
+
var xt = class extends Error {
|
|
397
430
|
statusCode;
|
|
398
431
|
constructor(e, t) {
|
|
399
432
|
super(e), this.statusCode = t, this.name = "SdkError";
|
|
@@ -410,10 +443,10 @@ var bt = class extends Error {
|
|
|
410
443
|
};
|
|
411
444
|
//#endregion
|
|
412
445
|
//#region ../core/src/editor.ts
|
|
413
|
-
function
|
|
446
|
+
function St(e) {
|
|
414
447
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
415
448
|
}
|
|
416
|
-
function
|
|
449
|
+
function Ct(e) {
|
|
417
450
|
let t = S({
|
|
418
451
|
content: e.content ?? He(e.defaultFontFamily, e.templateDefaults),
|
|
419
452
|
selectedBlockId: null,
|
|
@@ -503,7 +536,7 @@ function St(e) {
|
|
|
503
536
|
if (s(n)) return;
|
|
504
537
|
let o = i(t.content.blocks, n);
|
|
505
538
|
if (o && o.type === "section") {
|
|
506
|
-
if (r < 0 || r >=
|
|
539
|
+
if (r < 0 || r >= St(o.columns)) return;
|
|
507
540
|
o.children[r] = o.children[r] || [];
|
|
508
541
|
let t = o.children[r];
|
|
509
542
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -535,7 +568,7 @@ function St(e) {
|
|
|
535
568
|
let u;
|
|
536
569
|
if (r) {
|
|
537
570
|
let e = i(t.content.blocks, r);
|
|
538
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
571
|
+
if (!e || e.type !== "section" || a < 0 || a >= St(e.columns)) return;
|
|
539
572
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
540
573
|
} else u = t.content.blocks;
|
|
541
574
|
let [d] = c.blocks.splice(l, 1);
|
|
@@ -566,9 +599,9 @@ function St(e) {
|
|
|
566
599
|
}
|
|
567
600
|
//#endregion
|
|
568
601
|
//#region ../core/src/history.ts
|
|
569
|
-
var
|
|
570
|
-
function
|
|
571
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
602
|
+
var wt = 50, Tt = 300, Et = 1500;
|
|
603
|
+
function Dt(e) {
|
|
604
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = wt } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
|
|
572
605
|
function f() {
|
|
573
606
|
let e = /* @__PURE__ */ new WeakSet();
|
|
574
607
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -593,21 +626,21 @@ function Et(e) {
|
|
|
593
626
|
if (l && l.blockId === e) {
|
|
594
627
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
595
628
|
l = null;
|
|
596
|
-
},
|
|
629
|
+
}, Tt);
|
|
597
630
|
return;
|
|
598
631
|
}
|
|
599
632
|
m(), p(f()), o.value = [], l = {
|
|
600
633
|
blockId: e,
|
|
601
634
|
timeoutId: setTimeout(() => {
|
|
602
635
|
l = null;
|
|
603
|
-
},
|
|
636
|
+
}, Tt)
|
|
604
637
|
};
|
|
605
638
|
}
|
|
606
639
|
}
|
|
607
640
|
function _() {
|
|
608
641
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
609
642
|
s.value = !1, c = null;
|
|
610
|
-
},
|
|
643
|
+
}, Et);
|
|
611
644
|
}
|
|
612
645
|
function v() {
|
|
613
646
|
if (a.value.length === 0) return;
|
|
@@ -641,7 +674,7 @@ function Et(e) {
|
|
|
641
674
|
}
|
|
642
675
|
//#endregion
|
|
643
676
|
//#region ../core/src/block-actions.ts
|
|
644
|
-
function
|
|
677
|
+
function Ot(e) {
|
|
645
678
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
646
679
|
...e,
|
|
647
680
|
id: G(),
|
|
@@ -657,7 +690,7 @@ function Dt(e) {
|
|
|
657
690
|
id: G()
|
|
658
691
|
})));
|
|
659
692
|
}
|
|
660
|
-
function
|
|
693
|
+
function kt(e) {
|
|
661
694
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
662
695
|
function o(n, r, a) {
|
|
663
696
|
let o = ot(n, e.blockDefaults);
|
|
@@ -665,9 +698,9 @@ function Ot(e) {
|
|
|
665
698
|
}
|
|
666
699
|
function s(e, n, r) {
|
|
667
700
|
let o = JSON.parse(JSON.stringify(e));
|
|
668
|
-
if (o.id = G(),
|
|
701
|
+
if (o.id = G(), Ot(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
669
702
|
let t = JSON.parse(JSON.stringify(e));
|
|
670
|
-
return t.id = G(),
|
|
703
|
+
return t.id = G(), Ot(t), t;
|
|
671
704
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
672
705
|
else {
|
|
673
706
|
let i = a?.(e.id) ?? null;
|
|
@@ -690,7 +723,7 @@ function Ot(e) {
|
|
|
690
723
|
}
|
|
691
724
|
//#endregion
|
|
692
725
|
//#region ../core/src/auto-save.ts
|
|
693
|
-
function
|
|
726
|
+
function At(e) {
|
|
694
727
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
695
728
|
function c() {
|
|
696
729
|
return typeof a == "function" ? a() : a;
|
|
@@ -728,7 +761,7 @@ function kt(e) {
|
|
|
728
761
|
}
|
|
729
762
|
//#endregion
|
|
730
763
|
//#region ../core/src/condition-preview.ts
|
|
731
|
-
function
|
|
764
|
+
function jt(e) {
|
|
732
765
|
let t = S(/* @__PURE__ */ new Set()), n = y(() => t.size > 0);
|
|
733
766
|
function r(e) {
|
|
734
767
|
return t.has(e);
|
|
@@ -748,7 +781,7 @@ function At(e) {
|
|
|
748
781
|
}
|
|
749
782
|
//#endregion
|
|
750
783
|
//#region ../core/src/data-source-fetch.ts
|
|
751
|
-
function
|
|
784
|
+
function Mt(e) {
|
|
752
785
|
let t = C(!1), n = C(!1), r = y(() => !!e.definition.value?.dataSource), i = y(() => r.value && !e.block.value.dataSourceFetched);
|
|
753
786
|
async function a() {
|
|
754
787
|
let r = e.definition.value;
|
|
@@ -780,7 +813,7 @@ function jt(e) {
|
|
|
780
813
|
}
|
|
781
814
|
//#endregion
|
|
782
815
|
//#region ../core/src/history-interceptor.ts
|
|
783
|
-
function
|
|
816
|
+
function Nt(e, t) {
|
|
784
817
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
785
818
|
e.addBlock = (r, i, a, o) => {
|
|
786
819
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -796,10 +829,10 @@ function Mt(e, t) {
|
|
|
796
829
|
}
|
|
797
830
|
//#endregion
|
|
798
831
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
799
|
-
function
|
|
832
|
+
function Pt(e, t) {
|
|
800
833
|
return s() ? (l(e, t), !0) : !1;
|
|
801
834
|
}
|
|
802
|
-
function
|
|
835
|
+
function Ft() {
|
|
803
836
|
let e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
804
837
|
e.delete(t);
|
|
805
838
|
};
|
|
@@ -807,7 +840,7 @@ function Pt() {
|
|
|
807
840
|
on: (n) => {
|
|
808
841
|
e.add(n);
|
|
809
842
|
let r = () => t(n);
|
|
810
|
-
return
|
|
843
|
+
return Pt(r), { off: r };
|
|
811
844
|
},
|
|
812
845
|
off: t,
|
|
813
846
|
trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
|
|
@@ -816,18 +849,18 @@ function Pt() {
|
|
|
816
849
|
}
|
|
817
850
|
};
|
|
818
851
|
}
|
|
819
|
-
var
|
|
852
|
+
var It = /* @__PURE__ */ new WeakMap(), Lt = (...e) => {
|
|
820
853
|
let t = e[0], n = _()?.proxy ?? s();
|
|
821
854
|
if (n == null && !ce()) throw Error("injectLocal must be called in setup");
|
|
822
|
-
return n &&
|
|
823
|
-
},
|
|
855
|
+
return n && It.has(n) && t in It.get(n) ? It.get(n)[t] : v(...e);
|
|
856
|
+
}, Rt = typeof window < "u" && typeof document < "u";
|
|
824
857
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
825
|
-
var
|
|
826
|
-
function
|
|
858
|
+
var zt = (e) => e != null, Bt = Object.prototype.toString, Vt = (e) => Bt.call(e) === "[object Object]", Ht = () => {}, Ut = (e, t) => Object.hasOwn(e, t), Wt = /* @__PURE__ */ Gt();
|
|
859
|
+
function Gt() {
|
|
827
860
|
var e, t;
|
|
828
|
-
return
|
|
861
|
+
return Rt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
829
862
|
}
|
|
830
|
-
function
|
|
863
|
+
function Kt(e, t) {
|
|
831
864
|
function n(...n) {
|
|
832
865
|
return new Promise((r, i) => {
|
|
833
866
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -839,10 +872,10 @@ function Gt(e, t) {
|
|
|
839
872
|
}
|
|
840
873
|
return n;
|
|
841
874
|
}
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
let n, r, i =
|
|
845
|
-
clearTimeout(e), i(), i =
|
|
875
|
+
var qt = (e) => e();
|
|
876
|
+
function Jt(e, t = {}) {
|
|
877
|
+
let n, r, i = Ht, a = (e) => {
|
|
878
|
+
clearTimeout(e), i(), i = Ht;
|
|
846
879
|
}, o;
|
|
847
880
|
return (s) => {
|
|
848
881
|
let c = F(e), l = F(t.maxWait);
|
|
@@ -855,7 +888,7 @@ function qt(e, t = {}) {
|
|
|
855
888
|
});
|
|
856
889
|
};
|
|
857
890
|
}
|
|
858
|
-
function
|
|
891
|
+
function Yt(e) {
|
|
859
892
|
let t;
|
|
860
893
|
function n() {
|
|
861
894
|
return t ||= e(), t;
|
|
@@ -865,26 +898,26 @@ function Jt(e) {
|
|
|
865
898
|
t = void 0, e && await e;
|
|
866
899
|
}, n;
|
|
867
900
|
}
|
|
868
|
-
function
|
|
901
|
+
function Xt(e) {
|
|
869
902
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
870
903
|
}
|
|
871
|
-
function
|
|
904
|
+
function Zt(e) {
|
|
872
905
|
return Array.isArray(e) ? e : [e];
|
|
873
906
|
}
|
|
874
|
-
function
|
|
907
|
+
function Qt(e) {
|
|
875
908
|
return e || _();
|
|
876
909
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
910
|
+
function $t(e, t = 200, n = {}) {
|
|
911
|
+
return Kt(Jt(t, n), e);
|
|
879
912
|
}
|
|
880
|
-
function
|
|
881
|
-
let { eventFilter: r =
|
|
882
|
-
return U(e,
|
|
913
|
+
function en(e, t, n = {}) {
|
|
914
|
+
let { eventFilter: r = qt, ...i } = n;
|
|
915
|
+
return U(e, Kt(r, t), i);
|
|
883
916
|
}
|
|
884
|
-
function
|
|
885
|
-
|
|
917
|
+
function tn(e, t = !0, n) {
|
|
918
|
+
Qt(n) ? r(e, n) : t ? e() : m(e);
|
|
886
919
|
}
|
|
887
|
-
function
|
|
920
|
+
function nn(e, t = 1e3, r = {}) {
|
|
888
921
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = null, s = n(!1);
|
|
889
922
|
function c() {
|
|
890
923
|
o &&= (clearInterval(o), null);
|
|
@@ -896,15 +929,15 @@ function tn(e, t = 1e3, r = {}) {
|
|
|
896
929
|
let n = F(t);
|
|
897
930
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
898
931
|
}
|
|
899
|
-
return i &&
|
|
900
|
-
s.value &&
|
|
901
|
-
})),
|
|
932
|
+
return i && Rt && d(), (u(t) || typeof t == "function") && Pt(U(t, () => {
|
|
933
|
+
s.value && Rt && d();
|
|
934
|
+
})), Pt(l), {
|
|
902
935
|
isActive: g(s),
|
|
903
936
|
pause: l,
|
|
904
937
|
resume: d
|
|
905
938
|
};
|
|
906
939
|
}
|
|
907
|
-
function
|
|
940
|
+
function rn(e, t, r = {}) {
|
|
908
941
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = n(!1), s;
|
|
909
942
|
function c() {
|
|
910
943
|
s &&= (clearTimeout(s), void 0);
|
|
@@ -917,13 +950,13 @@ function nn(e, t, r = {}) {
|
|
|
917
950
|
o.value = !1, s = void 0, e(...n);
|
|
918
951
|
}, F(t));
|
|
919
952
|
}
|
|
920
|
-
return i && (o.value = !0,
|
|
953
|
+
return i && (o.value = !0, Rt && u()), Pt(l), {
|
|
921
954
|
isPending: g(o),
|
|
922
955
|
start: u,
|
|
923
956
|
stop: l
|
|
924
957
|
};
|
|
925
958
|
}
|
|
926
|
-
function
|
|
959
|
+
function an(e = !1, t = {}) {
|
|
927
960
|
let { truthyValue: r = !0, falsyValue: i = !1 } = t, a = u(e), o = n(e);
|
|
928
961
|
function s(e) {
|
|
929
962
|
if (arguments.length) return o.value = e, o.value;
|
|
@@ -934,14 +967,14 @@ function rn(e = !1, t = {}) {
|
|
|
934
967
|
}
|
|
935
968
|
return a ? s : [o, s];
|
|
936
969
|
}
|
|
937
|
-
function
|
|
970
|
+
function on(e, t, n = {}) {
|
|
938
971
|
let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
|
|
939
|
-
return
|
|
972
|
+
return en(e, t, {
|
|
940
973
|
...a,
|
|
941
|
-
eventFilter:
|
|
974
|
+
eventFilter: Jt(r, { maxWait: i })
|
|
942
975
|
});
|
|
943
976
|
}
|
|
944
|
-
function
|
|
977
|
+
function sn(e, t, n) {
|
|
945
978
|
return U(e, t, {
|
|
946
979
|
...n,
|
|
947
980
|
immediate: !0
|
|
@@ -949,41 +982,41 @@ function on(e, t, n) {
|
|
|
949
982
|
}
|
|
950
983
|
//#endregion
|
|
951
984
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
952
|
-
var
|
|
985
|
+
var cn = Rt ? window : void 0, ln = Rt ? window.document : void 0, un = Rt ? window.navigator : void 0;
|
|
953
986
|
function q(e) {
|
|
954
987
|
let t = F(e);
|
|
955
988
|
return t?.$el ?? t;
|
|
956
989
|
}
|
|
957
990
|
function J(...e) {
|
|
958
991
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = k(() => {
|
|
959
|
-
let t =
|
|
992
|
+
let t = Zt(F(e[0])).filter((e) => e != null);
|
|
960
993
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
961
994
|
});
|
|
962
|
-
return
|
|
963
|
-
n.value?.map((e) => q(e)) ?? [
|
|
964
|
-
|
|
965
|
-
|
|
995
|
+
return sn(() => [
|
|
996
|
+
n.value?.map((e) => q(e)) ?? [cn].filter((e) => e != null),
|
|
997
|
+
Zt(F(n.value ? e[1] : e[0])),
|
|
998
|
+
Zt(M(n.value ? e[2] : e[1])),
|
|
966
999
|
F(n.value ? e[3] : e[2])
|
|
967
1000
|
], ([e, n, r, i], a, o) => {
|
|
968
1001
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
969
|
-
let s =
|
|
1002
|
+
let s = Vt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
970
1003
|
o(() => {
|
|
971
1004
|
c.forEach((e) => e());
|
|
972
1005
|
});
|
|
973
1006
|
}, { flush: "post" });
|
|
974
1007
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
let { window: r =
|
|
1008
|
+
var dn = !1;
|
|
1009
|
+
function fn(e, t, n = {}) {
|
|
1010
|
+
let { window: r = cn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
978
1011
|
if (!r) return s ? {
|
|
979
|
-
stop:
|
|
980
|
-
cancel:
|
|
981
|
-
trigger:
|
|
982
|
-
} :
|
|
983
|
-
if (
|
|
984
|
-
|
|
1012
|
+
stop: Ht,
|
|
1013
|
+
cancel: Ht,
|
|
1014
|
+
trigger: Ht
|
|
1015
|
+
} : Ht;
|
|
1016
|
+
if (Wt && !dn) {
|
|
1017
|
+
dn = !0;
|
|
985
1018
|
let e = { passive: !0 };
|
|
986
|
-
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click",
|
|
1019
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Ht, e)), r.document.documentElement.addEventListener("click", Ht, e);
|
|
987
1020
|
}
|
|
988
1021
|
let c = !0, l = (e) => F(i).some((t) => {
|
|
989
1022
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
@@ -1040,21 +1073,21 @@ function dn(e, t, n = {}) {
|
|
|
1040
1073
|
}
|
|
1041
1074
|
} : h;
|
|
1042
1075
|
}
|
|
1043
|
-
function
|
|
1076
|
+
function pn() {
|
|
1044
1077
|
let e = n(!1), t = _();
|
|
1045
1078
|
return t && r(() => {
|
|
1046
1079
|
e.value = !0;
|
|
1047
1080
|
}, t), e;
|
|
1048
1081
|
}
|
|
1049
1082
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1083
|
+
function mn(e) {
|
|
1084
|
+
return pn(), k(() => !!e());
|
|
1052
1085
|
}
|
|
1053
|
-
function
|
|
1054
|
-
let { window: r =
|
|
1086
|
+
function hn(e, t, n = {}) {
|
|
1087
|
+
let { window: r = cn, ...i } = n, a, o = /* @__PURE__ */ mn(() => r && "MutationObserver" in r), s = () => {
|
|
1055
1088
|
a &&= (a.disconnect(), void 0);
|
|
1056
1089
|
}, c = U(k(() => {
|
|
1057
|
-
let t =
|
|
1090
|
+
let t = Zt(F(e)).map(q).filter(zt);
|
|
1058
1091
|
return new Set(t);
|
|
1059
1092
|
}), (e) => {
|
|
1060
1093
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1064,25 +1097,25 @@ function mn(e, t, n = {}) {
|
|
|
1064
1097
|
}), l = () => a?.takeRecords(), u = () => {
|
|
1065
1098
|
c(), s();
|
|
1066
1099
|
};
|
|
1067
|
-
return
|
|
1100
|
+
return Pt(u), {
|
|
1068
1101
|
isSupported: o,
|
|
1069
1102
|
stop: u,
|
|
1070
1103
|
takeRecords: l
|
|
1071
1104
|
};
|
|
1072
1105
|
}
|
|
1073
|
-
var
|
|
1106
|
+
var gn = Symbol("vueuse-ssr-width");
|
|
1074
1107
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1075
|
-
function
|
|
1076
|
-
let e = ce() ?
|
|
1108
|
+
function _n() {
|
|
1109
|
+
let e = ce() ? Lt(gn, null) : null;
|
|
1077
1110
|
return typeof e == "number" ? e : void 0;
|
|
1078
1111
|
}
|
|
1079
|
-
function
|
|
1080
|
-
let { window: r =
|
|
1112
|
+
function vn(e, t = {}) {
|
|
1113
|
+
let { window: r = cn, ssrWidth: a = /* @__PURE__ */ _n() } = t, o = /* @__PURE__ */ mn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1081
1114
|
return i(() => {
|
|
1082
1115
|
if (s.value) {
|
|
1083
1116
|
s.value = !o.value, l.value = F(e).split(",").some((e) => {
|
|
1084
1117
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
|
|
1085
|
-
return n && i && (i = a >=
|
|
1118
|
+
return n && i && (i = a >= Xt(n[1])), r && i && (i = a <= Xt(r[1])), t ? !i : i;
|
|
1086
1119
|
});
|
|
1087
1120
|
return;
|
|
1088
1121
|
}
|
|
@@ -1091,12 +1124,12 @@ function _n(e, t = {}) {
|
|
|
1091
1124
|
l.value = e.matches;
|
|
1092
1125
|
}, { passive: !0 }), k(() => l.value);
|
|
1093
1126
|
}
|
|
1094
|
-
function
|
|
1095
|
-
let { controls: r = !1, navigator: i =
|
|
1127
|
+
function yn(e, t = {}) {
|
|
1128
|
+
let { controls: r = !1, navigator: i = un } = t, a = /* @__PURE__ */ mn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
|
|
1096
1129
|
c.value = o.value?.state ?? "prompt";
|
|
1097
1130
|
};
|
|
1098
1131
|
J(o, "change", l, { passive: !0 });
|
|
1099
|
-
let u =
|
|
1132
|
+
let u = Yt(async () => {
|
|
1100
1133
|
if (a.value) {
|
|
1101
1134
|
if (!o.value) try {
|
|
1102
1135
|
o.value = await i.permissions.query(s);
|
|
@@ -1114,8 +1147,8 @@ function vn(e, t = {}) {
|
|
|
1114
1147
|
query: u
|
|
1115
1148
|
} : c;
|
|
1116
1149
|
}
|
|
1117
|
-
function
|
|
1118
|
-
let { navigator: t =
|
|
1150
|
+
function bn(e = {}) {
|
|
1151
|
+
let { navigator: t = un, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ mn(() => t && "clipboard" in t), c = yn("clipboard-read"), l = yn("clipboard-write"), u = k(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = rn(() => f.value = !1, a, { immediate: !1 }), h = 0;
|
|
1119
1152
|
async function _() {
|
|
1120
1153
|
let e = !(s.value && S(c.value));
|
|
1121
1154
|
if (!e) try {
|
|
@@ -1167,9 +1200,9 @@ function yn(e = {}) {
|
|
|
1167
1200
|
copy: v
|
|
1168
1201
|
};
|
|
1169
1202
|
}
|
|
1170
|
-
function
|
|
1203
|
+
function xn(e, t = {}) {
|
|
1171
1204
|
let r = n(!1), i = n(null), a = 0, o = !0;
|
|
1172
|
-
if (
|
|
1205
|
+
if (Rt) {
|
|
1173
1206
|
let n = typeof t == "function" ? { onDrop: t } : t, s = n.multiple ?? !0, c = n.preventDefaultForUnhandled ?? !1, l = (e) => {
|
|
1174
1207
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1175
1208
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
@@ -1212,8 +1245,8 @@ function bn(e, t = {}) {
|
|
|
1212
1245
|
isOverDropZone: r
|
|
1213
1246
|
};
|
|
1214
1247
|
}
|
|
1215
|
-
function
|
|
1216
|
-
let { window: r =
|
|
1248
|
+
function Sn(e, t, n = {}) {
|
|
1249
|
+
let { window: r = cn, ...i } = n, a, o = /* @__PURE__ */ mn(() => r && "ResizeObserver" in r), s = () => {
|
|
1217
1250
|
a &&= (a.disconnect(), void 0);
|
|
1218
1251
|
}, c = U(k(() => {
|
|
1219
1252
|
let t = F(e);
|
|
@@ -1229,12 +1262,12 @@ function xn(e, t, n = {}) {
|
|
|
1229
1262
|
}), l = () => {
|
|
1230
1263
|
s(), c();
|
|
1231
1264
|
};
|
|
1232
|
-
return
|
|
1265
|
+
return Pt(l), {
|
|
1233
1266
|
isSupported: o,
|
|
1234
1267
|
stop: l
|
|
1235
1268
|
};
|
|
1236
1269
|
}
|
|
1237
|
-
function
|
|
1270
|
+
function Cn(e, t = {}) {
|
|
1238
1271
|
let { reset: r = !0, windowResize: i = !0, windowScroll: a = !0, immediate: o = !0, updateTiming: s = "sync" } = t, c = n(0), l = n(0), u = n(0), d = n(0), f = n(0), p = n(0), m = n(0), h = n(0);
|
|
1239
1272
|
function g() {
|
|
1240
1273
|
let t = q(e);
|
|
@@ -1248,10 +1281,10 @@ function Sn(e, t = {}) {
|
|
|
1248
1281
|
function _() {
|
|
1249
1282
|
s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
|
|
1250
1283
|
}
|
|
1251
|
-
return
|
|
1284
|
+
return Sn(e, _), U(() => q(e), (e) => !e && _()), hn(e, _, { attributeFilter: ["style", "class"] }), a && J("scroll", _, {
|
|
1252
1285
|
capture: !0,
|
|
1253
1286
|
passive: !0
|
|
1254
|
-
}), i && J("resize", _, { passive: !0 }),
|
|
1287
|
+
}), i && J("resize", _, { passive: !0 }), tn(() => {
|
|
1255
1288
|
o && _();
|
|
1256
1289
|
}), {
|
|
1257
1290
|
height: c,
|
|
@@ -1265,8 +1298,8 @@ function Sn(e, t = {}) {
|
|
|
1265
1298
|
update: _
|
|
1266
1299
|
};
|
|
1267
1300
|
}
|
|
1268
|
-
function
|
|
1269
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
1301
|
+
function wn(e, t, r = {}) {
|
|
1302
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = cn, immediate: c = !0 } = r, l = /* @__PURE__ */ mn(() => s && "IntersectionObserver" in s), u = k(() => Zt(F(e)).map(q).filter(zt)), d = Ht, f = n(c), p = l.value ? U(() => [
|
|
1270
1303
|
u.value,
|
|
1271
1304
|
q(i),
|
|
1272
1305
|
F(a),
|
|
@@ -1279,15 +1312,15 @@ function Cn(e, t, r = {}) {
|
|
|
1279
1312
|
threshold: o
|
|
1280
1313
|
});
|
|
1281
1314
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
1282
|
-
i.disconnect(), d =
|
|
1315
|
+
i.disconnect(), d = Ht;
|
|
1283
1316
|
};
|
|
1284
1317
|
}, {
|
|
1285
1318
|
immediate: c,
|
|
1286
1319
|
flush: "post"
|
|
1287
|
-
}) :
|
|
1320
|
+
}) : Ht, m = () => {
|
|
1288
1321
|
d(), p(), f.value = !1;
|
|
1289
1322
|
};
|
|
1290
|
-
return
|
|
1323
|
+
return Pt(m), {
|
|
1291
1324
|
isSupported: l,
|
|
1292
1325
|
isActive: f,
|
|
1293
1326
|
pause() {
|
|
@@ -1299,21 +1332,21 @@ function Cn(e, t, r = {}) {
|
|
|
1299
1332
|
stop: m
|
|
1300
1333
|
};
|
|
1301
1334
|
}
|
|
1302
|
-
var
|
|
1335
|
+
var Tn = {
|
|
1303
1336
|
multiple: !0,
|
|
1304
1337
|
accept: "*",
|
|
1305
1338
|
reset: !1,
|
|
1306
1339
|
directory: !1
|
|
1307
1340
|
};
|
|
1308
|
-
function
|
|
1341
|
+
function En(e) {
|
|
1309
1342
|
if (!e) return null;
|
|
1310
1343
|
if (e instanceof FileList) return e;
|
|
1311
1344
|
let t = new DataTransfer();
|
|
1312
1345
|
for (let n of e) t.items.add(n);
|
|
1313
1346
|
return t.files;
|
|
1314
1347
|
}
|
|
1315
|
-
function
|
|
1316
|
-
let { document: t =
|
|
1348
|
+
function Dn(e = {}) {
|
|
1349
|
+
let { document: t = ln } = e, n = C(En(e.initialFiles)), { on: r, trigger: a } = Ft(), { on: o, trigger: s } = Ft(), c = k(() => {
|
|
1317
1350
|
let r = q(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1318
1351
|
return r && (r.type = "file", r.onchange = (e) => {
|
|
1319
1352
|
n.value = e.target.files, a(n.value);
|
|
@@ -1324,7 +1357,7 @@ function En(e = {}) {
|
|
|
1324
1357
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1325
1358
|
}, u = (e) => {
|
|
1326
1359
|
let t = c.value;
|
|
1327
|
-
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory),
|
|
1360
|
+
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory), Ut(e, "capture") && (t.capture = F(e.capture)));
|
|
1328
1361
|
};
|
|
1329
1362
|
return i(() => {
|
|
1330
1363
|
u(e);
|
|
@@ -1334,7 +1367,7 @@ function En(e = {}) {
|
|
|
1334
1367
|
let n = c.value;
|
|
1335
1368
|
if (!n) return;
|
|
1336
1369
|
let r = {
|
|
1337
|
-
...
|
|
1370
|
+
...Tn,
|
|
1338
1371
|
...e,
|
|
1339
1372
|
...t
|
|
1340
1373
|
};
|
|
@@ -1347,26 +1380,26 @@ function En(e = {}) {
|
|
|
1347
1380
|
}
|
|
1348
1381
|
//#endregion
|
|
1349
1382
|
//#region src/utils/activeEditorTracker.ts
|
|
1350
|
-
var
|
|
1351
|
-
function
|
|
1352
|
-
let e = ++
|
|
1353
|
-
return
|
|
1383
|
+
var On = /* @__PURE__ */ new Set(), kn = 0, An = 0;
|
|
1384
|
+
function jn() {
|
|
1385
|
+
let e = ++An;
|
|
1386
|
+
return On.add(e), kn === 0 && (kn = e), {
|
|
1354
1387
|
id: e,
|
|
1355
|
-
isActive: () =>
|
|
1388
|
+
isActive: () => On.size <= 1 || kn === e,
|
|
1356
1389
|
claim: () => {
|
|
1357
|
-
|
|
1390
|
+
kn = e;
|
|
1358
1391
|
},
|
|
1359
1392
|
dispose: () => {
|
|
1360
|
-
if (
|
|
1361
|
-
let e = Array.from(
|
|
1362
|
-
|
|
1393
|
+
if (On.delete(e), kn === e) {
|
|
1394
|
+
let e = Array.from(On);
|
|
1395
|
+
kn = e[e.length - 1] ?? 0;
|
|
1363
1396
|
}
|
|
1364
1397
|
}
|
|
1365
1398
|
};
|
|
1366
1399
|
}
|
|
1367
1400
|
//#endregion
|
|
1368
1401
|
//#region src/keys.ts
|
|
1369
|
-
var
|
|
1402
|
+
var Mn = Symbol("translations"), Nn = Symbol("editor"), Pn = Symbol("history"), Fn = Symbol("blockActions"), In = Symbol("conditionPreview"), Ln = Symbol("fontsManager"), Rn = Symbol("themeStyles"), zn = Symbol("tplUiTheme"), Bn = Symbol("blockDefaults"), Vn = Symbol("blockRegistry"), Hn = Symbol("customBlockDefinitions"), Un = Symbol("mergeTags"), Wn = Symbol("mergeTagSyntax"), Gn = Symbol("onRequestMergeTag"), Kn = Symbol("mergeTagAutocomplete"), qn = Symbol("onRequestMedia"), Jn = Symbol("displayConditions"), Yn = Symbol("allowCustomConditions"), Xn = Symbol("capabilities"), Zn = Symbol("keyboardReorder"), Qn = Symbol("templateLint"), $n = Symbol("editorRoot"), er = Symbol("popoverRoot"), tr = Symbol("authManager"), nr = Symbol("aiConfig"), rr = Symbol("comments"), ir = Symbol("savedModulesHeadless"), ar = Symbol("scoring"), or = Symbol("cloudTranslations");
|
|
1370
1403
|
function Y(e, t) {
|
|
1371
1404
|
let n = v(e, null);
|
|
1372
1405
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1374,21 +1407,21 @@ function Y(e, t) {
|
|
|
1374
1407
|
}
|
|
1375
1408
|
//#endregion
|
|
1376
1409
|
//#region src/composables/useTemplateLint.ts
|
|
1377
|
-
function
|
|
1410
|
+
function sr(e) {
|
|
1378
1411
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1379
1412
|
}
|
|
1380
|
-
function
|
|
1381
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1413
|
+
function cr(e) {
|
|
1414
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = sr(e.options), s = null, c = !1;
|
|
1382
1415
|
o || l();
|
|
1383
1416
|
async function l() {
|
|
1384
1417
|
try {
|
|
1385
|
-
let t = await import("./quality-
|
|
1418
|
+
let t = await import("./quality-Bpj6kNxR.js").then((e) => e.t);
|
|
1386
1419
|
if (c) return;
|
|
1387
1420
|
a.value = {
|
|
1388
1421
|
lintAccessibility: t.lintAccessibility,
|
|
1389
1422
|
lintStructure: t.lintStructure,
|
|
1390
1423
|
lintLinks: t.lintLinks
|
|
1391
|
-
}, r.value = !0, u(), s =
|
|
1424
|
+
}, r.value = !0, u(), s = on(e.content, u, {
|
|
1392
1425
|
debounce: e.debounce ?? 500,
|
|
1393
1426
|
deep: !0
|
|
1394
1427
|
});
|
|
@@ -1429,8 +1462,8 @@ function sr(e) {
|
|
|
1429
1462
|
}
|
|
1430
1463
|
//#endregion
|
|
1431
1464
|
//#region src/composables/useI18n.ts
|
|
1432
|
-
function
|
|
1433
|
-
let t = e ?? v(
|
|
1465
|
+
function lr(e) {
|
|
1466
|
+
let t = e ?? v(Mn, null);
|
|
1434
1467
|
if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
|
|
1435
1468
|
let n = u(t) ? t.value : t;
|
|
1436
1469
|
function r(e, t) {
|
|
@@ -1443,12 +1476,12 @@ function cr(e) {
|
|
|
1443
1476
|
}
|
|
1444
1477
|
//#endregion
|
|
1445
1478
|
//#region src/utils/blockTypeLabels.ts
|
|
1446
|
-
function
|
|
1479
|
+
function ur(e, t) {
|
|
1447
1480
|
return t.blocks[e] ?? e;
|
|
1448
1481
|
}
|
|
1449
1482
|
//#endregion
|
|
1450
1483
|
//#region src/composables/useKeyboardReorder.ts
|
|
1451
|
-
function
|
|
1484
|
+
function dr(e, t) {
|
|
1452
1485
|
let n = C(null), r = C(""), i = null;
|
|
1453
1486
|
function a(t) {
|
|
1454
1487
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1475,7 +1508,7 @@ function ur(e, t) {
|
|
|
1475
1508
|
let r = a(n);
|
|
1476
1509
|
if (!r) return "";
|
|
1477
1510
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1478
|
-
return i ?
|
|
1511
|
+
return i ? ur(i.type, t.t) : "";
|
|
1479
1512
|
}
|
|
1480
1513
|
function s(t, n) {
|
|
1481
1514
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1544,13 +1577,13 @@ function ur(e, t) {
|
|
|
1544
1577
|
}
|
|
1545
1578
|
//#endregion
|
|
1546
1579
|
//#region src/composables/useUiTheme.ts
|
|
1547
|
-
function
|
|
1548
|
-
let t =
|
|
1580
|
+
function fr(e) {
|
|
1581
|
+
let t = vn("(prefers-color-scheme: dark)");
|
|
1549
1582
|
return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1550
1583
|
}
|
|
1551
1584
|
//#endregion
|
|
1552
1585
|
//#region src/composables/useThemeStyles.ts
|
|
1553
|
-
var
|
|
1586
|
+
var pr = {
|
|
1554
1587
|
bg: "--tpl-bg",
|
|
1555
1588
|
bgElevated: "--tpl-bg-elevated",
|
|
1556
1589
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1574,10 +1607,10 @@ var fr = {
|
|
|
1574
1607
|
dangerLight: "--tpl-danger-light",
|
|
1575
1608
|
canvasBg: "--tpl-canvas-bg"
|
|
1576
1609
|
};
|
|
1577
|
-
function
|
|
1610
|
+
function mr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1578
1611
|
return { themeStyles: k(() => {
|
|
1579
1612
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1580
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1613
|
+
if (a) for (let [e, t] of Object.entries(pr)) {
|
|
1581
1614
|
let n = a[e];
|
|
1582
1615
|
n && (r[t] = n);
|
|
1583
1616
|
}
|
|
@@ -1586,27 +1619,27 @@ function pr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1586
1619
|
}
|
|
1587
1620
|
//#endregion
|
|
1588
1621
|
//#region src/utils/logger.ts
|
|
1589
|
-
var
|
|
1590
|
-
function
|
|
1622
|
+
var hr = "[Templatical]";
|
|
1623
|
+
function gr() {
|
|
1591
1624
|
return typeof process < "u" && !0;
|
|
1592
1625
|
}
|
|
1593
|
-
var
|
|
1626
|
+
var _r = {
|
|
1594
1627
|
warn(...e) {
|
|
1595
|
-
console.warn(
|
|
1628
|
+
console.warn(hr, ...e);
|
|
1596
1629
|
},
|
|
1597
1630
|
error(...e) {
|
|
1598
|
-
console.error(
|
|
1631
|
+
console.error(hr, ...e);
|
|
1599
1632
|
},
|
|
1600
1633
|
debug(...e) {
|
|
1601
|
-
|
|
1634
|
+
gr() || console.debug(hr, ...e);
|
|
1602
1635
|
},
|
|
1603
1636
|
info(...e) {
|
|
1604
|
-
|
|
1637
|
+
gr() || console.info(hr, ...e);
|
|
1605
1638
|
}
|
|
1606
1639
|
};
|
|
1607
1640
|
//#endregion
|
|
1608
1641
|
//#region src/composables/useBlockRegistry.ts
|
|
1609
|
-
function
|
|
1642
|
+
function vr() {
|
|
1610
1643
|
let e = n(/* @__PURE__ */ new Map());
|
|
1611
1644
|
function t(t, n) {
|
|
1612
1645
|
e.value.set(t, n), ae(e);
|
|
@@ -1658,7 +1691,7 @@ function _r() {
|
|
|
1658
1691
|
strictFilters: !1
|
|
1659
1692
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1660
1693
|
} catch (t) {
|
|
1661
|
-
return
|
|
1694
|
+
return _r.error(`Failed to render custom block "${e.customType}":`, t), c(`Render error: ${e.customType}`);
|
|
1662
1695
|
}
|
|
1663
1696
|
}
|
|
1664
1697
|
function u(t) {
|
|
@@ -1677,7 +1710,7 @@ function _r() {
|
|
|
1677
1710
|
}
|
|
1678
1711
|
//#endregion
|
|
1679
1712
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1680
|
-
var
|
|
1713
|
+
var yr = [
|
|
1681
1714
|
{
|
|
1682
1715
|
type: "section",
|
|
1683
1716
|
label: "Section",
|
|
@@ -1744,8 +1777,8 @@ var vr = [
|
|
|
1744
1777
|
createBlock: rt
|
|
1745
1778
|
}
|
|
1746
1779
|
];
|
|
1747
|
-
function
|
|
1748
|
-
for (let n of
|
|
1780
|
+
function br(e, t) {
|
|
1781
|
+
for (let n of yr) {
|
|
1749
1782
|
let r = t[n.type];
|
|
1750
1783
|
r && e.registerBuiltIn(n.type, {
|
|
1751
1784
|
component: r,
|
|
@@ -1760,7 +1793,7 @@ function yr(e, t) {
|
|
|
1760
1793
|
}
|
|
1761
1794
|
//#endregion
|
|
1762
1795
|
//#region src/utils/keyboardShortcuts.ts
|
|
1763
|
-
function
|
|
1796
|
+
function xr(e) {
|
|
1764
1797
|
for (let t of e.composedPath()) {
|
|
1765
1798
|
if (!(t instanceof HTMLElement)) continue;
|
|
1766
1799
|
if (t.isContentEditable) return !0;
|
|
@@ -1769,14 +1802,14 @@ function br(e) {
|
|
|
1769
1802
|
}
|
|
1770
1803
|
return !1;
|
|
1771
1804
|
}
|
|
1772
|
-
function
|
|
1805
|
+
function Sr(e, t) {
|
|
1773
1806
|
let n = e.metaKey || e.ctrlKey;
|
|
1774
1807
|
if (n && e.key.toLowerCase() === "s") {
|
|
1775
1808
|
e.preventDefault(), t.onSave?.();
|
|
1776
1809
|
return;
|
|
1777
1810
|
}
|
|
1778
1811
|
if (n && e.key.toLowerCase() === "z") {
|
|
1779
|
-
if (
|
|
1812
|
+
if (xr(e)) return;
|
|
1780
1813
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1781
1814
|
return;
|
|
1782
1815
|
}
|
|
@@ -1784,11 +1817,11 @@ function xr(e, t) {
|
|
|
1784
1817
|
t.selectBlock(null);
|
|
1785
1818
|
return;
|
|
1786
1819
|
}
|
|
1787
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1820
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !xr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1788
1821
|
}
|
|
1789
1822
|
//#endregion
|
|
1790
1823
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1791
|
-
var
|
|
1824
|
+
var Cr = { class: "tpl:text-center" }, wr = ["href"], Tr = /* @__PURE__ */ V({
|
|
1792
1825
|
__name: "ButtonBlock",
|
|
1793
1826
|
props: {
|
|
1794
1827
|
block: {},
|
|
@@ -1809,17 +1842,17 @@ var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ V({
|
|
|
1809
1842
|
};
|
|
1810
1843
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1811
1844
|
});
|
|
1812
|
-
return (t, r) => (f(), A("div",
|
|
1845
|
+
return (t, r) => (f(), A("div", Cr, [L("a", {
|
|
1813
1846
|
href: e.block.url || "#",
|
|
1814
1847
|
style: R(n.value),
|
|
1815
1848
|
class: "tpl:cursor-default",
|
|
1816
1849
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
1817
|
-
}, O(e.block.text), 13,
|
|
1850
|
+
}, O(e.block.text), 13, wr)]));
|
|
1818
1851
|
}
|
|
1819
|
-
}),
|
|
1820
|
-
let t =
|
|
1852
|
+
}), Er = (e) => e === "", Dr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Or = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), kr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Ar = (e) => {
|
|
1853
|
+
let t = kr(e);
|
|
1821
1854
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1822
|
-
},
|
|
1855
|
+
}, jr = {
|
|
1823
1856
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1824
1857
|
width: 24,
|
|
1825
1858
|
height: 24,
|
|
@@ -1829,35 +1862,35 @@ var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ V({
|
|
|
1829
1862
|
"stroke-width": 2,
|
|
1830
1863
|
"stroke-linecap": "round",
|
|
1831
1864
|
"stroke-linejoin": "round"
|
|
1832
|
-
},
|
|
1833
|
-
function
|
|
1834
|
-
return v(
|
|
1865
|
+
}, Mr = Symbol("lucide-icons");
|
|
1866
|
+
function Nr() {
|
|
1867
|
+
return v(Mr, {});
|
|
1835
1868
|
}
|
|
1836
1869
|
//#endregion
|
|
1837
1870
|
//#region ../../node_modules/.pnpm/@lucide+vue@1.16.0_vue@3.5.34_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1838
|
-
var
|
|
1839
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1840
|
-
let e =
|
|
1841
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1871
|
+
var Pr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1872
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Nr(), g = k(() => {
|
|
1873
|
+
let e = Er(n) || Er(r) || n === !0 || r === !0 || m === !0, t = i || o || p || jr["stroke-width"];
|
|
1874
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? jr.width) : t;
|
|
1842
1875
|
});
|
|
1843
1876
|
return a("svg", {
|
|
1844
|
-
...
|
|
1877
|
+
...jr,
|
|
1845
1878
|
...l,
|
|
1846
|
-
width: s ?? d ??
|
|
1847
|
-
height: s ?? d ??
|
|
1848
|
-
stroke: c ?? f ??
|
|
1879
|
+
width: s ?? d ?? jr.width,
|
|
1880
|
+
height: s ?? d ?? jr.height,
|
|
1881
|
+
stroke: c ?? f ?? jr.stroke,
|
|
1849
1882
|
"stroke-width": g.value,
|
|
1850
|
-
class:
|
|
1883
|
+
class: Dr("lucide", h, ...e ? [`lucide-${Or(Ar(e))}-icon`, `lucide-${Or(e)}`] : ["lucide-icon"])
|
|
1851
1884
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1852
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1885
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Pr, {
|
|
1853
1886
|
...i,
|
|
1854
1887
|
...n,
|
|
1855
1888
|
iconNode: t,
|
|
1856
1889
|
name: e
|
|
1857
|
-
}, r.default ? { default: r.default } : void 0),
|
|
1890
|
+
}, r.default ? { default: r.default } : void 0), Fr = X("bookmark", [["path", {
|
|
1858
1891
|
d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
|
|
1859
1892
|
key: "oz39mx"
|
|
1860
|
-
}]]),
|
|
1893
|
+
}]]), Ir = X("box", [
|
|
1861
1894
|
["path", {
|
|
1862
1895
|
d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
|
|
1863
1896
|
key: "hh9hay"
|
|
@@ -1870,22 +1903,22 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1870
1903
|
d: "M12 22V12",
|
|
1871
1904
|
key: "d0xqtd"
|
|
1872
1905
|
}]
|
|
1873
|
-
]),
|
|
1906
|
+
]), Lr = X("check", [["path", {
|
|
1874
1907
|
d: "M20 6 9 17l-5-5",
|
|
1875
1908
|
key: "1gmf2c"
|
|
1876
|
-
}]]),
|
|
1909
|
+
}]]), Rr = X("chevron-down", [["path", {
|
|
1877
1910
|
d: "m6 9 6 6 6-6",
|
|
1878
1911
|
key: "qrunsl"
|
|
1879
|
-
}]]),
|
|
1912
|
+
}]]), zr = X("chevron-left", [["path", {
|
|
1880
1913
|
d: "m15 18-6-6 6-6",
|
|
1881
1914
|
key: "1wnfg3"
|
|
1882
|
-
}]]),
|
|
1915
|
+
}]]), Br = X("chevron-right", [["path", {
|
|
1883
1916
|
d: "m9 18 6-6-6-6",
|
|
1884
1917
|
key: "mthhwq"
|
|
1885
|
-
}]]),
|
|
1918
|
+
}]]), Vr = X("chevron-up", [["path", {
|
|
1886
1919
|
d: "m18 15-6-6-6 6",
|
|
1887
1920
|
key: "153udz"
|
|
1888
|
-
}]]),
|
|
1921
|
+
}]]), Hr = X("circle-alert", [
|
|
1889
1922
|
["circle", {
|
|
1890
1923
|
cx: "12",
|
|
1891
1924
|
cy: "12",
|
|
@@ -1906,7 +1939,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1906
1939
|
y2: "16",
|
|
1907
1940
|
key: "4dfq90"
|
|
1908
1941
|
}]
|
|
1909
|
-
]),
|
|
1942
|
+
]), Ur = X("circle-check", [["circle", {
|
|
1910
1943
|
cx: "12",
|
|
1911
1944
|
cy: "12",
|
|
1912
1945
|
r: "10",
|
|
@@ -1914,7 +1947,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1914
1947
|
}], ["path", {
|
|
1915
1948
|
d: "m9 12 2 2 4-4",
|
|
1916
1949
|
key: "dzmm74"
|
|
1917
|
-
}]]),
|
|
1950
|
+
}]]), Wr = X("clock", [["circle", {
|
|
1918
1951
|
cx: "12",
|
|
1919
1952
|
cy: "12",
|
|
1920
1953
|
r: "10",
|
|
@@ -1922,13 +1955,13 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1922
1955
|
}], ["path", {
|
|
1923
1956
|
d: "M12 6v6l4 2",
|
|
1924
1957
|
key: "mmk7yg"
|
|
1925
|
-
}]]),
|
|
1958
|
+
}]]), Gr = X("code", [["path", {
|
|
1926
1959
|
d: "m16 18 6-6-6-6",
|
|
1927
1960
|
key: "eg8j8"
|
|
1928
1961
|
}], ["path", {
|
|
1929
1962
|
d: "m8 6-6 6 6 6",
|
|
1930
1963
|
key: "ppft3o"
|
|
1931
|
-
}]]),
|
|
1964
|
+
}]]), Kr = X("copy", [["rect", {
|
|
1932
1965
|
width: "14",
|
|
1933
1966
|
height: "14",
|
|
1934
1967
|
x: "8",
|
|
@@ -1939,7 +1972,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1939
1972
|
}], ["path", {
|
|
1940
1973
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
1941
1974
|
key: "zix9uf"
|
|
1942
|
-
}]]),
|
|
1975
|
+
}]]), qr = X("eye-off", [
|
|
1943
1976
|
["path", {
|
|
1944
1977
|
d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
|
|
1945
1978
|
key: "ct8e1f"
|
|
@@ -1956,7 +1989,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1956
1989
|
d: "m2 2 20 20",
|
|
1957
1990
|
key: "1ooewy"
|
|
1958
1991
|
}]
|
|
1959
|
-
]),
|
|
1992
|
+
]), Jr = X("eye", [["path", {
|
|
1960
1993
|
d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
|
|
1961
1994
|
key: "1nclc0"
|
|
1962
1995
|
}], ["circle", {
|
|
@@ -1964,7 +1997,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1964
1997
|
cy: "12",
|
|
1965
1998
|
r: "3",
|
|
1966
1999
|
key: "1v7zrd"
|
|
1967
|
-
}]]),
|
|
2000
|
+
}]]), Yr = X("file-image", [
|
|
1968
2001
|
["path", {
|
|
1969
2002
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
1970
2003
|
key: "1oefj6"
|
|
@@ -1983,7 +2016,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1983
2016
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
1984
2017
|
key: "wt3hpn"
|
|
1985
2018
|
}]
|
|
1986
|
-
]),
|
|
2019
|
+
]), Xr = X("file-text", [
|
|
1987
2020
|
["path", {
|
|
1988
2021
|
d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
|
|
1989
2022
|
key: "1oefj6"
|
|
@@ -2004,10 +2037,10 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2004
2037
|
d: "M16 17H8",
|
|
2005
2038
|
key: "z1uh3a"
|
|
2006
2039
|
}]
|
|
2007
|
-
]),
|
|
2040
|
+
]), Zr = X("funnel", [["path", {
|
|
2008
2041
|
d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
|
|
2009
2042
|
key: "sc7q7i"
|
|
2010
|
-
}]]),
|
|
2043
|
+
}]]), Qr = X("grip-vertical", [
|
|
2011
2044
|
["circle", {
|
|
2012
2045
|
cx: "9",
|
|
2013
2046
|
cy: "12",
|
|
@@ -2044,7 +2077,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2044
2077
|
r: "1",
|
|
2045
2078
|
key: "f4zoj3"
|
|
2046
2079
|
}]
|
|
2047
|
-
]),
|
|
2080
|
+
]), $r = X("image-up", [
|
|
2048
2081
|
["path", {
|
|
2049
2082
|
d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
|
|
2050
2083
|
key: "9csbqa"
|
|
@@ -2063,7 +2096,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2063
2096
|
r: "2",
|
|
2064
2097
|
key: "af1f0g"
|
|
2065
2098
|
}]
|
|
2066
|
-
]),
|
|
2099
|
+
]), ei = X("image", [
|
|
2067
2100
|
["rect", {
|
|
2068
2101
|
width: "18",
|
|
2069
2102
|
height: "18",
|
|
@@ -2083,7 +2116,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2083
2116
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2084
2117
|
key: "1xmnt7"
|
|
2085
2118
|
}]
|
|
2086
|
-
]),
|
|
2119
|
+
]), ti = X("info", [
|
|
2087
2120
|
["circle", {
|
|
2088
2121
|
cx: "12",
|
|
2089
2122
|
cy: "12",
|
|
@@ -2098,31 +2131,31 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2098
2131
|
d: "M12 8h.01",
|
|
2099
2132
|
key: "e9boi3"
|
|
2100
2133
|
}]
|
|
2101
|
-
]),
|
|
2134
|
+
]), ni = X("loader-circle", [["path", {
|
|
2102
2135
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2103
2136
|
key: "13zald"
|
|
2104
|
-
}]]),
|
|
2137
|
+
}]]), ri = X("message-circle", [["path", {
|
|
2105
2138
|
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
2106
2139
|
key: "1sd12s"
|
|
2107
|
-
}]]),
|
|
2140
|
+
}]]), ii = X("navigation", [["polygon", {
|
|
2108
2141
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2109
2142
|
key: "1ltx0t"
|
|
2110
|
-
}]]),
|
|
2143
|
+
}]]), ai = X("pencil", [["path", {
|
|
2111
2144
|
d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
|
|
2112
2145
|
key: "1a8usu"
|
|
2113
2146
|
}], ["path", {
|
|
2114
2147
|
d: "m15 5 4 4",
|
|
2115
2148
|
key: "1mk7zo"
|
|
2116
|
-
}]]),
|
|
2149
|
+
}]]), oi = X("puzzle", [["path", {
|
|
2117
2150
|
d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
|
|
2118
2151
|
key: "w46dr5"
|
|
2119
|
-
}]]),
|
|
2152
|
+
}]]), si = X("redo-2", [["path", {
|
|
2120
2153
|
d: "m15 14 5-5-5-5",
|
|
2121
2154
|
key: "12vg1m"
|
|
2122
2155
|
}], ["path", {
|
|
2123
2156
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2124
2157
|
key: "6uklza"
|
|
2125
|
-
}]]),
|
|
2158
|
+
}]]), ci = X("refresh-cw", [
|
|
2126
2159
|
["path", {
|
|
2127
2160
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2128
2161
|
key: "v9h5vc"
|
|
@@ -2139,19 +2172,19 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2139
2172
|
d: "M8 16H3v5",
|
|
2140
2173
|
key: "1cv678"
|
|
2141
2174
|
}]
|
|
2142
|
-
]),
|
|
2175
|
+
]), li = X("reply", [["path", {
|
|
2143
2176
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2144
2177
|
key: "5vmcpk"
|
|
2145
2178
|
}], ["path", {
|
|
2146
2179
|
d: "m9 17-5-5 5-5",
|
|
2147
2180
|
key: "nvlc11"
|
|
2148
|
-
}]]),
|
|
2181
|
+
}]]), ui = X("send", [["path", {
|
|
2149
2182
|
d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
|
|
2150
2183
|
key: "1ffxy3"
|
|
2151
2184
|
}], ["path", {
|
|
2152
2185
|
d: "m21.854 2.147-10.94 10.939",
|
|
2153
2186
|
key: "12cjpa"
|
|
2154
|
-
}]]),
|
|
2187
|
+
}]]), di = X("share-2", [
|
|
2155
2188
|
["circle", {
|
|
2156
2189
|
cx: "18",
|
|
2157
2190
|
cy: "5",
|
|
@@ -2184,13 +2217,13 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2184
2217
|
y2: "10.49",
|
|
2185
2218
|
key: "1n3mei"
|
|
2186
2219
|
}]
|
|
2187
|
-
]),
|
|
2220
|
+
]), fi = X("shield-check", [["path", {
|
|
2188
2221
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2189
2222
|
key: "oel41y"
|
|
2190
2223
|
}], ["path", {
|
|
2191
2224
|
d: "m9 12 2 2 4-4",
|
|
2192
2225
|
key: "dzmm74"
|
|
2193
|
-
}]]),
|
|
2226
|
+
}]]), pi = X("shield-x", [
|
|
2194
2227
|
["path", {
|
|
2195
2228
|
d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
|
|
2196
2229
|
key: "oel41y"
|
|
@@ -2203,7 +2236,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2203
2236
|
d: "m9.5 9.5 5 5",
|
|
2204
2237
|
key: "18nt4w"
|
|
2205
2238
|
}]
|
|
2206
|
-
]),
|
|
2239
|
+
]), mi = X("sparkles", [
|
|
2207
2240
|
["path", {
|
|
2208
2241
|
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
2209
2242
|
key: "1s2grr"
|
|
@@ -2222,7 +2255,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2222
2255
|
r: "2",
|
|
2223
2256
|
key: "6kqj1y"
|
|
2224
2257
|
}]
|
|
2225
|
-
]),
|
|
2258
|
+
]), hi = X("table", [
|
|
2226
2259
|
["path", {
|
|
2227
2260
|
d: "M12 3v18",
|
|
2228
2261
|
key: "108xh3"
|
|
@@ -2243,7 +2276,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2243
2276
|
d: "M3 15h18",
|
|
2244
2277
|
key: "5xshup"
|
|
2245
2278
|
}]
|
|
2246
|
-
]),
|
|
2279
|
+
]), gi = X("trash-2", [
|
|
2247
2280
|
["path", {
|
|
2248
2281
|
d: "M10 11v6",
|
|
2249
2282
|
key: "nco0om"
|
|
@@ -2264,7 +2297,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2264
2297
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2265
2298
|
key: "e791ji"
|
|
2266
2299
|
}]
|
|
2267
|
-
]),
|
|
2300
|
+
]), _i = X("triangle-alert", [
|
|
2268
2301
|
["path", {
|
|
2269
2302
|
d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
|
|
2270
2303
|
key: "wmoenq"
|
|
@@ -2277,13 +2310,13 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2277
2310
|
d: "M12 17h.01",
|
|
2278
2311
|
key: "p32p05"
|
|
2279
2312
|
}]
|
|
2280
|
-
]),
|
|
2313
|
+
]), vi = X("undo-2", [["path", {
|
|
2281
2314
|
d: "M9 14 4 9l5-5",
|
|
2282
2315
|
key: "102s5s"
|
|
2283
2316
|
}], ["path", {
|
|
2284
2317
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2285
2318
|
key: "f3b9sd"
|
|
2286
|
-
}]]),
|
|
2319
|
+
}]]), yi = X("upload", [
|
|
2287
2320
|
["path", {
|
|
2288
2321
|
d: "M12 3v12",
|
|
2289
2322
|
key: "1x0j5s"
|
|
@@ -2296,7 +2329,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2296
2329
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2297
2330
|
key: "ih7n3h"
|
|
2298
2331
|
}]
|
|
2299
|
-
]),
|
|
2332
|
+
]), bi = X("video", [["path", {
|
|
2300
2333
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2301
2334
|
key: "ftymec"
|
|
2302
2335
|
}], ["rect", {
|
|
@@ -2306,20 +2339,20 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2306
2339
|
height: "12",
|
|
2307
2340
|
rx: "2",
|
|
2308
2341
|
key: "158x01"
|
|
2309
|
-
}]]),
|
|
2342
|
+
}]]), xi = X("x", [["path", {
|
|
2310
2343
|
d: "M18 6 6 18",
|
|
2311
2344
|
key: "1bl5f8"
|
|
2312
2345
|
}], ["path", {
|
|
2313
2346
|
d: "m6 6 12 12",
|
|
2314
2347
|
key: "d8bk6v"
|
|
2315
|
-
}]]),
|
|
2348
|
+
}]]), Si = X("zap", [["path", {
|
|
2316
2349
|
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
2317
2350
|
key: "1xq2db"
|
|
2318
|
-
}]]),
|
|
2351
|
+
}]]), Ci = ["innerHTML"], wi = [
|
|
2319
2352
|
"src",
|
|
2320
2353
|
"width",
|
|
2321
2354
|
"height"
|
|
2322
|
-
],
|
|
2355
|
+
], Ti = /* @__PURE__ */ V({
|
|
2323
2356
|
__name: "CustomBlockIcon",
|
|
2324
2357
|
props: {
|
|
2325
2358
|
icon: {},
|
|
@@ -2335,40 +2368,40 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2335
2368
|
height: `${n.value}px`
|
|
2336
2369
|
}),
|
|
2337
2370
|
innerHTML: e.icon
|
|
2338
|
-
}, null, 12,
|
|
2371
|
+
}, null, 12, Ci)) : i.value ? (f(), A("img", {
|
|
2339
2372
|
key: 1,
|
|
2340
2373
|
src: e.icon,
|
|
2341
2374
|
width: n.value,
|
|
2342
2375
|
height: n.value,
|
|
2343
2376
|
class: "tpl:inline-block",
|
|
2344
2377
|
alt: ""
|
|
2345
|
-
}, null, 8,
|
|
2378
|
+
}, null, 8, wi)) : (f(), P(M(Ir), {
|
|
2346
2379
|
key: 2,
|
|
2347
2380
|
size: n.value,
|
|
2348
2381
|
"stroke-width": 1.5
|
|
2349
2382
|
}, null, 8, ["size"]));
|
|
2350
2383
|
}
|
|
2351
|
-
}),
|
|
2384
|
+
}), Ei = (e, t) => {
|
|
2352
2385
|
let n = e.__vccOpts || e;
|
|
2353
2386
|
for (let [e, r] of t) n[e] = r;
|
|
2354
2387
|
return n;
|
|
2355
|
-
},
|
|
2356
|
-
function
|
|
2357
|
-
return f(), A("div",
|
|
2388
|
+
}, Di = {}, Oi = { class: "tpl-loading-track" };
|
|
2389
|
+
function ki(e, t) {
|
|
2390
|
+
return f(), A("div", Oi);
|
|
2358
2391
|
}
|
|
2359
|
-
var
|
|
2392
|
+
var Ai = /* @__PURE__ */ Ei(Di, [["render", ki], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2360
2393
|
//#endregion
|
|
2361
2394
|
//#region src/composables/useEditorRoot.ts
|
|
2362
|
-
function
|
|
2363
|
-
return v(
|
|
2395
|
+
function ji() {
|
|
2396
|
+
return v($n, document) ?? document;
|
|
2364
2397
|
}
|
|
2365
2398
|
//#endregion
|
|
2366
2399
|
//#region src/composables/useFocusTrap.ts
|
|
2367
|
-
var
|
|
2368
|
-
function
|
|
2369
|
-
let n =
|
|
2400
|
+
var Mi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2401
|
+
function Ni(e, t) {
|
|
2402
|
+
let n = ji(), r = null, i = null, a = null;
|
|
2370
2403
|
function o() {
|
|
2371
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2404
|
+
return e.value ? Array.from(e.value.querySelectorAll(Mi)).filter((e) => e.offsetParent !== null) : [];
|
|
2372
2405
|
}
|
|
2373
2406
|
function s(e) {
|
|
2374
2407
|
if (e.key !== "Tab") return;
|
|
@@ -2398,18 +2431,18 @@ function Mi(e, t) {
|
|
|
2398
2431
|
}
|
|
2399
2432
|
//#endregion
|
|
2400
2433
|
//#region src/composables/useCloudI18n.ts
|
|
2401
|
-
function
|
|
2434
|
+
function Pi(e, t) {
|
|
2402
2435
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2403
2436
|
}
|
|
2404
|
-
function
|
|
2405
|
-
let t = e ?? v(
|
|
2437
|
+
function Fi(e) {
|
|
2438
|
+
let t = e ?? v(or, null);
|
|
2406
2439
|
return {
|
|
2407
2440
|
t: t ? u(t) ? t.value : t : null,
|
|
2408
|
-
format:
|
|
2441
|
+
format: Pi
|
|
2409
2442
|
};
|
|
2410
2443
|
}
|
|
2411
|
-
function
|
|
2412
|
-
let { t, format: n } =
|
|
2444
|
+
function Ii(e) {
|
|
2445
|
+
let { t, format: n } = Fi(e);
|
|
2413
2446
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2414
2447
|
return {
|
|
2415
2448
|
t,
|
|
@@ -2418,8 +2451,8 @@ function Fi(e) {
|
|
|
2418
2451
|
}
|
|
2419
2452
|
//#endregion
|
|
2420
2453
|
//#region src/composables/useMergeTag.ts
|
|
2421
|
-
function
|
|
2422
|
-
let e = v(
|
|
2454
|
+
function Li() {
|
|
2455
|
+
let e = v(Un, []), t = v(Wn, ct.liquid), n = v(Gn, null), r = v(Kn, !0), i = C(!1);
|
|
2423
2456
|
function a(e) {
|
|
2424
2457
|
return pt(e, t);
|
|
2425
2458
|
}
|
|
@@ -2448,8 +2481,8 @@ function Ii() {
|
|
|
2448
2481
|
}
|
|
2449
2482
|
//#endregion
|
|
2450
2483
|
//#region src/composables/useEmoji.ts
|
|
2451
|
-
function
|
|
2452
|
-
let [e, t] =
|
|
2484
|
+
function Ri() {
|
|
2485
|
+
let [e, t] = an(!1), r = n([]), i = !1;
|
|
2453
2486
|
l(() => {
|
|
2454
2487
|
i = !0;
|
|
2455
2488
|
}), U(e, async (e) => {
|
|
@@ -2474,7 +2507,7 @@ function Li() {
|
|
|
2474
2507
|
}
|
|
2475
2508
|
//#endregion
|
|
2476
2509
|
//#region src/composables/useDragDrop.ts
|
|
2477
|
-
function
|
|
2510
|
+
function zi(e) {
|
|
2478
2511
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2479
2512
|
function o(e) {
|
|
2480
2513
|
r.value = !0, i.value = e;
|
|
@@ -2524,7 +2557,7 @@ function Ri(e) {
|
|
|
2524
2557
|
}
|
|
2525
2558
|
//#endregion
|
|
2526
2559
|
//#region src/composables/useFonts.ts
|
|
2527
|
-
var
|
|
2560
|
+
var Bi = [
|
|
2528
2561
|
{
|
|
2529
2562
|
value: "Arial",
|
|
2530
2563
|
label: "Arial"
|
|
@@ -2553,7 +2586,7 @@ var zi = [
|
|
|
2553
2586
|
value: "Courier New",
|
|
2554
2587
|
label: "Courier New"
|
|
2555
2588
|
}
|
|
2556
|
-
],
|
|
2589
|
+
], Vi = {
|
|
2557
2590
|
arial: "Arial, sans-serif",
|
|
2558
2591
|
helvetica: "Helvetica, sans-serif",
|
|
2559
2592
|
georgia: "Georgia, serif",
|
|
@@ -2561,14 +2594,14 @@ var zi = [
|
|
|
2561
2594
|
verdana: "Verdana, sans-serif",
|
|
2562
2595
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2563
2596
|
"courier new": "'Courier New', monospace"
|
|
2564
|
-
},
|
|
2565
|
-
function
|
|
2566
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = k(() => e?.defaultFallback ??
|
|
2597
|
+
}, Hi = "Arial, sans-serif";
|
|
2598
|
+
function Ui(e) {
|
|
2599
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = k(() => e?.defaultFallback ?? Hi);
|
|
2567
2600
|
function a(e) {
|
|
2568
2601
|
n.value = e;
|
|
2569
2602
|
}
|
|
2570
2603
|
let o = k(() => {
|
|
2571
|
-
let e = [...
|
|
2604
|
+
let e = [...Bi];
|
|
2572
2605
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2573
2606
|
let r = t.value.map((e) => ({
|
|
2574
2607
|
value: e.name,
|
|
@@ -2581,23 +2614,23 @@ function Hi(e) {
|
|
|
2581
2614
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2582
2615
|
}
|
|
2583
2616
|
function u(e) {
|
|
2584
|
-
return
|
|
2617
|
+
return Bi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2585
2618
|
}
|
|
2586
2619
|
function d() {
|
|
2587
2620
|
if (e?.defaultFont) {
|
|
2588
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2621
|
+
if (!n.value && !u(e.defaultFont)) return Hi;
|
|
2589
2622
|
if (c(e.defaultFont)) {
|
|
2590
2623
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2591
2624
|
if (t) return t.value;
|
|
2592
2625
|
}
|
|
2593
2626
|
}
|
|
2594
|
-
return
|
|
2627
|
+
return Hi;
|
|
2595
2628
|
}
|
|
2596
2629
|
let f = k(() => d());
|
|
2597
2630
|
function p(e) {
|
|
2598
2631
|
if (!e) return i.value;
|
|
2599
2632
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2600
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2633
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Vi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2601
2634
|
}
|
|
2602
2635
|
let m = [], h = !1;
|
|
2603
2636
|
async function g() {
|
|
@@ -2613,7 +2646,7 @@ function Hi(e) {
|
|
|
2613
2646
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2614
2647
|
});
|
|
2615
2648
|
} catch (t) {
|
|
2616
|
-
|
|
2649
|
+
_r.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2617
2650
|
}
|
|
2618
2651
|
});
|
|
2619
2652
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2640,9 +2673,9 @@ function Hi(e) {
|
|
|
2640
2673
|
}
|
|
2641
2674
|
//#endregion
|
|
2642
2675
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2643
|
-
function
|
|
2676
|
+
function Wi(e) {
|
|
2644
2677
|
let t = C(!1), n = C(""), r = C(null);
|
|
2645
|
-
|
|
2678
|
+
Ni(r, t);
|
|
2646
2679
|
function i() {
|
|
2647
2680
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2648
2681
|
}
|
|
@@ -2693,8 +2726,8 @@ function Ui(e) {
|
|
|
2693
2726
|
}
|
|
2694
2727
|
//#endregion
|
|
2695
2728
|
//#region src/composables/useRichTextEditor.ts
|
|
2696
|
-
function
|
|
2697
|
-
let t = v(
|
|
2729
|
+
function Gi(e) {
|
|
2730
|
+
let t = v(Nn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Li(), l = v(Mn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = ut(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = Wi(p), { start: w, stop: T } = rn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), E = n(null), D = C(!0), O = C(null), ee = !1;
|
|
2698
2731
|
async function te() {
|
|
2699
2732
|
O.value = null, D.value = !0;
|
|
2700
2733
|
try {
|
|
@@ -2724,7 +2757,7 @@ function Wi(e) {
|
|
|
2724
2757
|
p.value = l, D.value = !1, w();
|
|
2725
2758
|
} catch (t) {
|
|
2726
2759
|
if (ee) return;
|
|
2727
|
-
|
|
2760
|
+
_r.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", D.value = !1;
|
|
2728
2761
|
}
|
|
2729
2762
|
}
|
|
2730
2763
|
function k() {
|
|
@@ -2772,20 +2805,20 @@ function Wi(e) {
|
|
|
2772
2805
|
}
|
|
2773
2806
|
//#endregion
|
|
2774
2807
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2775
|
-
var
|
|
2808
|
+
var Ki = { class: "tpl:w-full" }, qi = {
|
|
2776
2809
|
key: 0,
|
|
2777
2810
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
|
|
2778
|
-
},
|
|
2811
|
+
}, Ji = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yi = {
|
|
2779
2812
|
key: 1,
|
|
2780
2813
|
class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
|
|
2781
|
-
},
|
|
2814
|
+
}, Xi = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Zi = {
|
|
2782
2815
|
key: 2,
|
|
2783
2816
|
class: "tpl:relative"
|
|
2784
|
-
},
|
|
2817
|
+
}, Qi = ["innerHTML"], $i = {
|
|
2785
2818
|
key: 0,
|
|
2786
2819
|
class: "tpl:absolute tpl:inset-0 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:rounded tpl:backdrop-blur-[2px]",
|
|
2787
2820
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2788
|
-
},
|
|
2821
|
+
}, ea = /* @__PURE__ */ V({
|
|
2789
2822
|
__name: "CustomBlock",
|
|
2790
2823
|
props: {
|
|
2791
2824
|
block: {},
|
|
@@ -2793,7 +2826,7 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2793
2826
|
},
|
|
2794
2827
|
emits: ["fetchData"],
|
|
2795
2828
|
setup(e, { emit: t }) {
|
|
2796
|
-
let n = e, i = t, { t: a } =
|
|
2829
|
+
let n = e, i = t, { t: a } = lr(), o = v(Vn, null), s = C(""), c = C(!1), l = k(() => o?.getDefinition(n.block.customType)), u = k(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Mt({
|
|
2797
2830
|
definition: l,
|
|
2798
2831
|
block: k(() => n.block),
|
|
2799
2832
|
onUpdate: (e, t) => {
|
|
@@ -2814,15 +2847,15 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2814
2847
|
}
|
|
2815
2848
|
}
|
|
2816
2849
|
}
|
|
2817
|
-
let _ =
|
|
2850
|
+
let _ = $t(g, 150);
|
|
2818
2851
|
return r(() => {
|
|
2819
2852
|
g();
|
|
2820
2853
|
}), U(() => n.block.fieldValues, () => {
|
|
2821
2854
|
_();
|
|
2822
|
-
}, { deep: !0 }), (e, t) => (f(), A("div",
|
|
2855
|
+
}, { deep: !0 }), (e, t) => (f(), A("div", Ki, [u.value ? c.value ? (f(), A("div", Yi, [H(M(_i), {
|
|
2823
2856
|
size: 24,
|
|
2824
2857
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2825
|
-
}), L("span",
|
|
2858
|
+
}), L("span", Xi, O(M(a).customBlocks.renderError), 1)])) : (f(), A("div", Zi, [L("div", { innerHTML: s.value }, null, 8, Qi), M(h) && M(m) ? (f(), A("div", $i, [M(d) ? (f(), P(Ai, {
|
|
2826
2859
|
key: 1,
|
|
2827
2860
|
class: "tpl:w-48"
|
|
2828
2861
|
})) : (f(), A("button", {
|
|
@@ -2830,16 +2863,16 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2830
2863
|
type: "button",
|
|
2831
2864
|
class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
|
|
2832
2865
|
onClick: t[0] ||= N((...e) => M(p) && M(p)(...e), ["stop"])
|
|
2833
|
-
}, [l.value?.icon ? (f(), P(
|
|
2866
|
+
}, [l.value?.icon ? (f(), P(Ti, {
|
|
2834
2867
|
key: 0,
|
|
2835
2868
|
icon: l.value.icon,
|
|
2836
2869
|
size: 16
|
|
2837
|
-
}, null, 8, ["icon"])) : j("", !0), B(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div",
|
|
2870
|
+
}, null, 8, ["icon"])) : j("", !0), B(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div", qi, [H(M(oi), {
|
|
2838
2871
|
size: 24,
|
|
2839
2872
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2840
|
-
}), L("span",
|
|
2873
|
+
}), L("span", Ji, O(M(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2841
2874
|
}
|
|
2842
|
-
}),
|
|
2875
|
+
}), ta = { class: "tpl:w-full" }, na = /* @__PURE__ */ V({
|
|
2843
2876
|
__name: "DividerBlock",
|
|
2844
2877
|
props: {
|
|
2845
2878
|
block: {},
|
|
@@ -2851,34 +2884,34 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2851
2884
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2852
2885
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2853
2886
|
}));
|
|
2854
|
-
return (e, t) => (f(), A("div",
|
|
2887
|
+
return (e, t) => (f(), A("div", ta, [L("hr", {
|
|
2855
2888
|
class: "tpl:m-0 tpl:border-none",
|
|
2856
2889
|
style: R(n.value)
|
|
2857
2890
|
}, null, 4)]));
|
|
2858
2891
|
}
|
|
2859
|
-
}),
|
|
2892
|
+
}), ra = { class: "tpl:w-full" }, ia = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, aa = {
|
|
2860
2893
|
key: 0,
|
|
2861
2894
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2862
|
-
},
|
|
2895
|
+
}, oa = {
|
|
2863
2896
|
key: 1,
|
|
2864
2897
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2865
|
-
},
|
|
2898
|
+
}, sa = /* @__PURE__ */ V({
|
|
2866
2899
|
__name: "HtmlBlock",
|
|
2867
2900
|
props: {
|
|
2868
2901
|
block: {},
|
|
2869
2902
|
viewport: {}
|
|
2870
2903
|
},
|
|
2871
2904
|
setup(e) {
|
|
2872
|
-
let t = e, { t: n } =
|
|
2873
|
-
return (e, t) => (f(), A("div",
|
|
2905
|
+
let t = e, { t: n } = lr(), r = k(() => t.block.content.trim().length > 0);
|
|
2906
|
+
return (e, t) => (f(), A("div", ra, [L("div", ia, [H(M(Gr), {
|
|
2874
2907
|
size: 24,
|
|
2875
2908
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2876
|
-
}), r.value ? (f(), A("span",
|
|
2909
|
+
}), r.value ? (f(), A("span", aa, O(M(n).html.preview), 1)) : (f(), A("span", oa, O(M(n).html.empty), 1))])]));
|
|
2877
2910
|
}
|
|
2878
2911
|
});
|
|
2879
2912
|
//#endregion
|
|
2880
2913
|
//#region src/composables/useAliveFlag.ts
|
|
2881
|
-
function
|
|
2914
|
+
function ca() {
|
|
2882
2915
|
let e = { alive: !0 };
|
|
2883
2916
|
return ne(() => {
|
|
2884
2917
|
e.alive = !1;
|
|
@@ -2886,13 +2919,13 @@ function sa() {
|
|
|
2886
2919
|
}
|
|
2887
2920
|
//#endregion
|
|
2888
2921
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2889
|
-
var
|
|
2922
|
+
var la = ["href"], ua = ["src", "alt"], da = ["src", "alt"], fa = {
|
|
2890
2923
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2891
2924
|
style: { opacity: "0.7" }
|
|
2892
|
-
},
|
|
2925
|
+
}, pa = ["href"], ma = ["src", "alt"], ha = ["src", "alt"], ga = {
|
|
2893
2926
|
key: 3,
|
|
2894
2927
|
class: "tpl:flex tpl:min-h-[100px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
2895
|
-
},
|
|
2928
|
+
}, _a = ["aria-label"], va = { key: 1 }, ya = /* @__PURE__ */ V({
|
|
2896
2929
|
__name: "ImageBlock",
|
|
2897
2930
|
props: {
|
|
2898
2931
|
block: {},
|
|
@@ -2900,7 +2933,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2900
2933
|
},
|
|
2901
2934
|
emits: ["update"],
|
|
2902
2935
|
setup(e, { emit: t }) {
|
|
2903
|
-
let n = e, r = t, { t: i } =
|
|
2936
|
+
let n = e, r = t, { t: i } = lr(), { syntax: a } = Li(), o = v(qn, null), s = k(() => !!o), c = ca();
|
|
2904
2937
|
async function l() {
|
|
2905
2938
|
let e = await o?.({ accept: ["images"] });
|
|
2906
2939
|
if (c.alive && e) {
|
|
@@ -2933,22 +2966,22 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2933
2966
|
src: e.block.placeholderUrl,
|
|
2934
2967
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2935
2968
|
style: R(d.value)
|
|
2936
|
-
}, null, 12,
|
|
2969
|
+
}, null, 12, ua)], 8, la)) : (f(), A("img", {
|
|
2937
2970
|
key: 1,
|
|
2938
2971
|
class: "tpl:border-0",
|
|
2939
2972
|
src: e.block.placeholderUrl,
|
|
2940
2973
|
alt: e.block.alt,
|
|
2941
2974
|
style: R(d.value)
|
|
2942
|
-
}, null, 12,
|
|
2975
|
+
}, null, 12, da))], 64)) : e.block.src && p.value ? (f(), A("div", {
|
|
2943
2976
|
key: 1,
|
|
2944
2977
|
class: "tpl:!flex tpl:min-h-[120px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
2945
2978
|
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
2946
|
-
}, [H(M(
|
|
2979
|
+
}, [H(M(ei), {
|
|
2947
2980
|
size: 32,
|
|
2948
2981
|
"stroke-width": 1.5,
|
|
2949
2982
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2950
2983
|
style: { opacity: "0.5" }
|
|
2951
|
-
}), L("span",
|
|
2984
|
+
}), L("span", fa, O(e.block.src), 1)], 4)) : e.block.src ? (f(), A(z, { key: 2 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2952
2985
|
key: 0,
|
|
2953
2986
|
href: e.block.linkUrl,
|
|
2954
2987
|
target: "_blank",
|
|
@@ -2960,33 +2993,33 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2960
2993
|
src: e.block.src,
|
|
2961
2994
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2962
2995
|
style: R(d.value)
|
|
2963
|
-
}, null, 12,
|
|
2996
|
+
}, null, 12, ma)], 8, pa)) : (f(), A("img", {
|
|
2964
2997
|
key: 1,
|
|
2965
2998
|
class: "tpl:border-0",
|
|
2966
2999
|
src: e.block.src,
|
|
2967
3000
|
alt: e.block.alt,
|
|
2968
3001
|
style: R(d.value)
|
|
2969
|
-
}, null, 12,
|
|
3002
|
+
}, null, 12, ha))], 64)) : (f(), A("div", ga, [s.value ? (f(), A("button", {
|
|
2970
3003
|
key: 0,
|
|
2971
3004
|
"aria-label": M(i).image.browseMedia,
|
|
2972
3005
|
class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:cursor-pointer tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)] tpl:bg-[var(--tpl-bg)]",
|
|
2973
3006
|
onClick: N(l, ["stop"])
|
|
2974
|
-
}, [H(M(
|
|
3007
|
+
}, [H(M(ei), {
|
|
2975
3008
|
size: 14,
|
|
2976
3009
|
"stroke-width": 1.5
|
|
2977
|
-
}), B(" " + O(M(i).image.browseMedia), 1)], 8,
|
|
3010
|
+
}), B(" " + O(M(i).image.browseMedia), 1)], 8, _a)) : (f(), A("span", va, O(M(i).image.clickToAdd), 1))]))], 4));
|
|
2978
3011
|
}
|
|
2979
|
-
}),
|
|
3012
|
+
}), ba = { class: "tpl:w-full" }, xa = ["href"], Sa = {
|
|
2980
3013
|
key: 1,
|
|
2981
3014
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
2982
|
-
},
|
|
3015
|
+
}, Ca = /* @__PURE__ */ V({
|
|
2983
3016
|
__name: "MenuBlock",
|
|
2984
3017
|
props: {
|
|
2985
3018
|
block: {},
|
|
2986
3019
|
viewport: {}
|
|
2987
3020
|
},
|
|
2988
3021
|
setup(e) {
|
|
2989
|
-
let t = e, { t: n } =
|
|
3022
|
+
let t = e, { t: n } = lr(), r = k(() => ({
|
|
2990
3023
|
display: "flex",
|
|
2991
3024
|
flexWrap: "wrap",
|
|
2992
3025
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2998,7 +3031,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2998
3031
|
function a(e) {
|
|
2999
3032
|
return e || t.block.linkColor || t.block.color;
|
|
3000
3033
|
}
|
|
3001
|
-
return (t, o) => (f(), A("div",
|
|
3034
|
+
return (t, o) => (f(), A("div", ba, [i.value ? (f(), A("div", {
|
|
3002
3035
|
key: 0,
|
|
3003
3036
|
style: R(r.value)
|
|
3004
3037
|
}, [(f(!0), A(z, null, h(e.block.items, (t, n) => (f(), A(z, { key: t.id }, [L("a", {
|
|
@@ -3010,15 +3043,15 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3010
3043
|
textDecoration: t.underline ? "underline" : "none"
|
|
3011
3044
|
}),
|
|
3012
3045
|
onClick: o[0] ||= N(() => {}, ["prevent"])
|
|
3013
|
-
}, O(t.text || "..."), 13,
|
|
3046
|
+
}, O(t.text || "..."), 13, xa), n < e.block.items.length - 1 ? (f(), A("span", {
|
|
3014
3047
|
key: 0,
|
|
3015
3048
|
style: R({
|
|
3016
3049
|
color: e.block.separatorColor,
|
|
3017
3050
|
padding: `0 ${e.block.spacing}px`
|
|
3018
3051
|
})
|
|
3019
|
-
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div",
|
|
3052
|
+
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", Sa, [H(M(ii), { size: 16 }), L("span", null, O(M(n).menu.addLinks), 1)]))]));
|
|
3020
3053
|
}
|
|
3021
|
-
}),
|
|
3054
|
+
}), wa = new Set([
|
|
3022
3055
|
"http",
|
|
3023
3056
|
"https",
|
|
3024
3057
|
"mailto",
|
|
@@ -3028,7 +3061,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3028
3061
|
"sms",
|
|
3029
3062
|
"xmpp",
|
|
3030
3063
|
"cid"
|
|
3031
|
-
]),
|
|
3064
|
+
]), Ta = new Set([
|
|
3032
3065
|
"SCRIPT",
|
|
3033
3066
|
"STYLE",
|
|
3034
3067
|
"IFRAME",
|
|
@@ -3038,7 +3071,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3038
3071
|
"META",
|
|
3039
3072
|
"BASE",
|
|
3040
3073
|
"FORM"
|
|
3041
|
-
]),
|
|
3074
|
+
]), Ea = new Set([
|
|
3042
3075
|
"href",
|
|
3043
3076
|
"xlink:href",
|
|
3044
3077
|
"formaction",
|
|
@@ -3047,16 +3080,16 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3047
3080
|
"background",
|
|
3048
3081
|
"poster"
|
|
3049
3082
|
]);
|
|
3050
|
-
function
|
|
3083
|
+
function Da(e, t) {
|
|
3051
3084
|
let n = e.trim();
|
|
3052
3085
|
if (!n || n.startsWith("#")) return !0;
|
|
3053
3086
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3054
3087
|
if (!r) return !0;
|
|
3055
3088
|
let i = r[1].toLowerCase();
|
|
3056
|
-
return
|
|
3089
|
+
return wa.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3057
3090
|
}
|
|
3058
|
-
function
|
|
3059
|
-
if (
|
|
3091
|
+
function Oa(e) {
|
|
3092
|
+
if (Ta.has(e.tagName)) {
|
|
3060
3093
|
e.remove();
|
|
3061
3094
|
return;
|
|
3062
3095
|
}
|
|
@@ -3068,29 +3101,29 @@ function Da(e) {
|
|
|
3068
3101
|
e.removeAttribute(n);
|
|
3069
3102
|
continue;
|
|
3070
3103
|
}
|
|
3071
|
-
if (
|
|
3072
|
-
|
|
3104
|
+
if (Ea.has(t)) {
|
|
3105
|
+
Da(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3073
3106
|
continue;
|
|
3074
3107
|
}
|
|
3075
3108
|
if (t === "src") {
|
|
3076
|
-
|
|
3109
|
+
Da(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3077
3110
|
continue;
|
|
3078
3111
|
}
|
|
3079
3112
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3080
3113
|
}
|
|
3081
3114
|
let n = Array.from(e.children);
|
|
3082
|
-
for (let e of n)
|
|
3115
|
+
for (let e of n) Oa(e);
|
|
3083
3116
|
}
|
|
3084
|
-
function
|
|
3117
|
+
function ka(e) {
|
|
3085
3118
|
if (typeof DOMParser > "u") return e;
|
|
3086
3119
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3087
|
-
for (let e of n)
|
|
3120
|
+
for (let e of n) Oa(e);
|
|
3088
3121
|
return t.innerHTML;
|
|
3089
3122
|
}
|
|
3090
3123
|
//#endregion
|
|
3091
3124
|
//#region src/composables/useEditableTextBlock.ts
|
|
3092
|
-
function
|
|
3093
|
-
let t = v(
|
|
3125
|
+
function Aa(e) {
|
|
3126
|
+
let t = v(Un, []), { syntax: n } = Li(), r = k(() => ka(yt(ht(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Cn(a), c = k(() => ({
|
|
3094
3127
|
top: o.value - 8,
|
|
3095
3128
|
left: s.value
|
|
3096
3129
|
}));
|
|
@@ -3111,14 +3144,14 @@ function ka(e) {
|
|
|
3111
3144
|
}
|
|
3112
3145
|
//#endregion
|
|
3113
3146
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3114
|
-
var
|
|
3147
|
+
var ja = ["innerHTML"], Ma = /* @__PURE__ */ V({
|
|
3115
3148
|
__name: "ParagraphBlock",
|
|
3116
3149
|
props: {
|
|
3117
3150
|
block: {},
|
|
3118
3151
|
viewport: {}
|
|
3119
3152
|
},
|
|
3120
3153
|
setup(e) {
|
|
3121
|
-
let t = e, n = E(() => import("./ParagraphEditor-
|
|
3154
|
+
let t = e, n = E(() => import("./ParagraphEditor-C4TrTIOm.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Aa(() => t.block.content);
|
|
3122
3155
|
return (t, l) => (f(), A("div", {
|
|
3123
3156
|
ref_key: "blockRef",
|
|
3124
3157
|
ref: i,
|
|
@@ -3137,19 +3170,19 @@ var Aa = ["innerHTML"], ja = /* @__PURE__ */ V({
|
|
|
3137
3170
|
key: 1,
|
|
3138
3171
|
class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
|
|
3139
3172
|
innerHTML: M(o)
|
|
3140
|
-
}, null, 8,
|
|
3173
|
+
}, null, 8, ja))], 544));
|
|
3141
3174
|
}
|
|
3142
3175
|
});
|
|
3143
3176
|
//#endregion
|
|
3144
3177
|
//#region src/utils/blockComponentResolver.ts
|
|
3145
|
-
function
|
|
3178
|
+
function Na(e, t, n) {
|
|
3146
3179
|
if (t) {
|
|
3147
3180
|
let n = t.getComponent(e);
|
|
3148
3181
|
if (n) return n;
|
|
3149
3182
|
}
|
|
3150
3183
|
return n[e.type] ?? null;
|
|
3151
3184
|
}
|
|
3152
|
-
function
|
|
3185
|
+
function Pa(e) {
|
|
3153
3186
|
let { padding: t, margin: n, backgroundColor: r } = e.styles;
|
|
3154
3187
|
return {
|
|
3155
3188
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -3159,20 +3192,20 @@ function Na(e) {
|
|
|
3159
3192
|
}
|
|
3160
3193
|
//#endregion
|
|
3161
3194
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3162
|
-
var
|
|
3195
|
+
var Fa = ["data-block-id", "data-block-type"], Ia = ["aria-label"], La = [
|
|
3163
3196
|
"aria-label",
|
|
3164
3197
|
"aria-pressed",
|
|
3165
3198
|
"title"
|
|
3166
|
-
],
|
|
3199
|
+
], Ra = ["aria-label", "title"], za = ["aria-label", "title"], Ba = ["aria-label", "title"], Va = {
|
|
3167
3200
|
key: 1,
|
|
3168
3201
|
class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
|
|
3169
|
-
},
|
|
3202
|
+
}, Ha = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, Ua = {
|
|
3170
3203
|
key: 2,
|
|
3171
3204
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3172
|
-
},
|
|
3205
|
+
}, Wa = ["aria-label", "title"], Ga = {
|
|
3173
3206
|
key: 3,
|
|
3174
3207
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3175
|
-
},
|
|
3208
|
+
}, Ka = ["aria-label"], qa = /* @__PURE__ */ Ei(/* @__PURE__ */ V({
|
|
3176
3209
|
__name: "BlockWrapper",
|
|
3177
3210
|
props: {
|
|
3178
3211
|
block: {},
|
|
@@ -3182,7 +3215,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3182
3215
|
},
|
|
3183
3216
|
emits: ["select"],
|
|
3184
3217
|
setup(e, { emit: t }) {
|
|
3185
|
-
let n = E(() => import("./BlockIssueBadge-
|
|
3218
|
+
let n = E(() => import("./BlockIssueBadge-BovmWgok.js")), r = e, i = t, { t: a, format: s } = lr(), c = v(Zn, null), l = C(null), u = k(() => c?.liftedBlockId.value === r.block.id), d = k(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3186
3219
|
async function p() {
|
|
3187
3220
|
await m(), l.value?.focus();
|
|
3188
3221
|
}
|
|
@@ -3209,8 +3242,8 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3209
3242
|
desktop: a.viewport.desktop,
|
|
3210
3243
|
tablet: a.viewport.tablet,
|
|
3211
3244
|
mobile: a.viewport.mobile
|
|
3212
|
-
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(
|
|
3213
|
-
let e =
|
|
3245
|
+
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(Fn, null), x = v(In, null), S = v(Xn, {}), w = k(() => !!S.savedModules), T = k(() => S.comments?.getBlockCount(r.block.id) ?? 0), D = k(() => ({ margin: Pa(r.block).margin })), ee = k(() => {
|
|
3246
|
+
let e = Pa(r.block);
|
|
3214
3247
|
return {
|
|
3215
3248
|
padding: e.padding,
|
|
3216
3249
|
backgroundColor: e.backgroundColor
|
|
@@ -3258,90 +3291,90 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3258
3291
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3259
3292
|
title: M(a).blockActions.drag,
|
|
3260
3293
|
onKeydown: h
|
|
3261
|
-
}, [H(M(
|
|
3294
|
+
}, [H(M(Qr), {
|
|
3262
3295
|
size: 14,
|
|
3263
3296
|
"stroke-width": 1.5
|
|
3264
|
-
})], 40,
|
|
3297
|
+
})], 40, La),
|
|
3265
3298
|
L("button", {
|
|
3266
3299
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3267
3300
|
"aria-label": M(a).blockActions.duplicate,
|
|
3268
3301
|
title: M(a).blockActions.duplicate,
|
|
3269
3302
|
onClick: N(P, ["stop"])
|
|
3270
|
-
}, [H(M(
|
|
3303
|
+
}, [H(M(Kr), {
|
|
3271
3304
|
size: 14,
|
|
3272
3305
|
"stroke-width": 1.5
|
|
3273
|
-
})], 8,
|
|
3306
|
+
})], 8, Ra),
|
|
3274
3307
|
w.value ? (f(), A("button", {
|
|
3275
3308
|
key: 0,
|
|
3276
3309
|
class: "tpl-block-action-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3277
3310
|
"aria-label": M(a).blockActions.saveAsModule,
|
|
3278
3311
|
title: M(a).blockActions.saveAsModule,
|
|
3279
3312
|
onClick: N(re, ["stop"])
|
|
3280
|
-
}, [H(M(
|
|
3313
|
+
}, [H(M(Fr), {
|
|
3281
3314
|
size: 14,
|
|
3282
3315
|
"stroke-width": 1.5
|
|
3283
|
-
})], 8,
|
|
3316
|
+
})], 8, za)) : j("", !0),
|
|
3284
3317
|
L("button", {
|
|
3285
3318
|
class: "tpl-block-action-btn tpl-block-delete-btn tpl:flex tpl:size-7 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-sm tpl:border-none tpl:transition-colors tpl:duration-150",
|
|
3286
3319
|
"aria-label": M(a).blockActions.delete,
|
|
3287
3320
|
title: M(a).blockActions.delete,
|
|
3288
3321
|
onClick: N(ne, ["stop"])
|
|
3289
|
-
}, [H(M(
|
|
3322
|
+
}, [H(M(gi), {
|
|
3290
3323
|
size: 14,
|
|
3291
3324
|
"stroke-width": 1.5
|
|
3292
|
-
})], 8,
|
|
3293
|
-
], 8,
|
|
3294
|
-
g.value ? (f(), A("div",
|
|
3325
|
+
})], 8, Ba)
|
|
3326
|
+
], 8, Ia)) : j("", !0),
|
|
3327
|
+
g.value ? (f(), A("div", Va, [L("span", Ha, [H(M(qr), {
|
|
3295
3328
|
size: 12,
|
|
3296
3329
|
"stroke-width": 1.5
|
|
3297
3330
|
}), B(" " + O(M(s)(M(a).blockActions.hiddenOnViewport, { viewport: _.value })), 1)])])) : j("", !0),
|
|
3298
|
-
y.value && !g.value ? (f(), A("div",
|
|
3331
|
+
y.value && !g.value ? (f(), A("div", Ua, [L("button", {
|
|
3299
3332
|
class: "tpl-condition-toggle tpl:flex tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-primary)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
3300
3333
|
"aria-label": M(a).blockActions.conditionToggle,
|
|
3301
3334
|
title: e.block.displayCondition?.label,
|
|
3302
3335
|
onClick: N(F, ["stop"])
|
|
3303
|
-
}, [H(M(
|
|
3336
|
+
}, [H(M(Zr), {
|
|
3304
3337
|
size: 12,
|
|
3305
3338
|
"stroke-width": 2
|
|
3306
|
-
})], 8,
|
|
3307
|
-
T.value > 0 && !g.value ? (f(), A("div",
|
|
3339
|
+
})], 8, Wa)])) : j("", !0),
|
|
3340
|
+
T.value > 0 && !g.value ? (f(), A("div", Ga, [L("button", {
|
|
3308
3341
|
class: "tpl-comment-indicator tpl:flex tpl:min-h-6 tpl:min-w-6 tpl:cursor-pointer tpl:items-center tpl:justify-center tpl:gap-0.5 tpl:rounded-full tpl:border-none tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-semibold tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary)]",
|
|
3309
3342
|
"aria-label": M(s)(M(a).blockActions.comments, { count: String(T.value) }),
|
|
3310
3343
|
onClick: r[0] ||= N((t) => M(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3311
|
-
}, [H(M(
|
|
3344
|
+
}, [H(M(ri), {
|
|
3312
3345
|
size: 12,
|
|
3313
3346
|
"stroke-width": 2.5
|
|
3314
|
-
}), B(" " + O(T.value), 1)], 8,
|
|
3347
|
+
}), B(" " + O(T.value), 1)], 8, Ka)])) : j("", !0),
|
|
3315
3348
|
L("div", {
|
|
3316
3349
|
class: "tpl-block-content",
|
|
3317
3350
|
style: R(ee.value)
|
|
3318
3351
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3319
|
-
], 14,
|
|
3352
|
+
], 14, Fa));
|
|
3320
3353
|
}
|
|
3321
3354
|
}), [["__scopeId", "data-v-e77eb94e"]]);
|
|
3322
3355
|
//#endregion
|
|
3323
3356
|
//#region src/utils/unwrapParagraph.ts
|
|
3324
|
-
function
|
|
3357
|
+
function Ja(e) {
|
|
3325
3358
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3326
3359
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3327
3360
|
}
|
|
3328
3361
|
//#endregion
|
|
3329
3362
|
//#region src/components/blocks/TitleBlock.vue
|
|
3330
|
-
var
|
|
3363
|
+
var Ya = /* @__PURE__ */ V({
|
|
3331
3364
|
__name: "TitleBlock",
|
|
3332
3365
|
props: {
|
|
3333
3366
|
block: {},
|
|
3334
3367
|
viewport: {}
|
|
3335
3368
|
},
|
|
3336
3369
|
setup(e) {
|
|
3337
|
-
let t = e, n = E(() => import("./TitleEditor-
|
|
3370
|
+
let t = e, n = E(() => import("./TitleEditor-gr-eBUq_.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Aa(() => t.block.content), l = k(() => {
|
|
3338
3371
|
let e = {
|
|
3339
3372
|
fontSize: `${fe[t.block.level]}px`,
|
|
3340
3373
|
color: t.block.color,
|
|
3341
3374
|
textAlign: t.block.textAlign
|
|
3342
3375
|
};
|
|
3343
3376
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3344
|
-
}), u = k(() => `h${t.block.level}`), p = k(() =>
|
|
3377
|
+
}), u = k(() => `h${t.block.level}`), p = k(() => Ja(o.value));
|
|
3345
3378
|
return (t, o) => (f(), A("div", {
|
|
3346
3379
|
ref_key: "blockRef",
|
|
3347
3380
|
ref: i,
|
|
@@ -3364,11 +3397,11 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3364
3397
|
innerHTML: p.value
|
|
3365
3398
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3366
3399
|
}
|
|
3367
|
-
}),
|
|
3400
|
+
}), Xa = { class: "tpl:w-full" }, Za = { class: "tpl:flex tpl:gap-0" }, Qa = {
|
|
3368
3401
|
key: 0,
|
|
3369
3402
|
"data-testid": "section-drop-hint",
|
|
3370
3403
|
class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:flex tpl:items-center tpl:justify-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
3371
|
-
},
|
|
3404
|
+
}, $a = /* @__PURE__ */ V({
|
|
3372
3405
|
__name: "SectionBlock",
|
|
3373
3406
|
props: {
|
|
3374
3407
|
block: {},
|
|
@@ -3376,13 +3409,13 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3376
3409
|
},
|
|
3377
3410
|
setup(e) {
|
|
3378
3411
|
let t = {
|
|
3379
|
-
title:
|
|
3380
|
-
paragraph:
|
|
3381
|
-
image:
|
|
3382
|
-
button:
|
|
3383
|
-
divider:
|
|
3384
|
-
custom:
|
|
3385
|
-
}, n = e, { t: r } =
|
|
3412
|
+
title: Ya,
|
|
3413
|
+
paragraph: Ma,
|
|
3414
|
+
image: ya,
|
|
3415
|
+
button: Tr,
|
|
3416
|
+
divider: na,
|
|
3417
|
+
custom: ea
|
|
3418
|
+
}, n = e, { t: r } = lr(), i = Y(Nn, "SectionBlock"), a = v(In, null), o = v(Vn, null), s = k(() => {
|
|
3386
3419
|
switch (n.block.columns) {
|
|
3387
3420
|
case "2": return ["50%", "50%"];
|
|
3388
3421
|
case "3": return [
|
|
@@ -3408,7 +3441,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3408
3441
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3409
3442
|
}
|
|
3410
3443
|
function m(e) {
|
|
3411
|
-
return
|
|
3444
|
+
return Na(e, o, t);
|
|
3412
3445
|
}
|
|
3413
3446
|
function g(e, t) {
|
|
3414
3447
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3416,7 +3449,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3416
3449
|
dataSourceFetched: t.dataSourceFetched
|
|
3417
3450
|
});
|
|
3418
3451
|
}
|
|
3419
|
-
return (t, n) => (f(), A("div",
|
|
3452
|
+
return (t, n) => (f(), A("div", Xa, [L("div", Za, [(f(!0), A(z, null, h(l.value, (t, n) => (f(), A("div", {
|
|
3420
3453
|
key: n,
|
|
3421
3454
|
class: I(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3422
3455
|
style: R({ width: s.value[n] })
|
|
@@ -3438,7 +3471,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3438
3471
|
class: "tpl:min-h-[60px]",
|
|
3439
3472
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3440
3473
|
}, {
|
|
3441
|
-
default: b(() => [(f(!0), A(z, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [H(
|
|
3474
|
+
default: b(() => [(f(!0), A(z, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [H(qa, {
|
|
3442
3475
|
block: t,
|
|
3443
3476
|
"is-selected": M(i).state.selectedBlockId === t.id,
|
|
3444
3477
|
viewport: e.viewport,
|
|
@@ -3465,9 +3498,9 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3465
3498
|
"model-value",
|
|
3466
3499
|
"group",
|
|
3467
3500
|
"onUpdate:modelValue"
|
|
3468
|
-
]), u(n).length === 0 ? (f(), A("div",
|
|
3501
|
+
]), u(n).length === 0 ? (f(), A("div", Qa, [L("span", null, O(M(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))])]));
|
|
3469
3502
|
}
|
|
3470
|
-
}),
|
|
3503
|
+
}), eo = {
|
|
3471
3504
|
facebook: {
|
|
3472
3505
|
name: "Facebook",
|
|
3473
3506
|
color: "#1877F2",
|
|
@@ -3548,11 +3581,11 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3548
3581
|
color: "#1769FF",
|
|
3549
3582
|
path: "M22 7h-7V5h7v2zm1.726 10c-.442 1.297-2.029 3-5.101 3-3.074 0-5.564-1.729-5.564-5.675 0-3.91 2.325-5.92 5.466-5.92 3.082 0 4.964 1.782 5.375 4.426.078.506.109 1.188.095 2.14H15.97c.13 3.211 3.483 3.312 4.588 2.029h3.168zm-7.686-4h4.965c-.105-1.547-1.136-2.219-2.477-2.219-1.466 0-2.277.768-2.488 2.219zm-9.574 6.988H0V5.021h6.953c5.476.081 5.58 5.444 2.72 6.906 3.461 1.26 3.577 8.061-3.207 8.061zM3 11h3.584c2.508 0 2.906-3-.312-3H3v3zm3.391 3H3v3.016h3.341c3.055 0 2.868-3.016.05-3.016z"
|
|
3550
3583
|
}
|
|
3551
|
-
},
|
|
3584
|
+
}, to = {
|
|
3552
3585
|
small: 24,
|
|
3553
3586
|
medium: 32,
|
|
3554
3587
|
large: 48
|
|
3555
|
-
},
|
|
3588
|
+
}, no = [
|
|
3556
3589
|
"facebook",
|
|
3557
3590
|
"twitter",
|
|
3558
3591
|
"instagram",
|
|
@@ -3569,11 +3602,11 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3569
3602
|
"github",
|
|
3570
3603
|
"dribbble",
|
|
3571
3604
|
"behance"
|
|
3572
|
-
],
|
|
3605
|
+
], ro = [
|
|
3573
3606
|
"width",
|
|
3574
3607
|
"height",
|
|
3575
3608
|
"fill"
|
|
3576
|
-
],
|
|
3609
|
+
], io = ["d"], ao = /* @__PURE__ */ V({
|
|
3577
3610
|
__name: "SocialIconSvg",
|
|
3578
3611
|
props: {
|
|
3579
3612
|
platform: {},
|
|
@@ -3581,7 +3614,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3581
3614
|
iconSize: {}
|
|
3582
3615
|
},
|
|
3583
3616
|
setup(e) {
|
|
3584
|
-
let t = e, n = k(() =>
|
|
3617
|
+
let t = e, n = k(() => eo[t.platform]), r = k(() => to[t.iconSize]), i = k(() => {
|
|
3585
3618
|
let e = {
|
|
3586
3619
|
display: "inline-flex",
|
|
3587
3620
|
alignItems: "center",
|
|
@@ -3625,25 +3658,25 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3625
3658
|
viewBox: "0 0 24 24",
|
|
3626
3659
|
fill: o.value,
|
|
3627
3660
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3628
|
-
}, [L("path", { d: n.value.path }, null, 8,
|
|
3661
|
+
}, [L("path", { d: n.value.path }, null, 8, io)], 8, ro))], 4));
|
|
3629
3662
|
}
|
|
3630
|
-
}),
|
|
3663
|
+
}), oo = { class: "tpl:w-full" }, so = ["href"], co = {
|
|
3631
3664
|
key: 1,
|
|
3632
3665
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3633
|
-
},
|
|
3666
|
+
}, lo = /* @__PURE__ */ V({
|
|
3634
3667
|
__name: "SocialIconsBlock",
|
|
3635
3668
|
props: {
|
|
3636
3669
|
block: {},
|
|
3637
3670
|
viewport: {}
|
|
3638
3671
|
},
|
|
3639
3672
|
setup(e) {
|
|
3640
|
-
let t = e, { t: n } =
|
|
3673
|
+
let t = e, { t: n } = lr(), r = k(() => ({
|
|
3641
3674
|
display: "flex",
|
|
3642
3675
|
flexWrap: "wrap",
|
|
3643
3676
|
gap: `${t.block.spacing}px`,
|
|
3644
3677
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3645
3678
|
})), i = k(() => t.block.icons.length > 0);
|
|
3646
|
-
return (t, a) => (f(), A("div",
|
|
3679
|
+
return (t, a) => (f(), A("div", oo, [i.value ? (f(), A("div", {
|
|
3647
3680
|
key: 0,
|
|
3648
3681
|
style: R(r.value)
|
|
3649
3682
|
}, [(f(!0), A(z, null, h(e.block.icons, (t) => (f(), A("a", {
|
|
@@ -3651,7 +3684,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3651
3684
|
href: t.url || "#",
|
|
3652
3685
|
class: "tpl:cursor-default",
|
|
3653
3686
|
onClick: a[0] ||= N(() => {}, ["prevent"])
|
|
3654
|
-
}, [H(
|
|
3687
|
+
}, [H(ao, {
|
|
3655
3688
|
platform: t.platform,
|
|
3656
3689
|
"icon-style": e.block.iconStyle,
|
|
3657
3690
|
"icon-size": e.block.iconSize
|
|
@@ -3659,44 +3692,44 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3659
3692
|
"platform",
|
|
3660
3693
|
"icon-style",
|
|
3661
3694
|
"icon-size"
|
|
3662
|
-
])], 8,
|
|
3695
|
+
])], 8, so))), 128))], 4)) : (f(), A("div", co, [H(M(di), { size: 16 }), L("span", null, O(M(n).social.addIcons), 1)]))]));
|
|
3663
3696
|
}
|
|
3664
|
-
}),
|
|
3697
|
+
}), uo = { class: "tpl:w-full" }, fo = {
|
|
3665
3698
|
key: 0,
|
|
3666
3699
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3667
3700
|
style: {
|
|
3668
3701
|
"background-color": "var(--tpl-bg-hover)",
|
|
3669
3702
|
color: "var(--tpl-text-dim)"
|
|
3670
3703
|
}
|
|
3671
|
-
},
|
|
3704
|
+
}, po = /* @__PURE__ */ V({
|
|
3672
3705
|
__name: "SpacerBlock",
|
|
3673
3706
|
props: {
|
|
3674
3707
|
block: {},
|
|
3675
3708
|
viewport: {}
|
|
3676
3709
|
},
|
|
3677
3710
|
setup(e) {
|
|
3678
|
-
let t = e, n = Y(
|
|
3711
|
+
let t = e, n = Y(Nn, "SpacerBlock"), r = k(() => ({
|
|
3679
3712
|
height: `${t.block.height}px`,
|
|
3680
3713
|
minHeight: `${t.block.height}px`,
|
|
3681
3714
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3682
3715
|
}));
|
|
3683
|
-
return (t, i) => (f(), A("div",
|
|
3716
|
+
return (t, i) => (f(), A("div", uo, [L("div", {
|
|
3684
3717
|
style: R(r.value),
|
|
3685
3718
|
class: I(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(n).state.previewMode }])
|
|
3686
|
-
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span",
|
|
3719
|
+
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span", fo, O(e.block.height) + "px ", 1))], 6)]));
|
|
3687
3720
|
}
|
|
3688
|
-
}),
|
|
3721
|
+
}), mo = { class: "tpl:w-full" }, ho = { key: 0 }, go = [
|
|
3689
3722
|
"aria-label",
|
|
3690
3723
|
"data-placeholder",
|
|
3691
3724
|
"onBlur"
|
|
3692
|
-
],
|
|
3725
|
+
], _o = [
|
|
3693
3726
|
"aria-label",
|
|
3694
3727
|
"data-placeholder",
|
|
3695
3728
|
"onBlur"
|
|
3696
|
-
],
|
|
3729
|
+
], vo = {
|
|
3697
3730
|
key: 1,
|
|
3698
3731
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:text-sm tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-dim)]"
|
|
3699
|
-
},
|
|
3732
|
+
}, yo = /* @__PURE__ */ Ei(/* @__PURE__ */ V({
|
|
3700
3733
|
__name: "TableBlock",
|
|
3701
3734
|
props: {
|
|
3702
3735
|
block: {},
|
|
@@ -3710,7 +3743,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3710
3743
|
updated(e, t) {
|
|
3711
3744
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3712
3745
|
}
|
|
3713
|
-
}, n = e, { t: r } =
|
|
3746
|
+
}, n = e, { t: r } = lr(), i = Y(Nn, "TableBlock"), a = k(() => n.block.rows.length > 0), o = k(() => ({
|
|
3714
3747
|
width: "100%",
|
|
3715
3748
|
borderCollapse: "collapse",
|
|
3716
3749
|
fontSize: `${n.block.fontSize}px`,
|
|
@@ -3739,11 +3772,11 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3739
3772
|
} : n);
|
|
3740
3773
|
i.updateBlock(n.block.id, { rows: o });
|
|
3741
3774
|
}
|
|
3742
|
-
return (e, n) => (f(), A("div",
|
|
3775
|
+
return (e, n) => (f(), A("div", mo, [a.value ? (f(), A("table", {
|
|
3743
3776
|
key: 0,
|
|
3744
3777
|
style: R(o.value),
|
|
3745
3778
|
class: "tpl-table-editable"
|
|
3746
|
-
}, [u.value ? (f(), A("thead",
|
|
3779
|
+
}, [u.value ? (f(), A("thead", ho, [L("tr", null, [(f(!0), A(z, null, h(u.value.cells, (e) => c((f(), A("th", {
|
|
3747
3780
|
key: e.id,
|
|
3748
3781
|
style: R(l.value),
|
|
3749
3782
|
"aria-label": M(r).table.cellPlaceholder,
|
|
@@ -3752,7 +3785,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3752
3785
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3753
3786
|
onKeydown: n[0] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3754
3787
|
onClick: N(p, ["stop"])
|
|
3755
|
-
}, null, 44,
|
|
3788
|
+
}, null, 44, go)), [[t, e.content]])), 128))])])) : j("", !0), L("tbody", null, [(f(!0), A(z, null, h(d.value, (e) => (f(), A("tr", { key: e.id }, [(f(!0), A(z, null, h(e.cells, (i) => c((f(), A("td", {
|
|
3756
3789
|
key: i.id,
|
|
3757
3790
|
style: R(s.value),
|
|
3758
3791
|
"aria-label": M(r).table.cellPlaceholder,
|
|
@@ -3761,9 +3794,9 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3761
3794
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3762
3795
|
onKeydown: n[1] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3763
3796
|
onClick: N(p, ["stop"])
|
|
3764
|
-
}, null, 44,
|
|
3797
|
+
}, null, 44, _o)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", vo, [H(M(hi), { size: 16 }), L("span", null, O(M(r).table.empty), 1)]))]));
|
|
3765
3798
|
}
|
|
3766
|
-
}), [["__scopeId", "data-v-4f49860b"]]),
|
|
3799
|
+
}), [["__scopeId", "data-v-4f49860b"]]), bo = /* @__PURE__ */ V({
|
|
3767
3800
|
__name: "VideoPlayButton",
|
|
3768
3801
|
props: { hoverEffect: {
|
|
3769
3802
|
type: Boolean,
|
|
@@ -3781,7 +3814,7 @@ var Ja = /* @__PURE__ */ V({
|
|
|
3781
3814
|
});
|
|
3782
3815
|
//#endregion
|
|
3783
3816
|
//#region src/utils/videoThumbnail.ts
|
|
3784
|
-
function
|
|
3817
|
+
function xo(e) {
|
|
3785
3818
|
if (!e) return {
|
|
3786
3819
|
platform: "unknown",
|
|
3787
3820
|
videoId: null,
|
|
@@ -3813,25 +3846,25 @@ function bo(e) {
|
|
|
3813
3846
|
thumbnailUrl: null
|
|
3814
3847
|
};
|
|
3815
3848
|
}
|
|
3816
|
-
function
|
|
3817
|
-
return t ||
|
|
3849
|
+
function So(e, t) {
|
|
3850
|
+
return t || xo(e).thumbnailUrl;
|
|
3818
3851
|
}
|
|
3819
3852
|
//#endregion
|
|
3820
3853
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3821
|
-
var
|
|
3854
|
+
var Co = ["src", "alt"], wo = {
|
|
3822
3855
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3823
3856
|
style: { opacity: "0.7" }
|
|
3824
|
-
},
|
|
3857
|
+
}, To = ["href"], Eo = ["src", "alt"], Do = ["src", "alt"], Oo = {
|
|
3825
3858
|
key: 3,
|
|
3826
3859
|
class: "tpl:flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-sm tpl:border-[var(--tpl-border-light)] tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-dim)]"
|
|
3827
|
-
},
|
|
3860
|
+
}, ko = /* @__PURE__ */ V({
|
|
3828
3861
|
__name: "VideoBlock",
|
|
3829
3862
|
props: {
|
|
3830
3863
|
block: {},
|
|
3831
3864
|
viewport: {}
|
|
3832
3865
|
},
|
|
3833
3866
|
setup(e) {
|
|
3834
|
-
let t = e, { t: n } =
|
|
3867
|
+
let t = e, { t: n } = lr(), { syntax: r } = Li(), i = k(() => gt(t.block.url, r) || gt(t.block.thumbnailUrl, r)), a = k(() => i.value ? null : So(t.block.url, t.block.thumbnailUrl)), o = k(() => ({ textAlign: t.block.align })), s = k(() => {
|
|
3835
3868
|
let e = t.block.align;
|
|
3836
3869
|
return {
|
|
3837
3870
|
maxWidth: "100%",
|
|
@@ -3852,16 +3885,16 @@ var So = ["src", "alt"], Co = {
|
|
|
3852
3885
|
class: "tpl:w-full tpl:border-0",
|
|
3853
3886
|
src: e.block.placeholderUrl,
|
|
3854
3887
|
alt: e.block.alt
|
|
3855
|
-
}, null, 8,
|
|
3888
|
+
}, null, 8, Co), H(bo)], 4)) : i.value ? (f(), A("div", {
|
|
3856
3889
|
key: 1,
|
|
3857
3890
|
class: "tpl:relative tpl:!flex tpl:min-h-[150px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-center tpl:bg-[var(--tpl-bg-elevated)]",
|
|
3858
3891
|
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3859
|
-
}, [H(M(
|
|
3892
|
+
}, [H(M(bi), {
|
|
3860
3893
|
size: 36,
|
|
3861
3894
|
"stroke-width": 1.5,
|
|
3862
3895
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3863
3896
|
style: { opacity: "0.5" }
|
|
3864
|
-
}), L("span",
|
|
3897
|
+
}), L("span", wo, O(c.value), 1)], 4)) : a.value ? (f(), A(z, { key: 2 }, [e.block.url ? (f(), A("a", {
|
|
3865
3898
|
key: 0,
|
|
3866
3899
|
href: e.block.url,
|
|
3867
3900
|
target: "_blank",
|
|
@@ -3873,7 +3906,7 @@ var So = ["src", "alt"], Co = {
|
|
|
3873
3906
|
class: "tpl:w-full tpl:border-0",
|
|
3874
3907
|
src: a.value,
|
|
3875
3908
|
alt: e.block.alt
|
|
3876
|
-
}, null, 8,
|
|
3909
|
+
}, null, 8, Eo), H(bo, { "hover-effect": "" })], 12, To)) : (f(), A("div", {
|
|
3877
3910
|
key: 1,
|
|
3878
3911
|
class: "tpl:relative tpl:inline-block",
|
|
3879
3912
|
style: R(s.value)
|
|
@@ -3881,48 +3914,48 @@ var So = ["src", "alt"], Co = {
|
|
|
3881
3914
|
class: "tpl:w-full tpl:border-0",
|
|
3882
3915
|
src: a.value,
|
|
3883
3916
|
alt: e.block.alt
|
|
3884
|
-
}, null, 8,
|
|
3917
|
+
}, null, 8, Do), H(bo)], 4))], 64)) : (f(), A("div", Oo, [H(M(bi), {
|
|
3885
3918
|
size: 40,
|
|
3886
3919
|
"stroke-width": 1.5,
|
|
3887
3920
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3888
3921
|
}), L("span", null, O(M(n).video.addVideo), 1)]))], 4));
|
|
3889
3922
|
}
|
|
3890
|
-
}),
|
|
3891
|
-
section:
|
|
3892
|
-
title:
|
|
3893
|
-
paragraph:
|
|
3894
|
-
image:
|
|
3895
|
-
button:
|
|
3896
|
-
divider:
|
|
3897
|
-
video:
|
|
3898
|
-
social:
|
|
3899
|
-
menu:
|
|
3900
|
-
table:
|
|
3901
|
-
spacer:
|
|
3902
|
-
html:
|
|
3903
|
-
countdown: E(() => import("./CountdownBlock-
|
|
3923
|
+
}), Ao = {
|
|
3924
|
+
section: $a,
|
|
3925
|
+
title: Ya,
|
|
3926
|
+
paragraph: Ma,
|
|
3927
|
+
image: ya,
|
|
3928
|
+
button: Tr,
|
|
3929
|
+
divider: na,
|
|
3930
|
+
video: ko,
|
|
3931
|
+
social: lo,
|
|
3932
|
+
menu: Ca,
|
|
3933
|
+
table: yo,
|
|
3934
|
+
spacer: po,
|
|
3935
|
+
html: sa,
|
|
3936
|
+
countdown: E(() => import("./CountdownBlock-KyzvhjMF.js").then((e) => e.n))
|
|
3904
3937
|
};
|
|
3905
|
-
function
|
|
3906
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3938
|
+
function jo(e) {
|
|
3939
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = lr(r);
|
|
3907
3940
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3908
|
-
let { resolvedTheme: c } =
|
|
3941
|
+
let { resolvedTheme: c } = fr(k(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = mr({
|
|
3909
3942
|
themeOverrides: u,
|
|
3910
3943
|
resolvedTheme: c,
|
|
3911
3944
|
extraStyles: e.themeExtraStyles
|
|
3912
|
-
}), f =
|
|
3945
|
+
}), f = Dt({
|
|
3913
3946
|
content: t.content,
|
|
3914
3947
|
setContent: (e, n) => t.setContent(e, n),
|
|
3915
3948
|
...e.historyOptions
|
|
3916
3949
|
});
|
|
3917
|
-
|
|
3918
|
-
let m =
|
|
3950
|
+
Nt(t, f);
|
|
3951
|
+
let m = kt({
|
|
3919
3952
|
addBlock: t.addBlock,
|
|
3920
3953
|
removeBlock: t.removeBlock,
|
|
3921
3954
|
updateBlock: t.updateBlock,
|
|
3922
3955
|
selectBlock: t.selectBlock,
|
|
3923
3956
|
findBlockLocation: t.findBlockLocation,
|
|
3924
3957
|
blockDefaults: n.blockDefaults
|
|
3925
|
-
}), h =
|
|
3958
|
+
}), h = jt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? At({
|
|
3926
3959
|
content: t.content,
|
|
3927
3960
|
isDirty: () => t.state.isDirty,
|
|
3928
3961
|
...e.autoSaveOptions
|
|
@@ -3930,15 +3963,15 @@ function Ao(e) {
|
|
|
3930
3963
|
g && (_ = U(f.isNavigating, (e) => {
|
|
3931
3964
|
e ? g.pause() : g.resume();
|
|
3932
3965
|
}));
|
|
3933
|
-
let v =
|
|
3966
|
+
let v = dr(t, {
|
|
3934
3967
|
t: a,
|
|
3935
3968
|
format: o
|
|
3936
|
-
}), y =
|
|
3937
|
-
if (
|
|
3969
|
+
}), y = vr();
|
|
3970
|
+
if (br(y, Ao), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, ea);
|
|
3938
3971
|
function b(e) {
|
|
3939
|
-
for (let t of e) y.registerCustom(t,
|
|
3972
|
+
for (let t of e) y.registerCustom(t, ea);
|
|
3940
3973
|
}
|
|
3941
|
-
let x =
|
|
3974
|
+
let x = jn();
|
|
3942
3975
|
if (s() && l(x.dispose), e.containerEl) {
|
|
3943
3976
|
let t = e.containerEl;
|
|
3944
3977
|
J(document, "pointerdown", (e) => {
|
|
@@ -3947,7 +3980,7 @@ function Ao(e) {
|
|
|
3947
3980
|
}, { capture: !0 });
|
|
3948
3981
|
}
|
|
3949
3982
|
function S(r) {
|
|
3950
|
-
x.isActive() &&
|
|
3983
|
+
x.isActive() && Sr(r, {
|
|
3951
3984
|
history: f,
|
|
3952
3985
|
selectBlock: (e) => t.selectBlock(e),
|
|
3953
3986
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -3958,17 +3991,17 @@ function Ao(e) {
|
|
|
3958
3991
|
}
|
|
3959
3992
|
J(document, "keydown", S);
|
|
3960
3993
|
let w = C(null);
|
|
3961
|
-
p(
|
|
3994
|
+
p($n, e.editorRoot ?? document), p(er, w), p(Mn, r), p(Nn, t), p(Pn, f), p(Fn, m), p(In, h), p(Ln, i), p(Rn, d), p(zn, c), p(Bn, n.blockDefaults), p(Vn, y), p(Hn, n.customBlocks ?? []);
|
|
3962
3995
|
let T = dt(n.mergeTags?.syntax);
|
|
3963
|
-
p(
|
|
3964
|
-
let E =
|
|
3996
|
+
p(Un, n.mergeTags?.tags ?? []), p(Wn, T), p(Gn, n.mergeTags?.onRequest ?? null), p(Kn, n.mergeTags?.autocomplete !== !1), p(qn, n.onRequestMedia ?? null), p(Jn, n.displayConditions?.conditions ?? []), p(Yn, n.displayConditions?.allowCustom ?? !1), p(Xn, e.capabilities ?? {}), p(Zn, v);
|
|
3997
|
+
let E = sr(n.lint) ? null : cr({
|
|
3965
3998
|
content: t.content,
|
|
3966
3999
|
options: n.lint ?? {},
|
|
3967
4000
|
updateBlock: t.updateBlock,
|
|
3968
4001
|
updateSettings: t.updateSettings,
|
|
3969
4002
|
removeBlock: t.removeBlock
|
|
3970
4003
|
});
|
|
3971
|
-
p(
|
|
4004
|
+
p(Qn, E);
|
|
3972
4005
|
function D() {
|
|
3973
4006
|
_?.(), E?.destroy(), g?.destroy(), f.destroy();
|
|
3974
4007
|
}
|
|
@@ -3992,7 +4025,7 @@ function Ao(e) {
|
|
|
3992
4025
|
}
|
|
3993
4026
|
//#endregion
|
|
3994
4027
|
//#region ../core/src/cloud/auth.ts
|
|
3995
|
-
var
|
|
4028
|
+
var Mo = class e {
|
|
3996
4029
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
3997
4030
|
accessToken = null;
|
|
3998
4031
|
expiresAt = null;
|
|
@@ -4066,7 +4099,7 @@ var jo = class e {
|
|
|
4066
4099
|
};
|
|
4067
4100
|
e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
|
|
4068
4101
|
let r = await fetch(this.url, n);
|
|
4069
|
-
if (!r.ok) throw new
|
|
4102
|
+
if (!r.ok) throw new xt(`Token refresh failed: ${r.status}`, r.status);
|
|
4070
4103
|
let i = await r.json();
|
|
4071
4104
|
if (!i.token || !i.expires_at || !i.project_id || !i.tenant) throw Error("Invalid token response: missing token, expires_at, project_id, or tenant");
|
|
4072
4105
|
return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expires_at * 1e3), this._projectId = i.project_id, this._tenantSlug = i.tenant, i.test_email?.allowed_emails && i.test_email?.signature ? this._testEmailConfig = {
|
|
@@ -4093,8 +4126,8 @@ var jo = class e {
|
|
|
4093
4126
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4094
4127
|
}
|
|
4095
4128
|
};
|
|
4096
|
-
function
|
|
4097
|
-
return e.mode === "direct" ? new
|
|
4129
|
+
function No(e, t) {
|
|
4130
|
+
return e.mode === "direct" ? new Mo({
|
|
4098
4131
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4099
4132
|
baseUrl: e.baseUrl,
|
|
4100
4133
|
requestOptions: {
|
|
@@ -4108,7 +4141,7 @@ function Mo(e, t) {
|
|
|
4108
4141
|
}
|
|
4109
4142
|
},
|
|
4110
4143
|
onError: t
|
|
4111
|
-
}) : new
|
|
4144
|
+
}) : new Mo({
|
|
4112
4145
|
url: e.url,
|
|
4113
4146
|
baseUrl: e.baseUrl,
|
|
4114
4147
|
requestOptions: e.requestOptions,
|
|
@@ -4120,16 +4153,16 @@ function Mo(e, t) {
|
|
|
4120
4153
|
function Z(e, t) {
|
|
4121
4154
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4122
4155
|
}
|
|
4123
|
-
var
|
|
4156
|
+
var Po = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Po}/templates/{template}`, Fo = `${Q}/ai`, Io = `${Po}/media`, Lo = `${Io}/folders`, Ro = `${Po}/saved-modules`, $ = {
|
|
4124
4157
|
health: "/api/v1/health",
|
|
4125
|
-
"projects.config": `${
|
|
4126
|
-
"broadcasting.auth": `${
|
|
4127
|
-
"templates.store": `${
|
|
4158
|
+
"projects.config": `${Po}/config`,
|
|
4159
|
+
"broadcasting.auth": `${Po}/broadcasting/auth`,
|
|
4160
|
+
"templates.store": `${Po}/templates`,
|
|
4128
4161
|
"templates.show": `${Q}`,
|
|
4129
4162
|
"templates.update": `${Q}`,
|
|
4130
4163
|
"templates.destroy": `${Q}`,
|
|
4131
4164
|
"templates.export": `${Q}/export`,
|
|
4132
|
-
"templates.importFromBeefree": `${
|
|
4165
|
+
"templates.importFromBeefree": `${Po}/templates/import/from-beefree`,
|
|
4133
4166
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4134
4167
|
"snapshots.index": `${Q}/snapshots`,
|
|
4135
4168
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4140,31 +4173,31 @@ var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{te
|
|
|
4140
4173
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4141
4174
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4142
4175
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4143
|
-
"ai.generate": `${
|
|
4144
|
-
"ai.conversationMessages": `${
|
|
4145
|
-
"ai.suggestions": `${
|
|
4146
|
-
"ai.rewriteText": `${
|
|
4147
|
-
"ai.score": `${
|
|
4148
|
-
"ai.fixFinding": `${
|
|
4149
|
-
"ai.generateFromDesign": `${
|
|
4150
|
-
"media.upload": `${
|
|
4151
|
-
"media.browse": `${
|
|
4152
|
-
"media.delete": `${
|
|
4153
|
-
"media.move": `${
|
|
4154
|
-
"media.update": `${
|
|
4155
|
-
"media.replace": `${
|
|
4156
|
-
"media.checkUsage": `${
|
|
4157
|
-
"media.frequentlyUsed": `${
|
|
4158
|
-
"media.importFromUrl": `${
|
|
4159
|
-
"folders.index": `${
|
|
4160
|
-
"folders.store": `${
|
|
4161
|
-
"folders.update": `${
|
|
4162
|
-
"folders.destroy": `${
|
|
4163
|
-
"savedModules.index": `${
|
|
4164
|
-
"savedModules.store": `${
|
|
4165
|
-
"savedModules.update": `${
|
|
4166
|
-
"savedModules.destroy": `${
|
|
4167
|
-
},
|
|
4176
|
+
"ai.generate": `${Fo}/generate`,
|
|
4177
|
+
"ai.conversationMessages": `${Fo}/conversation-messages`,
|
|
4178
|
+
"ai.suggestions": `${Fo}/suggestions`,
|
|
4179
|
+
"ai.rewriteText": `${Fo}/rewrite-text`,
|
|
4180
|
+
"ai.score": `${Fo}/score`,
|
|
4181
|
+
"ai.fixFinding": `${Fo}/fix-finding`,
|
|
4182
|
+
"ai.generateFromDesign": `${Fo}/generate-from-design`,
|
|
4183
|
+
"media.upload": `${Io}/upload`,
|
|
4184
|
+
"media.browse": `${Io}/browse`,
|
|
4185
|
+
"media.delete": `${Io}/delete`,
|
|
4186
|
+
"media.move": `${Io}/move`,
|
|
4187
|
+
"media.update": `${Io}/{media}`,
|
|
4188
|
+
"media.replace": `${Io}/{media}/replace`,
|
|
4189
|
+
"media.checkUsage": `${Io}/check-usage`,
|
|
4190
|
+
"media.frequentlyUsed": `${Io}/frequently-used`,
|
|
4191
|
+
"media.importFromUrl": `${Io}/import-from-url`,
|
|
4192
|
+
"folders.index": `${Lo}`,
|
|
4193
|
+
"folders.store": `${Lo}`,
|
|
4194
|
+
"folders.update": `${Lo}/{mediaFolder}`,
|
|
4195
|
+
"folders.destroy": `${Lo}/{mediaFolder}`,
|
|
4196
|
+
"savedModules.index": `${Ro}`,
|
|
4197
|
+
"savedModules.store": `${Ro}`,
|
|
4198
|
+
"savedModules.update": `${Ro}/{savedModule}`,
|
|
4199
|
+
"savedModules.destroy": `${Ro}/{savedModule}`
|
|
4200
|
+
}, zo = class {
|
|
4168
4201
|
authManager;
|
|
4169
4202
|
constructor(e) {
|
|
4170
4203
|
this.authManager = e;
|
|
@@ -4192,7 +4225,7 @@ var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{te
|
|
|
4192
4225
|
});
|
|
4193
4226
|
if (!n.ok) {
|
|
4194
4227
|
let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
|
|
4195
|
-
throw new
|
|
4228
|
+
throw new xt(this.extractFirstValidationError(e), n.status);
|
|
4196
4229
|
}
|
|
4197
4230
|
if (n.status !== 204) return (await n.json()).data;
|
|
4198
4231
|
}
|
|
@@ -4350,14 +4383,14 @@ var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{te
|
|
|
4350
4383
|
};
|
|
4351
4384
|
//#endregion
|
|
4352
4385
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4353
|
-
function
|
|
4386
|
+
function Bo(e) {
|
|
4354
4387
|
return {
|
|
4355
4388
|
host: e.host,
|
|
4356
4389
|
port: e.port,
|
|
4357
4390
|
appKey: e.app_key
|
|
4358
4391
|
};
|
|
4359
4392
|
}
|
|
4360
|
-
var
|
|
4393
|
+
var Vo = class {
|
|
4361
4394
|
pusher = null;
|
|
4362
4395
|
authManager;
|
|
4363
4396
|
config;
|
|
@@ -4424,7 +4457,7 @@ var Bo = class {
|
|
|
4424
4457
|
};
|
|
4425
4458
|
//#endregion
|
|
4426
4459
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4427
|
-
function
|
|
4460
|
+
function Ho(e, t) {
|
|
4428
4461
|
let { operation: n, data: r } = t;
|
|
4429
4462
|
switch (n) {
|
|
4430
4463
|
case "add_block":
|
|
@@ -4452,8 +4485,8 @@ function Vo(e, t) {
|
|
|
4452
4485
|
}
|
|
4453
4486
|
//#endregion
|
|
4454
4487
|
//#region ../core/src/cloud/editor.ts
|
|
4455
|
-
function
|
|
4456
|
-
let t = new
|
|
4488
|
+
function Uo(e) {
|
|
4489
|
+
let t = new zo(e.authManager), n = S({
|
|
4457
4490
|
template: null,
|
|
4458
4491
|
content: He(e.defaultFontFamily, e.templateDefaults),
|
|
4459
4492
|
selectedBlockId: null,
|
|
@@ -4587,7 +4620,7 @@ function Ho(e) {
|
|
|
4587
4620
|
}
|
|
4588
4621
|
}
|
|
4589
4622
|
async function w() {
|
|
4590
|
-
if (!n.template?.id) throw new
|
|
4623
|
+
if (!n.template?.id) throw new xt("No template loaded. Call create() or load() before saving.");
|
|
4591
4624
|
n.isSaving = !0;
|
|
4592
4625
|
try {
|
|
4593
4626
|
let e = await t.updateTemplate(n.template.id, n.content);
|
|
@@ -4649,11 +4682,11 @@ function Ho(e) {
|
|
|
4649
4682
|
}
|
|
4650
4683
|
//#endregion
|
|
4651
4684
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4652
|
-
var
|
|
4653
|
-
function
|
|
4654
|
-
return `msg_${Date.now()}_${++
|
|
4685
|
+
var Wo = 0;
|
|
4686
|
+
function Go() {
|
|
4687
|
+
return `msg_${Date.now()}_${++Wo}`;
|
|
4655
4688
|
}
|
|
4656
|
-
function
|
|
4689
|
+
function Ko(e) {
|
|
4657
4690
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
|
|
4658
4691
|
function _(e, t) {
|
|
4659
4692
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4747,14 +4780,14 @@ function Go(e) {
|
|
|
4747
4780
|
let v = n();
|
|
4748
4781
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4749
4782
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4750
|
-
let y =
|
|
4783
|
+
let y = Go();
|
|
4751
4784
|
a.value = [...a.value, {
|
|
4752
4785
|
id: y,
|
|
4753
4786
|
role: "user",
|
|
4754
4787
|
content: e,
|
|
4755
4788
|
timestamp: Date.now()
|
|
4756
4789
|
}];
|
|
4757
|
-
let b =
|
|
4790
|
+
let b = Go();
|
|
4758
4791
|
a.value = [...a.value, {
|
|
4759
4792
|
id: b,
|
|
4760
4793
|
role: "assistant",
|
|
@@ -4845,7 +4878,7 @@ function Go(e) {
|
|
|
4845
4878
|
}
|
|
4846
4879
|
//#endregion
|
|
4847
4880
|
//#region ../core/src/cloud/ai-config.ts
|
|
4848
|
-
function
|
|
4881
|
+
function qo(e) {
|
|
4849
4882
|
function t(t) {
|
|
4850
4883
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
4851
4884
|
}
|
|
@@ -4856,7 +4889,7 @@ function Ko(e) {
|
|
|
4856
4889
|
}
|
|
4857
4890
|
//#endregion
|
|
4858
4891
|
//#region ../core/src/cloud/template-scoring.ts
|
|
4859
|
-
function
|
|
4892
|
+
function Jo(e) {
|
|
4860
4893
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
4861
4894
|
async function l(e, o) {
|
|
4862
4895
|
let s = n();
|
|
@@ -5001,7 +5034,7 @@ function qo(e) {
|
|
|
5001
5034
|
}
|
|
5002
5035
|
//#endregion
|
|
5003
5036
|
//#region ../core/src/cloud/design-reference.ts
|
|
5004
|
-
function
|
|
5037
|
+
function Yo(e) {
|
|
5005
5038
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5006
5039
|
async function s(e) {
|
|
5007
5040
|
let s = n();
|
|
@@ -5064,8 +5097,8 @@ function Jo(e) {
|
|
|
5064
5097
|
}
|
|
5065
5098
|
//#endregion
|
|
5066
5099
|
//#region ../core/src/cloud/comments.ts
|
|
5067
|
-
function
|
|
5068
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5100
|
+
function Xo(e) {
|
|
5101
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new zo(t), c = C([]), l = C(!1), u = C(!1), d = k(() => (o?.() ?? !1) && t.userConfig !== null), f = k(() => {
|
|
5069
5102
|
let e = 0;
|
|
5070
5103
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5071
5104
|
return e;
|
|
@@ -5264,17 +5297,17 @@ function Yo(e) {
|
|
|
5264
5297
|
}
|
|
5265
5298
|
//#endregion
|
|
5266
5299
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5267
|
-
function
|
|
5300
|
+
function Zo(e) {
|
|
5268
5301
|
let { comments: t, channel: n } = e;
|
|
5269
5302
|
U(n, (e, n) => {
|
|
5270
5303
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5271
|
-
|
|
5304
|
+
Qo(t, e);
|
|
5272
5305
|
});
|
|
5273
5306
|
}), l(() => {
|
|
5274
5307
|
n.value?.unbind("comment-broadcast");
|
|
5275
5308
|
});
|
|
5276
5309
|
}
|
|
5277
|
-
function
|
|
5310
|
+
function Qo(e, t) {
|
|
5278
5311
|
switch (t.action) {
|
|
5279
5312
|
case "comment_created":
|
|
5280
5313
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5293,7 +5326,7 @@ function Zo(e, t) {
|
|
|
5293
5326
|
}
|
|
5294
5327
|
//#endregion
|
|
5295
5328
|
//#region ../core/src/cloud/collaboration.ts
|
|
5296
|
-
var
|
|
5329
|
+
var $o = [
|
|
5297
5330
|
"pusher:member_added",
|
|
5298
5331
|
"pusher:member_removed",
|
|
5299
5332
|
"client-block_locked",
|
|
@@ -5301,10 +5334,10 @@ var Qo = [
|
|
|
5301
5334
|
"client-operation",
|
|
5302
5335
|
"mcp-operation"
|
|
5303
5336
|
];
|
|
5304
|
-
function
|
|
5305
|
-
for (let t of
|
|
5337
|
+
function es(e) {
|
|
5338
|
+
for (let t of $o) e.unbind(t);
|
|
5306
5339
|
}
|
|
5307
|
-
var
|
|
5340
|
+
var ts = [
|
|
5308
5341
|
"#3b82f6",
|
|
5309
5342
|
"#ef4444",
|
|
5310
5343
|
"#10b981",
|
|
@@ -5316,10 +5349,10 @@ var es = [
|
|
|
5316
5349
|
"#6366f1",
|
|
5317
5350
|
"#14b8a6"
|
|
5318
5351
|
];
|
|
5319
|
-
function
|
|
5352
|
+
function ns(e) {
|
|
5320
5353
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = k(() => t.userConfig?.id ?? "");
|
|
5321
5354
|
function u() {
|
|
5322
|
-
let e =
|
|
5355
|
+
let e = ts[o % ts.length];
|
|
5323
5356
|
return o++, e;
|
|
5324
5357
|
}
|
|
5325
5358
|
function d(e) {
|
|
@@ -5361,7 +5394,7 @@ function ts(e) {
|
|
|
5361
5394
|
function h(e) {
|
|
5362
5395
|
s = !0;
|
|
5363
5396
|
try {
|
|
5364
|
-
|
|
5397
|
+
Ho(n, e);
|
|
5365
5398
|
} finally {
|
|
5366
5399
|
s = !1;
|
|
5367
5400
|
}
|
|
@@ -5381,7 +5414,7 @@ function ts(e) {
|
|
|
5381
5414
|
return U(() => n.state.selectedBlockId, (e, t) => {
|
|
5382
5415
|
s || (t && v(t), e && _(e));
|
|
5383
5416
|
}), U(r, (t, n) => {
|
|
5384
|
-
if (n &&
|
|
5417
|
+
if (n && es(n), !t) {
|
|
5385
5418
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5386
5419
|
return;
|
|
5387
5420
|
}
|
|
@@ -5413,7 +5446,7 @@ function ts(e) {
|
|
|
5413
5446
|
h(e);
|
|
5414
5447
|
});
|
|
5415
5448
|
}), l(() => {
|
|
5416
|
-
r.value &&
|
|
5449
|
+
r.value && es(r.value);
|
|
5417
5450
|
}), {
|
|
5418
5451
|
collaborators: i,
|
|
5419
5452
|
lockedBlocks: a,
|
|
@@ -5423,7 +5456,7 @@ function ts(e) {
|
|
|
5423
5456
|
}
|
|
5424
5457
|
//#endregion
|
|
5425
5458
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5426
|
-
function
|
|
5459
|
+
function rs(e, t) {
|
|
5427
5460
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5428
5461
|
e.addBlock = (e, r, i) => {
|
|
5429
5462
|
n(e, r, i), t._broadcastOperation({
|
|
@@ -5477,11 +5510,11 @@ function ns(e, t) {
|
|
|
5477
5510
|
}
|
|
5478
5511
|
//#endregion
|
|
5479
5512
|
//#region ../core/src/cloud/web-socket.ts
|
|
5480
|
-
function
|
|
5513
|
+
function is(e) {
|
|
5481
5514
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5482
5515
|
async function s(e, s) {
|
|
5483
5516
|
if (a) return;
|
|
5484
|
-
a = new
|
|
5517
|
+
a = new Vo({
|
|
5485
5518
|
authManager: t,
|
|
5486
5519
|
config: s,
|
|
5487
5520
|
onError: n
|
|
@@ -5509,8 +5542,8 @@ function rs(e) {
|
|
|
5509
5542
|
}
|
|
5510
5543
|
//#endregion
|
|
5511
5544
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5512
|
-
function
|
|
5513
|
-
let t = new
|
|
5545
|
+
function as(e) {
|
|
5546
|
+
let t = new zo(e.authManager), n = C([]), r = C(!1);
|
|
5514
5547
|
async function i(i) {
|
|
5515
5548
|
r.value = !0;
|
|
5516
5549
|
try {
|
|
@@ -5558,8 +5591,8 @@ function is(e) {
|
|
|
5558
5591
|
}
|
|
5559
5592
|
//#endregion
|
|
5560
5593
|
//#region ../core/src/cloud/snapshots.ts
|
|
5561
|
-
function
|
|
5562
|
-
let t = new
|
|
5594
|
+
function os(e) {
|
|
5595
|
+
let t = new zo(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5563
5596
|
async function a() {
|
|
5564
5597
|
r.value = !0;
|
|
5565
5598
|
try {
|
|
@@ -5591,8 +5624,8 @@ function as(e) {
|
|
|
5591
5624
|
}
|
|
5592
5625
|
//#endregion
|
|
5593
5626
|
//#region ../core/src/cloud/test-email.ts
|
|
5594
|
-
function
|
|
5595
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5627
|
+
function ss(e) {
|
|
5628
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new zo(t), l = C(!1), u = C(null), d = C(null);
|
|
5596
5629
|
o && U(o, (e) => {
|
|
5597
5630
|
e && (d.value = t.testEmailConfig);
|
|
5598
5631
|
}, { immediate: !0 });
|
|
@@ -5628,8 +5661,8 @@ function os(e) {
|
|
|
5628
5661
|
}
|
|
5629
5662
|
//#endregion
|
|
5630
5663
|
//#region ../core/src/cloud/export.ts
|
|
5631
|
-
function
|
|
5632
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5664
|
+
function cs(e) {
|
|
5665
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new zo(t);
|
|
5633
5666
|
function a() {
|
|
5634
5667
|
let e = n?.();
|
|
5635
5668
|
return {
|
|
@@ -5655,8 +5688,8 @@ function ss(e) {
|
|
|
5655
5688
|
}
|
|
5656
5689
|
//#endregion
|
|
5657
5690
|
//#region ../core/src/cloud/plan-config.ts
|
|
5658
|
-
function
|
|
5659
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5691
|
+
function ls(e) {
|
|
5692
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new zo(t), o = k(() => r.value?.features ?? null);
|
|
5660
5693
|
function s(e) {
|
|
5661
5694
|
return r.value?.features[e] ?? !1;
|
|
5662
5695
|
}
|
|
@@ -5682,11 +5715,11 @@ function cs(e) {
|
|
|
5682
5715
|
}
|
|
5683
5716
|
//#endregion
|
|
5684
5717
|
//#region ../core/src/cloud/health-check.ts
|
|
5685
|
-
var
|
|
5686
|
-
function
|
|
5718
|
+
var us = 5e3;
|
|
5719
|
+
function ds(e) {
|
|
5687
5720
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5688
5721
|
}
|
|
5689
|
-
async function
|
|
5722
|
+
async function fs(e, t) {
|
|
5690
5723
|
let n = performance.now();
|
|
5691
5724
|
try {
|
|
5692
5725
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5738,7 +5771,7 @@ async function ds(e, t) {
|
|
|
5738
5771
|
};
|
|
5739
5772
|
}
|
|
5740
5773
|
}
|
|
5741
|
-
async function
|
|
5774
|
+
async function ps(e) {
|
|
5742
5775
|
if (!e?.host || !e?.app_key) return {
|
|
5743
5776
|
ok: !1,
|
|
5744
5777
|
error: "WebSocket configuration not available"
|
|
@@ -5754,7 +5787,7 @@ async function fs(e) {
|
|
|
5754
5787
|
ok: !1,
|
|
5755
5788
|
error: "WebSocket connection timed out"
|
|
5756
5789
|
});
|
|
5757
|
-
},
|
|
5790
|
+
}, us);
|
|
5758
5791
|
try {
|
|
5759
5792
|
n = new WebSocket(t);
|
|
5760
5793
|
} catch (t) {
|
|
@@ -5774,8 +5807,8 @@ async function fs(e) {
|
|
|
5774
5807
|
};
|
|
5775
5808
|
});
|
|
5776
5809
|
}
|
|
5777
|
-
async function
|
|
5778
|
-
let t = await ds(
|
|
5810
|
+
async function ms(e = {}) {
|
|
5811
|
+
let t = await fs(ds(e), e.authManager), n = await ps(t.wsConfig);
|
|
5779
5812
|
return {
|
|
5780
5813
|
api: t.api,
|
|
5781
5814
|
websocket: n,
|
|
@@ -5785,29 +5818,29 @@ async function ps(e = {}) {
|
|
|
5785
5818
|
}
|
|
5786
5819
|
//#endregion
|
|
5787
5820
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5788
|
-
function
|
|
5821
|
+
function hs(e) {
|
|
5789
5822
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5790
5823
|
U(n, (e, n) => {
|
|
5791
5824
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5792
|
-
|
|
5825
|
+
Ho(t, e), r?.(e);
|
|
5793
5826
|
});
|
|
5794
5827
|
});
|
|
5795
5828
|
}
|
|
5796
5829
|
//#endregion
|
|
5797
5830
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5798
|
-
var
|
|
5831
|
+
var gs = {
|
|
5799
5832
|
key: 0,
|
|
5800
5833
|
class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
5801
|
-
},
|
|
5834
|
+
}, _s = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, vs = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, ys = { class: "tpl:flex tpl:items-center tpl:gap-1" }, bs = ["title"], xs = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Ss = {
|
|
5802
5835
|
key: 0,
|
|
5803
5836
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5804
|
-
},
|
|
5837
|
+
}, Cs = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ws = {
|
|
5805
5838
|
key: 1,
|
|
5806
5839
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5807
|
-
},
|
|
5840
|
+
}, Ts = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Es = {
|
|
5808
5841
|
key: 2,
|
|
5809
5842
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5810
|
-
},
|
|
5843
|
+
}, Ds = {
|
|
5811
5844
|
key: 0,
|
|
5812
5845
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5813
5846
|
style: {
|
|
@@ -5816,10 +5849,10 @@ var hs = {
|
|
|
5816
5849
|
"max-width": "85%",
|
|
5817
5850
|
"box-shadow": "var(--tpl-shadow)"
|
|
5818
5851
|
}
|
|
5819
|
-
},
|
|
5852
|
+
}, Os = {
|
|
5820
5853
|
key: 1,
|
|
5821
5854
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5822
|
-
},
|
|
5855
|
+
}, ks = {
|
|
5823
5856
|
key: 1,
|
|
5824
5857
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5825
5858
|
style: {
|
|
@@ -5828,21 +5861,21 @@ var hs = {
|
|
|
5828
5861
|
color: "var(--tpl-text)",
|
|
5829
5862
|
"box-shadow": "var(--tpl-shadow)"
|
|
5830
5863
|
}
|
|
5831
|
-
},
|
|
5864
|
+
}, As = {
|
|
5832
5865
|
key: 0,
|
|
5833
5866
|
class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
|
|
5834
5867
|
style: {
|
|
5835
5868
|
"background-color": "var(--tpl-danger-light)",
|
|
5836
5869
|
color: "var(--tpl-danger)"
|
|
5837
5870
|
}
|
|
5838
|
-
},
|
|
5871
|
+
}, js = {
|
|
5839
5872
|
key: 1,
|
|
5840
5873
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5841
5874
|
style: {
|
|
5842
5875
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5843
5876
|
"backdrop-filter": "blur(2px)"
|
|
5844
5877
|
}
|
|
5845
|
-
},
|
|
5878
|
+
}, Ms = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ns = ["onClick"], Ps = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fs = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Is = ["placeholder", "disabled"], Ls = ["disabled"], Rs = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, zs = /* @__PURE__ */ V({
|
|
5846
5879
|
__name: "AiChatSidebar",
|
|
5847
5880
|
props: {
|
|
5848
5881
|
visible: { type: Boolean },
|
|
@@ -5850,14 +5883,14 @@ var hs = {
|
|
|
5850
5883
|
},
|
|
5851
5884
|
emits: ["close"],
|
|
5852
5885
|
setup(e, { emit: t }) {
|
|
5853
|
-
let n = e, r = t, i = Y(
|
|
5886
|
+
let n = e, r = t, i = Y(or, "AiChatSidebar"), a = Y(Nn, "AiChatSidebar"), o = Y(tr, "AiChatSidebar"), s = v(Un, []), l = ca(), u = Ko({
|
|
5854
5887
|
authManager: o,
|
|
5855
5888
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5856
5889
|
onApply: n.onApply,
|
|
5857
5890
|
onError: void 0
|
|
5858
|
-
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } =
|
|
5891
|
+
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = nn(() => {
|
|
5859
5892
|
_.value < (u.suggestions.value?.length ?? 0) ? _.value++ : y();
|
|
5860
|
-
}, 150, { immediate: !1 }), { start: S } =
|
|
5893
|
+
}, 150, { immediate: !1 }), { start: S } = rn(() => x(), 100, { immediate: !1 });
|
|
5861
5894
|
U(() => u.suggestions.value?.length ?? 0, (e) => {
|
|
5862
5895
|
if (y(), e === 0) {
|
|
5863
5896
|
_.value = 0;
|
|
@@ -5897,42 +5930,42 @@ var hs = {
|
|
|
5897
5930
|
"leave-from-class": "tpl:translate-x-0",
|
|
5898
5931
|
"leave-to-class": "tpl:translate-x-full"
|
|
5899
5932
|
}, {
|
|
5900
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
5901
|
-
L("div",
|
|
5933
|
+
default: b(() => [e.visible ? (f(), A("div", gs, [
|
|
5934
|
+
L("div", _s, [L("div", vs, [H(M(mi), {
|
|
5902
5935
|
size: 13,
|
|
5903
5936
|
"stroke-width": 2
|
|
5904
|
-
}), L("span", null, O(M(i).aiChat.title), 1)]), L("div",
|
|
5937
|
+
}), L("span", null, O(M(i).aiChat.title), 1)]), L("div", ys, [(M(u).messages.value?.length ?? 0) > 0 ? (f(), A("button", {
|
|
5905
5938
|
key: 0,
|
|
5906
5939
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5907
5940
|
title: M(i).aiChat.clear,
|
|
5908
5941
|
onClick: n[0] ||= (e) => M(u).clearChat()
|
|
5909
|
-
}, [H(M(
|
|
5942
|
+
}, [H(M(gi), {
|
|
5910
5943
|
size: 14,
|
|
5911
5944
|
"stroke-width": 2
|
|
5912
|
-
})], 8,
|
|
5945
|
+
})], 8, bs)) : j("", !0), L("button", {
|
|
5913
5946
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5914
5947
|
onClick: n[1] ||= (e) => r("close")
|
|
5915
|
-
}, [H(M(
|
|
5948
|
+
}, [H(M(xi), {
|
|
5916
5949
|
size: 14,
|
|
5917
5950
|
"stroke-width": 2
|
|
5918
5951
|
})])])]),
|
|
5919
|
-
L("div",
|
|
5952
|
+
L("div", xs, [
|
|
5920
5953
|
L("div", {
|
|
5921
5954
|
ref_key: "messagesContainer",
|
|
5922
5955
|
ref: p,
|
|
5923
5956
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5924
|
-
}, [M(u).isLoadingHistory.value ? (f(), A("div",
|
|
5957
|
+
}, [M(u).isLoadingHistory.value ? (f(), A("div", Ss, [H(M(ni), {
|
|
5925
5958
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5926
5959
|
size: 24,
|
|
5927
5960
|
"stroke-width": 2
|
|
5928
|
-
}), L("p",
|
|
5961
|
+
}), L("p", Cs, O(M(i).aiChat.loadingHistory), 1)])) : (M(u).messages.value?.length ?? 0) === 0 ? (f(), A("div", ws, [H(M(mi), {
|
|
5929
5962
|
size: 32,
|
|
5930
5963
|
"stroke-width": 1.5,
|
|
5931
5964
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5932
|
-
}), L("p",
|
|
5965
|
+
}), L("p", Ts, O(M(i).aiChat.placeholder), 1)])) : (f(), A("div", Es, [(f(!0), A(z, null, h(M(u).messages.value, (e, t) => (f(), A("div", {
|
|
5933
5966
|
key: e.id,
|
|
5934
5967
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5935
|
-
}, [e.role === "user" ? (f(), A("div",
|
|
5968
|
+
}, [e.role === "user" ? (f(), A("div", Ds, O(e.content), 1)) : (f(), A("div", Os, [!E(e.content) && M(u).isGenerating.value && t === (M(u).messages.value?.length ?? 0) - 1 ? (f(), P(Ai, { key: 0 })) : (f(), A("div", ks, O(E(e.content) || M(i).aiChat.applied), 1)), e.id === M(u).lastApplyMessageId.value && !M(u).isGenerating.value ? (f(), A("button", {
|
|
5936
5969
|
key: 2,
|
|
5937
5970
|
class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
5938
5971
|
style: {
|
|
@@ -5941,19 +5974,19 @@ var hs = {
|
|
|
5941
5974
|
"background-color": "transparent"
|
|
5942
5975
|
},
|
|
5943
5976
|
onClick: n[2] ||= (e) => M(u).toggleLastRevert()
|
|
5944
|
-
}, [M(u).isLastChangeReverted.value ? (f(), A(z, { key: 0 }, [H(M(
|
|
5977
|
+
}, [M(u).isLastChangeReverted.value ? (f(), A(z, { key: 0 }, [H(M(si), {
|
|
5945
5978
|
size: 12,
|
|
5946
5979
|
"stroke-width": 2
|
|
5947
|
-
}), B(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(z, { key: 1 }, [H(M(
|
|
5980
|
+
}), B(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(z, { key: 1 }, [H(M(vi), {
|
|
5948
5981
|
size: 12,
|
|
5949
5982
|
"stroke-width": 2
|
|
5950
5983
|
}), B(" " + O(M(i).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
|
|
5951
|
-
M(u).error.value ? (f(), A("div",
|
|
5984
|
+
M(u).error.value ? (f(), A("div", As, [H(M(Hr), {
|
|
5952
5985
|
size: 14,
|
|
5953
5986
|
"stroke-width": 2,
|
|
5954
5987
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5955
5988
|
}), L("span", null, O(M(u).error.value === "ai_apply_failed" ? M(i).aiChat.applyFailed : M(i).aiChat.error), 1)])) : j("", !0),
|
|
5956
|
-
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div",
|
|
5989
|
+
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", js, [L("div", Ms, [(f(!0), A(z, null, h(M(u).suggestions.value ?? [], (e, t) => (f(), A("button", {
|
|
5957
5990
|
key: t,
|
|
5958
5991
|
class: I(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (M(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
|
|
5959
5992
|
style: {
|
|
@@ -5963,104 +5996,104 @@ var hs = {
|
|
|
5963
5996
|
"box-shadow": "var(--tpl-shadow)"
|
|
5964
5997
|
},
|
|
5965
5998
|
onClick: (t) => D(e)
|
|
5966
|
-
}, O(e), 11,
|
|
5999
|
+
}, O(e), 11, Ns))), 128))])])) : j("", !0)
|
|
5967
6000
|
]),
|
|
5968
|
-
L("div",
|
|
6001
|
+
L("div", Ps, [L("div", Fs, [c(L("textarea", {
|
|
5969
6002
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
5970
6003
|
class: "tpl:max-h-32 tpl:min-h-[64px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-sm tpl:outline-none tpl:text-[var(--tpl-text)]",
|
|
5971
6004
|
placeholder: M(i).aiChat.inputPlaceholder,
|
|
5972
6005
|
disabled: M(u).isGenerating.value,
|
|
5973
6006
|
rows: "3",
|
|
5974
6007
|
onKeydown: ee
|
|
5975
|
-
}, null, 40,
|
|
6008
|
+
}, null, 40, Is), [[ie, d.value]]), L("button", {
|
|
5976
6009
|
class: "tpl-ai-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
5977
6010
|
disabled: !d.value.trim() || M(u).isGenerating.value,
|
|
5978
6011
|
onClick: T
|
|
5979
|
-
}, [H(M(
|
|
6012
|
+
}, [H(M(ui), {
|
|
5980
6013
|
size: 16,
|
|
5981
6014
|
"stroke-width": 2
|
|
5982
|
-
})], 8,
|
|
6015
|
+
})], 8, Ls)]), L("p", Rs, O(M(i).aiMenu.disclaimer), 1)])
|
|
5983
6016
|
])) : j("", !0)]),
|
|
5984
6017
|
_: 1
|
|
5985
6018
|
}));
|
|
5986
6019
|
}
|
|
5987
|
-
}),
|
|
5988
|
-
function
|
|
6020
|
+
}), Bs = /* @__PURE__ */ e({ default: () => Vs }), Vs = /* @__PURE__ */ Ei(zs, [["__scopeId", "data-v-a55e4bff"]]), Hs = 6e4, Us = 36e5, Ws = 864e5;
|
|
6021
|
+
function Gs(e, t, n, r) {
|
|
5989
6022
|
let i = new Date(e).getTime();
|
|
5990
6023
|
if (Number.isNaN(i)) return null;
|
|
5991
6024
|
let a = Date.now() - i;
|
|
5992
6025
|
if (a < -6e4) return null;
|
|
5993
|
-
let o = Math.floor(a /
|
|
6026
|
+
let o = Math.floor(a / Hs), s = Math.floor(a / Us), c = Math.floor(a / Ws);
|
|
5994
6027
|
return o < 1 ? t.justNow : o < 60 ? n ? n(t.minutesAgo, { minutes: o }) : t.minutesAgo.replace("{minutes}", String(o)) : s < 24 ? n ? n(t.hoursAgo, { hours: s }) : t.hoursAgo.replace("{hours}", String(s)) : r !== void 0 && c >= r ? null : n ? n(t.daysAgo, { days: c }) : t.daysAgo.replace("{days}", String(c));
|
|
5995
6028
|
}
|
|
5996
6029
|
//#endregion
|
|
5997
6030
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5998
|
-
var
|
|
6031
|
+
var Ks = {
|
|
5999
6032
|
key: 0,
|
|
6000
6033
|
class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6001
|
-
},
|
|
6034
|
+
}, qs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Js = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ys = {
|
|
6002
6035
|
key: 0,
|
|
6003
6036
|
class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
|
|
6004
|
-
},
|
|
6037
|
+
}, Xs = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Zs = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Qs = {
|
|
6005
6038
|
key: 0,
|
|
6006
6039
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6007
|
-
},
|
|
6040
|
+
}, $s = {
|
|
6008
6041
|
key: 1,
|
|
6009
6042
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6010
|
-
},
|
|
6043
|
+
}, ec = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, tc = {
|
|
6011
6044
|
key: 2,
|
|
6012
6045
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6013
|
-
},
|
|
6046
|
+
}, nc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, rc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, ic = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, ac = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, oc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, sc = {
|
|
6014
6047
|
key: 0,
|
|
6015
6048
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6016
|
-
},
|
|
6049
|
+
}, cc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, lc = ["title", "onClick"], uc = ["title", "onClick"], dc = ["title", "onClick"], fc = {
|
|
6017
6050
|
key: 0,
|
|
6018
6051
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6019
|
-
},
|
|
6052
|
+
}, pc = {
|
|
6020
6053
|
key: 0,
|
|
6021
6054
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6022
|
-
},
|
|
6055
|
+
}, mc = ["onClick"], hc = {
|
|
6023
6056
|
key: 2,
|
|
6024
6057
|
class: "tpl:mt-2"
|
|
6025
|
-
},
|
|
6058
|
+
}, gc = ["onKeydown"], _c = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, vc = ["disabled", "onClick"], yc = {
|
|
6026
6059
|
key: 3,
|
|
6027
6060
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6028
|
-
},
|
|
6061
|
+
}, bc = {
|
|
6029
6062
|
key: 4,
|
|
6030
6063
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6031
|
-
},
|
|
6064
|
+
}, xc = { class: "tpl:flex-1" }, Sc = ["onClick"], Cc = {
|
|
6032
6065
|
key: 5,
|
|
6033
6066
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6034
|
-
},
|
|
6067
|
+
}, wc = ["title", "onClick"], Tc = ["onClick"], Ec = {
|
|
6035
6068
|
key: 0,
|
|
6036
6069
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6037
|
-
},
|
|
6070
|
+
}, Dc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Oc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, kc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ac = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, jc = {
|
|
6038
6071
|
key: 0,
|
|
6039
6072
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6040
|
-
},
|
|
6073
|
+
}, Mc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Nc = ["title", "onClick"], Pc = ["title", "onClick"], Fc = {
|
|
6041
6074
|
key: 0,
|
|
6042
6075
|
class: "tpl:mt-1.5"
|
|
6043
|
-
},
|
|
6076
|
+
}, Ic = ["onKeydown"], Lc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Rc = ["disabled", "onClick"], zc = {
|
|
6044
6077
|
key: 1,
|
|
6045
6078
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6046
|
-
},
|
|
6079
|
+
}, Bc = {
|
|
6047
6080
|
key: 2,
|
|
6048
6081
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6049
|
-
},
|
|
6082
|
+
}, Vc = { class: "tpl:flex-1" }, Hc = ["onClick"], Uc = {
|
|
6050
6083
|
key: 0,
|
|
6051
6084
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6052
|
-
},
|
|
6085
|
+
}, Wc = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Gc = ["placeholder", "onKeydown"], Kc = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, qc = ["disabled", "onClick"], Jc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Yc = {
|
|
6053
6086
|
key: 0,
|
|
6054
6087
|
class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
|
|
6055
|
-
},
|
|
6088
|
+
}, Xc = {
|
|
6056
6089
|
key: 1,
|
|
6057
6090
|
class: "tpl-comments-input-wrapper tpl:flex tpl:min-h-[68px] tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]"
|
|
6058
|
-
},
|
|
6091
|
+
}, Zc = ["placeholder", "disabled"], Qc = ["disabled"], $c = /* @__PURE__ */ V({
|
|
6059
6092
|
__name: "CommentsSidebar",
|
|
6060
6093
|
props: { visible: { type: Boolean } },
|
|
6061
6094
|
emits: ["close", "filterBlock"],
|
|
6062
6095
|
setup(e, { expose: t, emit: n }) {
|
|
6063
|
-
let r = e, i = n, { format: a } =
|
|
6096
|
+
let r = e, i = n, { format: a } = lr(), { t: o } = Ii(), s = Y(Nn, "CommentsSidebar"), l = Y(tr, "CommentsSidebar"), u = Y(rr, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), T = C(null), E = k(() => l.userConfig?.id ?? null), D = k(() => {
|
|
6064
6097
|
let e = /* @__PURE__ */ new Set();
|
|
6065
6098
|
for (let t of s.content.value.blocks) if (e.add(t.id), t.type === "section") for (let n of t.children) for (let t of n) e.add(t.id);
|
|
6066
6099
|
return e;
|
|
@@ -6128,7 +6161,7 @@ var Gs = {
|
|
|
6128
6161
|
return e.author_identifier === E.value;
|
|
6129
6162
|
}
|
|
6130
6163
|
function _e(e) {
|
|
6131
|
-
return
|
|
6164
|
+
return Gs(e, o.snapshotHistory) ?? e;
|
|
6132
6165
|
}
|
|
6133
6166
|
function ve(e) {
|
|
6134
6167
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), de());
|
|
@@ -6155,22 +6188,22 @@ var Gs = {
|
|
|
6155
6188
|
"leave-from-class": "tpl:translate-x-0",
|
|
6156
6189
|
"leave-to-class": "tpl:translate-x-full"
|
|
6157
6190
|
}, {
|
|
6158
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6159
|
-
L("div",
|
|
6160
|
-
H(M(
|
|
6191
|
+
default: b(() => [e.visible ? (f(), A("div", Ks, [
|
|
6192
|
+
L("div", qs, [L("div", Js, [
|
|
6193
|
+
H(M(ri), {
|
|
6161
6194
|
size: 13,
|
|
6162
6195
|
"stroke-width": 2
|
|
6163
6196
|
}),
|
|
6164
6197
|
L("span", null, O(M(o).comments.title), 1),
|
|
6165
|
-
M(u).unresolvedCount.value > 0 ? (f(), A("span",
|
|
6198
|
+
M(u).unresolvedCount.value > 0 ? (f(), A("span", Ys, O(M(u).unresolvedCount.value), 1)) : j("", !0)
|
|
6166
6199
|
]), L("button", {
|
|
6167
6200
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6168
6201
|
onClick: n[0] ||= (e) => i("close")
|
|
6169
|
-
}, [H(M(
|
|
6202
|
+
}, [H(M(xi), {
|
|
6170
6203
|
size: 14,
|
|
6171
6204
|
"stroke-width": 2
|
|
6172
6205
|
})])]),
|
|
6173
|
-
L("div",
|
|
6206
|
+
L("div", Xs, [
|
|
6174
6207
|
L("button", {
|
|
6175
6208
|
class: I(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
|
|
6176
6209
|
onClick: n[1] ||= (e) => N("unresolved")
|
|
@@ -6185,156 +6218,156 @@ var Gs = {
|
|
|
6185
6218
|
onClick: n[3] ||= (e) => N("block", M(s).state.selectedBlockId ?? void 0)
|
|
6186
6219
|
}, O(M(o).comments.filterBlock), 3)) : j("", !0)
|
|
6187
6220
|
]),
|
|
6188
|
-
L("div",
|
|
6221
|
+
L("div", Zs, [M(u).isLoading.value ? (f(), A("div", Qs, [H(M(ni), {
|
|
6189
6222
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6190
6223
|
size: 24,
|
|
6191
6224
|
"stroke-width": 2
|
|
6192
|
-
})])) : ne.value.length === 0 ? (f(), A("div",
|
|
6225
|
+
})])) : ne.value.length === 0 ? (f(), A("div", $s, [H(M(ri), {
|
|
6193
6226
|
size: 32,
|
|
6194
6227
|
"stroke-width": 1.5,
|
|
6195
6228
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6196
|
-
}), L("p",
|
|
6229
|
+
}), L("p", ec, O(d.value === "all" ? M(o).comments.noCommentsHint : M(o).comments.noComments), 1)])) : (f(), A("div", tc, [(f(!0), A(z, null, h(ne.value, (e) => (f(), A("div", {
|
|
6197
6230
|
key: e.id,
|
|
6198
6231
|
class: "tpl-comment-thread"
|
|
6199
6232
|
}, [
|
|
6200
|
-
L("div",
|
|
6201
|
-
L("div",
|
|
6202
|
-
L("span",
|
|
6203
|
-
L("span",
|
|
6204
|
-
e.updated_at === e.created_at ? j("", !0) : (f(), A("span",
|
|
6205
|
-
]), L("div",
|
|
6233
|
+
L("div", nc, [
|
|
6234
|
+
L("div", rc, [L("div", ic, [
|
|
6235
|
+
L("span", ac, O(ge(e) ? M(o).comments.ownedByYou : e.author_name), 1),
|
|
6236
|
+
L("span", oc, O(_e(e.created_at)), 1),
|
|
6237
|
+
e.updated_at === e.created_at ? j("", !0) : (f(), A("span", sc, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6238
|
+
]), L("div", cc, [
|
|
6206
6239
|
L("button", {
|
|
6207
6240
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6208
6241
|
title: e.resolved_at ? M(o).comments.unresolve : M(o).comments.resolve,
|
|
6209
6242
|
onClick: (t) => he(e.id)
|
|
6210
|
-
}, [H(M(
|
|
6243
|
+
}, [H(M(Ur), {
|
|
6211
6244
|
size: 13,
|
|
6212
6245
|
"stroke-width": 2,
|
|
6213
6246
|
class: "tpl-resolve-icon",
|
|
6214
6247
|
style: R({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6215
|
-
}, null, 8, ["style"])], 8,
|
|
6248
|
+
}, null, 8, ["style"])], 8, lc),
|
|
6216
6249
|
ge(e) ? (f(), A("button", {
|
|
6217
6250
|
key: 0,
|
|
6218
6251
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6219
6252
|
title: M(o).comments.edit,
|
|
6220
6253
|
onClick: (t) => ce(e)
|
|
6221
|
-
}, [H(M(
|
|
6254
|
+
}, [H(M(ai), {
|
|
6222
6255
|
size: 12,
|
|
6223
6256
|
"stroke-width": 2
|
|
6224
|
-
})], 8,
|
|
6257
|
+
})], 8, uc)) : j("", !0),
|
|
6225
6258
|
ge(e) ? (f(), A("button", {
|
|
6226
6259
|
key: 1,
|
|
6227
6260
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6228
6261
|
title: M(o).comments.delete,
|
|
6229
6262
|
onClick: (t) => le(e.id)
|
|
6230
|
-
}, [H(M(
|
|
6263
|
+
}, [H(M(gi), {
|
|
6231
6264
|
size: 12,
|
|
6232
6265
|
"stroke-width": 2
|
|
6233
|
-
})], 8,
|
|
6266
|
+
})], 8, dc)) : j("", !0)
|
|
6234
6267
|
])]),
|
|
6235
6268
|
H(re, { name: "tpl-resolve" }, {
|
|
6236
|
-
default: b(() => [e.resolved_at ? (f(), A("div",
|
|
6269
|
+
default: b(() => [e.resolved_at ? (f(), A("div", fc, [H(M(Lr), {
|
|
6237
6270
|
size: 10,
|
|
6238
6271
|
"stroke-width": 2.5
|
|
6239
6272
|
}), L("span", null, O(M(a)(M(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
|
|
6240
6273
|
_: 2
|
|
6241
6274
|
}, 1024),
|
|
6242
|
-
e.block_id && ee(e.block_id) ? (f(), A("span",
|
|
6275
|
+
e.block_id && ee(e.block_id) ? (f(), A("span", pc, O(M(o).comments.missingBlock), 1)) : e.block_id ? (f(), A("button", {
|
|
6243
6276
|
key: 1,
|
|
6244
6277
|
class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6245
6278
|
onClick: (t) => M(s).selectBlock(e.block_id ?? "")
|
|
6246
|
-
}, " Block ", 8,
|
|
6247
|
-
y.value === e.id ? (f(), A("div",
|
|
6279
|
+
}, " Block ", 8, mc)) : j("", !0),
|
|
6280
|
+
y.value === e.id ? (f(), A("div", hc, [c(L("textarea", {
|
|
6248
6281
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6249
6282
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6250
6283
|
rows: "3",
|
|
6251
6284
|
onKeydown: (t) => be(t, e.id)
|
|
6252
|
-
}, null, 40,
|
|
6285
|
+
}, null, 40, gc), [[ie, x.value]]), L("div", _c, [L("button", {
|
|
6253
6286
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6254
6287
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6255
6288
|
onClick: (t) => pe(e.id)
|
|
6256
|
-
}, O(M(o).comments.save), 9,
|
|
6289
|
+
}, O(M(o).comments.save), 9, vc), L("button", {
|
|
6257
6290
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6258
6291
|
onClick: n[5] ||= (e) => V()
|
|
6259
|
-
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p",
|
|
6260
|
-
w.value === e.id ? (f(), A("div",
|
|
6261
|
-
L("span",
|
|
6292
|
+
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", yc, O(e.body), 1)),
|
|
6293
|
+
w.value === e.id ? (f(), A("div", bc, [
|
|
6294
|
+
L("span", xc, O(M(o).comments.deleteConfirm), 1),
|
|
6262
6295
|
L("button", {
|
|
6263
6296
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6264
6297
|
onClick: (t) => me(e.id)
|
|
6265
|
-
}, O(M(o).comments.delete), 9,
|
|
6298
|
+
}, O(M(o).comments.delete), 9, Sc),
|
|
6266
6299
|
L("button", {
|
|
6267
6300
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6268
6301
|
onClick: n[6] ||= (e) => ue()
|
|
6269
6302
|
}, O(M(o).comments.cancel), 1)
|
|
6270
6303
|
])) : j("", !0),
|
|
6271
|
-
y.value !== e.id && w.value !== e.id ? (f(), A("div",
|
|
6304
|
+
y.value !== e.id && w.value !== e.id ? (f(), A("div", Cc, [L("button", {
|
|
6272
6305
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6273
6306
|
title: M(o).comments.reply,
|
|
6274
6307
|
onClick: (t) => oe(e.id)
|
|
6275
|
-
}, [H(M(
|
|
6308
|
+
}, [H(M(li), {
|
|
6276
6309
|
size: 13,
|
|
6277
6310
|
"stroke-width": 2,
|
|
6278
6311
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6279
|
-
})], 8,
|
|
6312
|
+
})], 8, wc), (e.replies?.length ?? 0) > 0 ? (f(), A("button", {
|
|
6280
6313
|
key: 0,
|
|
6281
6314
|
class: "tpl:flex tpl:items-center tpl:gap-0.5 tpl:text-[11px] tpl:font-medium tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6282
6315
|
onClick: (t) => ae(e.id)
|
|
6283
|
-
}, [S.value.has(e.id) ? (f(), P(M(
|
|
6316
|
+
}, [S.value.has(e.id) ? (f(), P(M(Vr), {
|
|
6284
6317
|
key: 0,
|
|
6285
6318
|
size: 11,
|
|
6286
6319
|
"stroke-width": 2
|
|
6287
|
-
})) : (f(), P(M(
|
|
6320
|
+
})) : (f(), P(M(Rr), {
|
|
6288
6321
|
key: 1,
|
|
6289
6322
|
size: 11,
|
|
6290
6323
|
"stroke-width": 2
|
|
6291
|
-
})), B(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6324
|
+
})), B(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Tc)) : j("", !0)])) : j("", !0)
|
|
6292
6325
|
]),
|
|
6293
6326
|
H(re, { name: "tpl-replies" }, {
|
|
6294
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div",
|
|
6327
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Ec, [(f(!0), A(z, null, h(e.replies, (t, r) => (f(), A("div", {
|
|
6295
6328
|
key: t.id,
|
|
6296
6329
|
class: I(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
|
|
6297
6330
|
}, [
|
|
6298
|
-
L("div",
|
|
6299
|
-
L("span",
|
|
6300
|
-
L("span",
|
|
6301
|
-
t.updated_at === t.created_at ? j("", !0) : (f(), A("span",
|
|
6302
|
-
]), L("div",
|
|
6331
|
+
L("div", Dc, [L("div", Oc, [
|
|
6332
|
+
L("span", kc, O(ge(t) ? M(o).comments.ownedByYou : t.author_name), 1),
|
|
6333
|
+
L("span", Ac, O(_e(t.created_at)), 1),
|
|
6334
|
+
t.updated_at === t.created_at ? j("", !0) : (f(), A("span", jc, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6335
|
+
]), L("div", Mc, [ge(t) ? (f(), A("button", {
|
|
6303
6336
|
key: 0,
|
|
6304
6337
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6305
6338
|
title: M(o).comments.edit,
|
|
6306
6339
|
onClick: (e) => ce(t)
|
|
6307
|
-
}, [H(M(
|
|
6340
|
+
}, [H(M(ai), {
|
|
6308
6341
|
size: 11,
|
|
6309
6342
|
"stroke-width": 2
|
|
6310
|
-
})], 8,
|
|
6343
|
+
})], 8, Nc)) : j("", !0), ge(t) ? (f(), A("button", {
|
|
6311
6344
|
key: 1,
|
|
6312
6345
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6313
6346
|
title: M(o).comments.delete,
|
|
6314
6347
|
onClick: (e) => le(t.id)
|
|
6315
|
-
}, [H(M(
|
|
6348
|
+
}, [H(M(gi), {
|
|
6316
6349
|
size: 11,
|
|
6317
6350
|
"stroke-width": 2
|
|
6318
|
-
})], 8,
|
|
6319
|
-
y.value === t.id ? (f(), A("div",
|
|
6351
|
+
})], 8, Pc)) : j("", !0)])]),
|
|
6352
|
+
y.value === t.id ? (f(), A("div", Fc, [c(L("textarea", {
|
|
6320
6353
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6321
6354
|
class: "tpl:w-full tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6322
6355
|
rows: "2",
|
|
6323
6356
|
onKeydown: (e) => be(e, t.id)
|
|
6324
|
-
}, null, 40,
|
|
6357
|
+
}, null, 40, Ic), [[ie, x.value]]), L("div", Lc, [L("button", {
|
|
6325
6358
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6326
6359
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6327
6360
|
onClick: (e) => pe(t.id)
|
|
6328
|
-
}, O(M(o).comments.save), 9,
|
|
6361
|
+
}, O(M(o).comments.save), 9, Rc), L("button", {
|
|
6329
6362
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6330
6363
|
onClick: n[8] ||= (e) => V()
|
|
6331
|
-
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p",
|
|
6332
|
-
w.value === t.id ? (f(), A("div",
|
|
6333
|
-
L("span",
|
|
6364
|
+
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", zc, O(t.body), 1)),
|
|
6365
|
+
w.value === t.id ? (f(), A("div", Bc, [
|
|
6366
|
+
L("span", Vc, O(M(o).comments.deleteConfirm), 1),
|
|
6334
6367
|
L("button", {
|
|
6335
6368
|
class: "tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-medium tpl:bg-[var(--tpl-danger)] tpl:text-[var(--tpl-bg)]",
|
|
6336
6369
|
onClick: (e) => me(t.id)
|
|
6337
|
-
}, O(M(o).comments.delete), 9,
|
|
6370
|
+
}, O(M(o).comments.delete), 9, Hc),
|
|
6338
6371
|
L("button", {
|
|
6339
6372
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6340
6373
|
onClick: n[9] ||= (e) => ue()
|
|
@@ -6344,30 +6377,30 @@ var Gs = {
|
|
|
6344
6377
|
_: 2
|
|
6345
6378
|
}, 1024),
|
|
6346
6379
|
H(re, { name: "tpl-replies" }, {
|
|
6347
|
-
default: b(() => [_.value === e.id ? (f(), A("div",
|
|
6380
|
+
default: b(() => [_.value === e.id ? (f(), A("div", Uc, [L("div", Wc, [c(L("textarea", {
|
|
6348
6381
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6349
6382
|
class: "tpl:flex-1 tpl:resize-none tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-2 tpl:font-sans tpl:text-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
6350
6383
|
placeholder: M(o).comments.replyPlaceholder,
|
|
6351
6384
|
rows: "2",
|
|
6352
6385
|
onKeydown: (t) => ye(t, e.id)
|
|
6353
|
-
}, null, 40,
|
|
6386
|
+
}, null, 40, Gc), [[ie, v.value]]), L("div", Kc, [L("button", {
|
|
6354
6387
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6355
6388
|
disabled: !v.value.trim() || M(u).isSubmitting.value,
|
|
6356
6389
|
onClick: (t) => fe(e.id)
|
|
6357
|
-
}, [H(M(
|
|
6390
|
+
}, [H(M(ui), {
|
|
6358
6391
|
size: 14,
|
|
6359
6392
|
"stroke-width": 2
|
|
6360
|
-
})], 8,
|
|
6393
|
+
})], 8, qc), L("button", {
|
|
6361
6394
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6362
6395
|
onClick: n[11] ||= (e) => se()
|
|
6363
|
-
}, [H(M(
|
|
6396
|
+
}, [H(M(xi), {
|
|
6364
6397
|
size: 14,
|
|
6365
6398
|
"stroke-width": 2
|
|
6366
6399
|
})])])])])) : j("", !0)]),
|
|
6367
6400
|
_: 2
|
|
6368
6401
|
}, 1024)
|
|
6369
6402
|
]))), 128))]))]),
|
|
6370
|
-
L("div",
|
|
6403
|
+
L("div", Jc, [te.value ? (f(), A("div", Yc, O(M(o).comments.saveTemplateFirst), 1)) : (f(), A("div", Xc, [c(L("textarea", {
|
|
6371
6404
|
ref_key: "newCommentInput",
|
|
6372
6405
|
ref: T,
|
|
6373
6406
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6376,46 +6409,46 @@ var Gs = {
|
|
|
6376
6409
|
disabled: M(u).isSubmitting.value,
|
|
6377
6410
|
rows: "2",
|
|
6378
6411
|
onKeydown: ve
|
|
6379
|
-
}, null, 40,
|
|
6412
|
+
}, null, 40, Zc), [[ie, g.value]]), L("button", {
|
|
6380
6413
|
class: "tpl-comments-send-btn tpl:flex tpl:shrink-0 tpl:items-center tpl:justify-center tpl:rounded-md tpl:p-1.5 tpl:transition-all tpl:duration-150 tpl:disabled:opacity-40 tpl:text-[var(--tpl-primary)]",
|
|
6381
6414
|
disabled: !g.value.trim() || M(u).isSubmitting.value,
|
|
6382
6415
|
onClick: de
|
|
6383
|
-
}, [M(u).isSubmitting.value ? (f(), P(M(
|
|
6416
|
+
}, [M(u).isSubmitting.value ? (f(), P(M(ni), {
|
|
6384
6417
|
key: 0,
|
|
6385
6418
|
class: "tpl-spinner",
|
|
6386
6419
|
size: 16,
|
|
6387
6420
|
"stroke-width": 2
|
|
6388
|
-
})) : (f(), P(M(
|
|
6421
|
+
})) : (f(), P(M(ui), {
|
|
6389
6422
|
key: 1,
|
|
6390
6423
|
size: 16,
|
|
6391
6424
|
"stroke-width": 2
|
|
6392
|
-
}))], 8,
|
|
6425
|
+
}))], 8, Qc)]))])
|
|
6393
6426
|
])) : j("", !0)]),
|
|
6394
6427
|
_: 1
|
|
6395
6428
|
}));
|
|
6396
6429
|
}
|
|
6397
|
-
}),
|
|
6430
|
+
}), el = /* @__PURE__ */ e({ default: () => tl }), tl = /* @__PURE__ */ Ei($c, [["__scopeId", "data-v-d204f573"]]), nl = {
|
|
6398
6431
|
key: 0,
|
|
6399
6432
|
class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6400
|
-
},
|
|
6433
|
+
}, rl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, il = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, al = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, ol = {
|
|
6401
6434
|
key: 0,
|
|
6402
6435
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6403
|
-
},
|
|
6436
|
+
}, sl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, cl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ll = {
|
|
6404
6437
|
key: 1,
|
|
6405
6438
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6406
|
-
},
|
|
6439
|
+
}, ul = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, dl = {
|
|
6407
6440
|
key: 0,
|
|
6408
6441
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6409
|
-
},
|
|
6442
|
+
}, fl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, pl = ["src", "alt"], ml = {
|
|
6410
6443
|
key: 1,
|
|
6411
6444
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6412
|
-
},
|
|
6445
|
+
}, hl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, gl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, _l = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, vl = ["accept"], yl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, bl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, xl = ["placeholder"], Sl = {
|
|
6413
6446
|
key: 0,
|
|
6414
6447
|
class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
|
|
6415
|
-
},
|
|
6448
|
+
}, Cl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, wl = { class: "tpl:flex tpl:gap-2" }, Tl = {
|
|
6416
6449
|
key: 1,
|
|
6417
6450
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6418
|
-
},
|
|
6451
|
+
}, El = ["disabled"], Dl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ol = /* @__PURE__ */ V({
|
|
6419
6452
|
__name: "DesignReferenceSidebar",
|
|
6420
6453
|
props: {
|
|
6421
6454
|
visible: { type: Boolean },
|
|
@@ -6423,8 +6456,8 @@ var Gs = {
|
|
|
6423
6456
|
},
|
|
6424
6457
|
emits: ["close", "apply"],
|
|
6425
6458
|
setup(e, { emit: t }) {
|
|
6426
|
-
let n = e, r = t, { t: i } =
|
|
6427
|
-
authManager: Y(
|
|
6459
|
+
let n = e, r = t, { t: i } = Ii(), a = Y(Nn, "DesignReferenceSidebar"), o = Yo({
|
|
6460
|
+
authManager: Y(tr, "DesignReferenceSidebar"),
|
|
6428
6461
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6429
6462
|
onApply: (e) => r("apply", e)
|
|
6430
6463
|
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = k(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
@@ -6495,17 +6528,17 @@ var Gs = {
|
|
|
6495
6528
|
"leave-from-class": "tpl:translate-x-0",
|
|
6496
6529
|
"leave-to-class": "tpl:translate-x-full"
|
|
6497
6530
|
}, {
|
|
6498
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6531
|
+
default: b(() => [e.visible ? (f(), A("div", nl, [L("div", rl, [L("div", il, [H(M($r), {
|
|
6499
6532
|
size: 13,
|
|
6500
6533
|
"stroke-width": 2
|
|
6501
6534
|
}), L("span", null, O(M(i).designReference.title), 1)]), L("button", {
|
|
6502
6535
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6503
6536
|
onClick: n[0] ||= (e) => r("close")
|
|
6504
|
-
}, [H(M(
|
|
6537
|
+
}, [H(M(xi), {
|
|
6505
6538
|
size: 14,
|
|
6506
6539
|
"stroke-width": 2
|
|
6507
|
-
})])]), L("div",
|
|
6508
|
-
L("div",
|
|
6540
|
+
})])]), L("div", al, [M(o).isGenerating.value ? (f(), A("div", ol, [L("div", sl, [H(Ai), L("p", cl, O(M(i).designReference.generating), 1)])])) : (f(), A("div", ll, [
|
|
6541
|
+
L("div", ul, [L("button", {
|
|
6509
6542
|
class: "tpl:flex tpl:flex-1 tpl:items-center tpl:justify-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-2 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
|
|
6510
6543
|
style: R({
|
|
6511
6544
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6513,7 +6546,7 @@ var Gs = {
|
|
|
6513
6546
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6514
6547
|
}),
|
|
6515
6548
|
onClick: n[1] ||= (e) => _("image")
|
|
6516
|
-
}, [H(M(
|
|
6549
|
+
}, [H(M(Yr), {
|
|
6517
6550
|
size: 12,
|
|
6518
6551
|
"stroke-width": 2
|
|
6519
6552
|
}), B(" " + O(M(i).designReference.uploadImage), 1)], 4), L("button", {
|
|
@@ -6524,23 +6557,23 @@ var Gs = {
|
|
|
6524
6557
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6525
6558
|
}),
|
|
6526
6559
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6527
|
-
}, [H(M(
|
|
6560
|
+
}, [H(M(Xr), {
|
|
6528
6561
|
size: 12,
|
|
6529
6562
|
"stroke-width": 2
|
|
6530
6563
|
}), B(" " + O(M(i).designReference.uploadPdf), 1)], 4)]),
|
|
6531
|
-
L("div", null, [u.value ? (f(), A("div",
|
|
6564
|
+
L("div", null, [u.value ? (f(), A("div", dl, [L("div", fl, [p.value ? (f(), A("img", {
|
|
6532
6565
|
key: 0,
|
|
6533
6566
|
src: p.value,
|
|
6534
6567
|
alt: u.value.name,
|
|
6535
6568
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6536
|
-
}, null, 8,
|
|
6569
|
+
}, null, 8, pl)) : (f(), A("div", ml, [H(M(Xr), {
|
|
6537
6570
|
size: 32,
|
|
6538
6571
|
"stroke-width": 1.5,
|
|
6539
6572
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6540
|
-
}), L("span",
|
|
6573
|
+
}), L("span", hl, O(u.value.name), 1)])), L("button", {
|
|
6541
6574
|
class: "tpl:absolute tpl:top-2 tpl:right-2 tpl:rounded-full tpl:p-1 tpl:transition-colors tpl:duration-150 tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow)]",
|
|
6542
6575
|
onClick: x
|
|
6543
|
-
}, [H(M(
|
|
6576
|
+
}, [H(M(xi), {
|
|
6544
6577
|
size: 12,
|
|
6545
6578
|
"stroke-width": 2
|
|
6546
6579
|
})])])])) : (f(), A("div", {
|
|
@@ -6555,13 +6588,13 @@ var Gs = {
|
|
|
6555
6588
|
onDragleave: w,
|
|
6556
6589
|
onDrop: T
|
|
6557
6590
|
}, [
|
|
6558
|
-
H(M(
|
|
6591
|
+
H(M(yi), {
|
|
6559
6592
|
size: 24,
|
|
6560
6593
|
"stroke-width": 1.5,
|
|
6561
6594
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6562
6595
|
}),
|
|
6563
|
-
L("span",
|
|
6564
|
-
L("span",
|
|
6596
|
+
L("span", gl, O(M(i).designReference.dropHint), 1),
|
|
6597
|
+
L("span", _l, O(l.value === "image" ? M(i).designReference.acceptedImages : M(i).designReference.acceptedPdf), 1)
|
|
6565
6598
|
], 36)), L("input", {
|
|
6566
6599
|
ref_key: "fileInput",
|
|
6567
6600
|
ref: s,
|
|
@@ -6569,14 +6602,14 @@ var Gs = {
|
|
|
6569
6602
|
class: "tpl:hidden",
|
|
6570
6603
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6571
6604
|
onChange: v
|
|
6572
|
-
}, null, 40,
|
|
6573
|
-
L("div",
|
|
6605
|
+
}, null, 40, vl)]),
|
|
6606
|
+
L("div", yl, [L("label", bl, O(M(i).designReference.promptLabel), 1), c(L("textarea", {
|
|
6574
6607
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6575
6608
|
class: I(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
|
|
6576
6609
|
placeholder: M(i).designReference.promptPlaceholder,
|
|
6577
6610
|
rows: "3"
|
|
6578
|
-
}, null, 8,
|
|
6579
|
-
m.value ? (f(), A("div",
|
|
6611
|
+
}, null, 8, xl), [[ie, d.value]])]),
|
|
6612
|
+
m.value ? (f(), A("div", Sl, [L("p", Cl, O(M(i).designReference.replaceWarning), 1), L("div", wl, [L("button", {
|
|
6580
6613
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
|
|
6581
6614
|
style: { "background-color": "transparent" },
|
|
6582
6615
|
onClick: D
|
|
@@ -6584,7 +6617,7 @@ var Gs = {
|
|
|
6584
6617
|
class: "tpl:flex-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6585
6618
|
onClick: E
|
|
6586
6619
|
}, O(M(i).designReference.replaceConfirm), 1)])])) : j("", !0),
|
|
6587
|
-
M(o).error.value ? (f(), A("div",
|
|
6620
|
+
M(o).error.value ? (f(), A("div", Tl, [H(M(Hr), {
|
|
6588
6621
|
size: 14,
|
|
6589
6622
|
"stroke-width": 2,
|
|
6590
6623
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6594,31 +6627,31 @@ var Gs = {
|
|
|
6594
6627
|
class: "tpl:flex tpl:w-full tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
6595
6628
|
disabled: !g.value,
|
|
6596
6629
|
onClick: E
|
|
6597
|
-
}, [H(M(
|
|
6630
|
+
}, [H(M($r), {
|
|
6598
6631
|
size: 16,
|
|
6599
6632
|
"stroke-width": 2
|
|
6600
|
-
}), B(" " + O(M(i).designReference.generate), 1)], 8,
|
|
6601
|
-
L("p",
|
|
6633
|
+
}), B(" " + O(M(i).designReference.generate), 1)], 8, El)),
|
|
6634
|
+
L("p", Dl, O(M(i).aiMenu.disclaimer), 1)
|
|
6602
6635
|
]))])])) : j("", !0)]),
|
|
6603
6636
|
_: 1
|
|
6604
6637
|
}));
|
|
6605
6638
|
}
|
|
6606
|
-
}),
|
|
6639
|
+
}), kl = /* @__PURE__ */ e({ default: () => Al }), Al = /* @__PURE__ */ Ei(Ol, [["__scopeId", "data-v-bdbf8d0d"]]);
|
|
6607
6640
|
//#endregion
|
|
6608
6641
|
//#region src/composables/usePopoverRoot.ts
|
|
6609
|
-
function
|
|
6610
|
-
return v(
|
|
6642
|
+
function jl() {
|
|
6643
|
+
return v(er, C(null));
|
|
6611
6644
|
}
|
|
6612
6645
|
//#endregion
|
|
6613
6646
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6614
|
-
var
|
|
6647
|
+
var Ml = ["data-tpl-theme"], Nl = /* @__PURE__ */ V({
|
|
6615
6648
|
__name: "TplModal",
|
|
6616
6649
|
props: { visible: { type: Boolean } },
|
|
6617
6650
|
emits: ["close", "keydown"],
|
|
6618
6651
|
setup(e, { emit: t }) {
|
|
6619
6652
|
let n = e, r = t, i = C(null);
|
|
6620
|
-
|
|
6621
|
-
let a = v(
|
|
6653
|
+
Ni(i, k(() => n.visible));
|
|
6654
|
+
let a = v(zn), s = jl();
|
|
6622
6655
|
function c(e) {
|
|
6623
6656
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
6624
6657
|
}
|
|
@@ -6647,30 +6680,30 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6647
6680
|
}, [L("div", {
|
|
6648
6681
|
ref_key: "dialogRef",
|
|
6649
6682
|
ref: i
|
|
6650
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
6683
|
+
}, [o(t.$slots, "default")], 512)], 40, Ml)) : j("", !0)]),
|
|
6651
6684
|
_: 3
|
|
6652
6685
|
})], 8, ["to"])) : j("", !0);
|
|
6653
6686
|
}
|
|
6654
|
-
}),
|
|
6687
|
+
}), Pl = ["disabled", "title"], Fl = ["title"], Il = {
|
|
6655
6688
|
key: 0,
|
|
6656
6689
|
class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
|
|
6657
6690
|
style: {
|
|
6658
6691
|
"backdrop-filter": "blur(8px)",
|
|
6659
6692
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6660
6693
|
}
|
|
6661
|
-
},
|
|
6694
|
+
}, Ll = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, Rl = {
|
|
6662
6695
|
key: 0,
|
|
6663
6696
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6664
|
-
},
|
|
6697
|
+
}, zl = {
|
|
6665
6698
|
key: 1,
|
|
6666
6699
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6667
|
-
},
|
|
6700
|
+
}, Bl = {
|
|
6668
6701
|
key: 2,
|
|
6669
6702
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6670
|
-
},
|
|
6703
|
+
}, Vl = ["disabled", "onClick"], Hl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Ul = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Wl = {
|
|
6671
6704
|
key: 0,
|
|
6672
6705
|
class: "tpl:rounded tpl:px-1 tpl:py-0.5 tpl:text-[10px] tpl:font-normal tpl:bg-[var(--tpl-bg-active)] tpl:text-[var(--tpl-text-muted)]"
|
|
6673
|
-
},
|
|
6706
|
+
}, Gl = ["disabled", "title"], Kl = /* @__PURE__ */ V({
|
|
6674
6707
|
__name: "SnapshotHistory",
|
|
6675
6708
|
props: {
|
|
6676
6709
|
snapshots: {},
|
|
@@ -6679,7 +6712,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6679
6712
|
},
|
|
6680
6713
|
emits: ["load", "navigate"],
|
|
6681
6714
|
setup(e, { emit: t }) {
|
|
6682
|
-
let n = e, r = t, { format: i } =
|
|
6715
|
+
let n = e, r = t, { format: i } = lr(), { t: a } = Ii(), o = C(!1), s = C(null), c = C(-1);
|
|
6683
6716
|
U(() => n.snapshots.length, () => {
|
|
6684
6717
|
c.value = -1;
|
|
6685
6718
|
});
|
|
@@ -6698,7 +6731,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6698
6731
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6699
6732
|
}
|
|
6700
6733
|
function _(e) {
|
|
6701
|
-
let t =
|
|
6734
|
+
let t = Gs(e, a.snapshotHistory, i, 7);
|
|
6702
6735
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6703
6736
|
month: "short",
|
|
6704
6737
|
day: "numeric",
|
|
@@ -6706,7 +6739,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6706
6739
|
minute: "2-digit"
|
|
6707
6740
|
}) : t;
|
|
6708
6741
|
}
|
|
6709
|
-
return
|
|
6742
|
+
return fn(s, () => {
|
|
6710
6743
|
o.value = !1;
|
|
6711
6744
|
}), (t, n) => (f(), A("div", {
|
|
6712
6745
|
ref_key: "dropdownRef",
|
|
@@ -6718,34 +6751,34 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6718
6751
|
disabled: !u.value,
|
|
6719
6752
|
title: M(a).snapshotHistory.olderSnapshot,
|
|
6720
6753
|
onClick: N(p, ["stop"])
|
|
6721
|
-
}, [H(M(
|
|
6754
|
+
}, [H(M(zr), {
|
|
6722
6755
|
size: 14,
|
|
6723
6756
|
"stroke-width": 2
|
|
6724
|
-
})], 8,
|
|
6757
|
+
})], 8, Pl),
|
|
6725
6758
|
L("button", {
|
|
6726
6759
|
class: "tpl:flex tpl:h-7 tpl:shrink-0 tpl:cursor-pointer tpl:items-center tpl:gap-0.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:bg-transparent tpl:px-1.5 tpl:transition-colors tpl:duration-150 hover:tpl:bg-[var(--tpl-bg-hover)] tpl:text-[var(--tpl-text-muted)]",
|
|
6727
6760
|
title: M(a).snapshotHistory.tooltip,
|
|
6728
6761
|
onClick: N(m, ["stop"])
|
|
6729
|
-
}, [H(M(
|
|
6762
|
+
}, [H(M(Wr), {
|
|
6730
6763
|
size: 16,
|
|
6731
6764
|
"stroke-width": 1.5
|
|
6732
|
-
}), H(M(
|
|
6765
|
+
}), H(M(Rr), {
|
|
6733
6766
|
class: I(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6734
6767
|
size: 10,
|
|
6735
6768
|
"stroke-width": 2
|
|
6736
|
-
}, null, 8, ["class"])], 8,
|
|
6769
|
+
}, null, 8, ["class"])], 8, Fl),
|
|
6737
6770
|
H(re, { name: "tpl-dropdown" }, {
|
|
6738
|
-
default: b(() => [o.value ? (f(), A("div",
|
|
6771
|
+
default: b(() => [o.value ? (f(), A("div", Il, [L("div", Ll, O(M(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), A("div", Rl, [H(M(ni), {
|
|
6739
6772
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6740
6773
|
size: 20,
|
|
6741
6774
|
"stroke-width": 2
|
|
6742
|
-
})])) : e.snapshots.length === 0 ? (f(), A("div",
|
|
6775
|
+
})])) : e.snapshots.length === 0 ? (f(), A("div", zl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", Bl, [(f(!0), A(z, null, h(e.snapshots, (t) => (f(), A("button", {
|
|
6743
6776
|
key: t.id,
|
|
6744
6777
|
class: "tpl:flex tpl:w-full tpl:cursor-pointer tpl:items-center tpl:border-b tpl:border-b-[var(--tpl-border-light)] tpl:border-l-2 tpl:border-l-transparent tpl:px-3 tpl:py-2.5 tpl:text-left tpl:transition-all tpl:duration-150 last:tpl:border-b-0 hover:tpl:border-l-[var(--tpl-primary)] hover:tpl:bg-[var(--tpl-bg-hover)]",
|
|
6745
6778
|
style: { "background-color": "transparent" },
|
|
6746
6779
|
disabled: e.isRestoring,
|
|
6747
6780
|
onClick: (e) => g(t.id)
|
|
6748
|
-
}, [L("div",
|
|
6781
|
+
}, [L("div", Hl, [L("div", Ul, [L("span", null, O(_(t.created_at)), 1), t.is_autosave ? (f(), A("span", Wl, O(M(a).snapshotHistory.auto), 1)) : j("", !0)])])], 8, Vl))), 128))]))])) : j("", !0)]),
|
|
6749
6782
|
_: 1
|
|
6750
6783
|
}),
|
|
6751
6784
|
L("button", {
|
|
@@ -6753,74 +6786,74 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
|
6753
6786
|
disabled: !l.value,
|
|
6754
6787
|
title: M(a).snapshotHistory.newerSnapshot,
|
|
6755
6788
|
onClick: N(d, ["stop"])
|
|
6756
|
-
}, [H(M(
|
|
6789
|
+
}, [H(M(Br), {
|
|
6757
6790
|
size: 14,
|
|
6758
6791
|
"stroke-width": 2
|
|
6759
|
-
})], 8,
|
|
6792
|
+
})], 8, Gl)
|
|
6760
6793
|
], 512));
|
|
6761
6794
|
}
|
|
6762
|
-
}),
|
|
6795
|
+
}), ql = /* @__PURE__ */ e({ default: () => Jl }), Jl = Kl;
|
|
6763
6796
|
//#endregion
|
|
6764
6797
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6765
|
-
function
|
|
6798
|
+
function Yl(e) {
|
|
6766
6799
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6767
6800
|
}
|
|
6768
|
-
function
|
|
6801
|
+
function Xl(e) {
|
|
6769
6802
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6770
6803
|
}
|
|
6771
|
-
function
|
|
6804
|
+
function Zl(e) {
|
|
6772
6805
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6773
6806
|
}
|
|
6774
|
-
function
|
|
6807
|
+
function Ql(e) {
|
|
6775
6808
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6776
6809
|
}
|
|
6777
6810
|
//#endregion
|
|
6778
6811
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6779
|
-
var
|
|
6812
|
+
var $l = {
|
|
6780
6813
|
key: 0,
|
|
6781
6814
|
class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
|
|
6782
|
-
},
|
|
6815
|
+
}, eu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, tu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, nu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ru = ["title"], iu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, au = {
|
|
6783
6816
|
key: 0,
|
|
6784
6817
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6785
|
-
},
|
|
6818
|
+
}, ou = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, su = {
|
|
6786
6819
|
key: 1,
|
|
6787
6820
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6788
|
-
},
|
|
6821
|
+
}, cu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, lu = {
|
|
6789
6822
|
key: 2,
|
|
6790
6823
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6791
|
-
},
|
|
6824
|
+
}, uu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, du = {
|
|
6792
6825
|
key: 0,
|
|
6793
6826
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6794
|
-
},
|
|
6827
|
+
}, fu = {
|
|
6795
6828
|
key: 0,
|
|
6796
6829
|
class: "tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
|
|
6797
|
-
},
|
|
6830
|
+
}, pu = ["onClick"], mu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, hu = {
|
|
6798
6831
|
key: 0,
|
|
6799
6832
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6800
|
-
},
|
|
6833
|
+
}, gu = {
|
|
6801
6834
|
key: 0,
|
|
6802
6835
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6803
|
-
},
|
|
6836
|
+
}, _u = {
|
|
6804
6837
|
key: 0,
|
|
6805
6838
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6806
|
-
},
|
|
6839
|
+
}, vu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, yu = { class: "tpl:flex-1 tpl:min-w-0" }, bu = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, xu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Su = {
|
|
6807
6840
|
key: 0,
|
|
6808
6841
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6809
|
-
},
|
|
6842
|
+
}, Cu = {
|
|
6810
6843
|
key: 1,
|
|
6811
6844
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6812
|
-
},
|
|
6845
|
+
}, wu = ["disabled", "onClick"], Tu = {
|
|
6813
6846
|
key: 0,
|
|
6814
6847
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6815
|
-
},
|
|
6848
|
+
}, Eu = {
|
|
6816
6849
|
key: 3,
|
|
6817
6850
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6818
|
-
},
|
|
6851
|
+
}, Du = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ou = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ku = /* @__PURE__ */ V({
|
|
6819
6852
|
__name: "TemplateScoringPanel",
|
|
6820
6853
|
props: { visible: { type: Boolean } },
|
|
6821
6854
|
emits: ["close"],
|
|
6822
6855
|
setup(e, { emit: t }) {
|
|
6823
|
-
let n = e, r = t, { t: i } =
|
|
6856
|
+
let n = e, r = t, { t: i } = Ii(), a = Y(Nn, "TemplateScoringPanel"), o = Y(ar, "TemplateScoringPanel"), s = v(Un, []), c = C({
|
|
6824
6857
|
spam: !0,
|
|
6825
6858
|
readability: !0,
|
|
6826
6859
|
accessibility: !0,
|
|
@@ -6835,10 +6868,10 @@ var Ql = {
|
|
|
6835
6868
|
"accessibility",
|
|
6836
6869
|
"bestPractices"
|
|
6837
6870
|
], p = {
|
|
6838
|
-
spam:
|
|
6839
|
-
readability:
|
|
6840
|
-
accessibility:
|
|
6841
|
-
bestPractices:
|
|
6871
|
+
spam: pi,
|
|
6872
|
+
readability: Jr,
|
|
6873
|
+
accessibility: mi,
|
|
6874
|
+
bestPractices: Si
|
|
6842
6875
|
};
|
|
6843
6876
|
function m() {
|
|
6844
6877
|
o.score(a.content.value, s);
|
|
@@ -6866,50 +6899,50 @@ var Ql = {
|
|
|
6866
6899
|
"leave-from-class": "tpl:translate-x-0",
|
|
6867
6900
|
"leave-to-class": "tpl:translate-x-full"
|
|
6868
6901
|
}, {
|
|
6869
|
-
default: b(() => [e.visible ? (f(), A("div",
|
|
6902
|
+
default: b(() => [e.visible ? (f(), A("div", $l, [L("div", eu, [L("div", tu, [H(M(fi), {
|
|
6870
6903
|
size: 13,
|
|
6871
6904
|
"stroke-width": 2
|
|
6872
|
-
}), L("span", null, O(M(i).scoring.title), 1)]), L("div",
|
|
6905
|
+
}), L("span", null, O(M(i).scoring.title), 1)]), L("div", nu, [M(o).scoringResult.value && !M(o).isScoring.value ? (f(), A("button", {
|
|
6873
6906
|
key: 0,
|
|
6874
6907
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6875
6908
|
title: M(i).scoring.rescore,
|
|
6876
6909
|
onClick: n[0] ||= (e) => m()
|
|
6877
|
-
}, [H(M(
|
|
6910
|
+
}, [H(M(ci), {
|
|
6878
6911
|
size: 14,
|
|
6879
6912
|
"stroke-width": 2
|
|
6880
|
-
})], 8,
|
|
6913
|
+
})], 8, ru)) : j("", !0), L("button", {
|
|
6881
6914
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6882
6915
|
onClick: n[1] ||= (e) => r("close")
|
|
6883
|
-
}, [H(M(
|
|
6916
|
+
}, [H(M(xi), {
|
|
6884
6917
|
size: 14,
|
|
6885
6918
|
"stroke-width": 2
|
|
6886
|
-
})])])]), L("div",
|
|
6887
|
-
H(M(
|
|
6919
|
+
})])])]), L("div", iu, [M(o).isScoring.value ? (f(), A("div", au, [L("p", ou, O(M(i).scoring.scoring), 1), H(Ai, { class: "tpl:w-3/4" })])) : M(o).error.value && !M(o).scoringResult.value ? (f(), A("div", su, [
|
|
6920
|
+
H(M(Hr), {
|
|
6888
6921
|
size: 32,
|
|
6889
6922
|
"stroke-width": 1.5,
|
|
6890
6923
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6891
6924
|
}),
|
|
6892
|
-
L("p",
|
|
6925
|
+
L("p", cu, O(M(i).scoring.error), 1),
|
|
6893
6926
|
L("button", {
|
|
6894
6927
|
class: "tpl:mt-2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text-muted)]",
|
|
6895
6928
|
onClick: n[2] ||= (e) => m()
|
|
6896
|
-
}, [H(M(
|
|
6929
|
+
}, [H(M(ci), {
|
|
6897
6930
|
size: 12,
|
|
6898
6931
|
"stroke-width": 2
|
|
6899
6932
|
}), B(" " + O(M(i).scoring.rescore), 1)])
|
|
6900
|
-
])) : M(o).scoringResult.value ? (f(), A("div",
|
|
6933
|
+
])) : M(o).scoringResult.value ? (f(), A("div", lu, [
|
|
6901
6934
|
L("div", {
|
|
6902
6935
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6903
|
-
style: R({ backgroundColor: M(
|
|
6936
|
+
style: R({ backgroundColor: M(Xl)(M(o).scoringResult.value.score) })
|
|
6904
6937
|
}, [
|
|
6905
6938
|
L("span", {
|
|
6906
6939
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6907
|
-
style: R({ color: M(
|
|
6940
|
+
style: R({ color: M(Yl)(M(o).scoringResult.value.score) })
|
|
6908
6941
|
}, O(M(o).scoringResult.value.score), 5),
|
|
6909
|
-
L("span",
|
|
6910
|
-
_() > 0 ? (f(), A("span",
|
|
6942
|
+
L("span", uu, O(M(i).scoring.overallScore), 1),
|
|
6943
|
+
_() > 0 ? (f(), A("span", du, O(_()) + " " + O(M(i).scoring.findings), 1)) : j("", !0)
|
|
6911
6944
|
], 4),
|
|
6912
|
-
M(o).fixError.value ? (f(), A("div",
|
|
6945
|
+
M(o).fixError.value ? (f(), A("div", fu, [H(M(Hr), {
|
|
6913
6946
|
size: 14,
|
|
6914
6947
|
"stroke-width": 2,
|
|
6915
6948
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6924,74 +6957,74 @@ var Ql = {
|
|
|
6924
6957
|
(f(), P(d(p[e]), {
|
|
6925
6958
|
size: 14,
|
|
6926
6959
|
"stroke-width": 2,
|
|
6927
|
-
style: R({ color: M(
|
|
6960
|
+
style: R({ color: M(Yl)(M(o).scoringResult.value.categories[e].score) })
|
|
6928
6961
|
}, null, 8, ["style"])),
|
|
6929
|
-
L("span",
|
|
6962
|
+
L("span", mu, O(M(i).scoring.categories[e]), 1),
|
|
6930
6963
|
L("span", {
|
|
6931
6964
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6932
6965
|
style: R({
|
|
6933
|
-
color: M(
|
|
6934
|
-
backgroundColor: M(
|
|
6966
|
+
color: M(Yl)(M(o).scoringResult.value.categories[e].score),
|
|
6967
|
+
backgroundColor: M(Xl)(M(o).scoringResult.value.categories[e].score)
|
|
6935
6968
|
})
|
|
6936
6969
|
}, O(M(o).scoringResult.value.categories[e].score), 5),
|
|
6937
|
-
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span",
|
|
6938
|
-
H(M(
|
|
6970
|
+
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span", hu, O(M(o).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
|
|
6971
|
+
H(M(Rr), {
|
|
6939
6972
|
size: 12,
|
|
6940
6973
|
"stroke-width": 2,
|
|
6941
6974
|
class: I(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6942
6975
|
}, null, 8, ["class"])
|
|
6943
|
-
], 8,
|
|
6976
|
+
], 8, pu), c.value[e] ? (f(), A("div", gu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", _u, O(M(i).scoring.noFindings), 1)) : j("", !0), (f(!0), A(z, null, h(M(o).scoringResult.value.categories[e].findings, (e) => (f(), A("div", {
|
|
6944
6977
|
key: e.id,
|
|
6945
6978
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6946
|
-
}, [L("div",
|
|
6979
|
+
}, [L("div", vu, [(f(), P(d(M(e.severity === "high" ? Hr : e.severity === "medium" ? _i : ti)), {
|
|
6947
6980
|
size: 13,
|
|
6948
6981
|
"stroke-width": 2,
|
|
6949
6982
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6950
|
-
style: R({ color: M(
|
|
6951
|
-
}, null, 8, ["style"])), L("div",
|
|
6952
|
-
L("div",
|
|
6983
|
+
style: R({ color: M(Zl)(e.severity) })
|
|
6984
|
+
}, null, 8, ["style"])), L("div", yu, [
|
|
6985
|
+
L("div", bu, [L("span", {
|
|
6953
6986
|
class: "tpl:mt-0.5 tpl:shrink-0 tpl:rounded tpl:px-1 tpl:py-px tpl:text-[10px] tpl:font-medium tpl:leading-tight",
|
|
6954
6987
|
style: R({
|
|
6955
|
-
color: M(
|
|
6956
|
-
backgroundColor: M(
|
|
6988
|
+
color: M(Zl)(e.severity),
|
|
6989
|
+
backgroundColor: M(Ql)(e.severity)
|
|
6957
6990
|
})
|
|
6958
|
-
}, O(M(i).scoring.severity[e.severity]), 5), L("span",
|
|
6959
|
-
e.suggestion ? (f(), A("p",
|
|
6960
|
-
e.blockId ? (f(), A("div",
|
|
6991
|
+
}, O(M(i).scoring.severity[e.severity]), 5), L("span", xu, O(e.message), 1)]),
|
|
6992
|
+
e.suggestion ? (f(), A("p", Su, O(e.suggestion), 1)) : j("", !0),
|
|
6993
|
+
e.blockId ? (f(), A("div", Cu, [L("button", {
|
|
6961
6994
|
class: "tpl-scoring-fix-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded tpl:border tpl:px-3 tpl:py-1.5 tpl:text-[11px] tpl:font-medium tpl:transition-all tpl:duration-150 tpl:disabled:opacity-50 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-primary)]",
|
|
6962
6995
|
style: { "background-color": "transparent" },
|
|
6963
6996
|
disabled: M(o).fixingFindingId.value !== null,
|
|
6964
6997
|
onClick: (t) => g(e)
|
|
6965
|
-
}, [M(o).fixingFindingId.value === e.id ? (f(), P(M(
|
|
6998
|
+
}, [M(o).fixingFindingId.value === e.id ? (f(), P(M(ni), {
|
|
6966
6999
|
key: 0,
|
|
6967
7000
|
class: "tpl-spinner",
|
|
6968
7001
|
size: 11,
|
|
6969
7002
|
"stroke-width": 2
|
|
6970
|
-
})) : (f(), P(M(
|
|
7003
|
+
})) : (f(), P(M(mi), {
|
|
6971
7004
|
key: 1,
|
|
6972
7005
|
size: 11,
|
|
6973
7006
|
"stroke-width": 2
|
|
6974
|
-
})), B(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8,
|
|
7007
|
+
})), B(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8, wu), M(o).fixError.value ? (f(), A("p", Tu, O(M(o).fixError.value), 1)) : j("", !0)])) : j("", !0)
|
|
6975
7008
|
])])]))), 128))])) : j("", !0)])), 64))
|
|
6976
|
-
])) : (f(), A("div",
|
|
7009
|
+
])) : (f(), A("div", Eu, [H(M(fi), {
|
|
6977
7010
|
size: 32,
|
|
6978
7011
|
"stroke-width": 1.5,
|
|
6979
7012
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6980
|
-
}), L("p",
|
|
7013
|
+
}), L("p", Du, O(M(i).scoring.emptyState), 1)])), L("p", Ou, O(M(i).aiMenu.disclaimer), 1)])])) : j("", !0)]),
|
|
6981
7014
|
_: 1
|
|
6982
7015
|
}));
|
|
6983
7016
|
}
|
|
6984
|
-
}),
|
|
7017
|
+
}), Au = /* @__PURE__ */ e({ default: () => ju }), ju = /* @__PURE__ */ Ei(ku, [["__scopeId", "data-v-3a059e8d"]]), Mu = ["aria-busy"], Nu = {
|
|
6985
7018
|
id: "tpl-test-email-title",
|
|
6986
7019
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
6987
|
-
},
|
|
7020
|
+
}, Pu = { class: "tpl:mb-3" }, Fu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Iu = ["value"], Lu = ["disabled"], Ru = ["value"], zu = {
|
|
6988
7021
|
key: 0,
|
|
6989
7022
|
role: "alert",
|
|
6990
7023
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
6991
|
-
},
|
|
7024
|
+
}, Bu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Vu = ["disabled"], Hu = ["disabled"], Uu = {
|
|
6992
7025
|
key: 0,
|
|
6993
7026
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6994
|
-
},
|
|
7027
|
+
}, Wu = { key: 1 }, Gu = /* @__PURE__ */ V({
|
|
6995
7028
|
__name: "TestEmailModal",
|
|
6996
7029
|
props: {
|
|
6997
7030
|
visible: { type: Boolean },
|
|
@@ -7001,7 +7034,7 @@ var Ql = {
|
|
|
7001
7034
|
},
|
|
7002
7035
|
emits: ["send", "close"],
|
|
7003
7036
|
setup(e, { emit: t }) {
|
|
7004
|
-
let n = e, r = t, { t: i } =
|
|
7037
|
+
let n = e, r = t, { t: i } = Ii(), a = C("");
|
|
7005
7038
|
U(() => n.visible, (e) => {
|
|
7006
7039
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7007
7040
|
});
|
|
@@ -7014,7 +7047,7 @@ var Ql = {
|
|
|
7014
7047
|
function l(e) {
|
|
7015
7048
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7016
7049
|
}
|
|
7017
|
-
return (t, n) => (f(), P(
|
|
7050
|
+
return (t, n) => (f(), P(Nl, {
|
|
7018
7051
|
visible: e.visible,
|
|
7019
7052
|
onClose: s,
|
|
7020
7053
|
onKeydown: l
|
|
@@ -7030,14 +7063,14 @@ var Ql = {
|
|
|
7030
7063
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7031
7064
|
}
|
|
7032
7065
|
}, [
|
|
7033
|
-
L("h3",
|
|
7034
|
-
L("div",
|
|
7066
|
+
L("h3", Nu, O(M(i).testEmail.title), 1),
|
|
7067
|
+
L("div", Pu, [L("label", Fu, O(M(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), A("input", {
|
|
7035
7068
|
key: 0,
|
|
7036
7069
|
type: "text",
|
|
7037
7070
|
value: a.value,
|
|
7038
7071
|
disabled: "",
|
|
7039
7072
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
|
|
7040
|
-
}, null, 8,
|
|
7073
|
+
}, null, 8, Iu)) : c((f(), A("select", {
|
|
7041
7074
|
key: 1,
|
|
7042
7075
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7043
7076
|
class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]",
|
|
@@ -7045,29 +7078,29 @@ var Ql = {
|
|
|
7045
7078
|
}, [(f(!0), A(z, null, h(e.allowedEmails, (e) => (f(), A("option", {
|
|
7046
7079
|
key: e,
|
|
7047
7080
|
value: e
|
|
7048
|
-
}, O(e), 9,
|
|
7049
|
-
e.error ? (f(), A("p",
|
|
7050
|
-
L("div",
|
|
7081
|
+
}, O(e), 9, Ru))), 128))], 8, Lu)), [[w, a.value]])]),
|
|
7082
|
+
e.error ? (f(), A("p", zu, O(e.error), 1)) : j("", !0),
|
|
7083
|
+
L("div", Bu, [L("button", {
|
|
7051
7084
|
type: "button",
|
|
7052
7085
|
class: I(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
|
|
7053
7086
|
disabled: e.isSending,
|
|
7054
7087
|
onClick: s
|
|
7055
|
-
}, O(M(i).testEmail.cancel), 11,
|
|
7088
|
+
}, O(M(i).testEmail.cancel), 11, Vu), L("button", {
|
|
7056
7089
|
type: "button",
|
|
7057
7090
|
class: "tpl:cursor-pointer tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:disabled:cursor-not-allowed tpl:disabled:opacity-50 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
|
|
7058
7091
|
disabled: !a.value || e.isSending,
|
|
7059
7092
|
onClick: o
|
|
7060
|
-
}, [e.isSending ? (f(), A("span",
|
|
7093
|
+
}, [e.isSending ? (f(), A("span", Uu, [H(M(ni), {
|
|
7061
7094
|
class: "tpl:animate-spin",
|
|
7062
7095
|
size: 12,
|
|
7063
7096
|
"stroke-width": 2
|
|
7064
|
-
}), B(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span",
|
|
7065
|
-
], 8,
|
|
7097
|
+
}), B(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span", Wu, O(M(i).testEmail.send), 1))], 8, Hu)])
|
|
7098
|
+
], 8, Mu)]),
|
|
7066
7099
|
_: 1
|
|
7067
7100
|
}, 8, ["visible"]));
|
|
7068
7101
|
}
|
|
7069
|
-
}),
|
|
7102
|
+
}), Ku = /* @__PURE__ */ e({ default: () => qu }), qu = Gu;
|
|
7070
7103
|
//#endregion
|
|
7071
|
-
export {
|
|
7104
|
+
export { Li as $, Qn as $t, jo as A, pe as An, Lr as At, Pa as B, Vn as Bt, Uo as C, _e as Cn, qr as Ct, Z as D, ge as Dn, Hr as Dt, $ as E, Se as En, Wr as Et, eo as F, ye as Fn, lr as Ft, ca as G, Hn as Gt, Ma as H, or as Ht, no as I, fe as In, nr as It, ea as J, Ln as Jt, sa as K, Jn as Kt, $a as L, ue as Ln, Yn as Lt, yo as M, xe as Mn, Tr as Mt, po as N, we as Nn, _r as Nt, Mo as O, Ce as On, Br as Ot, lo as P, me as Pn, ur as Pt, Ri as Q, ar as Qt, Ya as R, de as Rn, tr as Rt, qo as S, G as Sn, Jr as St, zo as T, ve as Tn, Gr as Tt, Ca as U, rr as Ut, Na as V, Xn as Vt, ya as W, In as Wt, Ui as X, qn as Xt, Gi as Y, Wn as Yt, zi as Z, ir as Zt, rs as _, mt as _n, ri as _t, jl as a, xn as an, xi as at, Xo as b, ot as bn, ei as bt, Bs as c, wn as cn, gi as ct, ls as d, rn as dn, fi as dt, Rn as en, Fi as et, cs as f, Mt as fn, di as ft, is as g, vt as gn, ii as gt, as as h, gt as hn, ai as ht, Nl as i, bn as in, Ti as it, ko as j, be as jn, X as jt, No as k, he as kn, Rr as kt, hs as l, $t as ln, hi as lt, os as m, ct as mn, ci as mt, Au as n, Y as nn, Ni as nt, kl as o, J as on, yi as ot, ss as p, Ct as pn, ui as pt, na as q, Nn as qt, ql as r, fn as rn, Ei as rt, el as s, Dn as sn, _i as st, Ku as t, zn as tn, Ii as tt, ms as u, nn as un, mi as ut, ns as v, _t as vn, ni as vt, Bo as w, Te as wn, Kr as wt, Jo as x, at as xn, $r as xt, Zo as y, st as yn, ti as yt, qa as z, le as zn, Bn as zt };
|
|
7072
7105
|
|
|
7073
|
-
//# sourceMappingURL=features-
|
|
7106
|
+
//# sourceMappingURL=features-LiilsBqW.js.map
|