@templatical/editor 0.8.2 → 0.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AiChatSidebar-CXpsSTbt.js → AiChatSidebar-CnRXeK77.js} +14 -14
- package/dist/{AiFeatureMenu-CBtADSlv.js → AiFeatureMenu-BYDDrpj6.js} +8 -8
- package/dist/{BlockIssueBadge-FEuyG1p0.js → BlockIssueBadge-DM-vXeD6.js} +5 -5
- package/dist/{CloudEditor-C5iH4_HX.js → CloudEditor-B9a_K6Cm.js} +23 -23
- package/dist/{CollaboratorBar-Bqp1kjPK.js → CollaboratorBar-HN4whzM-.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-0GwjUn2V.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-DvhbtQ5Q.js → ModuleBrowserModal-DPZBsvqk.js} +11 -11
- package/dist/{ModulePreviewCanvas-DJbx-ARl.js → ModulePreviewCanvas-CK4j11-e.js} +3 -3
- package/dist/{NumberWithSuffix-wOM0319c.js → NumberWithSuffix-CxMFy_j3.js} +4 -4
- package/dist/{ParagraphEditor-DcVQcYUK.js → ParagraphEditor-DBus_iHH.js} +28 -28
- package/dist/{RichTextEditorContent-C02UzFoS.js → RichTextEditorContent-B_KCY6T1.js} +6 -6
- package/dist/{SaveModuleDialog-C0Hcbpfe.js → SaveModuleDialog-DORRSbBo.js} +7 -7
- package/dist/{SnapshotHistory-ByXaMG1n.js → SnapshotHistory-DTMVEk03.js} +10 -10
- package/dist/{TemplateScoringPanel-BpQgtaDl.js → TemplateScoringPanel-BIwEwFxD.js} +15 -15
- package/dist/{TestEmailModal-Rdi8WxSm.js → TestEmailModal-DJmYp0Qi.js} +5 -5
- package/dist/{TitleEditor-CT4asLZe.js → TitleEditor-70d9AF1V.js} +15 -15
- package/dist/{TplModal-anuE6Hb0.js → TplModal-BEfwlvPC.js} +4 -4
- package/dist/{blockTypeIcons-8MdDzKgP.js → blockTypeIcons-2DRoPa3K.js} +2 -2
- package/dist/bundle-stats.json +6 -6
- package/dist/cdn/chunks/{AiFeatureMenu-B2lX_OPX.js → AiFeatureMenu-CcuKnisc.js} +3 -3
- package/dist/cdn/chunks/{AiFeatureMenu-B2lX_OPX.js.map → AiFeatureMenu-CcuKnisc.js.map} +1 -1
- package/dist/cdn/chunks/{BlockIssueBadge-CrmWF2hu.js → BlockIssueBadge-Sr3is7Wr.js} +3 -3
- package/dist/cdn/chunks/{BlockIssueBadge-CrmWF2hu.js.map → BlockIssueBadge-Sr3is7Wr.js.map} +1 -1
- package/dist/cdn/chunks/{CloudEditor-Do4-w8x5.js → CloudEditor-Bi10d2Gq.js} +9 -9
- package/dist/cdn/chunks/{CloudEditor-Do4-w8x5.js.map → CloudEditor-Bi10d2Gq.js.map} +1 -1
- package/dist/cdn/chunks/{CollaboratorBar-Xmam6lHp.js → CollaboratorBar-C0zeecvl.js} +5 -5
- package/dist/cdn/chunks/{CollaboratorBar-Xmam6lHp.js.map → CollaboratorBar-C0zeecvl.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownBlock-DadDprcu.js → CountdownBlock-CpSUUDDs.js} +4 -4
- package/dist/cdn/chunks/{CountdownBlock-DadDprcu.js.map → CountdownBlock-CpSUUDDs.js.map} +1 -1
- package/dist/cdn/chunks/{CountdownToolbar-qQC07x3l.js → CountdownToolbar-BBzdR-00.js} +5 -5
- package/dist/cdn/chunks/{CountdownToolbar-qQC07x3l.js.map → CountdownToolbar-BBzdR-00.js.map} +1 -1
- package/dist/cdn/chunks/{IssuesPanel-DWoYjpo4.js → IssuesPanel-Bthq6qoZ.js} +4 -4
- package/dist/cdn/chunks/{IssuesPanel-DWoYjpo4.js.map → IssuesPanel-Bthq6qoZ.js.map} +1 -1
- package/dist/cdn/chunks/{ModuleBrowserModal-BQ2-bR4y.js → ModuleBrowserModal-CFMd6M7E.js} +6 -6
- package/dist/cdn/chunks/{ModuleBrowserModal-BQ2-bR4y.js.map → ModuleBrowserModal-CFMd6M7E.js.map} +1 -1
- package/dist/cdn/chunks/{ModulePreviewCanvas-B57d9ZNW.js → ModulePreviewCanvas-BkcPcF5C.js} +3 -3
- package/dist/cdn/chunks/{ModulePreviewCanvas-B57d9ZNW.js.map → ModulePreviewCanvas-BkcPcF5C.js.map} +1 -1
- package/dist/cdn/chunks/{NumberWithSuffix-CJFH3eNR.js → NumberWithSuffix-C2hH_ZIK.js} +4 -4
- package/dist/cdn/chunks/{NumberWithSuffix-CJFH3eNR.js.map → NumberWithSuffix-C2hH_ZIK.js.map} +1 -1
- package/dist/cdn/chunks/{ParagraphEditor-DPFK_KjR.js → ParagraphEditor-BIWXLPfu.js} +21 -21
- package/dist/cdn/chunks/ParagraphEditor-BIWXLPfu.js.map +1 -0
- package/dist/cdn/chunks/{RichTextEditorContent-frc9A4J9.js → RichTextEditorContent-DU0gc4bi.js} +3 -3
- package/dist/cdn/chunks/{RichTextEditorContent-frc9A4J9.js.map → RichTextEditorContent-DU0gc4bi.js.map} +1 -1
- package/dist/cdn/chunks/{SaveModuleDialog-OgP9rNwp.js → SaveModuleDialog-DR9EZlWe.js} +3 -3
- package/dist/cdn/chunks/{SaveModuleDialog-OgP9rNwp.js.map → SaveModuleDialog-DR9EZlWe.js.map} +1 -1
- package/dist/cdn/chunks/{TitleEditor-DZ_v-LQC.js → TitleEditor-DZcx2N4R.js} +12 -12
- package/dist/cdn/chunks/TitleEditor-DZcx2N4R.js.map +1 -0
- package/dist/cdn/chunks/{blockTypeIcons-DYAslSVB.js → blockTypeIcons-eVGGIdne.js} +3 -3
- package/dist/cdn/chunks/{blockTypeIcons-DYAslSVB.js.map → blockTypeIcons-eVGGIdne.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-IwIDJ7T-.js → extensions-CvCoOuWB.js} +4 -4
- package/dist/cdn/chunks/{extensions-IwIDJ7T-.js.map → extensions-CvCoOuWB.js.map} +1 -1
- package/dist/cdn/chunks/{features-svfaXiyQ.js → features-CUYy5kZQ.js} +737 -731
- package/dist/cdn/chunks/{features-svfaXiyQ.js.map → features-CUYy5kZQ.js.map} +1 -1
- package/dist/cdn/chunks/{icons-BWmUvlwk.js → icons-C4zY5-I3.js} +2 -2
- package/dist/cdn/chunks/{icons-BWmUvlwk.js.map → icons-C4zY5-I3.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-DyxGPQvA.js → media-library-BNt3msId.js} +5 -5
- package/dist/cdn/chunks/{media-library-DyxGPQvA.js.map → media-library-BNt3msId.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-DLJBm0Sf.js → quality-BTPRPGB-.js} +3 -3
- package/dist/cdn/chunks/{quality-DLJBm0Sf.js.map → quality-BTPRPGB-.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-BDRxApzE.js → renderer-IOmuuZjJ.js} +6 -6
- package/dist/cdn/chunks/{renderer-BDRxApzE.js.map → renderer-IOmuuZjJ.js.map} +1 -1
- package/dist/cdn/chunks/{src-DBcvijiJ.js → src-Dp0ZFQ4-.js} +8 -8
- package/dist/cdn/chunks/{src-DBcvijiJ.js.map → src-Dp0ZFQ4-.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--HrprHTR.js → styles-DtgjgsBH.js} +11 -11
- package/dist/cdn/chunks/{styles--HrprHTR.js.map → styles-DtgjgsBH.js.map} +1 -1
- package/dist/cdn/chunks/{tiptap-BCvhHXDe.js → tiptap-BErAJEvo.js} +8 -8
- package/dist/cdn/chunks/{tiptap-BCvhHXDe.js.map → tiptap-BErAJEvo.js.map} +1 -1
- 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-Dz8Ay2FM.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-BjSjVZRA.js → dist-BS5Oi67L.js} +1 -1
- package/dist/{dist-3RAjjDZq.js → dist-BTgujVMy.js} +1 -1
- package/dist/{dist-BoGj0ys1.js → dist-BtDBsF3N.js} +1 -1
- package/dist/{dist-UekZXGFH.js → dist-BySzGkeC.js} +1 -1
- package/dist/{dist-B5FKze93.js → dist-BygsE-n3.js} +3 -3
- package/dist/{dist-DgD8K8y0.js → dist-CDZCyoRy.js} +1 -1
- package/dist/{dist-DPiqL9q5.js → dist-CDtcJMB2.js} +1 -1
- package/dist/{dist-BWVK8w_m.js → dist-D7JUZ2Kd.js} +1 -1
- package/dist/{dist-DpF3BN6Y.js → dist-DWhP3Dp2.js} +780 -780
- package/dist/{dist-qFGe50Kc.js → dist-DnGTaPRX.js} +1 -1
- package/dist/{dist-CkhqaMca.js → dist-HO0vjY5Z.js} +1 -1
- package/dist/{dist-D8IxYzaU.js → dist-T-ORzNfM.js} +3 -3
- package/dist/{dist-DiYYRj9J.js → dist-v-O2Subd.js} +1 -1
- package/dist/{en-CNm94YYD.js → en-ivilDUn0.js} +0 -1
- package/dist/{extensions-BTheidN4.js → extensions-BmGiz8Oo.js} +6 -6
- 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-BUp0dVGV.js → styles-DFeOGKa_.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-CJB2x6Ts.js → useEditorCore-BXz-UXPd.js} +40 -34
- package/dist/{useI18n-tMHqPsE4.js → useI18n-CBbStVlD.js} +2 -2
- package/dist/{useMergeTag-Bv8ASt6n.js → useMergeTag-CS2bmWA0.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 +9 -9
- package/dist/cdn/chunks/ParagraphEditor-DPFK_KjR.js.map +0 -1
- package/dist/cdn/chunks/TitleEditor-DZ_v-LQC.js.map +0 -1
- 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/{dist-DJmnUmW9.js → dist-Cipw2HFH.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,52 +348,52 @@ 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.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${
|
|
376
|
+
function ht(e, t) {
|
|
377
|
+
return e.replace(/(<span[^>]*\sdata-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${mt(r, t)}${a}`);
|
|
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.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${
|
|
391
|
+
function yt(e, t) {
|
|
392
|
+
return e.replace(/(<span[^>]*\sdata-logic-merge-tag="([^"]*)"[^>]*>)(.*?)(<\/span>)/g, (e, n, r, i, a) => `${n}${vt(r, t)}${a}`);
|
|
393
393
|
}
|
|
394
394
|
//#endregion
|
|
395
395
|
//#region ../types/src/config.ts
|
|
396
|
-
var
|
|
396
|
+
var bt = class extends Error {
|
|
397
397
|
statusCode;
|
|
398
398
|
constructor(e, t) {
|
|
399
399
|
super(e), this.statusCode = t, this.name = "SdkError";
|
|
@@ -410,12 +410,12 @@ var xt = class extends Error {
|
|
|
410
410
|
};
|
|
411
411
|
//#endregion
|
|
412
412
|
//#region ../core/src/editor.ts
|
|
413
|
-
function
|
|
413
|
+
function xt(e) {
|
|
414
414
|
return e === "1" ? 1 : e === "3" ? 3 : 2;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function St(e) {
|
|
417
417
|
let t = S({
|
|
418
|
-
content: e.content ??
|
|
418
|
+
content: e.content ?? He(e.defaultFontFamily, e.templateDefaults),
|
|
419
419
|
selectedBlockId: null,
|
|
420
420
|
viewport: "desktop",
|
|
421
421
|
darkMode: !1,
|
|
@@ -503,7 +503,7 @@ function Ct(e) {
|
|
|
503
503
|
if (s(n)) return;
|
|
504
504
|
let o = i(t.content.blocks, n);
|
|
505
505
|
if (o && o.type === "section") {
|
|
506
|
-
if (r < 0 || r >=
|
|
506
|
+
if (r < 0 || r >= xt(o.columns)) return;
|
|
507
507
|
o.children[r] = o.children[r] || [];
|
|
508
508
|
let t = o.children[r];
|
|
509
509
|
a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
|
|
@@ -535,7 +535,7 @@ function Ct(e) {
|
|
|
535
535
|
let u;
|
|
536
536
|
if (r) {
|
|
537
537
|
let e = i(t.content.blocks, r);
|
|
538
|
-
if (!e || e.type !== "section" || a < 0 || a >=
|
|
538
|
+
if (!e || e.type !== "section" || a < 0 || a >= xt(e.columns)) return;
|
|
539
539
|
e.children[a] = e.children[a] || [], u = e.children[a];
|
|
540
540
|
} else u = t.content.blocks;
|
|
541
541
|
let [d] = c.blocks.splice(l, 1);
|
|
@@ -566,9 +566,9 @@ function Ct(e) {
|
|
|
566
566
|
}
|
|
567
567
|
//#endregion
|
|
568
568
|
//#region ../core/src/history.ts
|
|
569
|
-
var
|
|
570
|
-
function
|
|
571
|
-
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i =
|
|
569
|
+
var Ct = 50, wt = 300, Tt = 1500;
|
|
570
|
+
function Et(e) {
|
|
571
|
+
let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Ct } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
|
|
572
572
|
function f() {
|
|
573
573
|
let e = /* @__PURE__ */ new WeakSet();
|
|
574
574
|
return JSON.parse(JSON.stringify(t.value, (t, n) => {
|
|
@@ -593,21 +593,21 @@ function Dt(e) {
|
|
|
593
593
|
if (l && l.blockId === e) {
|
|
594
594
|
clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
|
|
595
595
|
l = null;
|
|
596
|
-
},
|
|
596
|
+
}, wt);
|
|
597
597
|
return;
|
|
598
598
|
}
|
|
599
599
|
m(), p(f()), o.value = [], l = {
|
|
600
600
|
blockId: e,
|
|
601
601
|
timeoutId: setTimeout(() => {
|
|
602
602
|
l = null;
|
|
603
|
-
},
|
|
603
|
+
}, wt)
|
|
604
604
|
};
|
|
605
605
|
}
|
|
606
606
|
}
|
|
607
607
|
function _() {
|
|
608
608
|
s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
|
|
609
609
|
s.value = !1, c = null;
|
|
610
|
-
},
|
|
610
|
+
}, Tt);
|
|
611
611
|
}
|
|
612
612
|
function v() {
|
|
613
613
|
if (a.value.length === 0) return;
|
|
@@ -641,33 +641,33 @@ function Dt(e) {
|
|
|
641
641
|
}
|
|
642
642
|
//#endregion
|
|
643
643
|
//#region ../core/src/block-actions.ts
|
|
644
|
-
function
|
|
644
|
+
function Dt(e) {
|
|
645
645
|
e.type === "table" ? e.rows = e.rows.map((e) => ({
|
|
646
646
|
...e,
|
|
647
|
-
id:
|
|
647
|
+
id: G(),
|
|
648
648
|
cells: e.cells.map((e) => ({
|
|
649
649
|
...e,
|
|
650
|
-
id:
|
|
650
|
+
id: G()
|
|
651
651
|
}))
|
|
652
652
|
})) : e.type === "social" ? e.icons = e.icons.map((e) => ({
|
|
653
653
|
...e,
|
|
654
|
-
id:
|
|
654
|
+
id: G()
|
|
655
655
|
})) : e.type === "menu" && (e.items = e.items.map((e) => ({
|
|
656
656
|
...e,
|
|
657
|
-
id:
|
|
657
|
+
id: G()
|
|
658
658
|
})));
|
|
659
659
|
}
|
|
660
|
-
function
|
|
660
|
+
function Ot(e) {
|
|
661
661
|
let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
|
|
662
662
|
function o(n, r, a) {
|
|
663
|
-
let o =
|
|
663
|
+
let o = ot(n, e.blockDefaults);
|
|
664
664
|
return t(o, r, a), i(o.id), o;
|
|
665
665
|
}
|
|
666
666
|
function s(e, n, r) {
|
|
667
667
|
let o = JSON.parse(JSON.stringify(e));
|
|
668
|
-
if (o.id =
|
|
668
|
+
if (o.id = G(), Dt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
|
|
669
669
|
let t = JSON.parse(JSON.stringify(e));
|
|
670
|
-
return t.id =
|
|
670
|
+
return t.id = G(), Dt(t), t;
|
|
671
671
|
}))), n !== void 0 || r !== void 0) t(o, n, r);
|
|
672
672
|
else {
|
|
673
673
|
let i = a?.(e.id) ?? null;
|
|
@@ -690,7 +690,7 @@ function kt(e) {
|
|
|
690
690
|
}
|
|
691
691
|
//#endregion
|
|
692
692
|
//#region ../core/src/auto-save.ts
|
|
693
|
-
function
|
|
693
|
+
function kt(e) {
|
|
694
694
|
let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
|
|
695
695
|
function c() {
|
|
696
696
|
return typeof a == "function" ? a() : a;
|
|
@@ -728,7 +728,7 @@ function At(e) {
|
|
|
728
728
|
}
|
|
729
729
|
//#endregion
|
|
730
730
|
//#region ../core/src/condition-preview.ts
|
|
731
|
-
function
|
|
731
|
+
function At(e) {
|
|
732
732
|
let t = S(/* @__PURE__ */ new Set()), n = y(() => t.size > 0);
|
|
733
733
|
function r(e) {
|
|
734
734
|
return t.has(e);
|
|
@@ -748,7 +748,7 @@ function jt(e) {
|
|
|
748
748
|
}
|
|
749
749
|
//#endregion
|
|
750
750
|
//#region ../core/src/data-source-fetch.ts
|
|
751
|
-
function
|
|
751
|
+
function jt(e) {
|
|
752
752
|
let t = C(!1), n = C(!1), r = y(() => !!e.definition.value?.dataSource), i = y(() => r.value && !e.block.value.dataSourceFetched);
|
|
753
753
|
async function a() {
|
|
754
754
|
let r = e.definition.value;
|
|
@@ -780,7 +780,7 @@ function Mt(e) {
|
|
|
780
780
|
}
|
|
781
781
|
//#endregion
|
|
782
782
|
//#region ../core/src/history-interceptor.ts
|
|
783
|
-
function
|
|
783
|
+
function Mt(e, t) {
|
|
784
784
|
let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
|
|
785
785
|
e.addBlock = (r, i, a, o) => {
|
|
786
786
|
i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
|
|
@@ -796,10 +796,10 @@ function Nt(e, t) {
|
|
|
796
796
|
}
|
|
797
797
|
//#endregion
|
|
798
798
|
//#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
|
|
799
|
-
function
|
|
799
|
+
function Nt(e, t) {
|
|
800
800
|
return s() ? (l(e, t), !0) : !1;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Pt() {
|
|
803
803
|
let e = /* @__PURE__ */ new Set(), t = (t) => {
|
|
804
804
|
e.delete(t);
|
|
805
805
|
};
|
|
@@ -807,7 +807,7 @@ function Ft() {
|
|
|
807
807
|
on: (n) => {
|
|
808
808
|
e.add(n);
|
|
809
809
|
let r = () => t(n);
|
|
810
|
-
return
|
|
810
|
+
return Nt(r), { off: r };
|
|
811
811
|
},
|
|
812
812
|
off: t,
|
|
813
813
|
trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
|
|
@@ -816,18 +816,18 @@ function Ft() {
|
|
|
816
816
|
}
|
|
817
817
|
};
|
|
818
818
|
}
|
|
819
|
-
var
|
|
819
|
+
var Ft = /* @__PURE__ */ new WeakMap(), It = (...e) => {
|
|
820
820
|
let t = e[0], n = _()?.proxy ?? s();
|
|
821
|
-
if (n == null && !
|
|
822
|
-
return n &&
|
|
823
|
-
},
|
|
821
|
+
if (n == null && !ce()) throw Error("injectLocal must be called in setup");
|
|
822
|
+
return n && Ft.has(n) && t in Ft.get(n) ? Ft.get(n)[t] : v(...e);
|
|
823
|
+
}, Lt = typeof window < "u" && typeof document < "u";
|
|
824
824
|
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
825
|
-
var
|
|
826
|
-
function
|
|
825
|
+
var Rt = (e) => e != null, zt = Object.prototype.toString, Bt = (e) => zt.call(e) === "[object Object]", Vt = () => {}, Ht = (e, t) => Object.hasOwn(e, t), Ut = /* @__PURE__ */ Wt();
|
|
826
|
+
function Wt() {
|
|
827
827
|
var e, t;
|
|
828
|
-
return
|
|
828
|
+
return Lt && !!(!((e = window) == null || (e = e.navigator) == null) && e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window) == null || (t = t.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
829
829
|
}
|
|
830
|
-
function
|
|
830
|
+
function Gt(e, t) {
|
|
831
831
|
function n(...n) {
|
|
832
832
|
return new Promise((r, i) => {
|
|
833
833
|
Promise.resolve(e(() => t.apply(this, n), {
|
|
@@ -839,10 +839,10 @@ function Kt(e, t) {
|
|
|
839
839
|
}
|
|
840
840
|
return n;
|
|
841
841
|
}
|
|
842
|
-
var
|
|
843
|
-
function
|
|
844
|
-
let n, r, i =
|
|
845
|
-
clearTimeout(e), i(), i =
|
|
842
|
+
var Kt = (e) => e();
|
|
843
|
+
function qt(e, t = {}) {
|
|
844
|
+
let n, r, i = Vt, a = (e) => {
|
|
845
|
+
clearTimeout(e), i(), i = Vt;
|
|
846
846
|
}, o;
|
|
847
847
|
return (s) => {
|
|
848
848
|
let c = F(e), l = F(t.maxWait);
|
|
@@ -855,7 +855,7 @@ function Jt(e, t = {}) {
|
|
|
855
855
|
});
|
|
856
856
|
};
|
|
857
857
|
}
|
|
858
|
-
function
|
|
858
|
+
function Jt(e) {
|
|
859
859
|
let t;
|
|
860
860
|
function n() {
|
|
861
861
|
return t ||= e(), t;
|
|
@@ -865,26 +865,26 @@ function Yt(e) {
|
|
|
865
865
|
t = void 0, e && await e;
|
|
866
866
|
}, n;
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function Yt(e) {
|
|
869
869
|
return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
|
|
870
870
|
}
|
|
871
|
-
function
|
|
871
|
+
function Xt(e) {
|
|
872
872
|
return Array.isArray(e) ? e : [e];
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Zt(e) {
|
|
875
875
|
return e || _();
|
|
876
876
|
}
|
|
877
|
-
function
|
|
878
|
-
return
|
|
877
|
+
function Qt(e, t = 200, n = {}) {
|
|
878
|
+
return Gt(qt(t, n), e);
|
|
879
879
|
}
|
|
880
|
-
function
|
|
881
|
-
let { eventFilter: r =
|
|
882
|
-
return
|
|
880
|
+
function $t(e, t, n = {}) {
|
|
881
|
+
let { eventFilter: r = Kt, ...i } = n;
|
|
882
|
+
return U(e, Gt(r, t), i);
|
|
883
883
|
}
|
|
884
|
-
function
|
|
885
|
-
|
|
884
|
+
function en(e, t = !0, n) {
|
|
885
|
+
Zt(n) ? r(e, n) : t ? e() : m(e);
|
|
886
886
|
}
|
|
887
|
-
function
|
|
887
|
+
function tn(e, t = 1e3, r = {}) {
|
|
888
888
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = null, s = n(!1);
|
|
889
889
|
function c() {
|
|
890
890
|
o &&= (clearInterval(o), null);
|
|
@@ -896,15 +896,15 @@ function nn(e, t = 1e3, r = {}) {
|
|
|
896
896
|
let n = F(t);
|
|
897
897
|
n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
|
|
898
898
|
}
|
|
899
|
-
return i &&
|
|
900
|
-
s.value &&
|
|
901
|
-
})),
|
|
899
|
+
return i && Lt && d(), (u(t) || typeof t == "function") && Nt(U(t, () => {
|
|
900
|
+
s.value && Lt && d();
|
|
901
|
+
})), Nt(l), {
|
|
902
902
|
isActive: g(s),
|
|
903
903
|
pause: l,
|
|
904
904
|
resume: d
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function nn(e, t, r = {}) {
|
|
908
908
|
let { immediate: i = !0, immediateCallback: a = !1 } = r, o = n(!1), s;
|
|
909
909
|
function c() {
|
|
910
910
|
s &&= (clearTimeout(s), void 0);
|
|
@@ -917,13 +917,13 @@ function rn(e, t, r = {}) {
|
|
|
917
917
|
o.value = !1, s = void 0, e(...n);
|
|
918
918
|
}, F(t));
|
|
919
919
|
}
|
|
920
|
-
return i && (o.value = !0,
|
|
920
|
+
return i && (o.value = !0, Lt && u()), Nt(l), {
|
|
921
921
|
isPending: g(o),
|
|
922
922
|
start: u,
|
|
923
923
|
stop: l
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function rn(e = !1, t = {}) {
|
|
927
927
|
let { truthyValue: r = !0, falsyValue: i = !1 } = t, a = u(e), o = n(e);
|
|
928
928
|
function s(e) {
|
|
929
929
|
if (arguments.length) return o.value = e, o.value;
|
|
@@ -934,61 +934,61 @@ function an(e = !1, t = {}) {
|
|
|
934
934
|
}
|
|
935
935
|
return a ? s : [o, s];
|
|
936
936
|
}
|
|
937
|
-
function
|
|
937
|
+
function an(e, t, n = {}) {
|
|
938
938
|
let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
|
|
939
|
-
return
|
|
939
|
+
return $t(e, t, {
|
|
940
940
|
...a,
|
|
941
|
-
eventFilter:
|
|
941
|
+
eventFilter: qt(r, { maxWait: i })
|
|
942
942
|
});
|
|
943
943
|
}
|
|
944
|
-
function
|
|
945
|
-
return
|
|
944
|
+
function on(e, t, n) {
|
|
945
|
+
return U(e, t, {
|
|
946
946
|
...n,
|
|
947
947
|
immediate: !0
|
|
948
948
|
});
|
|
949
949
|
}
|
|
950
950
|
//#endregion
|
|
951
951
|
//#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.34_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
|
|
952
|
-
var
|
|
953
|
-
function
|
|
952
|
+
var sn = Lt ? window : void 0, cn = Lt ? window.document : void 0, ln = Lt ? window.navigator : void 0;
|
|
953
|
+
function q(e) {
|
|
954
954
|
let t = F(e);
|
|
955
955
|
return t?.$el ?? t;
|
|
956
956
|
}
|
|
957
|
-
function
|
|
957
|
+
function J(...e) {
|
|
958
958
|
let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = k(() => {
|
|
959
|
-
let t =
|
|
959
|
+
let t = Xt(F(e[0])).filter((e) => e != null);
|
|
960
960
|
return t.every((e) => typeof e != "string") ? t : void 0;
|
|
961
961
|
});
|
|
962
|
-
return
|
|
963
|
-
n.value?.map((e) =>
|
|
964
|
-
|
|
965
|
-
|
|
962
|
+
return on(() => [
|
|
963
|
+
n.value?.map((e) => q(e)) ?? [sn].filter((e) => e != null),
|
|
964
|
+
Xt(F(n.value ? e[1] : e[0])),
|
|
965
|
+
Xt(M(n.value ? e[2] : e[1])),
|
|
966
966
|
F(n.value ? e[3] : e[2])
|
|
967
967
|
], ([e, n, r, i], a, o) => {
|
|
968
968
|
if (!e?.length || !n?.length || !r?.length) return;
|
|
969
|
-
let s =
|
|
969
|
+
let s = Bt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
|
|
970
970
|
o(() => {
|
|
971
971
|
c.forEach((e) => e());
|
|
972
972
|
});
|
|
973
973
|
}, { flush: "post" });
|
|
974
974
|
}
|
|
975
|
-
var
|
|
976
|
-
function
|
|
977
|
-
let { window: r =
|
|
975
|
+
var un = !1;
|
|
976
|
+
function dn(e, t, n = {}) {
|
|
977
|
+
let { window: r = sn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
|
|
978
978
|
if (!r) return s ? {
|
|
979
|
-
stop:
|
|
980
|
-
cancel:
|
|
981
|
-
trigger:
|
|
982
|
-
} :
|
|
983
|
-
if (
|
|
984
|
-
|
|
979
|
+
stop: Vt,
|
|
980
|
+
cancel: Vt,
|
|
981
|
+
trigger: Vt
|
|
982
|
+
} : Vt;
|
|
983
|
+
if (Ut && !un) {
|
|
984
|
+
un = !0;
|
|
985
985
|
let e = { passive: !0 };
|
|
986
|
-
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click",
|
|
986
|
+
Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Vt, e)), r.document.documentElement.addEventListener("click", Vt, e);
|
|
987
987
|
}
|
|
988
988
|
let c = !0, l = (e) => F(i).some((t) => {
|
|
989
989
|
if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
|
|
990
990
|
{
|
|
991
|
-
let n =
|
|
991
|
+
let n = q(t);
|
|
992
992
|
return n && (e.target === n || e.composedPath().includes(n));
|
|
993
993
|
}
|
|
994
994
|
});
|
|
@@ -1001,7 +1001,7 @@ function fn(e, t, n = {}) {
|
|
|
1001
1001
|
return r == null || !Array.isArray(r) ? !1 : r.some((e) => e.el === t.target || t.composedPath().includes(e.el));
|
|
1002
1002
|
}
|
|
1003
1003
|
let f = (n) => {
|
|
1004
|
-
let r =
|
|
1004
|
+
let r = q(e);
|
|
1005
1005
|
if (n.target != null && !(!(r instanceof Element) && u(e) && d(e, n)) && !(!r || r === n.target || n.composedPath().includes(r))) {
|
|
1006
1006
|
if ("detail" in n && n.detail === 0 && (c = !l(n)), !c) {
|
|
1007
1007
|
c = !0;
|
|
@@ -1010,7 +1010,7 @@ function fn(e, t, n = {}) {
|
|
|
1010
1010
|
t(n);
|
|
1011
1011
|
}
|
|
1012
1012
|
}, p = !1, m = [
|
|
1013
|
-
|
|
1013
|
+
J(r, "click", (e) => {
|
|
1014
1014
|
p || (p = !0, setTimeout(() => {
|
|
1015
1015
|
p = !1;
|
|
1016
1016
|
}, 0), f(e));
|
|
@@ -1018,13 +1018,13 @@ function fn(e, t, n = {}) {
|
|
|
1018
1018
|
passive: !0,
|
|
1019
1019
|
capture: a
|
|
1020
1020
|
}),
|
|
1021
|
-
|
|
1022
|
-
let n =
|
|
1021
|
+
J(r, "pointerdown", (t) => {
|
|
1022
|
+
let n = q(e);
|
|
1023
1023
|
c = !l(t) && !!(n && !t.composedPath().includes(n));
|
|
1024
1024
|
}, { passive: !0 }),
|
|
1025
|
-
o &&
|
|
1025
|
+
o && J(r, "blur", (n) => {
|
|
1026
1026
|
setTimeout(() => {
|
|
1027
|
-
let i =
|
|
1027
|
+
let i = q(e), a = r.document.activeElement;
|
|
1028
1028
|
for (; a?.shadowRoot;) a = a.shadowRoot.activeElement;
|
|
1029
1029
|
a?.tagName === "IFRAME" && !i?.contains(r.document.activeElement) && t(n);
|
|
1030
1030
|
}, 0);
|
|
@@ -1040,21 +1040,21 @@ function fn(e, t, n = {}) {
|
|
|
1040
1040
|
}
|
|
1041
1041
|
} : h;
|
|
1042
1042
|
}
|
|
1043
|
-
function
|
|
1043
|
+
function fn() {
|
|
1044
1044
|
let e = n(!1), t = _();
|
|
1045
1045
|
return t && r(() => {
|
|
1046
1046
|
e.value = !0;
|
|
1047
1047
|
}, t), e;
|
|
1048
1048
|
}
|
|
1049
1049
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1050
|
-
function
|
|
1051
|
-
return
|
|
1050
|
+
function pn(e) {
|
|
1051
|
+
return fn(), k(() => !!e());
|
|
1052
1052
|
}
|
|
1053
|
-
function
|
|
1054
|
-
let { window: r =
|
|
1053
|
+
function mn(e, t, n = {}) {
|
|
1054
|
+
let { window: r = sn, ...i } = n, a, o = /* @__PURE__ */ pn(() => r && "MutationObserver" in r), s = () => {
|
|
1055
1055
|
a &&= (a.disconnect(), void 0);
|
|
1056
|
-
}, c =
|
|
1057
|
-
let t =
|
|
1056
|
+
}, c = U(k(() => {
|
|
1057
|
+
let t = Xt(F(e)).map(q).filter(Rt);
|
|
1058
1058
|
return new Set(t);
|
|
1059
1059
|
}), (e) => {
|
|
1060
1060
|
s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
|
|
@@ -1064,39 +1064,39 @@ function hn(e, t, n = {}) {
|
|
|
1064
1064
|
}), l = () => a?.takeRecords(), u = () => {
|
|
1065
1065
|
c(), s();
|
|
1066
1066
|
};
|
|
1067
|
-
return
|
|
1067
|
+
return Nt(u), {
|
|
1068
1068
|
isSupported: o,
|
|
1069
1069
|
stop: u,
|
|
1070
1070
|
takeRecords: l
|
|
1071
1071
|
};
|
|
1072
1072
|
}
|
|
1073
|
-
var
|
|
1073
|
+
var hn = Symbol("vueuse-ssr-width");
|
|
1074
1074
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1075
|
-
function
|
|
1076
|
-
let e =
|
|
1075
|
+
function gn() {
|
|
1076
|
+
let e = ce() ? It(hn, null) : null;
|
|
1077
1077
|
return typeof e == "number" ? e : void 0;
|
|
1078
1078
|
}
|
|
1079
|
-
function
|
|
1080
|
-
let { window: r =
|
|
1079
|
+
function _n(e, t = {}) {
|
|
1080
|
+
let { window: r = sn, ssrWidth: a = /* @__PURE__ */ gn() } = t, o = /* @__PURE__ */ pn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
|
|
1081
1081
|
return i(() => {
|
|
1082
1082
|
if (s.value) {
|
|
1083
1083
|
s.value = !o.value, l.value = F(e).split(",").some((e) => {
|
|
1084
1084
|
let t = e.includes("not all"), n = e.match(/\(\s*min-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), r = e.match(/\(\s*max-width:\s*(-?\d+(?:\.\d*)?[a-z]+\s*)\)/), i = !!(n || r);
|
|
1085
|
-
return n && i && (i = a >=
|
|
1085
|
+
return n && i && (i = a >= Yt(n[1])), r && i && (i = a <= Yt(r[1])), t ? !i : i;
|
|
1086
1086
|
});
|
|
1087
1087
|
return;
|
|
1088
1088
|
}
|
|
1089
1089
|
o.value && (c.value = r.matchMedia(F(e)), l.value = c.value.matches);
|
|
1090
|
-
}),
|
|
1090
|
+
}), J(c, "change", (e) => {
|
|
1091
1091
|
l.value = e.matches;
|
|
1092
1092
|
}, { passive: !0 }), k(() => l.value);
|
|
1093
1093
|
}
|
|
1094
|
-
function
|
|
1095
|
-
let { controls: r = !1, navigator: i =
|
|
1094
|
+
function vn(e, t = {}) {
|
|
1095
|
+
let { controls: r = !1, navigator: i = ln } = t, a = /* @__PURE__ */ pn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
|
|
1096
1096
|
c.value = o.value?.state ?? "prompt";
|
|
1097
1097
|
};
|
|
1098
|
-
|
|
1099
|
-
let u =
|
|
1098
|
+
J(o, "change", l, { passive: !0 });
|
|
1099
|
+
let u = Jt(async () => {
|
|
1100
1100
|
if (a.value) {
|
|
1101
1101
|
if (!o.value) try {
|
|
1102
1102
|
o.value = await i.permissions.query(s);
|
|
@@ -1114,8 +1114,8 @@ function yn(e, t = {}) {
|
|
|
1114
1114
|
query: u
|
|
1115
1115
|
} : c;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1118
|
-
let { navigator: t =
|
|
1117
|
+
function yn(e = {}) {
|
|
1118
|
+
let { navigator: t = ln, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ pn(() => t && "clipboard" in t), c = vn("clipboard-read"), l = vn("clipboard-write"), u = k(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = nn(() => f.value = !1, a, { immediate: !1 }), h = 0;
|
|
1119
1119
|
async function _() {
|
|
1120
1120
|
let e = !(s.value && S(c.value));
|
|
1121
1121
|
if (!e) try {
|
|
@@ -1125,7 +1125,7 @@ function bn(e = {}) {
|
|
|
1125
1125
|
}
|
|
1126
1126
|
e && (d.value = x());
|
|
1127
1127
|
}
|
|
1128
|
-
u.value && r &&
|
|
1128
|
+
u.value && r && J(["copy", "cut"], _, { passive: !0 });
|
|
1129
1129
|
async function v(e) {
|
|
1130
1130
|
let n = e ?? F(i);
|
|
1131
1131
|
if (u.value && n != null) {
|
|
@@ -1167,9 +1167,9 @@ function bn(e = {}) {
|
|
|
1167
1167
|
copy: v
|
|
1168
1168
|
};
|
|
1169
1169
|
}
|
|
1170
|
-
function
|
|
1170
|
+
function bn(e, t = {}) {
|
|
1171
1171
|
let r = n(!1), i = n(null), a = 0, o = !0;
|
|
1172
|
-
if (
|
|
1172
|
+
if (Lt) {
|
|
1173
1173
|
let n = typeof t == "function" ? { onDrop: t } : t, s = n.multiple ?? !0, c = n.preventDefaultForUnhandled ?? !1, l = (e) => {
|
|
1174
1174
|
let t = Array.from(e.dataTransfer?.files ?? []);
|
|
1175
1175
|
return t.length === 0 ? null : s ? t : [t[0]];
|
|
@@ -1205,19 +1205,19 @@ function xn(e, t = {}) {
|
|
|
1205
1205
|
break;
|
|
1206
1206
|
}
|
|
1207
1207
|
};
|
|
1208
|
-
|
|
1208
|
+
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
1209
|
}
|
|
1210
1210
|
return {
|
|
1211
1211
|
files: i,
|
|
1212
1212
|
isOverDropZone: r
|
|
1213
1213
|
};
|
|
1214
1214
|
}
|
|
1215
|
-
function
|
|
1216
|
-
let { window: r =
|
|
1215
|
+
function xn(e, t, n = {}) {
|
|
1216
|
+
let { window: r = sn, ...i } = n, a, o = /* @__PURE__ */ pn(() => r && "ResizeObserver" in r), s = () => {
|
|
1217
1217
|
a &&= (a.disconnect(), void 0);
|
|
1218
|
-
}, c =
|
|
1218
|
+
}, c = U(k(() => {
|
|
1219
1219
|
let t = F(e);
|
|
1220
|
-
return Array.isArray(t) ? t.map((e) =>
|
|
1220
|
+
return Array.isArray(t) ? t.map((e) => q(e)) : [q(t)];
|
|
1221
1221
|
}), (e) => {
|
|
1222
1222
|
if (s(), o.value && r) {
|
|
1223
1223
|
a = new ResizeObserver(t);
|
|
@@ -1229,15 +1229,15 @@ function Sn(e, t, n = {}) {
|
|
|
1229
1229
|
}), l = () => {
|
|
1230
1230
|
s(), c();
|
|
1231
1231
|
};
|
|
1232
|
-
return
|
|
1232
|
+
return Nt(l), {
|
|
1233
1233
|
isSupported: o,
|
|
1234
1234
|
stop: l
|
|
1235
1235
|
};
|
|
1236
1236
|
}
|
|
1237
|
-
function
|
|
1237
|
+
function Sn(e, t = {}) {
|
|
1238
1238
|
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
1239
|
function g() {
|
|
1240
|
-
let t =
|
|
1240
|
+
let t = q(e);
|
|
1241
1241
|
if (!t) {
|
|
1242
1242
|
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
1243
|
return;
|
|
@@ -1248,10 +1248,10 @@ function Cn(e, t = {}) {
|
|
|
1248
1248
|
function _() {
|
|
1249
1249
|
s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
|
|
1250
1250
|
}
|
|
1251
|
-
return
|
|
1251
|
+
return xn(e, _), U(() => q(e), (e) => !e && _()), mn(e, _, { attributeFilter: ["style", "class"] }), a && J("scroll", _, {
|
|
1252
1252
|
capture: !0,
|
|
1253
1253
|
passive: !0
|
|
1254
|
-
}), i &&
|
|
1254
|
+
}), i && J("resize", _, { passive: !0 }), en(() => {
|
|
1255
1255
|
o && _();
|
|
1256
1256
|
}), {
|
|
1257
1257
|
height: c,
|
|
@@ -1265,29 +1265,29 @@ function Cn(e, t = {}) {
|
|
|
1265
1265
|
update: _
|
|
1266
1266
|
};
|
|
1267
1267
|
}
|
|
1268
|
-
function
|
|
1269
|
-
let { root: i, rootMargin: a, threshold: o = 0, window: s =
|
|
1268
|
+
function Cn(e, t, r = {}) {
|
|
1269
|
+
let { root: i, rootMargin: a, threshold: o = 0, window: s = sn, immediate: c = !0 } = r, l = /* @__PURE__ */ pn(() => s && "IntersectionObserver" in s), u = k(() => Xt(F(e)).map(q).filter(Rt)), d = Vt, f = n(c), p = l.value ? U(() => [
|
|
1270
1270
|
u.value,
|
|
1271
|
-
|
|
1271
|
+
q(i),
|
|
1272
1272
|
F(a),
|
|
1273
1273
|
f.value
|
|
1274
1274
|
], ([e, n, r]) => {
|
|
1275
1275
|
if (d(), !f.value || !e.length) return;
|
|
1276
1276
|
let i = new IntersectionObserver(t, {
|
|
1277
|
-
root:
|
|
1277
|
+
root: q(n),
|
|
1278
1278
|
rootMargin: r,
|
|
1279
1279
|
threshold: o
|
|
1280
1280
|
});
|
|
1281
1281
|
e.forEach((e) => e && i.observe(e)), d = () => {
|
|
1282
|
-
i.disconnect(), d =
|
|
1282
|
+
i.disconnect(), d = Vt;
|
|
1283
1283
|
};
|
|
1284
1284
|
}, {
|
|
1285
1285
|
immediate: c,
|
|
1286
1286
|
flush: "post"
|
|
1287
|
-
}) :
|
|
1287
|
+
}) : Vt, m = () => {
|
|
1288
1288
|
d(), p(), f.value = !1;
|
|
1289
1289
|
};
|
|
1290
|
-
return
|
|
1290
|
+
return Nt(m), {
|
|
1291
1291
|
isSupported: l,
|
|
1292
1292
|
isActive: f,
|
|
1293
1293
|
pause() {
|
|
@@ -1299,22 +1299,22 @@ function wn(e, t, r = {}) {
|
|
|
1299
1299
|
stop: m
|
|
1300
1300
|
};
|
|
1301
1301
|
}
|
|
1302
|
-
var
|
|
1302
|
+
var wn = {
|
|
1303
1303
|
multiple: !0,
|
|
1304
1304
|
accept: "*",
|
|
1305
1305
|
reset: !1,
|
|
1306
1306
|
directory: !1
|
|
1307
1307
|
};
|
|
1308
|
-
function
|
|
1308
|
+
function Tn(e) {
|
|
1309
1309
|
if (!e) return null;
|
|
1310
1310
|
if (e instanceof FileList) return e;
|
|
1311
1311
|
let t = new DataTransfer();
|
|
1312
1312
|
for (let n of e) t.items.add(n);
|
|
1313
1313
|
return t.files;
|
|
1314
1314
|
}
|
|
1315
|
-
function
|
|
1316
|
-
let { document: t =
|
|
1317
|
-
let r =
|
|
1315
|
+
function En(e = {}) {
|
|
1316
|
+
let { document: t = cn } = e, n = C(Tn(e.initialFiles)), { on: r, trigger: a } = Pt(), { on: o, trigger: s } = Pt(), c = k(() => {
|
|
1317
|
+
let r = q(e.input) ?? (t ? t.createElement("input") : void 0);
|
|
1318
1318
|
return r && (r.type = "file", r.onchange = (e) => {
|
|
1319
1319
|
n.value = e.target.files, a(n.value);
|
|
1320
1320
|
}, r.oncancel = () => {
|
|
@@ -1324,7 +1324,7 @@ function Dn(e = {}) {
|
|
|
1324
1324
|
n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
|
|
1325
1325
|
}, u = (e) => {
|
|
1326
1326
|
let t = c.value;
|
|
1327
|
-
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory),
|
|
1327
|
+
t && (t.multiple = F(e.multiple), t.accept = F(e.accept), t.webkitdirectory = F(e.directory), Ht(e, "capture") && (t.capture = F(e.capture)));
|
|
1328
1328
|
};
|
|
1329
1329
|
return i(() => {
|
|
1330
1330
|
u(e);
|
|
@@ -1334,7 +1334,7 @@ function Dn(e = {}) {
|
|
|
1334
1334
|
let n = c.value;
|
|
1335
1335
|
if (!n) return;
|
|
1336
1336
|
let r = {
|
|
1337
|
-
...
|
|
1337
|
+
...wn,
|
|
1338
1338
|
...e,
|
|
1339
1339
|
...t
|
|
1340
1340
|
};
|
|
@@ -1347,48 +1347,48 @@ function Dn(e = {}) {
|
|
|
1347
1347
|
}
|
|
1348
1348
|
//#endregion
|
|
1349
1349
|
//#region src/utils/activeEditorTracker.ts
|
|
1350
|
-
var
|
|
1351
|
-
function
|
|
1352
|
-
let e = ++
|
|
1353
|
-
return
|
|
1350
|
+
var Dn = /* @__PURE__ */ new Set(), On = 0, kn = 0;
|
|
1351
|
+
function An() {
|
|
1352
|
+
let e = ++kn;
|
|
1353
|
+
return Dn.add(e), On === 0 && (On = e), {
|
|
1354
1354
|
id: e,
|
|
1355
|
-
isActive: () =>
|
|
1355
|
+
isActive: () => Dn.size <= 1 || On === e,
|
|
1356
1356
|
claim: () => {
|
|
1357
|
-
|
|
1357
|
+
On = e;
|
|
1358
1358
|
},
|
|
1359
1359
|
dispose: () => {
|
|
1360
|
-
if (
|
|
1361
|
-
let e = Array.from(
|
|
1362
|
-
|
|
1360
|
+
if (Dn.delete(e), On === e) {
|
|
1361
|
+
let e = Array.from(Dn);
|
|
1362
|
+
On = e[e.length - 1] ?? 0;
|
|
1363
1363
|
}
|
|
1364
1364
|
}
|
|
1365
1365
|
};
|
|
1366
1366
|
}
|
|
1367
1367
|
//#endregion
|
|
1368
1368
|
//#region src/keys.ts
|
|
1369
|
-
var
|
|
1370
|
-
function
|
|
1369
|
+
var jn = Symbol("translations"), Mn = Symbol("editor"), Nn = Symbol("history"), Pn = Symbol("blockActions"), Fn = Symbol("conditionPreview"), In = Symbol("fontsManager"), Ln = Symbol("themeStyles"), Rn = Symbol("tplUiTheme"), zn = Symbol("blockDefaults"), Bn = Symbol("blockRegistry"), Vn = Symbol("customBlockDefinitions"), Hn = Symbol("mergeTags"), Un = Symbol("mergeTagSyntax"), Wn = Symbol("onRequestMergeTag"), Gn = Symbol("mergeTagAutocomplete"), Kn = Symbol("onRequestMedia"), qn = Symbol("displayConditions"), Jn = Symbol("allowCustomConditions"), Yn = Symbol("capabilities"), Xn = Symbol("keyboardReorder"), Zn = Symbol("templateLint"), Qn = Symbol("editorRoot"), $n = Symbol("popoverRoot"), er = Symbol("authManager"), tr = Symbol("aiConfig"), nr = Symbol("comments"), rr = Symbol("savedModulesHeadless"), ir = Symbol("scoring"), ar = Symbol("cloudTranslations");
|
|
1370
|
+
function Y(e, t) {
|
|
1371
1371
|
let n = v(e, null);
|
|
1372
1372
|
if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
|
|
1373
1373
|
return n;
|
|
1374
1374
|
}
|
|
1375
1375
|
//#endregion
|
|
1376
1376
|
//#region src/composables/useTemplateLint.ts
|
|
1377
|
-
function
|
|
1377
|
+
function or(e) {
|
|
1378
1378
|
return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
|
|
1379
1379
|
}
|
|
1380
|
-
function
|
|
1381
|
-
let t = C([]), r = C(!1), i = C(!1), a = n(null), o =
|
|
1380
|
+
function sr(e) {
|
|
1381
|
+
let t = C([]), r = C(!1), i = C(!1), a = n(null), o = or(e.options), s = null, c = !1;
|
|
1382
1382
|
o || l();
|
|
1383
1383
|
async function l() {
|
|
1384
1384
|
try {
|
|
1385
|
-
let t = await import("./quality-
|
|
1385
|
+
let t = await import("./quality-BTPRPGB-.js").then((e) => e.t);
|
|
1386
1386
|
if (c) return;
|
|
1387
1387
|
a.value = {
|
|
1388
1388
|
lintAccessibility: t.lintAccessibility,
|
|
1389
1389
|
lintStructure: t.lintStructure,
|
|
1390
1390
|
lintLinks: t.lintLinks
|
|
1391
|
-
}, r.value = !0, u(), s =
|
|
1391
|
+
}, r.value = !0, u(), s = an(e.content, u, {
|
|
1392
1392
|
debounce: e.debounce ?? 500,
|
|
1393
1393
|
deep: !0
|
|
1394
1394
|
});
|
|
@@ -1406,7 +1406,7 @@ function cr(e) {
|
|
|
1406
1406
|
...i
|
|
1407
1407
|
];
|
|
1408
1408
|
}
|
|
1409
|
-
let d =
|
|
1409
|
+
let d = U(() => e.options, () => {
|
|
1410
1410
|
a.value && u();
|
|
1411
1411
|
}, { deep: !0 });
|
|
1412
1412
|
function f(t) {
|
|
@@ -1429,8 +1429,8 @@ function cr(e) {
|
|
|
1429
1429
|
}
|
|
1430
1430
|
//#endregion
|
|
1431
1431
|
//#region src/composables/useI18n.ts
|
|
1432
|
-
function
|
|
1433
|
-
let t = e ?? v(
|
|
1432
|
+
function cr(e) {
|
|
1433
|
+
let t = e ?? v(jn, null);
|
|
1434
1434
|
if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
|
|
1435
1435
|
let n = u(t) ? t.value : t;
|
|
1436
1436
|
function r(e, t) {
|
|
@@ -1545,7 +1545,7 @@ function ur(e, t) {
|
|
|
1545
1545
|
//#endregion
|
|
1546
1546
|
//#region src/composables/useUiTheme.ts
|
|
1547
1547
|
function dr(e) {
|
|
1548
|
-
let t =
|
|
1548
|
+
let t = _n("(prefers-color-scheme: dark)");
|
|
1549
1549
|
return { resolvedTheme: k(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
|
|
1550
1550
|
}
|
|
1551
1551
|
//#endregion
|
|
@@ -1609,13 +1609,13 @@ var gr = {
|
|
|
1609
1609
|
function _r() {
|
|
1610
1610
|
let e = n(/* @__PURE__ */ new Map());
|
|
1611
1611
|
function t(t, n) {
|
|
1612
|
-
e.value.set(t, n),
|
|
1612
|
+
e.value.set(t, n), ae(e);
|
|
1613
1613
|
}
|
|
1614
1614
|
function r(t, n) {
|
|
1615
1615
|
let r = `custom:${t.type}`;
|
|
1616
1616
|
e.value.set(r, {
|
|
1617
1617
|
component: n,
|
|
1618
|
-
createBlock: () =>
|
|
1618
|
+
createBlock: () => at(t),
|
|
1619
1619
|
sidebarItem: {
|
|
1620
1620
|
type: r,
|
|
1621
1621
|
label: t.name,
|
|
@@ -1624,7 +1624,7 @@ function _r() {
|
|
|
1624
1624
|
isCustom: !0
|
|
1625
1625
|
},
|
|
1626
1626
|
definition: t
|
|
1627
|
-
}),
|
|
1627
|
+
}), ae(e);
|
|
1628
1628
|
}
|
|
1629
1629
|
function i(t) {
|
|
1630
1630
|
if (t.type === "custom") {
|
|
@@ -1652,7 +1652,7 @@ function _r() {
|
|
|
1652
1652
|
let t = s(e.customType);
|
|
1653
1653
|
if (!t) return c("Block definition not found");
|
|
1654
1654
|
try {
|
|
1655
|
-
let { Liquid: n } = await import("./liquid.browser-
|
|
1655
|
+
let { Liquid: n } = await import("./liquid.browser-rMoPo2t_.js");
|
|
1656
1656
|
return await new n({
|
|
1657
1657
|
strictVariables: !1,
|
|
1658
1658
|
strictFilters: !1
|
|
@@ -1681,67 +1681,67 @@ var vr = [
|
|
|
1681
1681
|
{
|
|
1682
1682
|
type: "section",
|
|
1683
1683
|
label: "Section",
|
|
1684
|
-
createBlock:
|
|
1684
|
+
createBlock: Ye
|
|
1685
1685
|
},
|
|
1686
1686
|
{
|
|
1687
1687
|
type: "title",
|
|
1688
1688
|
label: "Title",
|
|
1689
|
-
createBlock:
|
|
1689
|
+
createBlock: We
|
|
1690
1690
|
},
|
|
1691
1691
|
{
|
|
1692
1692
|
type: "paragraph",
|
|
1693
1693
|
label: "Paragraph",
|
|
1694
|
-
createBlock:
|
|
1694
|
+
createBlock: Ge
|
|
1695
1695
|
},
|
|
1696
1696
|
{
|
|
1697
1697
|
type: "image",
|
|
1698
1698
|
label: "Image",
|
|
1699
|
-
createBlock:
|
|
1699
|
+
createBlock: Ke
|
|
1700
1700
|
},
|
|
1701
1701
|
{
|
|
1702
1702
|
type: "button",
|
|
1703
1703
|
label: "Button",
|
|
1704
|
-
createBlock:
|
|
1704
|
+
createBlock: qe
|
|
1705
1705
|
},
|
|
1706
1706
|
{
|
|
1707
1707
|
type: "divider",
|
|
1708
1708
|
label: "Divider",
|
|
1709
|
-
createBlock:
|
|
1709
|
+
createBlock: Je
|
|
1710
1710
|
},
|
|
1711
1711
|
{
|
|
1712
1712
|
type: "video",
|
|
1713
1713
|
label: "Video",
|
|
1714
|
-
createBlock:
|
|
1714
|
+
createBlock: Xe
|
|
1715
1715
|
},
|
|
1716
1716
|
{
|
|
1717
1717
|
type: "social",
|
|
1718
1718
|
label: "Social",
|
|
1719
|
-
createBlock:
|
|
1719
|
+
createBlock: Ze
|
|
1720
1720
|
},
|
|
1721
1721
|
{
|
|
1722
1722
|
type: "menu",
|
|
1723
1723
|
label: "Menu",
|
|
1724
|
-
createBlock:
|
|
1724
|
+
createBlock: et
|
|
1725
1725
|
},
|
|
1726
1726
|
{
|
|
1727
1727
|
type: "table",
|
|
1728
1728
|
label: "Table",
|
|
1729
|
-
createBlock:
|
|
1729
|
+
createBlock: nt
|
|
1730
1730
|
},
|
|
1731
1731
|
{
|
|
1732
1732
|
type: "spacer",
|
|
1733
1733
|
label: "Spacer",
|
|
1734
|
-
createBlock:
|
|
1734
|
+
createBlock: Qe
|
|
1735
1735
|
},
|
|
1736
1736
|
{
|
|
1737
1737
|
type: "html",
|
|
1738
1738
|
label: "HTML",
|
|
1739
|
-
createBlock:
|
|
1739
|
+
createBlock: $e
|
|
1740
1740
|
},
|
|
1741
1741
|
{
|
|
1742
1742
|
type: "countdown",
|
|
1743
1743
|
label: "Countdown",
|
|
1744
|
-
createBlock:
|
|
1744
|
+
createBlock: rt
|
|
1745
1745
|
}
|
|
1746
1746
|
];
|
|
1747
1747
|
function yr(e, t) {
|
|
@@ -1788,7 +1788,7 @@ function xr(e, t) {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
//#endregion
|
|
1790
1790
|
//#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
|
|
1791
|
-
var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */
|
|
1791
|
+
var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ V({
|
|
1792
1792
|
__name: "ButtonBlock",
|
|
1793
1793
|
props: {
|
|
1794
1794
|
block: {},
|
|
@@ -1809,9 +1809,9 @@ var Sr = { class: "tpl:text-center" }, Cr = ["href"], wr = /* @__PURE__ */ B({
|
|
|
1809
1809
|
};
|
|
1810
1810
|
return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
|
|
1811
1811
|
});
|
|
1812
|
-
return (t, r) => (f(), A("div", Sr, [
|
|
1812
|
+
return (t, r) => (f(), A("div", Sr, [L("a", {
|
|
1813
1813
|
href: e.block.url || "#",
|
|
1814
|
-
style:
|
|
1814
|
+
style: R(n.value),
|
|
1815
1815
|
class: "tpl:cursor-default",
|
|
1816
1816
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
1817
1817
|
}, O(e.block.text), 13, Cr)]));
|
|
@@ -2319,7 +2319,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2319
2319
|
"src",
|
|
2320
2320
|
"width",
|
|
2321
2321
|
"height"
|
|
2322
|
-
], wi = /* @__PURE__ */
|
|
2322
|
+
], wi = /* @__PURE__ */ V({
|
|
2323
2323
|
__name: "CustomBlockIcon",
|
|
2324
2324
|
props: {
|
|
2325
2325
|
icon: {},
|
|
@@ -2330,7 +2330,7 @@ var Nr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
|
|
|
2330
2330
|
return (t, a) => r.value ? (f(), A("span", {
|
|
2331
2331
|
key: 0,
|
|
2332
2332
|
class: "tpl:inline-flex tpl:items-center tpl:justify-center",
|
|
2333
|
-
style:
|
|
2333
|
+
style: R({
|
|
2334
2334
|
width: `${n.value}px`,
|
|
2335
2335
|
height: `${n.value}px`
|
|
2336
2336
|
}),
|
|
@@ -2360,7 +2360,7 @@ var ki = /* @__PURE__ */ Ti(Ei, [["render", Oi], ["__scopeId", "data-v-1ed538ec"
|
|
|
2360
2360
|
//#endregion
|
|
2361
2361
|
//#region src/composables/useEditorRoot.ts
|
|
2362
2362
|
function Ai() {
|
|
2363
|
-
return v(
|
|
2363
|
+
return v(Qn, document) ?? document;
|
|
2364
2364
|
}
|
|
2365
2365
|
//#endregion
|
|
2366
2366
|
//#region src/composables/useFocusTrap.ts
|
|
@@ -2383,13 +2383,13 @@ function Mi(e, t) {
|
|
|
2383
2383
|
a = null;
|
|
2384
2384
|
let t = o();
|
|
2385
2385
|
t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
|
|
2386
|
-
}), i =
|
|
2386
|
+
}), i = J(e, "keydown", s);
|
|
2387
2387
|
}
|
|
2388
2388
|
function u(e = {}) {
|
|
2389
2389
|
let t = e.restoreFocus !== !1;
|
|
2390
2390
|
a !== null && (typeof cancelAnimationFrame < "u" && cancelAnimationFrame(a), a = null), i?.(), i = null, t && r && r.focus && (r.focus(), r = null);
|
|
2391
2391
|
}
|
|
2392
|
-
let d =
|
|
2392
|
+
let d = U([t, e], ([e, t]) => {
|
|
2393
2393
|
e && t ? c() : u();
|
|
2394
2394
|
}, { flush: "post" });
|
|
2395
2395
|
l(() => {
|
|
@@ -2402,7 +2402,7 @@ function Ni(e, t) {
|
|
|
2402
2402
|
return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
|
|
2403
2403
|
}
|
|
2404
2404
|
function Pi(e) {
|
|
2405
|
-
let t = e ?? v(
|
|
2405
|
+
let t = e ?? v(ar, null);
|
|
2406
2406
|
return {
|
|
2407
2407
|
t: t ? u(t) ? t.value : t : null,
|
|
2408
2408
|
format: Ni
|
|
@@ -2419,12 +2419,12 @@ function Fi(e) {
|
|
|
2419
2419
|
//#endregion
|
|
2420
2420
|
//#region src/composables/useMergeTag.ts
|
|
2421
2421
|
function Ii() {
|
|
2422
|
-
let e = v(
|
|
2422
|
+
let e = v(Hn, []), t = v(Un, ct.liquid), n = v(Wn, null), r = v(Gn, !0), i = C(!1);
|
|
2423
2423
|
function a(e) {
|
|
2424
|
-
return
|
|
2424
|
+
return pt(e, t);
|
|
2425
2425
|
}
|
|
2426
2426
|
function o(t) {
|
|
2427
|
-
return
|
|
2427
|
+
return mt(t, e);
|
|
2428
2428
|
}
|
|
2429
2429
|
async function s() {
|
|
2430
2430
|
if (!n) return null;
|
|
@@ -2449,12 +2449,12 @@ function Ii() {
|
|
|
2449
2449
|
//#endregion
|
|
2450
2450
|
//#region src/composables/useEmoji.ts
|
|
2451
2451
|
function Li() {
|
|
2452
|
-
let [e, t] =
|
|
2452
|
+
let [e, t] = rn(!1), r = n([]), i = !1;
|
|
2453
2453
|
l(() => {
|
|
2454
2454
|
i = !0;
|
|
2455
|
-
}),
|
|
2455
|
+
}), U(e, async (e) => {
|
|
2456
2456
|
if (e && r.value.length === 0) {
|
|
2457
|
-
let { emojiCategories: e } = await import("./emojiData-
|
|
2457
|
+
let { emojiCategories: e } = await import("./emojiData-6m0DBh7O.js");
|
|
2458
2458
|
if (i) return;
|
|
2459
2459
|
r.value = e;
|
|
2460
2460
|
}
|
|
@@ -2694,7 +2694,7 @@ function Ui(e) {
|
|
|
2694
2694
|
//#endregion
|
|
2695
2695
|
//#region src/composables/useRichTextEditor.ts
|
|
2696
2696
|
function Wi(e) {
|
|
2697
|
-
let t = v(
|
|
2697
|
+
let t = v(Mn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = Ii(), l = v(jn, 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 } = Ui(p), { start: w, stop: T } = nn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), E = n(null), D = C(!0), O = C(null), ee = !1;
|
|
2698
2698
|
async function te() {
|
|
2699
2699
|
O.value = null, D.value = !0;
|
|
2700
2700
|
try {
|
|
@@ -2731,7 +2731,7 @@ function Wi(e) {
|
|
|
2731
2731
|
p.value?.destroy(), p.value = null, te();
|
|
2732
2732
|
}
|
|
2733
2733
|
te();
|
|
2734
|
-
let A =
|
|
2734
|
+
let A = U(() => e.blockContent(), (e) => {
|
|
2735
2735
|
p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
|
|
2736
2736
|
});
|
|
2737
2737
|
function j(t) {
|
|
@@ -2739,7 +2739,7 @@ function Wi(e) {
|
|
|
2739
2739
|
let n = t.composedPath().find((e) => e instanceof HTMLElement);
|
|
2740
2740
|
n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
|
|
2741
2741
|
}
|
|
2742
|
-
|
|
2742
|
+
J(document, "mousedown", j), ne(() => {
|
|
2743
2743
|
ee = !0, A(), T(), p.value?.destroy();
|
|
2744
2744
|
});
|
|
2745
2745
|
async function M() {
|
|
@@ -2785,7 +2785,7 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2785
2785
|
key: 0,
|
|
2786
2786
|
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
2787
|
style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
|
|
2788
|
-
}, $i = /* @__PURE__ */
|
|
2788
|
+
}, $i = /* @__PURE__ */ V({
|
|
2789
2789
|
__name: "CustomBlock",
|
|
2790
2790
|
props: {
|
|
2791
2791
|
block: {},
|
|
@@ -2793,7 +2793,7 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2793
2793
|
},
|
|
2794
2794
|
emits: ["fetchData"],
|
|
2795
2795
|
setup(e, { emit: t }) {
|
|
2796
|
-
let n = e, i = t, { t: a } =
|
|
2796
|
+
let n = e, i = t, { t: a } = cr(), o = v(Bn, 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 } = jt({
|
|
2797
2797
|
definition: l,
|
|
2798
2798
|
block: k(() => n.block),
|
|
2799
2799
|
onUpdate: (e, t) => {
|
|
@@ -2814,15 +2814,15 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2814
2814
|
}
|
|
2815
2815
|
}
|
|
2816
2816
|
}
|
|
2817
|
-
let _ =
|
|
2817
|
+
let _ = Qt(g, 150);
|
|
2818
2818
|
return r(() => {
|
|
2819
2819
|
g();
|
|
2820
|
-
}),
|
|
2820
|
+
}), U(() => n.block.fieldValues, () => {
|
|
2821
2821
|
_();
|
|
2822
|
-
}, { deep: !0 }), (e, t) => (f(), A("div", Gi, [u.value ? c.value ? (f(), A("div", Ji, [
|
|
2822
|
+
}, { deep: !0 }), (e, t) => (f(), A("div", Gi, [u.value ? c.value ? (f(), A("div", Ji, [H(M(gi), {
|
|
2823
2823
|
size: 24,
|
|
2824
2824
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
2825
|
-
}),
|
|
2825
|
+
}), L("span", Yi, O(M(a).customBlocks.renderError), 1)])) : (f(), A("div", Xi, [L("div", { innerHTML: s.value }, null, 8, Zi), M(h) && M(m) ? (f(), A("div", Qi, [M(d) ? (f(), P(ki, {
|
|
2826
2826
|
key: 1,
|
|
2827
2827
|
class: "tpl:w-48"
|
|
2828
2828
|
})) : (f(), A("button", {
|
|
@@ -2834,12 +2834,12 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2834
2834
|
key: 0,
|
|
2835
2835
|
icon: l.value.icon,
|
|
2836
2836
|
size: 16
|
|
2837
|
-
}, null, 8, ["icon"])) : j("", !0),
|
|
2837
|
+
}, null, 8, ["icon"])) : j("", !0), B(" " + O(l.value?.dataSource?.label || M(a).customBlocks.dataSource.fetchButton), 1)]))])) : j("", !0)])) : (f(), A("div", Ki, [H(M(ai), {
|
|
2838
2838
|
size: 24,
|
|
2839
2839
|
class: "tpl:text-[var(--tpl-warning)]"
|
|
2840
|
-
}),
|
|
2840
|
+
}), L("span", qi, O(M(a).customBlocks.definitionNotFound), 1)]))]));
|
|
2841
2841
|
}
|
|
2842
|
-
}), ea = { class: "tpl:w-full" }, ta = /* @__PURE__ */
|
|
2842
|
+
}), ea = { class: "tpl:w-full" }, ta = /* @__PURE__ */ V({
|
|
2843
2843
|
__name: "DividerBlock",
|
|
2844
2844
|
props: {
|
|
2845
2845
|
block: {},
|
|
@@ -2851,9 +2851,9 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2851
2851
|
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
2852
2852
|
margin: t.block.width === "full" ? "0" : "0 auto"
|
|
2853
2853
|
}));
|
|
2854
|
-
return (e, t) => (f(), A("div", ea, [
|
|
2854
|
+
return (e, t) => (f(), A("div", ea, [L("hr", {
|
|
2855
2855
|
class: "tpl:m-0 tpl:border-none",
|
|
2856
|
-
style:
|
|
2856
|
+
style: R(n.value)
|
|
2857
2857
|
}, null, 4)]));
|
|
2858
2858
|
}
|
|
2859
2859
|
}), na = { class: "tpl:w-full" }, ra = { 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)]" }, ia = {
|
|
@@ -2862,15 +2862,15 @@ var Gi = { class: "tpl:w-full" }, Ki = {
|
|
|
2862
2862
|
}, aa = {
|
|
2863
2863
|
key: 1,
|
|
2864
2864
|
class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
|
|
2865
|
-
}, oa = /* @__PURE__ */
|
|
2865
|
+
}, oa = /* @__PURE__ */ V({
|
|
2866
2866
|
__name: "HtmlBlock",
|
|
2867
2867
|
props: {
|
|
2868
2868
|
block: {},
|
|
2869
2869
|
viewport: {}
|
|
2870
2870
|
},
|
|
2871
2871
|
setup(e) {
|
|
2872
|
-
let t = e, { t: n } =
|
|
2873
|
-
return (e, t) => (f(), A("div", na, [
|
|
2872
|
+
let t = e, { t: n } = cr(), r = k(() => t.block.content.trim().length > 0);
|
|
2873
|
+
return (e, t) => (f(), A("div", na, [L("div", ra, [H(M(Wr), {
|
|
2874
2874
|
size: 24,
|
|
2875
2875
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
2876
2876
|
}), r.value ? (f(), A("span", ia, O(M(n).html.preview), 1)) : (f(), A("span", aa, O(M(n).html.empty), 1))])]));
|
|
@@ -2892,7 +2892,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2892
2892
|
}, fa = ["href"], pa = ["src", "alt"], ma = ["src", "alt"], ha = {
|
|
2893
2893
|
key: 3,
|
|
2894
2894
|
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
|
-
}, ga = ["aria-label"], _a = { key: 1 }, va = /* @__PURE__ */
|
|
2895
|
+
}, ga = ["aria-label"], _a = { key: 1 }, va = /* @__PURE__ */ V({
|
|
2896
2896
|
__name: "ImageBlock",
|
|
2897
2897
|
props: {
|
|
2898
2898
|
block: {},
|
|
@@ -2900,7 +2900,7 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2900
2900
|
},
|
|
2901
2901
|
emits: ["update"],
|
|
2902
2902
|
setup(e, { emit: t }) {
|
|
2903
|
-
let n = e, r = t, { t: i } =
|
|
2903
|
+
let n = e, r = t, { t: i } = cr(), { syntax: a } = Ii(), o = v(Kn, null), s = k(() => !!o), c = sa();
|
|
2904
2904
|
async function l() {
|
|
2905
2905
|
let e = await o?.({ accept: ["images"] });
|
|
2906
2906
|
if (c.alive && e) {
|
|
@@ -2908,82 +2908,85 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2908
2908
|
e.alt && (t.alt = e.alt), r("update", t);
|
|
2909
2909
|
}
|
|
2910
2910
|
}
|
|
2911
|
-
let u = k(() => ({ textAlign: n.block.align })), d = k(() =>
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2911
|
+
let u = k(() => ({ textAlign: n.block.align })), d = k(() => {
|
|
2912
|
+
let e = n.block.align;
|
|
2913
|
+
return {
|
|
2914
|
+
maxWidth: "100%",
|
|
2915
|
+
width: n.block.width === "full" ? "100%" : `${n.block.width}px`,
|
|
2916
|
+
display: "block",
|
|
2917
|
+
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
2918
|
+
marginRight: e === "center" ? "auto" : void 0
|
|
2919
|
+
};
|
|
2920
|
+
}), p = k(() => gt(n.block.src, a));
|
|
2918
2921
|
return (t, n) => (f(), A("div", {
|
|
2919
2922
|
class: "tpl:w-full",
|
|
2920
|
-
style:
|
|
2921
|
-
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), A(
|
|
2923
|
+
style: R(u.value)
|
|
2924
|
+
}, [e.block.src && p.value && e.block.placeholderUrl ? (f(), A(z, { key: 0 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2922
2925
|
key: 0,
|
|
2923
2926
|
href: e.block.linkUrl,
|
|
2924
2927
|
target: "_blank",
|
|
2925
2928
|
rel: "noopener noreferrer",
|
|
2926
2929
|
onClick: n[0] ||= N(() => {}, ["prevent"])
|
|
2927
|
-
}, [
|
|
2930
|
+
}, [L("img", {
|
|
2928
2931
|
class: "tpl:border-0",
|
|
2929
2932
|
loading: "lazy",
|
|
2930
2933
|
src: e.block.placeholderUrl,
|
|
2931
2934
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2932
|
-
style:
|
|
2935
|
+
style: R(d.value)
|
|
2933
2936
|
}, null, 12, la)], 8, ca)) : (f(), A("img", {
|
|
2934
2937
|
key: 1,
|
|
2935
2938
|
class: "tpl:border-0",
|
|
2936
2939
|
src: e.block.placeholderUrl,
|
|
2937
2940
|
alt: e.block.alt,
|
|
2938
|
-
style:
|
|
2941
|
+
style: R(d.value)
|
|
2939
2942
|
}, null, 12, ua))], 64)) : e.block.src && p.value ? (f(), A("div", {
|
|
2940
2943
|
key: 1,
|
|
2941
2944
|
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)]",
|
|
2942
|
-
style:
|
|
2943
|
-
}, [
|
|
2945
|
+
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, d.value])
|
|
2946
|
+
}, [H(M($r), {
|
|
2944
2947
|
size: 32,
|
|
2945
2948
|
"stroke-width": 1.5,
|
|
2946
2949
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
2947
2950
|
style: { opacity: "0.5" }
|
|
2948
|
-
}),
|
|
2951
|
+
}), L("span", da, O(e.block.src), 1)], 4)) : e.block.src ? (f(), A(z, { key: 2 }, [e.block.linkUrl ? (f(), A("a", {
|
|
2949
2952
|
key: 0,
|
|
2950
2953
|
href: e.block.linkUrl,
|
|
2951
2954
|
target: "_blank",
|
|
2952
2955
|
rel: "noopener noreferrer",
|
|
2953
2956
|
onClick: n[1] ||= N(() => {}, ["prevent"])
|
|
2954
|
-
}, [
|
|
2957
|
+
}, [L("img", {
|
|
2955
2958
|
class: "tpl:border-0",
|
|
2956
2959
|
loading: "lazy",
|
|
2957
2960
|
src: e.block.src,
|
|
2958
2961
|
alt: e.block.alt || M(i).image.altTextPlaceholder,
|
|
2959
|
-
style:
|
|
2962
|
+
style: R(d.value)
|
|
2960
2963
|
}, null, 12, pa)], 8, fa)) : (f(), A("img", {
|
|
2961
2964
|
key: 1,
|
|
2962
2965
|
class: "tpl:border-0",
|
|
2963
2966
|
src: e.block.src,
|
|
2964
2967
|
alt: e.block.alt,
|
|
2965
|
-
style:
|
|
2968
|
+
style: R(d.value)
|
|
2966
2969
|
}, null, 12, ma))], 64)) : (f(), A("div", ha, [s.value ? (f(), A("button", {
|
|
2967
2970
|
key: 0,
|
|
2968
2971
|
"aria-label": M(i).image.browseMedia,
|
|
2969
2972
|
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)]",
|
|
2970
2973
|
onClick: N(l, ["stop"])
|
|
2971
|
-
}, [
|
|
2974
|
+
}, [H(M($r), {
|
|
2972
2975
|
size: 14,
|
|
2973
2976
|
"stroke-width": 1.5
|
|
2974
|
-
}),
|
|
2977
|
+
}), B(" " + O(M(i).image.browseMedia), 1)], 8, ga)) : (f(), A("span", _a, O(M(i).image.clickToAdd), 1))]))], 4));
|
|
2975
2978
|
}
|
|
2976
2979
|
}), ya = { class: "tpl:w-full" }, ba = ["href"], xa = {
|
|
2977
2980
|
key: 1,
|
|
2978
2981
|
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)]"
|
|
2979
|
-
}, Sa = /* @__PURE__ */
|
|
2982
|
+
}, Sa = /* @__PURE__ */ V({
|
|
2980
2983
|
__name: "MenuBlock",
|
|
2981
2984
|
props: {
|
|
2982
2985
|
block: {},
|
|
2983
2986
|
viewport: {}
|
|
2984
2987
|
},
|
|
2985
2988
|
setup(e) {
|
|
2986
|
-
let t = e, { t: n } =
|
|
2989
|
+
let t = e, { t: n } = cr(), r = k(() => ({
|
|
2987
2990
|
display: "flex",
|
|
2988
2991
|
flexWrap: "wrap",
|
|
2989
2992
|
gap: `0 ${t.block.spacing}px`,
|
|
@@ -2997,11 +3000,11 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
2997
3000
|
}
|
|
2998
3001
|
return (t, o) => (f(), A("div", ya, [i.value ? (f(), A("div", {
|
|
2999
3002
|
key: 0,
|
|
3000
|
-
style:
|
|
3001
|
-
}, [(f(!0), A(
|
|
3003
|
+
style: R(r.value)
|
|
3004
|
+
}, [(f(!0), A(z, null, h(e.block.items, (t, n) => (f(), A(z, { key: t.id }, [L("a", {
|
|
3002
3005
|
href: t.url || "#",
|
|
3003
3006
|
class: "tpl:cursor-default tpl:no-underline",
|
|
3004
|
-
style:
|
|
3007
|
+
style: R({
|
|
3005
3008
|
color: a(t.color),
|
|
3006
3009
|
fontWeight: t.bold ? "bold" : "normal",
|
|
3007
3010
|
textDecoration: t.underline ? "underline" : "none"
|
|
@@ -3009,11 +3012,11 @@ var ca = ["href"], la = ["src", "alt"], ua = ["src", "alt"], da = {
|
|
|
3009
3012
|
onClick: o[0] ||= N(() => {}, ["prevent"])
|
|
3010
3013
|
}, O(t.text || "..."), 13, ba), n < e.block.items.length - 1 ? (f(), A("span", {
|
|
3011
3014
|
key: 0,
|
|
3012
|
-
style:
|
|
3015
|
+
style: R({
|
|
3013
3016
|
color: e.block.separatorColor,
|
|
3014
3017
|
padding: `0 ${e.block.spacing}px`
|
|
3015
3018
|
})
|
|
3016
|
-
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", xa, [
|
|
3019
|
+
}, O(e.block.separator), 5)) : j("", !0)], 64))), 128))], 4)) : (f(), A("div", xa, [H(M(ri), { size: 16 }), L("span", null, O(M(n).menu.addLinks), 1)]))]));
|
|
3017
3020
|
}
|
|
3018
3021
|
}), Ca = new Set([
|
|
3019
3022
|
"http",
|
|
@@ -3087,7 +3090,7 @@ function Oa(e) {
|
|
|
3087
3090
|
//#endregion
|
|
3088
3091
|
//#region src/composables/useEditableTextBlock.ts
|
|
3089
3092
|
function ka(e) {
|
|
3090
|
-
let t = v(
|
|
3093
|
+
let t = v(Hn, []), { syntax: n } = Ii(), r = k(() => Oa(yt(ht(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Sn(a), c = k(() => ({
|
|
3091
3094
|
top: o.value - 8,
|
|
3092
3095
|
left: s.value
|
|
3093
3096
|
}));
|
|
@@ -3108,14 +3111,14 @@ function ka(e) {
|
|
|
3108
3111
|
}
|
|
3109
3112
|
//#endregion
|
|
3110
3113
|
//#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
|
|
3111
|
-
var Aa = ["innerHTML"], ja = /* @__PURE__ */
|
|
3114
|
+
var Aa = ["innerHTML"], ja = /* @__PURE__ */ V({
|
|
3112
3115
|
__name: "ParagraphBlock",
|
|
3113
3116
|
props: {
|
|
3114
3117
|
block: {},
|
|
3115
3118
|
viewport: {}
|
|
3116
3119
|
},
|
|
3117
3120
|
setup(e) {
|
|
3118
|
-
let t = e, n = E(() => import("./ParagraphEditor-
|
|
3121
|
+
let t = e, n = E(() => import("./ParagraphEditor-BIWXLPfu.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content);
|
|
3119
3122
|
return (t, l) => (f(), A("div", {
|
|
3120
3123
|
ref_key: "blockRef",
|
|
3121
3124
|
ref: i,
|
|
@@ -3169,7 +3172,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3169
3172
|
}, Ua = ["aria-label", "title"], Wa = {
|
|
3170
3173
|
key: 3,
|
|
3171
3174
|
class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
|
|
3172
|
-
}, Ga = ["aria-label"], Ka = /* @__PURE__ */ Ti(/* @__PURE__ */
|
|
3175
|
+
}, Ga = ["aria-label"], Ka = /* @__PURE__ */ Ti(/* @__PURE__ */ V({
|
|
3173
3176
|
__name: "BlockWrapper",
|
|
3174
3177
|
props: {
|
|
3175
3178
|
block: {},
|
|
@@ -3179,7 +3182,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3179
3182
|
},
|
|
3180
3183
|
emits: ["select"],
|
|
3181
3184
|
setup(e, { emit: t }) {
|
|
3182
|
-
let n = E(() => import("./BlockIssueBadge-
|
|
3185
|
+
let n = E(() => import("./BlockIssueBadge-Sr3is7Wr.js")), r = e, i = t, { t: a, format: s } = cr(), c = v(Xn, 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);
|
|
3183
3186
|
async function p() {
|
|
3184
3187
|
await m(), l.value?.focus();
|
|
3185
3188
|
}
|
|
@@ -3206,7 +3209,7 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3206
3209
|
desktop: a.viewport.desktop,
|
|
3207
3210
|
tablet: a.viewport.tablet,
|
|
3208
3211
|
mobile: a.viewport.mobile
|
|
3209
|
-
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(
|
|
3212
|
+
}[r.viewport] ?? r.viewport : ""), y = k(() => !!r.block.displayCondition), b = v(Pn, null), x = v(Fn, null), S = v(Yn, {}), w = k(() => !!S.savedModules), T = k(() => S.comments?.getBlockCount(r.block.id) ?? 0), D = k(() => ({ margin: Na(r.block).margin })), ee = k(() => {
|
|
3210
3213
|
let e = Na(r.block);
|
|
3211
3214
|
return {
|
|
3212
3215
|
padding: e.padding,
|
|
@@ -3229,24 +3232,24 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3229
3232
|
x?.toggleBlock(r.block.id);
|
|
3230
3233
|
}
|
|
3231
3234
|
return (t, r) => (f(), A("div", {
|
|
3232
|
-
class:
|
|
3235
|
+
class: I(["tpl-block tpl:group tpl:relative tpl:cursor-pointer tpl:rounded-sm tpl:transition-shadow tpl:duration-150", {
|
|
3233
3236
|
"tpl-block--selected": e.isSelected,
|
|
3234
3237
|
"tpl-block--idle": !e.isSelected,
|
|
3235
3238
|
"tpl-block--lifted": u.value
|
|
3236
3239
|
}]),
|
|
3237
|
-
style:
|
|
3240
|
+
style: R(D.value),
|
|
3238
3241
|
"data-block-id": e.block.id,
|
|
3239
3242
|
"data-block-type": e.block.type,
|
|
3240
3243
|
onClick: te
|
|
3241
3244
|
}, [
|
|
3242
|
-
|
|
3245
|
+
H(M(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
|
|
3243
3246
|
e.isSelected ? (f(), A("div", {
|
|
3244
3247
|
key: 0,
|
|
3245
3248
|
role: "toolbar",
|
|
3246
3249
|
"aria-label": M(a).blockActions.drag,
|
|
3247
3250
|
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)]"
|
|
3248
3251
|
}, [
|
|
3249
|
-
|
|
3252
|
+
L("button", {
|
|
3250
3253
|
ref_key: "dragButtonRef",
|
|
3251
3254
|
ref: l,
|
|
3252
3255
|
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",
|
|
@@ -3255,16 +3258,16 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3255
3258
|
"aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
|
|
3256
3259
|
title: M(a).blockActions.drag,
|
|
3257
3260
|
onKeydown: h
|
|
3258
|
-
}, [
|
|
3261
|
+
}, [H(M(Zr), {
|
|
3259
3262
|
size: 14,
|
|
3260
3263
|
"stroke-width": 1.5
|
|
3261
3264
|
})], 40, Ia),
|
|
3262
|
-
|
|
3265
|
+
L("button", {
|
|
3263
3266
|
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",
|
|
3264
3267
|
"aria-label": M(a).blockActions.duplicate,
|
|
3265
3268
|
title: M(a).blockActions.duplicate,
|
|
3266
3269
|
onClick: N(P, ["stop"])
|
|
3267
|
-
}, [
|
|
3270
|
+
}, [H(M(Gr), {
|
|
3268
3271
|
size: 14,
|
|
3269
3272
|
"stroke-width": 1.5
|
|
3270
3273
|
})], 8, La),
|
|
@@ -3274,44 +3277,44 @@ var Pa = ["data-block-id", "data-block-type"], Fa = ["aria-label"], Ia = [
|
|
|
3274
3277
|
"aria-label": M(a).blockActions.saveAsModule,
|
|
3275
3278
|
title: M(a).blockActions.saveAsModule,
|
|
3276
3279
|
onClick: N(re, ["stop"])
|
|
3277
|
-
}, [
|
|
3280
|
+
}, [H(M(Pr), {
|
|
3278
3281
|
size: 14,
|
|
3279
3282
|
"stroke-width": 1.5
|
|
3280
3283
|
})], 8, Ra)) : j("", !0),
|
|
3281
|
-
|
|
3284
|
+
L("button", {
|
|
3282
3285
|
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",
|
|
3283
3286
|
"aria-label": M(a).blockActions.delete,
|
|
3284
3287
|
title: M(a).blockActions.delete,
|
|
3285
3288
|
onClick: N(ne, ["stop"])
|
|
3286
|
-
}, [
|
|
3289
|
+
}, [H(M(hi), {
|
|
3287
3290
|
size: 14,
|
|
3288
3291
|
"stroke-width": 1.5
|
|
3289
3292
|
})], 8, za)
|
|
3290
3293
|
], 8, Fa)) : j("", !0),
|
|
3291
|
-
g.value ? (f(), A("div", Ba, [
|
|
3294
|
+
g.value ? (f(), A("div", Ba, [L("span", Va, [H(M(Kr), {
|
|
3292
3295
|
size: 12,
|
|
3293
3296
|
"stroke-width": 1.5
|
|
3294
|
-
}),
|
|
3295
|
-
y.value && !g.value ? (f(), A("div", Ha, [
|
|
3297
|
+
}), B(" " + O(M(s)(M(a).blockActions.hiddenOnViewport, { viewport: _.value })), 1)])])) : j("", !0),
|
|
3298
|
+
y.value && !g.value ? (f(), A("div", Ha, [L("button", {
|
|
3296
3299
|
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)]",
|
|
3297
3300
|
"aria-label": M(a).blockActions.conditionToggle,
|
|
3298
3301
|
title: e.block.displayCondition?.label,
|
|
3299
3302
|
onClick: N(F, ["stop"])
|
|
3300
|
-
}, [
|
|
3303
|
+
}, [H(M(Xr), {
|
|
3301
3304
|
size: 12,
|
|
3302
3305
|
"stroke-width": 2
|
|
3303
3306
|
})], 8, Ua)])) : j("", !0),
|
|
3304
|
-
T.value > 0 && !g.value ? (f(), A("div", Wa, [
|
|
3307
|
+
T.value > 0 && !g.value ? (f(), A("div", Wa, [L("button", {
|
|
3305
3308
|
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)]",
|
|
3306
3309
|
"aria-label": M(s)(M(a).blockActions.comments, { count: String(T.value) }),
|
|
3307
3310
|
onClick: r[0] ||= N((t) => M(S).comments?.openForBlock(e.block.id), ["stop"])
|
|
3308
|
-
}, [
|
|
3311
|
+
}, [H(M(ni), {
|
|
3309
3312
|
size: 12,
|
|
3310
3313
|
"stroke-width": 2.5
|
|
3311
|
-
}),
|
|
3312
|
-
|
|
3314
|
+
}), B(" " + O(T.value), 1)], 8, Ga)])) : j("", !0),
|
|
3315
|
+
L("div", {
|
|
3313
3316
|
class: "tpl-block-content",
|
|
3314
|
-
style:
|
|
3317
|
+
style: R(ee.value)
|
|
3315
3318
|
}, [o(t.$slots, "default", {}, void 0, !0)], 4)
|
|
3316
3319
|
], 14, Pa));
|
|
3317
3320
|
}
|
|
@@ -3324,16 +3327,16 @@ function qa(e) {
|
|
|
3324
3327
|
}
|
|
3325
3328
|
//#endregion
|
|
3326
3329
|
//#region src/components/blocks/TitleBlock.vue
|
|
3327
|
-
var Ja = /* @__PURE__ */
|
|
3330
|
+
var Ja = /* @__PURE__ */ V({
|
|
3328
3331
|
__name: "TitleBlock",
|
|
3329
3332
|
props: {
|
|
3330
3333
|
block: {},
|
|
3331
3334
|
viewport: {}
|
|
3332
3335
|
},
|
|
3333
3336
|
setup(e) {
|
|
3334
|
-
let t = e, n = E(() => import("./TitleEditor-
|
|
3337
|
+
let t = e, n = E(() => import("./TitleEditor-DZcx2N4R.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ka(() => t.block.content), l = k(() => {
|
|
3335
3338
|
let e = {
|
|
3336
|
-
fontSize: `${
|
|
3339
|
+
fontSize: `${fe[t.block.level]}px`,
|
|
3337
3340
|
color: t.block.color,
|
|
3338
3341
|
textAlign: t.block.textAlign
|
|
3339
3342
|
};
|
|
@@ -3343,7 +3346,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3343
3346
|
ref_key: "blockRef",
|
|
3344
3347
|
ref: i,
|
|
3345
3348
|
class: "tpl:min-h-[1em] tpl:w-full",
|
|
3346
|
-
style:
|
|
3349
|
+
style: R(l.value),
|
|
3347
3350
|
onDblclick: o[0] ||= (...e) => M(s) && M(s)(...e)
|
|
3348
3351
|
}, [M(r) ? (f(), P(M(n), {
|
|
3349
3352
|
key: 0,
|
|
@@ -3365,7 +3368,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3365
3368
|
key: 0,
|
|
3366
3369
|
"data-testid": "section-drop-hint",
|
|
3367
3370
|
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)]"
|
|
3368
|
-
}, Qa = /* @__PURE__ */
|
|
3371
|
+
}, Qa = /* @__PURE__ */ V({
|
|
3369
3372
|
__name: "SectionBlock",
|
|
3370
3373
|
props: {
|
|
3371
3374
|
block: {},
|
|
@@ -3379,7 +3382,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3379
3382
|
button: wr,
|
|
3380
3383
|
divider: ta,
|
|
3381
3384
|
custom: $i
|
|
3382
|
-
}, n = e, { t: r } =
|
|
3385
|
+
}, n = e, { t: r } = cr(), i = Y(Mn, "SectionBlock"), a = v(Fn, null), o = v(Bn, null), s = k(() => {
|
|
3383
3386
|
switch (n.block.columns) {
|
|
3384
3387
|
case "2": return ["50%", "50%"];
|
|
3385
3388
|
case "3": return [
|
|
@@ -3413,11 +3416,11 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3413
3416
|
dataSourceFetched: t.dataSourceFetched
|
|
3414
3417
|
});
|
|
3415
3418
|
}
|
|
3416
|
-
return (t, n) => (f(), A("div", Ya, [
|
|
3419
|
+
return (t, n) => (f(), A("div", Ya, [L("div", Xa, [(f(!0), A(z, null, h(l.value, (t, n) => (f(), A("div", {
|
|
3417
3420
|
key: n,
|
|
3418
|
-
class:
|
|
3419
|
-
style:
|
|
3420
|
-
}, [
|
|
3421
|
+
class: I(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
|
|
3422
|
+
style: R({ width: s.value[n] })
|
|
3423
|
+
}, [H(M(se), {
|
|
3421
3424
|
"model-value": u(n),
|
|
3422
3425
|
group: {
|
|
3423
3426
|
name: "blocks",
|
|
@@ -3435,7 +3438,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3435
3438
|
class: "tpl:min-h-[60px]",
|
|
3436
3439
|
"onUpdate:modelValue": (e) => p(n, e)
|
|
3437
3440
|
}, {
|
|
3438
|
-
default: b(() => [(f(!0), A(
|
|
3441
|
+
default: b(() => [(f(!0), A(z, null, h(u(n), (t) => c((f(), A("div", { key: t.id }, [H(Ka, {
|
|
3439
3442
|
block: t,
|
|
3440
3443
|
"is-selected": M(i).state.selectedBlockId === t.id,
|
|
3441
3444
|
viewport: e.viewport,
|
|
@@ -3456,13 +3459,13 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3456
3459
|
"is-selected",
|
|
3457
3460
|
"viewport",
|
|
3458
3461
|
"onSelect"
|
|
3459
|
-
])])), [[
|
|
3462
|
+
])])), [[oe, !M(a)?.isHidden(t.id)]])), 128))]),
|
|
3460
3463
|
_: 2
|
|
3461
3464
|
}, 1032, [
|
|
3462
3465
|
"model-value",
|
|
3463
3466
|
"group",
|
|
3464
3467
|
"onUpdate:modelValue"
|
|
3465
|
-
]), u(n).length === 0 ? (f(), A("div", Za, [
|
|
3468
|
+
]), u(n).length === 0 ? (f(), A("div", Za, [L("span", null, O(M(r).section.dropHere), 1)])) : j("", !0)], 6))), 128))])]));
|
|
3466
3469
|
}
|
|
3467
3470
|
}), $a = {
|
|
3468
3471
|
facebook: {
|
|
@@ -3570,7 +3573,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3570
3573
|
"width",
|
|
3571
3574
|
"height",
|
|
3572
3575
|
"fill"
|
|
3573
|
-
], ro = ["d"], io = /* @__PURE__ */
|
|
3576
|
+
], ro = ["d"], io = /* @__PURE__ */ V({
|
|
3574
3577
|
__name: "SocialIconSvg",
|
|
3575
3578
|
props: {
|
|
3576
3579
|
platform: {},
|
|
@@ -3616,25 +3619,25 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3616
3619
|
default: return e;
|
|
3617
3620
|
}
|
|
3618
3621
|
}), a = k(() => Math.floor(r.value * .6)), o = k(() => t.iconStyle === "outlined" ? n.value.color : "#ffffff");
|
|
3619
|
-
return (e, t) => (f(), A("span", { style:
|
|
3622
|
+
return (e, t) => (f(), A("span", { style: R(i.value) }, [(f(), A("svg", {
|
|
3620
3623
|
width: a.value,
|
|
3621
3624
|
height: a.value,
|
|
3622
3625
|
viewBox: "0 0 24 24",
|
|
3623
3626
|
fill: o.value,
|
|
3624
3627
|
xmlns: "http://www.w3.org/2000/svg"
|
|
3625
|
-
}, [
|
|
3628
|
+
}, [L("path", { d: n.value.path }, null, 8, ro)], 8, no))], 4));
|
|
3626
3629
|
}
|
|
3627
3630
|
}), ao = { class: "tpl:w-full" }, oo = ["href"], so = {
|
|
3628
3631
|
key: 1,
|
|
3629
3632
|
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)]"
|
|
3630
|
-
}, co = /* @__PURE__ */
|
|
3633
|
+
}, co = /* @__PURE__ */ V({
|
|
3631
3634
|
__name: "SocialIconsBlock",
|
|
3632
3635
|
props: {
|
|
3633
3636
|
block: {},
|
|
3634
3637
|
viewport: {}
|
|
3635
3638
|
},
|
|
3636
3639
|
setup(e) {
|
|
3637
|
-
let t = e, { t: n } =
|
|
3640
|
+
let t = e, { t: n } = cr(), r = k(() => ({
|
|
3638
3641
|
display: "flex",
|
|
3639
3642
|
flexWrap: "wrap",
|
|
3640
3643
|
gap: `${t.block.spacing}px`,
|
|
@@ -3642,13 +3645,13 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3642
3645
|
})), i = k(() => t.block.icons.length > 0);
|
|
3643
3646
|
return (t, a) => (f(), A("div", ao, [i.value ? (f(), A("div", {
|
|
3644
3647
|
key: 0,
|
|
3645
|
-
style:
|
|
3646
|
-
}, [(f(!0), A(
|
|
3648
|
+
style: R(r.value)
|
|
3649
|
+
}, [(f(!0), A(z, null, h(e.block.icons, (t) => (f(), A("a", {
|
|
3647
3650
|
key: t.id,
|
|
3648
3651
|
href: t.url || "#",
|
|
3649
3652
|
class: "tpl:cursor-default",
|
|
3650
3653
|
onClick: a[0] ||= N(() => {}, ["prevent"])
|
|
3651
|
-
}, [
|
|
3654
|
+
}, [H(io, {
|
|
3652
3655
|
platform: t.platform,
|
|
3653
3656
|
"icon-style": e.block.iconStyle,
|
|
3654
3657
|
"icon-size": e.block.iconSize
|
|
@@ -3656,7 +3659,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3656
3659
|
"platform",
|
|
3657
3660
|
"icon-style",
|
|
3658
3661
|
"icon-size"
|
|
3659
|
-
])], 8, oo))), 128))], 4)) : (f(), A("div", so, [
|
|
3662
|
+
])], 8, oo))), 128))], 4)) : (f(), A("div", so, [H(M(ui), { size: 16 }), L("span", null, O(M(n).social.addIcons), 1)]))]));
|
|
3660
3663
|
}
|
|
3661
3664
|
}), lo = { class: "tpl:w-full" }, uo = {
|
|
3662
3665
|
key: 0,
|
|
@@ -3665,21 +3668,21 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3665
3668
|
"background-color": "var(--tpl-bg-hover)",
|
|
3666
3669
|
color: "var(--tpl-text-dim)"
|
|
3667
3670
|
}
|
|
3668
|
-
}, fo = /* @__PURE__ */
|
|
3671
|
+
}, fo = /* @__PURE__ */ V({
|
|
3669
3672
|
__name: "SpacerBlock",
|
|
3670
3673
|
props: {
|
|
3671
3674
|
block: {},
|
|
3672
3675
|
viewport: {}
|
|
3673
3676
|
},
|
|
3674
3677
|
setup(e) {
|
|
3675
|
-
let t = e, n =
|
|
3678
|
+
let t = e, n = Y(Mn, "SpacerBlock"), r = k(() => ({
|
|
3676
3679
|
height: `${t.block.height}px`,
|
|
3677
3680
|
minHeight: `${t.block.height}px`,
|
|
3678
3681
|
...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
|
|
3679
3682
|
}));
|
|
3680
|
-
return (t, i) => (f(), A("div", lo, [
|
|
3681
|
-
style:
|
|
3682
|
-
class:
|
|
3683
|
+
return (t, i) => (f(), A("div", lo, [L("div", {
|
|
3684
|
+
style: R(r.value),
|
|
3685
|
+
class: I(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !M(n).state.previewMode }])
|
|
3683
3686
|
}, [M(n).state.previewMode ? j("", !0) : (f(), A("span", uo, O(e.block.height) + "px ", 1))], 6)]));
|
|
3684
3687
|
}
|
|
3685
3688
|
}), po = { class: "tpl:w-full" }, mo = { key: 0 }, ho = [
|
|
@@ -3693,7 +3696,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3693
3696
|
], _o = {
|
|
3694
3697
|
key: 1,
|
|
3695
3698
|
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)]"
|
|
3696
|
-
}, vo = /* @__PURE__ */ Ti(/* @__PURE__ */
|
|
3699
|
+
}, vo = /* @__PURE__ */ Ti(/* @__PURE__ */ V({
|
|
3697
3700
|
__name: "TableBlock",
|
|
3698
3701
|
props: {
|
|
3699
3702
|
block: {},
|
|
@@ -3707,7 +3710,7 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3707
3710
|
updated(e, t) {
|
|
3708
3711
|
t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
|
|
3709
3712
|
}
|
|
3710
|
-
}, n = e, { t: r } =
|
|
3713
|
+
}, n = e, { t: r } = cr(), i = Y(Mn, "TableBlock"), a = k(() => n.block.rows.length > 0), o = k(() => ({
|
|
3711
3714
|
width: "100%",
|
|
3712
3715
|
borderCollapse: "collapse",
|
|
3713
3716
|
fontSize: `${n.block.fontSize}px`,
|
|
@@ -3738,42 +3741,42 @@ var Ja = /* @__PURE__ */ B({
|
|
|
3738
3741
|
}
|
|
3739
3742
|
return (e, n) => (f(), A("div", po, [a.value ? (f(), A("table", {
|
|
3740
3743
|
key: 0,
|
|
3741
|
-
style:
|
|
3744
|
+
style: R(o.value),
|
|
3742
3745
|
class: "tpl-table-editable"
|
|
3743
|
-
}, [u.value ? (f(), A("thead", mo, [
|
|
3746
|
+
}, [u.value ? (f(), A("thead", mo, [L("tr", null, [(f(!0), A(z, null, h(u.value.cells, (e) => c((f(), A("th", {
|
|
3744
3747
|
key: e.id,
|
|
3745
|
-
style:
|
|
3748
|
+
style: R(l.value),
|
|
3746
3749
|
"aria-label": M(r).table.cellPlaceholder,
|
|
3747
3750
|
contenteditable: "true",
|
|
3748
3751
|
"data-placeholder": M(r).table.cellPlaceholder,
|
|
3749
3752
|
onBlur: (t) => m(u.value.id, e.id, t),
|
|
3750
3753
|
onKeydown: n[0] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3751
3754
|
onClick: N(p, ["stop"])
|
|
3752
|
-
}, null, 44, ho)), [[t, e.content]])), 128))])])) : j("", !0),
|
|
3755
|
+
}, null, 44, ho)), [[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", {
|
|
3753
3756
|
key: i.id,
|
|
3754
|
-
style:
|
|
3757
|
+
style: R(s.value),
|
|
3755
3758
|
"aria-label": M(r).table.cellPlaceholder,
|
|
3756
3759
|
contenteditable: "true",
|
|
3757
3760
|
"data-placeholder": M(r).table.cellPlaceholder,
|
|
3758
3761
|
onBlur: (t) => m(e.id, i.id, t),
|
|
3759
3762
|
onKeydown: n[1] ||= D(N((e) => e.target.blur(), ["prevent"]), ["enter"]),
|
|
3760
3763
|
onClick: N(p, ["stop"])
|
|
3761
|
-
}, null, 44, go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", _o, [
|
|
3764
|
+
}, null, 44, go)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), A("div", _o, [H(M(mi), { size: 16 }), L("span", null, O(M(r).table.empty), 1)]))]));
|
|
3762
3765
|
}
|
|
3763
|
-
}), [["__scopeId", "data-v-4f49860b"]]), yo = /* @__PURE__ */
|
|
3766
|
+
}), [["__scopeId", "data-v-4f49860b"]]), yo = /* @__PURE__ */ V({
|
|
3764
3767
|
__name: "VideoPlayButton",
|
|
3765
3768
|
props: { hoverEffect: {
|
|
3766
3769
|
type: Boolean,
|
|
3767
3770
|
default: !1
|
|
3768
3771
|
} },
|
|
3769
3772
|
setup(e) {
|
|
3770
|
-
return (t, n) => (f(), A("div", { class:
|
|
3773
|
+
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", {
|
|
3771
3774
|
class: "tpl:ml-1 tpl:text-[var(--tpl-danger)]",
|
|
3772
3775
|
width: "28",
|
|
3773
3776
|
height: "28",
|
|
3774
3777
|
viewBox: "0 0 24 24",
|
|
3775
3778
|
fill: "currentColor"
|
|
3776
|
-
}, [
|
|
3779
|
+
}, [L("polygon", { points: "5,3 19,12 5,21" })])], -1)]], 2));
|
|
3777
3780
|
}
|
|
3778
3781
|
});
|
|
3779
3782
|
//#endregion
|
|
@@ -3821,65 +3824,68 @@ var So = ["src", "alt"], Co = {
|
|
|
3821
3824
|
}, wo = ["href"], To = ["src", "alt"], Eo = ["src", "alt"], Do = {
|
|
3822
3825
|
key: 3,
|
|
3823
3826
|
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)]"
|
|
3824
|
-
}, Oo = /* @__PURE__ */
|
|
3827
|
+
}, Oo = /* @__PURE__ */ V({
|
|
3825
3828
|
__name: "VideoBlock",
|
|
3826
3829
|
props: {
|
|
3827
3830
|
block: {},
|
|
3828
3831
|
viewport: {}
|
|
3829
3832
|
},
|
|
3830
3833
|
setup(e) {
|
|
3831
|
-
let t = e, { t: n } =
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
3835
|
-
|
|
3836
|
-
|
|
3837
|
-
|
|
3834
|
+
let t = e, { t: n } = cr(), { syntax: r } = Ii(), i = k(() => gt(t.block.url, r) || gt(t.block.thumbnailUrl, r)), a = k(() => i.value ? null : xo(t.block.url, t.block.thumbnailUrl)), o = k(() => ({ textAlign: t.block.align })), s = k(() => {
|
|
3835
|
+
let e = t.block.align;
|
|
3836
|
+
return {
|
|
3837
|
+
maxWidth: "100%",
|
|
3838
|
+
width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
|
|
3839
|
+
display: "block",
|
|
3840
|
+
marginLeft: e === "center" || e === "right" ? "auto" : void 0,
|
|
3841
|
+
marginRight: e === "center" ? "auto" : void 0
|
|
3842
|
+
};
|
|
3843
|
+
}), c = k(() => gt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
|
|
3838
3844
|
return (t, r) => (f(), A("div", {
|
|
3839
3845
|
class: "tpl:w-full",
|
|
3840
|
-
style:
|
|
3846
|
+
style: R(o.value)
|
|
3841
3847
|
}, [i.value && e.block.placeholderUrl ? (f(), A("div", {
|
|
3842
3848
|
key: 0,
|
|
3843
3849
|
class: "tpl:relative tpl:inline-block",
|
|
3844
|
-
style:
|
|
3845
|
-
}, [
|
|
3850
|
+
style: R(s.value)
|
|
3851
|
+
}, [L("img", {
|
|
3846
3852
|
class: "tpl:w-full tpl:border-0",
|
|
3847
3853
|
src: e.block.placeholderUrl,
|
|
3848
3854
|
alt: e.block.alt
|
|
3849
|
-
}, null, 8, So),
|
|
3855
|
+
}, null, 8, So), H(yo)], 4)) : i.value ? (f(), A("div", {
|
|
3850
3856
|
key: 1,
|
|
3851
3857
|
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)]",
|
|
3852
|
-
style:
|
|
3853
|
-
}, [
|
|
3858
|
+
style: R([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
|
|
3859
|
+
}, [H(M(yi), {
|
|
3854
3860
|
size: 36,
|
|
3855
3861
|
"stroke-width": 1.5,
|
|
3856
3862
|
class: "tpl:text-[var(--tpl-primary)]",
|
|
3857
3863
|
style: { opacity: "0.5" }
|
|
3858
|
-
}),
|
|
3864
|
+
}), L("span", Co, O(c.value), 1)], 4)) : a.value ? (f(), A(z, { key: 2 }, [e.block.url ? (f(), A("a", {
|
|
3859
3865
|
key: 0,
|
|
3860
3866
|
href: e.block.url,
|
|
3861
3867
|
target: "_blank",
|
|
3862
3868
|
rel: "noopener noreferrer",
|
|
3863
3869
|
class: "tpl:group tpl:relative tpl:inline-block",
|
|
3864
|
-
style:
|
|
3870
|
+
style: R(s.value),
|
|
3865
3871
|
onClick: r[0] ||= N(() => {}, ["prevent"])
|
|
3866
|
-
}, [
|
|
3872
|
+
}, [L("img", {
|
|
3867
3873
|
class: "tpl:w-full tpl:border-0",
|
|
3868
3874
|
src: a.value,
|
|
3869
3875
|
alt: e.block.alt
|
|
3870
|
-
}, null, 8, To),
|
|
3876
|
+
}, null, 8, To), H(yo, { "hover-effect": "" })], 12, wo)) : (f(), A("div", {
|
|
3871
3877
|
key: 1,
|
|
3872
3878
|
class: "tpl:relative tpl:inline-block",
|
|
3873
|
-
style:
|
|
3874
|
-
}, [
|
|
3879
|
+
style: R(s.value)
|
|
3880
|
+
}, [L("img", {
|
|
3875
3881
|
class: "tpl:w-full tpl:border-0",
|
|
3876
3882
|
src: a.value,
|
|
3877
3883
|
alt: e.block.alt
|
|
3878
|
-
}, null, 8, Eo),
|
|
3884
|
+
}, null, 8, Eo), H(yo)], 4))], 64)) : (f(), A("div", Do, [H(M(yi), {
|
|
3879
3885
|
size: 40,
|
|
3880
3886
|
"stroke-width": 1.5,
|
|
3881
3887
|
class: "tpl:text-[var(--tpl-border-light)]"
|
|
3882
|
-
}),
|
|
3888
|
+
}), L("span", null, O(M(n).video.addVideo), 1)]))], 4));
|
|
3883
3889
|
}
|
|
3884
3890
|
}), ko = {
|
|
3885
3891
|
section: Qa,
|
|
@@ -3894,34 +3900,34 @@ var So = ["src", "alt"], Co = {
|
|
|
3894
3900
|
table: vo,
|
|
3895
3901
|
spacer: fo,
|
|
3896
3902
|
html: oa,
|
|
3897
|
-
countdown: E(() => import("./CountdownBlock-
|
|
3903
|
+
countdown: E(() => import("./CountdownBlock-CpSUUDDs.js").then((e) => e.n))
|
|
3898
3904
|
};
|
|
3899
3905
|
function Ao(e) {
|
|
3900
|
-
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } =
|
|
3906
|
+
let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = cr(r);
|
|
3901
3907
|
t.setUiTheme(n.uiTheme ?? "auto");
|
|
3902
3908
|
let { resolvedTheme: c } = dr(k(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = pr({
|
|
3903
3909
|
themeOverrides: u,
|
|
3904
3910
|
resolvedTheme: c,
|
|
3905
3911
|
extraStyles: e.themeExtraStyles
|
|
3906
|
-
}), f =
|
|
3912
|
+
}), f = Et({
|
|
3907
3913
|
content: t.content,
|
|
3908
3914
|
setContent: (e, n) => t.setContent(e, n),
|
|
3909
3915
|
...e.historyOptions
|
|
3910
3916
|
});
|
|
3911
|
-
|
|
3912
|
-
let m =
|
|
3917
|
+
Mt(t, f);
|
|
3918
|
+
let m = Ot({
|
|
3913
3919
|
addBlock: t.addBlock,
|
|
3914
3920
|
removeBlock: t.removeBlock,
|
|
3915
3921
|
updateBlock: t.updateBlock,
|
|
3916
3922
|
selectBlock: t.selectBlock,
|
|
3917
3923
|
findBlockLocation: t.findBlockLocation,
|
|
3918
3924
|
blockDefaults: n.blockDefaults
|
|
3919
|
-
}), h =
|
|
3925
|
+
}), h = At(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? kt({
|
|
3920
3926
|
content: t.content,
|
|
3921
3927
|
isDirty: () => t.state.isDirty,
|
|
3922
3928
|
...e.autoSaveOptions
|
|
3923
3929
|
}) : null, _ = null;
|
|
3924
|
-
g && (_ =
|
|
3930
|
+
g && (_ = U(f.isNavigating, (e) => {
|
|
3925
3931
|
e ? g.pause() : g.resume();
|
|
3926
3932
|
}));
|
|
3927
3933
|
let v = ur(t, {
|
|
@@ -3932,10 +3938,10 @@ function Ao(e) {
|
|
|
3932
3938
|
function b(e) {
|
|
3933
3939
|
for (let t of e) y.registerCustom(t, $i);
|
|
3934
3940
|
}
|
|
3935
|
-
let x =
|
|
3941
|
+
let x = An();
|
|
3936
3942
|
if (s() && l(x.dispose), e.containerEl) {
|
|
3937
3943
|
let t = e.containerEl;
|
|
3938
|
-
|
|
3944
|
+
J(document, "pointerdown", (e) => {
|
|
3939
3945
|
let n = t.value;
|
|
3940
3946
|
n && (e.composedPath?.() ?? []).includes(n) && x.claim();
|
|
3941
3947
|
}, { capture: !0 });
|
|
@@ -3950,19 +3956,19 @@ function Ao(e) {
|
|
|
3950
3956
|
onBeforeUndo: e.keyboardOptions?.onBeforeUndo
|
|
3951
3957
|
});
|
|
3952
3958
|
}
|
|
3953
|
-
|
|
3959
|
+
J(document, "keydown", S);
|
|
3954
3960
|
let w = C(null);
|
|
3955
|
-
p(
|
|
3956
|
-
let T =
|
|
3957
|
-
p(
|
|
3958
|
-
let E =
|
|
3961
|
+
p(Qn, e.editorRoot ?? document), p($n, w), p(jn, r), p(Mn, t), p(Nn, f), p(Pn, m), p(Fn, h), p(In, i), p(Ln, d), p(Rn, c), p(zn, n.blockDefaults), p(Bn, y), p(Vn, n.customBlocks ?? []);
|
|
3962
|
+
let T = dt(n.mergeTags?.syntax);
|
|
3963
|
+
p(Hn, n.mergeTags?.tags ?? []), p(Un, T), p(Wn, n.mergeTags?.onRequest ?? null), p(Gn, n.mergeTags?.autocomplete !== !1), p(Kn, n.onRequestMedia ?? null), p(qn, n.displayConditions?.conditions ?? []), p(Jn, n.displayConditions?.allowCustom ?? !1), p(Yn, e.capabilities ?? {}), p(Xn, v);
|
|
3964
|
+
let E = or(n.lint) ? null : sr({
|
|
3959
3965
|
content: t.content,
|
|
3960
3966
|
options: n.lint ?? {},
|
|
3961
3967
|
updateBlock: t.updateBlock,
|
|
3962
3968
|
updateSettings: t.updateSettings,
|
|
3963
3969
|
removeBlock: t.removeBlock
|
|
3964
3970
|
});
|
|
3965
|
-
p(
|
|
3971
|
+
p(Zn, E);
|
|
3966
3972
|
function D() {
|
|
3967
3973
|
_?.(), E?.destroy(), g?.destroy(), f.destroy();
|
|
3968
3974
|
}
|
|
@@ -4060,7 +4066,7 @@ var jo = class e {
|
|
|
4060
4066
|
};
|
|
4061
4067
|
e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
|
|
4062
4068
|
let r = await fetch(this.url, n);
|
|
4063
|
-
if (!r.ok) throw new
|
|
4069
|
+
if (!r.ok) throw new bt(`Token refresh failed: ${r.status}`, r.status);
|
|
4064
4070
|
let i = await r.json();
|
|
4065
4071
|
if (!i.token || !i.expires_at || !i.project_id || !i.tenant) throw Error("Invalid token response: missing token, expires_at, project_id, or tenant");
|
|
4066
4072
|
return this.accessToken = i.token, this.expiresAt = /* @__PURE__ */ new Date(i.expires_at * 1e3), this._projectId = i.project_id, this._tenantSlug = i.tenant, i.test_email?.allowed_emails && i.test_email?.signature ? this._testEmailConfig = {
|
|
@@ -4186,7 +4192,7 @@ var No = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${No}/templates/{te
|
|
|
4186
4192
|
});
|
|
4187
4193
|
if (!n.ok) {
|
|
4188
4194
|
let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
|
|
4189
|
-
throw new
|
|
4195
|
+
throw new bt(this.extractFirstValidationError(e), n.status);
|
|
4190
4196
|
}
|
|
4191
4197
|
if (n.status !== 204) return (await n.json()).data;
|
|
4192
4198
|
}
|
|
@@ -4363,7 +4369,7 @@ var Bo = class {
|
|
|
4363
4369
|
if (this.pusher) return;
|
|
4364
4370
|
let e;
|
|
4365
4371
|
try {
|
|
4366
|
-
({default: e} = await import("./pusher-
|
|
4372
|
+
({default: e} = await import("./pusher-CHo5Cua0.js").then((e) => /* @__PURE__ */ t(e.t(), 1)));
|
|
4367
4373
|
} catch {
|
|
4368
4374
|
throw Error("Cloud features require the optional peer dependency 'pusher-js'. Install it with: npm install pusher-js");
|
|
4369
4375
|
}
|
|
@@ -4449,7 +4455,7 @@ function Vo(e, t) {
|
|
|
4449
4455
|
function Ho(e) {
|
|
4450
4456
|
let t = new Ro(e.authManager), n = S({
|
|
4451
4457
|
template: null,
|
|
4452
|
-
content:
|
|
4458
|
+
content: He(e.defaultFontFamily, e.templateDefaults),
|
|
4453
4459
|
selectedBlockId: null,
|
|
4454
4460
|
viewport: "desktop",
|
|
4455
4461
|
darkMode: !1,
|
|
@@ -4581,7 +4587,7 @@ function Ho(e) {
|
|
|
4581
4587
|
}
|
|
4582
4588
|
}
|
|
4583
4589
|
async function w() {
|
|
4584
|
-
if (!n.template?.id) throw new
|
|
4590
|
+
if (!n.template?.id) throw new bt("No template loaded. Call create() or load() before saving.");
|
|
4585
4591
|
n.isSaving = !0;
|
|
4586
4592
|
try {
|
|
4587
4593
|
let e = await t.updateTemplate(n.template.id, n.content);
|
|
@@ -5260,7 +5266,7 @@ function Yo(e) {
|
|
|
5260
5266
|
//#region ../core/src/cloud/comment-listener.ts
|
|
5261
5267
|
function Xo(e) {
|
|
5262
5268
|
let { comments: t, channel: n } = e;
|
|
5263
|
-
|
|
5269
|
+
U(n, (e, n) => {
|
|
5264
5270
|
n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
|
|
5265
5271
|
Zo(t, e);
|
|
5266
5272
|
});
|
|
@@ -5372,9 +5378,9 @@ function ts(e) {
|
|
|
5372
5378
|
function v(e) {
|
|
5373
5379
|
r.value && r.value.trigger("client-block_unlocked", { blockId: e });
|
|
5374
5380
|
}
|
|
5375
|
-
return
|
|
5381
|
+
return U(() => n.state.selectedBlockId, (e, t) => {
|
|
5376
5382
|
s || (t && v(t), e && _(e));
|
|
5377
|
-
}),
|
|
5383
|
+
}), U(r, (t, n) => {
|
|
5378
5384
|
if (n && $o(n), !t) {
|
|
5379
5385
|
i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
|
|
5380
5386
|
return;
|
|
@@ -5587,7 +5593,7 @@ function as(e) {
|
|
|
5587
5593
|
//#region ../core/src/cloud/test-email.ts
|
|
5588
5594
|
function os(e) {
|
|
5589
5595
|
let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new Ro(t), l = C(!1), u = C(null), d = C(null);
|
|
5590
|
-
o &&
|
|
5596
|
+
o && U(o, (e) => {
|
|
5591
5597
|
e && (d.value = t.testEmailConfig);
|
|
5592
5598
|
}, { immediate: !0 });
|
|
5593
5599
|
let f = k(() => d.value !== null), p = k(() => d.value?.allowedEmails ?? []);
|
|
@@ -5781,7 +5787,7 @@ async function ps(e = {}) {
|
|
|
5781
5787
|
//#region ../core/src/cloud/mcp-listener.ts
|
|
5782
5788
|
function ms(e) {
|
|
5783
5789
|
let { editor: t, channel: n, onOperation: r } = e;
|
|
5784
|
-
|
|
5790
|
+
U(n, (e, n) => {
|
|
5785
5791
|
n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
|
|
5786
5792
|
Vo(t, e), r?.(e);
|
|
5787
5793
|
});
|
|
@@ -5836,7 +5842,7 @@ var hs = {
|
|
|
5836
5842
|
"background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
|
|
5837
5843
|
"backdrop-filter": "blur(2px)"
|
|
5838
5844
|
}
|
|
5839
|
-
}, js = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ms = ["onClick"], Ns = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ps = { 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)]" }, Fs = ["placeholder", "disabled"], Is = ["disabled"], Ls = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rs = /* @__PURE__ */
|
|
5845
|
+
}, js = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Ms = ["onClick"], Ns = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Ps = { 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)]" }, Fs = ["placeholder", "disabled"], Is = ["disabled"], Ls = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Rs = /* @__PURE__ */ V({
|
|
5840
5846
|
__name: "AiChatSidebar",
|
|
5841
5847
|
props: {
|
|
5842
5848
|
visible: { type: Boolean },
|
|
@@ -5844,15 +5850,15 @@ var hs = {
|
|
|
5844
5850
|
},
|
|
5845
5851
|
emits: ["close"],
|
|
5846
5852
|
setup(e, { emit: t }) {
|
|
5847
|
-
let n = e, r = t, i =
|
|
5853
|
+
let n = e, r = t, i = Y(ar, "AiChatSidebar"), a = Y(Mn, "AiChatSidebar"), o = Y(er, "AiChatSidebar"), s = v(Hn, []), l = sa(), u = Go({
|
|
5848
5854
|
authManager: o,
|
|
5849
5855
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
5850
5856
|
onApply: n.onApply,
|
|
5851
5857
|
onError: void 0
|
|
5852
|
-
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } =
|
|
5858
|
+
}), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = tn(() => {
|
|
5853
5859
|
_.value < (u.suggestions.value?.length ?? 0) ? _.value++ : y();
|
|
5854
|
-
}, 150, { immediate: !1 }), { start: S } =
|
|
5855
|
-
|
|
5860
|
+
}, 150, { immediate: !1 }), { start: S } = nn(() => x(), 100, { immediate: !1 });
|
|
5861
|
+
U(() => u.suggestions.value?.length ?? 0, (e) => {
|
|
5856
5862
|
if (y(), e === 0) {
|
|
5857
5863
|
_.value = 0;
|
|
5858
5864
|
return;
|
|
@@ -5864,7 +5870,7 @@ var hs = {
|
|
|
5864
5870
|
p.value && (p.value.scrollTop = p.value.scrollHeight);
|
|
5865
5871
|
});
|
|
5866
5872
|
}
|
|
5867
|
-
|
|
5873
|
+
U(() => u.messages.value?.length ?? 0, () => w()), U(() => n.visible, async (e) => {
|
|
5868
5874
|
if (e && !g.value) {
|
|
5869
5875
|
if (g.value = !0, await u.loadConversation(), !l.alive) return;
|
|
5870
5876
|
(u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
|
|
@@ -5892,38 +5898,38 @@ var hs = {
|
|
|
5892
5898
|
"leave-to-class": "tpl:translate-x-full"
|
|
5893
5899
|
}, {
|
|
5894
5900
|
default: b(() => [e.visible ? (f(), A("div", hs, [
|
|
5895
|
-
|
|
5901
|
+
L("div", gs, [L("div", _s, [H(M(pi), {
|
|
5896
5902
|
size: 13,
|
|
5897
5903
|
"stroke-width": 2
|
|
5898
|
-
}),
|
|
5904
|
+
}), L("span", null, O(M(i).aiChat.title), 1)]), L("div", vs, [(M(u).messages.value?.length ?? 0) > 0 ? (f(), A("button", {
|
|
5899
5905
|
key: 0,
|
|
5900
5906
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5901
5907
|
title: M(i).aiChat.clear,
|
|
5902
5908
|
onClick: n[0] ||= (e) => M(u).clearChat()
|
|
5903
|
-
}, [
|
|
5909
|
+
}, [H(M(hi), {
|
|
5904
5910
|
size: 14,
|
|
5905
5911
|
"stroke-width": 2
|
|
5906
|
-
})], 8, ys)) : j("", !0),
|
|
5912
|
+
})], 8, ys)) : j("", !0), L("button", {
|
|
5907
5913
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
5908
5914
|
onClick: n[1] ||= (e) => r("close")
|
|
5909
|
-
}, [
|
|
5915
|
+
}, [H(M(bi), {
|
|
5910
5916
|
size: 14,
|
|
5911
5917
|
"stroke-width": 2
|
|
5912
5918
|
})])])]),
|
|
5913
|
-
|
|
5914
|
-
|
|
5919
|
+
L("div", bs, [
|
|
5920
|
+
L("div", {
|
|
5915
5921
|
ref_key: "messagesContainer",
|
|
5916
5922
|
ref: p,
|
|
5917
5923
|
class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
|
|
5918
|
-
}, [M(u).isLoadingHistory.value ? (f(), A("div", xs, [
|
|
5924
|
+
}, [M(u).isLoadingHistory.value ? (f(), A("div", xs, [H(M(ti), {
|
|
5919
5925
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
5920
5926
|
size: 24,
|
|
5921
5927
|
"stroke-width": 2
|
|
5922
|
-
}),
|
|
5928
|
+
}), L("p", Ss, O(M(i).aiChat.loadingHistory), 1)])) : (M(u).messages.value?.length ?? 0) === 0 ? (f(), A("div", Cs, [H(M(pi), {
|
|
5923
5929
|
size: 32,
|
|
5924
5930
|
"stroke-width": 1.5,
|
|
5925
5931
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
5926
|
-
}),
|
|
5932
|
+
}), L("p", ws, O(M(i).aiChat.placeholder), 1)])) : (f(), A("div", Ts, [(f(!0), A(z, null, h(M(u).messages.value, (e, t) => (f(), A("div", {
|
|
5927
5933
|
key: e.id,
|
|
5928
5934
|
class: "tpl:flex tpl:flex-col tpl:gap-2"
|
|
5929
5935
|
}, [e.role === "user" ? (f(), A("div", Es, O(e.content), 1)) : (f(), A("div", Ds, [!E(e.content) && M(u).isGenerating.value && t === (M(u).messages.value?.length ?? 0) - 1 ? (f(), P(ki, { key: 0 })) : (f(), A("div", Os, O(E(e.content) || M(i).aiChat.applied), 1)), e.id === M(u).lastApplyMessageId.value && !M(u).isGenerating.value ? (f(), A("button", {
|
|
@@ -5935,21 +5941,21 @@ var hs = {
|
|
|
5935
5941
|
"background-color": "transparent"
|
|
5936
5942
|
},
|
|
5937
5943
|
onClick: n[2] ||= (e) => M(u).toggleLastRevert()
|
|
5938
|
-
}, [M(u).isLastChangeReverted.value ? (f(), A(
|
|
5944
|
+
}, [M(u).isLastChangeReverted.value ? (f(), A(z, { key: 0 }, [H(M(oi), {
|
|
5939
5945
|
size: 12,
|
|
5940
5946
|
"stroke-width": 2
|
|
5941
|
-
}),
|
|
5947
|
+
}), B(" " + O(M(i).aiChat.reapply), 1)], 64)) : (f(), A(z, { key: 1 }, [H(M(_i), {
|
|
5942
5948
|
size: 12,
|
|
5943
5949
|
"stroke-width": 2
|
|
5944
|
-
}),
|
|
5945
|
-
M(u).error.value ? (f(), A("div", ks, [
|
|
5950
|
+
}), B(" " + O(M(i).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
|
|
5951
|
+
M(u).error.value ? (f(), A("div", ks, [H(M(Vr), {
|
|
5946
5952
|
size: 14,
|
|
5947
5953
|
"stroke-width": 2,
|
|
5948
5954
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
5949
|
-
}),
|
|
5950
|
-
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", As, [
|
|
5955
|
+
}), L("span", null, O(M(u).error.value === "ai_apply_failed" ? M(i).aiChat.applyFailed : M(i).aiChat.error), 1)])) : j("", !0),
|
|
5956
|
+
(M(u).suggestions.value?.length ?? 0) > 0 ? (f(), A("div", As, [L("div", js, [(f(!0), A(z, null, h(M(u).suggestions.value ?? [], (e, t) => (f(), A("button", {
|
|
5951
5957
|
key: t,
|
|
5952
|
-
class:
|
|
5958
|
+
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"]),
|
|
5953
5959
|
style: {
|
|
5954
5960
|
"border-color": "var(--tpl-border)",
|
|
5955
5961
|
color: "var(--tpl-primary)",
|
|
@@ -5959,21 +5965,21 @@ var hs = {
|
|
|
5959
5965
|
onClick: (t) => D(e)
|
|
5960
5966
|
}, O(e), 11, Ms))), 128))])])) : j("", !0)
|
|
5961
5967
|
]),
|
|
5962
|
-
|
|
5968
|
+
L("div", Ns, [L("div", Ps, [c(L("textarea", {
|
|
5963
5969
|
"onUpdate:modelValue": n[3] ||= (e) => d.value = e,
|
|
5964
5970
|
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)]",
|
|
5965
5971
|
placeholder: M(i).aiChat.inputPlaceholder,
|
|
5966
5972
|
disabled: M(u).isGenerating.value,
|
|
5967
5973
|
rows: "3",
|
|
5968
5974
|
onKeydown: ee
|
|
5969
|
-
}, null, 40, Fs), [[ie, d.value]]),
|
|
5975
|
+
}, null, 40, Fs), [[ie, d.value]]), L("button", {
|
|
5970
5976
|
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)]",
|
|
5971
5977
|
disabled: !d.value.trim() || M(u).isGenerating.value,
|
|
5972
5978
|
onClick: T
|
|
5973
|
-
}, [
|
|
5979
|
+
}, [H(M(li), {
|
|
5974
5980
|
size: 16,
|
|
5975
5981
|
"stroke-width": 2
|
|
5976
|
-
})], 8, Is)]),
|
|
5982
|
+
})], 8, Is)]), L("p", Ls, O(M(i).aiMenu.disclaimer), 1)])
|
|
5977
5983
|
])) : j("", !0)]),
|
|
5978
5984
|
_: 1
|
|
5979
5985
|
}));
|
|
@@ -5983,7 +5989,7 @@ function Ws(e, t, n, r) {
|
|
|
5983
5989
|
let i = new Date(e).getTime();
|
|
5984
5990
|
if (Number.isNaN(i)) return null;
|
|
5985
5991
|
let a = Date.now() - i;
|
|
5986
|
-
if (a < -
|
|
5992
|
+
if (a < -6e4) return null;
|
|
5987
5993
|
let o = Math.floor(a / Vs), s = Math.floor(a / Hs), c = Math.floor(a / Us);
|
|
5988
5994
|
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));
|
|
5989
5995
|
}
|
|
@@ -6049,12 +6055,12 @@ var Gs = {
|
|
|
6049
6055
|
}, Yc = {
|
|
6050
6056
|
key: 1,
|
|
6051
6057
|
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)]"
|
|
6052
|
-
}, Xc = ["placeholder", "disabled"], Zc = ["disabled"], Qc = /* @__PURE__ */
|
|
6058
|
+
}, Xc = ["placeholder", "disabled"], Zc = ["disabled"], Qc = /* @__PURE__ */ V({
|
|
6053
6059
|
__name: "CommentsSidebar",
|
|
6054
6060
|
props: { visible: { type: Boolean } },
|
|
6055
6061
|
emits: ["close", "filterBlock"],
|
|
6056
6062
|
setup(e, { expose: t, emit: n }) {
|
|
6057
|
-
let r = e, i = n, { format: a } =
|
|
6063
|
+
let r = e, i = n, { format: a } = cr(), { t: o } = Fi(), s = Y(Mn, "CommentsSidebar"), l = Y(er, "CommentsSidebar"), u = Y(nr, "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(() => {
|
|
6058
6064
|
let e = /* @__PURE__ */ new Set();
|
|
6059
6065
|
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);
|
|
6060
6066
|
return e;
|
|
@@ -6066,9 +6072,9 @@ var Gs = {
|
|
|
6066
6072
|
let e = u.comments.value;
|
|
6067
6073
|
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;
|
|
6068
6074
|
});
|
|
6069
|
-
|
|
6075
|
+
U(() => r.visible, (e) => {
|
|
6070
6076
|
e && u.loadComments();
|
|
6071
|
-
}),
|
|
6077
|
+
}), U(() => s.state.selectedBlockId, (e) => {
|
|
6072
6078
|
d.value === "block" && e && (p.value = e);
|
|
6073
6079
|
});
|
|
6074
6080
|
function N(e, t) {
|
|
@@ -6077,70 +6083,70 @@ var Gs = {
|
|
|
6077
6083
|
function F(e) {
|
|
6078
6084
|
N("block", e), i("filterBlock", e);
|
|
6079
6085
|
}
|
|
6080
|
-
function
|
|
6086
|
+
function ae(e) {
|
|
6081
6087
|
S.value.has(e) ? S.value.delete(e) : S.value.add(e);
|
|
6082
6088
|
}
|
|
6083
|
-
function
|
|
6089
|
+
function oe(e) {
|
|
6084
6090
|
_.value = e, v.value = "", y.value = null, S.value.has(e) || S.value.add(e);
|
|
6085
6091
|
}
|
|
6086
|
-
function
|
|
6092
|
+
function se() {
|
|
6087
6093
|
_.value = null, v.value = "";
|
|
6088
6094
|
}
|
|
6089
|
-
function
|
|
6095
|
+
function ce(e) {
|
|
6090
6096
|
y.value = e.id, x.value = e.body, _.value = null;
|
|
6091
6097
|
}
|
|
6092
|
-
function
|
|
6098
|
+
function V() {
|
|
6093
6099
|
y.value = null, x.value = "";
|
|
6094
6100
|
}
|
|
6095
|
-
function
|
|
6101
|
+
function le(e) {
|
|
6096
6102
|
w.value = e;
|
|
6097
6103
|
}
|
|
6098
|
-
function
|
|
6104
|
+
function ue() {
|
|
6099
6105
|
w.value = null;
|
|
6100
6106
|
}
|
|
6101
|
-
async function
|
|
6107
|
+
async function de() {
|
|
6102
6108
|
let e = g.value.trim();
|
|
6103
6109
|
e && (await u.addComment(e, (d.value === "block" ? p.value : void 0) ?? void 0), g.value = "");
|
|
6104
6110
|
}
|
|
6105
|
-
async function
|
|
6111
|
+
async function fe(e) {
|
|
6106
6112
|
let t = v.value.trim();
|
|
6107
6113
|
if (!t) return;
|
|
6108
6114
|
let n = u.comments.value.find((t) => t.id === e);
|
|
6109
6115
|
await u.addComment(t, n?.block_id ?? void 0, e), _.value = null, v.value = "";
|
|
6110
6116
|
}
|
|
6111
|
-
async function
|
|
6117
|
+
async function pe(e) {
|
|
6112
6118
|
let t = x.value.trim();
|
|
6113
6119
|
t && (await u.editComment(e, t), y.value = null, x.value = "");
|
|
6114
6120
|
}
|
|
6115
|
-
async function
|
|
6121
|
+
async function me(e) {
|
|
6116
6122
|
await u.removeComment(e), w.value = null;
|
|
6117
6123
|
}
|
|
6118
|
-
async function
|
|
6124
|
+
async function he(e) {
|
|
6119
6125
|
await u.toggleResolve(e);
|
|
6120
6126
|
}
|
|
6121
|
-
function
|
|
6127
|
+
function ge(e) {
|
|
6122
6128
|
return e.author_identifier === E.value;
|
|
6123
6129
|
}
|
|
6124
|
-
function
|
|
6130
|
+
function _e(e) {
|
|
6125
6131
|
return Ws(e, o.snapshotHistory) ?? e;
|
|
6126
6132
|
}
|
|
6127
|
-
function
|
|
6128
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
6133
|
+
function ve(e) {
|
|
6134
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), de());
|
|
6135
|
+
}
|
|
6136
|
+
function ye(e, t) {
|
|
6137
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe(t));
|
|
6129
6138
|
}
|
|
6130
6139
|
function be(e, t) {
|
|
6131
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), pe(t));
|
|
6132
|
-
}
|
|
6133
|
-
function xe(e, t) {
|
|
6134
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), me(t)), e.key === "Escape" && B();
|
|
6140
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), pe(t)), e.key === "Escape" && V();
|
|
6135
6141
|
}
|
|
6136
|
-
function
|
|
6142
|
+
function xe() {
|
|
6137
6143
|
m(() => {
|
|
6138
6144
|
T.value?.focus();
|
|
6139
6145
|
});
|
|
6140
6146
|
}
|
|
6141
6147
|
return t({
|
|
6142
6148
|
filterByBlock: F,
|
|
6143
|
-
focusNewComment:
|
|
6149
|
+
focusNewComment: xe
|
|
6144
6150
|
}), (t, n) => (f(), P(re, {
|
|
6145
6151
|
"enter-active-class": "tpl-comments-slide-enter-active",
|
|
6146
6152
|
"enter-from-class": "tpl:translate-x-full",
|
|
@@ -6150,87 +6156,87 @@ var Gs = {
|
|
|
6150
6156
|
"leave-to-class": "tpl:translate-x-full"
|
|
6151
6157
|
}, {
|
|
6152
6158
|
default: b(() => [e.visible ? (f(), A("div", Gs, [
|
|
6153
|
-
|
|
6154
|
-
|
|
6159
|
+
L("div", Ks, [L("div", qs, [
|
|
6160
|
+
H(M(ni), {
|
|
6155
6161
|
size: 13,
|
|
6156
6162
|
"stroke-width": 2
|
|
6157
6163
|
}),
|
|
6158
|
-
|
|
6164
|
+
L("span", null, O(M(o).comments.title), 1),
|
|
6159
6165
|
M(u).unresolvedCount.value > 0 ? (f(), A("span", Js, O(M(u).unresolvedCount.value), 1)) : j("", !0)
|
|
6160
|
-
]),
|
|
6166
|
+
]), L("button", {
|
|
6161
6167
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6162
6168
|
onClick: n[0] ||= (e) => i("close")
|
|
6163
|
-
}, [
|
|
6169
|
+
}, [H(M(bi), {
|
|
6164
6170
|
size: 14,
|
|
6165
6171
|
"stroke-width": 2
|
|
6166
6172
|
})])]),
|
|
6167
|
-
|
|
6168
|
-
|
|
6169
|
-
class:
|
|
6173
|
+
L("div", Ys, [
|
|
6174
|
+
L("button", {
|
|
6175
|
+
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" : ""]),
|
|
6170
6176
|
onClick: n[1] ||= (e) => N("unresolved")
|
|
6171
6177
|
}, O(M(o).comments.filterUnresolved), 3),
|
|
6172
|
-
|
|
6173
|
-
class:
|
|
6178
|
+
L("button", {
|
|
6179
|
+
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" : ""]),
|
|
6174
6180
|
onClick: n[2] ||= (e) => N("all")
|
|
6175
6181
|
}, O(M(o).comments.filterAll), 3),
|
|
6176
6182
|
M(s).state.selectedBlockId ? (f(), A("button", {
|
|
6177
6183
|
key: 0,
|
|
6178
|
-
class:
|
|
6184
|
+
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" : ""]),
|
|
6179
6185
|
onClick: n[3] ||= (e) => N("block", M(s).state.selectedBlockId ?? void 0)
|
|
6180
6186
|
}, O(M(o).comments.filterBlock), 3)) : j("", !0)
|
|
6181
6187
|
]),
|
|
6182
|
-
|
|
6188
|
+
L("div", Xs, [M(u).isLoading.value ? (f(), A("div", Zs, [H(M(ti), {
|
|
6183
6189
|
class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
|
|
6184
6190
|
size: 24,
|
|
6185
6191
|
"stroke-width": 2
|
|
6186
|
-
})])) : ne.value.length === 0 ? (f(), A("div", Qs, [
|
|
6192
|
+
})])) : ne.value.length === 0 ? (f(), A("div", Qs, [H(M(ni), {
|
|
6187
6193
|
size: 32,
|
|
6188
6194
|
"stroke-width": 1.5,
|
|
6189
6195
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6190
|
-
}),
|
|
6196
|
+
}), L("p", $s, O(d.value === "all" ? M(o).comments.noCommentsHint : M(o).comments.noComments), 1)])) : (f(), A("div", ec, [(f(!0), A(z, null, h(ne.value, (e) => (f(), A("div", {
|
|
6191
6197
|
key: e.id,
|
|
6192
6198
|
class: "tpl-comment-thread"
|
|
6193
6199
|
}, [
|
|
6194
|
-
|
|
6195
|
-
|
|
6196
|
-
|
|
6197
|
-
|
|
6200
|
+
L("div", tc, [
|
|
6201
|
+
L("div", nc, [L("div", rc, [
|
|
6202
|
+
L("span", ic, O(ge(e) ? M(o).comments.ownedByYou : e.author_name), 1),
|
|
6203
|
+
L("span", ac, O(_e(e.created_at)), 1),
|
|
6198
6204
|
e.updated_at === e.created_at ? j("", !0) : (f(), A("span", oc, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6199
|
-
]),
|
|
6200
|
-
|
|
6205
|
+
]), L("div", sc, [
|
|
6206
|
+
L("button", {
|
|
6201
6207
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6202
6208
|
title: e.resolved_at ? M(o).comments.unresolve : M(o).comments.resolve,
|
|
6203
|
-
onClick: (t) =>
|
|
6204
|
-
}, [
|
|
6209
|
+
onClick: (t) => he(e.id)
|
|
6210
|
+
}, [H(M(Hr), {
|
|
6205
6211
|
size: 13,
|
|
6206
6212
|
"stroke-width": 2,
|
|
6207
6213
|
class: "tpl-resolve-icon",
|
|
6208
|
-
style:
|
|
6214
|
+
style: R({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
|
|
6209
6215
|
}, null, 8, ["style"])], 8, cc),
|
|
6210
|
-
|
|
6216
|
+
ge(e) ? (f(), A("button", {
|
|
6211
6217
|
key: 0,
|
|
6212
6218
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6213
6219
|
title: M(o).comments.edit,
|
|
6214
|
-
onClick: (t) =>
|
|
6215
|
-
}, [
|
|
6220
|
+
onClick: (t) => ce(e)
|
|
6221
|
+
}, [H(M(ii), {
|
|
6216
6222
|
size: 12,
|
|
6217
6223
|
"stroke-width": 2
|
|
6218
6224
|
})], 8, lc)) : j("", !0),
|
|
6219
|
-
|
|
6225
|
+
ge(e) ? (f(), A("button", {
|
|
6220
6226
|
key: 1,
|
|
6221
6227
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6222
6228
|
title: M(o).comments.delete,
|
|
6223
|
-
onClick: (t) =>
|
|
6224
|
-
}, [
|
|
6229
|
+
onClick: (t) => le(e.id)
|
|
6230
|
+
}, [H(M(hi), {
|
|
6225
6231
|
size: 12,
|
|
6226
6232
|
"stroke-width": 2
|
|
6227
6233
|
})], 8, uc)) : j("", !0)
|
|
6228
6234
|
])]),
|
|
6229
|
-
|
|
6230
|
-
default: b(() => [e.resolved_at ? (f(), A("div", dc, [
|
|
6235
|
+
H(re, { name: "tpl-resolve" }, {
|
|
6236
|
+
default: b(() => [e.resolved_at ? (f(), A("div", dc, [H(M(Ir), {
|
|
6231
6237
|
size: 10,
|
|
6232
6238
|
"stroke-width": 2.5
|
|
6233
|
-
}),
|
|
6239
|
+
}), L("span", null, O(M(a)(M(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
|
|
6234
6240
|
_: 2
|
|
6235
6241
|
}, 1024),
|
|
6236
6242
|
e.block_id && ee(e.block_id) ? (f(), A("span", fc, O(M(o).comments.missingBlock), 1)) : e.block_id ? (f(), A("button", {
|
|
@@ -6238,42 +6244,42 @@ var Gs = {
|
|
|
6238
6244
|
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)]",
|
|
6239
6245
|
onClick: (t) => M(s).selectBlock(e.block_id ?? "")
|
|
6240
6246
|
}, " Block ", 8, pc)) : j("", !0),
|
|
6241
|
-
y.value === e.id ? (f(), A("div", mc, [c(
|
|
6247
|
+
y.value === e.id ? (f(), A("div", mc, [c(L("textarea", {
|
|
6242
6248
|
"onUpdate:modelValue": n[4] ||= (e) => x.value = e,
|
|
6243
6249
|
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)]",
|
|
6244
6250
|
rows: "3",
|
|
6245
|
-
onKeydown: (t) =>
|
|
6246
|
-
}, null, 40, hc), [[ie, x.value]]),
|
|
6251
|
+
onKeydown: (t) => be(t, e.id)
|
|
6252
|
+
}, null, 40, hc), [[ie, x.value]]), L("div", gc, [L("button", {
|
|
6247
6253
|
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)]",
|
|
6248
6254
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6249
|
-
onClick: (t) =>
|
|
6250
|
-
}, O(M(o).comments.save), 9, _c),
|
|
6255
|
+
onClick: (t) => pe(e.id)
|
|
6256
|
+
}, O(M(o).comments.save), 9, _c), L("button", {
|
|
6251
6257
|
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)]",
|
|
6252
|
-
onClick: n[5] ||= (e) =>
|
|
6258
|
+
onClick: n[5] ||= (e) => V()
|
|
6253
6259
|
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", vc, O(e.body), 1)),
|
|
6254
6260
|
w.value === e.id ? (f(), A("div", yc, [
|
|
6255
|
-
|
|
6256
|
-
|
|
6261
|
+
L("span", bc, O(M(o).comments.deleteConfirm), 1),
|
|
6262
|
+
L("button", {
|
|
6257
6263
|
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)]",
|
|
6258
|
-
onClick: (t) =>
|
|
6264
|
+
onClick: (t) => me(e.id)
|
|
6259
6265
|
}, O(M(o).comments.delete), 9, xc),
|
|
6260
|
-
|
|
6266
|
+
L("button", {
|
|
6261
6267
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6262
|
-
onClick: n[6] ||= (e) =>
|
|
6268
|
+
onClick: n[6] ||= (e) => ue()
|
|
6263
6269
|
}, O(M(o).comments.cancel), 1)
|
|
6264
6270
|
])) : j("", !0),
|
|
6265
|
-
y.value !== e.id && w.value !== e.id ? (f(), A("div", Sc, [
|
|
6271
|
+
y.value !== e.id && w.value !== e.id ? (f(), A("div", Sc, [L("button", {
|
|
6266
6272
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6267
6273
|
title: M(o).comments.reply,
|
|
6268
|
-
onClick: (t) =>
|
|
6269
|
-
}, [
|
|
6274
|
+
onClick: (t) => oe(e.id)
|
|
6275
|
+
}, [H(M(ci), {
|
|
6270
6276
|
size: 13,
|
|
6271
6277
|
"stroke-width": 2,
|
|
6272
6278
|
class: "tpl:text-[var(--tpl-primary)]"
|
|
6273
6279
|
})], 8, Cc), (e.replies?.length ?? 0) > 0 ? (f(), A("button", {
|
|
6274
6280
|
key: 0,
|
|
6275
6281
|
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)]",
|
|
6276
|
-
onClick: (t) =>
|
|
6282
|
+
onClick: (t) => ae(e.id)
|
|
6277
6283
|
}, [S.value.has(e.id) ? (f(), P(M(Br), {
|
|
6278
6284
|
key: 0,
|
|
6279
6285
|
size: 11,
|
|
@@ -6282,86 +6288,86 @@ var Gs = {
|
|
|
6282
6288
|
key: 1,
|
|
6283
6289
|
size: 11,
|
|
6284
6290
|
"stroke-width": 2
|
|
6285
|
-
})),
|
|
6291
|
+
})), B(" " + O((e.replies?.length ?? 0) === 1 ? M(a)(M(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : M(a)(M(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, wc)) : j("", !0)])) : j("", !0)
|
|
6286
6292
|
]),
|
|
6287
|
-
|
|
6288
|
-
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Tc, [(f(!0), A(
|
|
6293
|
+
H(re, { name: "tpl-replies" }, {
|
|
6294
|
+
default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), A("div", Tc, [(f(!0), A(z, null, h(e.replies, (t, r) => (f(), A("div", {
|
|
6289
6295
|
key: t.id,
|
|
6290
|
-
class:
|
|
6296
|
+
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" : ""])
|
|
6291
6297
|
}, [
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6298
|
+
L("div", Ec, [L("div", Dc, [
|
|
6299
|
+
L("span", Oc, O(ge(t) ? M(o).comments.ownedByYou : t.author_name), 1),
|
|
6300
|
+
L("span", kc, O(_e(t.created_at)), 1),
|
|
6295
6301
|
t.updated_at === t.created_at ? j("", !0) : (f(), A("span", Ac, " (" + O(M(o).comments.edited) + ") ", 1))
|
|
6296
|
-
]),
|
|
6302
|
+
]), L("div", jc, [ge(t) ? (f(), A("button", {
|
|
6297
6303
|
key: 0,
|
|
6298
6304
|
class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6299
6305
|
title: M(o).comments.edit,
|
|
6300
|
-
onClick: (e) =>
|
|
6301
|
-
}, [
|
|
6306
|
+
onClick: (e) => ce(t)
|
|
6307
|
+
}, [H(M(ii), {
|
|
6302
6308
|
size: 11,
|
|
6303
6309
|
"stroke-width": 2
|
|
6304
|
-
})], 8, Mc)) : j("", !0),
|
|
6310
|
+
})], 8, Mc)) : j("", !0), ge(t) ? (f(), A("button", {
|
|
6305
6311
|
key: 1,
|
|
6306
6312
|
class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
|
|
6307
6313
|
title: M(o).comments.delete,
|
|
6308
|
-
onClick: (e) =>
|
|
6309
|
-
}, [
|
|
6314
|
+
onClick: (e) => le(t.id)
|
|
6315
|
+
}, [H(M(hi), {
|
|
6310
6316
|
size: 11,
|
|
6311
6317
|
"stroke-width": 2
|
|
6312
6318
|
})], 8, Nc)) : j("", !0)])]),
|
|
6313
|
-
y.value === t.id ? (f(), A("div", Pc, [c(
|
|
6319
|
+
y.value === t.id ? (f(), A("div", Pc, [c(L("textarea", {
|
|
6314
6320
|
"onUpdate:modelValue": n[7] ||= (e) => x.value = e,
|
|
6315
6321
|
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)]",
|
|
6316
6322
|
rows: "2",
|
|
6317
|
-
onKeydown: (e) =>
|
|
6318
|
-
}, null, 40, Fc), [[ie, x.value]]),
|
|
6323
|
+
onKeydown: (e) => be(e, t.id)
|
|
6324
|
+
}, null, 40, Fc), [[ie, x.value]]), L("div", Ic, [L("button", {
|
|
6319
6325
|
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)]",
|
|
6320
6326
|
disabled: !x.value.trim() || M(u).isSubmitting.value,
|
|
6321
|
-
onClick: (e) =>
|
|
6322
|
-
}, O(M(o).comments.save), 9, Lc),
|
|
6327
|
+
onClick: (e) => pe(t.id)
|
|
6328
|
+
}, O(M(o).comments.save), 9, Lc), L("button", {
|
|
6323
6329
|
class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6324
|
-
onClick: n[8] ||= (e) =>
|
|
6330
|
+
onClick: n[8] ||= (e) => V()
|
|
6325
6331
|
}, O(M(o).comments.cancel), 1)])])) : (f(), A("p", Rc, O(t.body), 1)),
|
|
6326
6332
|
w.value === t.id ? (f(), A("div", zc, [
|
|
6327
|
-
|
|
6328
|
-
|
|
6333
|
+
L("span", Bc, O(M(o).comments.deleteConfirm), 1),
|
|
6334
|
+
L("button", {
|
|
6329
6335
|
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)]",
|
|
6330
|
-
onClick: (e) =>
|
|
6336
|
+
onClick: (e) => me(t.id)
|
|
6331
6337
|
}, O(M(o).comments.delete), 9, Vc),
|
|
6332
|
-
|
|
6338
|
+
L("button", {
|
|
6333
6339
|
class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
|
|
6334
|
-
onClick: n[9] ||= (e) =>
|
|
6340
|
+
onClick: n[9] ||= (e) => ue()
|
|
6335
6341
|
}, O(M(o).comments.cancel), 1)
|
|
6336
6342
|
])) : j("", !0)
|
|
6337
6343
|
], 2))), 128))])) : j("", !0)]),
|
|
6338
6344
|
_: 2
|
|
6339
6345
|
}, 1024),
|
|
6340
|
-
|
|
6341
|
-
default: b(() => [_.value === e.id ? (f(), A("div", Hc, [
|
|
6346
|
+
H(re, { name: "tpl-replies" }, {
|
|
6347
|
+
default: b(() => [_.value === e.id ? (f(), A("div", Hc, [L("div", Uc, [c(L("textarea", {
|
|
6342
6348
|
"onUpdate:modelValue": n[10] ||= (e) => v.value = e,
|
|
6343
6349
|
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)]",
|
|
6344
6350
|
placeholder: M(o).comments.replyPlaceholder,
|
|
6345
6351
|
rows: "2",
|
|
6346
|
-
onKeydown: (t) =>
|
|
6347
|
-
}, null, 40, Wc), [[ie, v.value]]),
|
|
6352
|
+
onKeydown: (t) => ye(t, e.id)
|
|
6353
|
+
}, null, 40, Wc), [[ie, v.value]]), L("div", Gc, [L("button", {
|
|
6348
6354
|
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)]",
|
|
6349
6355
|
disabled: !v.value.trim() || M(u).isSubmitting.value,
|
|
6350
|
-
onClick: (t) =>
|
|
6351
|
-
}, [
|
|
6356
|
+
onClick: (t) => fe(e.id)
|
|
6357
|
+
}, [H(M(li), {
|
|
6352
6358
|
size: 14,
|
|
6353
6359
|
"stroke-width": 2
|
|
6354
|
-
})], 8, Kc),
|
|
6360
|
+
})], 8, Kc), L("button", {
|
|
6355
6361
|
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)]",
|
|
6356
|
-
onClick: n[11] ||= (e) =>
|
|
6357
|
-
}, [
|
|
6362
|
+
onClick: n[11] ||= (e) => se()
|
|
6363
|
+
}, [H(M(bi), {
|
|
6358
6364
|
size: 14,
|
|
6359
6365
|
"stroke-width": 2
|
|
6360
6366
|
})])])])])) : j("", !0)]),
|
|
6361
6367
|
_: 2
|
|
6362
6368
|
}, 1024)
|
|
6363
6369
|
]))), 128))]))]),
|
|
6364
|
-
|
|
6370
|
+
L("div", qc, [te.value ? (f(), A("div", Jc, O(M(o).comments.saveTemplateFirst), 1)) : (f(), A("div", Yc, [c(L("textarea", {
|
|
6365
6371
|
ref_key: "newCommentInput",
|
|
6366
6372
|
ref: T,
|
|
6367
6373
|
"onUpdate:modelValue": n[12] ||= (e) => g.value = e,
|
|
@@ -6369,11 +6375,11 @@ var Gs = {
|
|
|
6369
6375
|
placeholder: M(o).comments.placeholder,
|
|
6370
6376
|
disabled: M(u).isSubmitting.value,
|
|
6371
6377
|
rows: "2",
|
|
6372
|
-
onKeydown:
|
|
6373
|
-
}, null, 40, Xc), [[ie, g.value]]),
|
|
6378
|
+
onKeydown: ve
|
|
6379
|
+
}, null, 40, Xc), [[ie, g.value]]), L("button", {
|
|
6374
6380
|
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)]",
|
|
6375
6381
|
disabled: !g.value.trim() || M(u).isSubmitting.value,
|
|
6376
|
-
onClick:
|
|
6382
|
+
onClick: de
|
|
6377
6383
|
}, [M(u).isSubmitting.value ? (f(), P(M(ti), {
|
|
6378
6384
|
key: 0,
|
|
6379
6385
|
class: "tpl-spinner",
|
|
@@ -6409,7 +6415,7 @@ var Gs = {
|
|
|
6409
6415
|
}, Sl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Cl = { class: "tpl:flex tpl:gap-2" }, wl = {
|
|
6410
6416
|
key: 1,
|
|
6411
6417
|
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)]"
|
|
6412
|
-
}, Tl = ["disabled"], El = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Dl = /* @__PURE__ */
|
|
6418
|
+
}, Tl = ["disabled"], El = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Dl = /* @__PURE__ */ V({
|
|
6413
6419
|
__name: "DesignReferenceSidebar",
|
|
6414
6420
|
props: {
|
|
6415
6421
|
visible: { type: Boolean },
|
|
@@ -6417,8 +6423,8 @@ var Gs = {
|
|
|
6417
6423
|
},
|
|
6418
6424
|
emits: ["close", "apply"],
|
|
6419
6425
|
setup(e, { emit: t }) {
|
|
6420
|
-
let n = e, r = t, { t: i } = Fi(), a =
|
|
6421
|
-
authManager:
|
|
6426
|
+
let n = e, r = t, { t: i } = Fi(), a = Y(Mn, "DesignReferenceSidebar"), o = Jo({
|
|
6427
|
+
authManager: Y(er, "DesignReferenceSidebar"),
|
|
6422
6428
|
getTemplateId: () => a.state.template?.id ?? null,
|
|
6423
6429
|
onApply: (e) => r("apply", e)
|
|
6424
6430
|
}), 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);
|
|
@@ -6477,7 +6483,7 @@ var Gs = {
|
|
|
6477
6483
|
function D() {
|
|
6478
6484
|
m.value = !1;
|
|
6479
6485
|
}
|
|
6480
|
-
return
|
|
6486
|
+
return U(() => n.visible, (e) => {
|
|
6481
6487
|
e || (m.value = !1);
|
|
6482
6488
|
}), ne(() => {
|
|
6483
6489
|
p.value &&= (URL.revokeObjectURL(p.value), null);
|
|
@@ -6489,58 +6495,58 @@ var Gs = {
|
|
|
6489
6495
|
"leave-from-class": "tpl:translate-x-0",
|
|
6490
6496
|
"leave-to-class": "tpl:translate-x-full"
|
|
6491
6497
|
}, {
|
|
6492
|
-
default: b(() => [e.visible ? (f(), A("div", tl, [
|
|
6498
|
+
default: b(() => [e.visible ? (f(), A("div", tl, [L("div", nl, [L("div", rl, [H(M(Qr), {
|
|
6493
6499
|
size: 13,
|
|
6494
6500
|
"stroke-width": 2
|
|
6495
|
-
}),
|
|
6501
|
+
}), L("span", null, O(M(i).designReference.title), 1)]), L("button", {
|
|
6496
6502
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6497
6503
|
onClick: n[0] ||= (e) => r("close")
|
|
6498
|
-
}, [
|
|
6504
|
+
}, [H(M(bi), {
|
|
6499
6505
|
size: 14,
|
|
6500
6506
|
"stroke-width": 2
|
|
6501
|
-
})])]),
|
|
6502
|
-
|
|
6507
|
+
})])]), L("div", il, [M(o).isGenerating.value ? (f(), A("div", al, [L("div", ol, [H(ki), L("p", sl, O(M(i).designReference.generating), 1)])])) : (f(), A("div", cl, [
|
|
6508
|
+
L("div", ll, [L("button", {
|
|
6503
6509
|
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",
|
|
6504
|
-
style:
|
|
6510
|
+
style: R({
|
|
6505
6511
|
backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
|
|
6506
6512
|
color: l.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6507
6513
|
boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
|
|
6508
6514
|
}),
|
|
6509
6515
|
onClick: n[1] ||= (e) => _("image")
|
|
6510
|
-
}, [
|
|
6516
|
+
}, [H(M(Jr), {
|
|
6511
6517
|
size: 12,
|
|
6512
6518
|
"stroke-width": 2
|
|
6513
|
-
}),
|
|
6519
|
+
}), B(" " + O(M(i).designReference.uploadImage), 1)], 4), L("button", {
|
|
6514
6520
|
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",
|
|
6515
|
-
style:
|
|
6521
|
+
style: R({
|
|
6516
6522
|
backgroundColor: l.value === "pdf" ? "var(--tpl-bg)" : "transparent",
|
|
6517
6523
|
color: l.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
|
|
6518
6524
|
boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
|
|
6519
6525
|
}),
|
|
6520
6526
|
onClick: n[2] ||= (e) => _("pdf")
|
|
6521
|
-
}, [
|
|
6527
|
+
}, [H(M(Yr), {
|
|
6522
6528
|
size: 12,
|
|
6523
6529
|
"stroke-width": 2
|
|
6524
|
-
}),
|
|
6525
|
-
|
|
6530
|
+
}), B(" " + O(M(i).designReference.uploadPdf), 1)], 4)]),
|
|
6531
|
+
L("div", null, [u.value ? (f(), A("div", ul, [L("div", dl, [p.value ? (f(), A("img", {
|
|
6526
6532
|
key: 0,
|
|
6527
6533
|
src: p.value,
|
|
6528
6534
|
alt: u.value.name,
|
|
6529
6535
|
class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
|
|
6530
|
-
}, null, 8, fl)) : (f(), A("div", pl, [
|
|
6536
|
+
}, null, 8, fl)) : (f(), A("div", pl, [H(M(Yr), {
|
|
6531
6537
|
size: 32,
|
|
6532
6538
|
"stroke-width": 1.5,
|
|
6533
6539
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6534
|
-
}),
|
|
6540
|
+
}), L("span", ml, O(u.value.name), 1)])), L("button", {
|
|
6535
6541
|
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)]",
|
|
6536
6542
|
onClick: x
|
|
6537
|
-
}, [
|
|
6543
|
+
}, [H(M(bi), {
|
|
6538
6544
|
size: 12,
|
|
6539
6545
|
"stroke-width": 2
|
|
6540
6546
|
})])])])) : (f(), A("div", {
|
|
6541
6547
|
key: 1,
|
|
6542
6548
|
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",
|
|
6543
|
-
style:
|
|
6549
|
+
style: R({
|
|
6544
6550
|
borderColor: h.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
|
|
6545
6551
|
backgroundColor: h.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
|
|
6546
6552
|
}),
|
|
@@ -6549,14 +6555,14 @@ var Gs = {
|
|
|
6549
6555
|
onDragleave: w,
|
|
6550
6556
|
onDrop: T
|
|
6551
6557
|
}, [
|
|
6552
|
-
|
|
6558
|
+
H(M(vi), {
|
|
6553
6559
|
size: 24,
|
|
6554
6560
|
"stroke-width": 1.5,
|
|
6555
6561
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6556
6562
|
}),
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
], 36)),
|
|
6563
|
+
L("span", hl, O(M(i).designReference.dropHint), 1),
|
|
6564
|
+
L("span", gl, O(l.value === "image" ? M(i).designReference.acceptedImages : M(i).designReference.acceptedPdf), 1)
|
|
6565
|
+
], 36)), L("input", {
|
|
6560
6566
|
ref_key: "fileInput",
|
|
6561
6567
|
ref: s,
|
|
6562
6568
|
type: "file",
|
|
@@ -6564,35 +6570,35 @@ var Gs = {
|
|
|
6564
6570
|
accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
|
|
6565
6571
|
onChange: v
|
|
6566
6572
|
}, null, 40, _l)]),
|
|
6567
|
-
|
|
6573
|
+
L("div", vl, [L("label", yl, O(M(i).designReference.promptLabel), 1), c(L("textarea", {
|
|
6568
6574
|
"onUpdate:modelValue": n[4] ||= (e) => d.value = e,
|
|
6569
|
-
class:
|
|
6575
|
+
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"]]),
|
|
6570
6576
|
placeholder: M(i).designReference.promptPlaceholder,
|
|
6571
6577
|
rows: "3"
|
|
6572
6578
|
}, null, 8, bl), [[ie, d.value]])]),
|
|
6573
|
-
m.value ? (f(), A("div", xl, [
|
|
6579
|
+
m.value ? (f(), A("div", xl, [L("p", Sl, O(M(i).designReference.replaceWarning), 1), L("div", Cl, [L("button", {
|
|
6574
6580
|
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)]",
|
|
6575
6581
|
style: { "background-color": "transparent" },
|
|
6576
6582
|
onClick: D
|
|
6577
|
-
}, O(M(i).designReference.replaceCancel), 1),
|
|
6583
|
+
}, O(M(i).designReference.replaceCancel), 1), L("button", {
|
|
6578
6584
|
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)]",
|
|
6579
6585
|
onClick: E
|
|
6580
6586
|
}, O(M(i).designReference.replaceConfirm), 1)])])) : j("", !0),
|
|
6581
|
-
M(o).error.value ? (f(), A("div", wl, [
|
|
6587
|
+
M(o).error.value ? (f(), A("div", wl, [H(M(Vr), {
|
|
6582
6588
|
size: 14,
|
|
6583
6589
|
"stroke-width": 2,
|
|
6584
6590
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6585
|
-
}),
|
|
6591
|
+
}), L("span", null, O(M(i).designReference.error), 1)])) : j("", !0),
|
|
6586
6592
|
m.value ? j("", !0) : (f(), A("button", {
|
|
6587
6593
|
key: 2,
|
|
6588
6594
|
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)]",
|
|
6589
6595
|
disabled: !g.value,
|
|
6590
6596
|
onClick: E
|
|
6591
|
-
}, [
|
|
6597
|
+
}, [H(M(Qr), {
|
|
6592
6598
|
size: 16,
|
|
6593
6599
|
"stroke-width": 2
|
|
6594
|
-
}),
|
|
6595
|
-
|
|
6600
|
+
}), B(" " + O(M(i).designReference.generate), 1)], 8, Tl)),
|
|
6601
|
+
L("p", El, O(M(i).aiMenu.disclaimer), 1)
|
|
6596
6602
|
]))])])) : j("", !0)]),
|
|
6597
6603
|
_: 1
|
|
6598
6604
|
}));
|
|
@@ -6601,25 +6607,25 @@ var Gs = {
|
|
|
6601
6607
|
//#endregion
|
|
6602
6608
|
//#region src/composables/usePopoverRoot.ts
|
|
6603
6609
|
function Al() {
|
|
6604
|
-
return v(
|
|
6610
|
+
return v($n, C(null));
|
|
6605
6611
|
}
|
|
6606
6612
|
//#endregion
|
|
6607
6613
|
//#region src/cloud/components/TplModal.vue?vue&type=script&setup=true&lang.ts
|
|
6608
|
-
var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */
|
|
6614
|
+
var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ V({
|
|
6609
6615
|
__name: "TplModal",
|
|
6610
6616
|
props: { visible: { type: Boolean } },
|
|
6611
6617
|
emits: ["close", "keydown"],
|
|
6612
6618
|
setup(e, { emit: t }) {
|
|
6613
6619
|
let n = e, r = t, i = C(null);
|
|
6614
6620
|
Mi(i, k(() => n.visible));
|
|
6615
|
-
let a = v(
|
|
6621
|
+
let a = v(Rn), s = Al();
|
|
6616
6622
|
function c(e) {
|
|
6617
6623
|
e.key === "Escape" && r("close"), r("keydown", e);
|
|
6618
6624
|
}
|
|
6619
6625
|
return (t, n) => M(s) ? (f(), P(ee, {
|
|
6620
6626
|
key: 0,
|
|
6621
6627
|
to: M(s)
|
|
6622
|
-
}, [
|
|
6628
|
+
}, [H(re, {
|
|
6623
6629
|
"enter-active-class": "tpl:transition tpl:duration-150",
|
|
6624
6630
|
"enter-from-class": "tpl:opacity-0",
|
|
6625
6631
|
"enter-to-class": "tpl:opacity-100",
|
|
@@ -6638,7 +6644,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6638
6644
|
},
|
|
6639
6645
|
onClick: n[0] ||= N((e) => r("close"), ["self"]),
|
|
6640
6646
|
onKeydown: c
|
|
6641
|
-
}, [
|
|
6647
|
+
}, [L("div", {
|
|
6642
6648
|
ref_key: "dialogRef",
|
|
6643
6649
|
ref: i
|
|
6644
6650
|
}, [o(t.$slots, "default")], 512)], 40, jl)) : j("", !0)]),
|
|
@@ -6664,7 +6670,7 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6664
6670
|
}, Bl = ["disabled", "onClick"], Vl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Hl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ul = {
|
|
6665
6671
|
key: 0,
|
|
6666
6672
|
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)]"
|
|
6667
|
-
}, Wl = ["disabled", "title"], Gl = /* @__PURE__ */
|
|
6673
|
+
}, Wl = ["disabled", "title"], Gl = /* @__PURE__ */ V({
|
|
6668
6674
|
__name: "SnapshotHistory",
|
|
6669
6675
|
props: {
|
|
6670
6676
|
snapshots: {},
|
|
@@ -6673,8 +6679,8 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6673
6679
|
},
|
|
6674
6680
|
emits: ["load", "navigate"],
|
|
6675
6681
|
setup(e, { emit: t }) {
|
|
6676
|
-
let n = e, r = t, { format: i } =
|
|
6677
|
-
|
|
6682
|
+
let n = e, r = t, { format: i } = cr(), { t: a } = Fi(), o = C(!1), s = C(null), c = C(-1);
|
|
6683
|
+
U(() => n.snapshots.length, () => {
|
|
6678
6684
|
c.value = -1;
|
|
6679
6685
|
});
|
|
6680
6686
|
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);
|
|
@@ -6700,54 +6706,54 @@ var jl = ["data-tpl-theme"], Ml = /* @__PURE__ */ B({
|
|
|
6700
6706
|
minute: "2-digit"
|
|
6701
6707
|
}) : t;
|
|
6702
6708
|
}
|
|
6703
|
-
return
|
|
6709
|
+
return dn(s, () => {
|
|
6704
6710
|
o.value = !1;
|
|
6705
6711
|
}), (t, n) => (f(), A("div", {
|
|
6706
6712
|
ref_key: "dropdownRef",
|
|
6707
6713
|
ref: s,
|
|
6708
6714
|
class: "tpl:relative tpl:flex tpl:items-center tpl:gap-0.5"
|
|
6709
6715
|
}, [
|
|
6710
|
-
|
|
6716
|
+
L("button", {
|
|
6711
6717
|
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)]",
|
|
6712
6718
|
disabled: !u.value,
|
|
6713
6719
|
title: M(a).snapshotHistory.olderSnapshot,
|
|
6714
6720
|
onClick: N(p, ["stop"])
|
|
6715
|
-
}, [
|
|
6721
|
+
}, [H(M(Rr), {
|
|
6716
6722
|
size: 14,
|
|
6717
6723
|
"stroke-width": 2
|
|
6718
6724
|
})], 8, Nl),
|
|
6719
|
-
|
|
6725
|
+
L("button", {
|
|
6720
6726
|
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)]",
|
|
6721
6727
|
title: M(a).snapshotHistory.tooltip,
|
|
6722
6728
|
onClick: N(m, ["stop"])
|
|
6723
|
-
}, [
|
|
6729
|
+
}, [H(M(Ur), {
|
|
6724
6730
|
size: 16,
|
|
6725
6731
|
"stroke-width": 1.5
|
|
6726
|
-
}),
|
|
6727
|
-
class:
|
|
6732
|
+
}), H(M(Lr), {
|
|
6733
|
+
class: I(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
|
|
6728
6734
|
size: 10,
|
|
6729
6735
|
"stroke-width": 2
|
|
6730
6736
|
}, null, 8, ["class"])], 8, Pl),
|
|
6731
|
-
|
|
6732
|
-
default: b(() => [o.value ? (f(), A("div", Fl, [
|
|
6737
|
+
H(re, { name: "tpl-dropdown" }, {
|
|
6738
|
+
default: b(() => [o.value ? (f(), A("div", Fl, [L("div", Il, O(M(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), A("div", Ll, [H(M(ti), {
|
|
6733
6739
|
class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
|
|
6734
6740
|
size: 20,
|
|
6735
6741
|
"stroke-width": 2
|
|
6736
|
-
})])) : e.snapshots.length === 0 ? (f(), A("div", Rl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", zl, [(f(!0), A(
|
|
6742
|
+
})])) : e.snapshots.length === 0 ? (f(), A("div", Rl, O(M(a).snapshotHistory.noSnapshots), 1)) : (f(), A("div", zl, [(f(!0), A(z, null, h(e.snapshots, (t) => (f(), A("button", {
|
|
6737
6743
|
key: t.id,
|
|
6738
6744
|
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)]",
|
|
6739
6745
|
style: { "background-color": "transparent" },
|
|
6740
6746
|
disabled: e.isRestoring,
|
|
6741
6747
|
onClick: (e) => g(t.id)
|
|
6742
|
-
}, [
|
|
6748
|
+
}, [L("div", Vl, [L("div", Hl, [L("span", null, O(_(t.created_at)), 1), t.is_autosave ? (f(), A("span", Ul, O(M(a).snapshotHistory.auto), 1)) : j("", !0)])])], 8, Bl))), 128))]))])) : j("", !0)]),
|
|
6743
6749
|
_: 1
|
|
6744
6750
|
}),
|
|
6745
|
-
|
|
6751
|
+
L("button", {
|
|
6746
6752
|
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)]",
|
|
6747
6753
|
disabled: !l.value,
|
|
6748
6754
|
title: M(a).snapshotHistory.newerSnapshot,
|
|
6749
6755
|
onClick: N(d, ["stop"])
|
|
6750
|
-
}, [
|
|
6756
|
+
}, [H(M(zr), {
|
|
6751
6757
|
size: 14,
|
|
6752
6758
|
"stroke-width": 2
|
|
6753
6759
|
})], 8, Wl)
|
|
@@ -6809,12 +6815,12 @@ var Ql = {
|
|
|
6809
6815
|
}, Tu = {
|
|
6810
6816
|
key: 3,
|
|
6811
6817
|
class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
|
|
6812
|
-
}, Eu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Du = { 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)]" }, Ou = /* @__PURE__ */
|
|
6818
|
+
}, Eu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Du = { 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)]" }, Ou = /* @__PURE__ */ V({
|
|
6813
6819
|
__name: "TemplateScoringPanel",
|
|
6814
6820
|
props: { visible: { type: Boolean } },
|
|
6815
6821
|
emits: ["close"],
|
|
6816
6822
|
setup(e, { emit: t }) {
|
|
6817
|
-
let n = e, r = t, { t: i } = Fi(), a =
|
|
6823
|
+
let n = e, r = t, { t: i } = Fi(), a = Y(Mn, "TemplateScoringPanel"), o = Y(ir, "TemplateScoringPanel"), s = v(Hn, []), c = C({
|
|
6818
6824
|
spam: !0,
|
|
6819
6825
|
readability: !0,
|
|
6820
6826
|
accessibility: !0,
|
|
@@ -6837,7 +6843,7 @@ var Ql = {
|
|
|
6837
6843
|
function m() {
|
|
6838
6844
|
o.score(a.content.value, s);
|
|
6839
6845
|
}
|
|
6840
|
-
|
|
6846
|
+
U(() => n.visible, (e) => {
|
|
6841
6847
|
e && !o.scoringResult.value && !o.isScoring.value && m();
|
|
6842
6848
|
});
|
|
6843
6849
|
async function g(e) {
|
|
@@ -6860,98 +6866,98 @@ var Ql = {
|
|
|
6860
6866
|
"leave-from-class": "tpl:translate-x-0",
|
|
6861
6867
|
"leave-to-class": "tpl:translate-x-full"
|
|
6862
6868
|
}, {
|
|
6863
|
-
default: b(() => [e.visible ? (f(), A("div", Ql, [
|
|
6869
|
+
default: b(() => [e.visible ? (f(), A("div", Ql, [L("div", $l, [L("div", eu, [H(M(di), {
|
|
6864
6870
|
size: 13,
|
|
6865
6871
|
"stroke-width": 2
|
|
6866
|
-
}),
|
|
6872
|
+
}), L("span", null, O(M(i).scoring.title), 1)]), L("div", tu, [M(o).scoringResult.value && !M(o).isScoring.value ? (f(), A("button", {
|
|
6867
6873
|
key: 0,
|
|
6868
6874
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6869
6875
|
title: M(i).scoring.rescore,
|
|
6870
6876
|
onClick: n[0] ||= (e) => m()
|
|
6871
|
-
}, [
|
|
6877
|
+
}, [H(M(si), {
|
|
6872
6878
|
size: 14,
|
|
6873
6879
|
"stroke-width": 2
|
|
6874
|
-
})], 8, nu)) : j("", !0),
|
|
6880
|
+
})], 8, nu)) : j("", !0), L("button", {
|
|
6875
6881
|
class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
|
|
6876
6882
|
onClick: n[1] ||= (e) => r("close")
|
|
6877
|
-
}, [
|
|
6883
|
+
}, [H(M(bi), {
|
|
6878
6884
|
size: 14,
|
|
6879
6885
|
"stroke-width": 2
|
|
6880
|
-
})])])]),
|
|
6881
|
-
|
|
6886
|
+
})])])]), L("div", ru, [M(o).isScoring.value ? (f(), A("div", iu, [L("p", au, O(M(i).scoring.scoring), 1), H(ki, { class: "tpl:w-3/4" })])) : M(o).error.value && !M(o).scoringResult.value ? (f(), A("div", ou, [
|
|
6887
|
+
H(M(Vr), {
|
|
6882
6888
|
size: 32,
|
|
6883
6889
|
"stroke-width": 1.5,
|
|
6884
6890
|
class: "tpl:text-[var(--tpl-danger)]"
|
|
6885
6891
|
}),
|
|
6886
|
-
|
|
6887
|
-
|
|
6892
|
+
L("p", su, O(M(i).scoring.error), 1),
|
|
6893
|
+
L("button", {
|
|
6888
6894
|
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)]",
|
|
6889
6895
|
onClick: n[2] ||= (e) => m()
|
|
6890
|
-
}, [
|
|
6896
|
+
}, [H(M(si), {
|
|
6891
6897
|
size: 12,
|
|
6892
6898
|
"stroke-width": 2
|
|
6893
|
-
}),
|
|
6899
|
+
}), B(" " + O(M(i).scoring.rescore), 1)])
|
|
6894
6900
|
])) : M(o).scoringResult.value ? (f(), A("div", cu, [
|
|
6895
|
-
|
|
6901
|
+
L("div", {
|
|
6896
6902
|
class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
|
|
6897
|
-
style:
|
|
6903
|
+
style: R({ backgroundColor: M(Yl)(M(o).scoringResult.value.score) })
|
|
6898
6904
|
}, [
|
|
6899
|
-
|
|
6905
|
+
L("span", {
|
|
6900
6906
|
class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
|
|
6901
|
-
style:
|
|
6907
|
+
style: R({ color: M(Jl)(M(o).scoringResult.value.score) })
|
|
6902
6908
|
}, O(M(o).scoringResult.value.score), 5),
|
|
6903
|
-
|
|
6909
|
+
L("span", lu, O(M(i).scoring.overallScore), 1),
|
|
6904
6910
|
_() > 0 ? (f(), A("span", uu, O(_()) + " " + O(M(i).scoring.findings), 1)) : j("", !0)
|
|
6905
6911
|
], 4),
|
|
6906
|
-
M(o).fixError.value ? (f(), A("div", du, [
|
|
6912
|
+
M(o).fixError.value ? (f(), A("div", du, [H(M(Vr), {
|
|
6907
6913
|
size: 14,
|
|
6908
6914
|
"stroke-width": 2,
|
|
6909
6915
|
class: "tpl:mt-0.5 tpl:shrink-0"
|
|
6910
|
-
}),
|
|
6911
|
-
(f(), A(
|
|
6916
|
+
}), L("span", null, O(M(i).scoring.fixError), 1)])) : j("", !0),
|
|
6917
|
+
(f(), A(z, null, h(u, (e) => L("div", {
|
|
6912
6918
|
key: e,
|
|
6913
6919
|
class: "tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)]"
|
|
6914
|
-
}, [
|
|
6920
|
+
}, [L("button", {
|
|
6915
6921
|
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)]",
|
|
6916
6922
|
onClick: (t) => l(e)
|
|
6917
6923
|
}, [
|
|
6918
6924
|
(f(), P(d(p[e]), {
|
|
6919
6925
|
size: 14,
|
|
6920
6926
|
"stroke-width": 2,
|
|
6921
|
-
style:
|
|
6927
|
+
style: R({ color: M(Jl)(M(o).scoringResult.value.categories[e].score) })
|
|
6922
6928
|
}, null, 8, ["style"])),
|
|
6923
|
-
|
|
6924
|
-
|
|
6929
|
+
L("span", pu, O(M(i).scoring.categories[e]), 1),
|
|
6930
|
+
L("span", {
|
|
6925
6931
|
class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
|
|
6926
|
-
style:
|
|
6932
|
+
style: R({
|
|
6927
6933
|
color: M(Jl)(M(o).scoringResult.value.categories[e].score),
|
|
6928
6934
|
backgroundColor: M(Yl)(M(o).scoringResult.value.categories[e].score)
|
|
6929
6935
|
})
|
|
6930
6936
|
}, O(M(o).scoringResult.value.categories[e].score), 5),
|
|
6931
6937
|
M(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), A("span", mu, O(M(o).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
|
|
6932
|
-
|
|
6938
|
+
H(M(Lr), {
|
|
6933
6939
|
size: 12,
|
|
6934
6940
|
"stroke-width": 2,
|
|
6935
|
-
class:
|
|
6941
|
+
class: I(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
|
|
6936
6942
|
}, null, 8, ["class"])
|
|
6937
|
-
], 8, fu), c.value[e] ? (f(), A("div", hu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", gu, O(M(i).scoring.noFindings), 1)) : j("", !0), (f(!0), A(
|
|
6943
|
+
], 8, fu), c.value[e] ? (f(), A("div", hu, [M(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), A("div", gu, 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", {
|
|
6938
6944
|
key: e.id,
|
|
6939
6945
|
class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
|
|
6940
|
-
}, [
|
|
6946
|
+
}, [L("div", _u, [(f(), P(d(M(e.severity === "high" ? Vr : e.severity === "medium" ? gi : ei)), {
|
|
6941
6947
|
size: 13,
|
|
6942
6948
|
"stroke-width": 2,
|
|
6943
6949
|
class: "tpl:mt-0.5 tpl:shrink-0",
|
|
6944
|
-
style:
|
|
6945
|
-
}, null, 8, ["style"])),
|
|
6946
|
-
|
|
6950
|
+
style: R({ color: M(Xl)(e.severity) })
|
|
6951
|
+
}, null, 8, ["style"])), L("div", vu, [
|
|
6952
|
+
L("div", yu, [L("span", {
|
|
6947
6953
|
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",
|
|
6948
|
-
style:
|
|
6954
|
+
style: R({
|
|
6949
6955
|
color: M(Xl)(e.severity),
|
|
6950
6956
|
backgroundColor: M(Zl)(e.severity)
|
|
6951
6957
|
})
|
|
6952
|
-
}, O(M(i).scoring.severity[e.severity]), 5),
|
|
6958
|
+
}, O(M(i).scoring.severity[e.severity]), 5), L("span", bu, O(e.message), 1)]),
|
|
6953
6959
|
e.suggestion ? (f(), A("p", xu, O(e.suggestion), 1)) : j("", !0),
|
|
6954
|
-
e.blockId ? (f(), A("div", Su, [
|
|
6960
|
+
e.blockId ? (f(), A("div", Su, [L("button", {
|
|
6955
6961
|
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)]",
|
|
6956
6962
|
style: { "background-color": "transparent" },
|
|
6957
6963
|
disabled: M(o).fixingFindingId.value !== null,
|
|
@@ -6965,13 +6971,13 @@ var Ql = {
|
|
|
6965
6971
|
key: 1,
|
|
6966
6972
|
size: 11,
|
|
6967
6973
|
"stroke-width": 2
|
|
6968
|
-
})),
|
|
6974
|
+
})), B(" " + O(M(o).fixingFindingId.value === e.id ? M(i).scoring.fixing : M(i).scoring.fix), 1)], 8, Cu), M(o).fixError.value ? (f(), A("p", wu, O(M(o).fixError.value), 1)) : j("", !0)])) : j("", !0)
|
|
6969
6975
|
])])]))), 128))])) : j("", !0)])), 64))
|
|
6970
|
-
])) : (f(), A("div", Tu, [
|
|
6976
|
+
])) : (f(), A("div", Tu, [H(M(di), {
|
|
6971
6977
|
size: 32,
|
|
6972
6978
|
"stroke-width": 1.5,
|
|
6973
6979
|
class: "tpl:text-[var(--tpl-text-dim)]"
|
|
6974
|
-
}),
|
|
6980
|
+
}), L("p", Eu, O(M(i).scoring.emptyState), 1)])), L("p", Du, O(M(i).aiMenu.disclaimer), 1)])])) : j("", !0)]),
|
|
6975
6981
|
_: 1
|
|
6976
6982
|
}));
|
|
6977
6983
|
}
|
|
@@ -6985,7 +6991,7 @@ var Ql = {
|
|
|
6985
6991
|
}, zu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Bu = ["disabled"], Vu = ["disabled"], Hu = {
|
|
6986
6992
|
key: 0,
|
|
6987
6993
|
class: "tpl:flex tpl:items-center tpl:gap-1.5"
|
|
6988
|
-
}, Uu = { key: 1 }, Wu = /* @__PURE__ */
|
|
6994
|
+
}, Uu = { key: 1 }, Wu = /* @__PURE__ */ V({
|
|
6989
6995
|
__name: "TestEmailModal",
|
|
6990
6996
|
props: {
|
|
6991
6997
|
visible: { type: Boolean },
|
|
@@ -6996,7 +7002,7 @@ var Ql = {
|
|
|
6996
7002
|
emits: ["send", "close"],
|
|
6997
7003
|
setup(e, { emit: t }) {
|
|
6998
7004
|
let n = e, r = t, { t: i } = Fi(), a = C("");
|
|
6999
|
-
|
|
7005
|
+
U(() => n.visible, (e) => {
|
|
7000
7006
|
e && (a.value = n.allowedEmails[0] ?? "");
|
|
7001
7007
|
});
|
|
7002
7008
|
function o() {
|
|
@@ -7013,7 +7019,7 @@ var Ql = {
|
|
|
7013
7019
|
onClose: s,
|
|
7014
7020
|
onKeydown: l
|
|
7015
7021
|
}, {
|
|
7016
|
-
default: b(() => [
|
|
7022
|
+
default: b(() => [L("div", {
|
|
7017
7023
|
role: "dialog",
|
|
7018
7024
|
"aria-modal": "true",
|
|
7019
7025
|
"aria-busy": e.isSending,
|
|
@@ -7024,8 +7030,8 @@ var Ql = {
|
|
|
7024
7030
|
"box-shadow": "var(--tpl-shadow-xl)"
|
|
7025
7031
|
}
|
|
7026
7032
|
}, [
|
|
7027
|
-
|
|
7028
|
-
|
|
7033
|
+
L("h3", Mu, O(M(i).testEmail.title), 1),
|
|
7034
|
+
L("div", Nu, [L("label", Pu, O(M(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), A("input", {
|
|
7029
7035
|
key: 0,
|
|
7030
7036
|
type: "text",
|
|
7031
7037
|
value: a.value,
|
|
@@ -7036,32 +7042,32 @@ var Ql = {
|
|
|
7036
7042
|
"onUpdate:modelValue": n[0] ||= (e) => a.value = e,
|
|
7037
7043
|
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)]",
|
|
7038
7044
|
disabled: e.isSending
|
|
7039
|
-
}, [(f(!0), A(
|
|
7045
|
+
}, [(f(!0), A(z, null, h(e.allowedEmails, (e) => (f(), A("option", {
|
|
7040
7046
|
key: e,
|
|
7041
7047
|
value: e
|
|
7042
7048
|
}, O(e), 9, Lu))), 128))], 8, Iu)), [[w, a.value]])]),
|
|
7043
7049
|
e.error ? (f(), A("p", Ru, O(e.error), 1)) : j("", !0),
|
|
7044
|
-
|
|
7050
|
+
L("div", zu, [L("button", {
|
|
7045
7051
|
type: "button",
|
|
7046
|
-
class:
|
|
7052
|
+
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 }]),
|
|
7047
7053
|
disabled: e.isSending,
|
|
7048
7054
|
onClick: s
|
|
7049
|
-
}, O(M(i).testEmail.cancel), 11, Bu),
|
|
7055
|
+
}, O(M(i).testEmail.cancel), 11, Bu), L("button", {
|
|
7050
7056
|
type: "button",
|
|
7051
7057
|
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)]",
|
|
7052
7058
|
disabled: !a.value || e.isSending,
|
|
7053
7059
|
onClick: o
|
|
7054
|
-
}, [e.isSending ? (f(), A("span", Hu, [
|
|
7060
|
+
}, [e.isSending ? (f(), A("span", Hu, [H(M(ti), {
|
|
7055
7061
|
class: "tpl:animate-spin",
|
|
7056
7062
|
size: 12,
|
|
7057
7063
|
"stroke-width": 2
|
|
7058
|
-
}),
|
|
7064
|
+
}), B(" " + O(M(i).testEmail.sending), 1)])) : (f(), A("span", Uu, O(M(i).testEmail.send), 1))], 8, Vu)])
|
|
7059
7065
|
], 8, ju)]),
|
|
7060
7066
|
_: 1
|
|
7061
7067
|
}, 8, ["visible"]));
|
|
7062
7068
|
}
|
|
7063
7069
|
}), Gu = /* @__PURE__ */ e({ default: () => Ku }), Ku = Wu;
|
|
7064
7070
|
//#endregion
|
|
7065
|
-
export { Ii as $,
|
|
7071
|
+
export { Ii as $, Zn as $t, Ao as A, pe as An, Ir as At, Na as B, Bn as Bt, Ho as C, _e as Cn, Kr as Ct, Z as D, ge as Dn, Vr as Dt, $ as E, Se as En, Ur as Et, $a as F, ye as Fn, cr as Ft, sa as G, Vn as Gt, ja as H, ar as Ht, to as I, fe as In, tr as It, $i as J, In as Jt, oa as K, qn as Kt, Qa as L, ue as Ln, Jn as Lt, vo as M, xe as Mn, wr as Mt, fo as N, we as Nn, gr as Nt, jo as O, Ce as On, zr as Ot, co as P, me as Pn, lr as Pt, Li as Q, ir as Qt, Ja as R, de as Rn, er as Rt, Ko as S, G as Sn, qr as St, Ro as T, ve as Tn, Wr as Tt, Sa as U, nr as Ut, Ma as V, Yn as Vt, va as W, Fn as Wt, Hi as X, Kn as Xt, Wi as Y, Un as Yt, Ri as Z, rr as Zt, ns as _, mt as _n, ni as _t, Al as a, bn as an, bi as at, Yo as b, ot as bn, $r as bt, zs as c, Cn as cn, hi as ct, cs as d, nn as dn, di as dt, Ln as en, Pi as et, ss as f, jt as fn, ui as ft, rs as g, vt as gn, ri as gt, is as h, gt as hn, ii as ht, Ml as i, yn as in, wi as it, Oo as j, be as jn, X as jt, Mo as k, he as kn, Lr as kt, ms as l, Qt as ln, mi as lt, as as m, ct as mn, si as mt, ku as n, Y as nn, Mi as nt, Ol as o, J as on, vi as ot, os as p, St as pn, li as pt, ta as q, Mn as qt, Kl as r, dn as rn, Ti as rt, $c as s, En as sn, gi as st, Gu as t, Rn as tn, Fi as tt, ps as u, tn as un, pi as ut, ts as v, _t as vn, ti as vt, zo as w, Te as wn, Gr as wt, qo as x, at as xn, Qr as xt, Xo as y, st as yn, ei as yt, Ka as z, le as zn, zn as zt };
|
|
7066
7072
|
|
|
7067
|
-
//# sourceMappingURL=features-
|
|
7073
|
+
//# sourceMappingURL=features-CUYy5kZQ.js.map
|