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