@templatical/editor 0.14.0 → 0.15.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/{AiChatSidebar-J8iO_sX7.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-F2diEDgV.js → AiFeatureMenu-CU6kTMTf.js} +20 -20
  3. package/dist/{BlockIssueBadge-a-qlByxF.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/{CloudEditor-CDjtwb4i.js → CloudEditor-DRPxvUEj.js} +470 -468
  5. package/dist/{CollaboratorBar-B_EnJLtW.js → CollaboratorBar-DMSjd3HZ.js} +20 -20
  6. package/dist/{CommentsSidebar-DaP9BA_r.js → CommentsSidebar-D_tSGvTX.js} +154 -153
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BHRlTqlT.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-u7ee3Wrl.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-CV3ID80N.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/{ModuleBrowserModal-DOsdaS6s.js → ModuleBrowserModal-BOzleijA.js} +60 -59
  14. package/dist/{ModulePreviewCanvas-Cx4MOJ0X.js → ModulePreviewCanvas-Cg99Pbde.js} +29 -29
  15. package/dist/{NumberWithSuffix-D2mW_DhT.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/{ParagraphEditor-DMzkVnST.js → ParagraphEditor-8jnzoL0A.js} +250 -247
  17. package/dist/{RichTextEditorContent-CRCxCwKf.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-DuEKgumL.js → SaveModuleDialog-Cy2XyjYT.js} +38 -37
  19. package/dist/{SnapshotHistory-CVgiNJtE.js → SnapshotHistory-cfxmOsJu.js} +34 -33
  20. package/dist/{TemplateScoringPanel-lm0_9nYi.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-WBMdiW5S.js → TestEmailModal-sr1MaMVX.js} +22 -21
  22. package/dist/{TitleEditor-eyT0h-Sa.js → TitleEditor-CvGTprIg.js} +46 -45
  23. package/dist/{TplModal-tjQ7OB0g.js → TplModal-BtKB-0Bx.js} +14 -13
  24. package/dist/{blockTypeIcons-DdB3uTKD.js → blockTypeIcons-BxEbbev5.js} +2 -2
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js → AiFeatureMenu-fDUpv_-s.js} +5 -5
  27. package/dist/cdn/chunks/{AiFeatureMenu-D7rB2SBs.js.map → AiFeatureMenu-fDUpv_-s.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js → BlockIssueBadge-Byce0j0W.js} +3 -3
  29. package/dist/cdn/chunks/{BlockIssueBadge-DHOe0pgx.js.map → BlockIssueBadge-Byce0j0W.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js → CloudEditor-B4m8ldiE.js} +89 -89
  31. package/dist/cdn/chunks/{CloudEditor-DNed_Ym0.js.map → CloudEditor-B4m8ldiE.js.map} +1 -1
  32. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js → CollaboratorBar-LnLmjxw_.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-sj_9Lee3.js.map → CollaboratorBar-LnLmjxw_.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js → CountdownBlock-DxTuMRBM.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-C1Ikjpn4.js.map → CountdownBlock-DxTuMRBM.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js → CountdownToolbar-DUrVfQZH.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-j1G_X8rB.js.map → CountdownToolbar-DUrVfQZH.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js → IssuesPanel-CHl90k4h.js} +4 -4
  39. package/dist/cdn/chunks/{IssuesPanel-CTOf3PsH.js.map → IssuesPanel-CHl90k4h.js.map} +1 -1
  40. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js +213 -0
  41. package/dist/cdn/chunks/MergeTagSuggestion-BsCAo4Co.js.map +1 -0
  42. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js → ModuleBrowserModal-DW0iQW0J.js} +6 -6
  43. package/dist/cdn/chunks/{ModuleBrowserModal-DCh88-rr.js.map → ModuleBrowserModal-DW0iQW0J.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js → ModulePreviewCanvas-Cxo8v8t1.js} +3 -3
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-DJqvTKmg.js.map → ModulePreviewCanvas-Cxo8v8t1.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js → NumberWithSuffix-CnSRmUMK.js} +6 -6
  47. package/dist/cdn/chunks/{NumberWithSuffix-Bu45XWSl.js.map → NumberWithSuffix-CnSRmUMK.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js → ParagraphEditor-iG5cDjH0.js} +25 -23
  49. package/dist/cdn/chunks/{ParagraphEditor-DwZqLJp2.js.map → ParagraphEditor-iG5cDjH0.js.map} +1 -1
  50. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js → RichTextEditorContent-DQpgeGMj.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-CIuZ-2DV.js.map → RichTextEditorContent-DQpgeGMj.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js → SaveModuleDialog-sJQXg2Mh.js} +3 -3
  53. package/dist/cdn/chunks/{SaveModuleDialog-Bep0X2s_.js.map → SaveModuleDialog-sJQXg2Mh.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-DO1-h3RY.js → TitleEditor-C8qIn9Oi.js} +12 -11
  55. package/dist/cdn/chunks/TitleEditor-C8qIn9Oi.js.map +1 -0
  56. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js → blockTypeIcons-DySnOpPo.js} +3 -3
  57. package/dist/cdn/chunks/{blockTypeIcons-8o24HVJu.js.map → blockTypeIcons-DySnOpPo.js.map} +1 -1
  58. package/dist/cdn/chunks/{draggable-kPCz_3zM.js → draggable-kG-D5Xsm.js} +6 -6
  59. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  60. package/dist/cdn/chunks/extensions-C2pTX899.js +421 -0
  61. package/dist/cdn/chunks/extensions-C2pTX899.js.map +1 -0
  62. package/dist/cdn/chunks/{features-CkTMVylx.js → features-CHE3YjQE.js} +886 -837
  63. package/dist/cdn/chunks/features-CHE3YjQE.js.map +1 -0
  64. package/dist/cdn/chunks/{icons-9zjCuoJx.js → icons-M4uqBV-_.js} +26 -26
  65. package/dist/cdn/chunks/{icons-9zjCuoJx.js.map → icons-M4uqBV-_.js.map} +1 -1
  66. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  67. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  68. package/dist/cdn/chunks/{media-library-DMRIPx4g.js → media-library-Bqr15VN2.js} +33 -33
  69. package/dist/cdn/chunks/{media-library-DMRIPx4g.js.map → media-library-Bqr15VN2.js.map} +1 -1
  70. package/dist/cdn/chunks/{pusher-CdEqyLwF.js → pusher-CIwiKF8H.js} +4 -4
  71. package/dist/cdn/chunks/{pusher-CdEqyLwF.js.map → pusher-CIwiKF8H.js.map} +1 -1
  72. package/dist/cdn/chunks/{quality-CyeUgs_c.js → quality-DJZ_fqc2.js} +112 -112
  73. package/dist/cdn/chunks/{quality-CyeUgs_c.js.map → quality-DJZ_fqc2.js.map} +1 -1
  74. package/dist/cdn/chunks/{renderer-BIKUEKDD.js → renderer-CyzTR1Vq.js} +20 -20
  75. package/dist/cdn/chunks/renderer-CyzTR1Vq.js.map +1 -0
  76. package/dist/cdn/chunks/{src-pDy_imWG.js → src-q-SBgWx7.js} +5 -5
  77. package/dist/cdn/chunks/{src-pDy_imWG.js.map → src-q-SBgWx7.js.map} +1 -1
  78. package/dist/cdn/chunks/{styles-D4Bd3SCx.js → styles-PWISdaws.js} +1484 -1344
  79. package/dist/cdn/chunks/styles-PWISdaws.js.map +1 -0
  80. package/dist/cdn/chunks/{tiptap-BlLFFU3M.js → tiptap-DF9PEiqH.js} +6859 -6823
  81. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  82. package/dist/cdn/editor.css +1 -1
  83. package/dist/cdn/editor.js +35 -35
  84. package/dist/cdn/editor.js.map +1 -1
  85. package/dist/{check-CYJwFmjy.js → check-rl7ok6uJ.js} +1 -1
  86. package/dist/{chevron-down-C5l-DzAA.js → chevron-down-BKe__NOD.js} +1 -1
  87. package/dist/{circle-alert-wf5HUFZY.js → circle-alert-C8xmpMsK.js} +1 -1
  88. package/dist/{clock-Bj0bQw-K.js → clock-BW4JuDCN.js} +1 -1
  89. package/dist/{cloud-CoFDm9YA.js → cloud-BQusL53H.js} +208 -208
  90. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  91. package/dist/{dist-CLpPNKy9.js → dist-B5Sov3sS.js} +7 -7
  92. package/dist/dist-BEWiuOMi.js +251 -0
  93. package/dist/{dist-CrQZ_af9.js → dist-BFmE-7hB.js} +2 -2
  94. package/dist/{dist-U5vfDdYI.js → dist-BMoa33wT.js} +2 -2
  95. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  96. package/dist/{dist-Dd3ibRZm.js → dist-BsCGIDSt.js} +103 -102
  97. package/dist/dist-CNLKj9wa.js +5 -0
  98. package/dist/{dist-BX3gGwL8.js → dist-CNXDNYQn.js} +728 -694
  99. package/dist/{dist-Bn703mnA.js → dist-COG3IdPK.js} +3 -3
  100. package/dist/{dist-B7w6xTU6.js → dist-CQZxDvFw.js} +3 -3
  101. package/dist/{dist-34OcyoK1.js → dist-CRsjOQM-.js} +2 -2
  102. package/dist/dist-CTT6WYJ6.js +134 -0
  103. package/dist/dist-Cqa6aeAJ.js +5 -0
  104. package/dist/{dist-ChMninLH.js → dist-SXJJ2v41.js} +2 -2
  105. package/dist/{dist-CyjyYg52.js → dist-itdjZraK.js} +28 -23
  106. package/dist/extensions-DwaZAqm6.js +423 -0
  107. package/dist/{image-up-x8-WXfsx.js → image-up-BwBCmQ4P.js} +1 -1
  108. package/dist/{info-RS_fGcGi.js → info-TCn7uWR5.js} +1 -1
  109. package/dist/{keys-DgYXDafq.js → keys-Cv8-8GsD.js} +1 -1
  110. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  111. package/dist/{list-checks-Bf7XdDyv.js → list-checks-CSrOWNgq.js} +1 -1
  112. package/dist/{loader-circle-CLZ0_FvW.js → loader-circle-BLmicnPG.js} +1 -1
  113. package/dist/{message-circle-B-1bN9ab.js → message-circle-C9hHMQCI.js} +1 -1
  114. package/dist/{refresh-cw-CWKWqJYG.js → refresh-cw-D1JQ1LNa.js} +1 -1
  115. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  116. package/dist/{scan-line-BtK5dEai.js → scan-line-DgijVq9y.js} +1 -1
  117. package/dist/{send-Cn1IUdzh.js → send-DjPdq69F.js} +1 -1
  118. package/dist/{shield-check-CrvMk4Ea.js → shield-check-Bqluu8FS.js} +1 -1
  119. package/dist/{sparkles-CgfjwvnG.js → sparkles-M4azPVSP.js} +1 -1
  120. package/dist/style.css +1 -1
  121. package/dist/styles-B2OrgEnn.js +4164 -0
  122. package/dist/templatical-editor.js +127 -126
  123. package/dist/{text-align-start-C3r_Rnvy.js → text-align-start-CMya5pCQ.js} +11 -11
  124. package/dist/{trash-2-CjERg4x9.js → trash-2-C-81rkLS.js} +1 -1
  125. package/dist/{triangle-alert-Chkny574.js → triangle-alert-BuRWnynk.js} +1 -1
  126. package/dist/{upload-e5kDRkPb.js → upload-CWBIoLd4.js} +1 -1
  127. package/dist/{useAliveFlag-cUQj9rmB.js → useAliveFlag-CECL_OUb.js} +1 -1
  128. package/dist/{useCloudI18n-CYJKqXtI.js → useCloudI18n-AKCy98qD.js} +2 -2
  129. package/dist/{useEditorCore-8JxXDOA4.js → useEditorCore-DJeOXVxQ.js} +1407 -1365
  130. package/dist/{useI18n-BWqM8i78.js → useI18n-C-TDeJBt.js} +2 -2
  131. package/dist/{useMergeTag-NHC4ylza.js → useMergeTag-DSrBY0-2.js} +5 -5
  132. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  133. package/dist/{vue.runtime.esm-bundler-BPa483TZ.js → vue.runtime.esm-bundler-l0XAqiyv.js} +626 -1147
  134. package/dist/{x-DiPIbccg.js → x-CQSvXnGR.js} +1 -1
  135. package/package.json +26 -26
  136. package/dist/CountdownBlock-DtAokAVw.js +0 -92
  137. package/dist/CountdownToolbar-Dtqgwy0g.js +0 -210
  138. package/dist/cdn/chunks/TitleEditor-DO1-h3RY.js.map +0 -1
  139. package/dist/cdn/chunks/draggable-kPCz_3zM.js.map +0 -1
  140. package/dist/cdn/chunks/extensions-iwBXnEwq.js +0 -605
  141. package/dist/cdn/chunks/extensions-iwBXnEwq.js.map +0 -1
  142. package/dist/cdn/chunks/features-CkTMVylx.js.map +0 -1
  143. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  144. package/dist/cdn/chunks/renderer-BIKUEKDD.js.map +0 -1
  145. package/dist/cdn/chunks/styles-D4Bd3SCx.js.map +0 -1
  146. package/dist/cdn/chunks/tiptap-BlLFFU3M.js.map +0 -1
  147. package/dist/createLucideIcon-Bad2kKE0.js +0 -43
  148. package/dist/dist-CADDCv0o.js +0 -5
  149. package/dist/dist-CGvz7vkq.js +0 -5
  150. package/dist/dist-DuCzdgDA.js +0 -382
  151. package/dist/extensions-J439b7y7.js +0 -1720
  152. package/dist/styles-BUwDOWd3.js +0 -4022
  153. package/dist/usePopoverRoot-B1sdY4es.js +0 -8
@@ -1,24 +1,26 @@
1
- import { A as e, B as t, L as n, M as r, O as i, Q as a, X as o, _ as s, at as c, b as l, c as u, d, f, g as p, h as m, j as h, k as g, l as _, m as v, o as y, ot as b, p as x, q as S, rt as C, st as w, t as T, v as E, y as D, z as O } from "./vue.runtime.esm-bundler-BPa483TZ.js";
1
+ import { A as e, D as t, Dt as n, E as r, Et as i, I as a, K as o, O as s, Ot as c, R as l, Y as u, Z as d, _ as f, c as p, d as m, g as h, h as g, k as _, l as v, m as y, nt as b, p as x, r as S, s as C, u as w, z as T } from "./vue.runtime.esm-bundler-l0XAqiyv.js";
2
+ import { c as E, o as D, t as O } from "./runtime-dom.esm-bundler-BzuoCyNp.js";
2
3
  import { t as k } from "./timeouts-Bmi_yePw.js";
3
- import { D as A, a as j } from "./dist-BctFrpeA.js";
4
- import { I as M, b as ee, t as N, w as P } from "./useEditorCore-8JxXDOA4.js";
5
- import { l as F, t as I } from "./dist-DuCzdgDA.js";
6
- import { D as L, M as R, c as z, j as te, l as ne, r as B, s as re, t as ie } from "./keys-DgYXDafq.js";
7
- import { t as V } from "./useI18n-BWqM8i78.js";
8
- import { t as H } from "./createLucideIcon-Bad2kKE0.js";
9
- import { t as U } from "./check-CYJwFmjy.js";
10
- import { t as W } from "./circle-alert-wf5HUFZY.js";
11
- import { a as G, c as ae, d as oe, f as K, i as q, l as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me } from "./styles-BUwDOWd3.js";
12
- import { t as he } from "./clock-Bj0bQw-K.js";
13
- import { t as J } from "./loader-circle-CLZ0_FvW.js";
14
- import { t as ge } from "./message-circle-B-1bN9ab.js";
15
- import { t as _e } from "./send-Cn1IUdzh.js";
16
- import { t as Y } from "./sparkles-CgfjwvnG.js";
17
- import { t as X } from "./triangle-alert-Chkny574.js";
4
+ import { O as A, a as j } from "./dist-BibU4HNl.js";
5
+ import { I as M, b as ee, t as N, w as P } from "./useEditorCore-DJeOXVxQ.js";
6
+ import { m as F } from "./dist-CTT6WYJ6.js";
7
+ import { t as I } from "./dist-BEWiuOMi.js";
8
+ import { D as L, M as R, c as z, j as te, l as ne, r as B, s as re, t as ie } from "./keys-Cv8-8GsD.js";
9
+ import { t as V } from "./useI18n-C-TDeJBt.js";
10
+ import { t as H } from "./createLucideIcon-Dx-EjR9r.js";
11
+ import { t as U } from "./check-rl7ok6uJ.js";
12
+ import { t as W } from "./circle-alert-C8xmpMsK.js";
13
+ import { a as G, c as ae, d as oe, f as K, i as q, l as se, n as ce, o as le, p as ue, r as de, s as fe, t as pe, u as me } from "./styles-B2OrgEnn.js";
14
+ import { t as he } from "./clock-BW4JuDCN.js";
15
+ import { t as J } from "./loader-circle-BLmicnPG.js";
16
+ import { t as ge } from "./message-circle-C9hHMQCI.js";
17
+ import { t as _e } from "./send-DjPdq69F.js";
18
+ import { t as Y } from "./sparkles-M4azPVSP.js";
19
+ import { t as X } from "./triangle-alert-BuRWnynk.js";
18
20
  import { t as Z } from "./_plugin-vue_export-helper-B3ysoDQm.js";
19
- import { n as Q } from "./useCloudI18n-CYJKqXtI.js";
21
+ import { n as Q } from "./useCloudI18n-AKCy98qD.js";
20
22
  import { d as $ } from "./styleConstants-lGobwiLH.js";
21
- import { _ as ve, a as ye, c as be, d as xe, f as Se, g as Ce, h as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, v as Ne, y as Pe } from "./cloud-CoFDm9YA.js";
23
+ import { _ as ve, a as ye, c as be, d as xe, f as Se, g as Ce, h as we, l as Te, m as Ee, n as De, o as Oe, p as ke, r as Ae, s as je, t as Me, v as Ne, y as Pe } from "./cloud-BQusL53H.js";
22
24
  var Fe = H("save", [
23
25
  ["path", {
24
26
  d: "M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",
@@ -36,49 +38,49 @@ var Fe = H("save", [
36
38
  //#endregion
37
39
  //#region src/cloud/composables/useSnapshotPreview.ts
38
40
  function Ie(e) {
39
- let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: s, onError: c } = e, l = a(null), u = o(null), f = o(null), p = !1;
40
- S(() => {
41
+ let { authManager: t, editor: n, history: r, conditionPreview: i, autoSave: a, onError: s } = e, c = d(null), l = u(null), f = u(null), p = !1;
42
+ o(() => {
41
43
  p = !0;
42
44
  });
43
- let m = d(() => u.value !== null), h = d(() => l.value?.snapshots.value ?? []), g = d(() => l.value?.isLoading.value ?? !1), _ = d(() => l.value?.isRestoring.value ?? !1);
45
+ let m = C(() => l.value !== null), h = C(() => c.value?.snapshots.value ?? []), g = C(() => c.value?.isLoading.value ?? !1), _ = C(() => c.value?.isRestoring.value ?? !1);
44
46
  function v() {
45
- n.state.template?.id && !l.value && (l.value = Ce({
47
+ n.state.template?.id && !c.value && (c.value = Ce({
46
48
  authManager: t,
47
49
  templateId: n.state.template.id,
48
50
  onRestore: y,
49
- onError: c
50
- }), l.value.loadSnapshots());
51
+ onError: s
52
+ }), c.value.loadSnapshots());
51
53
  }
52
54
  function y(e) {
53
55
  n.setContent(e.content, !1), r.clear(), i.reset();
54
56
  }
55
57
  async function b(e) {
56
58
  if (!p) {
57
- if (u.value) {
58
- u.value = e, n.setContent(e.content, !1);
59
+ if (l.value) {
60
+ l.value = e, n.setContent(e.content, !1);
59
61
  return;
60
62
  }
61
- n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(), p) || (f.value = structuredClone(n.content.value), s?.pause(), u.value = e, n.setContent(e.content, !1));
63
+ n.state.isDirty && n.hasTemplate() && (await n.createSnapshot(), p) || (f.value = structuredClone(n.content.value), a?.pause(), l.value = e, n.setContent(e.content, !1));
62
64
  }
63
65
  }
64
66
  async function x() {
65
- if (!(!u.value || !l.value)) try {
66
- if (await l.value.restoreSnapshot(u.value.id), p || (await l.value.loadSnapshots(), p)) return;
67
+ if (!(!l.value || !c.value)) try {
68
+ if (await c.value.restoreSnapshot(l.value.id), p || (await c.value.loadSnapshots(), p)) return;
67
69
  } catch (e) {
68
70
  throw !p && f.value && n.setContent(f.value, !1), e;
69
71
  } finally {
70
- p || (u.value = null, f.value = null, s?.resume());
72
+ p || (l.value = null, f.value = null, a?.resume());
71
73
  }
72
74
  }
73
- function C() {
74
- !u.value || !f.value || (n.setContent(f.value, !1), u.value = null, f.value = null, s?.resume());
75
+ function S() {
76
+ !l.value || !f.value || (n.setContent(f.value, !1), l.value = null, f.value = null, a?.resume());
75
77
  }
76
78
  async function w() {
77
- p || l.value && await l.value.loadSnapshots();
79
+ p || c.value && await c.value.loadSnapshots();
78
80
  }
79
81
  return {
80
- snapshotHistoryInstance: l,
81
- previewingSnapshot: u,
82
+ snapshotHistoryInstance: c,
83
+ previewingSnapshot: l,
82
84
  contentBeforePreview: f,
83
85
  isPreviewingSnapshot: m,
84
86
  snapshotHistorySnapshots: h,
@@ -88,37 +90,37 @@ function Ie(e) {
88
90
  handleRestore: y,
89
91
  handleSnapshotNavigate: b,
90
92
  confirmRestoreSnapshot: x,
91
- cancelPreview: C,
93
+ cancelPreview: S,
92
94
  loadSnapshotHistory: w
93
95
  };
94
96
  }
95
97
  //#endregion
96
98
  //#region src/cloud/composables/useCloudPanelState.ts
97
99
  function Le() {
98
- let e = o(null), t = d({
100
+ let e = u(null), t = C({
99
101
  get: () => e.value === "ai-chat",
100
102
  set: (t) => e.value = t ? "ai-chat" : null
101
- }), n = d({
103
+ }), n = C({
102
104
  get: () => e.value === "scoring",
103
105
  set: (t) => e.value = t ? "scoring" : null
104
- }), r = d({
106
+ }), r = C({
105
107
  get: () => e.value === "design-reference",
106
108
  set: (t) => e.value = t ? "design-reference" : null
107
- }), i = d({
109
+ }), i = C({
108
110
  get: () => e.value === "comments",
109
111
  set: (t) => e.value = t ? "comments" : null
110
- }), a = o(!1), s = o(!1), c = o(void 0), l = o(!1), u = o(null), f = d(() => e.value !== null), p = d(() => {
112
+ }), a = u(!1), o = u(!1), s = u(void 0), c = u(!1), l = u(null), d = C(() => e.value !== null), f = C(() => {
111
113
  let t = e.value;
112
114
  return t === "ai-chat" || t === "design-reference" || t === "scoring" ? t : null;
113
- }), m = d(() => l.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
114
- function h() {
115
- l.value = !l.value;
115
+ }), p = C(() => c.value || e.value === "ai-chat" || e.value === "design-reference" || e.value === "scoring");
116
+ function m() {
117
+ c.value = !c.value;
116
118
  }
117
- function g(t) {
118
- l.value = !1, e.value = e.value === t ? null : t;
119
+ function h(t) {
120
+ c.value = !1, e.value = e.value === t ? null : t;
119
121
  }
120
- return I(u, () => {
121
- l.value = !1;
122
+ return I(l, () => {
123
+ c.value = !1;
122
124
  }), {
123
125
  activePanel: e,
124
126
  aiChatOpen: t,
@@ -126,61 +128,61 @@ function Le() {
126
128
  designReferenceOpen: r,
127
129
  commentsOpen: i,
128
130
  testEmailModalOpen: a,
129
- mediaLibraryOpen: s,
130
- mediaLibraryAccept: c,
131
- aiMenuOpen: l,
132
- aiMenuRef: u,
133
- rightPanelOpen: f,
134
- activeAiFeature: p,
135
- aiButtonActive: m,
136
- toggleAiMenu: h,
137
- handleAiFeatureSelect: g
131
+ mediaLibraryOpen: o,
132
+ mediaLibraryAccept: s,
133
+ aiMenuOpen: c,
134
+ aiMenuRef: l,
135
+ rightPanelOpen: d,
136
+ activeAiFeature: f,
137
+ aiButtonActive: p,
138
+ toggleAiMenu: m,
139
+ handleAiFeatureSelect: h
138
140
  };
139
141
  }
140
142
  //#endregion
141
143
  //#region src/cloud/composables/useCollabUndoWarning.ts
142
144
  function Re(e) {
143
- let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = o(!1), a = o(!1), { start: s } = F(() => {
145
+ let { isCollaborationEnabled: t, getCollaboratorCount: n, canUndo: r } = e, i = u(!1), a = u(!1), { start: o } = F(() => {
144
146
  a.value = !1;
145
147
  }, k, { immediate: !1 });
146
- function c() {
147
- i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, s());
148
+ function s() {
149
+ i.value || !t.value || n() === 0 || !r.value || (i.value = !0, a.value = !0, o());
148
150
  }
149
151
  return {
150
152
  collabUndoWarningVisible: a,
151
- showCollabUndoWarning: c
153
+ showCollabUndoWarning: s
152
154
  };
153
155
  }
154
156
  //#endregion
155
157
  //#region src/cloud/composables/useCloudFeatureFlags.ts
156
158
  function ze(e) {
157
- let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = d(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = d(() => t.hasFeature("test_email")), s = d(() => !!r.state.template?.id), c = d(() => t.hasFeature("white_label")), l = d(() => t.config.value?.limits.max_templates ?? null), u = d(() => t.config.value?.template_count ?? 0), f = o(!1), p = o("idle"), m = o(""), { start: h } = F(() => {
158
- p.value = "idle";
159
+ let { planConfigInstance: t, aiConfig: n, editor: r } = e, i = C(() => t.hasFeature("ai_generation") && n.hasAnyMenuFeature.value), a = C(() => t.hasFeature("test_email")), o = C(() => !!r.state.template?.id), s = C(() => t.hasFeature("white_label")), c = C(() => t.config.value?.limits.max_templates ?? null), l = C(() => t.config.value?.template_count ?? 0), d = u(!1), f = u("idle"), p = u(""), { start: m } = F(() => {
160
+ f.value = "idle";
159
161
  }, 3e3, { immediate: !1 });
160
162
  return {
161
163
  canUseAiGeneration: i,
162
164
  canSendTestEmail: a,
163
- hasTemplateSaved: s,
164
- isWhiteLabeled: c,
165
- templateLimit: l,
166
- templateCount: u,
167
- isSaveExporting: f,
168
- saveStatus: p,
169
- saveErrorMessage: m,
170
- startSaveStatusClear: h
165
+ hasTemplateSaved: o,
166
+ isWhiteLabeled: s,
167
+ templateLimit: c,
168
+ templateCount: l,
169
+ isSaveExporting: d,
170
+ saveStatus: f,
171
+ saveErrorMessage: p,
172
+ startSaveStatusClear: m
171
173
  };
172
174
  }
173
175
  //#endregion
174
176
  //#region src/cloud/composables/useCloudMediaLibrary.ts
175
177
  function Be(e) {
176
- let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r, authManager: i, getMediaConfig: a, onError: o } = e, s = null;
177
- function c(e) {
178
+ let { onRequestMedia: t, mediaLibraryOpen: n, mediaLibraryAccept: r, authManager: i, getMediaConfig: a, onError: s } = e, c = null;
179
+ function l(e) {
178
180
  return {
179
181
  url: e.url,
180
182
  alt: e.alt_text || void 0
181
183
  };
182
184
  }
183
- async function l(e) {
185
+ async function u(e) {
184
186
  let i = e?.accept ?? ["images"];
185
187
  if (e?.files?.length) {
186
188
  if (t) {
@@ -188,89 +190,89 @@ function Be(e) {
188
190
  accept: i,
189
191
  files: e.files
190
192
  });
191
- return n ? c(n) : null;
193
+ return n ? l(n) : null;
192
194
  }
193
- return u(e.files[0]);
195
+ return d(e.files[0]);
194
196
  }
195
197
  if (t) {
196
198
  let e = await t({ accept: i });
197
- return e ? c(e) : null;
199
+ return e ? l(e) : null;
198
200
  }
199
- return s &&= (s(null), null), r.value = i, n.value = !0, new Promise((e) => {
200
- s = (t) => {
201
+ return c &&= (c(null), null), r.value = i, n.value = !0, new Promise((e) => {
202
+ c = (t) => {
201
203
  e(t);
202
204
  };
203
205
  });
204
206
  }
205
- async function u(e) {
206
- let t = d(e);
207
- if (t) return o?.(t), null;
207
+ async function d(e) {
208
+ let t = f(e);
209
+ if (t) return s?.(t), null;
208
210
  try {
209
211
  let { MediaApiClient: t } = await import("@templatical/media-library");
210
- return c(await new t(i).uploadMedia(e));
212
+ return l(await new t(i).uploadMedia(e));
211
213
  } catch (e) {
212
- return o?.(e), null;
214
+ return s?.(e), null;
213
215
  }
214
216
  }
215
- function d(e) {
217
+ function f(e) {
216
218
  let t = a?.() ?? null;
217
219
  if (!t) return null;
218
220
  let n = t.categories?.images?.mime_types ?? [];
219
221
  return n.length > 0 && !n.includes(e.type) ? /* @__PURE__ */ Error(`Unsupported image type: ${e.type || "unknown"}. Accepted: ${n.join(", ")}.`) : t.max_file_size > 0 && e.size > t.max_file_size ? /* @__PURE__ */ Error(`Image is too large (${e.size} bytes). Maximum allowed is ${t.max_file_size} bytes.`) : null;
220
222
  }
221
- function f(e) {
222
- n.value = !1, s?.(c(e)), s = null;
223
+ function p(e) {
224
+ n.value = !1, c?.(l(e)), c = null;
223
225
  }
224
- function p() {
225
- n.value = !1, s?.(null), s = null;
226
+ function m() {
227
+ n.value = !1, c?.(null), c = null;
226
228
  }
227
- return S(() => {
228
- s &&= (s(null), null);
229
+ return o(() => {
230
+ c &&= (c(null), null);
229
231
  }), {
230
- handleRequestMedia: l,
231
- handleMediaSelect: f,
232
- handleMediaLibraryClose: p
232
+ handleRequestMedia: u,
233
+ handleMediaSelect: p,
234
+ handleMediaLibraryClose: m
233
235
  };
234
236
  }
235
237
  //#endregion
236
238
  //#region src/cloud/composables/useCloudInitialization.ts
237
239
  function Ve(e) {
238
- let { config: t, translations: r, fontsManager: i, emit: a, getCommentsSidebar: s } = e, c = o(!0), l = o(!1), u = o(null), f = !1, p = { value: null }, m = null, g = null, _ = new Me({
240
+ let { config: t, translations: n, fontsManager: r, emit: i, getCommentsSidebar: o } = e, s = u(!0), c = u(!1), l = u(null), d = !1, f = { value: null }, p = null, m = null, h = new Me({
239
241
  ...t.auth,
240
242
  onError: t.onError
241
- }), v = Ee({
242
- authManager: _,
243
+ }), g = Ee({
244
+ authManager: h,
243
245
  onError: t.onError
244
- }), y = o(/* @__PURE__ */ new Map()), b = xe({
245
- authManager: _,
246
+ }), v = u(/* @__PURE__ */ new Map()), y = xe({
247
+ authManager: h,
246
248
  defaultFontFamily: t.fonts?.defaultFont,
247
249
  templateDefaults: t.templateDefaults,
248
250
  onError: t.onError,
249
- lockedBlocks: y
250
- }), x = Pe({
251
- authManager: _,
251
+ lockedBlocks: v
252
+ }), b = Pe({
253
+ authManager: h,
252
254
  onError: t.onError
253
255
  });
254
256
  t.mcp?.enabled && ke({
255
- editor: b,
256
- channel: x.channel,
257
+ editor: y,
258
+ channel: b.channel,
257
259
  onOperation: t.mcp.onOperation
258
260
  });
259
- let S = null;
260
- t.collaboration?.enabled && (S = Oe({
261
- authManager: _,
262
- editor: b,
263
- channel: x.channel,
261
+ let x = null;
262
+ t.collaboration?.enabled && (x = Oe({
263
+ authManager: h,
264
+ editor: y,
265
+ channel: b.channel,
264
266
  onError: t.onError,
265
267
  onCollaboratorJoined: t.collaboration.onCollaboratorJoined,
266
268
  onCollaboratorLeft: t.collaboration.onCollaboratorLeft,
267
269
  onBlockLocked: t.collaboration.onBlockLocked,
268
270
  onBlockUnlocked: t.collaboration.onBlockUnlocked
269
- }), n(() => S.lockedBlocks.value, (e) => {
270
- y.value = e;
271
- }, { immediate: !0 }), je(b, S));
272
- let C = d(() => !!t.collaboration?.enabled && v.hasFeature("collaboration")), w = N({
273
- editor: b,
271
+ }), a(() => x.lockedBlocks.value, (e) => {
272
+ v.value = e;
273
+ }, { immediate: !0 }), je(y, x));
274
+ let S = C(() => !!t.collaboration?.enabled && g.hasFeature("collaboration")), w = N({
275
+ editor: y,
274
276
  config: {
275
277
  uiTheme: t.uiTheme,
276
278
  theme: void 0,
@@ -283,95 +285,95 @@ function Ve(e) {
283
285
  onRequestMedia: null,
284
286
  lint: K(t),
285
287
  onSave: () => {
286
- p.value?.().catch((e) => {
288
+ f.value?.().catch((e) => {
287
289
  t.onError?.(e);
288
290
  });
289
291
  }
290
292
  },
291
- translations: r,
292
- fontsManager: i,
293
- historyOptions: S ? { isRemoteOperation: () => S._isProcessingRemoteOperation() } : void 0,
293
+ translations: n,
294
+ fontsManager: r,
295
+ historyOptions: x ? { isRemoteOperation: () => x._isProcessingRemoteOperation() } : void 0,
294
296
  autoSaveOptions: {
295
297
  onChange: async () => {
296
- b.hasTemplate() && (await b.createSnapshot(), m?.snapshotHistoryInstance.value?.loadSnapshots());
298
+ y.hasTemplate() && (await y.createSnapshot(), p?.snapshotHistoryInstance.value?.loadSnapshots());
297
299
  },
298
300
  debounce: t.autoSaveDebounce ?? 5e3,
299
- enabled: () => t.autoSave !== !1 && v.hasFeature("auto_save")
301
+ enabled: () => t.autoSave !== !1 && g.hasFeature("auto_save")
300
302
  },
301
- themeExtraStyles: () => ({ "--tpl-drop-text": `"${r.canvas.dropHere}"` }),
302
- keyboardOptions: { onBeforeUndo: () => g?.showCollabUndoWarning() },
303
+ themeExtraStyles: () => ({ "--tpl-drop-text": `"${n.canvas.dropHere}"` }),
304
+ keyboardOptions: { onBeforeUndo: () => m?.showCollabUndoWarning() },
303
305
  editorRoot: e.editorRoot,
304
306
  containerEl: e.containerEl
305
307
  }), T = Re({
306
- isCollaborationEnabled: C,
307
- getCollaboratorCount: () => S?.collaborators.value.length ?? 0,
308
+ isCollaborationEnabled: S,
309
+ getCollaboratorCount: () => x?.collaborators.value.length ?? 0,
308
310
  canUndo: w.history.canUndo
309
311
  });
310
- g = T;
312
+ m = T;
311
313
  let E = Ie({
312
- authManager: _,
313
- editor: b,
314
+ authManager: h,
315
+ editor: y,
314
316
  history: w.history,
315
317
  conditionPreview: w.conditionPreview,
316
318
  autoSave: w.autoSave,
317
319
  onError: t.onError
318
320
  });
319
- m = E;
321
+ p = E;
320
322
  let D = Le(), O = ye(t.ai), k = ze({
321
- planConfigInstance: v,
323
+ planConfigInstance: g,
322
324
  aiConfig: O,
323
- editor: b
325
+ editor: y
324
326
  }), A = Be({
325
327
  onRequestMedia: t.onRequestMedia,
326
328
  mediaLibraryOpen: D.mediaLibraryOpen,
327
329
  mediaLibraryAccept: D.mediaLibraryAccept,
328
- authManager: _,
329
- getMediaConfig: () => v.config.value?.media ?? null,
330
+ authManager: h,
331
+ getMediaConfig: () => g.config.value?.media ?? null,
330
332
  onError: t.onError
331
333
  });
332
334
  P({
333
- onBlockMove: b.moveBlock,
334
- onBlockAdd: b.addBlock
335
+ onBlockMove: y.moveBlock,
336
+ onBlockAdd: y.addBlock
335
337
  });
336
338
  let j = Se({
337
- authManager: _,
339
+ authManager: h,
338
340
  getFontsConfig: () => t.fonts,
339
- canUseCustomFonts: () => v.hasFeature("custom_fonts")
341
+ canUseCustomFonts: () => g.hasFeature("custom_fonts")
340
342
  }), ee = Ne({
341
- authManager: _,
342
- getTemplateId: () => b.state.template?.id ?? null,
343
- save: () => b.save(),
343
+ authManager: h,
344
+ getTemplateId: () => y.state.template?.id ?? null,
345
+ save: () => y.save(),
344
346
  exportHtml: (e) => j.exportHtml(e),
345
347
  onError: t.onError,
346
- isAuthReady: l,
348
+ isAuthReady: c,
347
349
  onBeforeTestEmail: t.onBeforeTestEmail
348
350
  }), F = Te({
349
- authManager: _,
350
- getTemplateId: () => b.state.template?.id ?? null,
351
- getSocketId: () => x.getSocketId(),
351
+ authManager: h,
352
+ getTemplateId: () => y.state.template?.id ?? null,
353
+ getSocketId: () => b.getSocketId(),
352
354
  onComment: t.onComment,
353
355
  onError: t.onError,
354
- isAuthReady: l,
355
- hasCommentingFeature: () => t.commenting !== !1 && v.hasFeature("commenting")
356
+ isAuthReady: c,
357
+ hasCommentingFeature: () => t.commenting !== !1 && g.hasFeature("commenting")
356
358
  });
357
359
  be({
358
360
  comments: F,
359
- channel: x.channel
361
+ channel: b.channel
360
362
  });
361
363
  let I = we({
362
- authManager: _,
364
+ authManager: h,
363
365
  onError: t.onError
364
- }), z = o(!1), V = o(null), H = o(!1), U = ve({
365
- authManager: _,
366
- getTemplateId: () => b.state.template?.id ?? null
366
+ }), z = u(!1), V = u(null), H = u(!1), U = ve({
367
+ authManager: h,
368
+ getTemplateId: () => y.state.template?.id ?? null
367
369
  });
368
370
  function W(e) {
369
371
  D.commentsOpen.value = !0, queueMicrotask(() => {
370
- s()?.filterByBlock(e);
372
+ o()?.filterByBlock(e);
371
373
  });
372
374
  }
373
- h(L, A.handleRequestMedia), h(B, _), h(ie, O), h(ne, F), h(te, I), h(R, U), h(re, {
374
- plan: v,
375
+ _(L, A.handleRequestMedia), _(B, h), _(ie, O), _(ne, F), _(te, I), _(R, U), _(re, {
376
+ plan: g,
375
377
  ai: O,
376
378
  comments: {
377
379
  getBlockCount: (e) => F.commentCountByBlock.value.get(e) ?? 0,
@@ -384,48 +386,48 @@ function Ve(e) {
384
386
  openBrowser: () => {
385
387
  H.value = !0;
386
388
  },
387
- moduleCount: d(() => I.modules.value.length)
389
+ moduleCount: C(() => I.modules.value.length)
388
390
  }
389
391
  });
390
392
  function G(e) {
391
- v.hasFeature("theme_customization") && (w.themeOverrides.value = e);
393
+ g.hasFeature("theme_customization") && (w.themeOverrides.value = e);
392
394
  }
393
395
  function ae(e) {
394
- b.setUiTheme(e);
396
+ y.setUiTheme(e);
395
397
  }
396
398
  async function oe() {
397
- c.value = !0, u.value = null;
399
+ s.value = !0, l.value = null;
398
400
  try {
399
- if (await _.initialize(), f) return;
400
- l.value = !0;
401
- let e = await De({ authManager: _ });
402
- if (f) return;
401
+ if (await h.initialize(), d) return;
402
+ c.value = !0;
403
+ let e = await De({ authManager: h });
404
+ if (d) return;
403
405
  if (!e.api.ok) throw Error("Health check failed: API is not reachable");
404
406
  if (!e.auth.ok) throw Error(`Health check failed: authentication error${e.auth.error ? ` - ${e.auth.error}` : ""}`);
405
- if (e.websocket.ok || M.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await v.fetchConfig(), f) return;
406
- i.setCustomFontsEnabled(v.hasFeature("custom_fonts")), t.customBlocks?.length && v.hasFeature("custom_blocks") && w.registerCustomBlocks(t.customBlocks), t.theme && v.hasFeature("theme_customization") && (w.themeOverrides.value = t.theme), t.modules !== !1 && v.hasFeature("saved_modules") && I.loadModules(), a("ready");
407
+ if (e.websocket.ok || M.warn("WebSocket health check failed:", e.websocket.error ?? "unknown error", "-- real-time features will be disabled."), await g.fetchConfig(), d) return;
408
+ r.setCustomFontsEnabled(g.hasFeature("custom_fonts")), t.customBlocks?.length && g.hasFeature("custom_blocks") && w.registerCustomBlocks(t.customBlocks), t.theme && g.hasFeature("theme_customization") && (w.themeOverrides.value = t.theme), t.modules !== !1 && g.hasFeature("saved_modules") && I.loadModules(), i("ready");
407
409
  } catch (e) {
408
- if (f) return;
410
+ if (d) return;
409
411
  let n = e instanceof Error ? e : Error("Initialization failed", { cause: e });
410
- u.value = n, t.onError?.(n);
412
+ l.value = n, t.onError?.(n);
411
413
  } finally {
412
- f || (c.value = !1);
414
+ d || (s.value = !1);
413
415
  }
414
416
  }
415
417
  function q() {
416
- f = !0, i.cleanupFontLinks(), x.disconnect(), w.destroy(), t.onUnmount?.();
418
+ d = !0, r.cleanupFontLinks(), b.disconnect(), w.destroy(), t.onUnmount?.();
417
419
  }
418
420
  return {
419
- isInitializing: c,
420
- isAuthReady: l,
421
- initError: u,
422
- isDestroyed: () => f,
423
- authManager: _,
424
- planConfigInstance: v,
425
- websocket: x,
426
- collaboration: S,
427
- isCollaborationEnabled: C,
428
- editor: b,
421
+ isInitializing: s,
422
+ isAuthReady: c,
423
+ initError: l,
424
+ isDestroyed: () => d,
425
+ authManager: h,
426
+ planConfigInstance: g,
427
+ websocket: b,
428
+ collaboration: x,
429
+ isCollaborationEnabled: S,
430
+ editor: y,
429
431
  core: w,
430
432
  aiConfig: O,
431
433
  featureFlags: k,
@@ -441,7 +443,7 @@ function Ve(e) {
441
443
  showSaveModuleDialog: z,
442
444
  showModuleBrowserModal: H,
443
445
  saveModulePreSelectedBlockId: V,
444
- onSaveHook: p,
446
+ onSaveHook: f,
445
447
  initialize: oe,
446
448
  destroy: q,
447
449
  setThemeOverrides: G,
@@ -514,29 +516,29 @@ function Ue(e) {
514
516
  //#endregion
515
517
  //#region src/cloud/composables/useCloudSaveGate.ts
516
518
  function We(e) {
517
- let t = o(!1), n = null, r = d(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = d(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = d(() => i.value.length > 0);
518
- async function s(e) {
519
+ let t = u(!1), n = null, r = C(() => e.planConfig.value?.accessibility?.blockOnError === !0), i = C(() => r.value ? e.issues.value.filter((e) => e.severity === "error") : []), a = C(() => i.value.length > 0);
520
+ async function o(e) {
519
521
  return a.value ? (n = e, t.value = !0, !1) : (await e(), !0);
520
522
  }
521
- async function c() {
523
+ async function s() {
522
524
  let e = n;
523
525
  n = null, t.value = !1, e && await e();
524
526
  }
525
- function l() {
527
+ function c() {
526
528
  n = null, t.value = !1;
527
529
  }
528
530
  return {
529
531
  shouldBlock: a,
530
532
  blockingIssues: i,
531
533
  modalOpen: t,
532
- tryRunSave: s,
533
- confirmAndSave: c,
534
- cancel: l
534
+ tryRunSave: o,
535
+ confirmAndSave: s,
536
+ cancel: c
535
537
  };
536
538
  }
537
539
  //#endregion
538
540
  //#region src/cloud/components/CloudSaveGateModal.vue?vue&type=script&setup=true&lang.ts
539
- var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, qe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Je = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ye = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Xe = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, Ze = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Qe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $e = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, et = /* @__PURE__ */ l({
541
+ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl:max-w-md tpl:flex-col tpl:gap-4 tpl:rounded-lg tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)] tpl:p-5 tpl:shadow-[var(--tpl-shadow-md)]" }, qe = { class: "tpl:flex tpl:items-center tpl:gap-2" }, Je = { class: "tpl:m-0 tpl:text-base tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ye = { class: "tpl:m-0 tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Xe = { class: "tpl:m-0 tpl:flex tpl:max-h-64 tpl:list-none tpl:flex-col tpl:gap-1.5 tpl:overflow-y-auto tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:p-2" }, Ze = { class: "tpl:text-xs tpl:text-[var(--tpl-text)]" }, Qe = { class: "tpl:font-mono tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, $e = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, et = /* @__PURE__ */ f({
540
542
  __name: "CloudSaveGateModal",
541
543
  props: {
542
544
  open: { type: Boolean },
@@ -544,41 +546,41 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
544
546
  },
545
547
  emits: ["cancel", "confirm"],
546
548
  setup(t, { emit: n }) {
547
- let i = n, { t: a } = Q();
548
- return (n, o) => (e(), x(T, {
549
+ let r = n, { t: i } = Q();
550
+ return (n, a) => (s(), v(O, {
549
551
  "enter-active-class": "tpl:transition-opacity tpl:duration-150",
550
552
  "leave-active-class": "tpl:transition-opacity tpl:duration-150",
551
553
  "enter-from-class": "tpl:opacity-0",
552
554
  "leave-to-class": "tpl:opacity-0"
553
555
  }, {
554
- default: O(() => [t.open ? (e(), m("div", {
556
+ default: l(() => [t.open ? (s(), m("div", {
555
557
  key: 0,
556
558
  role: "dialog",
557
559
  "aria-modal": "true",
558
- "aria-label": C(a).saveGate.title,
560
+ "aria-label": b(i).saveGate.title,
559
561
  class: "tpl:fixed tpl:inset-0 tpl:z-50 tpl:flex tpl:items-center tpl:justify-center tpl:bg-black/40 tpl:p-6",
560
- onClick: o[2] ||= u((e) => i("cancel"), ["self"])
561
- }, [f("div", Ke, [
562
- f("header", qe, [E(C(X), {
562
+ onClick: a[2] ||= E((e) => r("cancel"), ["self"])
563
+ }, [p("div", Ke, [
564
+ p("header", qe, [g(b(X), {
563
565
  size: 18,
564
566
  "stroke-width": 2,
565
567
  class: "tpl:text-[var(--tpl-warning)]"
566
- }), f("h2", Je, w(C(a).saveGate.title), 1)]),
567
- f("p", Ye, w(C(a).saveGate.body), 1),
568
- f("ul", Xe, [(e(!0), m(_, null, r(t.issues, (t) => (e(), m("li", {
569
- key: `${t.ruleId}-${t.blockId ?? "template"}`,
568
+ }), p("h2", Je, c(b(i).saveGate.title), 1)]),
569
+ p("p", Ye, c(b(i).saveGate.body), 1),
570
+ p("ul", Xe, [(s(!0), m(S, null, e(t.issues, (e) => (s(), m("li", {
571
+ key: `${e.ruleId}-${e.blockId ?? "template"}`,
570
572
  class: "tpl:flex tpl:flex-col tpl:gap-0.5 tpl:rounded tpl:px-2 tpl:py-1.5"
571
- }, [f("span", Ze, w(t.message), 1), f("span", Qe, w(t.ruleId), 1)]))), 128))]),
572
- f("footer", $e, [f("button", {
573
+ }, [p("span", Ze, c(e.message), 1), p("span", Qe, c(e.ruleId), 1)]))), 128))]),
574
+ p("footer", $e, [p("button", {
573
575
  type: "button",
574
576
  class: "tpl:rounded-md tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]",
575
- onClick: o[0] ||= (e) => i("cancel")
576
- }, w(C(a).saveGate.cancel), 1), f("button", {
577
+ onClick: a[0] ||= (e) => r("cancel")
578
+ }, c(b(i).saveGate.cancel), 1), p("button", {
577
579
  type: "button",
578
580
  class: "tpl:rounded-md tpl:bg-[var(--tpl-danger)] tpl:px-3 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:text-white",
579
- onClick: o[1] ||= (e) => i("confirm")
580
- }, w(C(a).saveGate.confirm), 1)])
581
- ])], 8, Ge)) : v("", !0)]),
581
+ onClick: a[1] ||= (e) => r("confirm")
582
+ }, c(b(i).saveGate.confirm), 1)])
583
+ ])], 8, Ge)) : w("", !0)]),
582
584
  _: 1
583
585
  }));
584
586
  }
@@ -608,7 +610,7 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
608
610
  }, dt = ["aria-expanded"], ft = {
609
611
  key: 0,
610
612
  class: "tpl:absolute tpl:right-0 tpl:top-full tpl:z-50 tpl:mt-1 tpl:origin-top-right"
611
- }, pt = ["disabled"], mt = ["disabled"], ht = /* @__PURE__ */ l({
613
+ }, pt = ["disabled"], mt = ["disabled"], ht = /* @__PURE__ */ f({
612
614
  __name: "CloudHeader",
613
615
  props: {
614
616
  editor: {},
@@ -625,91 +627,91 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
625
627
  isSaving: { type: Boolean }
626
628
  },
627
629
  emits: ["save"],
628
- setup(t) {
629
- let n = D(() => import("./CollaboratorBar-B_EnJLtW.js")), r = D(() => import("./SnapshotHistory-CVgiNJtE.js")), i = D(() => import("./AiFeatureMenu-F2diEDgV.js")), { t: a, format: o } = Q();
630
- return (l, d) => (e(), m("header", tt, [
631
- f("div", nt, [t.featureFlags.templateLimit.value === null ? v("", !0) : (e(), m("span", rt, w(C(o)(C(a).header.templatesUsed, {
632
- used: t.featureFlags.templateCount.value,
633
- max: t.featureFlags.templateLimit.value
630
+ setup(e) {
631
+ let t = h(() => import("./CollaboratorBar-DMSjd3HZ.js")), r = h(() => import("./SnapshotHistory-cfxmOsJu.js")), a = h(() => import("./AiFeatureMenu-CU6kTMTf.js")), { t: o, format: u } = Q();
632
+ return (d, f) => (s(), m("header", tt, [
633
+ p("div", nt, [e.featureFlags.templateLimit.value === null ? w("", !0) : (s(), m("span", rt, c(b(u)(b(o).header.templatesUsed, {
634
+ used: e.featureFlags.templateCount.value,
635
+ max: e.featureFlags.templateLimit.value
634
636
  })), 1))]),
635
- f("div", it, [
636
- E(le, {
637
- viewport: t.editor.state.viewport,
638
- onChange: t.editor.setViewport
637
+ p("div", it, [
638
+ g(le, {
639
+ viewport: e.editor.state.viewport,
640
+ onChange: e.editor.setViewport
639
641
  }, null, 8, ["viewport", "onChange"]),
640
- E(q, {
641
- "dark-mode": t.editor.state.darkMode,
642
- onChange: t.editor.setDarkMode
642
+ g(q, {
643
+ "dark-mode": e.editor.state.darkMode,
644
+ onChange: e.editor.setDarkMode
643
645
  }, null, 8, ["dark-mode", "onChange"]),
644
- E(G, {
645
- "preview-mode": t.editor.state.previewMode,
646
- onChange: t.editor.setPreviewMode
646
+ g(G, {
647
+ "preview-mode": e.editor.state.previewMode,
648
+ onChange: e.editor.setPreviewMode
647
649
  }, null, 8, ["preview-mode", "onChange"]),
648
- t.collaboration && t.isCollaborationEnabled ? (e(), x(C(n), {
650
+ e.collaboration && e.isCollaborationEnabled ? (s(), v(b(t), {
649
651
  key: 0,
650
- collaborators: t.collaboration.collaborators.value,
651
- "is-connected": t.websocket.isConnected.value
652
- }, null, 8, ["collaborators", "is-connected"])) : v("", !0),
653
- t.snapshotPreview.snapshotHistoryInstance.value ? (e(), x(C(r), {
652
+ collaborators: e.collaboration.collaborators.value,
653
+ "is-connected": e.websocket.isConnected.value
654
+ }, null, 8, ["collaborators", "is-connected"])) : w("", !0),
655
+ e.snapshotPreview.snapshotHistoryInstance.value ? (s(), v(b(r), {
654
656
  key: 1,
655
- snapshots: t.snapshotPreview.snapshotHistorySnapshots.value,
656
- "is-loading": t.snapshotPreview.snapshotHistoryIsLoading.value,
657
- "is-restoring": t.snapshotPreview.snapshotHistoryIsRestoring.value,
658
- onLoad: t.snapshotPreview.loadSnapshotHistory,
659
- onNavigate: t.snapshotPreview.handleSnapshotNavigate
657
+ snapshots: e.snapshotPreview.snapshotHistorySnapshots.value,
658
+ "is-loading": e.snapshotPreview.snapshotHistoryIsLoading.value,
659
+ "is-restoring": e.snapshotPreview.snapshotHistoryIsRestoring.value,
660
+ onLoad: e.snapshotPreview.loadSnapshotHistory,
661
+ onNavigate: e.snapshotPreview.handleSnapshotNavigate
660
662
  }, null, 8, [
661
663
  "snapshots",
662
664
  "is-loading",
663
665
  "is-restoring",
664
666
  "onLoad",
665
667
  "onNavigate"
666
- ])) : v("", !0)
668
+ ])) : w("", !0)
667
669
  ]),
668
- f("div", at, [
669
- t.featureFlags.saveStatus.value === "error" ? (e(), m("div", {
670
+ p("div", at, [
671
+ e.featureFlags.saveStatus.value === "error" ? (s(), m("div", {
670
672
  key: 0,
671
673
  "aria-live": "assertive",
672
674
  class: "tpl-tooltip tpl-status tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:text-[var(--tpl-danger)]",
673
- "data-tooltip": t.featureFlags.saveErrorMessage.value
674
- }, [E(C(W), {
675
+ "data-tooltip": e.featureFlags.saveErrorMessage.value
676
+ }, [g(b(W), {
675
677
  size: 12,
676
678
  "stroke-width": 2.5
677
- }), s(" " + w(C(a).header.saveFailed), 1)], 8, ot)) : t.featureFlags.saveStatus.value === "saved" ? (e(), m("div", st, [E(C(U), {
679
+ }), y(" " + c(b(o).header.saveFailed), 1)], 8, ot)) : e.featureFlags.saveStatus.value === "saved" ? (s(), m("div", st, [g(b(U), {
678
680
  size: 12,
679
681
  "stroke-width": 2.5
680
- }), s(" " + w(C(a).header.saved), 1)])) : t.editor.state.isDirty ? (e(), m("div", ct, [d[4] ||= f("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), s(" " + w(C(a).header.unsaved), 1)])) : v("", !0),
681
- t.commentsInstance.isEnabled.value && t.featureFlags.hasTemplateSaved.value ? (e(), m("button", {
682
+ }), y(" " + c(b(o).header.saved), 1)])) : e.editor.state.isDirty ? (s(), m("div", ct, [f[4] ||= p("span", { class: "tpl-pulse tpl:size-1.5 tpl:rounded-full tpl:bg-[var(--tpl-primary)]" }, null, -1), y(" " + c(b(o).header.unsaved), 1)])) : w("", !0),
683
+ e.commentsInstance.isEnabled.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("button", {
682
684
  key: 3,
683
- "aria-label": t.commentsInstance.unresolvedCount.value > 0 ? `${C(a).comments.button} (${t.commentsInstance.unresolvedCount.value})` : C(a).comments.button,
684
- "aria-expanded": t.panelState.commentsOpen.value,
685
- class: c(C($)),
686
- style: b({
687
- backgroundColor: t.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
688
- color: t.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
685
+ "aria-label": e.commentsInstance.unresolvedCount.value > 0 ? `${b(o).comments.button} (${e.commentsInstance.unresolvedCount.value})` : b(o).comments.button,
686
+ "aria-expanded": e.panelState.commentsOpen.value,
687
+ class: i(b($)),
688
+ style: n({
689
+ backgroundColor: e.panelState.commentsOpen.value ? "var(--tpl-primary)" : "transparent",
690
+ color: e.panelState.commentsOpen.value ? "var(--tpl-bg)" : "var(--tpl-primary)",
689
691
  borderColor: "var(--tpl-primary)"
690
692
  }),
691
- onClick: d[0] ||= (e) => t.panelState.commentsOpen.value = !t.panelState.commentsOpen.value
693
+ onClick: f[0] ||= (t) => e.panelState.commentsOpen.value = !e.panelState.commentsOpen.value
692
694
  }, [
693
- E(C(ge), {
695
+ g(b(ge), {
694
696
  size: 16,
695
697
  "stroke-width": 2
696
698
  }),
697
- s(" " + w(C(a).comments.button) + " ", 1),
698
- t.commentsInstance.unresolvedCount.value > 0 && !t.panelState.commentsOpen.value ? (e(), m("span", ut, w(t.commentsInstance.unresolvedCount.value), 1)) : v("", !0)
699
- ], 14, lt)) : v("", !0),
700
- t.featureFlags.canUseAiGeneration.value && t.featureFlags.hasTemplateSaved.value ? (e(), m("div", {
699
+ y(" " + c(b(o).comments.button) + " ", 1),
700
+ e.commentsInstance.unresolvedCount.value > 0 && !e.panelState.commentsOpen.value ? (s(), m("span", ut, c(e.commentsInstance.unresolvedCount.value), 1)) : w("", !0)
701
+ ], 14, lt)) : w("", !0),
702
+ e.featureFlags.canUseAiGeneration.value && e.featureFlags.hasTemplateSaved.value ? (s(), m("div", {
701
703
  key: 4,
702
- ref: (e) => t.panelState.aiMenuRef.value = e,
704
+ ref: (t) => e.panelState.aiMenuRef.value = t,
703
705
  class: "tpl:relative"
704
- }, [f("button", {
705
- "aria-expanded": t.panelState.aiMenuOpen.value,
706
- class: c(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", t.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
707
- onClick: d[1] ||= u((...e) => t.panelState.toggleAiMenu && t.panelState.toggleAiMenu(...e), ["stop"])
708
- }, [E(C(Y), {
706
+ }, [p("button", {
707
+ "aria-expanded": e.panelState.aiMenuOpen.value,
708
+ class: i(["tpl-ai-btn tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-[var(--tpl-radius-sm)] tpl:border-none tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:whitespace-nowrap tpl:transition-all tpl:duration-200", e.panelState.aiButtonActive.value ? "tpl-ai-btn--active" : "tpl-ai-btn--idle"]),
709
+ onClick: f[1] ||= E((...t) => e.panelState.toggleAiMenu && e.panelState.toggleAiMenu(...t), ["stop"])
710
+ }, [g(b(Y), {
709
711
  size: 16,
710
712
  "stroke-width": 2,
711
713
  class: "tpl-ai-btn-icon"
712
- }), s(" " + w(C(a).aiChat.button), 1)], 10, dt), E(T, {
714
+ }), y(" " + c(b(o).aiChat.button), 1)], 10, dt), g(O, {
713
715
  "enter-active-class": "tpl:transition-all tpl:duration-150 tpl:ease-out",
714
716
  "enter-from-class": "tpl:scale-95 tpl:opacity-0",
715
717
  "enter-to-class": "tpl:scale-100 tpl:opacity-100",
@@ -717,55 +719,55 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
717
719
  "leave-from-class": "tpl:scale-100 tpl:opacity-100",
718
720
  "leave-to-class": "tpl:scale-95 tpl:opacity-0"
719
721
  }, {
720
- default: O(() => [t.panelState.aiMenuOpen.value ? (e(), m("div", ft, [E(C(i), {
721
- "active-feature": t.panelState.activeAiFeature.value,
722
- onSelect: t.panelState.handleAiFeatureSelect
723
- }, null, 8, ["active-feature", "onSelect"])])) : v("", !0)]),
722
+ default: l(() => [e.panelState.aiMenuOpen.value ? (s(), m("div", ft, [g(b(a), {
723
+ "active-feature": e.panelState.activeAiFeature.value,
724
+ onSelect: e.panelState.handleAiFeatureSelect
725
+ }, null, 8, ["active-feature", "onSelect"])])) : w("", !0)]),
724
726
  _: 1
725
- })], 512)) : v("", !0),
726
- t.testEmail.isEnabled.value && t.featureFlags.canSendTestEmail.value ? (e(), m("button", {
727
+ })], 512)) : w("", !0),
728
+ e.testEmail.isEnabled.value && e.featureFlags.canSendTestEmail.value ? (s(), m("button", {
727
729
  key: 5,
728
- class: c(C($)),
730
+ class: i(b($)),
729
731
  style: {
730
732
  "background-color": "transparent",
731
733
  color: "var(--tpl-primary)",
732
734
  "border-color": "var(--tpl-primary)"
733
735
  },
734
- disabled: t.testEmail.isSending.value || !t.featureFlags.hasTemplateSaved.value,
735
- onClick: d[2] ||= (e) => t.panelState.testEmailModalOpen.value = !0
736
- }, [t.testEmail.isSending.value ? (e(), x(C(J), {
736
+ disabled: e.testEmail.isSending.value || !e.featureFlags.hasTemplateSaved.value,
737
+ onClick: f[2] ||= (t) => e.panelState.testEmailModalOpen.value = !0
738
+ }, [e.testEmail.isSending.value ? (s(), v(b(J), {
737
739
  key: 1,
738
740
  class: "tpl-spinner",
739
741
  size: 16,
740
742
  "stroke-width": 2
741
- })) : (e(), x(C(_e), {
743
+ })) : (s(), v(b(_e), {
742
744
  key: 0,
743
745
  size: 16,
744
746
  "stroke-width": 2
745
- })), s(" " + w(C(a).testEmail.button), 1)], 10, pt)) : v("", !0),
746
- f("button", {
747
- class: c(C($)),
747
+ })), y(" " + c(b(o).testEmail.button), 1)], 10, pt)) : w("", !0),
748
+ p("button", {
749
+ class: i(b($)),
748
750
  style: {
749
751
  "background-color": "transparent",
750
752
  color: "var(--tpl-primary)",
751
753
  "border-color": "var(--tpl-primary)"
752
754
  },
753
- disabled: t.isSaveDisabled,
754
- onClick: d[3] ||= (e) => l.$emit("save")
755
- }, [t.isSaving ? (e(), x(C(J), {
755
+ disabled: e.isSaveDisabled,
756
+ onClick: f[3] ||= (e) => d.$emit("save")
757
+ }, [e.isSaving ? (s(), v(b(J), {
756
758
  key: 1,
757
759
  class: "tpl-spinner",
758
760
  size: 16,
759
761
  "stroke-width": 2
760
- })) : (e(), x(C(Fe), {
762
+ })) : (s(), v(b(Fe), {
761
763
  key: 0,
762
764
  size: 16,
763
765
  "stroke-width": 2
764
- })), s(" " + w(t.isSaving ? C(a).header.saving : C(a).header.save), 1)], 10, mt)
766
+ })), y(" " + c(e.isSaving ? b(o).header.saving : b(o).header.save), 1)], 10, mt)
765
767
  ])
766
768
  ]));
767
769
  }
768
- }), gt = /* @__PURE__ */ l({
770
+ }), gt = /* @__PURE__ */ f({
769
771
  __name: "CloudPanels",
770
772
  props: {
771
773
  config: {},
@@ -787,80 +789,80 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
787
789
  "send-test-email",
788
790
  "module-insert"
789
791
  ],
790
- setup(t, { expose: n, emit: r }) {
791
- let i = D(() => import("./AiChatSidebar-J8iO_sX7.js")), a = D(() => import("./CommentsSidebar-DaP9BA_r.js")), s = D(() => import("./DesignReferenceSidebar-BHRlTqlT.js")), c = D(() => import("./TemplateScoringPanel-lm0_9nYi.js")), l = D(() => import("./TestEmailModal-WBMdiW5S.js")), u = D(() => import("./SaveModuleDialog-DuEKgumL.js")), d = D(() => import("./ModuleBrowserModal-DOsdaS6s.js")), f = D(async () => {
792
+ setup(e, { expose: t, emit: n }) {
793
+ let r = h(() => import("./AiChatSidebar-BIKvYREk.js")), i = h(() => import("./CommentsSidebar-D_tSGvTX.js")), a = h(() => import("./DesignReferenceSidebar-DWYK9nTk.js")), o = h(() => import("./TemplateScoringPanel-CZ62rGHz.js")), c = h(() => import("./TestEmailModal-sr1MaMVX.js")), l = h(() => import("./SaveModuleDialog-Cy2XyjYT.js")), d = h(() => import("./ModuleBrowserModal-BOzleijA.js")), f = h(async () => {
792
794
  try {
793
795
  return (await import("@templatical/media-library")).MediaLibraryModal;
794
796
  } catch {
795
797
  throw Error("[Templatical] Cloud media library requires the optional peer dependency '@templatical/media-library'. Please install it.");
796
798
  }
797
- }), p = r;
798
- function h(e, t, n) {
799
+ }), p = n;
800
+ function _(e, t, n) {
799
801
  t.history.record(), n.setContent(e), t.conditionPreview.reset();
800
802
  }
801
- function g(e, t) {
803
+ function y(e, t) {
802
804
  p("module-insert", e, t);
803
805
  }
804
- let y = o(null);
805
- function b(e) {
806
- y.value?.filterByBlock(e);
806
+ let x = u(null);
807
+ function C(e) {
808
+ x.value?.filterByBlock(e);
807
809
  }
808
- return n({ filterCommentsByBlock: b }), (n, r) => (e(), m(_, null, [
809
- E(C(i), {
810
- visible: t.panelState.aiChatOpen.value,
811
- "on-apply": (e) => h(e, t.core, t.editor),
812
- onClose: r[0] ||= (e) => t.panelState.aiChatOpen.value = !1
810
+ return t({ filterCommentsByBlock: C }), (t, n) => (s(), m(S, null, [
811
+ g(b(r), {
812
+ visible: e.panelState.aiChatOpen.value,
813
+ "on-apply": (t) => _(t, e.core, e.editor),
814
+ onClose: n[0] ||= (t) => e.panelState.aiChatOpen.value = !1
813
815
  }, null, 8, ["visible", "on-apply"]),
814
- E(C(c), {
815
- visible: t.panelState.scoringPanelOpen.value,
816
- onClose: r[1] ||= (e) => t.panelState.scoringPanelOpen.value = !1
816
+ g(b(o), {
817
+ visible: e.panelState.scoringPanelOpen.value,
818
+ onClose: n[1] ||= (t) => e.panelState.scoringPanelOpen.value = !1
817
819
  }, null, 8, ["visible"]),
818
- E(C(s), {
819
- visible: t.panelState.designReferenceOpen.value,
820
- "has-existing-blocks": t.editor.content.value.blocks.length > 0,
821
- onClose: r[2] ||= (e) => t.panelState.designReferenceOpen.value = !1,
822
- onApply: r[3] ||= (e) => h(e, t.core, t.editor)
820
+ g(b(a), {
821
+ visible: e.panelState.designReferenceOpen.value,
822
+ "has-existing-blocks": e.editor.content.value.blocks.length > 0,
823
+ onClose: n[2] ||= (t) => e.panelState.designReferenceOpen.value = !1,
824
+ onApply: n[3] ||= (t) => _(t, e.core, e.editor)
823
825
  }, null, 8, ["visible", "has-existing-blocks"]),
824
- E(C(a), {
826
+ g(b(i), {
825
827
  ref_key: "commentsSidebar",
826
- ref: y,
827
- visible: t.panelState.commentsOpen.value,
828
- onClose: r[4] ||= (e) => t.panelState.commentsOpen.value = !1
828
+ ref: x,
829
+ visible: e.panelState.commentsOpen.value,
830
+ onClose: n[4] ||= (t) => e.panelState.commentsOpen.value = !1
829
831
  }, null, 8, ["visible"]),
830
- E(C(l), {
831
- visible: t.panelState.testEmailModalOpen.value,
832
- "allowed-emails": t.testEmail.allowedEmails.value,
833
- "is-sending": t.testEmail.isSending.value,
834
- error: t.testEmail.error.value,
835
- onSend: r[5] ||= (e) => p("send-test-email", e),
836
- onClose: r[6] ||= (e) => t.panelState.testEmailModalOpen.value = !1
832
+ g(b(c), {
833
+ visible: e.panelState.testEmailModalOpen.value,
834
+ "allowed-emails": e.testEmail.allowedEmails.value,
835
+ "is-sending": e.testEmail.isSending.value,
836
+ error: e.testEmail.error.value,
837
+ onSend: n[5] ||= (e) => p("send-test-email", e),
838
+ onClose: n[6] ||= (t) => e.panelState.testEmailModalOpen.value = !1
837
839
  }, null, 8, [
838
840
  "visible",
839
841
  "allowed-emails",
840
842
  "is-sending",
841
843
  "error"
842
844
  ]),
843
- t.planConfigInstance.hasFeature("saved_modules") && t.config.modules !== !1 ? (e(), x(C(u), {
845
+ e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(b(l), {
844
846
  key: 0,
845
- visible: t.showSaveModuleDialog,
846
- "pre-selected-block-id": t.saveModulePreSelectedBlockId,
847
- onClose: r[7] ||= (e) => {
847
+ visible: e.showSaveModuleDialog,
848
+ "pre-selected-block-id": e.saveModulePreSelectedBlockId,
849
+ onClose: n[7] ||= (e) => {
848
850
  p("update:showSaveModuleDialog", !1), p("update:saveModulePreSelectedBlockId", null);
849
851
  },
850
- onSaved: r[8] ||= (e) => t.savedModulesHeadless.loadModules()
851
- }, null, 8, ["visible", "pre-selected-block-id"])) : v("", !0),
852
- t.planConfigInstance.hasFeature("saved_modules") && t.config.modules !== !1 ? (e(), x(C(d), {
852
+ onSaved: n[8] ||= (t) => e.savedModulesHeadless.loadModules()
853
+ }, null, 8, ["visible", "pre-selected-block-id"])) : w("", !0),
854
+ e.planConfigInstance.hasFeature("saved_modules") && e.config.modules !== !1 ? (s(), v(b(d), {
853
855
  key: 1,
854
- visible: t.showModuleBrowserModal,
855
- onClose: r[9] ||= (e) => p("update:showModuleBrowserModal", !1),
856
- onInsert: g
857
- }, null, 8, ["visible"])) : v("", !0),
858
- E(C(f), {
859
- visible: t.panelState.mediaLibraryOpen.value,
860
- accept: t.panelState.mediaLibraryAccept.value,
861
- "popover-target": t.core.popoverRoot.value,
862
- onSelect: t.mediaLib.handleMediaSelect,
863
- onClose: t.mediaLib.handleMediaLibraryClose
856
+ visible: e.showModuleBrowserModal,
857
+ onClose: n[9] ||= (e) => p("update:showModuleBrowserModal", !1),
858
+ onInsert: y
859
+ }, null, 8, ["visible"])) : w("", !0),
860
+ g(b(f), {
861
+ visible: e.panelState.mediaLibraryOpen.value,
862
+ accept: e.panelState.mediaLibraryAccept.value,
863
+ "popover-target": e.core.popoverRoot.value,
864
+ onSelect: e.mediaLib.handleMediaSelect,
865
+ onClose: e.mediaLib.handleMediaLibraryClose
864
866
  }, null, 8, [
865
867
  "visible",
866
868
  "accept",
@@ -873,69 +875,69 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
873
875
  }), _t = {
874
876
  key: 0,
875
877
  class: "tpl-loading tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:bg-[var(--tpl-bg)]"
876
- }, vt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, yt = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, bt = /* @__PURE__ */ l({
878
+ }, vt = { class: "tpl:flex tpl:flex-1 tpl:overflow-hidden" }, yt = { class: "tpl:flex tpl:w-12 tpl:shrink-0 tpl:flex-col tpl:items-center tpl:gap-4 tpl:py-5 tpl:border-r tpl:border-[var(--tpl-border)]" }, bt = /* @__PURE__ */ f({
877
879
  __name: "CloudLoadingOverlay",
878
880
  props: { visible: { type: Boolean } },
879
881
  setup(t) {
880
- return (n, i) => t.visible ? (e(), m("div", _t, [i[1] ||= p("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), f("div", vt, [f("div", yt, [(e(), m(_, null, r(5, (e) => f("div", {
882
+ return (n, r) => t.visible ? (s(), m("div", _t, [r[1] ||= x("<div class=\"tpl:flex tpl:h-14 tpl:shrink-0 tpl:items-center tpl:justify-between tpl:px-4 tpl:border-b tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-5 tpl:w-28 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl:flex tpl:gap-3\"><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-8 tpl:w-20 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div></div>", 1), p("div", vt, [p("div", yt, [(s(), m(S, null, e(5, (e) => p("div", {
881
883
  key: e,
882
884
  class: "tpl-shimmer tpl:size-7 tpl:rounded-[var(--tpl-radius-sm)]"
883
- })), 64))]), i[0] ||= p("<div class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"><div class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div></div><div class=\"tpl:py-4\"><div class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div></div><div class=\"tpl:flex tpl:justify-center tpl:py-4\"><div class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"></div></div></div></div><div class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div></div>", 2)])])) : v("", !0);
885
+ })), 64))]), r[0] ||= x("<div class=\"tpl:flex tpl:flex-1 tpl:items-start tpl:justify-center tpl:overflow-auto tpl:p-8 tpl:bg-[var(--tpl-canvas-bg)]\"><div class=\"tpl:w-full tpl:max-w-[600px] tpl:rounded-[var(--tpl-radius)] tpl:p-6 tpl:bg-[var(--tpl-bg)] tpl:shadow-[var(--tpl-shadow-sm)]\"><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-3/4 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-5/6 tpl:rounded\"></div></div><div class=\"tpl:py-4\"><div class=\"tpl-shimmer tpl:h-44 tpl:w-full tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:h-3 tpl:w-full tpl:rounded\"></div><div class=\"tpl-shimmer tpl:h-3 tpl:w-2/3 tpl:rounded\"></div></div><div class=\"tpl:flex tpl:justify-center tpl:py-4\"><div class=\"tpl-shimmer tpl:h-10 tpl:w-36 tpl:rounded-[var(--tpl-radius-sm)]\"></div></div><div class=\"tpl:space-y-2 tpl:py-4\"><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/2 tpl:rounded\"></div><div class=\"tpl-shimmer tpl:mx-auto tpl:h-2.5 tpl:w-1/3 tpl:rounded\"></div></div></div></div><div class=\"tpl:flex tpl:w-[320px] tpl:shrink-0 tpl:flex-col tpl:gap-4 tpl:p-4 tpl:border-l tpl:border-[var(--tpl-border)]\"><div class=\"tpl-shimmer tpl:h-8 tpl:rounded-[var(--tpl-radius-sm)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div><div class=\"tpl-shimmer tpl:h-32 tpl:rounded-[var(--tpl-radius)]\"></div></div>", 2)])])) : w("", !0);
884
886
  }
885
887
  }), xt = {
886
888
  key: 0,
887
889
  role: "alert",
888
890
  class: "tpl-error tpl:absolute tpl:inset-0 tpl:z-overlay tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-6 tpl:px-8 tpl:bg-[var(--tpl-bg)]"
889
- }, St = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Ct = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, wt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Et = /* @__PURE__ */ l({
891
+ }, St = { class: "tpl:flex tpl:size-16 tpl:items-center tpl:justify-center tpl:rounded-full tpl:bg-[var(--tpl-danger-light)]" }, Ct = { class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:text-center" }, wt = { class: "tpl:text-lg tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tt = { class: "tpl:max-w-md tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Et = /* @__PURE__ */ f({
890
892
  __name: "CloudErrorOverlay",
891
893
  props: {
892
894
  error: {},
893
895
  visible: { type: Boolean }
894
896
  },
895
897
  emits: ["retry"],
896
- setup(t, { emit: n }) {
897
- let r = n, { t: i } = Q();
898
- function a(e) {
899
- return "isUnauthorized" in e && e.isUnauthorized ? i.error.authFailed : "isNotFound" in e && e.isNotFound ? i.error.templateNotFound : i.error.defaultMessage;
898
+ setup(e, { emit: t }) {
899
+ let n = t, { t: r } = Q();
900
+ function i(e) {
901
+ return "isUnauthorized" in e && e.isUnauthorized ? r.error.authFailed : "isNotFound" in e && e.isNotFound ? r.error.templateNotFound : r.error.defaultMessage;
900
902
  }
901
- function o(e) {
903
+ function a(e) {
902
904
  return "isNotFound" in e && !!e.isNotFound;
903
905
  }
904
- return (n, s) => t.visible && t.error ? (e(), m("div", xt, [
905
- f("div", St, [E(C(W), {
906
+ return (t, o) => e.visible && e.error ? (s(), m("div", xt, [
907
+ p("div", St, [g(b(W), {
906
908
  size: 32,
907
909
  "stroke-width": 1.5,
908
910
  class: "tpl:text-[var(--tpl-danger)]"
909
911
  })]),
910
- f("div", Ct, [f("h2", wt, w(C(i).error.title), 1), f("p", Tt, w(a(t.error)), 1)]),
911
- o(t.error) ? v("", !0) : (e(), m("button", {
912
+ p("div", Ct, [p("h2", wt, c(b(r).error.title), 1), p("p", Tt, c(i(e.error)), 1)]),
913
+ a(e.error) ? w("", !0) : (s(), m("button", {
912
914
  key: 0,
913
915
  class: "tpl-btn tpl-btn-primary tpl:inline-flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-4 tpl:py-2.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
914
- onClick: s[0] ||= (e) => r("retry")
915
- }, w(C(i).error.retry), 1))
916
- ])) : v("", !0);
916
+ onClick: o[0] ||= (e) => n("retry")
917
+ }, c(b(r).error.retry), 1))
918
+ ])) : w("", !0);
917
919
  }
918
920
  }), Dt = {
919
921
  key: 0,
920
922
  class: "tpl-preview-banner tpl:absolute tpl:top-14 tpl:right-0 tpl:left-0 tpl:z-40 tpl:flex tpl:items-center tpl:justify-center tpl:gap-4 tpl:px-4 tpl:py-3 tpl:bg-[var(--tpl-primary-light)] tpl:border-b tpl:border-[var(--tpl-primary)]"
921
- }, Ot = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, At = /* @__PURE__ */ l({
923
+ }, Ot = { class: "tpl:flex tpl:items-center tpl:gap-2 tpl:text-sm tpl:text-[var(--tpl-text)]" }, kt = { class: "tpl:flex tpl:items-center tpl:gap-2" }, At = /* @__PURE__ */ f({
922
924
  __name: "SnapshotPreviewBanner",
923
925
  props: { visible: { type: Boolean } },
924
926
  emits: ["cancel", "confirm"],
925
- setup(t, { emit: n }) {
926
- let r = n, { t: i } = Q();
927
- return (n, a) => t.visible ? (e(), m("div", Dt, [f("div", Ot, [E(C(he), {
927
+ setup(e, { emit: t }) {
928
+ let n = t, { t: r } = Q();
929
+ return (t, i) => e.visible ? (s(), m("div", Dt, [p("div", Ot, [g(b(he), {
928
930
  size: 18,
929
931
  "stroke-width": 2,
930
932
  class: "tpl:text-[var(--tpl-primary)]"
931
- }), f("span", null, w(C(i).snapshotPreview.message), 1)]), f("div", kt, [f("button", {
933
+ }), p("span", null, c(b(r).snapshotPreview.message), 1)]), p("div", kt, [p("button", {
932
934
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:text-[var(--tpl-text-muted)] tpl:border tpl:border-[var(--tpl-border)]",
933
935
  style: { "background-color": "transparent" },
934
- onClick: a[0] ||= (e) => r("cancel")
935
- }, w(C(i).snapshotPreview.cancel), 1), f("button", {
936
+ onClick: i[0] ||= (e) => n("cancel")
937
+ }, c(b(r).snapshotPreview.cancel), 1), p("button", {
936
938
  class: "tpl:rounded-md tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:transition-all tpl:duration-150 tpl:hover:opacity-90 tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]",
937
- onClick: a[1] ||= (e) => r("confirm")
938
- }, w(C(i).snapshotPreview.restore), 1)])])) : v("", !0);
939
+ onClick: i[1] ||= (e) => n("confirm")
940
+ }, c(b(r).snapshotPreview.restore), 1)])])) : w("", !0);
939
941
  }
940
942
  }), jt = {
941
943
  key: 0,
@@ -947,14 +949,14 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
947
949
  color: "var(--tpl-text)",
948
950
  border: "1px solid var(--tpl-warning)"
949
951
  }
950
- }, Mt = /* @__PURE__ */ l({
952
+ }, Mt = /* @__PURE__ */ f({
951
953
  __name: "CollabUndoToast",
952
954
  props: { visible: { type: Boolean } },
953
- setup(t) {
954
- let { t: n } = V();
955
- return (r, i) => t.visible ? (e(), m("div", jt, w(C(n).history.collabWarning), 1)) : v("", !0);
955
+ setup(e) {
956
+ let { t } = V();
957
+ return (n, r) => e.visible ? (s(), m("div", jt, c(b(t).history.collabWarning), 1)) : w("", !0);
956
958
  }
957
- }), Nt = ["data-tpl-theme"], Pt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Ft = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, It = ["aria-label"], Lt = /*#__PURE__*/ Z(/* @__PURE__ */ l({
959
+ }), Nt = ["data-tpl-theme"], Pt = { class: "tpl:sticky tpl:top-0 tpl:z-40 tpl:h-0" }, Ft = { class: "tpl-main tpl:flex tpl:justify-center tpl:p-8" }, It = ["aria-label"], Lt = /*#__PURE__*/ Z(/* @__PURE__ */ f({
958
960
  __name: "CloudEditor",
959
961
  props: {
960
962
  config: {},
@@ -964,18 +966,18 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
964
966
  shadowRoot: {}
965
967
  },
966
968
  emits: ["ready"],
967
- setup(n, { expose: r, emit: a }) {
968
- let l = n;
969
- h(z, l.cloudTranslations);
970
- let d = a, p = o(null), _ = o(null), S = Ve({
971
- config: l.config,
972
- translations: l.translations,
973
- fontsManager: l.fontsManager,
974
- emit: d,
975
- getCommentsSidebar: () => p.value ? { filterByBlock: p.value.filterCommentsByBlock } : null,
976
- editorRoot: l.shadowRoot,
977
- containerEl: _
978
- }), { isInitializing: D, isAuthReady: k, initError: A, planConfigInstance: M, websocket: N, collaboration: P, isCollaborationEnabled: F, editor: I, core: L, featureFlags: R, mediaLib: te, exporter: ne, testEmail: B, commentsInstance: re, savedModulesHeadless: ie, panelState: V, snapshotPreview: H, collabWarning: U, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: q, setUiTheme: le } = S, { showNotice: he } = ee(() => l.config.smallScreenNotice);
969
+ setup(e, { expose: a, emit: o }) {
970
+ let d = e;
971
+ _(z, d.cloudTranslations);
972
+ let f = o, h = u(null), x = u(null), S = Ve({
973
+ config: d.config,
974
+ translations: d.translations,
975
+ fontsManager: d.fontsManager,
976
+ emit: f,
977
+ getCommentsSidebar: () => h.value ? { filterByBlock: h.value.filterCommentsByBlock } : null,
978
+ editorRoot: d.shadowRoot,
979
+ containerEl: x
980
+ }), { isInitializing: C, isAuthReady: k, initError: A, planConfigInstance: M, websocket: N, collaboration: P, isCollaborationEnabled: F, editor: I, core: L, featureFlags: R, mediaLib: te, exporter: ne, testEmail: B, commentsInstance: re, savedModulesHeadless: ie, panelState: V, snapshotPreview: H, collabWarning: U, showSaveModuleDialog: W, showModuleBrowserModal: G, saveModulePreSelectedBlockId: K, setThemeOverrides: q, setUiTheme: le } = S, { showNotice: he } = ee(() => d.config.smallScreenNotice);
979
981
  async function J(e) {
980
982
  try {
981
983
  await B.sendTestEmail(e), V.testEmailModalOpen.value = !1;
@@ -994,7 +996,7 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
994
996
  G.value = !1;
995
997
  }
996
998
  let Y = Ue({
997
- config: l.config,
999
+ config: d.config,
998
1000
  editor: I,
999
1001
  websocket: N,
1000
1002
  planConfigInstance: M,
@@ -1004,17 +1006,17 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1004
1006
  featureFlags: R,
1005
1007
  isDestroyed: S.isDestroyed
1006
1008
  }), X = We({
1007
- issues: L.templateLint ? L.templateLint.issues : o([]),
1009
+ issues: L.templateLint ? L.templateLint.issues : u([]),
1008
1010
  planConfig: M.config
1009
1011
  });
1010
1012
  async function Z() {
1011
- await X.tryRunSave(() => Y.saveTemplate().catch((e) => l.config.onError?.(e)));
1013
+ await X.tryRunSave(() => Y.saveTemplate().catch((e) => d.config.onError?.(e)));
1012
1014
  }
1013
- return S.onSaveHook.value = Z, i(() => {
1015
+ return S.onSaveHook.value = Z, r(() => {
1014
1016
  S.initialize();
1015
- }), g(() => {
1017
+ }), t(() => {
1016
1018
  S.destroy();
1017
- }), r({
1019
+ }), a({
1018
1020
  getContent: () => I.content.value,
1019
1021
  setContent: (e) => I.setContent(e),
1020
1022
  setTheme: le,
@@ -1023,17 +1025,17 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1023
1025
  load: Y.loadTemplate,
1024
1026
  save: Y.saveTemplate,
1025
1027
  sendTestEmail: B.sendTestEmail
1026
- }), (r, i) => (e(), m("div", {
1028
+ }), (t, r) => (s(), m("div", {
1027
1029
  ref_key: "rootEl",
1028
- ref: _,
1029
- class: c(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": C(I).state.darkMode }]),
1030
- "data-tpl-theme": C(L).resolvedTheme.value,
1031
- style: b(C(L).themeStyles.value),
1032
- onDragover: i[9] ||= u(() => {}, ["prevent"]),
1033
- onDrop: i[10] ||= u(() => {}, ["prevent"])
1030
+ ref: x,
1031
+ class: i(["tpl tpl:relative tpl:h-full tpl:overflow-hidden", { "tpl:dark": b(I).state.darkMode }]),
1032
+ "data-tpl-theme": b(L).resolvedTheme.value,
1033
+ style: n(b(L).themeStyles.value),
1034
+ onDragover: r[9] ||= E(() => {}, ["prevent"]),
1035
+ onDrop: r[10] ||= E(() => {}, ["prevent"])
1034
1036
  }, [
1035
- E(me),
1036
- E(T, {
1037
+ g(me),
1038
+ g(O, {
1037
1039
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
1038
1040
  "enter-from-class": "tpl:opacity-100",
1039
1041
  "enter-to-class": "tpl:opacity-100",
@@ -1041,10 +1043,10 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1041
1043
  "leave-from-class": "tpl:opacity-100",
1042
1044
  "leave-to-class": "tpl:opacity-0"
1043
1045
  }, {
1044
- default: O(() => [E(bt, { visible: C(D) || C(I).state.isLoading }, null, 8, ["visible"])]),
1046
+ default: l(() => [g(bt, { visible: b(C) || b(I).state.isLoading }, null, 8, ["visible"])]),
1045
1047
  _: 1
1046
1048
  }),
1047
- E(T, {
1049
+ g(O, {
1048
1050
  "enter-active-class": "tpl:transition-opacity tpl:duration-200",
1049
1051
  "enter-from-class": "tpl:opacity-0",
1050
1052
  "enter-to-class": "tpl:opacity-100",
@@ -1052,10 +1054,10 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1052
1054
  "leave-from-class": "tpl:opacity-100",
1053
1055
  "leave-to-class": "tpl:opacity-0"
1054
1056
  }, {
1055
- default: O(() => [E(Et, {
1056
- error: C(A),
1057
- visible: !!C(A) && !C(D),
1058
- onRetry: C(S).initialize
1057
+ default: l(() => [g(Et, {
1058
+ error: b(A),
1059
+ visible: !!b(A) && !b(C),
1060
+ onRetry: b(S).initialize
1059
1061
  }, null, 8, [
1060
1062
  "error",
1061
1063
  "visible",
@@ -1063,19 +1065,19 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1063
1065
  ])]),
1064
1066
  _: 1
1065
1067
  }),
1066
- E(ht, {
1067
- editor: C(I),
1068
- core: C(L),
1069
- "feature-flags": C(R),
1070
- "panel-state": C(V),
1071
- "snapshot-preview": C(H),
1072
- "comments-instance": C(re),
1073
- "test-email": C(B),
1074
- websocket: C(N),
1075
- collaboration: C(P),
1076
- "is-collaboration-enabled": C(F),
1077
- "is-saving": C(I).state.isSaving || C(R).isSaveExporting.value,
1078
- "is-save-disabled": C(I).state.isSaving || C(R).isSaveExporting.value || !C(I).state.isDirty,
1068
+ g(ht, {
1069
+ editor: b(I),
1070
+ core: b(L),
1071
+ "feature-flags": b(R),
1072
+ "panel-state": b(V),
1073
+ "snapshot-preview": b(H),
1074
+ "comments-instance": b(re),
1075
+ "test-email": b(B),
1076
+ websocket: b(N),
1077
+ collaboration: b(P),
1078
+ "is-collaboration-enabled": b(F),
1079
+ "is-saving": b(I).state.isSaving || b(R).isSaveExporting.value,
1080
+ "is-save-disabled": b(I).state.isSaving || b(R).isSaveExporting.value || !b(I).state.isDirty,
1079
1081
  onSave: Z
1080
1082
  }, null, 8, [
1081
1083
  "editor",
@@ -1091,23 +1093,23 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1091
1093
  "is-saving",
1092
1094
  "is-save-disabled"
1093
1095
  ]),
1094
- E(et, {
1095
- open: C(X).modalOpen.value,
1096
- issues: C(X).blockingIssues.value,
1097
- onCancel: C(X).cancel,
1098
- onConfirm: C(X).confirmAndSave
1096
+ g(et, {
1097
+ open: b(X).modalOpen.value,
1098
+ issues: b(X).blockingIssues.value,
1099
+ onCancel: b(X).cancel,
1100
+ onConfirm: b(X).confirmAndSave
1099
1101
  }, null, 8, [
1100
1102
  "open",
1101
1103
  "issues",
1102
1104
  "onCancel",
1103
1105
  "onConfirm"
1104
1106
  ]),
1105
- E(At, {
1106
- visible: C(H).isPreviewingSnapshot.value,
1107
- onCancel: C(H).cancelPreview,
1107
+ g(At, {
1108
+ visible: b(H).isPreviewingSnapshot.value,
1109
+ onCancel: b(H).cancelPreview,
1108
1110
  onConfirm: ge
1109
1111
  }, null, 8, ["visible", "onCancel"]),
1110
- E(T, {
1112
+ g(O, {
1111
1113
  "enter-active-class": "tpl:transition-all tpl:duration-200 tpl:ease-out",
1112
1114
  "enter-from-class": "tpl:translate-y-[-8px] tpl:opacity-0",
1113
1115
  "enter-to-class": "tpl:translate-y-0 tpl:opacity-100",
@@ -1115,18 +1117,18 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1115
1117
  "leave-from-class": "tpl:translate-y-0 tpl:opacity-100",
1116
1118
  "leave-to-class": "tpl:translate-y-[-8px] tpl:opacity-0"
1117
1119
  }, {
1118
- default: O(() => [E(Mt, { visible: C(U).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1120
+ default: l(() => [g(Mt, { visible: b(U).collabUndoWarningVisible.value }, null, 8, ["visible"])]),
1119
1121
  _: 1
1120
1122
  }),
1121
- t(E(se, null, null, 512), [[y, !C(I).state.previewMode]]),
1122
- f("div", {
1123
- class: c(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [C(I).state.previewMode ? "tpl:left-0 tpl:right-0" : C(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", C(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1123
+ T(g(se, null, null, 512), [[D, !b(I).state.previewMode]]),
1124
+ p("div", {
1125
+ class: i(["tpl-body tpl:absolute tpl:bottom-0 tpl:overflow-auto", [b(I).state.previewMode ? "tpl:left-0 tpl:right-0" : b(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]", b(H).isPreviewingSnapshot.value ? "tpl:top-[104px]" : "tpl:top-14"]]),
1124
1126
  style: {
1125
1127
  transition: "all 300ms cubic-bezier(0.34, 1.56, 0.64, 1)",
1126
1128
  "background-color": "var(--tpl-canvas-bg)"
1127
1129
  }
1128
- }, [f("div", Pt, [E(T, { name: "tpl-restore-btn" }, {
1129
- default: O(() => [C(L).conditionPreview.hasHiddenBlocks.value ? (e(), m("button", {
1130
+ }, [p("div", Pt, [g(O, { name: "tpl-restore-btn" }, {
1131
+ default: l(() => [b(L).conditionPreview.hasHiddenBlocks.value ? (s(), m("button", {
1130
1132
  key: 0,
1131
1133
  class: "tpl:absolute tpl:left-1/2 tpl:top-2 tpl:-translate-x-1/2 tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:rounded-full tpl:border tpl:px-3.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:whitespace-nowrap tpl:shadow-md tpl:hover:opacity-80",
1132
1134
  style: {
@@ -1135,22 +1137,22 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1135
1137
  "border-color": "var(--tpl-warning)",
1136
1138
  "backdrop-filter": "blur(8px)"
1137
1139
  },
1138
- onClick: i[0] ||= (e) => C(L).conditionPreview.reset()
1139
- }, [E(C(ue), {
1140
+ onClick: r[0] ||= (e) => b(L).conditionPreview.reset()
1141
+ }, [g(b(ue), {
1140
1142
  size: 13,
1141
1143
  "stroke-width": 2
1142
- }), s(" " + w(C(L).t.blockSettings.restoreHiddenBlocks), 1)])) : v("", !0)]),
1144
+ }), y(" " + c(b(L).t.blockSettings.restoreHiddenBlocks), 1)])) : w("", !0)]),
1143
1145
  _: 1
1144
- })]), f("main", Ft, [E(oe, {
1145
- viewport: C(I).state.viewport,
1146
- content: C(I).content.value,
1147
- "selected-block-id": C(I).state.selectedBlockId,
1148
- "dark-mode": C(I).state.darkMode,
1149
- "preview-mode": C(I).state.previewMode,
1150
- "locked-blocks": C(P)?.lockedBlocks.value ?? void 0,
1151
- onSelectBlock: C(I).selectBlock,
1152
- onOpenAiChat: i[1] ||= (e) => C(V).aiChatOpen.value = !0,
1153
- onOpenDesignReference: i[2] ||= (e) => C(V).designReferenceOpen.value = !0
1146
+ })]), p("main", Ft, [g(oe, {
1147
+ viewport: b(I).state.viewport,
1148
+ content: b(I).content.value,
1149
+ "selected-block-id": b(I).state.selectedBlockId,
1150
+ "dark-mode": b(I).state.darkMode,
1151
+ "preview-mode": b(I).state.previewMode,
1152
+ "locked-blocks": b(P)?.lockedBlocks.value ?? void 0,
1153
+ onSelectBlock: b(I).selectBlock,
1154
+ onOpenAiChat: r[1] ||= (e) => b(V).aiChatOpen.value = !0,
1155
+ onOpenDesignReference: r[2] ||= (e) => b(V).designReferenceOpen.value = !0
1154
1156
  }, null, 8, [
1155
1157
  "viewport",
1156
1158
  "content",
@@ -1160,49 +1162,49 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1160
1162
  "locked-blocks",
1161
1163
  "onSelectBlock"
1162
1164
  ])])], 2),
1163
- n.config.branding !== !1 && !C(R).isWhiteLabeled.value ? (e(), x(de, {
1165
+ e.config.branding !== !1 && !b(R).isWhiteLabeled.value ? (s(), v(de, {
1164
1166
  key: 0,
1165
- "position-class": [C(I).state.previewMode ? "tpl:left-0 tpl:right-0" : C(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1166
- }, null, 8, ["position-class"])) : v("", !0),
1167
- f("div", {
1167
+ "position-class": [b(I).state.previewMode ? "tpl:left-0 tpl:right-0" : b(V).rightPanelOpen.value ? "tpl:left-12 tpl:right-[680px]" : "tpl:left-12 tpl:right-[320px]"]
1168
+ }, null, 8, ["position-class"])) : w("", !0),
1169
+ p("div", {
1168
1170
  class: "tpl-sr-only",
1169
1171
  role: "status",
1170
1172
  "aria-live": "polite",
1171
1173
  "aria-atomic": "true",
1172
- "aria-label": C(L).t.landmarks.reorderAnnouncements
1173
- }, w(C(L).keyboardReorder.announcement.value), 9, It),
1174
- t(E(ae, {
1175
- "selected-block": C(I).selectedBlock.value,
1176
- settings: C(I).content.value.settings,
1177
- "shifted-left": C(V).rightPanelOpen.value,
1178
- onUpdateBlock: i[3] ||= (e) => C(I).updateBlock(C(I).selectedBlock.value.id, e),
1179
- onDeleteBlock: i[4] ||= (e) => C(L).blockActions.deleteBlock(C(I).selectedBlock.value.id),
1180
- onDuplicateBlock: i[5] ||= (e) => C(L).blockActions.duplicateBlock(C(I).selectedBlock.value),
1181
- onUpdateSettings: C(I).updateSettings
1174
+ "aria-label": b(L).t.landmarks.reorderAnnouncements
1175
+ }, c(b(L).keyboardReorder.announcement.value), 9, It),
1176
+ T(g(ae, {
1177
+ "selected-block": b(I).selectedBlock.value,
1178
+ settings: b(I).content.value.settings,
1179
+ "shifted-left": b(V).rightPanelOpen.value,
1180
+ onUpdateBlock: r[3] ||= (e) => b(I).updateBlock(b(I).selectedBlock.value.id, e),
1181
+ onDeleteBlock: r[4] ||= (e) => b(L).blockActions.deleteBlock(b(I).selectedBlock.value.id),
1182
+ onDuplicateBlock: r[5] ||= (e) => b(L).blockActions.duplicateBlock(b(I).selectedBlock.value),
1183
+ onUpdateSettings: b(I).updateSettings
1182
1184
  }, null, 8, [
1183
1185
  "selected-block",
1184
1186
  "settings",
1185
1187
  "shifted-left",
1186
1188
  "onUpdateSettings"
1187
- ]), [[y, !C(I).state.previewMode]]),
1188
- !C(D) && C(k) ? (e(), x(gt, {
1189
+ ]), [[D, !b(I).state.previewMode]]),
1190
+ !b(C) && b(k) ? (s(), v(gt, {
1189
1191
  key: 1,
1190
1192
  ref_key: "cloudPanelsRef",
1191
- ref: p,
1192
- config: l.config,
1193
- editor: C(I),
1194
- core: C(L),
1195
- "panel-state": C(V),
1196
- "plan-config-instance": C(M),
1197
- "test-email": C(B),
1198
- "media-lib": C(te),
1199
- "saved-modules-headless": C(ie),
1200
- "show-save-module-dialog": C(W),
1201
- "save-module-pre-selected-block-id": C(K),
1202
- "show-module-browser-modal": C(G),
1203
- "onUpdate:showSaveModuleDialog": i[6] ||= (e) => W.value = e,
1204
- "onUpdate:saveModulePreSelectedBlockId": i[7] ||= (e) => K.value = e,
1205
- "onUpdate:showModuleBrowserModal": i[8] ||= (e) => G.value = e,
1193
+ ref: h,
1194
+ config: d.config,
1195
+ editor: b(I),
1196
+ core: b(L),
1197
+ "panel-state": b(V),
1198
+ "plan-config-instance": b(M),
1199
+ "test-email": b(B),
1200
+ "media-lib": b(te),
1201
+ "saved-modules-headless": b(ie),
1202
+ "show-save-module-dialog": b(W),
1203
+ "save-module-pre-selected-block-id": b(K),
1204
+ "show-module-browser-modal": b(G),
1205
+ "onUpdate:showSaveModuleDialog": r[6] ||= (e) => W.value = e,
1206
+ "onUpdate:saveModulePreSelectedBlockId": r[7] ||= (e) => K.value = e,
1207
+ "onUpdate:showModuleBrowserModal": r[8] ||= (e) => G.value = e,
1206
1208
  onSendTestEmail: J,
1207
1209
  onModuleInsert: _e
1208
1210
  }, null, 8, [
@@ -1217,14 +1219,14 @@ var Ge = ["aria-label"], Ke = { class: "tpl:flex tpl:max-h-[80vh] tpl:w-full tpl
1217
1219
  "show-save-module-dialog",
1218
1220
  "save-module-pre-selected-block-id",
1219
1221
  "show-module-browser-modal"
1220
- ])) : v("", !0),
1221
- f("div", {
1222
- ref: (e) => C(L).popoverRoot.value = e,
1222
+ ])) : w("", !0),
1223
+ p("div", {
1224
+ ref: (e) => b(L).popoverRoot.value = e,
1223
1225
  class: "tpl-popover-root"
1224
1226
  }, null, 512),
1225
- E(ce),
1226
- E(pe),
1227
- C(he) ? (e(), x(fe, { key: 2 })) : v("", !0)
1227
+ g(ce),
1228
+ g(pe),
1229
+ b(he) ? (s(), v(fe, { key: 2 })) : w("", !0)
1228
1230
  ], 46, Nt));
1229
1231
  }
1230
1232
  }), [["__scopeId", "data-v-3fc6c906"]]);