@templatical/editor 0.10.4 → 0.11.1
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-Djjqrmoh.js → AiChatSidebar-Cm5RM5Qh.js} +8 -8
- package/dist/{AiFeatureMenu-DR56EYbL.js → AiFeatureMenu-DBWcfcWl.js} +6 -6
- package/dist/{BlockIssueBadge-ySMhwDRR.js → BlockIssueBadge-BF4sdsr4.js} +4 -4
- package/dist/{CloudEditor-BLlRKq5D.js → CloudEditor-C6cSXtcP.js} +162 -160
- package/dist/{CollaboratorBar-BlXmZrIj.js → CollaboratorBar-B8-AQfG2.js} +3 -3
- package/dist/{CommentsSidebar-XcYtqAn8.js → CommentsSidebar-BQJzyCc6.js} +11 -11
- package/dist/{CountdownBlock-sAAv3BHE.js → CountdownBlock-D_AsF4F3.js} +1 -1
- package/dist/{CountdownToolbar-CUvqPILZ.js → CountdownToolbar-BGTkFky9.js} +2 -2
- package/dist/{DesignReferenceSidebar-B0Upq2MY.js → DesignReferenceSidebar-O3epZMXD.js} +6 -6
- package/dist/{IssuesPanel-BvcqQ0ec.js → IssuesPanel-CPBbR8yp.js} +7 -7
- package/dist/{ModuleBrowserModal-BdOB1Lbt.js → ModuleBrowserModal-B_tLzFAk.js} +9 -9
- package/dist/{ModulePreviewCanvas-BeglLfBF.js → ModulePreviewCanvas-B7pNpAHM.js} +2 -2
- package/dist/{NumberWithSuffix-Cb7HI_yW.js → NumberWithSuffix-eI9pPDWT.js} +1 -1
- package/dist/{ParagraphEditor-4Wrd3nnB.js → ParagraphEditor-DmA9K7dx.js} +27 -27
- package/dist/{RichTextEditorContent-D-uKzBDa.js → RichTextEditorContent-Dvn4woIt.js} +6 -6
- package/dist/{SaveModuleDialog-ueFhCVWN.js → SaveModuleDialog-B8ypoxdj.js} +6 -6
- package/dist/{SnapshotHistory-DNuw_gCY.js → SnapshotHistory-BTHd7CVP.js} +7 -7
- package/dist/{TemplateScoringPanel-bkIhEokb.js → TemplateScoringPanel-Bt5Rsgen.js} +12 -12
- package/dist/{TestEmailModal-Tg30-itu.js → TestEmailModal-CBIFMzK6.js} +4 -4
- package/dist/{TitleEditor-CY8QWbEw.js → TitleEditor-C9jDA5lI.js} +12 -12
- package/dist/{TplModal-D338Vv9U.js → TplModal-ND4fiqOS.js} +3 -3
- package/dist/{blockTypeIcons-CYoPwoH9.js → blockTypeIcons-Bn-_Smlm.js} +5 -5
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js → AiFeatureMenu-BuSO0dXP.js} +8 -8
- package/dist/cdn/chunks/{AiFeatureMenu-DRWRoPdh.js.map → AiFeatureMenu-BuSO0dXP.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js → BlockIssueBadge-sv3IZ1Pb.js} +4 -4
- package/dist/cdn/chunks/{BlockIssueBadge-D2ApLp61.js.map → BlockIssueBadge-sv3IZ1Pb.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-gvOOuXac.js → CloudEditor-hxoqsTsq.js} +242 -240
- package/dist/cdn/chunks/CloudEditor-hxoqsTsq.js.map +1 -0
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js → CollaboratorBar-DFqsaNX0.js} +3 -3
- package/dist/cdn/chunks/{CollaboratorBar-BZK3R383.js.map → CollaboratorBar-DFqsaNX0.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js → CountdownBlock-PpH3fxAX.js} +2 -2
- package/dist/cdn/chunks/{CountdownBlock-DU5YmjFP.js.map → CountdownBlock-PpH3fxAX.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js → CountdownToolbar-CZN92Bhz.js} +3 -3
- package/dist/cdn/chunks/{CountdownToolbar-C1nlFm4e.js.map → CountdownToolbar-CZN92Bhz.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js → IssuesPanel-wQjrnuyc.js} +7 -7
- package/dist/cdn/chunks/{IssuesPanel-R3M60NTk.js.map → IssuesPanel-wQjrnuyc.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js → ModuleBrowserModal-348wCgft.js} +8 -8
- package/dist/cdn/chunks/{ModuleBrowserModal-DMithQu8.js.map → ModuleBrowserModal-348wCgft.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js → ModulePreviewCanvas-Cf6DUHml.js} +22 -22
- package/dist/cdn/chunks/{ModulePreviewCanvas-BNKbV_c2.js.map → ModulePreviewCanvas-Cf6DUHml.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js → NumberWithSuffix-Deo8EOSz.js} +2 -2
- package/dist/cdn/chunks/{NumberWithSuffix-C5zNn3Oc.js.map → NumberWithSuffix-Deo8EOSz.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js → ParagraphEditor-Cbl_gBYM.js} +53 -53
- package/dist/cdn/chunks/{ParagraphEditor-H136qVNI.js.map → ParagraphEditor-Cbl_gBYM.js.map} +1 -1
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js → RichTextEditorContent-TBPzn3RC.js} +4 -4
- package/dist/cdn/chunks/{RichTextEditorContent-BxW6vSck.js.map → RichTextEditorContent-TBPzn3RC.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js → SaveModuleDialog-CxdYMutK.js} +4 -4
- package/dist/cdn/chunks/{SaveModuleDialog-BaiynUWb.js.map → SaveModuleDialog-CxdYMutK.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js → TitleEditor--XulEf7R.js} +9 -9
- package/dist/cdn/chunks/{TitleEditor-BBsR46vE.js.map → TitleEditor--XulEf7R.js.map} +1 -1
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js → blockTypeIcons-BJND4L-A.js} +6 -6
- package/dist/cdn/chunks/{blockTypeIcons-CX05RINM.js.map → blockTypeIcons-BJND4L-A.js.map} +1 -1
- package/dist/{de-DIAGP7yH.js → cdn/chunks/de-BJMLpg_p.js} +6 -0
- package/dist/cdn/chunks/{de-DIAGP7yH.js.map → de-BJMLpg_p.js.map} +1 -1
- package/dist/{en-nqIW8Q9W.js → cdn/chunks/en-DFMMw7SL.js} +6 -0
- package/dist/cdn/chunks/{en-nqIW8Q9W.js.map → en-DFMMw7SL.js.map} +1 -1
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js → extensions-BtWoLy6E.js} +28 -28
- package/dist/cdn/chunks/{extensions-2LuW8PHB.js.map → extensions-BtWoLy6E.js.map} +1 -1
- package/dist/cdn/chunks/{features-CxHQG9xr.js → features-mO5NzwnN.js} +657 -678
- package/dist/cdn/chunks/features-mO5NzwnN.js.map +1 -0
- package/dist/cdn/chunks/{icons-DrsFvnNP.js → icons-CuXm6XAT.js} +2 -2
- package/dist/cdn/chunks/{icons-DrsFvnNP.js.map → icons-CuXm6XAT.js.map} +1 -1
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js → media-library-BtNzYUTi.js} +524 -524
- package/dist/cdn/chunks/{media-library-CDXkfBa7.js.map → media-library-BtNzYUTi.js.map} +1 -1
- package/dist/cdn/chunks/{pt-BR-DCNnLLx9.js → pt-BR-C-9aWLlR.js} +5 -1
- package/dist/cdn/chunks/{pt-BR-DCNnLLx9.js.map → pt-BR-C-9aWLlR.js.map} +1 -1
- package/dist/cdn/chunks/{quality-HR87TCZc.js → quality-YKe19zp8.js} +481 -481
- package/dist/cdn/chunks/{quality-HR87TCZc.js.map → quality-YKe19zp8.js.map} +1 -1
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js → renderer-BcOaxCs6.js} +9 -9
- package/dist/cdn/chunks/{renderer-Dh5WdraW.js.map → renderer-BcOaxCs6.js.map} +1 -1
- package/dist/cdn/chunks/{src-fyYLC_tY.js → src-B_ZRmuit.js} +63 -63
- package/dist/cdn/chunks/{src-fyYLC_tY.js.map → src-B_ZRmuit.js.map} +1 -1
- package/dist/cdn/chunks/{styles-NhU45rEI.js → styles-DDBCCJ-l.js} +675 -626
- package/dist/cdn/chunks/styles-DDBCCJ-l.js.map +1 -0
- package/dist/cdn/chunks/{tiptap-CfnwT9a8.js → tiptap-BAwu9VcJ.js} +4454 -3328
- package/dist/cdn/chunks/tiptap-BAwu9VcJ.js.map +1 -0
- package/dist/cdn/editor.css +1 -1
- package/dist/cdn/editor.js +104 -102
- package/dist/cdn/editor.js.map +1 -1
- package/dist/{check-B4oiQEsJ.js → check-BsNM6BDs.js} +1 -1
- package/dist/{chevron-down-BrL7CDST.js → chevron-down-fcsZ5DU7.js} +1 -1
- package/dist/{circle-alert-Ddf06I0D.js → circle-alert-BZTbwc-B.js} +1 -1
- package/dist/{clock-CbIkIHL5.js → clock-B7iQRubC.js} +1 -1
- package/dist/{createLucideIcon-Bn5l6hkC.js → createLucideIcon-C_fetdGM.js} +2 -2
- package/dist/{cdn/chunks/de-DIAGP7yH.js → de-BJMLpg_p.js} +4 -2
- package/dist/{dist-BRvZBY6r.js → dist-B4NkMBYc.js} +2 -2
- package/dist/{dist-DDB4TfTY.js → dist-BLcYl_de.js} +2 -2
- package/dist/{dist-DS9NXb20.js → dist-BOHAk4zI.js} +2 -2
- package/dist/dist-BsB4nPJD.js +5 -0
- package/dist/{dist-B6B8IO1W.js → dist-ByBVNmRN.js} +2 -2
- package/dist/dist-CD3wbUoR.js +5 -0
- package/dist/{dist-DbGsZrPu.js → dist-Cwl7XXr4.js} +806 -601
- package/dist/{dist-BShwEwPy.js → dist-Dem8ODLh.js} +1512 -1501
- package/dist/{dist-BdIM5Jt8.js → dist-Dhs3W2WW.js} +2 -2
- package/dist/{dist-ZiEahccA.js → dist-XdF11ZkX.js} +2 -2
- package/dist/{dist-BhZo8-eC.js → dist-c2sj5PQ5.js} +2 -2
- package/dist/{dist-Ctv43HTN.js → dist-eVlXvuKI.js} +3 -3
- package/dist/{cdn/chunks/en-nqIW8Q9W.js → en-DFMMw7SL.js} +4 -2
- package/dist/extensions-B2lSGCA8.js +1720 -0
- package/dist/{image-up-D3KvvHLf.js → image-up-1xrPPJYH.js} +1 -1
- package/dist/index.d.ts +61 -0
- package/dist/{info-RwcI2EUD.js → info-ByAFxArD.js} +1 -1
- package/dist/keys-DsRdOmg3.js +10 -0
- package/dist/{list-checks-ruqK9lCo.js → list-checks-CKUP4UZU.js} +1 -1
- package/dist/{loader-circle-D4SXJ8eQ.js → loader-circle-BuxX338d.js} +1 -1
- package/dist/{message-circle-p9UiFyS7.js → message-circle-nLwqegRi.js} +1 -1
- package/dist/{pt-BR-DCNnLLx9.js → pt-BR-C-9aWLlR.js} +4 -0
- package/dist/{refresh-cw-C8HbO4hg.js → refresh-cw-DAkD6iDI.js} +1 -1
- package/dist/{scan-line-CmPIMm63.js → scan-line-DEELRJJ5.js} +1 -1
- package/dist/{send-DacXlri3.js → send-DCMgrNT4.js} +1 -1
- package/dist/{shield-check-BdrHnTnJ.js → shield-check-BFtVr_ov.js} +1 -1
- package/dist/{sparkles-tT7wcus5.js → sparkles-CeYIQ5RJ.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{styles-BmZWc8sc.js → styles-DZcQGzsN.js} +735 -686
- package/dist/templatical-editor.js +118 -116
- package/dist/{text-align-start-DaSSBZVi.js → text-align-start-BsmIoqLS.js} +1 -1
- package/dist/{trash-2-B0uIJOwX.js → trash-2-C2S4-CIH.js} +1 -1
- package/dist/{triangle-alert-FLQWRf-c.js → triangle-alert-DMdedF6W.js} +1 -1
- package/dist/{useCloudI18n-Lh0xWlQ4.js → useCloudI18n-BEuiZdzs.js} +1 -1
- package/dist/{useEditorCore-CMukR8kX.js → useEditorCore-D00QzW07.js} +742 -763
- package/dist/{useI18n-CNEz8RK7.js → useI18n-DNspT6uw.js} +1 -1
- package/dist/{useMergeTag-C54tabTK.js → useMergeTag-abutjUud.js} +1 -1
- package/dist/{usePopoverRoot-dvg2XFmj.js → usePopoverRoot-DG3mlvd1.js} +1 -1
- package/dist/{x-BROzFhGs.js → x-_9jw816B.js} +1 -1
- package/package.json +25 -25
- package/dist/cdn/chunks/CloudEditor-gvOOuXac.js.map +0 -1
- package/dist/cdn/chunks/features-CxHQG9xr.js.map +0 -1
- package/dist/cdn/chunks/styles-NhU45rEI.js.map +0 -1
- package/dist/cdn/chunks/tiptap-CfnwT9a8.js.map +0 -1
- package/dist/dist-BVKpiz3S.js +0 -5
- package/dist/dist-BzeOnbU8.js +0 -5
- package/dist/extensions-CqrSpX_i.js +0 -806
- package/dist/keys-DSm2p8zn.js +0 -10
|
@@ -1408,7 +1408,7 @@ function Pn() {
|
|
|
1408
1408
|
}
|
|
1409
1409
|
//#endregion
|
|
1410
1410
|
//#region src/keys.ts
|
|
1411
|
-
var Fn = Symbol("translations"), In = Symbol("editor"), Ln = Symbol("history"), Rn = Symbol("blockActions"), zn = Symbol("conditionPreview"), Bn = Symbol("fontsManager"), Vn = Symbol("themeStyles"), Hn = Symbol("tplUiTheme"), Un = Symbol("blockDefaults"), Wn = Symbol("blockRegistry"), Gn = Symbol("customBlockDefinitions"), Kn = Symbol("
|
|
1411
|
+
var Fn = Symbol("translations"), In = Symbol("editor"), Ln = Symbol("history"), Rn = Symbol("blockActions"), zn = Symbol("conditionPreview"), Bn = Symbol("fontsManager"), Vn = Symbol("themeStyles"), Hn = Symbol("tplUiTheme"), Un = Symbol("blockDefaults"), Wn = Symbol("blockRegistry"), Gn = Symbol("customBlockDefinitions"), Kn = Symbol("paletteBlocks"), qn = Symbol("customBlockStylesheets"), Jn = Symbol("mergeTags"), Yn = Symbol("mergeTagSyntax"), Xn = Symbol("onRequestMergeTag"), Zn = Symbol("mergeTagAutocomplete"), Qn = Symbol("mergeTagPicker"), $n = Symbol("onRequestMedia"), er = Symbol("displayConditions"), tr = Symbol("allowCustomConditions"), nr = Symbol("capabilities"), rr = Symbol("keyboardReorder"), ir = Symbol("templateLint"), ar = Symbol("editorRoot"), or = Symbol("popoverRoot"), sr = Symbol("authManager"), cr = Symbol("aiConfig"), lr = Symbol("comments"), ur = Symbol("savedModulesHeadless"), dr = Symbol("scoring"), fr = Symbol("cloudTranslations");
|
|
1412
1412
|
function J(e, t) {
|
|
1413
1413
|
let n = v(e, null);
|
|
1414
1414
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
@@ -1416,7 +1416,7 @@ function J(e, t) {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
//#endregion
|
|
1418
1418
|
//#region src/composables/useMergeTagPicker.ts
|
|
1419
|
-
function
|
|
1419
|
+
function pr() {
|
|
1420
1420
|
let e = C(!1), t = C([]), n = null;
|
|
1421
1421
|
function r(r) {
|
|
1422
1422
|
if (n) {
|
|
@@ -1446,15 +1446,15 @@ function fr() {
|
|
|
1446
1446
|
}
|
|
1447
1447
|
//#endregion
|
|
1448
1448
|
//#region src/composables/useTemplateLint.ts
|
|
1449
|
-
function
|
|
1449
|
+
function mr(e) {
|
|
1450
1450
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1451
1451
|
}
|
|
1452
|
-
function
|
|
1453
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1452
|
+
function hr(e) {
|
|
1453
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = mr(e.options), s = null, c = !1;
|
|
1454
1454
|
o || l();
|
|
1455
1455
|
async function l() {
|
|
1456
1456
|
try {
|
|
1457
|
-
let t = await import("./quality-
|
|
1457
|
+
let t = await import("./quality-YKe19zp8.js").then((e) => e.t);
|
|
1458
1458
|
if (c) return;
|
|
1459
1459
|
a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = ln(e.content, u, {
|
|
1460
1460
|
debounce: e.debounce ?? 500,
|
|
@@ -1505,12 +1505,12 @@ function Y(e) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
//#endregion
|
|
1507
1507
|
//#region src/utils/blockTypeLabels.ts
|
|
1508
|
-
function
|
|
1508
|
+
function gr(e, t) {
|
|
1509
1509
|
return t.blocks[e] ?? e;
|
|
1510
1510
|
}
|
|
1511
1511
|
//#endregion
|
|
1512
1512
|
//#region src/composables/useKeyboardReorder.ts
|
|
1513
|
-
function
|
|
1513
|
+
function _r(e, t) {
|
|
1514
1514
|
let n = C(null), r = C(""), i = null;
|
|
1515
1515
|
function a(t) {
|
|
1516
1516
|
let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
|
|
@@ -1537,7 +1537,7 @@ function gr(e, t) {
|
|
|
1537
1537
|
let r = a(n);
|
|
1538
1538
|
if (!r) return "";
|
|
1539
1539
|
let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
|
|
1540
|
-
return i ?
|
|
1540
|
+
return i ? gr(i.type, t.t) : "";
|
|
1541
1541
|
}
|
|
1542
1542
|
function s(t, n) {
|
|
1543
1543
|
return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
|
|
@@ -1606,13 +1606,13 @@ function gr(e, t) {
|
|
|
1606
1606
|
}
|
|
1607
1607
|
//#endregion
|
|
1608
1608
|
//#region src/composables/useUiTheme.ts
|
|
1609
|
-
function
|
|
1609
|
+
function vr(e) {
|
|
1610
1610
|
let t = xn("(prefers-color-scheme: dark)");
|
|
1611
1611
|
return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1612
1612
|
}
|
|
1613
1613
|
//#endregion
|
|
1614
1614
|
//#region src/composables/useThemeStyles.ts
|
|
1615
|
-
var
|
|
1615
|
+
var yr = {
|
|
1616
1616
|
bg: "--tpl-bg",
|
|
1617
1617
|
bgElevated: "--tpl-bg-elevated",
|
|
1618
1618
|
bgHover: "--tpl-bg-hover",
|
|
@@ -1636,10 +1636,10 @@ var vr = {
|
|
|
1636
1636
|
dangerLight: "--tpl-danger-light",
|
|
1637
1637
|
canvasBg: "--tpl-canvas-bg"
|
|
1638
1638
|
};
|
|
1639
|
-
function
|
|
1639
|
+
function br({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
1640
1640
|
return { themeStyles: O(() => {
|
|
1641
1641
|
let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
|
|
1642
|
-
if (a) for (let [e, t] of Object.entries(
|
|
1642
|
+
if (a) for (let [e, t] of Object.entries(yr)) {
|
|
1643
1643
|
let n = a[e];
|
|
1644
1644
|
n && (r[t] = n);
|
|
1645
1645
|
}
|
|
@@ -1648,27 +1648,27 @@ function yr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
|
|
|
1648
1648
|
}
|
|
1649
1649
|
//#endregion
|
|
1650
1650
|
//#region src/utils/logger.ts
|
|
1651
|
-
var
|
|
1652
|
-
function
|
|
1651
|
+
var xr = "[Templatical]";
|
|
1652
|
+
function Sr() {
|
|
1653
1653
|
return typeof process < "u" && !0;
|
|
1654
1654
|
}
|
|
1655
|
-
var
|
|
1655
|
+
var Cr = {
|
|
1656
1656
|
warn(...e) {
|
|
1657
|
-
console.warn(
|
|
1657
|
+
console.warn(xr, ...e);
|
|
1658
1658
|
},
|
|
1659
1659
|
error(...e) {
|
|
1660
|
-
console.error(
|
|
1660
|
+
console.error(xr, ...e);
|
|
1661
1661
|
},
|
|
1662
1662
|
debug(...e) {
|
|
1663
|
-
|
|
1663
|
+
Sr() || console.debug(xr, ...e);
|
|
1664
1664
|
},
|
|
1665
1665
|
info(...e) {
|
|
1666
|
-
|
|
1666
|
+
Sr() || console.info(xr, ...e);
|
|
1667
1667
|
}
|
|
1668
1668
|
};
|
|
1669
1669
|
//#endregion
|
|
1670
1670
|
//#region src/composables/useBlockRegistry.ts
|
|
1671
|
-
function
|
|
1671
|
+
function wr() {
|
|
1672
1672
|
let e = n(/* @__PURE__ */ new Map());
|
|
1673
1673
|
function t(t, n) {
|
|
1674
1674
|
e.value.set(t, n), oe(e);
|
|
@@ -1678,13 +1678,6 @@ function Cr() {
|
|
|
1678
1678
|
e.value.set(r, {
|
|
1679
1679
|
component: n,
|
|
1680
1680
|
createBlock: () => ot(t),
|
|
1681
|
-
sidebarItem: {
|
|
1682
|
-
type: r,
|
|
1683
|
-
label: t.name,
|
|
1684
|
-
icon: t.icon,
|
|
1685
|
-
description: t.description,
|
|
1686
|
-
isCustom: !0
|
|
1687
|
-
},
|
|
1688
1681
|
definition: t
|
|
1689
1682
|
}), oe(e);
|
|
1690
1683
|
}
|
|
@@ -1698,21 +1691,16 @@ function Cr() {
|
|
|
1698
1691
|
function a(t) {
|
|
1699
1692
|
return e.value.get(t)?.createBlock();
|
|
1700
1693
|
}
|
|
1701
|
-
function o() {
|
|
1702
|
-
let t = [], n = [];
|
|
1703
|
-
for (let r of e.value.values()) r.sidebarItem.isCustom ? n.push(r.sidebarItem) : t.push(r.sidebarItem);
|
|
1704
|
-
return [...t, ...n];
|
|
1705
|
-
}
|
|
1706
|
-
function s(t) {
|
|
1694
|
+
function o(t) {
|
|
1707
1695
|
let n = `custom:${t}`;
|
|
1708
1696
|
return e.value.get(n)?.definition;
|
|
1709
1697
|
}
|
|
1710
|
-
function
|
|
1698
|
+
function s(e) {
|
|
1711
1699
|
return `<div style="color: var(--tpl-text-muted); padding: 16px; text-align: center; border: 1px dashed var(--tpl-border); border-radius: var(--tpl-radius-sm); font-family: var(--tpl-font-family); font-size: 14px;">${e}</div>`;
|
|
1712
1700
|
}
|
|
1713
|
-
async function
|
|
1714
|
-
let t =
|
|
1715
|
-
if (!t) return
|
|
1701
|
+
async function c(e) {
|
|
1702
|
+
let t = o(e.customType);
|
|
1703
|
+
if (!t) return s("Block definition not found");
|
|
1716
1704
|
try {
|
|
1717
1705
|
let { Liquid: n } = await import("./liquid.browser-DUDc3U21.js");
|
|
1718
1706
|
return await new n({
|
|
@@ -1720,10 +1708,10 @@ function Cr() {
|
|
|
1720
1708
|
strictFilters: !1
|
|
1721
1709
|
}).parseAndRender(t.template, e.fieldValues);
|
|
1722
1710
|
} catch (t) {
|
|
1723
|
-
return
|
|
1711
|
+
return Cr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
|
|
1724
1712
|
}
|
|
1725
1713
|
}
|
|
1726
|
-
function
|
|
1714
|
+
function l(t) {
|
|
1727
1715
|
return e.value.has(t);
|
|
1728
1716
|
}
|
|
1729
1717
|
return {
|
|
@@ -1731,17 +1719,16 @@ function Cr() {
|
|
|
1731
1719
|
registerCustom: r,
|
|
1732
1720
|
getComponent: i,
|
|
1733
1721
|
createBlock: a,
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
isRegistered: u
|
|
1722
|
+
getDefinition: o,
|
|
1723
|
+
renderCustomBlock: c,
|
|
1724
|
+
isRegistered: l
|
|
1738
1725
|
};
|
|
1739
1726
|
}
|
|
1740
1727
|
//#endregion
|
|
1741
1728
|
//#region src/composables/useCustomBlockStylesheets.ts
|
|
1742
|
-
function
|
|
1729
|
+
function Tr(e, t) {
|
|
1743
1730
|
return O(() => {
|
|
1744
|
-
let n =
|
|
1731
|
+
let n = Er(e.value.blocks);
|
|
1745
1732
|
if (n.size === 0) return [];
|
|
1746
1733
|
let r = /* @__PURE__ */ new Set(), i = [];
|
|
1747
1734
|
for (let e of n) {
|
|
@@ -1753,11 +1740,11 @@ function wr(e, t) {
|
|
|
1753
1740
|
return i;
|
|
1754
1741
|
});
|
|
1755
1742
|
}
|
|
1756
|
-
function
|
|
1743
|
+
function Er(e) {
|
|
1757
1744
|
let t = /* @__PURE__ */ new Set();
|
|
1758
|
-
return
|
|
1745
|
+
return Dr(e, t), t;
|
|
1759
1746
|
}
|
|
1760
|
-
function
|
|
1747
|
+
function Dr(e, t) {
|
|
1761
1748
|
for (let n of e) {
|
|
1762
1749
|
if (Ee(n)) {
|
|
1763
1750
|
t.add(n.customType);
|
|
@@ -1766,96 +1753,78 @@ function Er(e, t) {
|
|
|
1766
1753
|
if (n.type === "section") {
|
|
1767
1754
|
let e = n.children;
|
|
1768
1755
|
if (!e) continue;
|
|
1769
|
-
for (let n of e)
|
|
1756
|
+
for (let n of e) Dr(n, t);
|
|
1770
1757
|
}
|
|
1771
1758
|
}
|
|
1772
1759
|
}
|
|
1773
1760
|
//#endregion
|
|
1774
1761
|
//#region src/utils/registerBuiltInBlocks.ts
|
|
1775
|
-
var
|
|
1762
|
+
var Or = [
|
|
1776
1763
|
{
|
|
1777
1764
|
type: "section",
|
|
1778
|
-
label: "Section",
|
|
1779
1765
|
createBlock: Xe
|
|
1780
1766
|
},
|
|
1781
1767
|
{
|
|
1782
1768
|
type: "title",
|
|
1783
|
-
label: "Title",
|
|
1784
1769
|
createBlock: Ge
|
|
1785
1770
|
},
|
|
1786
1771
|
{
|
|
1787
1772
|
type: "paragraph",
|
|
1788
|
-
label: "Paragraph",
|
|
1789
1773
|
createBlock: Ke
|
|
1790
1774
|
},
|
|
1791
1775
|
{
|
|
1792
1776
|
type: "image",
|
|
1793
|
-
label: "Image",
|
|
1794
1777
|
createBlock: qe
|
|
1795
1778
|
},
|
|
1796
1779
|
{
|
|
1797
1780
|
type: "button",
|
|
1798
|
-
label: "Button",
|
|
1799
1781
|
createBlock: Je
|
|
1800
1782
|
},
|
|
1801
1783
|
{
|
|
1802
1784
|
type: "divider",
|
|
1803
|
-
label: "Divider",
|
|
1804
1785
|
createBlock: Ye
|
|
1805
1786
|
},
|
|
1806
1787
|
{
|
|
1807
1788
|
type: "video",
|
|
1808
|
-
label: "Video",
|
|
1809
1789
|
createBlock: Ze
|
|
1810
1790
|
},
|
|
1811
1791
|
{
|
|
1812
1792
|
type: "social",
|
|
1813
|
-
label: "Social",
|
|
1814
1793
|
createBlock: Qe
|
|
1815
1794
|
},
|
|
1816
1795
|
{
|
|
1817
1796
|
type: "menu",
|
|
1818
|
-
label: "Menu",
|
|
1819
1797
|
createBlock: tt
|
|
1820
1798
|
},
|
|
1821
1799
|
{
|
|
1822
1800
|
type: "table",
|
|
1823
|
-
label: "Table",
|
|
1824
1801
|
createBlock: rt
|
|
1825
1802
|
},
|
|
1826
1803
|
{
|
|
1827
1804
|
type: "spacer",
|
|
1828
|
-
label: "Spacer",
|
|
1829
1805
|
createBlock: $e
|
|
1830
1806
|
},
|
|
1831
1807
|
{
|
|
1832
1808
|
type: "html",
|
|
1833
|
-
label: "HTML",
|
|
1834
1809
|
createBlock: et
|
|
1835
1810
|
},
|
|
1836
1811
|
{
|
|
1837
1812
|
type: "countdown",
|
|
1838
|
-
label: "Countdown",
|
|
1839
1813
|
createBlock: it
|
|
1840
1814
|
}
|
|
1841
1815
|
];
|
|
1842
|
-
function
|
|
1843
|
-
for (let n of
|
|
1816
|
+
function kr(e, t) {
|
|
1817
|
+
for (let n of Or) {
|
|
1844
1818
|
let r = t[n.type];
|
|
1845
1819
|
r && e.registerBuiltIn(n.type, {
|
|
1846
1820
|
component: r,
|
|
1847
|
-
createBlock: n.createBlock
|
|
1848
|
-
sidebarItem: {
|
|
1849
|
-
type: n.type,
|
|
1850
|
-
label: n.label,
|
|
1851
|
-
isCustom: !1
|
|
1852
|
-
}
|
|
1821
|
+
createBlock: n.createBlock
|
|
1853
1822
|
});
|
|
1854
1823
|
}
|
|
1855
1824
|
}
|
|
1856
1825
|
//#endregion
|
|
1857
1826
|
//#region src/utils/keyboardShortcuts.ts
|
|
1858
|
-
function
|
|
1827
|
+
function Ar(e) {
|
|
1859
1828
|
for (let t of e.composedPath()) {
|
|
1860
1829
|
if (!(t instanceof HTMLElement)) continue;
|
|
1861
1830
|
if (t.isContentEditable) return !0;
|
|
@@ -1864,14 +1833,14 @@ function kr(e) {
|
|
|
1864
1833
|
}
|
|
1865
1834
|
return !1;
|
|
1866
1835
|
}
|
|
1867
|
-
function
|
|
1836
|
+
function jr(e, t) {
|
|
1868
1837
|
let n = e.metaKey || e.ctrlKey;
|
|
1869
1838
|
if (n && e.key.toLowerCase() === "s") {
|
|
1870
1839
|
e.preventDefault(), t.onSave?.();
|
|
1871
1840
|
return;
|
|
1872
1841
|
}
|
|
1873
1842
|
if (n && e.key.toLowerCase() === "z") {
|
|
1874
|
-
if (
|
|
1843
|
+
if (Ar(e)) return;
|
|
1875
1844
|
e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
|
|
1876
1845
|
return;
|
|
1877
1846
|
}
|
|
@@ -1879,11 +1848,11 @@ function Ar(e, t) {
|
|
|
1879
1848
|
t.selectBlock(null);
|
|
1880
1849
|
return;
|
|
1881
1850
|
}
|
|
1882
|
-
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !
|
|
1851
|
+
(e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Ar(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
|
|
1883
1852
|
}
|
|
1884
1853
|
//#endregion
|
|
1885
1854
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1886
|
-
var
|
|
1855
|
+
var Mr = { class: "tpl:text-center" }, Nr = ["href"], Pr = /* @__PURE__ */ B({
|
|
1887
1856
|
__name: "ButtonBlock",
|
|
1888
1857
|
props: {
|
|
1889
1858
|
block: {},
|
|
@@ -1904,17 +1873,17 @@ var jr = { class: "tpl:text-center" }, Mr = ["href"], Nr = /* @__PURE__ */ B({
|
|
|
1904
1873
|
};
|
|
1905
1874
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1906
1875
|
});
|
|
1907
|
-
return (t, r) => (f(), k("div",
|
|
1876
|
+
return (t, r) => (f(), k("div", Mr, [I("a", {
|
|
1908
1877
|
href: e.block.url || "#",
|
|
1909
1878
|
style: L(n.value),
|
|
1910
1879
|
class: "tpl:cursor-default",
|
|
1911
1880
|
onClick: r[0] ||= M(() => {}, ["prevent"])
|
|
1912
|
-
}, D(e.block.text), 13,
|
|
1881
|
+
}, D(e.block.text), 13, Nr)]));
|
|
1913
1882
|
}
|
|
1914
|
-
}),
|
|
1915
|
-
let t =
|
|
1883
|
+
}), Fr = (e) => e === "", Ir = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Lr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Rr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), zr = (e) => {
|
|
1884
|
+
let t = Rr(e);
|
|
1916
1885
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
1917
|
-
},
|
|
1886
|
+
}, Br = {
|
|
1918
1887
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1919
1888
|
width: 24,
|
|
1920
1889
|
height: 24,
|
|
@@ -1924,35 +1893,35 @@ var jr = { class: "tpl:text-center" }, Mr = ["href"], Nr = /* @__PURE__ */ B({
|
|
|
1924
1893
|
"stroke-width": 2,
|
|
1925
1894
|
"stroke-linecap": "round",
|
|
1926
1895
|
"stroke-linejoin": "round"
|
|
1927
|
-
},
|
|
1928
|
-
function
|
|
1929
|
-
return v(
|
|
1896
|
+
}, Vr = Symbol("lucide-icons");
|
|
1897
|
+
function Hr() {
|
|
1898
|
+
return v(Vr, {});
|
|
1930
1899
|
}
|
|
1931
1900
|
//#endregion
|
|
1932
|
-
//#region ../../node_modules/.pnpm/@lucide+vue@1.
|
|
1933
|
-
var
|
|
1934
|
-
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } =
|
|
1935
|
-
let e =
|
|
1936
|
-
return e ? Number(t) * 24 / Number(s ?? d ??
|
|
1901
|
+
//#region ../../node_modules/.pnpm/@lucide+vue@1.21.0_vue@3.5.38_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
|
|
1902
|
+
var Ur = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
|
|
1903
|
+
let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Hr(), g = O(() => {
|
|
1904
|
+
let e = Fr(n) || Fr(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Br["stroke-width"];
|
|
1905
|
+
return e ? Number(t) * 24 / Number(s ?? d ?? Br.width) : t;
|
|
1937
1906
|
});
|
|
1938
1907
|
return a("svg", {
|
|
1939
|
-
...
|
|
1908
|
+
...Br,
|
|
1940
1909
|
...l,
|
|
1941
|
-
width: s ?? d ??
|
|
1942
|
-
height: s ?? d ??
|
|
1943
|
-
stroke: c ?? f ??
|
|
1910
|
+
width: s ?? d ?? Br.width,
|
|
1911
|
+
height: s ?? d ?? Br.height,
|
|
1912
|
+
stroke: c ?? f ?? Br.stroke,
|
|
1944
1913
|
"stroke-width": g.value,
|
|
1945
|
-
class:
|
|
1914
|
+
class: Ir("lucide", h, ...e ? [`lucide-${Lr(zr(e))}-icon`, `lucide-${Lr(e)}`] : ["lucide-icon"])
|
|
1946
1915
|
}, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
|
|
1947
|
-
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(
|
|
1916
|
+
}, X = (e, t) => (n, { slots: r, attrs: i }) => a(Ur, {
|
|
1948
1917
|
...i,
|
|
1949
1918
|
...n,
|
|
1950
1919
|
iconNode: t,
|
|
1951
1920
|
name: e
|
|
1952
|
-
}, r.default ? { default: r.default } : void 0),
|
|
1921
|
+
}, r.default ? { default: r.default } : void 0), Wr = X("bookmark", [["path", {
|
|
1953
1922
|
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",
|
|
1954
1923
|
key: "oz39mx"
|
|
1955
|
-
}]]),
|
|
1924
|
+
}]]), Gr = X("box", [
|
|
1956
1925
|
["path", {
|
|
1957
1926
|
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",
|
|
1958
1927
|
key: "hh9hay"
|
|
@@ -1965,22 +1934,22 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
1965
1934
|
d: "M12 22V12",
|
|
1966
1935
|
key: "d0xqtd"
|
|
1967
1936
|
}]
|
|
1968
|
-
]),
|
|
1937
|
+
]), Kr = X("check", [["path", {
|
|
1969
1938
|
d: "M20 6 9 17l-5-5",
|
|
1970
1939
|
key: "1gmf2c"
|
|
1971
|
-
}]]),
|
|
1940
|
+
}]]), qr = X("chevron-down", [["path", {
|
|
1972
1941
|
d: "m6 9 6 6 6-6",
|
|
1973
1942
|
key: "qrunsl"
|
|
1974
|
-
}]]),
|
|
1943
|
+
}]]), Jr = X("chevron-left", [["path", {
|
|
1975
1944
|
d: "m15 18-6-6 6-6",
|
|
1976
1945
|
key: "1wnfg3"
|
|
1977
|
-
}]]),
|
|
1946
|
+
}]]), Yr = X("chevron-right", [["path", {
|
|
1978
1947
|
d: "m9 18 6-6-6-6",
|
|
1979
1948
|
key: "mthhwq"
|
|
1980
|
-
}]]),
|
|
1949
|
+
}]]), Xr = X("chevron-up", [["path", {
|
|
1981
1950
|
d: "m18 15-6-6-6 6",
|
|
1982
1951
|
key: "153udz"
|
|
1983
|
-
}]]),
|
|
1952
|
+
}]]), Zr = X("circle-alert", [
|
|
1984
1953
|
["circle", {
|
|
1985
1954
|
cx: "12",
|
|
1986
1955
|
cy: "12",
|
|
@@ -2001,7 +1970,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2001
1970
|
y2: "16",
|
|
2002
1971
|
key: "4dfq90"
|
|
2003
1972
|
}]
|
|
2004
|
-
]),
|
|
1973
|
+
]), Qr = X("circle-check", [["circle", {
|
|
2005
1974
|
cx: "12",
|
|
2006
1975
|
cy: "12",
|
|
2007
1976
|
r: "10",
|
|
@@ -2009,7 +1978,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2009
1978
|
}], ["path", {
|
|
2010
1979
|
d: "m9 12 2 2 4-4",
|
|
2011
1980
|
key: "dzmm74"
|
|
2012
|
-
}]]),
|
|
1981
|
+
}]]), $r = X("clock", [["circle", {
|
|
2013
1982
|
cx: "12",
|
|
2014
1983
|
cy: "12",
|
|
2015
1984
|
r: "10",
|
|
@@ -2017,13 +1986,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2017
1986
|
}], ["path", {
|
|
2018
1987
|
d: "M12 6v6l4 2",
|
|
2019
1988
|
key: "mmk7yg"
|
|
2020
|
-
}]]),
|
|
1989
|
+
}]]), ei = X("code", [["path", {
|
|
2021
1990
|
d: "m16 18 6-6-6-6",
|
|
2022
1991
|
key: "eg8j8"
|
|
2023
1992
|
}], ["path", {
|
|
2024
1993
|
d: "m8 6-6 6 6 6",
|
|
2025
1994
|
key: "ppft3o"
|
|
2026
|
-
}]]),
|
|
1995
|
+
}]]), ti = X("copy", [["rect", {
|
|
2027
1996
|
width: "14",
|
|
2028
1997
|
height: "14",
|
|
2029
1998
|
x: "8",
|
|
@@ -2034,7 +2003,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2034
2003
|
}], ["path", {
|
|
2035
2004
|
d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
|
|
2036
2005
|
key: "zix9uf"
|
|
2037
|
-
}]]),
|
|
2006
|
+
}]]), ni = X("eye-off", [
|
|
2038
2007
|
["path", {
|
|
2039
2008
|
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",
|
|
2040
2009
|
key: "ct8e1f"
|
|
@@ -2051,7 +2020,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2051
2020
|
d: "m2 2 20 20",
|
|
2052
2021
|
key: "1ooewy"
|
|
2053
2022
|
}]
|
|
2054
|
-
]),
|
|
2023
|
+
]), ri = X("eye", [["path", {
|
|
2055
2024
|
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",
|
|
2056
2025
|
key: "1nclc0"
|
|
2057
2026
|
}], ["circle", {
|
|
@@ -2059,7 +2028,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2059
2028
|
cy: "12",
|
|
2060
2029
|
r: "3",
|
|
2061
2030
|
key: "1v7zrd"
|
|
2062
|
-
}]]),
|
|
2031
|
+
}]]), ii = X("file-image", [
|
|
2063
2032
|
["path", {
|
|
2064
2033
|
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",
|
|
2065
2034
|
key: "1oefj6"
|
|
@@ -2078,7 +2047,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2078
2047
|
d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
|
|
2079
2048
|
key: "wt3hpn"
|
|
2080
2049
|
}]
|
|
2081
|
-
]),
|
|
2050
|
+
]), ai = X("file-text", [
|
|
2082
2051
|
["path", {
|
|
2083
2052
|
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",
|
|
2084
2053
|
key: "1oefj6"
|
|
@@ -2099,10 +2068,10 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2099
2068
|
d: "M16 17H8",
|
|
2100
2069
|
key: "z1uh3a"
|
|
2101
2070
|
}]
|
|
2102
|
-
]),
|
|
2071
|
+
]), oi = X("funnel", [["path", {
|
|
2103
2072
|
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",
|
|
2104
2073
|
key: "sc7q7i"
|
|
2105
|
-
}]]),
|
|
2074
|
+
}]]), si = X("grip-vertical", [
|
|
2106
2075
|
["circle", {
|
|
2107
2076
|
cx: "9",
|
|
2108
2077
|
cy: "12",
|
|
@@ -2139,7 +2108,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2139
2108
|
r: "1",
|
|
2140
2109
|
key: "f4zoj3"
|
|
2141
2110
|
}]
|
|
2142
|
-
]),
|
|
2111
|
+
]), ci = X("image-up", [
|
|
2143
2112
|
["path", {
|
|
2144
2113
|
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",
|
|
2145
2114
|
key: "9csbqa"
|
|
@@ -2158,7 +2127,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2158
2127
|
r: "2",
|
|
2159
2128
|
key: "af1f0g"
|
|
2160
2129
|
}]
|
|
2161
|
-
]),
|
|
2130
|
+
]), li = X("image", [
|
|
2162
2131
|
["rect", {
|
|
2163
2132
|
width: "18",
|
|
2164
2133
|
height: "18",
|
|
@@ -2178,7 +2147,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2178
2147
|
d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
|
|
2179
2148
|
key: "1xmnt7"
|
|
2180
2149
|
}]
|
|
2181
|
-
]),
|
|
2150
|
+
]), ui = X("info", [
|
|
2182
2151
|
["circle", {
|
|
2183
2152
|
cx: "12",
|
|
2184
2153
|
cy: "12",
|
|
@@ -2193,31 +2162,31 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2193
2162
|
d: "M12 8h.01",
|
|
2194
2163
|
key: "e9boi3"
|
|
2195
2164
|
}]
|
|
2196
|
-
]),
|
|
2165
|
+
]), di = X("loader-circle", [["path", {
|
|
2197
2166
|
d: "M21 12a9 9 0 1 1-6.219-8.56",
|
|
2198
2167
|
key: "13zald"
|
|
2199
|
-
}]]),
|
|
2168
|
+
}]]), fi = X("message-circle", [["path", {
|
|
2200
2169
|
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",
|
|
2201
2170
|
key: "1sd12s"
|
|
2202
|
-
}]]),
|
|
2171
|
+
}]]), pi = X("navigation", [["polygon", {
|
|
2203
2172
|
points: "3 11 22 2 13 21 11 13 3 11",
|
|
2204
2173
|
key: "1ltx0t"
|
|
2205
|
-
}]]),
|
|
2174
|
+
}]]), mi = X("pencil", [["path", {
|
|
2206
2175
|
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",
|
|
2207
2176
|
key: "1a8usu"
|
|
2208
2177
|
}], ["path", {
|
|
2209
2178
|
d: "m15 5 4 4",
|
|
2210
2179
|
key: "1mk7zo"
|
|
2211
|
-
}]]),
|
|
2180
|
+
}]]), hi = X("puzzle", [["path", {
|
|
2212
2181
|
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",
|
|
2213
2182
|
key: "w46dr5"
|
|
2214
|
-
}]]),
|
|
2183
|
+
}]]), gi = X("redo-2", [["path", {
|
|
2215
2184
|
d: "m15 14 5-5-5-5",
|
|
2216
2185
|
key: "12vg1m"
|
|
2217
2186
|
}], ["path", {
|
|
2218
2187
|
d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
|
|
2219
2188
|
key: "6uklza"
|
|
2220
|
-
}]]),
|
|
2189
|
+
}]]), _i = X("refresh-cw", [
|
|
2221
2190
|
["path", {
|
|
2222
2191
|
d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
|
|
2223
2192
|
key: "v9h5vc"
|
|
@@ -2234,19 +2203,19 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2234
2203
|
d: "M8 16H3v5",
|
|
2235
2204
|
key: "1cv678"
|
|
2236
2205
|
}]
|
|
2237
|
-
]),
|
|
2206
|
+
]), vi = X("reply", [["path", {
|
|
2238
2207
|
d: "M20 18v-2a4 4 0 0 0-4-4H4",
|
|
2239
2208
|
key: "5vmcpk"
|
|
2240
2209
|
}], ["path", {
|
|
2241
2210
|
d: "m9 17-5-5 5-5",
|
|
2242
2211
|
key: "nvlc11"
|
|
2243
|
-
}]]),
|
|
2212
|
+
}]]), yi = X("send", [["path", {
|
|
2244
2213
|
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",
|
|
2245
2214
|
key: "1ffxy3"
|
|
2246
2215
|
}], ["path", {
|
|
2247
2216
|
d: "m21.854 2.147-10.94 10.939",
|
|
2248
2217
|
key: "12cjpa"
|
|
2249
|
-
}]]),
|
|
2218
|
+
}]]), bi = X("share-2", [
|
|
2250
2219
|
["circle", {
|
|
2251
2220
|
cx: "18",
|
|
2252
2221
|
cy: "5",
|
|
@@ -2279,13 +2248,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2279
2248
|
y2: "10.49",
|
|
2280
2249
|
key: "1n3mei"
|
|
2281
2250
|
}]
|
|
2282
|
-
]),
|
|
2251
|
+
]), xi = X("shield-check", [["path", {
|
|
2283
2252
|
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",
|
|
2284
2253
|
key: "oel41y"
|
|
2285
2254
|
}], ["path", {
|
|
2286
2255
|
d: "m9 12 2 2 4-4",
|
|
2287
2256
|
key: "dzmm74"
|
|
2288
|
-
}]]),
|
|
2257
|
+
}]]), Si = X("shield-x", [
|
|
2289
2258
|
["path", {
|
|
2290
2259
|
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",
|
|
2291
2260
|
key: "oel41y"
|
|
@@ -2298,7 +2267,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2298
2267
|
d: "m9.5 9.5 5 5",
|
|
2299
2268
|
key: "18nt4w"
|
|
2300
2269
|
}]
|
|
2301
|
-
]),
|
|
2270
|
+
]), Ci = X("sparkles", [
|
|
2302
2271
|
["path", {
|
|
2303
2272
|
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",
|
|
2304
2273
|
key: "1s2grr"
|
|
@@ -2317,7 +2286,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2317
2286
|
r: "2",
|
|
2318
2287
|
key: "6kqj1y"
|
|
2319
2288
|
}]
|
|
2320
|
-
]),
|
|
2289
|
+
]), wi = X("table", [
|
|
2321
2290
|
["path", {
|
|
2322
2291
|
d: "M12 3v18",
|
|
2323
2292
|
key: "108xh3"
|
|
@@ -2338,7 +2307,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2338
2307
|
d: "M3 15h18",
|
|
2339
2308
|
key: "5xshup"
|
|
2340
2309
|
}]
|
|
2341
|
-
]),
|
|
2310
|
+
]), Ti = X("trash-2", [
|
|
2342
2311
|
["path", {
|
|
2343
2312
|
d: "M10 11v6",
|
|
2344
2313
|
key: "nco0om"
|
|
@@ -2359,7 +2328,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2359
2328
|
d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
|
|
2360
2329
|
key: "e791ji"
|
|
2361
2330
|
}]
|
|
2362
|
-
]),
|
|
2331
|
+
]), Ei = X("triangle-alert", [
|
|
2363
2332
|
["path", {
|
|
2364
2333
|
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",
|
|
2365
2334
|
key: "wmoenq"
|
|
@@ -2372,13 +2341,13 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2372
2341
|
d: "M12 17h.01",
|
|
2373
2342
|
key: "p32p05"
|
|
2374
2343
|
}]
|
|
2375
|
-
]),
|
|
2344
|
+
]), Di = X("undo-2", [["path", {
|
|
2376
2345
|
d: "M9 14 4 9l5-5",
|
|
2377
2346
|
key: "102s5s"
|
|
2378
2347
|
}], ["path", {
|
|
2379
2348
|
d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
|
|
2380
2349
|
key: "f3b9sd"
|
|
2381
|
-
}]]),
|
|
2350
|
+
}]]), Oi = X("upload", [
|
|
2382
2351
|
["path", {
|
|
2383
2352
|
d: "M12 3v12",
|
|
2384
2353
|
key: "1x0j5s"
|
|
@@ -2391,7 +2360,7 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2391
2360
|
d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
|
|
2392
2361
|
key: "ih7n3h"
|
|
2393
2362
|
}]
|
|
2394
|
-
]),
|
|
2363
|
+
]), ki = X("video", [["path", {
|
|
2395
2364
|
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
2396
2365
|
key: "ftymec"
|
|
2397
2366
|
}], ["rect", {
|
|
@@ -2401,20 +2370,20 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2401
2370
|
height: "12",
|
|
2402
2371
|
rx: "2",
|
|
2403
2372
|
key: "158x01"
|
|
2404
|
-
}]]),
|
|
2373
|
+
}]]), Ai = X("x", [["path", {
|
|
2405
2374
|
d: "M18 6 6 18",
|
|
2406
2375
|
key: "1bl5f8"
|
|
2407
2376
|
}], ["path", {
|
|
2408
2377
|
d: "m6 6 12 12",
|
|
2409
2378
|
key: "d8bk6v"
|
|
2410
|
-
}]]),
|
|
2379
|
+
}]]), ji = X("zap", [["path", {
|
|
2411
2380
|
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",
|
|
2412
2381
|
key: "1xq2db"
|
|
2413
|
-
}]]),
|
|
2382
|
+
}]]), Mi = ["innerHTML"], Ni = [
|
|
2414
2383
|
"src",
|
|
2415
2384
|
"width",
|
|
2416
2385
|
"height"
|
|
2417
|
-
],
|
|
2386
|
+
], Pi = /* @__PURE__ */ B({
|
|
2418
2387
|
__name: "CustomBlockIcon",
|
|
2419
2388
|
props: {
|
|
2420
2389
|
icon: {},
|
|
@@ -2430,40 +2399,40 @@ var Hr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2430
2399
|
height: `${n.value}px`
|
|
2431
2400
|
}),
|
|
2432
2401
|
innerHTML: e.icon
|
|
2433
|
-
}, null, 12,
|
|
2402
|
+
}, null, 12, Mi)) : i.value ? (f(), k("img", {
|
|
2434
2403
|
key: 1,
|
|
2435
2404
|
src: e.icon,
|
|
2436
2405
|
width: n.value,
|
|
2437
2406
|
height: n.value,
|
|
2438
2407
|
class: "tpl:inline-block",
|
|
2439
2408
|
alt: ""
|
|
2440
|
-
}, null, 8,
|
|
2409
|
+
}, null, 8, Ni)) : (f(), N(j(Gr), {
|
|
2441
2410
|
key: 2,
|
|
2442
2411
|
size: n.value,
|
|
2443
2412
|
"stroke-width": 1.5
|
|
2444
2413
|
}, null, 8, ["size"]));
|
|
2445
2414
|
}
|
|
2446
|
-
}),
|
|
2415
|
+
}), Fi = (e, t) => {
|
|
2447
2416
|
let n = e.__vccOpts || e;
|
|
2448
2417
|
for (let [e, r] of t) n[e] = r;
|
|
2449
2418
|
return n;
|
|
2450
|
-
},
|
|
2451
|
-
function
|
|
2452
|
-
return f(), k("div",
|
|
2419
|
+
}, Ii = {}, Li = { class: "tpl-loading-track" };
|
|
2420
|
+
function Ri(e, t) {
|
|
2421
|
+
return f(), k("div", Li);
|
|
2453
2422
|
}
|
|
2454
|
-
var
|
|
2423
|
+
var zi = /*#__PURE__*/ Fi(Ii, [["render", Ri], ["__scopeId", "data-v-1ed538ec"]]);
|
|
2455
2424
|
//#endregion
|
|
2456
2425
|
//#region src/composables/useEditorRoot.ts
|
|
2457
|
-
function
|
|
2458
|
-
return v(
|
|
2426
|
+
function Bi() {
|
|
2427
|
+
return v(ar, document) ?? document;
|
|
2459
2428
|
}
|
|
2460
2429
|
//#endregion
|
|
2461
2430
|
//#region src/composables/useFocusTrap.ts
|
|
2462
|
-
var
|
|
2463
|
-
function
|
|
2464
|
-
let n =
|
|
2431
|
+
var Vi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
2432
|
+
function Hi(e, t) {
|
|
2433
|
+
let n = Bi(), r = null, i = null, a = null;
|
|
2465
2434
|
function o() {
|
|
2466
|
-
return e.value ? Array.from(e.value.querySelectorAll(
|
|
2435
|
+
return e.value ? Array.from(e.value.querySelectorAll(Vi)).filter((e) => e.offsetParent !== null) : [];
|
|
2467
2436
|
}
|
|
2468
2437
|
function s(e) {
|
|
2469
2438
|
if (e.key !== "Tab") return;
|
|
@@ -2493,18 +2462,18 @@ function Vi(e, t) {
|
|
|
2493
2462
|
}
|
|
2494
2463
|
//#endregion
|
|
2495
2464
|
//#region src/composables/useCloudI18n.ts
|
|
2496
|
-
function
|
|
2465
|
+
function Ui(e, t) {
|
|
2497
2466
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2498
2467
|
}
|
|
2499
|
-
function
|
|
2500
|
-
let t = e ?? v(
|
|
2468
|
+
function Wi(e) {
|
|
2469
|
+
let t = e ?? v(fr, null);
|
|
2501
2470
|
return {
|
|
2502
2471
|
t: t ? u(t) ? t.value : t : null,
|
|
2503
|
-
format:
|
|
2472
|
+
format: Ui
|
|
2504
2473
|
};
|
|
2505
2474
|
}
|
|
2506
|
-
function
|
|
2507
|
-
let { t, format: n } =
|
|
2475
|
+
function Gi(e) {
|
|
2476
|
+
let { t, format: n } = Wi(e);
|
|
2508
2477
|
if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
|
|
2509
2478
|
return {
|
|
2510
2479
|
t,
|
|
@@ -2513,8 +2482,8 @@ function Wi(e) {
|
|
|
2513
2482
|
}
|
|
2514
2483
|
//#endregion
|
|
2515
2484
|
//#region src/composables/useMergeTag.ts
|
|
2516
|
-
function
|
|
2517
|
-
let e = v(
|
|
2485
|
+
function Ki() {
|
|
2486
|
+
let e = v(Jn, []), t = v(Yn, ut.liquid), n = v(Xn, null), r = v(Zn, !0), i = v(Qn, null), a = C(!1);
|
|
2518
2487
|
function o(e) {
|
|
2519
2488
|
return ht(e, t);
|
|
2520
2489
|
}
|
|
@@ -2553,7 +2522,7 @@ function Gi() {
|
|
|
2553
2522
|
}
|
|
2554
2523
|
//#endregion
|
|
2555
2524
|
//#region src/composables/useEmoji.ts
|
|
2556
|
-
function
|
|
2525
|
+
function qi() {
|
|
2557
2526
|
let [e, t] = cn(!1), r = n([]), i = !1;
|
|
2558
2527
|
l(() => {
|
|
2559
2528
|
i = !0;
|
|
@@ -2579,7 +2548,7 @@ function Ki() {
|
|
|
2579
2548
|
}
|
|
2580
2549
|
//#endregion
|
|
2581
2550
|
//#region src/composables/useDragDrop.ts
|
|
2582
|
-
function
|
|
2551
|
+
function Ji(e) {
|
|
2583
2552
|
let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
|
|
2584
2553
|
function o(e) {
|
|
2585
2554
|
r.value = !0, i.value = e;
|
|
@@ -2629,7 +2598,7 @@ function qi(e) {
|
|
|
2629
2598
|
}
|
|
2630
2599
|
//#endregion
|
|
2631
2600
|
//#region src/composables/useFonts.ts
|
|
2632
|
-
var
|
|
2601
|
+
var Yi = [
|
|
2633
2602
|
{
|
|
2634
2603
|
value: "Arial",
|
|
2635
2604
|
label: "Arial"
|
|
@@ -2658,7 +2627,7 @@ var Ji = [
|
|
|
2658
2627
|
value: "Courier New",
|
|
2659
2628
|
label: "Courier New"
|
|
2660
2629
|
}
|
|
2661
|
-
],
|
|
2630
|
+
], Xi = {
|
|
2662
2631
|
arial: "Arial, sans-serif",
|
|
2663
2632
|
helvetica: "Helvetica, sans-serif",
|
|
2664
2633
|
georgia: "Georgia, serif",
|
|
@@ -2666,14 +2635,14 @@ var Ji = [
|
|
|
2666
2635
|
verdana: "Verdana, sans-serif",
|
|
2667
2636
|
"trebuchet ms": "'Trebuchet MS', sans-serif",
|
|
2668
2637
|
"courier new": "'Courier New', monospace"
|
|
2669
|
-
},
|
|
2670
|
-
function
|
|
2671
|
-
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ??
|
|
2638
|
+
}, Zi = "Arial, sans-serif";
|
|
2639
|
+
function Qi(e) {
|
|
2640
|
+
let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Zi);
|
|
2672
2641
|
function a(e) {
|
|
2673
2642
|
n.value = e;
|
|
2674
2643
|
}
|
|
2675
2644
|
let o = O(() => {
|
|
2676
|
-
let e = [...
|
|
2645
|
+
let e = [...Yi];
|
|
2677
2646
|
if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
|
|
2678
2647
|
let r = t.value.map((e) => ({
|
|
2679
2648
|
value: e.name,
|
|
@@ -2686,23 +2655,23 @@ function Zi(e) {
|
|
|
2686
2655
|
return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2687
2656
|
}
|
|
2688
2657
|
function u(e) {
|
|
2689
|
-
return
|
|
2658
|
+
return Yi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
|
|
2690
2659
|
}
|
|
2691
2660
|
function d() {
|
|
2692
2661
|
if (e?.defaultFont) {
|
|
2693
|
-
if (!n.value && !u(e.defaultFont)) return
|
|
2662
|
+
if (!n.value && !u(e.defaultFont)) return Zi;
|
|
2694
2663
|
if (c(e.defaultFont)) {
|
|
2695
2664
|
let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
|
|
2696
2665
|
if (t) return t.value;
|
|
2697
2666
|
}
|
|
2698
2667
|
}
|
|
2699
|
-
return
|
|
2668
|
+
return Zi;
|
|
2700
2669
|
}
|
|
2701
2670
|
let f = O(() => d());
|
|
2702
2671
|
function p(e) {
|
|
2703
2672
|
if (!e) return i.value;
|
|
2704
2673
|
let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
|
|
2705
|
-
return n ? `'${n.name}', ${n.fallback ?? i.value}` :
|
|
2674
|
+
return n ? `'${n.name}', ${n.fallback ?? i.value}` : Xi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
|
|
2706
2675
|
}
|
|
2707
2676
|
let m = [], h = !1;
|
|
2708
2677
|
async function g() {
|
|
@@ -2718,7 +2687,7 @@ function Zi(e) {
|
|
|
2718
2687
|
t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
|
|
2719
2688
|
});
|
|
2720
2689
|
} catch (t) {
|
|
2721
|
-
|
|
2690
|
+
Cr.warn(`Failed to load custom font "${e.name}":`, t);
|
|
2722
2691
|
}
|
|
2723
2692
|
});
|
|
2724
2693
|
await Promise.allSettled(e), !h && (r.value = !0);
|
|
@@ -2745,9 +2714,9 @@ function Zi(e) {
|
|
|
2745
2714
|
}
|
|
2746
2715
|
//#endregion
|
|
2747
2716
|
//#region src/composables/useRichTextLinkDialog.ts
|
|
2748
|
-
function
|
|
2717
|
+
function $i(e) {
|
|
2749
2718
|
let t = C(!1), n = C(""), r = C(null);
|
|
2750
|
-
|
|
2719
|
+
Hi(r, t);
|
|
2751
2720
|
function i() {
|
|
2752
2721
|
n.value = e.value?.getAttributes("link").href || "", t.value = !0;
|
|
2753
2722
|
}
|
|
@@ -2798,8 +2767,8 @@ function Qi(e) {
|
|
|
2798
2767
|
}
|
|
2799
2768
|
//#endregion
|
|
2800
2769
|
//#region src/composables/useRichTextEditor.ts
|
|
2801
|
-
function
|
|
2802
|
-
let t = v(In, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } =
|
|
2770
|
+
function ea(e) {
|
|
2771
|
+
let t = v(In, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Ki(), l = v(Fn, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = ft(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = $i(p), { start: w, stop: ee } = sn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), T = n(null), E = C(!0), D = C(null), te = !1;
|
|
2803
2772
|
async function ne() {
|
|
2804
2773
|
D.value = null, E.value = !0;
|
|
2805
2774
|
try {
|
|
@@ -2829,7 +2798,7 @@ function $i(e) {
|
|
|
2829
2798
|
p.value = l, E.value = !1, w();
|
|
2830
2799
|
} catch (t) {
|
|
2831
2800
|
if (te) return;
|
|
2832
|
-
|
|
2801
|
+
Cr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", E.value = !1;
|
|
2833
2802
|
}
|
|
2834
2803
|
}
|
|
2835
2804
|
function O() {
|
|
@@ -2876,21 +2845,31 @@ function $i(e) {
|
|
|
2876
2845
|
};
|
|
2877
2846
|
}
|
|
2878
2847
|
//#endregion
|
|
2848
|
+
//#region src/composables/useSmallScreenNotice.ts
|
|
2849
|
+
var ta = "(max-width: 767px)";
|
|
2850
|
+
function na(e) {
|
|
2851
|
+
let t = xn(ta);
|
|
2852
|
+
return {
|
|
2853
|
+
isSmallScreen: t,
|
|
2854
|
+
showNotice: O(() => (P(e) ?? !0) && t.value)
|
|
2855
|
+
};
|
|
2856
|
+
}
|
|
2857
|
+
//#endregion
|
|
2879
2858
|
//#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2880
|
-
var
|
|
2859
|
+
var ra = { class: "tpl:w-full" }, ia = {
|
|
2881
2860
|
key: 0,
|
|
2882
2861
|
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)]"
|
|
2883
|
-
},
|
|
2862
|
+
}, aa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, oa = {
|
|
2884
2863
|
key: 1,
|
|
2885
2864
|
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)]"
|
|
2886
|
-
},
|
|
2865
|
+
}, sa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ca = {
|
|
2887
2866
|
key: 2,
|
|
2888
2867
|
class: "tpl:relative"
|
|
2889
|
-
},
|
|
2868
|
+
}, la = ["innerHTML"], ua = {
|
|
2890
2869
|
key: 0,
|
|
2891
2870
|
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]",
|
|
2892
2871
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2893
|
-
},
|
|
2872
|
+
}, da = /* @__PURE__ */ B({
|
|
2894
2873
|
__name: "CustomBlock",
|
|
2895
2874
|
props: {
|
|
2896
2875
|
block: {},
|
|
@@ -2924,10 +2903,10 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2924
2903
|
g();
|
|
2925
2904
|
}), H(() => n.block.fieldValues, () => {
|
|
2926
2905
|
_();
|
|
2927
|
-
}, { deep: !0 }), (e, t) => (f(), k("div",
|
|
2906
|
+
}, { deep: !0 }), (e, t) => (f(), k("div", ra, [u.value ? c.value ? (f(), k("div", oa, [V(j(Ei), {
|
|
2928
2907
|
size: 24,
|
|
2929
2908
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2930
|
-
}), I("span",
|
|
2909
|
+
}), I("span", sa, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", ca, [I("div", { innerHTML: s.value }, null, 8, la), j(h) && j(m) ? (f(), k("div", ua, [j(d) ? (f(), N(zi, {
|
|
2931
2910
|
key: 1,
|
|
2932
2911
|
class: "tpl:w-48"
|
|
2933
2912
|
})) : (f(), k("button", {
|
|
@@ -2935,16 +2914,16 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2935
2914
|
type: "button",
|
|
2936
2915
|
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)]",
|
|
2937
2916
|
onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
|
|
2938
|
-
}, [l.value?.icon ? (f(), N(
|
|
2917
|
+
}, [l.value?.icon ? (f(), N(Pi, {
|
|
2939
2918
|
key: 0,
|
|
2940
2919
|
icon: l.value.icon,
|
|
2941
2920
|
size: 16
|
|
2942
|
-
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div",
|
|
2921
|
+
}, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", ia, [V(j(hi), {
|
|
2943
2922
|
size: 24,
|
|
2944
2923
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2945
|
-
}), I("span",
|
|
2924
|
+
}), I("span", aa, D(j(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2946
2925
|
}
|
|
2947
|
-
}),
|
|
2926
|
+
}), fa = { class: "tpl:w-full" }, pa = /* @__PURE__ */ B({
|
|
2948
2927
|
__name: "DividerBlock",
|
|
2949
2928
|
props: {
|
|
2950
2929
|
block: {},
|
|
@@ -2956,18 +2935,18 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2956
2935
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2957
2936
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2958
2937
|
}));
|
|
2959
|
-
return (e, t) => (f(), k("div",
|
|
2938
|
+
return (e, t) => (f(), k("div", fa, [I("hr", {
|
|
2960
2939
|
class: "tpl:m-0 tpl:border-none",
|
|
2961
2940
|
style: L(n.value)
|
|
2962
2941
|
}, null, 4)]));
|
|
2963
2942
|
}
|
|
2964
|
-
}),
|
|
2943
|
+
}), ma = { class: "tpl:w-full" }, ha = { 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)]" }, ga = {
|
|
2965
2944
|
key: 0,
|
|
2966
2945
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
|
|
2967
|
-
},
|
|
2946
|
+
}, _a = {
|
|
2968
2947
|
key: 1,
|
|
2969
2948
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2970
|
-
},
|
|
2949
|
+
}, va = /* @__PURE__ */ B({
|
|
2971
2950
|
__name: "HtmlBlock",
|
|
2972
2951
|
props: {
|
|
2973
2952
|
block: {},
|
|
@@ -2975,15 +2954,15 @@ var ea = { class: "tpl:w-full" }, ta = {
|
|
|
2975
2954
|
},
|
|
2976
2955
|
setup(e) {
|
|
2977
2956
|
let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
|
|
2978
|
-
return (e, t) => (f(), k("div",
|
|
2957
|
+
return (e, t) => (f(), k("div", ma, [I("div", ha, [V(j(ei), {
|
|
2979
2958
|
size: 24,
|
|
2980
2959
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2981
|
-
}), r.value ? (f(), k("span",
|
|
2960
|
+
}), r.value ? (f(), k("span", ga, D(j(n).html.preview), 1)) : (f(), k("span", _a, D(j(n).html.empty), 1))])]));
|
|
2982
2961
|
}
|
|
2983
2962
|
});
|
|
2984
2963
|
//#endregion
|
|
2985
2964
|
//#region src/composables/useAliveFlag.ts
|
|
2986
|
-
function
|
|
2965
|
+
function ya() {
|
|
2987
2966
|
let e = { alive: !0 };
|
|
2988
2967
|
return re(() => {
|
|
2989
2968
|
e.alive = !1;
|
|
@@ -2991,13 +2970,13 @@ function ga() {
|
|
|
2991
2970
|
}
|
|
2992
2971
|
//#endregion
|
|
2993
2972
|
//#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
|
|
2994
|
-
var
|
|
2973
|
+
var ba = ["href"], xa = ["src", "alt"], Sa = ["src", "alt"], Ca = {
|
|
2995
2974
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
2996
2975
|
style: { opacity: "0.7" }
|
|
2997
|
-
},
|
|
2976
|
+
}, wa = ["href"], Ta = ["src", "alt"], Ea = ["src", "alt"], Da = {
|
|
2998
2977
|
key: 3,
|
|
2999
2978
|
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)]"
|
|
3000
|
-
},
|
|
2979
|
+
}, Oa = ["aria-label"], ka = { key: 1 }, Aa = /* @__PURE__ */ B({
|
|
3001
2980
|
__name: "ImageBlock",
|
|
3002
2981
|
props: {
|
|
3003
2982
|
block: {},
|
|
@@ -3005,7 +2984,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3005
2984
|
},
|
|
3006
2985
|
emits: ["update"],
|
|
3007
2986
|
setup(e, { emit: t }) {
|
|
3008
|
-
let n = e, r = t, { t: i } = Y(), { syntax: a } =
|
|
2987
|
+
let n = e, r = t, { t: i } = Y(), { syntax: a } = Ki(), o = v($n, null), s = O(() => !!o), c = ya();
|
|
3009
2988
|
async function l() {
|
|
3010
2989
|
let e = await o?.({ accept: ["images"] });
|
|
3011
2990
|
if (c.alive && e) {
|
|
@@ -3038,22 +3017,22 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3038
3017
|
src: e.block.placeholderUrl,
|
|
3039
3018
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3040
3019
|
style: L(d.value)
|
|
3041
|
-
}, null, 12,
|
|
3020
|
+
}, null, 12, xa)], 8, ba)) : (f(), k("img", {
|
|
3042
3021
|
key: 1,
|
|
3043
3022
|
class: "tpl:border-0",
|
|
3044
3023
|
src: e.block.placeholderUrl,
|
|
3045
3024
|
alt: e.block.alt,
|
|
3046
3025
|
style: L(d.value)
|
|
3047
|
-
}, null, 12,
|
|
3026
|
+
}, null, 12, Sa))], 64)) : e.block.src && p.value ? (f(), k("div", {
|
|
3048
3027
|
key: 1,
|
|
3049
3028
|
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)]",
|
|
3050
3029
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
3051
|
-
}, [V(j(
|
|
3030
|
+
}, [V(j(li), {
|
|
3052
3031
|
size: 32,
|
|
3053
3032
|
"stroke-width": 1.5,
|
|
3054
3033
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3055
3034
|
style: { opacity: "0.5" }
|
|
3056
|
-
}), I("span",
|
|
3035
|
+
}), I("span", Ca, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 2 }, [e.block.linkUrl ? (f(), k("a", {
|
|
3057
3036
|
key: 0,
|
|
3058
3037
|
href: e.block.linkUrl,
|
|
3059
3038
|
target: "_blank",
|
|
@@ -3065,26 +3044,26 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3065
3044
|
src: e.block.src,
|
|
3066
3045
|
alt: e.block.alt || j(i).image.altTextPlaceholder,
|
|
3067
3046
|
style: L(d.value)
|
|
3068
|
-
}, null, 12,
|
|
3047
|
+
}, null, 12, Ta)], 8, wa)) : (f(), k("img", {
|
|
3069
3048
|
key: 1,
|
|
3070
3049
|
class: "tpl:border-0",
|
|
3071
3050
|
src: e.block.src,
|
|
3072
3051
|
alt: e.block.alt,
|
|
3073
3052
|
style: L(d.value)
|
|
3074
|
-
}, null, 12,
|
|
3053
|
+
}, null, 12, Ea))], 64)) : (f(), k("div", Da, [s.value ? (f(), k("button", {
|
|
3075
3054
|
key: 0,
|
|
3076
3055
|
"aria-label": j(i).image.browseMedia,
|
|
3077
3056
|
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)]",
|
|
3078
3057
|
onClick: M(l, ["stop"])
|
|
3079
|
-
}, [V(j(
|
|
3058
|
+
}, [V(j(li), {
|
|
3080
3059
|
size: 14,
|
|
3081
3060
|
"stroke-width": 1.5
|
|
3082
|
-
}), z(" " + D(j(i).image.browseMedia), 1)], 8,
|
|
3061
|
+
}), z(" " + D(j(i).image.browseMedia), 1)], 8, Oa)) : (f(), k("span", ka, D(j(i).image.clickToAdd), 1))]))], 4));
|
|
3083
3062
|
}
|
|
3084
|
-
}),
|
|
3063
|
+
}), ja = { class: "tpl:w-full" }, Ma = ["href"], Na = {
|
|
3085
3064
|
key: 1,
|
|
3086
3065
|
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)]"
|
|
3087
|
-
},
|
|
3066
|
+
}, Pa = /* @__PURE__ */ B({
|
|
3088
3067
|
__name: "MenuBlock",
|
|
3089
3068
|
props: {
|
|
3090
3069
|
block: {},
|
|
@@ -3103,7 +3082,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3103
3082
|
function a(e) {
|
|
3104
3083
|
return e || t.block.linkColor || t.block.color;
|
|
3105
3084
|
}
|
|
3106
|
-
return (t, o) => (f(), k("div",
|
|
3085
|
+
return (t, o) => (f(), k("div", ja, [i.value ? (f(), k("div", {
|
|
3107
3086
|
key: 0,
|
|
3108
3087
|
style: L(r.value)
|
|
3109
3088
|
}, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
|
|
@@ -3115,15 +3094,15 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3115
3094
|
textDecoration: t.underline ? "underline" : "none"
|
|
3116
3095
|
}),
|
|
3117
3096
|
onClick: o[0] ||= M(() => {}, ["prevent"])
|
|
3118
|
-
}, D(t.text || "..."), 13,
|
|
3097
|
+
}, D(t.text || "..."), 13, Ma), n < e.block.items.length - 1 ? (f(), k("span", {
|
|
3119
3098
|
key: 0,
|
|
3120
3099
|
style: L({
|
|
3121
3100
|
color: e.block.separatorColor,
|
|
3122
3101
|
padding: `0 ${e.block.spacing}px`
|
|
3123
3102
|
})
|
|
3124
|
-
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div",
|
|
3103
|
+
}, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", Na, [V(j(pi), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
|
|
3125
3104
|
}
|
|
3126
|
-
}),
|
|
3105
|
+
}), Fa = new Set([
|
|
3127
3106
|
"http",
|
|
3128
3107
|
"https",
|
|
3129
3108
|
"mailto",
|
|
@@ -3133,7 +3112,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3133
3112
|
"sms",
|
|
3134
3113
|
"xmpp",
|
|
3135
3114
|
"cid"
|
|
3136
|
-
]),
|
|
3115
|
+
]), Ia = new Set([
|
|
3137
3116
|
"SCRIPT",
|
|
3138
3117
|
"STYLE",
|
|
3139
3118
|
"IFRAME",
|
|
@@ -3143,7 +3122,7 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3143
3122
|
"META",
|
|
3144
3123
|
"BASE",
|
|
3145
3124
|
"FORM"
|
|
3146
|
-
]),
|
|
3125
|
+
]), La = new Set([
|
|
3147
3126
|
"href",
|
|
3148
3127
|
"xlink:href",
|
|
3149
3128
|
"formaction",
|
|
@@ -3152,16 +3131,16 @@ var _a = ["href"], va = ["src", "alt"], ya = ["src", "alt"], ba = {
|
|
|
3152
3131
|
"background",
|
|
3153
3132
|
"poster"
|
|
3154
3133
|
]);
|
|
3155
|
-
function
|
|
3134
|
+
function Ra(e, t) {
|
|
3156
3135
|
let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
|
|
3157
3136
|
if (!n || n.startsWith("#")) return !0;
|
|
3158
3137
|
let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
|
|
3159
3138
|
if (!r) return !0;
|
|
3160
3139
|
let i = r[1].toLowerCase();
|
|
3161
|
-
return
|
|
3140
|
+
return Fa.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
|
|
3162
3141
|
}
|
|
3163
|
-
function
|
|
3164
|
-
if (
|
|
3142
|
+
function za(e) {
|
|
3143
|
+
if (Ia.has(e.tagName)) {
|
|
3165
3144
|
e.remove();
|
|
3166
3145
|
return;
|
|
3167
3146
|
}
|
|
@@ -3173,29 +3152,29 @@ function Ia(e) {
|
|
|
3173
3152
|
e.removeAttribute(n);
|
|
3174
3153
|
continue;
|
|
3175
3154
|
}
|
|
3176
|
-
if (
|
|
3177
|
-
|
|
3155
|
+
if (La.has(t)) {
|
|
3156
|
+
Ra(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
|
|
3178
3157
|
continue;
|
|
3179
3158
|
}
|
|
3180
3159
|
if (t === "src") {
|
|
3181
|
-
|
|
3160
|
+
Ra(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
|
|
3182
3161
|
continue;
|
|
3183
3162
|
}
|
|
3184
3163
|
t === "srcdoc" && e.removeAttribute(n);
|
|
3185
3164
|
}
|
|
3186
3165
|
let n = Array.from(e.children);
|
|
3187
|
-
for (let e of n)
|
|
3166
|
+
for (let e of n) za(e);
|
|
3188
3167
|
}
|
|
3189
|
-
function
|
|
3168
|
+
function Ba(e) {
|
|
3190
3169
|
if (typeof DOMParser > "u") return e;
|
|
3191
3170
|
let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
|
|
3192
|
-
for (let e of n)
|
|
3171
|
+
for (let e of n) za(e);
|
|
3193
3172
|
return t.innerHTML;
|
|
3194
3173
|
}
|
|
3195
3174
|
//#endregion
|
|
3196
3175
|
//#region src/composables/useEditableTextBlock.ts
|
|
3197
|
-
function
|
|
3198
|
-
let t = v(
|
|
3176
|
+
function Va(e) {
|
|
3177
|
+
let t = v(Jn, []), { syntax: n } = Ki(), r = O(() => Ba(xt(_t(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = En(a), c = O(() => ({
|
|
3199
3178
|
top: o.value - 8,
|
|
3200
3179
|
left: s.value
|
|
3201
3180
|
}));
|
|
@@ -3216,14 +3195,14 @@ function Ra(e) {
|
|
|
3216
3195
|
}
|
|
3217
3196
|
//#endregion
|
|
3218
3197
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3219
|
-
var
|
|
3198
|
+
var Ha = ["innerHTML"], Ua = /* @__PURE__ */ B({
|
|
3220
3199
|
__name: "ParagraphBlock",
|
|
3221
3200
|
props: {
|
|
3222
3201
|
block: {},
|
|
3223
3202
|
viewport: {}
|
|
3224
3203
|
},
|
|
3225
3204
|
setup(e) {
|
|
3226
|
-
let t = e, n = T(() => import("./ParagraphEditor-
|
|
3205
|
+
let t = e, n = T(() => import("./ParagraphEditor-Cbl_gBYM.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Va(() => t.block.content);
|
|
3227
3206
|
return (t, l) => (f(), k("div", {
|
|
3228
3207
|
ref_key: "blockRef",
|
|
3229
3208
|
ref: i,
|
|
@@ -3242,19 +3221,19 @@ var za = ["innerHTML"], Ba = /* @__PURE__ */ B({
|
|
|
3242
3221
|
key: 1,
|
|
3243
3222
|
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",
|
|
3244
3223
|
innerHTML: j(o)
|
|
3245
|
-
}, null, 8,
|
|
3224
|
+
}, null, 8, Ha))], 544));
|
|
3246
3225
|
}
|
|
3247
3226
|
});
|
|
3248
3227
|
//#endregion
|
|
3249
3228
|
//#region src/utils/blockComponentResolver.ts
|
|
3250
|
-
function
|
|
3229
|
+
function Wa(e, t, n) {
|
|
3251
3230
|
if (t) {
|
|
3252
3231
|
let n = t.getComponent(e);
|
|
3253
3232
|
if (n) return n;
|
|
3254
3233
|
}
|
|
3255
3234
|
return n[e.type] ?? null;
|
|
3256
3235
|
}
|
|
3257
|
-
function
|
|
3236
|
+
function Ga(e) {
|
|
3258
3237
|
let { padding: t, backgroundColor: n } = e.styles;
|
|
3259
3238
|
return {
|
|
3260
3239
|
padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
|
|
@@ -3263,20 +3242,20 @@ function Ha(e) {
|
|
|
3263
3242
|
}
|
|
3264
3243
|
//#endregion
|
|
3265
3244
|
//#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
|
|
3266
|
-
var
|
|
3245
|
+
var Ka = ["data-block-id", "data-block-type"], qa = ["aria-label"], Ja = [
|
|
3267
3246
|
"aria-label",
|
|
3268
3247
|
"aria-pressed",
|
|
3269
3248
|
"title"
|
|
3270
|
-
],
|
|
3249
|
+
], Ya = ["aria-label", "title"], Xa = ["aria-label", "title"], Za = ["aria-label", "title"], Qa = {
|
|
3271
3250
|
key: 1,
|
|
3272
3251
|
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"
|
|
3273
|
-
},
|
|
3252
|
+
}, $a = { 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)]" }, eo = {
|
|
3274
3253
|
key: 2,
|
|
3275
3254
|
class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
|
|
3276
|
-
},
|
|
3255
|
+
}, to = ["aria-label", "title"], no = {
|
|
3277
3256
|
key: 3,
|
|
3278
3257
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3279
|
-
},
|
|
3258
|
+
}, ro = ["aria-label"], io = /*#__PURE__*/ Fi(/* @__PURE__ */ B({
|
|
3280
3259
|
__name: "BlockWrapper",
|
|
3281
3260
|
props: {
|
|
3282
3261
|
block: {},
|
|
@@ -3286,7 +3265,7 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3286
3265
|
},
|
|
3287
3266
|
emits: ["select"],
|
|
3288
3267
|
setup(e, { emit: t }) {
|
|
3289
|
-
let n = T(() => import("./BlockIssueBadge-
|
|
3268
|
+
let n = T(() => import("./BlockIssueBadge-sv3IZ1Pb.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(rr, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
|
|
3290
3269
|
async function p() {
|
|
3291
3270
|
await m(), l.value?.focus();
|
|
3292
3271
|
}
|
|
@@ -3312,8 +3291,8 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3312
3291
|
let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
|
|
3313
3292
|
desktop: a.viewport.desktop,
|
|
3314
3293
|
mobile: a.viewport.mobile
|
|
3315
|
-
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Rn, null), S = v(zn, null), w = v(
|
|
3316
|
-
let e =
|
|
3294
|
+
}[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Rn, null), S = v(zn, null), w = v(nr, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
|
|
3295
|
+
let e = Ga(r.block);
|
|
3317
3296
|
return {
|
|
3318
3297
|
padding: e.padding,
|
|
3319
3298
|
backgroundColor: e.backgroundColor
|
|
@@ -3361,90 +3340,90 @@ var Ua = ["data-block-id", "data-block-type"], Wa = ["aria-label"], Ga = [
|
|
|
3361
3340
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3362
3341
|
title: j(a).blockActions.drag,
|
|
3363
3342
|
onKeydown: h
|
|
3364
|
-
}, [V(j(
|
|
3343
|
+
}, [V(j(si), {
|
|
3365
3344
|
size: 14,
|
|
3366
3345
|
"stroke-width": 1.5
|
|
3367
|
-
})], 40,
|
|
3346
|
+
})], 40, Ja),
|
|
3368
3347
|
I("button", {
|
|
3369
3348
|
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",
|
|
3370
3349
|
"aria-label": j(a).blockActions.duplicate,
|
|
3371
3350
|
title: j(a).blockActions.duplicate,
|
|
3372
3351
|
onClick: M(N, ["stop"])
|
|
3373
|
-
}, [V(j(
|
|
3352
|
+
}, [V(j(ti), {
|
|
3374
3353
|
size: 14,
|
|
3375
3354
|
"stroke-width": 1.5
|
|
3376
|
-
})], 8,
|
|
3355
|
+
})], 8, Ya),
|
|
3377
3356
|
ee.value ? (f(), k("button", {
|
|
3378
3357
|
key: 0,
|
|
3379
3358
|
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",
|
|
3380
3359
|
"aria-label": j(a).blockActions.saveAsModule,
|
|
3381
3360
|
title: j(a).blockActions.saveAsModule,
|
|
3382
3361
|
onClick: M(ie, ["stop"])
|
|
3383
|
-
}, [V(j(
|
|
3362
|
+
}, [V(j(Wr), {
|
|
3384
3363
|
size: 14,
|
|
3385
3364
|
"stroke-width": 1.5
|
|
3386
|
-
})], 8,
|
|
3365
|
+
})], 8, Xa)) : A("", !0),
|
|
3387
3366
|
I("button", {
|
|
3388
3367
|
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",
|
|
3389
3368
|
"aria-label": j(a).blockActions.delete,
|
|
3390
3369
|
title: j(a).blockActions.delete,
|
|
3391
3370
|
onClick: M(re, ["stop"])
|
|
3392
|
-
}, [V(j(
|
|
3371
|
+
}, [V(j(Ti), {
|
|
3393
3372
|
size: 14,
|
|
3394
3373
|
"stroke-width": 1.5
|
|
3395
|
-
})], 8,
|
|
3396
|
-
], 8,
|
|
3397
|
-
g.value ? (f(), k("div",
|
|
3374
|
+
})], 8, Za)
|
|
3375
|
+
], 8, qa)) : A("", !0),
|
|
3376
|
+
g.value ? (f(), k("div", Qa, [I("span", $a, [V(j(ni), {
|
|
3398
3377
|
size: 12,
|
|
3399
3378
|
"stroke-width": 1.5
|
|
3400
3379
|
}), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
|
|
3401
|
-
b.value && !g.value ? (f(), k("div",
|
|
3380
|
+
b.value && !g.value ? (f(), k("div", eo, [I("button", {
|
|
3402
3381
|
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)]",
|
|
3403
3382
|
"aria-label": j(a).blockActions.conditionToggle,
|
|
3404
3383
|
title: e.block.displayCondition?.label,
|
|
3405
3384
|
onClick: M(P, ["stop"])
|
|
3406
|
-
}, [V(j(
|
|
3385
|
+
}, [V(j(oi), {
|
|
3407
3386
|
size: 12,
|
|
3408
3387
|
"stroke-width": 2
|
|
3409
|
-
})], 8,
|
|
3410
|
-
E.value > 0 && !g.value ? (f(), k("div",
|
|
3388
|
+
})], 8, to)])) : A("", !0),
|
|
3389
|
+
E.value > 0 && !g.value ? (f(), k("div", no, [I("button", {
|
|
3411
3390
|
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)]",
|
|
3412
3391
|
"aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
|
|
3413
3392
|
onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
|
|
3414
|
-
}, [V(j(
|
|
3393
|
+
}, [V(j(fi), {
|
|
3415
3394
|
size: 12,
|
|
3416
3395
|
"stroke-width": 2.5
|
|
3417
|
-
}), z(" " + D(E.value), 1)], 8,
|
|
3396
|
+
}), z(" " + D(E.value), 1)], 8, ro)])) : A("", !0),
|
|
3418
3397
|
I("div", {
|
|
3419
3398
|
class: "tpl-block-content",
|
|
3420
3399
|
style: L(te.value)
|
|
3421
3400
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3422
|
-
], 10,
|
|
3401
|
+
], 10, Ka));
|
|
3423
3402
|
}
|
|
3424
3403
|
}), [["__scopeId", "data-v-4a48371d"]]);
|
|
3425
3404
|
//#endregion
|
|
3426
3405
|
//#region src/utils/unwrapParagraph.ts
|
|
3427
|
-
function
|
|
3406
|
+
function ao(e) {
|
|
3428
3407
|
let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
|
|
3429
3408
|
return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
|
|
3430
3409
|
}
|
|
3431
3410
|
//#endregion
|
|
3432
3411
|
//#region src/components/blocks/TitleBlock.vue
|
|
3433
|
-
var
|
|
3412
|
+
var oo = /* @__PURE__ */ B({
|
|
3434
3413
|
__name: "TitleBlock",
|
|
3435
3414
|
props: {
|
|
3436
3415
|
block: {},
|
|
3437
3416
|
viewport: {}
|
|
3438
3417
|
},
|
|
3439
3418
|
setup(e) {
|
|
3440
|
-
let t = e, n = T(() => import("./TitleEditor
|
|
3419
|
+
let t = e, n = T(() => import("./TitleEditor--XulEf7R.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Va(() => t.block.content), l = O(() => {
|
|
3441
3420
|
let e = {
|
|
3442
3421
|
fontSize: `${pe[t.block.level]}px`,
|
|
3443
3422
|
color: t.block.color,
|
|
3444
3423
|
textAlign: t.block.textAlign
|
|
3445
3424
|
};
|
|
3446
3425
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
3447
|
-
}), u = O(() => `h${t.block.level}`), p = O(() =>
|
|
3426
|
+
}), u = O(() => `h${t.block.level}`), p = O(() => ao(o.value));
|
|
3448
3427
|
return (t, o) => (f(), k("div", {
|
|
3449
3428
|
ref_key: "blockRef",
|
|
3450
3429
|
ref: i,
|
|
@@ -3467,11 +3446,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3467
3446
|
innerHTML: p.value
|
|
3468
3447
|
}, null, 8, ["innerHTML"]))], 36));
|
|
3469
3448
|
}
|
|
3470
|
-
}),
|
|
3449
|
+
}), so = { class: "tpl:w-full" }, co = { class: "tpl:flex tpl:gap-0" }, lo = {
|
|
3471
3450
|
key: 0,
|
|
3472
3451
|
"data-testid": "section-drop-hint",
|
|
3473
3452
|
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)]"
|
|
3474
|
-
},
|
|
3453
|
+
}, uo = /* @__PURE__ */ B({
|
|
3475
3454
|
__name: "SectionBlock",
|
|
3476
3455
|
props: {
|
|
3477
3456
|
block: {},
|
|
@@ -3479,12 +3458,12 @@ var ro = /* @__PURE__ */ B({
|
|
|
3479
3458
|
},
|
|
3480
3459
|
setup(e) {
|
|
3481
3460
|
let t = {
|
|
3482
|
-
title:
|
|
3483
|
-
paragraph:
|
|
3484
|
-
image:
|
|
3485
|
-
button:
|
|
3486
|
-
divider:
|
|
3487
|
-
custom:
|
|
3461
|
+
title: oo,
|
|
3462
|
+
paragraph: Ua,
|
|
3463
|
+
image: Aa,
|
|
3464
|
+
button: Pr,
|
|
3465
|
+
divider: pa,
|
|
3466
|
+
custom: da
|
|
3488
3467
|
}, n = e, { t: r } = Y(), i = J(In, "SectionBlock"), a = v(zn, null), o = v(Wn, null), s = O(() => {
|
|
3489
3468
|
switch (n.block.columns) {
|
|
3490
3469
|
case "2": return ["50%", "50%"];
|
|
@@ -3511,7 +3490,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3511
3490
|
a[e] = r, i.updateBlock(n.block.id, { children: a });
|
|
3512
3491
|
}
|
|
3513
3492
|
function m(e) {
|
|
3514
|
-
return
|
|
3493
|
+
return Wa(e, o, t);
|
|
3515
3494
|
}
|
|
3516
3495
|
function g(e, t) {
|
|
3517
3496
|
e.type === "custom" && i.updateBlock(e.id, {
|
|
@@ -3519,7 +3498,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3519
3498
|
dataSourceFetched: t.dataSourceFetched
|
|
3520
3499
|
});
|
|
3521
3500
|
}
|
|
3522
|
-
return (t, n) => (f(), k("div",
|
|
3501
|
+
return (t, n) => (f(), k("div", so, [I("div", co, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
|
|
3523
3502
|
key: n,
|
|
3524
3503
|
class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3525
3504
|
style: L({ width: s.value[n] })
|
|
@@ -3541,7 +3520,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3541
3520
|
class: "tpl:min-h-[60px]",
|
|
3542
3521
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3543
3522
|
}, {
|
|
3544
|
-
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(
|
|
3523
|
+
default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(io, {
|
|
3545
3524
|
block: t,
|
|
3546
3525
|
"is-selected": j(i).state.selectedBlockId === t.id,
|
|
3547
3526
|
viewport: e.viewport,
|
|
@@ -3572,9 +3551,9 @@ var ro = /* @__PURE__ */ B({
|
|
|
3572
3551
|
"model-value",
|
|
3573
3552
|
"group",
|
|
3574
3553
|
"onUpdate:modelValue"
|
|
3575
|
-
]), u(n).length === 0 ? (f(), k("div",
|
|
3554
|
+
]), u(n).length === 0 ? (f(), k("div", lo, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
|
|
3576
3555
|
}
|
|
3577
|
-
}),
|
|
3556
|
+
}), fo = {
|
|
3578
3557
|
facebook: {
|
|
3579
3558
|
name: "Facebook",
|
|
3580
3559
|
color: "#1877F2",
|
|
@@ -3655,11 +3634,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3655
3634
|
color: "#1769FF",
|
|
3656
3635
|
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"
|
|
3657
3636
|
}
|
|
3658
|
-
},
|
|
3637
|
+
}, po = {
|
|
3659
3638
|
small: 24,
|
|
3660
3639
|
medium: 32,
|
|
3661
3640
|
large: 48
|
|
3662
|
-
},
|
|
3641
|
+
}, mo = [
|
|
3663
3642
|
"facebook",
|
|
3664
3643
|
"twitter",
|
|
3665
3644
|
"instagram",
|
|
@@ -3676,11 +3655,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3676
3655
|
"github",
|
|
3677
3656
|
"dribbble",
|
|
3678
3657
|
"behance"
|
|
3679
|
-
],
|
|
3658
|
+
], ho = [
|
|
3680
3659
|
"width",
|
|
3681
3660
|
"height",
|
|
3682
3661
|
"fill"
|
|
3683
|
-
],
|
|
3662
|
+
], go = ["d"], _o = /* @__PURE__ */ B({
|
|
3684
3663
|
__name: "SocialIconSvg",
|
|
3685
3664
|
props: {
|
|
3686
3665
|
platform: {},
|
|
@@ -3688,7 +3667,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3688
3667
|
iconSize: {}
|
|
3689
3668
|
},
|
|
3690
3669
|
setup(e) {
|
|
3691
|
-
let t = e, n = O(() =>
|
|
3670
|
+
let t = e, n = O(() => fo[t.platform]), r = O(() => po[t.iconSize]), i = O(() => {
|
|
3692
3671
|
let e = {
|
|
3693
3672
|
display: "inline-flex",
|
|
3694
3673
|
alignItems: "center",
|
|
@@ -3732,12 +3711,12 @@ var ro = /* @__PURE__ */ B({
|
|
|
3732
3711
|
viewBox: "0 0 24 24",
|
|
3733
3712
|
fill: o.value,
|
|
3734
3713
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3735
|
-
}, [I("path", { d: n.value.path }, null, 8,
|
|
3714
|
+
}, [I("path", { d: n.value.path }, null, 8, go)], 8, ho))], 4));
|
|
3736
3715
|
}
|
|
3737
|
-
}),
|
|
3716
|
+
}), vo = { class: "tpl:w-full" }, yo = ["href"], bo = {
|
|
3738
3717
|
key: 1,
|
|
3739
3718
|
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)]"
|
|
3740
|
-
},
|
|
3719
|
+
}, xo = /* @__PURE__ */ B({
|
|
3741
3720
|
__name: "SocialIconsBlock",
|
|
3742
3721
|
props: {
|
|
3743
3722
|
block: {},
|
|
@@ -3750,7 +3729,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3750
3729
|
gap: `${t.block.spacing}px`,
|
|
3751
3730
|
justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
|
|
3752
3731
|
})), i = O(() => t.block.icons.length > 0);
|
|
3753
|
-
return (t, a) => (f(), k("div",
|
|
3732
|
+
return (t, a) => (f(), k("div", vo, [i.value ? (f(), k("div", {
|
|
3754
3733
|
key: 0,
|
|
3755
3734
|
style: L(r.value)
|
|
3756
3735
|
}, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
|
|
@@ -3758,7 +3737,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3758
3737
|
href: t.url || "#",
|
|
3759
3738
|
class: "tpl:cursor-default",
|
|
3760
3739
|
onClick: a[0] ||= M(() => {}, ["prevent"])
|
|
3761
|
-
}, [V(
|
|
3740
|
+
}, [V(_o, {
|
|
3762
3741
|
platform: t.platform,
|
|
3763
3742
|
"icon-style": e.block.iconStyle,
|
|
3764
3743
|
"icon-size": e.block.iconSize
|
|
@@ -3766,16 +3745,16 @@ var ro = /* @__PURE__ */ B({
|
|
|
3766
3745
|
"platform",
|
|
3767
3746
|
"icon-style",
|
|
3768
3747
|
"icon-size"
|
|
3769
|
-
])], 8,
|
|
3748
|
+
])], 8, yo))), 128))], 4)) : (f(), k("div", bo, [V(j(bi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
|
|
3770
3749
|
}
|
|
3771
|
-
}),
|
|
3750
|
+
}), So = { class: "tpl:w-full" }, Co = {
|
|
3772
3751
|
key: 0,
|
|
3773
3752
|
class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
|
|
3774
3753
|
style: {
|
|
3775
3754
|
"background-color": "var(--tpl-bg-hover)",
|
|
3776
3755
|
color: "var(--tpl-text-dim)"
|
|
3777
3756
|
}
|
|
3778
|
-
},
|
|
3757
|
+
}, wo = /* @__PURE__ */ B({
|
|
3779
3758
|
__name: "SpacerBlock",
|
|
3780
3759
|
props: {
|
|
3781
3760
|
block: {},
|
|
@@ -3787,23 +3766,23 @@ var ro = /* @__PURE__ */ B({
|
|
|
3787
3766
|
minHeight: `${t.block.height}px`,
|
|
3788
3767
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3789
3768
|
}));
|
|
3790
|
-
return (t, i) => (f(), k("div",
|
|
3769
|
+
return (t, i) => (f(), k("div", So, [I("div", {
|
|
3791
3770
|
style: L(r.value),
|
|
3792
3771
|
class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
|
|
3793
|
-
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span",
|
|
3772
|
+
}, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Co, D(e.block.height) + "px ", 1))], 6)]));
|
|
3794
3773
|
}
|
|
3795
|
-
}),
|
|
3774
|
+
}), To = { class: "tpl:w-full" }, Eo = { key: 0 }, Do = [
|
|
3796
3775
|
"aria-label",
|
|
3797
3776
|
"data-placeholder",
|
|
3798
3777
|
"onBlur"
|
|
3799
|
-
],
|
|
3778
|
+
], Oo = [
|
|
3800
3779
|
"aria-label",
|
|
3801
3780
|
"data-placeholder",
|
|
3802
3781
|
"onBlur"
|
|
3803
|
-
],
|
|
3782
|
+
], ko = {
|
|
3804
3783
|
key: 1,
|
|
3805
3784
|
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)]"
|
|
3806
|
-
},
|
|
3785
|
+
}, Ao = /*#__PURE__*/ Fi(/* @__PURE__ */ B({
|
|
3807
3786
|
__name: "TableBlock",
|
|
3808
3787
|
props: {
|
|
3809
3788
|
block: {},
|
|
@@ -3846,11 +3825,11 @@ var ro = /* @__PURE__ */ B({
|
|
|
3846
3825
|
} : n);
|
|
3847
3826
|
i.updateBlock(n.block.id, { rows: o });
|
|
3848
3827
|
}
|
|
3849
|
-
return (e, n) => (f(), k("div",
|
|
3828
|
+
return (e, n) => (f(), k("div", To, [a.value ? (f(), k("table", {
|
|
3850
3829
|
key: 0,
|
|
3851
3830
|
style: L(o.value),
|
|
3852
3831
|
class: "tpl-table-editable"
|
|
3853
|
-
}, [u.value ? (f(), k("thead",
|
|
3832
|
+
}, [u.value ? (f(), k("thead", Eo, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
|
|
3854
3833
|
key: e.id,
|
|
3855
3834
|
style: L(l.value),
|
|
3856
3835
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -3859,7 +3838,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3859
3838
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3860
3839
|
onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3861
3840
|
onClick: M(p, ["stop"])
|
|
3862
|
-
}, null, 44,
|
|
3841
|
+
}, null, 44, Do)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
|
|
3863
3842
|
key: i.id,
|
|
3864
3843
|
style: L(s.value),
|
|
3865
3844
|
"aria-label": j(r).table.cellPlaceholder,
|
|
@@ -3868,9 +3847,9 @@ var ro = /* @__PURE__ */ B({
|
|
|
3868
3847
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3869
3848
|
onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3870
3849
|
onClick: M(p, ["stop"])
|
|
3871
|
-
}, null, 44,
|
|
3850
|
+
}, null, 44, Oo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", ko, [V(j(wi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
|
|
3872
3851
|
}
|
|
3873
|
-
}), [["__scopeId", "data-v-de1a7c76"]]),
|
|
3852
|
+
}), [["__scopeId", "data-v-de1a7c76"]]), jo = /* @__PURE__ */ B({
|
|
3874
3853
|
__name: "VideoPlayButton",
|
|
3875
3854
|
props: { hoverEffect: {
|
|
3876
3855
|
type: Boolean,
|
|
@@ -3888,7 +3867,7 @@ var ro = /* @__PURE__ */ B({
|
|
|
3888
3867
|
});
|
|
3889
3868
|
//#endregion
|
|
3890
3869
|
//#region src/utils/videoThumbnail.ts
|
|
3891
|
-
function
|
|
3870
|
+
function Mo(e) {
|
|
3892
3871
|
if (!e) return {
|
|
3893
3872
|
platform: "unknown",
|
|
3894
3873
|
videoId: null,
|
|
@@ -3920,25 +3899,25 @@ function ko(e) {
|
|
|
3920
3899
|
thumbnailUrl: null
|
|
3921
3900
|
};
|
|
3922
3901
|
}
|
|
3923
|
-
function
|
|
3924
|
-
return t ||
|
|
3902
|
+
function No(e, t) {
|
|
3903
|
+
return t || Mo(e).thumbnailUrl;
|
|
3925
3904
|
}
|
|
3926
3905
|
//#endregion
|
|
3927
3906
|
//#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3928
|
-
var
|
|
3907
|
+
var Po = ["src", "alt"], Fo = {
|
|
3929
3908
|
class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
|
|
3930
3909
|
style: { opacity: "0.7" }
|
|
3931
|
-
},
|
|
3910
|
+
}, Io = ["href"], Lo = ["src", "alt"], Ro = ["src", "alt"], zo = {
|
|
3932
3911
|
key: 3,
|
|
3933
3912
|
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)]"
|
|
3934
|
-
},
|
|
3913
|
+
}, Bo = /* @__PURE__ */ B({
|
|
3935
3914
|
__name: "VideoBlock",
|
|
3936
3915
|
props: {
|
|
3937
3916
|
block: {},
|
|
3938
3917
|
viewport: {}
|
|
3939
3918
|
},
|
|
3940
3919
|
setup(e) {
|
|
3941
|
-
let t = e, { t: n } = Y(), { syntax: r } =
|
|
3920
|
+
let t = e, { t: n } = Y(), { syntax: r } = Ki(), i = O(() => vt(t.block.url, r) || vt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : No(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
|
|
3942
3921
|
let e = t.block.align;
|
|
3943
3922
|
return {
|
|
3944
3923
|
maxWidth: "100%",
|
|
@@ -3959,16 +3938,16 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3959
3938
|
class: "tpl:w-full tpl:border-0",
|
|
3960
3939
|
src: e.block.placeholderUrl,
|
|
3961
3940
|
alt: e.block.alt
|
|
3962
|
-
}, null, 8,
|
|
3941
|
+
}, null, 8, Po), V(jo)], 4)) : i.value ? (f(), k("div", {
|
|
3963
3942
|
key: 1,
|
|
3964
3943
|
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)]",
|
|
3965
3944
|
style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3966
|
-
}, [V(j(
|
|
3945
|
+
}, [V(j(ki), {
|
|
3967
3946
|
size: 36,
|
|
3968
3947
|
"stroke-width": 1.5,
|
|
3969
3948
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3970
3949
|
style: { opacity: "0.5" }
|
|
3971
|
-
}), I("span",
|
|
3950
|
+
}), I("span", Fo, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
|
|
3972
3951
|
key: 0,
|
|
3973
3952
|
href: e.block.url,
|
|
3974
3953
|
target: "_blank",
|
|
@@ -3980,7 +3959,7 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3980
3959
|
class: "tpl:w-full tpl:border-0",
|
|
3981
3960
|
src: a.value,
|
|
3982
3961
|
alt: e.block.alt
|
|
3983
|
-
}, null, 8,
|
|
3962
|
+
}, null, 8, Lo), V(jo, { "hover-effect": "" })], 12, Io)) : (f(), k("div", {
|
|
3984
3963
|
key: 1,
|
|
3985
3964
|
class: "tpl:relative tpl:inline-block",
|
|
3986
3965
|
style: L(s.value)
|
|
@@ -3988,31 +3967,31 @@ var jo = ["src", "alt"], Mo = {
|
|
|
3988
3967
|
class: "tpl:w-full tpl:border-0",
|
|
3989
3968
|
src: a.value,
|
|
3990
3969
|
alt: e.block.alt
|
|
3991
|
-
}, null, 8,
|
|
3970
|
+
}, null, 8, Ro), V(jo)], 4))], 64)) : (f(), k("div", zo, [V(j(ki), {
|
|
3992
3971
|
size: 40,
|
|
3993
3972
|
"stroke-width": 1.5,
|
|
3994
3973
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3995
3974
|
}), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
|
|
3996
3975
|
}
|
|
3997
|
-
}),
|
|
3998
|
-
section:
|
|
3999
|
-
title:
|
|
4000
|
-
paragraph:
|
|
4001
|
-
image:
|
|
4002
|
-
button:
|
|
4003
|
-
divider:
|
|
4004
|
-
video:
|
|
4005
|
-
social:
|
|
4006
|
-
menu:
|
|
4007
|
-
table:
|
|
4008
|
-
spacer:
|
|
4009
|
-
html:
|
|
4010
|
-
countdown: T(() => import("./CountdownBlock-
|
|
3976
|
+
}), Vo = {
|
|
3977
|
+
section: uo,
|
|
3978
|
+
title: oo,
|
|
3979
|
+
paragraph: Ua,
|
|
3980
|
+
image: Aa,
|
|
3981
|
+
button: Pr,
|
|
3982
|
+
divider: pa,
|
|
3983
|
+
video: Bo,
|
|
3984
|
+
social: xo,
|
|
3985
|
+
menu: Pa,
|
|
3986
|
+
table: Ao,
|
|
3987
|
+
spacer: wo,
|
|
3988
|
+
html: va,
|
|
3989
|
+
countdown: T(() => import("./CountdownBlock-PpH3fxAX.js").then((e) => e.n))
|
|
4011
3990
|
};
|
|
4012
|
-
function
|
|
3991
|
+
function Ho(e) {
|
|
4013
3992
|
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
|
|
4014
3993
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
4015
|
-
let { resolvedTheme: c } =
|
|
3994
|
+
let { resolvedTheme: c } = vr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = br({
|
|
4016
3995
|
themeOverrides: u,
|
|
4017
3996
|
resolvedTheme: c,
|
|
4018
3997
|
extraStyles: e.themeExtraStyles
|
|
@@ -4037,13 +4016,13 @@ function zo(e) {
|
|
|
4037
4016
|
g && (_ = H(f.isNavigating, (e) => {
|
|
4038
4017
|
e ? g.pause() : g.resume();
|
|
4039
4018
|
}));
|
|
4040
|
-
let v =
|
|
4019
|
+
let v = _r(t, {
|
|
4041
4020
|
t: a,
|
|
4042
4021
|
format: o
|
|
4043
|
-
}), y =
|
|
4044
|
-
if (
|
|
4022
|
+
}), y = wr();
|
|
4023
|
+
if (kr(y, Vo), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, da);
|
|
4045
4024
|
function b(e) {
|
|
4046
|
-
for (let t of e) y.registerCustom(t,
|
|
4025
|
+
for (let t of e) y.registerCustom(t, da);
|
|
4047
4026
|
}
|
|
4048
4027
|
let x = Pn();
|
|
4049
4028
|
if (s() && l(x.dispose), e.containerEl) {
|
|
@@ -4054,7 +4033,7 @@ function zo(e) {
|
|
|
4054
4033
|
}, { capture: !0 });
|
|
4055
4034
|
}
|
|
4056
4035
|
function S(r) {
|
|
4057
|
-
x.isActive() &&
|
|
4036
|
+
x.isActive() && jr(r, {
|
|
4058
4037
|
history: f,
|
|
4059
4038
|
selectBlock: (e) => t.selectBlock(e),
|
|
4060
4039
|
getSelectedBlockId: () => t.state.selectedBlockId,
|
|
@@ -4065,17 +4044,17 @@ function zo(e) {
|
|
|
4065
4044
|
}
|
|
4066
4045
|
q(document, "keydown", S);
|
|
4067
4046
|
let w = C(null);
|
|
4068
|
-
p(
|
|
4047
|
+
p(ar, e.editorRoot ?? document), p(or, w), p(Fn, r), p(In, t), p(Ln, f), p(Rn, m), p(zn, h), p(Bn, i), p(Vn, d), p(Hn, c), p(Un, n.blockDefaults), p(Wn, y), p(Gn, n.customBlocks ?? []), p(Kn, n.paletteBlocks), p(qn, Tr(t.content, y));
|
|
4069
4048
|
let ee = pt(n.mergeTags?.syntax);
|
|
4070
|
-
p(
|
|
4071
|
-
let T =
|
|
4049
|
+
p(Jn, n.mergeTags?.tags ?? []), p(Yn, ee), p(Xn, n.mergeTags?.onRequest ?? null), p(Zn, n.mergeTags?.autocomplete !== !1), p(Qn, pr()), p($n, n.onRequestMedia ?? null), p(er, n.displayConditions?.conditions ?? []), p(tr, n.displayConditions?.allowCustom ?? !1), p(nr, e.capabilities ?? {}), p(rr, v);
|
|
4050
|
+
let T = mr(n.lint) ? null : hr({
|
|
4072
4051
|
content: t.content,
|
|
4073
4052
|
options: n.lint ?? {},
|
|
4074
4053
|
updateBlock: t.updateBlock,
|
|
4075
4054
|
updateSettings: t.updateSettings,
|
|
4076
4055
|
removeBlock: t.removeBlock
|
|
4077
4056
|
});
|
|
4078
|
-
p(
|
|
4057
|
+
p(ir, T);
|
|
4079
4058
|
function E() {
|
|
4080
4059
|
_?.(), T?.destroy(), g?.destroy(), f.destroy();
|
|
4081
4060
|
}
|
|
@@ -4099,19 +4078,19 @@ function zo(e) {
|
|
|
4099
4078
|
}
|
|
4100
4079
|
//#endregion
|
|
4101
4080
|
//#region src/composables/usePopoverRoot.ts
|
|
4102
|
-
function
|
|
4103
|
-
return v(
|
|
4081
|
+
function Uo() {
|
|
4082
|
+
return v(or, C(null));
|
|
4104
4083
|
}
|
|
4105
4084
|
//#endregion
|
|
4106
4085
|
//#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
4107
|
-
var
|
|
4086
|
+
var Wo = ["data-tpl-theme"], Go = /* @__PURE__ */ B({
|
|
4108
4087
|
__name: "TplModal",
|
|
4109
4088
|
props: { visible: { type: Boolean } },
|
|
4110
4089
|
emits: ["close", "keydown"],
|
|
4111
4090
|
setup(e, { emit: t }) {
|
|
4112
4091
|
let n = e, r = t, i = C(null);
|
|
4113
|
-
|
|
4114
|
-
let a = v(Hn), s =
|
|
4092
|
+
Hi(i, O(() => n.visible));
|
|
4093
|
+
let a = v(Hn), s = Uo();
|
|
4115
4094
|
function c(e) {
|
|
4116
4095
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
4117
4096
|
}
|
|
@@ -4140,11 +4119,11 @@ var Vo = ["data-tpl-theme"], Ho = /* @__PURE__ */ B({
|
|
|
4140
4119
|
}, [I("div", {
|
|
4141
4120
|
ref_key: "dialogRef",
|
|
4142
4121
|
ref: i
|
|
4143
|
-
}, [o(t.$slots, "default")], 512)], 40,
|
|
4122
|
+
}, [o(t.$slots, "default")], 512)], 40, Wo)) : A("", !0)]),
|
|
4144
4123
|
_: 3
|
|
4145
4124
|
})], 8, ["to"])) : A("", !0);
|
|
4146
4125
|
}
|
|
4147
|
-
}),
|
|
4126
|
+
}), Ko = class e {
|
|
4148
4127
|
static DEFAULT_BASE_URL = "https://templatical.com";
|
|
4149
4128
|
accessToken = null;
|
|
4150
4129
|
expiresAt = null;
|
|
@@ -4245,8 +4224,8 @@ var Vo = ["data-tpl-theme"], Ho = /* @__PURE__ */ B({
|
|
|
4245
4224
|
return a.status === 401 && (a = await i(await this.refreshToken())), a;
|
|
4246
4225
|
}
|
|
4247
4226
|
};
|
|
4248
|
-
function
|
|
4249
|
-
return e.mode === "direct" ? new
|
|
4227
|
+
function qo(e, t) {
|
|
4228
|
+
return e.mode === "direct" ? new Ko({
|
|
4250
4229
|
url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
|
|
4251
4230
|
baseUrl: e.baseUrl,
|
|
4252
4231
|
requestOptions: {
|
|
@@ -4260,7 +4239,7 @@ function Wo(e, t) {
|
|
|
4260
4239
|
}
|
|
4261
4240
|
},
|
|
4262
4241
|
onError: t
|
|
4263
|
-
}) : new
|
|
4242
|
+
}) : new Ko({
|
|
4264
4243
|
url: e.url,
|
|
4265
4244
|
baseUrl: e.baseUrl,
|
|
4266
4245
|
requestOptions: e.requestOptions,
|
|
@@ -4272,16 +4251,16 @@ function Wo(e, t) {
|
|
|
4272
4251
|
function Z(e, t) {
|
|
4273
4252
|
return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
|
|
4274
4253
|
}
|
|
4275
|
-
var
|
|
4254
|
+
var Jo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Jo}/templates/{template}`, Yo = `${Q}/ai`, Xo = `${Jo}/media`, Zo = `${Xo}/folders`, Qo = `${Jo}/saved-modules`, $ = {
|
|
4276
4255
|
health: "/api/v1/health",
|
|
4277
|
-
"projects.config": `${
|
|
4278
|
-
"broadcasting.auth": `${
|
|
4279
|
-
"templates.store": `${
|
|
4256
|
+
"projects.config": `${Jo}/config`,
|
|
4257
|
+
"broadcasting.auth": `${Jo}/broadcasting/auth`,
|
|
4258
|
+
"templates.store": `${Jo}/templates`,
|
|
4280
4259
|
"templates.show": `${Q}`,
|
|
4281
4260
|
"templates.update": `${Q}`,
|
|
4282
4261
|
"templates.destroy": `${Q}`,
|
|
4283
4262
|
"templates.export": `${Q}/export`,
|
|
4284
|
-
"templates.importFromBeefree": `${
|
|
4263
|
+
"templates.importFromBeefree": `${Jo}/templates/import/from-beefree`,
|
|
4285
4264
|
"templates.sendTestEmail": `${Q}/send-test-email`,
|
|
4286
4265
|
"snapshots.index": `${Q}/snapshots`,
|
|
4287
4266
|
"snapshots.store": `${Q}/snapshots`,
|
|
@@ -4292,31 +4271,31 @@ var Go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Go}/templates/{te
|
|
|
4292
4271
|
"comments.update": `${Q}/comments/{comment}`,
|
|
4293
4272
|
"comments.destroy": `${Q}/comments/{comment}`,
|
|
4294
4273
|
"comments.resolve": `${Q}/comments/{comment}/resolve`,
|
|
4295
|
-
"ai.generate": `${
|
|
4296
|
-
"ai.conversationMessages": `${
|
|
4297
|
-
"ai.suggestions": `${
|
|
4298
|
-
"ai.rewriteText": `${
|
|
4299
|
-
"ai.score": `${
|
|
4300
|
-
"ai.fixFinding": `${
|
|
4301
|
-
"ai.generateFromDesign": `${
|
|
4302
|
-
"media.upload": `${
|
|
4303
|
-
"media.browse": `${
|
|
4304
|
-
"media.delete": `${
|
|
4305
|
-
"media.move": `${
|
|
4306
|
-
"media.update": `${
|
|
4307
|
-
"media.replace": `${
|
|
4308
|
-
"media.checkUsage": `${
|
|
4309
|
-
"media.frequentlyUsed": `${
|
|
4310
|
-
"media.importFromUrl": `${
|
|
4311
|
-
"folders.index": `${
|
|
4312
|
-
"folders.store": `${
|
|
4313
|
-
"folders.update": `${
|
|
4314
|
-
"folders.destroy": `${
|
|
4315
|
-
"savedModules.index": `${
|
|
4316
|
-
"savedModules.store": `${
|
|
4317
|
-
"savedModules.update": `${
|
|
4318
|
-
"savedModules.destroy": `${
|
|
4319
|
-
},
|
|
4274
|
+
"ai.generate": `${Yo}/generate`,
|
|
4275
|
+
"ai.conversationMessages": `${Yo}/conversation-messages`,
|
|
4276
|
+
"ai.suggestions": `${Yo}/suggestions`,
|
|
4277
|
+
"ai.rewriteText": `${Yo}/rewrite-text`,
|
|
4278
|
+
"ai.score": `${Yo}/score`,
|
|
4279
|
+
"ai.fixFinding": `${Yo}/fix-finding`,
|
|
4280
|
+
"ai.generateFromDesign": `${Yo}/generate-from-design`,
|
|
4281
|
+
"media.upload": `${Xo}/upload`,
|
|
4282
|
+
"media.browse": `${Xo}/browse`,
|
|
4283
|
+
"media.delete": `${Xo}/delete`,
|
|
4284
|
+
"media.move": `${Xo}/move`,
|
|
4285
|
+
"media.update": `${Xo}/{media}`,
|
|
4286
|
+
"media.replace": `${Xo}/{media}/replace`,
|
|
4287
|
+
"media.checkUsage": `${Xo}/check-usage`,
|
|
4288
|
+
"media.frequentlyUsed": `${Xo}/frequently-used`,
|
|
4289
|
+
"media.importFromUrl": `${Xo}/import-from-url`,
|
|
4290
|
+
"folders.index": `${Zo}`,
|
|
4291
|
+
"folders.store": `${Zo}`,
|
|
4292
|
+
"folders.update": `${Zo}/{mediaFolder}`,
|
|
4293
|
+
"folders.destroy": `${Zo}/{mediaFolder}`,
|
|
4294
|
+
"savedModules.index": `${Qo}`,
|
|
4295
|
+
"savedModules.store": `${Qo}`,
|
|
4296
|
+
"savedModules.update": `${Qo}/{savedModule}`,
|
|
4297
|
+
"savedModules.destroy": `${Qo}/{savedModule}`
|
|
4298
|
+
}, $o = class {
|
|
4320
4299
|
authManager;
|
|
4321
4300
|
constructor(e) {
|
|
4322
4301
|
this.authManager = e;
|
|
@@ -4502,14 +4481,14 @@ var Go = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Go}/templates/{te
|
|
|
4502
4481
|
};
|
|
4503
4482
|
//#endregion
|
|
4504
4483
|
//#region ../core/src/cloud/websocket-client.ts
|
|
4505
|
-
function
|
|
4484
|
+
function es(e) {
|
|
4506
4485
|
return {
|
|
4507
4486
|
host: e.host,
|
|
4508
4487
|
port: e.port,
|
|
4509
4488
|
appKey: e.app_key
|
|
4510
4489
|
};
|
|
4511
4490
|
}
|
|
4512
|
-
var
|
|
4491
|
+
var ts = class {
|
|
4513
4492
|
pusher = null;
|
|
4514
4493
|
authManager;
|
|
4515
4494
|
config;
|
|
@@ -4576,7 +4555,7 @@ var Qo = class {
|
|
|
4576
4555
|
};
|
|
4577
4556
|
//#endregion
|
|
4578
4557
|
//#region ../core/src/cloud/mcp-operation-handler.ts
|
|
4579
|
-
function
|
|
4558
|
+
function ns(e, t) {
|
|
4580
4559
|
let { operation: n, data: r } = t;
|
|
4581
4560
|
switch (n) {
|
|
4582
4561
|
case "add_block":
|
|
@@ -4604,11 +4583,11 @@ function $o(e, t) {
|
|
|
4604
4583
|
}
|
|
4605
4584
|
//#endregion
|
|
4606
4585
|
//#region ../core/src/cloud/editor.ts
|
|
4607
|
-
function
|
|
4586
|
+
function rs(e) {
|
|
4608
4587
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
4609
4588
|
}
|
|
4610
|
-
function
|
|
4611
|
-
let t = new
|
|
4589
|
+
function is(e) {
|
|
4590
|
+
let t = new $o(e.authManager), n = S({
|
|
4612
4591
|
template: null,
|
|
4613
4592
|
content: Ue(e.defaultFontFamily, e.templateDefaults),
|
|
4614
4593
|
selectedBlockId: null,
|
|
@@ -4714,7 +4693,7 @@ function ts(e) {
|
|
|
4714
4693
|
let l;
|
|
4715
4694
|
if (r) {
|
|
4716
4695
|
let e = o(n.content.blocks, r);
|
|
4717
|
-
if (!e || e.type !== "section" || i < 0 || i >=
|
|
4696
|
+
if (!e || e.type !== "section" || i < 0 || i >= rs(e.columns)) return;
|
|
4718
4697
|
e.children[i] = e.children[i] || [], l = e.children[i];
|
|
4719
4698
|
} else l = n.content.blocks;
|
|
4720
4699
|
let [u] = a.blocks.splice(c, 1);
|
|
@@ -4806,11 +4785,11 @@ function ts(e) {
|
|
|
4806
4785
|
}
|
|
4807
4786
|
//#endregion
|
|
4808
4787
|
//#region ../core/src/cloud/ai-chat.ts
|
|
4809
|
-
var
|
|
4810
|
-
function
|
|
4811
|
-
return `msg_${Date.now()}_${++
|
|
4788
|
+
var as = 0;
|
|
4789
|
+
function os() {
|
|
4790
|
+
return `msg_${Date.now()}_${++as}`;
|
|
4812
4791
|
}
|
|
4813
|
-
function
|
|
4792
|
+
function ss(e) {
|
|
4814
4793
|
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);
|
|
4815
4794
|
function _(e, t) {
|
|
4816
4795
|
let n = a.value.findIndex((t) => t.id === e);
|
|
@@ -4904,14 +4883,14 @@ function is(e) {
|
|
|
4904
4883
|
let v = n();
|
|
4905
4884
|
if (!v) throw Error("Template must be saved before using AI generation");
|
|
4906
4885
|
o.value = !0, c.value = null, l.value = null, h.value = [];
|
|
4907
|
-
let y =
|
|
4886
|
+
let y = os();
|
|
4908
4887
|
a.value = [...a.value, {
|
|
4909
4888
|
id: y,
|
|
4910
4889
|
role: "user",
|
|
4911
4890
|
content: e,
|
|
4912
4891
|
timestamp: Date.now()
|
|
4913
4892
|
}];
|
|
4914
|
-
let b =
|
|
4893
|
+
let b = os();
|
|
4915
4894
|
a.value = [...a.value, {
|
|
4916
4895
|
id: b,
|
|
4917
4896
|
role: "assistant",
|
|
@@ -5002,7 +4981,7 @@ function is(e) {
|
|
|
5002
4981
|
}
|
|
5003
4982
|
//#endregion
|
|
5004
4983
|
//#region ../core/src/cloud/ai-config.ts
|
|
5005
|
-
function
|
|
4984
|
+
function cs(e) {
|
|
5006
4985
|
function t(t) {
|
|
5007
4986
|
return e === !1 ? !1 : e?.[t] !== !1;
|
|
5008
4987
|
}
|
|
@@ -5013,7 +4992,7 @@ function as(e) {
|
|
|
5013
4992
|
}
|
|
5014
4993
|
//#endregion
|
|
5015
4994
|
//#region ../core/src/cloud/template-scoring.ts
|
|
5016
|
-
function
|
|
4995
|
+
function ls(e) {
|
|
5017
4996
|
let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
|
|
5018
4997
|
async function l(e, o) {
|
|
5019
4998
|
let s = n();
|
|
@@ -5158,7 +5137,7 @@ function os(e) {
|
|
|
5158
5137
|
}
|
|
5159
5138
|
//#endregion
|
|
5160
5139
|
//#region ../core/src/cloud/design-reference.ts
|
|
5161
|
-
function
|
|
5140
|
+
function us(e) {
|
|
5162
5141
|
let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
|
|
5163
5142
|
async function s(e) {
|
|
5164
5143
|
let s = n();
|
|
@@ -5221,8 +5200,8 @@ function ss(e) {
|
|
|
5221
5200
|
}
|
|
5222
5201
|
//#endregion
|
|
5223
5202
|
//#region ../core/src/cloud/comments.ts
|
|
5224
|
-
function
|
|
5225
|
-
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new
|
|
5203
|
+
function ds(e) {
|
|
5204
|
+
let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new $o(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
|
|
5226
5205
|
let e = 0;
|
|
5227
5206
|
for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
|
|
5228
5207
|
return e;
|
|
@@ -5421,17 +5400,17 @@ function cs(e) {
|
|
|
5421
5400
|
}
|
|
5422
5401
|
//#endregion
|
|
5423
5402
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5424
|
-
function
|
|
5403
|
+
function fs(e) {
|
|
5425
5404
|
let { comments: t, channel: n } = e;
|
|
5426
5405
|
H(n, (e, n) => {
|
|
5427
5406
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5428
|
-
|
|
5407
|
+
ps(t, e);
|
|
5429
5408
|
});
|
|
5430
5409
|
}), l(() => {
|
|
5431
5410
|
n.value?.unbind("comment-broadcast");
|
|
5432
5411
|
});
|
|
5433
5412
|
}
|
|
5434
|
-
function
|
|
5413
|
+
function ps(e, t) {
|
|
5435
5414
|
switch (t.action) {
|
|
5436
5415
|
case "comment_created":
|
|
5437
5416
|
e.applyRemoteCreate(t.comment);
|
|
@@ -5450,7 +5429,7 @@ function us(e, t) {
|
|
|
5450
5429
|
}
|
|
5451
5430
|
//#endregion
|
|
5452
5431
|
//#region ../core/src/cloud/collaboration.ts
|
|
5453
|
-
var
|
|
5432
|
+
var ms = [
|
|
5454
5433
|
"pusher:member_added",
|
|
5455
5434
|
"pusher:member_removed",
|
|
5456
5435
|
"client-block_locked",
|
|
@@ -5458,10 +5437,10 @@ var ds = [
|
|
|
5458
5437
|
"client-operation",
|
|
5459
5438
|
"mcp-operation"
|
|
5460
5439
|
];
|
|
5461
|
-
function
|
|
5462
|
-
for (let t of
|
|
5440
|
+
function hs(e) {
|
|
5441
|
+
for (let t of ms) e.unbind(t);
|
|
5463
5442
|
}
|
|
5464
|
-
var
|
|
5443
|
+
var gs = [
|
|
5465
5444
|
"#3b82f6",
|
|
5466
5445
|
"#ef4444",
|
|
5467
5446
|
"#10b981",
|
|
@@ -5473,10 +5452,10 @@ var ps = [
|
|
|
5473
5452
|
"#6366f1",
|
|
5474
5453
|
"#14b8a6"
|
|
5475
5454
|
];
|
|
5476
|
-
function
|
|
5455
|
+
function _s(e) {
|
|
5477
5456
|
let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
|
|
5478
5457
|
function u() {
|
|
5479
|
-
let e =
|
|
5458
|
+
let e = gs[o % gs.length];
|
|
5480
5459
|
return o++, e;
|
|
5481
5460
|
}
|
|
5482
5461
|
function d(e) {
|
|
@@ -5518,7 +5497,7 @@ function ms(e) {
|
|
|
5518
5497
|
function h(e) {
|
|
5519
5498
|
s = !0;
|
|
5520
5499
|
try {
|
|
5521
|
-
|
|
5500
|
+
ns(n, e);
|
|
5522
5501
|
} finally {
|
|
5523
5502
|
s = !1;
|
|
5524
5503
|
}
|
|
@@ -5538,7 +5517,7 @@ function ms(e) {
|
|
|
5538
5517
|
return H(() => n.state.selectedBlockId, (e, t) => {
|
|
5539
5518
|
s || (t && v(t), e && _(e));
|
|
5540
5519
|
}), H(r, (t, n) => {
|
|
5541
|
-
if (n &&
|
|
5520
|
+
if (n && hs(n), !t) {
|
|
5542
5521
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5543
5522
|
return;
|
|
5544
5523
|
}
|
|
@@ -5570,7 +5549,7 @@ function ms(e) {
|
|
|
5570
5549
|
h(e);
|
|
5571
5550
|
});
|
|
5572
5551
|
}), l(() => {
|
|
5573
|
-
r.value &&
|
|
5552
|
+
r.value && hs(r.value);
|
|
5574
5553
|
}), {
|
|
5575
5554
|
collaborators: i,
|
|
5576
5555
|
lockedBlocks: a,
|
|
@@ -5580,7 +5559,7 @@ function ms(e) {
|
|
|
5580
5559
|
}
|
|
5581
5560
|
//#endregion
|
|
5582
5561
|
//#region ../core/src/cloud/collaboration-broadcast.ts
|
|
5583
|
-
function
|
|
5562
|
+
function vs(e, t) {
|
|
5584
5563
|
let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
|
|
5585
5564
|
e.addBlock = (e, r, i, a) => {
|
|
5586
5565
|
n(e, r, i, a), t._broadcastOperation({
|
|
@@ -5635,11 +5614,11 @@ function hs(e, t) {
|
|
|
5635
5614
|
}
|
|
5636
5615
|
//#endregion
|
|
5637
5616
|
//#region ../core/src/cloud/web-socket.ts
|
|
5638
|
-
function
|
|
5617
|
+
function ys(e) {
|
|
5639
5618
|
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
|
|
5640
5619
|
async function s(e, s) {
|
|
5641
5620
|
if (a) return;
|
|
5642
|
-
a = new
|
|
5621
|
+
a = new ts({
|
|
5643
5622
|
authManager: t,
|
|
5644
5623
|
config: s,
|
|
5645
5624
|
onError: n
|
|
@@ -5667,8 +5646,8 @@ function gs(e) {
|
|
|
5667
5646
|
}
|
|
5668
5647
|
//#endregion
|
|
5669
5648
|
//#region ../core/src/cloud/saved-modules.ts
|
|
5670
|
-
function
|
|
5671
|
-
let t = new
|
|
5649
|
+
function bs(e) {
|
|
5650
|
+
let t = new $o(e.authManager), n = C([]), r = C(!1);
|
|
5672
5651
|
async function i(i) {
|
|
5673
5652
|
r.value = !0;
|
|
5674
5653
|
try {
|
|
@@ -5716,8 +5695,8 @@ function _s(e) {
|
|
|
5716
5695
|
}
|
|
5717
5696
|
//#endregion
|
|
5718
5697
|
//#region ../core/src/cloud/snapshots.ts
|
|
5719
|
-
function
|
|
5720
|
-
let t = new
|
|
5698
|
+
function xs(e) {
|
|
5699
|
+
let t = new $o(e.authManager), n = C([]), r = C(!1), i = C(!1);
|
|
5721
5700
|
async function a() {
|
|
5722
5701
|
r.value = !0;
|
|
5723
5702
|
try {
|
|
@@ -5749,8 +5728,8 @@ function vs(e) {
|
|
|
5749
5728
|
}
|
|
5750
5729
|
//#endregion
|
|
5751
5730
|
//#region ../core/src/cloud/test-email.ts
|
|
5752
|
-
function
|
|
5753
|
-
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new
|
|
5731
|
+
function Ss(e) {
|
|
5732
|
+
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new $o(t), l = C(!1), u = C(null), d = C(null);
|
|
5754
5733
|
o && H(o, (e) => {
|
|
5755
5734
|
e && (d.value = t.testEmailConfig);
|
|
5756
5735
|
}, { immediate: !0 });
|
|
@@ -5786,8 +5765,8 @@ function ys(e) {
|
|
|
5786
5765
|
}
|
|
5787
5766
|
//#endregion
|
|
5788
5767
|
//#region ../core/src/cloud/export.ts
|
|
5789
|
-
function
|
|
5790
|
-
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new
|
|
5768
|
+
function Cs(e) {
|
|
5769
|
+
let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new $o(t);
|
|
5791
5770
|
function a() {
|
|
5792
5771
|
let e = n?.();
|
|
5793
5772
|
return {
|
|
@@ -5813,8 +5792,8 @@ function bs(e) {
|
|
|
5813
5792
|
}
|
|
5814
5793
|
//#endregion
|
|
5815
5794
|
//#region ../core/src/cloud/plan-config.ts
|
|
5816
|
-
function
|
|
5817
|
-
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new
|
|
5795
|
+
function ws(e) {
|
|
5796
|
+
let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new $o(t), o = O(() => r.value?.features ?? null);
|
|
5818
5797
|
function s(e) {
|
|
5819
5798
|
return r.value?.features[e] ?? !1;
|
|
5820
5799
|
}
|
|
@@ -5840,11 +5819,11 @@ function xs(e) {
|
|
|
5840
5819
|
}
|
|
5841
5820
|
//#endregion
|
|
5842
5821
|
//#region ../core/src/cloud/health-check.ts
|
|
5843
|
-
var
|
|
5844
|
-
function
|
|
5822
|
+
var Ts = 5e3;
|
|
5823
|
+
function Es(e) {
|
|
5845
5824
|
return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
|
|
5846
5825
|
}
|
|
5847
|
-
async function
|
|
5826
|
+
async function Ds(e, t) {
|
|
5848
5827
|
let n = performance.now();
|
|
5849
5828
|
try {
|
|
5850
5829
|
let r = t ? await t.authenticatedFetch($.health, {
|
|
@@ -5896,7 +5875,7 @@ async function ws(e, t) {
|
|
|
5896
5875
|
};
|
|
5897
5876
|
}
|
|
5898
5877
|
}
|
|
5899
|
-
async function
|
|
5878
|
+
async function Os(e) {
|
|
5900
5879
|
if (!e?.host || !e?.app_key) return {
|
|
5901
5880
|
ok: !1,
|
|
5902
5881
|
error: "WebSocket configuration not available"
|
|
@@ -5912,7 +5891,7 @@ async function Ts(e) {
|
|
|
5912
5891
|
ok: !1,
|
|
5913
5892
|
error: "WebSocket connection timed out"
|
|
5914
5893
|
});
|
|
5915
|
-
},
|
|
5894
|
+
}, Ts);
|
|
5916
5895
|
try {
|
|
5917
5896
|
n = new WebSocket(t);
|
|
5918
5897
|
} catch (t) {
|
|
@@ -5932,8 +5911,8 @@ async function Ts(e) {
|
|
|
5932
5911
|
};
|
|
5933
5912
|
});
|
|
5934
5913
|
}
|
|
5935
|
-
async function
|
|
5936
|
-
let t = await
|
|
5914
|
+
async function ks(e = {}) {
|
|
5915
|
+
let t = await Ds(Es(e), e.authManager), n = await Os(t.wsConfig);
|
|
5937
5916
|
return {
|
|
5938
5917
|
api: t.api,
|
|
5939
5918
|
websocket: n,
|
|
@@ -5943,29 +5922,29 @@ async function Es(e = {}) {
|
|
|
5943
5922
|
}
|
|
5944
5923
|
//#endregion
|
|
5945
5924
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5946
|
-
function
|
|
5925
|
+
function As(e) {
|
|
5947
5926
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5948
5927
|
H(n, (e, n) => {
|
|
5949
5928
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5950
|
-
|
|
5929
|
+
ns(t, e), r?.(e);
|
|
5951
5930
|
});
|
|
5952
5931
|
});
|
|
5953
5932
|
}
|
|
5954
5933
|
//#endregion
|
|
5955
5934
|
//#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
5956
|
-
var
|
|
5935
|
+
var js = {
|
|
5957
5936
|
key: 0,
|
|
5958
5937
|
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)]"
|
|
5959
|
-
},
|
|
5938
|
+
}, Ms = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ns = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Ps = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Fs = ["title"], Is = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Ls = {
|
|
5960
5939
|
key: 0,
|
|
5961
5940
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5962
|
-
},
|
|
5941
|
+
}, Rs = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zs = {
|
|
5963
5942
|
key: 1,
|
|
5964
5943
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
5965
|
-
},
|
|
5944
|
+
}, Bs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vs = {
|
|
5966
5945
|
key: 2,
|
|
5967
5946
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
5968
|
-
},
|
|
5947
|
+
}, Hs = {
|
|
5969
5948
|
key: 0,
|
|
5970
5949
|
class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
|
|
5971
5950
|
style: {
|
|
@@ -5974,10 +5953,10 @@ var Os = {
|
|
|
5974
5953
|
"max-width": "85%",
|
|
5975
5954
|
"box-shadow": "var(--tpl-shadow)"
|
|
5976
5955
|
}
|
|
5977
|
-
},
|
|
5956
|
+
}, Us = {
|
|
5978
5957
|
key: 1,
|
|
5979
5958
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5980
|
-
},
|
|
5959
|
+
}, Ws = {
|
|
5981
5960
|
key: 1,
|
|
5982
5961
|
class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
|
|
5983
5962
|
style: {
|
|
@@ -5986,21 +5965,21 @@ var Os = {
|
|
|
5986
5965
|
color: "var(--tpl-text)",
|
|
5987
5966
|
"box-shadow": "var(--tpl-shadow)"
|
|
5988
5967
|
}
|
|
5989
|
-
},
|
|
5968
|
+
}, Gs = {
|
|
5990
5969
|
key: 0,
|
|
5991
5970
|
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",
|
|
5992
5971
|
style: {
|
|
5993
5972
|
"background-color": "var(--tpl-danger-light)",
|
|
5994
5973
|
color: "var(--tpl-danger)"
|
|
5995
5974
|
}
|
|
5996
|
-
},
|
|
5975
|
+
}, Ks = {
|
|
5997
5976
|
key: 1,
|
|
5998
5977
|
class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
|
|
5999
5978
|
style: {
|
|
6000
5979
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
6001
5980
|
"backdrop-filter": "blur(2px)"
|
|
6002
5981
|
}
|
|
6003
|
-
},
|
|
5982
|
+
}, qs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Js = ["onClick"], Ys = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Xs = { 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)]" }, Zs = ["placeholder", "disabled"], Qs = ["disabled"], $s = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ec = /*@__PURE__*/ B({
|
|
6004
5983
|
__name: "AiChatSidebar",
|
|
6005
5984
|
props: {
|
|
6006
5985
|
visible: { type: Boolean },
|
|
@@ -6008,7 +5987,7 @@ var Os = {
|
|
|
6008
5987
|
},
|
|
6009
5988
|
emits: ["close"],
|
|
6010
5989
|
setup(e, { emit: t }) {
|
|
6011
|
-
let n = e, r = t, i = J(
|
|
5990
|
+
let n = e, r = t, i = J(fr, "AiChatSidebar"), a = J(In, "AiChatSidebar"), o = J(sr, "AiChatSidebar"), s = v(Jn, []), l = ya(), u = ss({
|
|
6012
5991
|
authManager: o,
|
|
6013
5992
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6014
5993
|
onApply: n.onApply,
|
|
@@ -6055,42 +6034,42 @@ var Os = {
|
|
|
6055
6034
|
"leave-from-class": "tpl:translate-x-0",
|
|
6056
6035
|
"leave-to-class": "tpl:translate-x-full"
|
|
6057
6036
|
}, {
|
|
6058
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6059
|
-
I("div",
|
|
6037
|
+
default: b(() => [e.visible ? (f(), k("div", js, [
|
|
6038
|
+
I("div", Ms, [I("div", Ns, [V(j(Ci), {
|
|
6060
6039
|
size: 13,
|
|
6061
6040
|
"stroke-width": 2
|
|
6062
|
-
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div",
|
|
6041
|
+
}), I("span", null, D(j(i).aiChat.title), 1)]), I("div", Ps, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6063
6042
|
key: 0,
|
|
6064
6043
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6065
6044
|
title: j(i).aiChat.clear,
|
|
6066
6045
|
onClick: n[0] ||= (e) => j(u).clearChat()
|
|
6067
|
-
}, [V(j(
|
|
6046
|
+
}, [V(j(Ti), {
|
|
6068
6047
|
size: 14,
|
|
6069
6048
|
"stroke-width": 2
|
|
6070
|
-
})], 8,
|
|
6049
|
+
})], 8, Fs)) : A("", !0), I("button", {
|
|
6071
6050
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6072
6051
|
onClick: n[1] ||= (e) => r("close")
|
|
6073
|
-
}, [V(j(
|
|
6052
|
+
}, [V(j(Ai), {
|
|
6074
6053
|
size: 14,
|
|
6075
6054
|
"stroke-width": 2
|
|
6076
6055
|
})])])]),
|
|
6077
|
-
I("div",
|
|
6056
|
+
I("div", Is, [
|
|
6078
6057
|
I("div", {
|
|
6079
6058
|
ref_key: "messagesContainer",
|
|
6080
6059
|
ref: p,
|
|
6081
6060
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
6082
|
-
}, [j(u).isLoadingHistory.value ? (f(), k("div",
|
|
6061
|
+
}, [j(u).isLoadingHistory.value ? (f(), k("div", Ls, [V(j(di), {
|
|
6083
6062
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6084
6063
|
size: 24,
|
|
6085
6064
|
"stroke-width": 2
|
|
6086
|
-
}), I("p",
|
|
6065
|
+
}), I("p", Rs, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", zs, [V(j(Ci), {
|
|
6087
6066
|
size: 32,
|
|
6088
6067
|
"stroke-width": 1.5,
|
|
6089
6068
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6090
|
-
}), I("p",
|
|
6069
|
+
}), I("p", Bs, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", Vs, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
|
|
6091
6070
|
key: e.id,
|
|
6092
6071
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6093
|
-
}, [e.role === "user" ? (f(), k("div",
|
|
6072
|
+
}, [e.role === "user" ? (f(), k("div", Hs, D(e.content), 1)) : (f(), k("div", Us, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(zi, { key: 0 })) : (f(), k("div", Ws, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
|
|
6094
6073
|
key: 2,
|
|
6095
6074
|
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",
|
|
6096
6075
|
style: {
|
|
@@ -6099,19 +6078,19 @@ var Os = {
|
|
|
6099
6078
|
"background-color": "transparent"
|
|
6100
6079
|
},
|
|
6101
6080
|
onClick: n[2] ||= (e) => j(u).toggleLastRevert()
|
|
6102
|
-
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(
|
|
6081
|
+
}, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(gi), {
|
|
6103
6082
|
size: 12,
|
|
6104
6083
|
"stroke-width": 2
|
|
6105
|
-
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(
|
|
6084
|
+
}), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Di), {
|
|
6106
6085
|
size: 12,
|
|
6107
6086
|
"stroke-width": 2
|
|
6108
6087
|
}), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
|
|
6109
|
-
j(u).error.value ? (f(), k("div",
|
|
6088
|
+
j(u).error.value ? (f(), k("div", Gs, [V(j(Zr), {
|
|
6110
6089
|
size: 14,
|
|
6111
6090
|
"stroke-width": 2,
|
|
6112
6091
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6113
6092
|
}), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
|
|
6114
|
-
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div",
|
|
6093
|
+
(j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Ks, [I("div", qs, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
|
|
6115
6094
|
key: t,
|
|
6116
6095
|
class: F(["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", (j(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"]),
|
|
6117
6096
|
style: {
|
|
@@ -6121,104 +6100,104 @@ var Os = {
|
|
|
6121
6100
|
"box-shadow": "var(--tpl-shadow)"
|
|
6122
6101
|
},
|
|
6123
6102
|
onClick: (t) => E(e)
|
|
6124
|
-
}, D(e), 11,
|
|
6103
|
+
}, D(e), 11, Js))), 128))])])) : A("", !0)
|
|
6125
6104
|
]),
|
|
6126
|
-
I("div",
|
|
6105
|
+
I("div", Ys, [I("div", Xs, [c(I("textarea", {
|
|
6127
6106
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
6128
6107
|
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)]",
|
|
6129
6108
|
placeholder: j(i).aiChat.inputPlaceholder,
|
|
6130
6109
|
disabled: j(u).isGenerating.value,
|
|
6131
6110
|
rows: "3",
|
|
6132
6111
|
onKeydown: te
|
|
6133
|
-
}, null, 40,
|
|
6112
|
+
}, null, 40, Zs), [[ae, d.value]]), I("button", {
|
|
6134
6113
|
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)]",
|
|
6135
6114
|
disabled: !d.value.trim() || j(u).isGenerating.value,
|
|
6136
6115
|
onClick: ee
|
|
6137
|
-
}, [V(j(
|
|
6116
|
+
}, [V(j(yi), {
|
|
6138
6117
|
size: 16,
|
|
6139
6118
|
"stroke-width": 2
|
|
6140
|
-
})], 8,
|
|
6119
|
+
})], 8, Qs)]), I("p", $s, D(j(i).aiMenu.disclaimer), 1)])
|
|
6141
6120
|
])) : A("", !0)]),
|
|
6142
6121
|
_: 1
|
|
6143
6122
|
}));
|
|
6144
6123
|
}
|
|
6145
|
-
}),
|
|
6146
|
-
function
|
|
6124
|
+
}), tc = /* @__PURE__ */ e({ default: () => nc }), nc = /*#__PURE__*/ Fi(ec, [["__scopeId", "data-v-a55e4bff"]]), rc = 6e4, ic = 36e5, ac = 864e5;
|
|
6125
|
+
function oc(e, t, n, r) {
|
|
6147
6126
|
let i = new Date(e).getTime();
|
|
6148
6127
|
if (Number.isNaN(i)) return null;
|
|
6149
6128
|
let a = Date.now() - i;
|
|
6150
6129
|
if (a < -6e4) return null;
|
|
6151
|
-
let o = Math.floor(a /
|
|
6130
|
+
let o = Math.floor(a / rc), s = Math.floor(a / ic), c = Math.floor(a / ac);
|
|
6152
6131
|
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));
|
|
6153
6132
|
}
|
|
6154
6133
|
//#endregion
|
|
6155
6134
|
//#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
|
|
6156
|
-
var
|
|
6135
|
+
var sc = {
|
|
6157
6136
|
key: 0,
|
|
6158
6137
|
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)]"
|
|
6159
|
-
},
|
|
6138
|
+
}, cc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, lc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, uc = {
|
|
6160
6139
|
key: 0,
|
|
6161
6140
|
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)]"
|
|
6162
|
-
},
|
|
6141
|
+
}, dc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, fc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, pc = {
|
|
6163
6142
|
key: 0,
|
|
6164
6143
|
class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
|
|
6165
|
-
},
|
|
6144
|
+
}, mc = {
|
|
6166
6145
|
key: 1,
|
|
6167
6146
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
|
|
6168
|
-
},
|
|
6147
|
+
}, hc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, gc = {
|
|
6169
6148
|
key: 2,
|
|
6170
6149
|
class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
|
|
6171
|
-
},
|
|
6150
|
+
}, _c = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, vc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, yc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, bc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, xc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Sc = {
|
|
6172
6151
|
key: 0,
|
|
6173
6152
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6174
|
-
},
|
|
6153
|
+
}, Cc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, wc = ["title", "onClick"], Tc = ["title", "onClick"], Ec = ["title", "onClick"], Dc = {
|
|
6175
6154
|
key: 0,
|
|
6176
6155
|
class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
|
|
6177
|
-
},
|
|
6156
|
+
}, Oc = {
|
|
6178
6157
|
key: 0,
|
|
6179
6158
|
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)]"
|
|
6180
|
-
},
|
|
6159
|
+
}, kc = ["onClick"], Ac = {
|
|
6181
6160
|
key: 2,
|
|
6182
6161
|
class: "tpl:mt-2"
|
|
6183
|
-
},
|
|
6162
|
+
}, jc = ["onKeydown"], Mc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Nc = ["disabled", "onClick"], Pc = {
|
|
6184
6163
|
key: 3,
|
|
6185
6164
|
class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6186
|
-
},
|
|
6165
|
+
}, Fc = {
|
|
6187
6166
|
key: 4,
|
|
6188
6167
|
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)]"
|
|
6189
|
-
},
|
|
6168
|
+
}, Ic = { class: "tpl:flex-1" }, Lc = ["onClick"], Rc = {
|
|
6190
6169
|
key: 5,
|
|
6191
6170
|
class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
|
|
6192
|
-
},
|
|
6171
|
+
}, zc = ["title", "onClick"], Bc = ["onClick"], Vc = {
|
|
6193
6172
|
key: 0,
|
|
6194
6173
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6195
|
-
},
|
|
6174
|
+
}, Hc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Uc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Wc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Gc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Kc = {
|
|
6196
6175
|
key: 0,
|
|
6197
6176
|
class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
|
|
6198
|
-
},
|
|
6177
|
+
}, qc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Jc = ["title", "onClick"], Yc = ["title", "onClick"], Xc = {
|
|
6199
6178
|
key: 0,
|
|
6200
6179
|
class: "tpl:mt-1.5"
|
|
6201
|
-
},
|
|
6180
|
+
}, Zc = ["onKeydown"], Qc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, $c = ["disabled", "onClick"], el = {
|
|
6202
6181
|
key: 1,
|
|
6203
6182
|
class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
|
|
6204
|
-
},
|
|
6183
|
+
}, tl = {
|
|
6205
6184
|
key: 2,
|
|
6206
6185
|
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)]"
|
|
6207
|
-
},
|
|
6186
|
+
}, nl = { class: "tpl:flex-1" }, rl = ["onClick"], il = {
|
|
6208
6187
|
key: 0,
|
|
6209
6188
|
class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
|
|
6210
|
-
},
|
|
6189
|
+
}, al = { class: "tpl:flex tpl:items-end tpl:gap-2" }, ol = ["placeholder", "onKeydown"], sl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, cl = ["disabled", "onClick"], ll = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ul = {
|
|
6211
6190
|
key: 0,
|
|
6212
6191
|
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)]"
|
|
6213
|
-
},
|
|
6192
|
+
}, dl = {
|
|
6214
6193
|
key: 1,
|
|
6215
6194
|
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)]"
|
|
6216
|
-
},
|
|
6195
|
+
}, fl = ["placeholder", "disabled"], pl = ["disabled"], ml = /*@__PURE__*/ B({
|
|
6217
6196
|
__name: "CommentsSidebar",
|
|
6218
6197
|
props: { visible: { type: Boolean } },
|
|
6219
6198
|
emits: ["close", "filterBlock"],
|
|
6220
6199
|
setup(e, { expose: t, emit: n }) {
|
|
6221
|
-
let r = e, i = n, { format: a } = Y(), { t: o } =
|
|
6200
|
+
let r = e, i = n, { format: a } = Y(), { t: o } = Gi(), s = J(In, "CommentsSidebar"), l = J(sr, "CommentsSidebar"), u = J(lr, "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), ee = C(null), T = O(() => l.userConfig?.id ?? null), E = O(() => {
|
|
6222
6201
|
let e = /* @__PURE__ */ new Set();
|
|
6223
6202
|
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);
|
|
6224
6203
|
return e;
|
|
@@ -6286,7 +6265,7 @@ var ic = {
|
|
|
6286
6265
|
return e.author_identifier === T.value;
|
|
6287
6266
|
}
|
|
6288
6267
|
function ve(e) {
|
|
6289
|
-
return
|
|
6268
|
+
return oc(e, o.snapshotHistory) ?? e;
|
|
6290
6269
|
}
|
|
6291
6270
|
function ye(e) {
|
|
6292
6271
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
|
|
@@ -6313,22 +6292,22 @@ var ic = {
|
|
|
6313
6292
|
"leave-from-class": "tpl:translate-x-0",
|
|
6314
6293
|
"leave-to-class": "tpl:translate-x-full"
|
|
6315
6294
|
}, {
|
|
6316
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6317
|
-
I("div",
|
|
6318
|
-
V(j(
|
|
6295
|
+
default: b(() => [e.visible ? (f(), k("div", sc, [
|
|
6296
|
+
I("div", cc, [I("div", lc, [
|
|
6297
|
+
V(j(fi), {
|
|
6319
6298
|
size: 13,
|
|
6320
6299
|
"stroke-width": 2
|
|
6321
6300
|
}),
|
|
6322
6301
|
I("span", null, D(j(o).comments.title), 1),
|
|
6323
|
-
j(u).unresolvedCount.value > 0 ? (f(), k("span",
|
|
6302
|
+
j(u).unresolvedCount.value > 0 ? (f(), k("span", uc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
|
|
6324
6303
|
]), I("button", {
|
|
6325
6304
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6326
6305
|
onClick: n[0] ||= (e) => i("close")
|
|
6327
|
-
}, [V(j(
|
|
6306
|
+
}, [V(j(Ai), {
|
|
6328
6307
|
size: 14,
|
|
6329
6308
|
"stroke-width": 2
|
|
6330
6309
|
})])]),
|
|
6331
|
-
I("div",
|
|
6310
|
+
I("div", dc, [
|
|
6332
6311
|
I("button", {
|
|
6333
6312
|
class: F(["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" : ""]),
|
|
6334
6313
|
onClick: n[1] ||= (e) => M("unresolved")
|
|
@@ -6343,156 +6322,156 @@ var ic = {
|
|
|
6343
6322
|
onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
|
|
6344
6323
|
}, D(j(o).comments.filterBlock), 3)) : A("", !0)
|
|
6345
6324
|
]),
|
|
6346
|
-
I("div",
|
|
6325
|
+
I("div", fc, [j(u).isLoading.value ? (f(), k("div", pc, [V(j(di), {
|
|
6347
6326
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6348
6327
|
size: 24,
|
|
6349
6328
|
"stroke-width": 2
|
|
6350
|
-
})])) : re.value.length === 0 ? (f(), k("div",
|
|
6329
|
+
})])) : re.value.length === 0 ? (f(), k("div", mc, [V(j(fi), {
|
|
6351
6330
|
size: 32,
|
|
6352
6331
|
"stroke-width": 1.5,
|
|
6353
6332
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6354
|
-
}), I("p",
|
|
6333
|
+
}), I("p", hc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", gc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
|
|
6355
6334
|
key: e.id,
|
|
6356
6335
|
class: "tpl-comment-thread"
|
|
6357
6336
|
}, [
|
|
6358
|
-
I("div",
|
|
6359
|
-
I("div",
|
|
6360
|
-
I("span",
|
|
6361
|
-
I("span",
|
|
6362
|
-
e.updated_at === e.created_at ? A("", !0) : (f(), k("span",
|
|
6363
|
-
]), I("div",
|
|
6337
|
+
I("div", _c, [
|
|
6338
|
+
I("div", vc, [I("div", yc, [
|
|
6339
|
+
I("span", bc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
|
|
6340
|
+
I("span", xc, D(ve(e.created_at)), 1),
|
|
6341
|
+
e.updated_at === e.created_at ? A("", !0) : (f(), k("span", Sc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6342
|
+
]), I("div", Cc, [
|
|
6364
6343
|
I("button", {
|
|
6365
6344
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6366
6345
|
title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
|
|
6367
6346
|
onClick: (t) => ge(e.id)
|
|
6368
|
-
}, [V(j(
|
|
6347
|
+
}, [V(j(Qr), {
|
|
6369
6348
|
size: 13,
|
|
6370
6349
|
"stroke-width": 2,
|
|
6371
6350
|
class: "tpl-resolve-icon",
|
|
6372
6351
|
style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6373
|
-
}, null, 8, ["style"])], 8,
|
|
6352
|
+
}, null, 8, ["style"])], 8, wc),
|
|
6374
6353
|
_e(e) ? (f(), k("button", {
|
|
6375
6354
|
key: 0,
|
|
6376
6355
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6377
6356
|
title: j(o).comments.edit,
|
|
6378
6357
|
onClick: (t) => le(e)
|
|
6379
|
-
}, [V(j(
|
|
6358
|
+
}, [V(j(mi), {
|
|
6380
6359
|
size: 12,
|
|
6381
6360
|
"stroke-width": 2
|
|
6382
|
-
})], 8,
|
|
6361
|
+
})], 8, Tc)) : A("", !0),
|
|
6383
6362
|
_e(e) ? (f(), k("button", {
|
|
6384
6363
|
key: 1,
|
|
6385
6364
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6386
6365
|
title: j(o).comments.delete,
|
|
6387
6366
|
onClick: (t) => ue(e.id)
|
|
6388
|
-
}, [V(j(
|
|
6367
|
+
}, [V(j(Ti), {
|
|
6389
6368
|
size: 12,
|
|
6390
6369
|
"stroke-width": 2
|
|
6391
|
-
})], 8,
|
|
6370
|
+
})], 8, Ec)) : A("", !0)
|
|
6392
6371
|
])]),
|
|
6393
6372
|
V(ie, { name: "tpl-resolve" }, {
|
|
6394
|
-
default: b(() => [e.resolved_at ? (f(), k("div",
|
|
6373
|
+
default: b(() => [e.resolved_at ? (f(), k("div", Dc, [V(j(Kr), {
|
|
6395
6374
|
size: 10,
|
|
6396
6375
|
"stroke-width": 2.5
|
|
6397
6376
|
}), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
|
|
6398
6377
|
_: 2
|
|
6399
6378
|
}, 1024),
|
|
6400
|
-
e.block_id && te(e.block_id) ? (f(), k("span",
|
|
6379
|
+
e.block_id && te(e.block_id) ? (f(), k("span", Oc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
|
|
6401
6380
|
key: 1,
|
|
6402
6381
|
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)]",
|
|
6403
6382
|
onClick: (t) => j(s).selectBlock(e.block_id ?? "")
|
|
6404
|
-
}, " Block ", 8,
|
|
6405
|
-
y.value === e.id ? (f(), k("div",
|
|
6383
|
+
}, " Block ", 8, kc)) : A("", !0),
|
|
6384
|
+
y.value === e.id ? (f(), k("div", Ac, [c(I("textarea", {
|
|
6406
6385
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6407
6386
|
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)]",
|
|
6408
6387
|
rows: "3",
|
|
6409
6388
|
onKeydown: (t) => xe(t, e.id)
|
|
6410
|
-
}, null, 40,
|
|
6389
|
+
}, null, 40, jc), [[ae, x.value]]), I("div", Mc, [I("button", {
|
|
6411
6390
|
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)]",
|
|
6412
6391
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6413
6392
|
onClick: (t) => me(e.id)
|
|
6414
|
-
}, D(j(o).comments.save), 9,
|
|
6393
|
+
}, D(j(o).comments.save), 9, Nc), I("button", {
|
|
6415
6394
|
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)]",
|
|
6416
6395
|
onClick: n[5] ||= (e) => B()
|
|
6417
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6418
|
-
w.value === e.id ? (f(), k("div",
|
|
6419
|
-
I("span",
|
|
6396
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Pc, D(e.body), 1)),
|
|
6397
|
+
w.value === e.id ? (f(), k("div", Fc, [
|
|
6398
|
+
I("span", Ic, D(j(o).comments.deleteConfirm), 1),
|
|
6420
6399
|
I("button", {
|
|
6421
6400
|
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)]",
|
|
6422
6401
|
onClick: (t) => he(e.id)
|
|
6423
|
-
}, D(j(o).comments.delete), 9,
|
|
6402
|
+
}, D(j(o).comments.delete), 9, Lc),
|
|
6424
6403
|
I("button", {
|
|
6425
6404
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6426
6405
|
onClick: n[6] ||= (e) => de()
|
|
6427
6406
|
}, D(j(o).comments.cancel), 1)
|
|
6428
6407
|
])) : A("", !0),
|
|
6429
|
-
y.value !== e.id && w.value !== e.id ? (f(), k("div",
|
|
6408
|
+
y.value !== e.id && w.value !== e.id ? (f(), k("div", Rc, [I("button", {
|
|
6430
6409
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6431
6410
|
title: j(o).comments.reply,
|
|
6432
6411
|
onClick: (t) => se(e.id)
|
|
6433
|
-
}, [V(j(
|
|
6412
|
+
}, [V(j(vi), {
|
|
6434
6413
|
size: 13,
|
|
6435
6414
|
"stroke-width": 2,
|
|
6436
6415
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6437
|
-
})], 8,
|
|
6416
|
+
})], 8, zc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
|
|
6438
6417
|
key: 0,
|
|
6439
6418
|
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)]",
|
|
6440
6419
|
onClick: (t) => oe(e.id)
|
|
6441
|
-
}, [S.value.has(e.id) ? (f(), N(j(
|
|
6420
|
+
}, [S.value.has(e.id) ? (f(), N(j(Xr), {
|
|
6442
6421
|
key: 0,
|
|
6443
6422
|
size: 11,
|
|
6444
6423
|
"stroke-width": 2
|
|
6445
|
-
})) : (f(), N(j(
|
|
6424
|
+
})) : (f(), N(j(qr), {
|
|
6446
6425
|
key: 1,
|
|
6447
6426
|
size: 11,
|
|
6448
6427
|
"stroke-width": 2
|
|
6449
|
-
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8,
|
|
6428
|
+
})), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Bc)) : A("", !0)])) : A("", !0)
|
|
6450
6429
|
]),
|
|
6451
6430
|
V(ie, { name: "tpl-replies" }, {
|
|
6452
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div",
|
|
6431
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", Vc, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
|
|
6453
6432
|
key: t.id,
|
|
6454
6433
|
class: F(["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" : ""])
|
|
6455
6434
|
}, [
|
|
6456
|
-
I("div",
|
|
6457
|
-
I("span",
|
|
6458
|
-
I("span",
|
|
6459
|
-
t.updated_at === t.created_at ? A("", !0) : (f(), k("span",
|
|
6460
|
-
]), I("div",
|
|
6435
|
+
I("div", Hc, [I("div", Uc, [
|
|
6436
|
+
I("span", Wc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
|
|
6437
|
+
I("span", Gc, D(ve(t.created_at)), 1),
|
|
6438
|
+
t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Kc, " (" + D(j(o).comments.edited) + ") ", 1))
|
|
6439
|
+
]), I("div", qc, [_e(t) ? (f(), k("button", {
|
|
6461
6440
|
key: 0,
|
|
6462
6441
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6463
6442
|
title: j(o).comments.edit,
|
|
6464
6443
|
onClick: (e) => le(t)
|
|
6465
|
-
}, [V(j(
|
|
6444
|
+
}, [V(j(mi), {
|
|
6466
6445
|
size: 11,
|
|
6467
6446
|
"stroke-width": 2
|
|
6468
|
-
})], 8,
|
|
6447
|
+
})], 8, Jc)) : A("", !0), _e(t) ? (f(), k("button", {
|
|
6469
6448
|
key: 1,
|
|
6470
6449
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6471
6450
|
title: j(o).comments.delete,
|
|
6472
6451
|
onClick: (e) => ue(t.id)
|
|
6473
|
-
}, [V(j(
|
|
6452
|
+
}, [V(j(Ti), {
|
|
6474
6453
|
size: 11,
|
|
6475
6454
|
"stroke-width": 2
|
|
6476
|
-
})], 8,
|
|
6477
|
-
y.value === t.id ? (f(), k("div",
|
|
6455
|
+
})], 8, Yc)) : A("", !0)])]),
|
|
6456
|
+
y.value === t.id ? (f(), k("div", Xc, [c(I("textarea", {
|
|
6478
6457
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6479
6458
|
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)]",
|
|
6480
6459
|
rows: "2",
|
|
6481
6460
|
onKeydown: (e) => xe(e, t.id)
|
|
6482
|
-
}, null, 40,
|
|
6461
|
+
}, null, 40, Zc), [[ae, x.value]]), I("div", Qc, [I("button", {
|
|
6483
6462
|
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)]",
|
|
6484
6463
|
disabled: !x.value.trim() || j(u).isSubmitting.value,
|
|
6485
6464
|
onClick: (e) => me(t.id)
|
|
6486
|
-
}, D(j(o).comments.save), 9,
|
|
6465
|
+
}, D(j(o).comments.save), 9, $c), I("button", {
|
|
6487
6466
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6488
6467
|
onClick: n[8] ||= (e) => B()
|
|
6489
|
-
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p",
|
|
6490
|
-
w.value === t.id ? (f(), k("div",
|
|
6491
|
-
I("span",
|
|
6468
|
+
}, D(j(o).comments.cancel), 1)])])) : (f(), k("p", el, D(t.body), 1)),
|
|
6469
|
+
w.value === t.id ? (f(), k("div", tl, [
|
|
6470
|
+
I("span", nl, D(j(o).comments.deleteConfirm), 1),
|
|
6492
6471
|
I("button", {
|
|
6493
6472
|
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)]",
|
|
6494
6473
|
onClick: (e) => he(t.id)
|
|
6495
|
-
}, D(j(o).comments.delete), 9,
|
|
6474
|
+
}, D(j(o).comments.delete), 9, rl),
|
|
6496
6475
|
I("button", {
|
|
6497
6476
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6498
6477
|
onClick: n[9] ||= (e) => de()
|
|
@@ -6502,30 +6481,30 @@ var ic = {
|
|
|
6502
6481
|
_: 2
|
|
6503
6482
|
}, 1024),
|
|
6504
6483
|
V(ie, { name: "tpl-replies" }, {
|
|
6505
|
-
default: b(() => [_.value === e.id ? (f(), k("div",
|
|
6484
|
+
default: b(() => [_.value === e.id ? (f(), k("div", il, [I("div", al, [c(I("textarea", {
|
|
6506
6485
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6507
6486
|
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)]",
|
|
6508
6487
|
placeholder: j(o).comments.replyPlaceholder,
|
|
6509
6488
|
rows: "2",
|
|
6510
6489
|
onKeydown: (t) => be(t, e.id)
|
|
6511
|
-
}, null, 40,
|
|
6490
|
+
}, null, 40, ol), [[ae, v.value]]), I("div", sl, [I("button", {
|
|
6512
6491
|
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)]",
|
|
6513
6492
|
disabled: !v.value.trim() || j(u).isSubmitting.value,
|
|
6514
6493
|
onClick: (t) => pe(e.id)
|
|
6515
|
-
}, [V(j(
|
|
6494
|
+
}, [V(j(yi), {
|
|
6516
6495
|
size: 14,
|
|
6517
6496
|
"stroke-width": 2
|
|
6518
|
-
})], 8,
|
|
6497
|
+
})], 8, cl), I("button", {
|
|
6519
6498
|
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)]",
|
|
6520
6499
|
onClick: n[11] ||= (e) => ce()
|
|
6521
|
-
}, [V(j(
|
|
6500
|
+
}, [V(j(Ai), {
|
|
6522
6501
|
size: 14,
|
|
6523
6502
|
"stroke-width": 2
|
|
6524
6503
|
})])])])])) : A("", !0)]),
|
|
6525
6504
|
_: 2
|
|
6526
6505
|
}, 1024)
|
|
6527
6506
|
]))), 128))]))]),
|
|
6528
|
-
I("div",
|
|
6507
|
+
I("div", ll, [ne.value ? (f(), k("div", ul, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", dl, [c(I("textarea", {
|
|
6529
6508
|
ref_key: "newCommentInput",
|
|
6530
6509
|
ref: ee,
|
|
6531
6510
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6534,46 +6513,46 @@ var ic = {
|
|
|
6534
6513
|
disabled: j(u).isSubmitting.value,
|
|
6535
6514
|
rows: "2",
|
|
6536
6515
|
onKeydown: ye
|
|
6537
|
-
}, null, 40,
|
|
6516
|
+
}, null, 40, fl), [[ae, g.value]]), I("button", {
|
|
6538
6517
|
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)]",
|
|
6539
6518
|
disabled: !g.value.trim() || j(u).isSubmitting.value,
|
|
6540
6519
|
onClick: fe
|
|
6541
|
-
}, [j(u).isSubmitting.value ? (f(), N(j(
|
|
6520
|
+
}, [j(u).isSubmitting.value ? (f(), N(j(di), {
|
|
6542
6521
|
key: 0,
|
|
6543
6522
|
class: "tpl-spinner",
|
|
6544
6523
|
size: 16,
|
|
6545
6524
|
"stroke-width": 2
|
|
6546
|
-
})) : (f(), N(j(
|
|
6525
|
+
})) : (f(), N(j(yi), {
|
|
6547
6526
|
key: 1,
|
|
6548
6527
|
size: 16,
|
|
6549
6528
|
"stroke-width": 2
|
|
6550
|
-
}))], 8,
|
|
6529
|
+
}))], 8, pl)]))])
|
|
6551
6530
|
])) : A("", !0)]),
|
|
6552
6531
|
_: 1
|
|
6553
6532
|
}));
|
|
6554
6533
|
}
|
|
6555
|
-
}),
|
|
6534
|
+
}), hl = /* @__PURE__ */ e({ default: () => gl }), gl = /*#__PURE__*/ Fi(ml, [["__scopeId", "data-v-d204f573"]]), _l = {
|
|
6556
6535
|
key: 0,
|
|
6557
6536
|
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)]"
|
|
6558
|
-
},
|
|
6537
|
+
}, vl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, yl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, bl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, xl = {
|
|
6559
6538
|
key: 0,
|
|
6560
6539
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6561
|
-
},
|
|
6540
|
+
}, 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)]" }, wl = {
|
|
6562
6541
|
key: 1,
|
|
6563
6542
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6564
|
-
},
|
|
6543
|
+
}, Tl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, El = {
|
|
6565
6544
|
key: 0,
|
|
6566
6545
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
6567
|
-
},
|
|
6546
|
+
}, Dl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ol = ["src", "alt"], kl = {
|
|
6568
6547
|
key: 1,
|
|
6569
6548
|
class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
|
|
6570
|
-
},
|
|
6549
|
+
}, Al = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, jl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Ml = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Nl = ["accept"], Pl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Fl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Il = ["placeholder"], Ll = {
|
|
6571
6550
|
key: 0,
|
|
6572
6551
|
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)]"
|
|
6573
|
-
},
|
|
6552
|
+
}, Rl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, zl = { class: "tpl:flex tpl:gap-2" }, Bl = {
|
|
6574
6553
|
key: 1,
|
|
6575
6554
|
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)]"
|
|
6576
|
-
},
|
|
6555
|
+
}, Vl = ["disabled"], Hl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ul = /*@__PURE__*/ B({
|
|
6577
6556
|
__name: "DesignReferenceSidebar",
|
|
6578
6557
|
props: {
|
|
6579
6558
|
visible: { type: Boolean },
|
|
@@ -6581,8 +6560,8 @@ var ic = {
|
|
|
6581
6560
|
},
|
|
6582
6561
|
emits: ["close", "apply"],
|
|
6583
6562
|
setup(e, { emit: t }) {
|
|
6584
|
-
let n = e, r = t, { t: i } =
|
|
6585
|
-
authManager: J(
|
|
6563
|
+
let n = e, r = t, { t: i } = Gi(), a = J(In, "DesignReferenceSidebar"), o = us({
|
|
6564
|
+
authManager: J(sr, "DesignReferenceSidebar"),
|
|
6586
6565
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6587
6566
|
onApply: (e) => r("apply", e)
|
|
6588
6567
|
}), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => o.isGenerating.value ? !1 : u.value !== null);
|
|
@@ -6653,17 +6632,17 @@ var ic = {
|
|
|
6653
6632
|
"leave-from-class": "tpl:translate-x-0",
|
|
6654
6633
|
"leave-to-class": "tpl:translate-x-full"
|
|
6655
6634
|
}, {
|
|
6656
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6635
|
+
default: b(() => [e.visible ? (f(), k("div", _l, [I("div", vl, [I("div", yl, [V(j(ci), {
|
|
6657
6636
|
size: 13,
|
|
6658
6637
|
"stroke-width": 2
|
|
6659
6638
|
}), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
|
|
6660
6639
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6661
6640
|
onClick: n[0] ||= (e) => r("close")
|
|
6662
|
-
}, [V(j(
|
|
6641
|
+
}, [V(j(Ai), {
|
|
6663
6642
|
size: 14,
|
|
6664
6643
|
"stroke-width": 2
|
|
6665
|
-
})])]), I("div",
|
|
6666
|
-
I("div",
|
|
6644
|
+
})])]), I("div", bl, [j(o).isGenerating.value ? (f(), k("div", xl, [I("div", Sl, [V(zi), I("p", Cl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", wl, [
|
|
6645
|
+
I("div", Tl, [I("button", {
|
|
6667
6646
|
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",
|
|
6668
6647
|
style: L({
|
|
6669
6648
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
@@ -6671,7 +6650,7 @@ var ic = {
|
|
|
6671
6650
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6672
6651
|
}),
|
|
6673
6652
|
onClick: n[1] ||= (e) => _("image")
|
|
6674
|
-
}, [V(j(
|
|
6653
|
+
}, [V(j(ii), {
|
|
6675
6654
|
size: 12,
|
|
6676
6655
|
"stroke-width": 2
|
|
6677
6656
|
}), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
|
|
@@ -6682,23 +6661,23 @@ var ic = {
|
|
|
6682
6661
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6683
6662
|
}),
|
|
6684
6663
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6685
|
-
}, [V(j(
|
|
6664
|
+
}, [V(j(ai), {
|
|
6686
6665
|
size: 12,
|
|
6687
6666
|
"stroke-width": 2
|
|
6688
6667
|
}), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
|
|
6689
|
-
I("div", null, [u.value ? (f(), k("div",
|
|
6668
|
+
I("div", null, [u.value ? (f(), k("div", El, [I("div", Dl, [p.value ? (f(), k("img", {
|
|
6690
6669
|
key: 0,
|
|
6691
6670
|
src: p.value,
|
|
6692
6671
|
alt: u.value.name,
|
|
6693
6672
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6694
|
-
}, null, 8,
|
|
6673
|
+
}, null, 8, Ol)) : (f(), k("div", kl, [V(j(ai), {
|
|
6695
6674
|
size: 32,
|
|
6696
6675
|
"stroke-width": 1.5,
|
|
6697
6676
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6698
|
-
}), I("span",
|
|
6677
|
+
}), I("span", Al, D(u.value.name), 1)])), I("button", {
|
|
6699
6678
|
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)]",
|
|
6700
6679
|
onClick: x
|
|
6701
|
-
}, [V(j(
|
|
6680
|
+
}, [V(j(Ai), {
|
|
6702
6681
|
size: 12,
|
|
6703
6682
|
"stroke-width": 2
|
|
6704
6683
|
})])])])) : (f(), k("div", {
|
|
@@ -6713,13 +6692,13 @@ var ic = {
|
|
|
6713
6692
|
onDragleave: w,
|
|
6714
6693
|
onDrop: ee
|
|
6715
6694
|
}, [
|
|
6716
|
-
V(j(
|
|
6695
|
+
V(j(Oi), {
|
|
6717
6696
|
size: 24,
|
|
6718
6697
|
"stroke-width": 1.5,
|
|
6719
6698
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6720
6699
|
}),
|
|
6721
|
-
I("span",
|
|
6722
|
-
I("span",
|
|
6700
|
+
I("span", jl, D(j(i).designReference.dropHint), 1),
|
|
6701
|
+
I("span", Ml, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
|
|
6723
6702
|
], 36)), I("input", {
|
|
6724
6703
|
ref_key: "fileInput",
|
|
6725
6704
|
ref: s,
|
|
@@ -6727,14 +6706,14 @@ var ic = {
|
|
|
6727
6706
|
class: "tpl:hidden",
|
|
6728
6707
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6729
6708
|
onChange: v
|
|
6730
|
-
}, null, 40,
|
|
6731
|
-
I("div",
|
|
6709
|
+
}, null, 40, Nl)]),
|
|
6710
|
+
I("div", Pl, [I("label", Fl, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
|
|
6732
6711
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6733
6712
|
class: F(["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"]]),
|
|
6734
6713
|
placeholder: j(i).designReference.promptPlaceholder,
|
|
6735
6714
|
rows: "3"
|
|
6736
|
-
}, null, 8,
|
|
6737
|
-
m.value ? (f(), k("div",
|
|
6715
|
+
}, null, 8, Il), [[ae, d.value]])]),
|
|
6716
|
+
m.value ? (f(), k("div", Ll, [I("p", Rl, D(j(i).designReference.replaceWarning), 1), I("div", zl, [I("button", {
|
|
6738
6717
|
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)]",
|
|
6739
6718
|
style: { "background-color": "transparent" },
|
|
6740
6719
|
onClick: E
|
|
@@ -6742,7 +6721,7 @@ var ic = {
|
|
|
6742
6721
|
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)]",
|
|
6743
6722
|
onClick: T
|
|
6744
6723
|
}, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
|
|
6745
|
-
j(o).error.value ? (f(), k("div",
|
|
6724
|
+
j(o).error.value ? (f(), k("div", Bl, [V(j(Zr), {
|
|
6746
6725
|
size: 14,
|
|
6747
6726
|
"stroke-width": 2,
|
|
6748
6727
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -6752,35 +6731,35 @@ var ic = {
|
|
|
6752
6731
|
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)]",
|
|
6753
6732
|
disabled: !g.value,
|
|
6754
6733
|
onClick: T
|
|
6755
|
-
}, [V(j(
|
|
6734
|
+
}, [V(j(ci), {
|
|
6756
6735
|
size: 16,
|
|
6757
6736
|
"stroke-width": 2
|
|
6758
|
-
}), z(" " + D(j(i).designReference.generate), 1)], 8,
|
|
6759
|
-
I("p",
|
|
6737
|
+
}), z(" " + D(j(i).designReference.generate), 1)], 8, Vl)),
|
|
6738
|
+
I("p", Hl, D(j(i).aiMenu.disclaimer), 1)
|
|
6760
6739
|
]))])])) : A("", !0)]),
|
|
6761
6740
|
_: 1
|
|
6762
6741
|
}));
|
|
6763
6742
|
}
|
|
6764
|
-
}),
|
|
6743
|
+
}), Wl = /* @__PURE__ */ e({ default: () => Gl }), Gl = /*#__PURE__*/ Fi(Ul, [["__scopeId", "data-v-bdbf8d0d"]]), Kl = ["disabled", "title"], ql = ["title"], Jl = {
|
|
6765
6744
|
key: 0,
|
|
6766
6745
|
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)]",
|
|
6767
6746
|
style: {
|
|
6768
6747
|
"backdrop-filter": "blur(8px)",
|
|
6769
6748
|
"-webkit-backdrop-filter": "blur(8px)"
|
|
6770
6749
|
}
|
|
6771
|
-
},
|
|
6750
|
+
}, Yl = { 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)]" }, Xl = {
|
|
6772
6751
|
key: 0,
|
|
6773
6752
|
class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
|
|
6774
|
-
},
|
|
6753
|
+
}, Zl = {
|
|
6775
6754
|
key: 1,
|
|
6776
6755
|
class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
|
|
6777
|
-
},
|
|
6756
|
+
}, Ql = {
|
|
6778
6757
|
key: 2,
|
|
6779
6758
|
class: "tpl:max-h-64 tpl:overflow-y-auto"
|
|
6780
|
-
},
|
|
6759
|
+
}, $l = ["disabled", "onClick"], eu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, tu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, nu = {
|
|
6781
6760
|
key: 0,
|
|
6782
6761
|
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)]"
|
|
6783
|
-
},
|
|
6762
|
+
}, ru = ["disabled", "title"], iu = /*@__PURE__*/ B({
|
|
6784
6763
|
__name: "SnapshotHistory",
|
|
6785
6764
|
props: {
|
|
6786
6765
|
snapshots: {},
|
|
@@ -6789,7 +6768,7 @@ var ic = {
|
|
|
6789
6768
|
},
|
|
6790
6769
|
emits: ["load", "navigate"],
|
|
6791
6770
|
setup(e, { emit: t }) {
|
|
6792
|
-
let n = e, r = t, { format: i } = Y(), { t: a } =
|
|
6771
|
+
let n = e, r = t, { format: i } = Y(), { t: a } = Gi(), o = C(!1), s = C(null), c = C(-1);
|
|
6793
6772
|
H(() => n.snapshots.length, () => {
|
|
6794
6773
|
c.value = -1;
|
|
6795
6774
|
});
|
|
@@ -6808,7 +6787,7 @@ var ic = {
|
|
|
6808
6787
|
t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
|
|
6809
6788
|
}
|
|
6810
6789
|
function _(e) {
|
|
6811
|
-
let t =
|
|
6790
|
+
let t = oc(e, a.snapshotHistory, i, 7);
|
|
6812
6791
|
return t === null ? new Date(e).toLocaleDateString(void 0, {
|
|
6813
6792
|
month: "short",
|
|
6814
6793
|
day: "numeric",
|
|
@@ -6828,34 +6807,34 @@ var ic = {
|
|
|
6828
6807
|
disabled: !u.value,
|
|
6829
6808
|
title: j(a).snapshotHistory.olderSnapshot,
|
|
6830
6809
|
onClick: M(p, ["stop"])
|
|
6831
|
-
}, [V(j(
|
|
6810
|
+
}, [V(j(Jr), {
|
|
6832
6811
|
size: 14,
|
|
6833
6812
|
"stroke-width": 2
|
|
6834
|
-
})], 8,
|
|
6813
|
+
})], 8, Kl),
|
|
6835
6814
|
I("button", {
|
|
6836
6815
|
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)]",
|
|
6837
6816
|
title: j(a).snapshotHistory.tooltip,
|
|
6838
6817
|
onClick: M(m, ["stop"])
|
|
6839
|
-
}, [V(j(
|
|
6818
|
+
}, [V(j($r), {
|
|
6840
6819
|
size: 16,
|
|
6841
6820
|
"stroke-width": 1.5
|
|
6842
|
-
}), V(j(
|
|
6821
|
+
}), V(j(qr), {
|
|
6843
6822
|
class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6844
6823
|
size: 10,
|
|
6845
6824
|
"stroke-width": 2
|
|
6846
|
-
}, null, 8, ["class"])], 8,
|
|
6825
|
+
}, null, 8, ["class"])], 8, ql),
|
|
6847
6826
|
V(ie, { name: "tpl-dropdown" }, {
|
|
6848
|
-
default: b(() => [o.value ? (f(), k("div",
|
|
6827
|
+
default: b(() => [o.value ? (f(), k("div", Jl, [I("div", Yl, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", Xl, [V(j(di), {
|
|
6849
6828
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6850
6829
|
size: 20,
|
|
6851
6830
|
"stroke-width": 2
|
|
6852
|
-
})])) : e.snapshots.length === 0 ? (f(), k("div",
|
|
6831
|
+
})])) : e.snapshots.length === 0 ? (f(), k("div", Zl, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", Ql, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
|
|
6853
6832
|
key: t.id,
|
|
6854
6833
|
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)]",
|
|
6855
6834
|
style: { "background-color": "transparent" },
|
|
6856
6835
|
disabled: e.isRestoring,
|
|
6857
6836
|
onClick: (e) => g(t.id)
|
|
6858
|
-
}, [I("div",
|
|
6837
|
+
}, [I("div", eu, [I("div", tu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", nu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, $l))), 128))]))])) : A("", !0)]),
|
|
6859
6838
|
_: 1
|
|
6860
6839
|
}),
|
|
6861
6840
|
I("button", {
|
|
@@ -6863,74 +6842,74 @@ var ic = {
|
|
|
6863
6842
|
disabled: !l.value,
|
|
6864
6843
|
title: j(a).snapshotHistory.newerSnapshot,
|
|
6865
6844
|
onClick: M(d, ["stop"])
|
|
6866
|
-
}, [V(j(
|
|
6845
|
+
}, [V(j(Yr), {
|
|
6867
6846
|
size: 14,
|
|
6868
6847
|
"stroke-width": 2
|
|
6869
|
-
})], 8,
|
|
6848
|
+
})], 8, ru)
|
|
6870
6849
|
], 512));
|
|
6871
6850
|
}
|
|
6872
|
-
}),
|
|
6851
|
+
}), au = /* @__PURE__ */ e({ default: () => ou }), ou = iu;
|
|
6873
6852
|
//#endregion
|
|
6874
6853
|
//#region src/cloud/utils/scoringStyles.ts
|
|
6875
|
-
function
|
|
6854
|
+
function su(e) {
|
|
6876
6855
|
return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
|
|
6877
6856
|
}
|
|
6878
|
-
function
|
|
6857
|
+
function cu(e) {
|
|
6879
6858
|
return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
|
|
6880
6859
|
}
|
|
6881
|
-
function
|
|
6860
|
+
function lu(e) {
|
|
6882
6861
|
return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
|
|
6883
6862
|
}
|
|
6884
|
-
function
|
|
6863
|
+
function uu(e) {
|
|
6885
6864
|
return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
|
|
6886
6865
|
}
|
|
6887
6866
|
//#endregion
|
|
6888
6867
|
//#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
|
|
6889
|
-
var
|
|
6868
|
+
var du = {
|
|
6890
6869
|
key: 0,
|
|
6891
6870
|
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)]"
|
|
6892
|
-
},
|
|
6871
|
+
}, fu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, pu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, mu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, hu = ["title"], gu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, _u = {
|
|
6893
6872
|
key: 0,
|
|
6894
6873
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6895
|
-
},
|
|
6874
|
+
}, vu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, yu = {
|
|
6896
6875
|
key: 1,
|
|
6897
6876
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6898
|
-
},
|
|
6877
|
+
}, bu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, xu = {
|
|
6899
6878
|
key: 2,
|
|
6900
6879
|
class: "tpl:flex tpl:flex-col tpl:gap-4"
|
|
6901
|
-
},
|
|
6880
|
+
}, Su = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Cu = {
|
|
6902
6881
|
key: 0,
|
|
6903
6882
|
class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6904
|
-
},
|
|
6883
|
+
}, wu = {
|
|
6905
6884
|
key: 0,
|
|
6906
6885
|
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)]"
|
|
6907
|
-
},
|
|
6886
|
+
}, Tu = ["onClick"], Eu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Du = {
|
|
6908
6887
|
key: 0,
|
|
6909
6888
|
class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
|
|
6910
|
-
},
|
|
6889
|
+
}, Ou = {
|
|
6911
6890
|
key: 0,
|
|
6912
6891
|
class: "tpl:border-t tpl:border-[var(--tpl-border)]"
|
|
6913
|
-
},
|
|
6892
|
+
}, ku = {
|
|
6914
6893
|
key: 0,
|
|
6915
6894
|
class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
|
|
6916
|
-
},
|
|
6895
|
+
}, Au = { class: "tpl:flex tpl:items-start tpl:gap-2" }, ju = { class: "tpl:flex-1 tpl:min-w-0" }, Mu = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, Nu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Pu = {
|
|
6917
6896
|
key: 0,
|
|
6918
6897
|
class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
|
|
6919
|
-
},
|
|
6898
|
+
}, Fu = {
|
|
6920
6899
|
key: 1,
|
|
6921
6900
|
class: "tpl:mt-2 tpl:flex tpl:justify-center"
|
|
6922
|
-
},
|
|
6901
|
+
}, Iu = ["disabled", "onClick"], Lu = {
|
|
6923
6902
|
key: 0,
|
|
6924
6903
|
class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
|
|
6925
|
-
},
|
|
6904
|
+
}, Ru = {
|
|
6926
6905
|
key: 3,
|
|
6927
6906
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6928
|
-
},
|
|
6907
|
+
}, zu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Bu = { 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)]" }, Vu = /*@__PURE__*/ B({
|
|
6929
6908
|
__name: "TemplateScoringPanel",
|
|
6930
6909
|
props: { visible: { type: Boolean } },
|
|
6931
6910
|
emits: ["close"],
|
|
6932
6911
|
setup(e, { emit: t }) {
|
|
6933
|
-
let n = e, r = t, { t: i } =
|
|
6912
|
+
let n = e, r = t, { t: i } = Gi(), a = J(In, "TemplateScoringPanel"), o = J(dr, "TemplateScoringPanel"), s = v(Jn, []), c = C({
|
|
6934
6913
|
spam: !0,
|
|
6935
6914
|
readability: !0,
|
|
6936
6915
|
accessibility: !0,
|
|
@@ -6945,10 +6924,10 @@ var cu = {
|
|
|
6945
6924
|
"accessibility",
|
|
6946
6925
|
"bestPractices"
|
|
6947
6926
|
], p = {
|
|
6948
|
-
spam:
|
|
6949
|
-
readability:
|
|
6950
|
-
accessibility:
|
|
6951
|
-
bestPractices:
|
|
6927
|
+
spam: Si,
|
|
6928
|
+
readability: ri,
|
|
6929
|
+
accessibility: Ci,
|
|
6930
|
+
bestPractices: ji
|
|
6952
6931
|
};
|
|
6953
6932
|
function m() {
|
|
6954
6933
|
o.score(a.content.value, s);
|
|
@@ -6976,50 +6955,50 @@ var cu = {
|
|
|
6976
6955
|
"leave-from-class": "tpl:translate-x-0",
|
|
6977
6956
|
"leave-to-class": "tpl:translate-x-full"
|
|
6978
6957
|
}, {
|
|
6979
|
-
default: b(() => [e.visible ? (f(), k("div",
|
|
6958
|
+
default: b(() => [e.visible ? (f(), k("div", du, [I("div", fu, [I("div", pu, [V(j(xi), {
|
|
6980
6959
|
size: 13,
|
|
6981
6960
|
"stroke-width": 2
|
|
6982
|
-
}), I("span", null, D(j(i).scoring.title), 1)]), I("div",
|
|
6961
|
+
}), I("span", null, D(j(i).scoring.title), 1)]), I("div", mu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
|
|
6983
6962
|
key: 0,
|
|
6984
6963
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6985
6964
|
title: j(i).scoring.rescore,
|
|
6986
6965
|
onClick: n[0] ||= (e) => m()
|
|
6987
|
-
}, [V(j(
|
|
6966
|
+
}, [V(j(_i), {
|
|
6988
6967
|
size: 14,
|
|
6989
6968
|
"stroke-width": 2
|
|
6990
|
-
})], 8,
|
|
6969
|
+
})], 8, hu)) : A("", !0), I("button", {
|
|
6991
6970
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6992
6971
|
onClick: n[1] ||= (e) => r("close")
|
|
6993
|
-
}, [V(j(
|
|
6972
|
+
}, [V(j(Ai), {
|
|
6994
6973
|
size: 14,
|
|
6995
6974
|
"stroke-width": 2
|
|
6996
|
-
})])])]), I("div",
|
|
6997
|
-
V(j(
|
|
6975
|
+
})])])]), I("div", gu, [j(o).isScoring.value ? (f(), k("div", _u, [I("p", vu, D(j(i).scoring.scoring), 1), V(zi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", yu, [
|
|
6976
|
+
V(j(Zr), {
|
|
6998
6977
|
size: 32,
|
|
6999
6978
|
"stroke-width": 1.5,
|
|
7000
6979
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
7001
6980
|
}),
|
|
7002
|
-
I("p",
|
|
6981
|
+
I("p", bu, D(j(i).scoring.error), 1),
|
|
7003
6982
|
I("button", {
|
|
7004
6983
|
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)]",
|
|
7005
6984
|
onClick: n[2] ||= (e) => m()
|
|
7006
|
-
}, [V(j(
|
|
6985
|
+
}, [V(j(_i), {
|
|
7007
6986
|
size: 12,
|
|
7008
6987
|
"stroke-width": 2
|
|
7009
6988
|
}), z(" " + D(j(i).scoring.rescore), 1)])
|
|
7010
|
-
])) : j(o).scoringResult.value ? (f(), k("div",
|
|
6989
|
+
])) : j(o).scoringResult.value ? (f(), k("div", xu, [
|
|
7011
6990
|
I("div", {
|
|
7012
6991
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
7013
|
-
style: L({ backgroundColor: j(
|
|
6992
|
+
style: L({ backgroundColor: j(cu)(j(o).scoringResult.value.score) })
|
|
7014
6993
|
}, [
|
|
7015
6994
|
I("span", {
|
|
7016
6995
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
7017
|
-
style: L({ color: j(
|
|
6996
|
+
style: L({ color: j(su)(j(o).scoringResult.value.score) })
|
|
7018
6997
|
}, D(j(o).scoringResult.value.score), 5),
|
|
7019
|
-
I("span",
|
|
7020
|
-
_() > 0 ? (f(), k("span",
|
|
6998
|
+
I("span", Su, D(j(i).scoring.overallScore), 1),
|
|
6999
|
+
_() > 0 ? (f(), k("span", Cu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
|
|
7021
7000
|
], 4),
|
|
7022
|
-
j(o).fixError.value ? (f(), k("div",
|
|
7001
|
+
j(o).fixError.value ? (f(), k("div", wu, [V(j(Zr), {
|
|
7023
7002
|
size: 14,
|
|
7024
7003
|
"stroke-width": 2,
|
|
7025
7004
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
@@ -7034,74 +7013,74 @@ var cu = {
|
|
|
7034
7013
|
(f(), N(d(p[e]), {
|
|
7035
7014
|
size: 14,
|
|
7036
7015
|
"stroke-width": 2,
|
|
7037
|
-
style: L({ color: j(
|
|
7016
|
+
style: L({ color: j(su)(j(o).scoringResult.value.categories[e].score) })
|
|
7038
7017
|
}, null, 8, ["style"])),
|
|
7039
|
-
I("span",
|
|
7018
|
+
I("span", Eu, D(j(i).scoring.categories[e]), 1),
|
|
7040
7019
|
I("span", {
|
|
7041
7020
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
7042
7021
|
style: L({
|
|
7043
|
-
color: j(
|
|
7044
|
-
backgroundColor: j(
|
|
7022
|
+
color: j(su)(j(o).scoringResult.value.categories[e].score),
|
|
7023
|
+
backgroundColor: j(cu)(j(o).scoringResult.value.categories[e].score)
|
|
7045
7024
|
})
|
|
7046
7025
|
}, D(j(o).scoringResult.value.categories[e].score), 5),
|
|
7047
|
-
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span",
|
|
7048
|
-
V(j(
|
|
7026
|
+
j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Du, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
|
|
7027
|
+
V(j(qr), {
|
|
7049
7028
|
size: 12,
|
|
7050
7029
|
"stroke-width": 2,
|
|
7051
7030
|
class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
7052
7031
|
}, null, 8, ["class"])
|
|
7053
|
-
], 8,
|
|
7032
|
+
], 8, Tu), c.value[e] ? (f(), k("div", Ou, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", ku, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
|
|
7054
7033
|
key: e.id,
|
|
7055
7034
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
7056
|
-
}, [I("div",
|
|
7035
|
+
}, [I("div", Au, [(f(), N(d(j(e.severity === "high" ? Zr : e.severity === "medium" ? Ei : ui)), {
|
|
7057
7036
|
size: 13,
|
|
7058
7037
|
"stroke-width": 2,
|
|
7059
7038
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
7060
|
-
style: L({ color: j(
|
|
7061
|
-
}, null, 8, ["style"])), I("div",
|
|
7062
|
-
I("div",
|
|
7039
|
+
style: L({ color: j(lu)(e.severity) })
|
|
7040
|
+
}, null, 8, ["style"])), I("div", ju, [
|
|
7041
|
+
I("div", Mu, [I("span", {
|
|
7063
7042
|
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",
|
|
7064
7043
|
style: L({
|
|
7065
|
-
color: j(
|
|
7066
|
-
backgroundColor: j(
|
|
7044
|
+
color: j(lu)(e.severity),
|
|
7045
|
+
backgroundColor: j(uu)(e.severity)
|
|
7067
7046
|
})
|
|
7068
|
-
}, D(j(i).scoring.severity[e.severity]), 5), I("span",
|
|
7069
|
-
e.suggestion ? (f(), k("p",
|
|
7070
|
-
e.blockId ? (f(), k("div",
|
|
7047
|
+
}, D(j(i).scoring.severity[e.severity]), 5), I("span", Nu, D(e.message), 1)]),
|
|
7048
|
+
e.suggestion ? (f(), k("p", Pu, D(e.suggestion), 1)) : A("", !0),
|
|
7049
|
+
e.blockId ? (f(), k("div", Fu, [I("button", {
|
|
7071
7050
|
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)]",
|
|
7072
7051
|
style: { "background-color": "transparent" },
|
|
7073
7052
|
disabled: j(o).fixingFindingId.value !== null,
|
|
7074
7053
|
onClick: (t) => g(e)
|
|
7075
|
-
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(
|
|
7054
|
+
}, [j(o).fixingFindingId.value === e.id ? (f(), N(j(di), {
|
|
7076
7055
|
key: 0,
|
|
7077
7056
|
class: "tpl-spinner",
|
|
7078
7057
|
size: 11,
|
|
7079
7058
|
"stroke-width": 2
|
|
7080
|
-
})) : (f(), N(j(
|
|
7059
|
+
})) : (f(), N(j(Ci), {
|
|
7081
7060
|
key: 1,
|
|
7082
7061
|
size: 11,
|
|
7083
7062
|
"stroke-width": 2
|
|
7084
|
-
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8,
|
|
7063
|
+
})), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, Iu), j(o).fixError.value ? (f(), k("p", Lu, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
|
|
7085
7064
|
])])]))), 128))])) : A("", !0)])), 64))
|
|
7086
|
-
])) : (f(), k("div",
|
|
7065
|
+
])) : (f(), k("div", Ru, [V(j(xi), {
|
|
7087
7066
|
size: 32,
|
|
7088
7067
|
"stroke-width": 1.5,
|
|
7089
7068
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
7090
|
-
}), I("p",
|
|
7069
|
+
}), I("p", zu, D(j(i).scoring.emptyState), 1)])), I("p", Bu, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
|
|
7091
7070
|
_: 1
|
|
7092
7071
|
}));
|
|
7093
7072
|
}
|
|
7094
|
-
}),
|
|
7073
|
+
}), Hu = /* @__PURE__ */ e({ default: () => Uu }), Uu = /*#__PURE__*/ Fi(Vu, [["__scopeId", "data-v-3a059e8d"]]), Wu = ["aria-busy"], Gu = {
|
|
7095
7074
|
id: "tpl-test-email-title",
|
|
7096
7075
|
class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
|
|
7097
|
-
},
|
|
7076
|
+
}, Ku = { class: "tpl:mb-3" }, qu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Ju = ["value"], Yu = ["disabled"], Xu = ["value"], Zu = {
|
|
7098
7077
|
key: 0,
|
|
7099
7078
|
role: "alert",
|
|
7100
7079
|
class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
|
|
7101
|
-
},
|
|
7080
|
+
}, Qu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, $u = ["disabled"], ed = ["disabled"], td = {
|
|
7102
7081
|
key: 0,
|
|
7103
7082
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
7104
|
-
},
|
|
7083
|
+
}, nd = { key: 1 }, rd = /*@__PURE__*/ B({
|
|
7105
7084
|
__name: "TestEmailModal",
|
|
7106
7085
|
props: {
|
|
7107
7086
|
visible: { type: Boolean },
|
|
@@ -7111,7 +7090,7 @@ var cu = {
|
|
|
7111
7090
|
},
|
|
7112
7091
|
emits: ["send", "close"],
|
|
7113
7092
|
setup(e, { emit: t }) {
|
|
7114
|
-
let n = e, r = t, { t: i } =
|
|
7093
|
+
let n = e, r = t, { t: i } = Gi(), a = C("");
|
|
7115
7094
|
H(() => n.visible, (e) => {
|
|
7116
7095
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7117
7096
|
});
|
|
@@ -7124,7 +7103,7 @@ var cu = {
|
|
|
7124
7103
|
function l(e) {
|
|
7125
7104
|
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
|
|
7126
7105
|
}
|
|
7127
|
-
return (t, n) => (f(), N(
|
|
7106
|
+
return (t, n) => (f(), N(Go, {
|
|
7128
7107
|
visible: e.visible,
|
|
7129
7108
|
onClose: s,
|
|
7130
7109
|
onKeydown: l
|
|
@@ -7140,14 +7119,14 @@ var cu = {
|
|
|
7140
7119
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7141
7120
|
}
|
|
7142
7121
|
}, [
|
|
7143
|
-
I("h3",
|
|
7144
|
-
I("div",
|
|
7122
|
+
I("h3", Gu, D(j(i).testEmail.title), 1),
|
|
7123
|
+
I("div", Ku, [I("label", qu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
|
|
7145
7124
|
key: 0,
|
|
7146
7125
|
type: "text",
|
|
7147
7126
|
value: a.value,
|
|
7148
7127
|
disabled: "",
|
|
7149
7128
|
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)]"
|
|
7150
|
-
}, null, 8,
|
|
7129
|
+
}, null, 8, Ju)) : c((f(), k("select", {
|
|
7151
7130
|
key: 1,
|
|
7152
7131
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7153
7132
|
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)]",
|
|
@@ -7155,29 +7134,29 @@ var cu = {
|
|
|
7155
7134
|
}, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
|
|
7156
7135
|
key: e,
|
|
7157
7136
|
value: e
|
|
7158
|
-
}, D(e), 9,
|
|
7159
|
-
e.error ? (f(), k("p",
|
|
7160
|
-
I("div",
|
|
7137
|
+
}, D(e), 9, Xu))), 128))], 8, Yu)), [[w, a.value]])]),
|
|
7138
|
+
e.error ? (f(), k("p", Zu, D(e.error), 1)) : A("", !0),
|
|
7139
|
+
I("div", Qu, [I("button", {
|
|
7161
7140
|
type: "button",
|
|
7162
7141
|
class: F(["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 }]),
|
|
7163
7142
|
disabled: e.isSending,
|
|
7164
7143
|
onClick: s
|
|
7165
|
-
}, D(j(i).testEmail.cancel), 11,
|
|
7144
|
+
}, D(j(i).testEmail.cancel), 11, $u), I("button", {
|
|
7166
7145
|
type: "button",
|
|
7167
7146
|
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)]",
|
|
7168
7147
|
disabled: !a.value || e.isSending,
|
|
7169
7148
|
onClick: o
|
|
7170
|
-
}, [e.isSending ? (f(), k("span",
|
|
7149
|
+
}, [e.isSending ? (f(), k("span", td, [V(j(di), {
|
|
7171
7150
|
class: "tpl:animate-spin",
|
|
7172
7151
|
size: 12,
|
|
7173
7152
|
"stroke-width": 2
|
|
7174
|
-
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span",
|
|
7175
|
-
], 8,
|
|
7153
|
+
}), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", nd, D(j(i).testEmail.send), 1))], 8, ed)])
|
|
7154
|
+
], 8, Wu)]),
|
|
7176
7155
|
_: 1
|
|
7177
7156
|
}, 8, ["visible"]));
|
|
7178
7157
|
}
|
|
7179
|
-
}),
|
|
7158
|
+
}), id = /* @__PURE__ */ e({ default: () => ad }), ad = rd;
|
|
7180
7159
|
//#endregion
|
|
7181
|
-
export {
|
|
7160
|
+
export { qi as $, $n as $t, Ho as A, ve as An, qr as At, Ga as B, Te as Bn, Un as Bt, $o as C, yt as Cn, ri as Ct, qo as D, ot as Dn, $r as Dt, Ko as E, st as En, ei as Et, fo as F, we as Fn, gr as Ft, ya as G, fe as Gn, zn as Gt, Ua as H, be as Hn, nr as Ht, mo as I, ge as In, Y as It, da as J, er as Jt, va as K, ue as Kn, Gn as Kt, uo as L, me as Ln, cr as Lt, Ao as M, ye as Mn, X as Mt, wo as N, Ce as Nn, Pr as Nt, Go as O, W as On, Zr as Ot, xo as P, _e as Pn, Cr as Pt, Ji as Q, Yn as Qt, oo as R, xe as Rn, tr as Rt, es as S, gt as Sn, ci as St, Z as T, ct as Tn, ti as Tt, Pa as U, pe as Un, fr as Ut, Wa as V, he as Vn, Wn as Vt, Aa as W, de as Wn, lr as Wt, ea as X, Bn as Xt, na as Y, In as Yt, Qi as Z, Qn as Zt, fs as _, Pt as _n, pi as _t, hl as a, Hn as an, Pi as at, cs as b, vt as bn, ui as bt, ks as c, Cn as cn, Ei as ct, Ss as d, An as dn, Ci as dt, Kn as en, Ki as et, xs as f, Dn as fn, xi as ft, _s as g, sn as gn, mi as gt, vs as h, on as hn, _i as ht, Wl as i, Vn as in, Fi as it, Bo as j, Ee as jn, Kr as jt, Uo as k, Ue as kn, Yr as kt, ws as l, wn as ln, Ti as lt, ys as m, tn as mn, yi as mt, Hu as n, dr as nn, Gi as nt, tc as o, J as on, Ai as ot, bs as p, nn as pn, bi as pt, pa as q, qn as qt, au as r, ir as rn, Hi as rt, As as s, hn as sn, Oi as st, id as t, ur as tn, Wi as tt, Cs as u, q as un, wi as ut, ds as v, Tt as vn, fi as vt, $ as w, lt as wn, ni as wt, is as x, bt as xn, li as xt, ls as y, ut as yn, di as yt, io as z, Se as zn, sr as zt };
|
|
7182
7161
|
|
|
7183
|
-
//# sourceMappingURL=features-
|
|
7162
|
+
//# sourceMappingURL=features-mO5NzwnN.js.map
|