@templatical/editor 0.13.0 → 0.15.0

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 (178) hide show
  1. package/dist/{AiChatSidebar-B0-U5-sb.js → AiChatSidebar-BIKvYREk.js} +57 -56
  2. package/dist/{AiFeatureMenu-DxDwLS8B.js → AiFeatureMenu-QbD82crt.js} +23 -23
  3. package/dist/{BlockIssueBadge-C-EPqWsh.js → BlockIssueBadge-B3xVgMTh.js} +11 -11
  4. package/dist/CloudEditor-DptuSf7A.js +1234 -0
  5. package/dist/{CollaboratorBar-DgwjisX2.js → CollaboratorBar-DrA_K69w.js} +20 -20
  6. package/dist/{CommentsSidebar-CpRLN40c.js → CommentsSidebar-D_tSGvTX.js} +158 -157
  7. package/dist/CountdownBlock-apiYUhkQ.js +92 -0
  8. package/dist/CountdownToolbar-CS0axcjz.js +210 -0
  9. package/dist/{DesignReferenceSidebar-BgPDbOsl.js → DesignReferenceSidebar-DWYK9nTk.js} +58 -57
  10. package/dist/{IssuesPanel-I0z6k6-H.js → IssuesPanel-CR1MPaDE.js} +40 -40
  11. package/dist/{LoadingTrack-C7mGWPHS.js → LoadingTrack-DsecR8Rw.js} +1 -1
  12. package/dist/MergeTagSuggestion-CH2SUxBo.js +1327 -0
  13. package/dist/ModuleBrowserModal-D45rBj5C.js +202 -0
  14. package/dist/{ModulePreviewCanvas-Dni9kK4j.js → ModulePreviewCanvas-BiQ6B2-l.js} +29 -29
  15. package/dist/{NumberWithSuffix-D3fdj0iO.js → NumberWithSuffix-CrA6quxx.js} +143 -142
  16. package/dist/ParagraphEditor-1NaUJpZO.js +721 -0
  17. package/dist/{RichTextEditorContent-Q5altsx1.js → RichTextEditorContent-BqLHIZY7.js} +45 -44
  18. package/dist/{SaveModuleDialog-C38VqN2T.js → SaveModuleDialog-B0sPOTgO.js} +38 -37
  19. package/dist/{SnapshotHistory-ByloTpwh.js → SnapshotHistory-DslVzmSb.js} +34 -33
  20. package/dist/{TemplateScoringPanel-CUxiPtEf.js → TemplateScoringPanel-CZ62rGHz.js} +83 -82
  21. package/dist/{TestEmailModal-BvZBMBad.js → TestEmailModal-DWGniJVu.js} +22 -21
  22. package/dist/TitleEditor-D4t_gZZJ.js +193 -0
  23. package/dist/{TplModal-BYb-X5Bj.js → TplModal-Br2VG6cn.js} +14 -13
  24. package/dist/{blockTypeIcons-CyAom3iI.js → blockTypeIcons-CXhCS5WV.js} +5 -5
  25. package/dist/bundle-stats.json +8 -8
  26. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js → AiFeatureMenu-3Slo_LGA.js} +8 -8
  27. package/dist/cdn/chunks/{AiFeatureMenu-BSoy-SoF.js.map → AiFeatureMenu-3Slo_LGA.js.map} +1 -1
  28. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js → BlockIssueBadge-BxwEiiF3.js} +5 -5
  29. package/dist/cdn/chunks/{BlockIssueBadge-BQDUuJxy.js.map → BlockIssueBadge-BxwEiiF3.js.map} +1 -1
  30. package/dist/cdn/chunks/{CloudEditor-BZuzsQOZ.js → CloudEditor-DFIFWD9G.js} +163 -161
  31. package/dist/cdn/chunks/CloudEditor-DFIFWD9G.js.map +1 -0
  32. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js → CollaboratorBar-Cu3vuN66.js} +4 -4
  33. package/dist/cdn/chunks/{CollaboratorBar-DUpSrtDr.js.map → CollaboratorBar-Cu3vuN66.js.map} +1 -1
  34. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js → CountdownBlock-BEVAJQtQ.js} +3 -3
  35. package/dist/cdn/chunks/{CountdownBlock-DChGTAsH.js.map → CountdownBlock-BEVAJQtQ.js.map} +1 -1
  36. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js → CountdownToolbar-CI2sQZv5.js} +4 -4
  37. package/dist/cdn/chunks/{CountdownToolbar-C6gX2SJr.js.map → CountdownToolbar-CI2sQZv5.js.map} +1 -1
  38. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js → IssuesPanel-BdeDoTcn.js} +11 -11
  39. package/dist/cdn/chunks/{IssuesPanel-Bo1uhdSe.js.map → IssuesPanel-BdeDoTcn.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-a-tZRCcD.js → ModuleBrowserModal-Dz-I5zfj.js} +11 -8
  43. package/dist/cdn/chunks/{ModuleBrowserModal-a-tZRCcD.js.map → ModuleBrowserModal-Dz-I5zfj.js.map} +1 -1
  44. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js → ModulePreviewCanvas-BfinyuAN.js} +21 -21
  45. package/dist/cdn/chunks/{ModulePreviewCanvas-Bm6k0Op0.js.map → ModulePreviewCanvas-BfinyuAN.js.map} +1 -1
  46. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js → NumberWithSuffix-CDjEa08X.js} +4 -4
  47. package/dist/cdn/chunks/{NumberWithSuffix-HTbuD3VJ.js.map → NumberWithSuffix-CDjEa08X.js.map} +1 -1
  48. package/dist/cdn/chunks/{ParagraphEditor-pGrfSccu.js → ParagraphEditor-B3fG0vge.js} +130 -110
  49. package/dist/cdn/chunks/ParagraphEditor-B3fG0vge.js.map +1 -0
  50. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js → RichTextEditorContent-C6YPCp9j.js} +4 -4
  51. package/dist/cdn/chunks/{RichTextEditorContent-D7XZix_1.js.map → RichTextEditorContent-C6YPCp9j.js.map} +1 -1
  52. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js → SaveModuleDialog-C6UIIVAM.js} +6 -6
  53. package/dist/cdn/chunks/{SaveModuleDialog-C9PQ9x6j.js.map → SaveModuleDialog-C6UIIVAM.js.map} +1 -1
  54. package/dist/cdn/chunks/{TitleEditor-BvFbL16O.js → TitleEditor-BiZbLYF1.js} +62 -46
  55. package/dist/cdn/chunks/TitleEditor-BiZbLYF1.js.map +1 -0
  56. package/dist/cdn/chunks/blockTypeIcons-BernVG06.js +22 -0
  57. package/dist/cdn/chunks/{blockTypeIcons-Kd1MT0u8.js.map → blockTypeIcons-BernVG06.js.map} +1 -1
  58. package/dist/{de-C2wOXoxs.js → cdn/chunks/de-LsV0u1tP.js} +19 -1
  59. package/dist/cdn/chunks/de-LsV0u1tP.js.map +1 -0
  60. package/dist/cdn/chunks/{draggable-Bci-fq8y.js → draggable-kG-D5Xsm.js} +19 -10
  61. package/dist/cdn/chunks/draggable-kG-D5Xsm.js.map +1 -0
  62. package/dist/cdn/chunks/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +18 -2
  63. package/dist/cdn/chunks/en-Bb8X1bOs.js.map +1 -0
  64. package/dist/cdn/chunks/extensions-Drp8UDc6.js +421 -0
  65. package/dist/cdn/chunks/extensions-Drp8UDc6.js.map +1 -0
  66. package/dist/cdn/chunks/{features-DU6lA8l1.js → features-Dpczf9Su.js} +1171 -994
  67. package/dist/cdn/chunks/features-Dpczf9Su.js.map +1 -0
  68. package/dist/cdn/chunks/{icons-BjHUZZyJ.js → icons-CuxnJiGQ.js} +170 -164
  69. package/dist/cdn/chunks/icons-CuxnJiGQ.js.map +1 -0
  70. package/dist/cdn/chunks/{liquid.browser-DKKBzRQu.js → liquid.browser-BJOEu6Cg.js} +693 -678
  71. package/dist/cdn/chunks/liquid.browser-BJOEu6Cg.js.map +1 -0
  72. package/dist/cdn/chunks/{media-library-Byelliig.js → media-library-CiYl_BO7.js} +556 -554
  73. package/dist/cdn/chunks/{media-library-Byelliig.js.map → media-library-CiYl_BO7.js.map} +1 -1
  74. package/dist/cdn/chunks/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +18 -2
  75. package/dist/cdn/chunks/pt-BR-BwJY_cvb.js.map +1 -0
  76. package/dist/cdn/chunks/{pusher-BICWUP2j.js → pusher-CIwiKF8H.js} +9 -6
  77. package/dist/cdn/chunks/{pusher-BICWUP2j.js.map → pusher-CIwiKF8H.js.map} +1 -1
  78. package/dist/cdn/chunks/quality-CNjGxBG0.js +2176 -0
  79. package/dist/cdn/chunks/{quality-DNnYAntR.js.map → quality-CNjGxBG0.js.map} +1 -1
  80. package/dist/cdn/chunks/{renderer-CZKO-Tav.js → renderer-CFkg8h-K.js} +40 -31
  81. package/dist/cdn/chunks/renderer-CFkg8h-K.js.map +1 -0
  82. package/dist/cdn/chunks/{src-DsqSXXjk.js → src-DRpKu4Dy.js} +11 -11
  83. package/dist/cdn/chunks/{src-DsqSXXjk.js.map → src-DRpKu4Dy.js.map} +1 -1
  84. package/dist/cdn/chunks/styles-B7wryV0l.js +3943 -0
  85. package/dist/cdn/chunks/styles-B7wryV0l.js.map +1 -0
  86. package/dist/cdn/chunks/{tiptap-CwScfbsM.js → tiptap-DF9PEiqH.js} +5429 -5373
  87. package/dist/cdn/chunks/tiptap-DF9PEiqH.js.map +1 -0
  88. package/dist/cdn/editor.css +1 -1
  89. package/dist/cdn/editor.js +117 -115
  90. package/dist/cdn/editor.js.map +1 -1
  91. package/dist/{check-BRzXxFHr.js → check-rl7ok6uJ.js} +1 -1
  92. package/dist/{chevron-down-DmEgzmYT.js → chevron-down-BKe__NOD.js} +1 -1
  93. package/dist/{circle-alert-BStvZr3O.js → circle-alert-C8xmpMsK.js} +1 -1
  94. package/dist/{clock-Blwp_1R6.js → clock-BW4JuDCN.js} +1 -1
  95. package/dist/{cloud-_olro76D.js → cloud-BQusL53H.js} +208 -208
  96. package/dist/createLucideIcon-Dx-EjR9r.js +43 -0
  97. package/dist/{cdn/chunks/de-C2wOXoxs.js → de-LsV0u1tP.js} +17 -3
  98. package/dist/{dist-BlG7k25W.js → dist-B5Sov3sS.js} +7 -7
  99. package/dist/dist-BEWiuOMi.js +251 -0
  100. package/dist/{dist-b7Ak-CuM.js → dist-BFmE-7hB.js} +2 -2
  101. package/dist/{dist-o73iaGqy.js → dist-BMoa33wT.js} +2 -2
  102. package/dist/{dist-BctFrpeA.js → dist-BibU4HNl.js} +74 -65
  103. package/dist/{dist-D6x1cQeh.js → dist-BsCGIDSt.js} +103 -102
  104. package/dist/dist-CNLKj9wa.js +5 -0
  105. package/dist/{dist-DULfKmTh.js → dist-CNXDNYQn.js} +729 -695
  106. package/dist/{dist-412xXefB.js → dist-COG3IdPK.js} +3 -3
  107. package/dist/{dist-Cz79qrLL.js → dist-CQZxDvFw.js} +3 -3
  108. package/dist/{dist-BwgjpLfr.js → dist-CRsjOQM-.js} +2 -2
  109. package/dist/dist-CTT6WYJ6.js +134 -0
  110. package/dist/dist-Cqa6aeAJ.js +5 -0
  111. package/dist/{dist-BCQZZUE9.js → dist-SXJJ2v41.js} +2 -2
  112. package/dist/{dist-DhKTdU52.js → dist-itdjZraK.js} +1445 -1420
  113. package/dist/{en-dR7zfNC3.js → en-Bb8X1bOs.js} +17 -1
  114. package/dist/extensions-DwaZAqm6.js +423 -0
  115. package/dist/{image-up-BFPbw_Zq.js → image-up-BwBCmQ4P.js} +1 -1
  116. package/dist/index.d.ts +17 -0
  117. package/dist/{info-B_qLEBN2.js → info-TCn7uWR5.js} +1 -1
  118. package/dist/keys-Cv8-8GsD.js +10 -0
  119. package/dist/{liquid.browser-CVjP5Mex.js → liquid.browser-DZLtv26k.js} +692 -677
  120. package/dist/{list-checks-CGg7JxPm.js → list-checks-CSrOWNgq.js} +1 -1
  121. package/dist/{loader-circle-CDF8eR_Q.js → loader-circle-BLmicnPG.js} +1 -1
  122. package/dist/{message-circle-C3cHsCJl.js → message-circle-C9hHMQCI.js} +1 -1
  123. package/dist/{pt-BR-BZ86xqK6.js → pt-BR-BwJY_cvb.js} +17 -1
  124. package/dist/{refresh-cw-Butml7Q4.js → refresh-cw-D1JQ1LNa.js} +1 -1
  125. package/dist/runtime-dom.esm-bundler-BzuoCyNp.js +523 -0
  126. package/dist/scan-line-DgijVq9y.js +31 -0
  127. package/dist/{send-k7npFJNO.js → send-DjPdq69F.js} +1 -1
  128. package/dist/{shield-check-CV6GbmCu.js → shield-check-Bqluu8FS.js} +1 -1
  129. package/dist/{sparkles-C965Xop4.js → sparkles-M4azPVSP.js} +1 -1
  130. package/dist/style.css +1 -1
  131. package/dist/styles-D7fQ7f_1.js +4164 -0
  132. package/dist/templatical-editor.js +155 -152
  133. package/dist/{text-align-start-Bxnps8fH.js → text-align-start-CMya5pCQ.js} +11 -11
  134. package/dist/{trash-2-DpGb7fIt.js → trash-2-C-81rkLS.js} +1 -1
  135. package/dist/{triangle-alert-BKYElAwz.js → triangle-alert-BuRWnynk.js} +1 -1
  136. package/dist/{upload-BF7sxd1_.js → upload-CWBIoLd4.js} +1 -1
  137. package/dist/{useAliveFlag-BinvbqQR.js → useAliveFlag-CECL_OUb.js} +1 -1
  138. package/dist/{useCloudI18n-L3H2XvdW.js → useCloudI18n-AKCy98qD.js} +2 -2
  139. package/dist/{useEditorCore-DKYZ7aKk.js → useEditorCore-vcWLdnjN.js} +1480 -1310
  140. package/dist/{useI18n-CTs_bP9d.js → useI18n-C-TDeJBt.js} +2 -2
  141. package/dist/{useMergeTag-e3RSY-s3.js → useMergeTag-DSrBY0-2.js} +6 -6
  142. package/dist/usePopoverRoot-DKUDnr55.js +8 -0
  143. package/dist/{vue.runtime.esm-bundler-B2k01iQh.js → vue.runtime.esm-bundler-l0XAqiyv.js} +639 -1151
  144. package/dist/{x-CGjkjdKK.js → x-CQSvXnGR.js} +1 -1
  145. package/package.json +27 -27
  146. package/dist/CloudEditor-DaEfipBn.js +0 -1230
  147. package/dist/CountdownBlock-DO9fziwf.js +0 -92
  148. package/dist/CountdownToolbar-BeII06yJ.js +0 -210
  149. package/dist/ModuleBrowserModal-DsZRr87F.js +0 -198
  150. package/dist/ParagraphEditor-CZ-cmhX3.js +0 -700
  151. package/dist/TitleEditor-DbNOcvhR.js +0 -177
  152. package/dist/cdn/chunks/CloudEditor-BZuzsQOZ.js.map +0 -1
  153. package/dist/cdn/chunks/ParagraphEditor-pGrfSccu.js.map +0 -1
  154. package/dist/cdn/chunks/TitleEditor-BvFbL16O.js.map +0 -1
  155. package/dist/cdn/chunks/blockTypeIcons-Kd1MT0u8.js +0 -22
  156. package/dist/cdn/chunks/de-C2wOXoxs.js.map +0 -1
  157. package/dist/cdn/chunks/draggable-Bci-fq8y.js.map +0 -1
  158. package/dist/cdn/chunks/en-dR7zfNC3.js.map +0 -1
  159. package/dist/cdn/chunks/extensions-CuUjSmuA.js +0 -605
  160. package/dist/cdn/chunks/extensions-CuUjSmuA.js.map +0 -1
  161. package/dist/cdn/chunks/features-DU6lA8l1.js.map +0 -1
  162. package/dist/cdn/chunks/icons-BjHUZZyJ.js.map +0 -1
  163. package/dist/cdn/chunks/liquid.browser-DKKBzRQu.js.map +0 -1
  164. package/dist/cdn/chunks/pt-BR-BZ86xqK6.js.map +0 -1
  165. package/dist/cdn/chunks/quality-DNnYAntR.js +0 -2176
  166. package/dist/cdn/chunks/renderer-CZKO-Tav.js.map +0 -1
  167. package/dist/cdn/chunks/styles-DiAdtiz9.js +0 -3428
  168. package/dist/cdn/chunks/styles-DiAdtiz9.js.map +0 -1
  169. package/dist/cdn/chunks/tiptap-CwScfbsM.js.map +0 -1
  170. package/dist/createLucideIcon-CmPAC-gt.js +0 -43
  171. package/dist/dist-BNEdeWub.js +0 -5
  172. package/dist/dist-Cgry6fNv.js +0 -382
  173. package/dist/dist-u0iIJH3V.js +0 -5
  174. package/dist/extensions-XPlNAKIL.js +0 -1720
  175. package/dist/keys-mFiJ5N0_.js +0 -10
  176. package/dist/scan-line-XYEqim_E.js +0 -25
  177. package/dist/styles-D0RCAWhB.js +0 -3647
  178. package/dist/usePopoverRoot-DVh7NY1q.js +0 -8
@@ -1,5 +1,5 @@
1
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 ee, b as T, c as E, ct as D, d as te, et as ne, f as O, g as k, h as A, it as j, k as re, l as M, m as N, n as ie, nt as P, o as ae, ot as F, p as I, rt as oe, s as se, st as L, t as ce, u as R, v as z, w as le, x as B, y as V, z as H } from "./draggable-Bci-fq8y.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 ee, ct as D, d as te, et as ne, f as O, g as k, h as A, it as j, k as re, l as M, m as N, n as ie, nt as P, o as ae, ot as F, p as I, rt as oe, s as se, st as L, t as ce, u as R, v as z, w as le, x as B, y as V, z as H } from "./draggable-kG-D5Xsm.js";
3
3
  //#region src/constants/timeouts.ts
4
4
  var ue = 3e4, de = 4e3, fe = 5e3, pe = {
5
5
  1: 36,
@@ -432,45 +432,54 @@ var dt = {
432
432
  handlebars: "{{",
433
433
  mailchimp: "*|",
434
434
  ampscript: "%%="
435
+ }, pt = {
436
+ liquid: "}}",
437
+ handlebars: "}}",
438
+ mailchimp: "|*",
439
+ ampscript: "=%%"
435
440
  };
436
- function pt(e) {
441
+ function mt(e) {
437
442
  for (let t of Object.keys(dt)) if (dt[t].value.source === e.value.source) return ft[t];
438
443
  return null;
439
444
  }
440
- function mt(e) {
445
+ function ht(e) {
446
+ for (let t of Object.keys(dt)) if (dt[t].value.source === e.value.source) return pt[t];
447
+ return null;
448
+ }
449
+ function gt(e) {
441
450
  return e ? typeof e == "string" ? dt[e] ?? dt.liquid : e : dt.liquid;
442
451
  }
443
- function ht(e) {
452
+ function _t(e) {
444
453
  let t = e.source, n = e.flags.replace("g", "");
445
454
  return RegExp(`^${t}$`, n);
446
455
  }
447
- function gt(e, t) {
456
+ function vt(e, t) {
448
457
  let n = e?.trim() || "";
449
- return ht(t.logic).test(n) ? !1 : ht(t.value).test(n);
458
+ return !_t(t.logic).test(n) && _t(t.value).test(n);
450
459
  }
451
- function _t(e, t) {
460
+ function yt(e, t) {
452
461
  let n = t.find((t) => t.value === e);
453
462
  return n ? n.label : e;
454
463
  }
455
- function vt(e, t) {
456
- return Ct(e, "data-merge-tag", (e) => _t(e, t));
464
+ function bt(e, t) {
465
+ return Tt(e, "data-merge-tag", (e) => yt(e, t));
457
466
  }
458
- function yt(e, t) {
467
+ function xt(e, t) {
459
468
  if (!e) return !1;
460
469
  let n = new RegExp(t.value.source, t.value.flags), r = new RegExp(t.logic.source, t.logic.flags);
461
470
  return n.test(e) || r.test(e);
462
471
  }
463
- function bt(e, t) {
464
- return ht(t.logic).test(e?.trim() || "");
472
+ function St(e, t) {
473
+ return _t(t.logic).test(e?.trim() || "");
465
474
  }
466
- function xt(e, t) {
475
+ function Ct(e, t) {
467
476
  let n = new RegExp(t.logic.source, t.logic.flags.replace("g", "")), r = e.match(n);
468
477
  return r && r[1] ? r[1].toUpperCase() : e;
469
478
  }
470
- function St(e, t) {
471
- return Ct(e, "data-logic-merge-tag", (e) => xt(e, t));
479
+ function wt(e, t) {
480
+ return Tt(e, "data-logic-merge-tag", (e) => Ct(e, t));
472
481
  }
473
- function Ct(e, t, n) {
482
+ function Tt(e, t, n) {
474
483
  let r = RegExp(`(?:^|\\s)${t}="([^"<>]*)"`), i = "", a = 0;
475
484
  for (; a < e.length;) {
476
485
  let t = e.indexOf("<span", a);
@@ -505,7 +514,7 @@ function Ct(e, t, n) {
505
514
  }
506
515
  //#endregion
507
516
  //#region ../types/src/config.ts
508
- var wt = class extends Error {
517
+ var Et = class extends Error {
509
518
  statusCode;
510
519
  constructor(e, t) {
511
520
  super(e), this.statusCode = t, this.name = "SdkError";
@@ -522,10 +531,10 @@ var wt = class extends Error {
522
531
  };
523
532
  //#endregion
524
533
  //#region ../core/src/editor.ts
525
- function Tt(e) {
534
+ function Dt(e) {
526
535
  return e === "1" ? 1 : e === "3" ? 3 : 2;
527
536
  }
528
- function Et(e) {
537
+ function Ot(e) {
529
538
  let t = S({
530
539
  content: e.content ?? We(e.defaultFontFamily, e.templateDefaults),
531
540
  selectedBlockId: null,
@@ -611,17 +620,19 @@ function Et(e) {
611
620
  }, t.isDirty = !0;
612
621
  }
613
622
  function _(e, n, r = 0, a) {
614
- if (n) {
615
- if (s(n)) return;
616
- let o = i(t.content.blocks, n);
617
- if (o && o.type === "section") {
618
- if (r < 0 || r >= Tt(o.columns)) return;
619
- o.children[r] = o.children[r] || [];
620
- let t = o.children[r];
621
- a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
622
- }
623
- } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
624
- t.isDirty = !0;
623
+ if (!(n && e.type === "section")) {
624
+ if (n) {
625
+ if (s(n)) return;
626
+ let o = i(t.content.blocks, n);
627
+ if (o && o.type === "section") {
628
+ if (r < 0 || r >= Dt(o.columns)) return;
629
+ o.children[r] = o.children[r] || [];
630
+ let t = o.children[r];
631
+ a !== void 0 && a < t.length ? t.splice(a, 0, e) : t.push(e);
632
+ }
633
+ } else a !== void 0 && a < t.content.blocks.length ? t.content.blocks.splice(a, 0, e) : t.content.blocks.push(e);
634
+ t.isDirty = !0;
635
+ }
625
636
  }
626
637
  function v(e) {
627
638
  if (s(e)) return;
@@ -643,11 +654,11 @@ function Et(e) {
643
654
  let c = o(t.content.blocks, e);
644
655
  if (!c) return;
645
656
  let l = c.blocks.findIndex((t) => t.id === e);
646
- if (l === -1) return;
657
+ if (l === -1 || r && c.blocks[l].type === "section") return;
647
658
  let u;
648
659
  if (r) {
649
660
  let e = i(t.content.blocks, r);
650
- if (!e || e.type !== "section" || a < 0 || a >= Tt(e.columns)) return;
661
+ if (!e || e.type !== "section" || a < 0 || a >= Dt(e.columns)) return;
651
662
  e.children[a] = e.children[a] || [], u = e.children[a];
652
663
  } else u = t.content.blocks;
653
664
  let [d] = c.blocks.splice(l, 1);
@@ -678,9 +689,9 @@ function Et(e) {
678
689
  }
679
690
  //#endregion
680
691
  //#region ../core/src/history.ts
681
- var Dt = 50, Ot = 300, kt = 1500;
682
- function At(e) {
683
- let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = Dt } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
692
+ var kt = 50, At = 300, jt = 1500;
693
+ function Mt(e) {
694
+ let { content: t, setContent: n, isRemoteOperation: r, maxSize: i = kt } = e, a = C([]), o = C([]), s = C(!1), c = null, l = null, u = y(() => a.value.length > 0), d = y(() => o.value.length > 0);
684
695
  function f() {
685
696
  return ut(t.value);
686
697
  }
@@ -698,21 +709,21 @@ function At(e) {
698
709
  if (l && l.blockId === e) {
699
710
  clearTimeout(l.timeoutId), l.timeoutId = setTimeout(() => {
700
711
  l = null;
701
- }, Ot);
712
+ }, At);
702
713
  return;
703
714
  }
704
715
  m(), p(f()), o.value = [], l = {
705
716
  blockId: e,
706
717
  timeoutId: setTimeout(() => {
707
718
  l = null;
708
- }, Ot)
719
+ }, At)
709
720
  };
710
721
  }
711
722
  }
712
723
  function _() {
713
724
  s.value = !0, c && clearTimeout(c), c = setTimeout(() => {
714
725
  s.value = !1, c = null;
715
- }, kt);
726
+ }, jt);
716
727
  }
717
728
  function v() {
718
729
  if (a.value.length === 0) return;
@@ -746,7 +757,7 @@ function At(e) {
746
757
  }
747
758
  //#endregion
748
759
  //#region ../core/src/block-actions.ts
749
- function jt(e) {
760
+ function Nt(e) {
750
761
  e.type === "table" ? e.rows = e.rows.map((e) => ({
751
762
  ...e,
752
763
  id: W(),
@@ -762,7 +773,7 @@ function jt(e) {
762
773
  id: W()
763
774
  })));
764
775
  }
765
- function Mt(e) {
776
+ function Pt(e) {
766
777
  let { addBlock: t, removeBlock: n, updateBlock: r, selectBlock: i, findBlockLocation: a } = e;
767
778
  function o(n, r, a) {
768
779
  let o = ct(n, e.blockDefaults);
@@ -770,9 +781,9 @@ function Mt(e) {
770
781
  }
771
782
  function s(e, n, r) {
772
783
  let o = JSON.parse(JSON.stringify(e));
773
- if (o.id = W(), jt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
784
+ if (o.id = W(), Nt(o), o.type === "section" && (o.children = o.children.map((e) => e.map((e) => {
774
785
  let t = JSON.parse(JSON.stringify(e));
775
- return t.id = W(), jt(t), t;
786
+ return t.id = W(), Nt(t), t;
776
787
  }))), n !== void 0 || r !== void 0) t(o, n, r);
777
788
  else {
778
789
  let i = a?.(e.id) ?? null;
@@ -795,7 +806,7 @@ function Mt(e) {
795
806
  }
796
807
  //#endregion
797
808
  //#region ../core/src/auto-save.ts
798
- function Nt(e) {
809
+ function Ft(e) {
799
810
  let { content: t, isDirty: n, onChange: r, debounce: i = 1e3, enabled: a = !0 } = e, o = null, s = !1;
800
811
  function c() {
801
812
  return typeof a == "function" ? a() : a;
@@ -817,7 +828,7 @@ function Nt(e) {
817
828
  o = null, c() && !s && n() && r(JSON.parse(JSON.stringify(t.value)));
818
829
  }, i));
819
830
  }
820
- let m = ee(t, () => {
831
+ let m = T(t, () => {
821
832
  c() && !s && n() && p();
822
833
  }, { deep: !0 });
823
834
  function h() {
@@ -833,7 +844,7 @@ function Nt(e) {
833
844
  }
834
845
  //#endregion
835
846
  //#region ../core/src/condition-preview.ts
836
- function Pt(e) {
847
+ function It(e) {
837
848
  let t = S(/* @__PURE__ */ new Set()), n = y(() => t.size > 0);
838
849
  function r(e) {
839
850
  return t.has(e);
@@ -853,7 +864,7 @@ function Pt(e) {
853
864
  }
854
865
  //#endregion
855
866
  //#region ../core/src/data-source-fetch.ts
856
- function Ft(e) {
867
+ function Lt(e) {
857
868
  let t = C(!1), n = C(!1), r = y(() => !!e.definition.value?.dataSource), i = y(() => r.value && !e.block.value.dataSourceFetched);
858
869
  async function a() {
859
870
  let r = e.definition.value;
@@ -885,7 +896,7 @@ function Ft(e) {
885
896
  }
886
897
  //#endregion
887
898
  //#region ../core/src/history-interceptor.ts
888
- function It(e, t) {
899
+ function Rt(e, t) {
889
900
  let n = e.addBlock, r = e.removeBlock, i = e.moveBlock, a = e.updateBlock, o = e.updateSettings;
890
901
  e.addBlock = (r, i, a, o) => {
891
902
  i && e.isBlockLocked(i) || (t.record(), n(r, i, a, o));
@@ -901,10 +912,10 @@ function It(e, t) {
901
912
  }
902
913
  //#endregion
903
914
  //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.39_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
904
- function Lt(e, t) {
915
+ function zt(e, t) {
905
916
  return s() ? (l(e, t), !0) : !1;
906
917
  }
907
- function Rt() {
918
+ function Bt() {
908
919
  let e = /* @__PURE__ */ new Set(), t = (t) => {
909
920
  e.delete(t);
910
921
  };
@@ -912,7 +923,7 @@ function Rt() {
912
923
  on: (n) => {
913
924
  e.add(n);
914
925
  let r = () => t(n);
915
- return Lt(r), { off: r };
926
+ return zt(r), { off: r };
916
927
  },
917
928
  off: t,
918
929
  trigger: (...t) => Promise.all(Array.from(e).map((e) => e(...t))),
@@ -921,18 +932,18 @@ function Rt() {
921
932
  }
922
933
  };
923
934
  }
924
- var zt = /* @__PURE__ */ new WeakMap(), Bt = (...e) => {
935
+ var Vt = /* @__PURE__ */ new WeakMap(), Ht = (...e) => {
925
936
  let t = e[0], n = _()?.proxy ?? s();
926
937
  if (n == null && !le()) throw Error("injectLocal must be called in setup");
927
- return n && zt.has(n) && t in zt.get(n) ? zt.get(n)[t] : v(...e);
928
- }, Vt = typeof window < "u" && typeof document < "u";
938
+ return n && Vt.has(n) && t in Vt.get(n) ? Vt.get(n)[t] : v(...e);
939
+ }, Ut = typeof window < "u" && typeof document < "u";
929
940
  typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
930
- var Ht = (e) => e != null, Ut = Object.prototype.toString, Wt = (e) => Ut.call(e) === "[object Object]", Gt = () => {}, Kt = (e, t) => Object.hasOwn(e, t), qt = /* @__PURE__ */ Jt();
931
- function Jt() {
941
+ var Wt = (e) => e != null, Gt = Object.prototype.toString, Kt = (e) => Gt.call(e) === "[object Object]", qt = () => {}, Jt = (e, t) => Object.hasOwn(e, t), Yt = /* @__PURE__ */ Xt();
942
+ function Xt() {
932
943
  var e, t;
933
- return Vt && !!(!((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));
944
+ return Ut && !!(!((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));
934
945
  }
935
- function Yt(e, t) {
946
+ function Zt(e, t) {
936
947
  function n(...n) {
937
948
  return new Promise((r, i) => {
938
949
  Promise.resolve(e(() => t.apply(this, n), {
@@ -944,10 +955,10 @@ function Yt(e, t) {
944
955
  }
945
956
  return n;
946
957
  }
947
- var Xt = (e) => e();
948
- function Zt(e, t = {}) {
949
- let n, r, i = Gt, a = (e) => {
950
- clearTimeout(e), i(), i = Gt;
958
+ var Qt = (e) => e();
959
+ function $t(e, t = {}) {
960
+ let n, r, i = qt, a = (e) => {
961
+ clearTimeout(e), i(), i = qt;
951
962
  }, o;
952
963
  return (s) => {
953
964
  let c = P(e), l = P(t.maxWait);
@@ -960,7 +971,7 @@ function Zt(e, t = {}) {
960
971
  });
961
972
  };
962
973
  }
963
- function Qt(e) {
974
+ function en(e) {
964
975
  let t;
965
976
  function n() {
966
977
  return t ||= e(), t;
@@ -970,32 +981,32 @@ function Qt(e) {
970
981
  t = void 0, e && await e;
971
982
  }, n;
972
983
  }
973
- function $t(e) {
984
+ function tn(e) {
974
985
  return e.endsWith("rem") ? Number.parseFloat(e) * 16 : Number.parseFloat(e);
975
986
  }
976
- function en(e) {
987
+ function nn(e) {
977
988
  return Array.isArray(e) ? e : [e];
978
989
  }
979
- function tn(e) {
990
+ function rn(e) {
980
991
  return e || _();
981
992
  }
982
- function nn(e, t = 200, n = {}) {
983
- return Yt(Zt(t, n), e);
993
+ function an(e, t = 200, n = {}) {
994
+ return Zt($t(t, n), e);
984
995
  }
985
- function rn(e, t = 200, n = {}) {
986
- let r = C(P(e)), i = nn(() => {
996
+ function on(e, t = 200, n = {}) {
997
+ let r = C(P(e)), i = an(() => {
987
998
  r.value = e.value;
988
999
  }, t, n);
989
1000
  return H(e, () => i()), g(r);
990
1001
  }
991
- function an(e, t, n = {}) {
992
- let { eventFilter: r = Xt, ...i } = n;
993
- return H(e, Yt(r, t), i);
1002
+ function sn(e, t, n = {}) {
1003
+ let { eventFilter: r = Qt, ...i } = n;
1004
+ return H(e, Zt(r, t), i);
994
1005
  }
995
- function on(e, t = !0, n) {
996
- tn(n) ? r(e, n) : t ? e() : m(e);
1006
+ function cn(e, t = !0, n) {
1007
+ rn(n) ? r(e, n) : t ? e() : m(e);
997
1008
  }
998
- function sn(e, t = 1e3, r = {}) {
1009
+ function ln(e, t = 1e3, r = {}) {
999
1010
  let { immediate: i = !0, immediateCallback: a = !1 } = r, o = null, s = n(!1);
1000
1011
  function c() {
1001
1012
  o &&= (clearInterval(o), null);
@@ -1007,15 +1018,15 @@ function sn(e, t = 1e3, r = {}) {
1007
1018
  let n = P(t);
1008
1019
  n <= 0 || (s.value = !0, a && e(), c(), s.value && (o = setInterval(e, n)));
1009
1020
  }
1010
- return i && Vt && d(), (u(t) || typeof t == "function") && Lt(H(t, () => {
1011
- s.value && Vt && d();
1012
- })), Lt(l), {
1021
+ return i && Ut && d(), (u(t) || typeof t == "function") && zt(H(t, () => {
1022
+ s.value && Ut && d();
1023
+ })), zt(l), {
1013
1024
  isActive: g(s),
1014
1025
  pause: l,
1015
1026
  resume: d
1016
1027
  };
1017
1028
  }
1018
- function cn(e, t, r = {}) {
1029
+ function un(e, t, r = {}) {
1019
1030
  let { immediate: i = !0, immediateCallback: a = !1 } = r, o = n(!1), s;
1020
1031
  function c() {
1021
1032
  s &&= (clearTimeout(s), void 0);
@@ -1028,13 +1039,13 @@ function cn(e, t, r = {}) {
1028
1039
  o.value = !1, s = void 0, e(...n);
1029
1040
  }, P(t));
1030
1041
  }
1031
- return i && (o.value = !0, Vt && u()), Lt(l), {
1042
+ return i && (o.value = !0, Ut && u()), zt(l), {
1032
1043
  isPending: g(o),
1033
1044
  start: u,
1034
1045
  stop: l
1035
1046
  };
1036
1047
  }
1037
- function ln(e = !1, t = {}) {
1048
+ function dn(e = !1, t = {}) {
1038
1049
  let { truthyValue: r = !0, falsyValue: i = !1 } = t, a = u(e), o = n(e);
1039
1050
  function s(e) {
1040
1051
  if (arguments.length) return o.value = e, o.value;
@@ -1045,14 +1056,14 @@ function ln(e = !1, t = {}) {
1045
1056
  }
1046
1057
  return a ? s : [o, s];
1047
1058
  }
1048
- function un(e, t, n = {}) {
1059
+ function fn(e, t, n = {}) {
1049
1060
  let { debounce: r = 0, maxWait: i = void 0, ...a } = n;
1050
- return an(e, t, {
1061
+ return sn(e, t, {
1051
1062
  ...a,
1052
- eventFilter: Zt(r, { maxWait: i })
1063
+ eventFilter: $t(r, { maxWait: i })
1053
1064
  });
1054
1065
  }
1055
- function dn(e, t, n) {
1066
+ function pn(e, t, n) {
1056
1067
  return H(e, t, {
1057
1068
  ...n,
1058
1069
  immediate: !0
@@ -1060,41 +1071,41 @@ function dn(e, t, n) {
1060
1071
  }
1061
1072
  //#endregion
1062
1073
  //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.39_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
1063
- var fn = Vt ? window : void 0, pn = Vt ? window.document : void 0, mn = Vt ? window.navigator : void 0;
1074
+ var mn = Ut ? window : void 0, hn = Ut ? window.document : void 0, gn = Ut ? window.navigator : void 0;
1064
1075
  function K(e) {
1065
1076
  let t = P(e);
1066
1077
  return t?.$el ?? t;
1067
1078
  }
1068
1079
  function q(...e) {
1069
1080
  let t = (e, t, n, r) => (e.addEventListener(t, n, r), () => e.removeEventListener(t, n, r)), n = O(() => {
1070
- let t = en(P(e[0])).filter((e) => e != null);
1081
+ let t = nn(P(e[0])).filter((e) => e != null);
1071
1082
  return t.every((e) => typeof e != "string") ? t : void 0;
1072
1083
  });
1073
- return dn(() => [
1074
- n.value?.map((e) => K(e)) ?? [fn].filter((e) => e != null),
1075
- en(P(n.value ? e[1] : e[0])),
1076
- en(j(n.value ? e[2] : e[1])),
1084
+ return pn(() => [
1085
+ n.value?.map((e) => K(e)) ?? [mn].filter((e) => e != null),
1086
+ nn(P(n.value ? e[1] : e[0])),
1087
+ nn(j(n.value ? e[2] : e[1])),
1077
1088
  P(n.value ? e[3] : e[2])
1078
1089
  ], ([e, n, r, i], a, o) => {
1079
1090
  if (!e?.length || !n?.length || !r?.length) return;
1080
- let s = Wt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
1091
+ let s = Kt(i) ? { ...i } : i, c = e.flatMap((e) => n.flatMap((n) => r.map((r) => t(e, n, r, s))));
1081
1092
  o(() => {
1082
1093
  c.forEach((e) => e());
1083
1094
  });
1084
1095
  }, { flush: "post" });
1085
1096
  }
1086
- var hn = !1;
1087
- function gn(e, t, n = {}) {
1088
- let { window: r = fn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
1097
+ var _n = !1;
1098
+ function vn(e, t, n = {}) {
1099
+ let { window: r = mn, ignore: i = [], capture: a = !0, detectIframe: o = !1, controls: s = !1 } = n;
1089
1100
  if (!r) return s ? {
1090
- stop: Gt,
1091
- cancel: Gt,
1092
- trigger: Gt
1093
- } : Gt;
1094
- if (qt && !hn) {
1095
- hn = !0;
1101
+ stop: qt,
1102
+ cancel: qt,
1103
+ trigger: qt
1104
+ } : qt;
1105
+ if (Yt && !_n) {
1106
+ _n = !0;
1096
1107
  let e = { passive: !0 };
1097
- Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", Gt, e)), r.document.documentElement.addEventListener("click", Gt, e);
1108
+ Array.from(r.document.body.children).forEach((t) => t.addEventListener("click", qt, e)), r.document.documentElement.addEventListener("click", qt, e);
1098
1109
  }
1099
1110
  let c = !0, l = (e) => P(i).some((t) => {
1100
1111
  if (typeof t == "string") return Array.from(r.document.querySelectorAll(t)).some((t) => t === e.target || e.composedPath().includes(t));
@@ -1151,21 +1162,21 @@ function gn(e, t, n = {}) {
1151
1162
  }
1152
1163
  } : h;
1153
1164
  }
1154
- function _n() {
1165
+ function yn() {
1155
1166
  let e = n(!1), t = _();
1156
1167
  return t && r(() => {
1157
1168
  e.value = !0;
1158
1169
  }, t), e;
1159
1170
  }
1160
1171
  /* @__NO_SIDE_EFFECTS__ */
1161
- function vn(e) {
1162
- return _n(), O(() => !!e());
1172
+ function bn(e) {
1173
+ return yn(), O(() => !!e());
1163
1174
  }
1164
- function yn(e, t, n = {}) {
1165
- let { window: r = fn, ...i } = n, a, o = /* @__PURE__ */ vn(() => r && "MutationObserver" in r), s = () => {
1175
+ function xn(e, t, n = {}) {
1176
+ let { window: r = mn, ...i } = n, a, o = /* @__PURE__ */ bn(() => r && "MutationObserver" in r), s = () => {
1166
1177
  a &&= (a.disconnect(), void 0);
1167
1178
  }, c = H(O(() => {
1168
- let t = en(P(e)).map(K).filter(Ht);
1179
+ let t = nn(P(e)).map(K).filter(Wt);
1169
1180
  return new Set(t);
1170
1181
  }), (e) => {
1171
1182
  s(), o.value && e.size && (a = new MutationObserver(t), e.forEach((e) => a.observe(e, i)));
@@ -1175,25 +1186,25 @@ function yn(e, t, n = {}) {
1175
1186
  }), l = () => a?.takeRecords(), u = () => {
1176
1187
  c(), s();
1177
1188
  };
1178
- return Lt(u), {
1189
+ return zt(u), {
1179
1190
  isSupported: o,
1180
1191
  stop: u,
1181
1192
  takeRecords: l
1182
1193
  };
1183
1194
  }
1184
- var bn = Symbol("vueuse-ssr-width");
1195
+ var Sn = Symbol("vueuse-ssr-width");
1185
1196
  /* @__NO_SIDE_EFFECTS__ */
1186
- function xn() {
1187
- let e = le() ? Bt(bn, null) : null;
1197
+ function Cn() {
1198
+ let e = le() ? Ht(Sn, null) : null;
1188
1199
  return typeof e == "number" ? e : void 0;
1189
1200
  }
1190
- function Sn(e, t = {}) {
1191
- let { window: r = fn, ssrWidth: a = /* @__PURE__ */ xn() } = t, o = /* @__PURE__ */ vn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
1201
+ function wn(e, t = {}) {
1202
+ let { window: r = mn, ssrWidth: a = /* @__PURE__ */ Cn() } = t, o = /* @__PURE__ */ bn(() => r && "matchMedia" in r && typeof r.matchMedia == "function"), s = n(typeof a == "number"), c = n(), l = n(!1);
1192
1203
  return i(() => {
1193
1204
  if (s.value) {
1194
1205
  s.value = !o.value, l.value = P(e).split(",").some((e) => {
1195
1206
  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);
1196
- return n && i && (i = a >= $t(n[1])), r && i && (i = a <= $t(r[1])), t ? !i : i;
1207
+ return n && i && (i = a >= tn(n[1])), r && i && (i = a <= tn(r[1])), t ? !i : i;
1197
1208
  });
1198
1209
  return;
1199
1210
  }
@@ -1202,12 +1213,12 @@ function Sn(e, t = {}) {
1202
1213
  l.value = e.matches;
1203
1214
  }, { passive: !0 }), O(() => l.value);
1204
1215
  }
1205
- function Cn(e, t = {}) {
1206
- let { controls: r = !1, navigator: i = mn } = t, a = /* @__PURE__ */ vn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
1216
+ function Tn(e, t = {}) {
1217
+ let { controls: r = !1, navigator: i = gn } = t, a = /* @__PURE__ */ bn(() => i && "permissions" in i), o = n(), s = typeof e == "string" ? { name: e } : e, c = n(), l = () => {
1207
1218
  c.value = o.value?.state ?? "prompt";
1208
1219
  };
1209
1220
  q(o, "change", l, { passive: !0 });
1210
- let u = Qt(async () => {
1221
+ let u = en(async () => {
1211
1222
  if (a.value) {
1212
1223
  if (!o.value) try {
1213
1224
  o.value = await i.permissions.query(s);
@@ -1225,8 +1236,8 @@ function Cn(e, t = {}) {
1225
1236
  query: u
1226
1237
  } : c;
1227
1238
  }
1228
- function wn(e = {}) {
1229
- let { navigator: t = mn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ vn(() => t && "clipboard" in t), c = Cn("clipboard-read"), l = Cn("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = cn(() => f.value = !1, a, { immediate: !1 }), h = 0;
1239
+ function En(e = {}) {
1240
+ let { navigator: t = gn, read: r = !1, source: i, copiedDuring: a = 1500, legacy: o = !1 } = e, s = /* @__PURE__ */ bn(() => t && "clipboard" in t), c = Tn("clipboard-read"), l = Tn("clipboard-write"), u = O(() => s.value || o), d = n(""), f = n(!1), p = n(!1), m = un(() => f.value = !1, a, { immediate: !1 }), h = 0;
1230
1241
  async function _() {
1231
1242
  let e = !(s.value && S(c.value));
1232
1243
  if (!e) try {
@@ -1278,15 +1289,15 @@ function wn(e = {}) {
1278
1289
  copy: v
1279
1290
  };
1280
1291
  }
1281
- function Tn(e, t = {}) {
1292
+ function Dn(e, t = {}) {
1282
1293
  let r = n(!1), i = n(null), a = 0, o = !0;
1283
- if (Vt) {
1294
+ if (Ut) {
1284
1295
  let n = typeof t == "function" ? { onDrop: t } : t, s = n.multiple ?? !0, c = n.preventDefaultForUnhandled ?? !1, l = (e) => {
1285
1296
  let t = Array.from(e.dataTransfer?.files ?? []);
1286
1297
  return t.length === 0 ? null : s ? t : [t[0]];
1287
1298
  }, u = (e) => {
1288
1299
  let t = j(n.dataTypes);
1289
- return typeof t == "function" ? t(e) : t?.length ? e.length === 0 ? !1 : e.every((e) => t.some((t) => e.includes(t))) : !0;
1300
+ return typeof t == "function" ? t(e) : !t?.length || e.length !== 0 && e.every((e) => t.some((t) => e.includes(t)));
1290
1301
  }, d = (e) => n.checkValidity ? n.checkValidity(e) : u(Array.from(e ?? []).map((e) => e.type)) && (s || e.length <= 1), f = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !("chrome" in window), p = (e, t) => {
1291
1302
  let s = e.dataTransfer?.items;
1292
1303
  if (o = (s && d(s)) ?? !1, c && e.preventDefault(), !f() && !o) {
@@ -1323,8 +1334,8 @@ function Tn(e, t = {}) {
1323
1334
  isOverDropZone: r
1324
1335
  };
1325
1336
  }
1326
- function En(e, t, n = {}) {
1327
- let { window: r = fn, ...i } = n, a, o = /* @__PURE__ */ vn(() => r && "ResizeObserver" in r), s = () => {
1337
+ function On(e, t, n = {}) {
1338
+ let { window: r = mn, ...i } = n, a, o = /* @__PURE__ */ bn(() => r && "ResizeObserver" in r), s = () => {
1328
1339
  a &&= (a.disconnect(), void 0);
1329
1340
  }, c = H(O(() => {
1330
1341
  let t = P(e);
@@ -1340,12 +1351,12 @@ function En(e, t, n = {}) {
1340
1351
  }), l = () => {
1341
1352
  s(), c();
1342
1353
  };
1343
- return Lt(l), {
1354
+ return zt(l), {
1344
1355
  isSupported: o,
1345
1356
  stop: l
1346
1357
  };
1347
1358
  }
1348
- function Dn(e, t = {}) {
1359
+ function kn(e, t = {}) {
1349
1360
  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);
1350
1361
  function g() {
1351
1362
  let t = K(e);
@@ -1359,10 +1370,10 @@ function Dn(e, t = {}) {
1359
1370
  function _() {
1360
1371
  s === "sync" ? g() : s === "next-frame" && requestAnimationFrame(() => g());
1361
1372
  }
1362
- return En(e, _), H(() => K(e), (e) => !e && _()), yn(e, _, { attributeFilter: ["style", "class"] }), a && q("scroll", _, {
1373
+ return On(e, _), H(() => K(e), (e) => !e && _()), xn(e, _, { attributeFilter: ["style", "class"] }), a && q("scroll", _, {
1363
1374
  capture: !0,
1364
1375
  passive: !0
1365
- }), i && q("resize", _, { passive: !0 }), on(() => {
1376
+ }), i && q("resize", _, { passive: !0 }), cn(() => {
1366
1377
  o && _();
1367
1378
  }), {
1368
1379
  height: c,
@@ -1376,8 +1387,8 @@ function Dn(e, t = {}) {
1376
1387
  update: _
1377
1388
  };
1378
1389
  }
1379
- function On(e, t, r = {}) {
1380
- let { root: i, rootMargin: a, threshold: o = 0, window: s = fn, immediate: c = !0 } = r, l = /* @__PURE__ */ vn(() => s && "IntersectionObserver" in s), u = O(() => en(P(e)).map(K).filter(Ht)), d = Gt, f = n(c), p = l.value ? H(() => [
1390
+ function An(e, t, r = {}) {
1391
+ let { root: i, rootMargin: a, threshold: o = 0, window: s = mn, immediate: c = !0 } = r, l = /* @__PURE__ */ bn(() => s && "IntersectionObserver" in s), u = O(() => nn(P(e)).map(K).filter(Wt)), d = qt, f = n(c), p = l.value ? H(() => [
1381
1392
  u.value,
1382
1393
  K(i),
1383
1394
  P(a),
@@ -1390,15 +1401,15 @@ function On(e, t, r = {}) {
1390
1401
  threshold: o
1391
1402
  });
1392
1403
  e.forEach((e) => e && i.observe(e)), d = () => {
1393
- i.disconnect(), d = Gt;
1404
+ i.disconnect(), d = qt;
1394
1405
  };
1395
1406
  }, {
1396
1407
  immediate: c,
1397
1408
  flush: "post"
1398
- }) : Gt, m = () => {
1409
+ }) : qt, m = () => {
1399
1410
  d(), p(), f.value = !1;
1400
1411
  };
1401
- return Lt(m), {
1412
+ return zt(m), {
1402
1413
  isSupported: l,
1403
1414
  isActive: f,
1404
1415
  pause() {
@@ -1410,21 +1421,21 @@ function On(e, t, r = {}) {
1410
1421
  stop: m
1411
1422
  };
1412
1423
  }
1413
- var kn = {
1424
+ var jn = {
1414
1425
  multiple: !0,
1415
1426
  accept: "*",
1416
1427
  reset: !1,
1417
1428
  directory: !1
1418
1429
  };
1419
- function An(e) {
1430
+ function Mn(e) {
1420
1431
  if (!e) return null;
1421
1432
  if (e instanceof FileList) return e;
1422
1433
  let t = new DataTransfer();
1423
1434
  for (let n of e) t.items.add(n);
1424
1435
  return t.files;
1425
1436
  }
1426
- function jn(e = {}) {
1427
- let { document: t = pn } = e, n = C(An(e.initialFiles)), { on: r, trigger: a } = Rt(), { on: o, trigger: s } = Rt(), c = O(() => {
1437
+ function Nn(e = {}) {
1438
+ let { document: t = hn } = e, n = C(Mn(e.initialFiles)), { on: r, trigger: a } = Bt(), { on: o, trigger: s } = Bt(), c = O(() => {
1428
1439
  let r = K(e.input) ?? (t ? t.createElement("input") : void 0);
1429
1440
  return r && (r.type = "file", r.onchange = (e) => {
1430
1441
  n.value = e.target.files, a(n.value);
@@ -1435,7 +1446,7 @@ function jn(e = {}) {
1435
1446
  n.value = null, c.value && c.value.value && (c.value.value = "", a(null));
1436
1447
  }, u = (e) => {
1437
1448
  let t = c.value;
1438
- t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Kt(e, "capture") && (t.capture = P(e.capture)));
1449
+ t && (t.multiple = P(e.multiple), t.accept = P(e.accept), t.webkitdirectory = P(e.directory), Jt(e, "capture") && (t.capture = P(e.capture)));
1439
1450
  };
1440
1451
  return i(() => {
1441
1452
  u(e);
@@ -1445,7 +1456,7 @@ function jn(e = {}) {
1445
1456
  let n = c.value;
1446
1457
  if (!n) return;
1447
1458
  let r = {
1448
- ...kn,
1459
+ ...jn,
1449
1460
  ...e,
1450
1461
  ...t
1451
1462
  };
@@ -1458,26 +1469,26 @@ function jn(e = {}) {
1458
1469
  }
1459
1470
  //#endregion
1460
1471
  //#region src/utils/activeEditorTracker.ts
1461
- var Mn = /* @__PURE__ */ new Set(), Nn = 0, Pn = 0;
1462
- function Fn() {
1463
- let e = ++Pn;
1464
- return Mn.add(e), Nn === 0 && (Nn = e), {
1472
+ var Pn = /* @__PURE__ */ new Set(), Fn = 0, In = 0;
1473
+ function Ln() {
1474
+ let e = ++In;
1475
+ return Pn.add(e), Fn === 0 && (Fn = e), {
1465
1476
  id: e,
1466
- isActive: () => Mn.size <= 1 || Nn === e,
1477
+ isActive: () => Pn.size <= 1 || Fn === e,
1467
1478
  claim: () => {
1468
- Nn = e;
1479
+ Fn = e;
1469
1480
  },
1470
1481
  dispose: () => {
1471
- if (Mn.delete(e), Nn === e) {
1472
- let e = Array.from(Mn);
1473
- Nn = e[e.length - 1] ?? 0;
1482
+ if (Pn.delete(e), Fn === e) {
1483
+ let e = Array.from(Pn);
1484
+ Fn = e[e.length - 1] ?? 0;
1474
1485
  }
1475
1486
  }
1476
1487
  };
1477
1488
  }
1478
1489
  //#endregion
1479
1490
  //#region src/keys.ts
1480
- var In = Symbol("translations"), Ln = Symbol("editor"), Rn = Symbol("history"), zn = Symbol("blockActions"), Bn = Symbol("conditionPreview"), Vn = Symbol("fontsManager"), Hn = Symbol("themeStyles"), Un = Symbol("tplUiTheme"), Wn = Symbol("blockDefaults"), Gn = Symbol("blockRegistry"), Kn = Symbol("customBlockDefinitions"), qn = Symbol("paletteBlocks"), Jn = Symbol("customBlockStylesheets"), Yn = Symbol("mergeTags"), Xn = Symbol("mergeTagSyntax"), Zn = Symbol("onRequestMergeTag"), Qn = Symbol("mergeTagAutocomplete"), $n = Symbol("mergeTagPicker"), er = Symbol("onRequestMedia"), tr = Symbol("displayConditions"), nr = Symbol("allowCustomConditions"), rr = Symbol("capabilities"), ir = Symbol("keyboardReorder"), ar = Symbol("templateLint"), or = Symbol("editorRoot"), sr = Symbol("popoverRoot"), cr = Symbol("authManager"), lr = Symbol("aiConfig"), ur = Symbol("comments"), dr = Symbol("savedModulesHeadless"), fr = Symbol("scoring"), pr = Symbol("cloudTranslations");
1491
+ var Rn = Symbol("translations"), zn = Symbol("editor"), Bn = Symbol("history"), Vn = Symbol("blockActions"), Hn = Symbol("conditionPreview"), Un = Symbol("fontsManager"), Wn = Symbol("themeStyles"), Gn = Symbol("tplUiTheme"), Kn = Symbol("blockDefaults"), qn = Symbol("blockRegistry"), Jn = Symbol("customBlockDefinitions"), Yn = Symbol("paletteBlocks"), Xn = Symbol("customBlockStylesheets"), Zn = Symbol("mergeTags"), Qn = Symbol("mergeTagSyntax"), $n = Symbol("onRequestMergeTag"), er = Symbol("mergeTagAutocomplete"), tr = Symbol("mergeTagPicker"), nr = Symbol("logicTags"), rr = Symbol("logicPairs"), ir = Symbol("logicPicker"), ar = Symbol("onRequestLogic"), or = Symbol("onRequestMedia"), sr = Symbol("displayConditions"), cr = Symbol("allowCustomConditions"), lr = Symbol("capabilities"), ur = Symbol("keyboardReorder"), dr = Symbol("templateLint"), fr = Symbol("editorRoot"), pr = Symbol("popoverRoot"), mr = Symbol("authManager"), hr = Symbol("aiConfig"), gr = Symbol("comments"), _r = Symbol("savedModulesHeadless"), vr = Symbol("scoring"), yr = Symbol("cloudTranslations");
1481
1492
  function J(e, t) {
1482
1493
  let n = v(e, null);
1483
1494
  if (n == null) throw Error(`${t} requires a provider for ${e.description ?? "unknown key"}. Ensure it is a descendant of Editor or CloudEditor.`);
@@ -1485,7 +1496,7 @@ function J(e, t) {
1485
1496
  }
1486
1497
  //#endregion
1487
1498
  //#region src/composables/useMergeTagPicker.ts
1488
- function mr() {
1499
+ function br() {
1489
1500
  let e = C(!1), t = C([]), n = null;
1490
1501
  function r(r) {
1491
1502
  if (n) {
@@ -1514,18 +1525,49 @@ function mr() {
1514
1525
  };
1515
1526
  }
1516
1527
  //#endregion
1528
+ //#region src/composables/useLogicTagPicker.ts
1529
+ function xr() {
1530
+ let e = C(!1), t = C([]), n = C([]), r = null;
1531
+ function i(i, a) {
1532
+ if (r) {
1533
+ let e = r;
1534
+ r = null, e(null);
1535
+ }
1536
+ return t.value = i, n.value = a, e.value = !0, new Promise((e) => {
1537
+ r = e;
1538
+ });
1539
+ }
1540
+ function a(i) {
1541
+ let a = r;
1542
+ r = null, e.value = !1, t.value = [], n.value = [], a && a(i);
1543
+ }
1544
+ return s() && l(() => {
1545
+ if (r) {
1546
+ let e = r;
1547
+ r = null, e(null);
1548
+ }
1549
+ e.value = !1, t.value = [], n.value = [];
1550
+ }), {
1551
+ isOpen: e,
1552
+ tags: t,
1553
+ pairs: n,
1554
+ open: i,
1555
+ resolve: a
1556
+ };
1557
+ }
1558
+ //#endregion
1517
1559
  //#region src/composables/useTemplateLint.ts
1518
- function hr(e) {
1519
- return e ? e.disabled === !0 ? !0 : e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1560
+ function Sr(e) {
1561
+ return e ? e.disabled === !0 || e.accessibility === !1 && e.structure === !1 && e.links === !1 : !1;
1520
1562
  }
1521
- function gr(e) {
1522
- let t = C([]), r = C(!1), i = C(!1), a = n(null), o = hr(e.options), s = null, c = !1;
1563
+ function Cr(e) {
1564
+ let t = C([]), r = C(!1), i = C(!1), a = n(null), o = Sr(e.options), s = null, c = !1;
1523
1565
  o || l();
1524
1566
  async function l() {
1525
1567
  try {
1526
- let t = await import("./quality-DNnYAntR.js").then((e) => e.t);
1568
+ let t = await import("./quality-CNjGxBG0.js").then((e) => e.t);
1527
1569
  if (c) return;
1528
- a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = un(e.content, u, {
1570
+ a.value = { lintTemplate: t.lintTemplate }, r.value = !0, u(), s = fn(e.content, u, {
1529
1571
  debounce: e.debounce ?? 500,
1530
1572
  deep: !0
1531
1573
  });
@@ -1561,7 +1603,7 @@ function gr(e) {
1561
1603
  //#endregion
1562
1604
  //#region src/composables/useI18n.ts
1563
1605
  function Y(e) {
1564
- let t = e ?? v(In, null);
1606
+ let t = e ?? v(Rn, null);
1565
1607
  if (!t) throw Error("useI18n() requires a translations provider. Ensure the component is a descendant of Editor or CloudEditor.");
1566
1608
  let n = u(t) ? t.value : t;
1567
1609
  function r(e, t) {
@@ -1574,12 +1616,12 @@ function Y(e) {
1574
1616
  }
1575
1617
  //#endregion
1576
1618
  //#region src/utils/blockTypeLabels.ts
1577
- function _r(e, t) {
1619
+ function wr(e, t) {
1578
1620
  return t.blocks[e] ?? e;
1579
1621
  }
1580
1622
  //#endregion
1581
1623
  //#region src/composables/useKeyboardReorder.ts
1582
- function vr(e, t) {
1624
+ function Tr(e, t) {
1583
1625
  let n = C(null), r = C(""), i = null;
1584
1626
  function a(t) {
1585
1627
  let n = e.content.value.blocks, r = n.findIndex((e) => e.id === t);
@@ -1606,7 +1648,7 @@ function vr(e, t) {
1606
1648
  let r = a(n);
1607
1649
  if (!r) return "";
1608
1650
  let i = (r.sectionId ? s(r.sectionId, r.columnIndex ?? 0) : e.content.value.blocks)?.[r.index];
1609
- return i ? _r(i.type, t.t) : "";
1651
+ return i ? wr(i.type, t.t) : "";
1610
1652
  }
1611
1653
  function s(t, n) {
1612
1654
  return e.content.value.blocks.find((e) => e.id === t && e.type === "section")?.children[n] ?? null;
@@ -1675,13 +1717,13 @@ function vr(e, t) {
1675
1717
  }
1676
1718
  //#endregion
1677
1719
  //#region src/composables/useUiTheme.ts
1678
- function yr(e) {
1679
- let t = Sn("(prefers-color-scheme: dark)");
1720
+ function Er(e) {
1721
+ let t = wn("(prefers-color-scheme: dark)");
1680
1722
  return { resolvedTheme: O(() => e.value === "auto" ? t.value ? "dark" : "light" : e.value) };
1681
1723
  }
1682
1724
  //#endregion
1683
1725
  //#region src/composables/useThemeStyles.ts
1684
- var br = {
1726
+ var Dr = {
1685
1727
  bg: "--tpl-bg",
1686
1728
  bgElevated: "--tpl-bg-elevated",
1687
1729
  bgHover: "--tpl-bg-hover",
@@ -1705,10 +1747,10 @@ var br = {
1705
1747
  dangerLight: "--tpl-danger-light",
1706
1748
  canvasBg: "--tpl-canvas-bg"
1707
1749
  };
1708
- function xr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1750
+ function Or({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1709
1751
  return { themeStyles: O(() => {
1710
1752
  let r = {}, i = e.value, a = t.value === "dark" ? i.dark : i;
1711
- if (a) for (let [e, t] of Object.entries(br)) {
1753
+ if (a) for (let [e, t] of Object.entries(Dr)) {
1712
1754
  let n = a[e];
1713
1755
  n && (r[t] = n);
1714
1756
  }
@@ -1717,27 +1759,27 @@ function xr({ themeOverrides: e, resolvedTheme: t, extraStyles: n }) {
1717
1759
  }
1718
1760
  //#endregion
1719
1761
  //#region src/utils/logger.ts
1720
- var Sr = "[Templatical]";
1721
- function Cr() {
1762
+ var kr = "[Templatical]";
1763
+ function Ar() {
1722
1764
  return typeof process < "u" && !0;
1723
1765
  }
1724
- var wr = {
1766
+ var jr = {
1725
1767
  warn(...e) {
1726
- console.warn(Sr, ...e);
1768
+ console.warn(kr, ...e);
1727
1769
  },
1728
1770
  error(...e) {
1729
- console.error(Sr, ...e);
1771
+ console.error(kr, ...e);
1730
1772
  },
1731
1773
  debug(...e) {
1732
- Cr() || console.debug(Sr, ...e);
1774
+ Ar() || console.debug(kr, ...e);
1733
1775
  },
1734
1776
  info(...e) {
1735
- Cr() || console.info(Sr, ...e);
1777
+ Ar() || console.info(kr, ...e);
1736
1778
  }
1737
1779
  };
1738
1780
  //#endregion
1739
1781
  //#region src/composables/useBlockRegistry.ts
1740
- function Tr() {
1782
+ function Mr() {
1741
1783
  let e = n(/* @__PURE__ */ new Map());
1742
1784
  function t(t, n) {
1743
1785
  e.value.set(t, n), oe(e);
@@ -1771,13 +1813,13 @@ function Tr() {
1771
1813
  let t = o(e.customType);
1772
1814
  if (!t) return s("Block definition not found");
1773
1815
  try {
1774
- let { Liquid: n } = await import("./liquid.browser-DKKBzRQu.js");
1816
+ let { Liquid: n } = await import("./liquid.browser-BJOEu6Cg.js");
1775
1817
  return await new n({
1776
1818
  strictVariables: !1,
1777
1819
  strictFilters: !1
1778
1820
  }).parseAndRender(t.template, e.fieldValues);
1779
1821
  } catch (t) {
1780
- return wr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
1822
+ return jr.error(`Failed to render custom block "${e.customType}":`, t), s(`Render error: ${e.customType}`);
1781
1823
  }
1782
1824
  }
1783
1825
  function l(t) {
@@ -1795,9 +1837,9 @@ function Tr() {
1795
1837
  }
1796
1838
  //#endregion
1797
1839
  //#region src/composables/useCustomBlockStylesheets.ts
1798
- function Er(e, t) {
1840
+ function Nr(e, t) {
1799
1841
  return O(() => {
1800
- let n = Dr(e.value.blocks);
1842
+ let n = Pr(e.value.blocks);
1801
1843
  if (n.size === 0) return [];
1802
1844
  let r = /* @__PURE__ */ new Set(), i = [];
1803
1845
  for (let e of n) {
@@ -1809,11 +1851,11 @@ function Er(e, t) {
1809
1851
  return i;
1810
1852
  });
1811
1853
  }
1812
- function Dr(e) {
1854
+ function Pr(e) {
1813
1855
  let t = /* @__PURE__ */ new Set();
1814
- return Or(e, t), t;
1856
+ return Fr(e, t), t;
1815
1857
  }
1816
- function Or(e, t) {
1858
+ function Fr(e, t) {
1817
1859
  for (let n of e) {
1818
1860
  if (De(n)) {
1819
1861
  t.add(n.customType);
@@ -1822,13 +1864,13 @@ function Or(e, t) {
1822
1864
  if (n.type === "section") {
1823
1865
  let e = n.children;
1824
1866
  if (!e) continue;
1825
- for (let n of e) Or(n, t);
1867
+ for (let n of e) Fr(n, t);
1826
1868
  }
1827
1869
  }
1828
1870
  }
1829
1871
  //#endregion
1830
1872
  //#region src/utils/registerBuiltInBlocks.ts
1831
- var kr = [
1873
+ var Ir = [
1832
1874
  {
1833
1875
  type: "section",
1834
1876
  createBlock: Ze
@@ -1882,8 +1924,8 @@ var kr = [
1882
1924
  createBlock: at
1883
1925
  }
1884
1926
  ];
1885
- function Ar(e, t) {
1886
- for (let n of kr) {
1927
+ function Lr(e, t) {
1928
+ for (let n of Ir) {
1887
1929
  let r = t[n.type];
1888
1930
  r && e.registerBuiltIn(n.type, {
1889
1931
  component: r,
@@ -1893,7 +1935,7 @@ function Ar(e, t) {
1893
1935
  }
1894
1936
  //#endregion
1895
1937
  //#region src/utils/keyboardShortcuts.ts
1896
- function jr(e) {
1938
+ function Rr(e) {
1897
1939
  for (let t of e.composedPath()) {
1898
1940
  if (!(t instanceof HTMLElement)) continue;
1899
1941
  if (t.isContentEditable) return !0;
@@ -1902,14 +1944,14 @@ function jr(e) {
1902
1944
  }
1903
1945
  return !1;
1904
1946
  }
1905
- function Mr(e, t) {
1947
+ function zr(e, t) {
1906
1948
  let n = e.metaKey || e.ctrlKey;
1907
1949
  if (n && e.key.toLowerCase() === "s") {
1908
1950
  e.preventDefault(), t.onSave?.();
1909
1951
  return;
1910
1952
  }
1911
1953
  if (n && e.key.toLowerCase() === "z") {
1912
- if (jr(e)) return;
1954
+ if (Rr(e)) return;
1913
1955
  e.preventDefault(), e.shiftKey ? t.history.redo() : (t.onBeforeUndo?.(), t.history.undo());
1914
1956
  return;
1915
1957
  }
@@ -1917,11 +1959,51 @@ function Mr(e, t) {
1917
1959
  t.selectBlock(null);
1918
1960
  return;
1919
1961
  }
1920
- (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !jr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1962
+ (e.key === "Delete" || e.key === "Backspace") && t.getSelectedBlockId() && !Rr(e) && (e.preventDefault(), t.history.record(), t.removeBlock(t.getSelectedBlockId()));
1921
1963
  }
1922
1964
  //#endregion
1923
- //#region src/components/blocks/ButtonBlock.vue?vue&type=script&setup=true&lang.ts
1924
- var Nr = { class: "tpl:text-center" }, Pr = ["href"], Fr = /* @__PURE__ */ B({
1965
+ //#region src/utils/mergeTagLabelSegments.ts
1966
+ function Br(e, t, n) {
1967
+ if (!e) return [];
1968
+ let r = RegExp(`(${n.value.source}|${n.logic.source})`, "g"), i = [], a = 0, o;
1969
+ for (; (o = r.exec(e)) !== null;) {
1970
+ o.index > a && i.push({
1971
+ type: "text",
1972
+ value: e.slice(a, o.index)
1973
+ });
1974
+ let r = o[0];
1975
+ vt(r, n) ? i.push({
1976
+ type: "tag",
1977
+ value: yt(r, t)
1978
+ }) : St(r, n) ? i.push({
1979
+ type: "tag",
1980
+ value: Ct(r, n)
1981
+ }) : i.push({
1982
+ type: "text",
1983
+ value: r
1984
+ }), a = o.index + r.length;
1985
+ }
1986
+ return a < e.length && i.push({
1987
+ type: "text",
1988
+ value: e.slice(a)
1989
+ }), i;
1990
+ }
1991
+ //#endregion
1992
+ //#region src/components/MergeTagPreviewText.vue
1993
+ var Vr = B({
1994
+ name: "MergeTagPreviewText",
1995
+ props: { text: {
1996
+ type: String,
1997
+ required: !0
1998
+ } },
1999
+ setup(e) {
2000
+ let t = v(Zn, []), n = v(Qn, dt.liquid), r = O(() => Br(e.text, t, n));
2001
+ return () => r.value.map((e, t) => e.type === "tag" ? a("span", {
2002
+ key: t,
2003
+ class: "tpl-merge-tag-label"
2004
+ }, e.value) : e.value);
2005
+ }
2006
+ }), Hr = { class: "tpl:text-center" }, Ur = ["href"], Wr = /* @__PURE__ */ B({
1925
2007
  __name: "ButtonBlock",
1926
2008
  props: {
1927
2009
  block: {},
@@ -1942,17 +2024,17 @@ var Nr = { class: "tpl:text-center" }, Pr = ["href"], Fr = /* @__PURE__ */ B({
1942
2024
  };
1943
2025
  return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), t.block.width === "full" ? (e.display = "block", e.width = "100%", e.boxSizing = "border-box") : typeof t.block.width == "number" && (e.width = `${t.block.width}px`, e.boxSizing = "border-box"), e;
1944
2026
  });
1945
- return (t, r) => (f(), k("div", Nr, [I("a", {
2027
+ return (t, r) => (f(), k("div", Hr, [I("a", {
1946
2028
  href: e.block.url || "#",
1947
2029
  style: L(n.value),
1948
2030
  class: "tpl:cursor-default",
1949
2031
  onClick: r[0] ||= M(() => {}, ["prevent"])
1950
- }, D(e.block.text), 13, Pr)]));
2032
+ }, [V(Vr, { text: e.block.text }, null, 8, ["text"])], 12, Ur)]));
1951
2033
  }
1952
- }), Ir = (e) => e === "", Lr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), Rr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), zr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Br = (e) => {
1953
- let t = zr(e);
2034
+ }), Gr = (e) => e === "", Kr = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), qr = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Jr = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), Yr = (e) => {
2035
+ let t = Jr(e);
1954
2036
  return t.charAt(0).toUpperCase() + t.slice(1);
1955
- }, Vr = {
2037
+ }, Xr = {
1956
2038
  xmlns: "http://www.w3.org/2000/svg",
1957
2039
  width: 24,
1958
2040
  height: 24,
@@ -1962,32 +2044,63 @@ var Nr = { class: "tpl:text-center" }, Pr = ["href"], Fr = /* @__PURE__ */ B({
1962
2044
  "stroke-width": 2,
1963
2045
  "stroke-linecap": "round",
1964
2046
  "stroke-linejoin": "round"
1965
- }, Hr = Symbol("lucide-icons");
1966
- function Ur() {
1967
- return v(Hr, {});
2047
+ }, Zr = /* @__PURE__ */ Symbol("lucide-icons");
2048
+ function Qr() {
2049
+ return v(Zr, {});
1968
2050
  }
1969
2051
  //#endregion
1970
- //#region ../../node_modules/.pnpm/@lucide+vue@1.21.0_vue@3.5.39_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
1971
- var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width": r, strokeWidth: i, "stroke-width": o, size: s, color: c, ...l }, { slots: u }) => {
1972
- let { size: d, color: f, strokeWidth: p = 2, absoluteStrokeWidth: m = !1, class: h = "" } = Ur(), g = O(() => {
1973
- let e = Ir(n) || Ir(r) || n === !0 || r === !0 || m === !0, t = i || o || p || Vr["stroke-width"];
1974
- return e ? Number(t) * 24 / Number(s ?? d ?? Vr.width) : t;
2052
+ //#region ../../node_modules/.pnpm/@lucide+vue@1.24.0_vue@3.5.39_typescript@6.0.3_/node_modules/@lucide/vue/dist/esm/Icon.mjs
2053
+ var $r = ({ name: e, iconNode: t, "icon-node": n, absoluteStrokeWidth: r, "absolute-stroke-width": i, strokeWidth: o, "stroke-width": s, size: c, color: l, ...u }, { slots: d }) => {
2054
+ let { size: f, color: p, strokeWidth: m = 2, absoluteStrokeWidth: h = !1, class: g = "" } = Qr(), _ = O(() => {
2055
+ let e = Gr(r) || Gr(i) || r === !0 || i === !0 || h === !0, t = o || s || m || Xr["stroke-width"];
2056
+ return e ? Number(t) * 24 / Number(c ?? f ?? Xr.width) : t;
1975
2057
  });
1976
2058
  return a("svg", {
1977
- ...Vr,
1978
- ...l,
1979
- width: s ?? d ?? Vr.width,
1980
- height: s ?? d ?? Vr.height,
1981
- stroke: c ?? f ?? Vr.stroke,
1982
- "stroke-width": g.value,
1983
- class: Lr("lucide", h, ...e ? [`lucide-${Rr(Br(e))}-icon`, `lucide-${Rr(e)}`] : ["lucide-icon"])
1984
- }, [...t.map((e) => a(...e)), ...u.default ? [u.default()] : []]);
1985
- }, X = (e, t) => (n, { slots: r, attrs: i }) => a(Wr, {
2059
+ ...Xr,
2060
+ ...u,
2061
+ width: c ?? f ?? Xr.width,
2062
+ height: c ?? f ?? Xr.height,
2063
+ stroke: l ?? p ?? Xr.stroke,
2064
+ "stroke-width": _.value,
2065
+ class: Kr("lucide", g, ...e ? [`lucide-${qr(Yr(e))}-icon`, `lucide-${qr(e)}`] : ["lucide-icon"])
2066
+ }, [...(t ?? n ?? []).map((e) => a(...e)), ...d.default ? [d.default()] : []]);
2067
+ }, X = (e, t) => (n, { slots: r, attrs: i }) => a($r, {
1986
2068
  ...i,
1987
2069
  ...n,
1988
2070
  iconNode: t,
1989
2071
  name: e
1990
- }, r.default ? { default: r.default } : void 0), Gr = X("circle-alert", [
2072
+ }, r.default ? { default: r.default } : void 0), ei = X("bookmark", [["path", {
2073
+ d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
2074
+ key: "oz39mx"
2075
+ }]]), ti = X("box", [
2076
+ ["path", {
2077
+ d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
2078
+ key: "hh9hay"
2079
+ }],
2080
+ ["path", {
2081
+ d: "m3.3 7 8.7 5 8.7-5",
2082
+ key: "g66t2b"
2083
+ }],
2084
+ ["path", {
2085
+ d: "M12 22V12",
2086
+ key: "d0xqtd"
2087
+ }]
2088
+ ]), ni = X("check", [["path", {
2089
+ d: "M20 6 9 17l-5-5",
2090
+ key: "1gmf2c"
2091
+ }]]), ri = X("chevron-down", [["path", {
2092
+ d: "m6 9 6 6 6-6",
2093
+ key: "qrunsl"
2094
+ }]]), ii = X("chevron-left", [["path", {
2095
+ d: "m15 18-6-6 6-6",
2096
+ key: "1wnfg3"
2097
+ }]]), ai = X("chevron-right", [["path", {
2098
+ d: "m9 18 6-6-6-6",
2099
+ key: "mthhwq"
2100
+ }]]), oi = X("chevron-up", [["path", {
2101
+ d: "m18 15-6-6-6 6",
2102
+ key: "153udz"
2103
+ }]]), si = X("circle-alert", [
1991
2104
  ["circle", {
1992
2105
  cx: "12",
1993
2106
  cy: "12",
@@ -2008,7 +2121,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2008
2121
  y2: "16",
2009
2122
  key: "4dfq90"
2010
2123
  }]
2011
- ]), Kr = X("circle-check", [["circle", {
2124
+ ]), ci = X("circle-check", [["circle", {
2012
2125
  cx: "12",
2013
2126
  cy: "12",
2014
2127
  r: "10",
@@ -2016,89 +2129,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2016
2129
  }], ["path", {
2017
2130
  d: "m9 12 2 2 4-4",
2018
2131
  key: "dzmm74"
2019
- }]]), qr = X("funnel", [["path", {
2020
- d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
2021
- key: "sc7q7i"
2022
- }]]), Jr = X("loader-circle", [["path", {
2023
- d: "M21 12a9 9 0 1 1-6.219-8.56",
2024
- key: "13zald"
2025
- }]]), Yr = X("shield-x", [
2026
- ["path", {
2027
- d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
2028
- key: "oel41y"
2029
- }],
2030
- ["path", {
2031
- d: "m14.5 9.5-5 5",
2032
- key: "17q4r4"
2033
- }],
2034
- ["path", {
2035
- d: "m9.5 9.5 5 5",
2036
- key: "18nt4w"
2037
- }]
2038
- ]), Xr = X("sparkles", [
2039
- ["path", {
2040
- d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
2041
- key: "1s2grr"
2042
- }],
2043
- ["path", {
2044
- d: "M20 2v4",
2045
- key: "1rf3ol"
2046
- }],
2047
- ["path", {
2048
- d: "M22 4h-4",
2049
- key: "gwowj6"
2050
- }],
2051
- ["circle", {
2052
- cx: "4",
2053
- cy: "20",
2054
- r: "2",
2055
- key: "6kqj1y"
2056
- }]
2057
- ]), Zr = X("triangle-alert", [
2058
- ["path", {
2059
- d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
2060
- key: "wmoenq"
2061
- }],
2062
- ["path", {
2063
- d: "M12 9v4",
2064
- key: "juzpu7"
2065
- }],
2066
- ["path", {
2067
- d: "M12 17h.01",
2068
- key: "p32p05"
2069
- }]
2070
- ]), Qr = X("bookmark", [["path", {
2071
- d: "M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",
2072
- key: "oz39mx"
2073
- }]]), $r = X("box", [
2074
- ["path", {
2075
- d: "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",
2076
- key: "hh9hay"
2077
- }],
2078
- ["path", {
2079
- d: "m3.3 7 8.7 5 8.7-5",
2080
- key: "g66t2b"
2081
- }],
2082
- ["path", {
2083
- d: "M12 22V12",
2084
- key: "d0xqtd"
2085
- }]
2086
- ]), ei = X("check", [["path", {
2087
- d: "M20 6 9 17l-5-5",
2088
- key: "1gmf2c"
2089
- }]]), ti = X("chevron-down", [["path", {
2090
- d: "m6 9 6 6 6-6",
2091
- key: "qrunsl"
2092
- }]]), ni = X("chevron-left", [["path", {
2093
- d: "m15 18-6-6 6-6",
2094
- key: "1wnfg3"
2095
- }]]), ri = X("chevron-right", [["path", {
2096
- d: "m9 18 6-6-6-6",
2097
- key: "mthhwq"
2098
- }]]), ii = X("chevron-up", [["path", {
2099
- d: "m18 15-6-6-6 6",
2100
- key: "153udz"
2101
- }]]), ai = X("clock", [["circle", {
2132
+ }]]), li = X("clock", [["circle", {
2102
2133
  cx: "12",
2103
2134
  cy: "12",
2104
2135
  r: "10",
@@ -2106,13 +2137,13 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2106
2137
  }], ["path", {
2107
2138
  d: "M12 6v6l4 2",
2108
2139
  key: "mmk7yg"
2109
- }]]), oi = X("code", [["path", {
2140
+ }]]), ui = X("code", [["path", {
2110
2141
  d: "m16 18 6-6-6-6",
2111
2142
  key: "eg8j8"
2112
2143
  }], ["path", {
2113
2144
  d: "m8 6-6 6 6 6",
2114
2145
  key: "ppft3o"
2115
- }]]), si = X("copy", [["rect", {
2146
+ }]]), di = X("copy", [["rect", {
2116
2147
  width: "14",
2117
2148
  height: "14",
2118
2149
  x: "8",
@@ -2123,7 +2154,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2123
2154
  }], ["path", {
2124
2155
  d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",
2125
2156
  key: "zix9uf"
2126
- }]]), ci = X("eye-off", [
2157
+ }]]), fi = X("eye-off", [
2127
2158
  ["path", {
2128
2159
  d: "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",
2129
2160
  key: "ct8e1f"
@@ -2140,7 +2171,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2140
2171
  d: "m2 2 20 20",
2141
2172
  key: "1ooewy"
2142
2173
  }]
2143
- ]), li = X("eye", [["path", {
2174
+ ]), pi = X("eye", [["path", {
2144
2175
  d: "M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",
2145
2176
  key: "1nclc0"
2146
2177
  }], ["circle", {
@@ -2148,7 +2179,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2148
2179
  cy: "12",
2149
2180
  r: "3",
2150
2181
  key: "1v7zrd"
2151
- }]]), ui = X("file-image", [
2182
+ }]]), mi = X("file-image", [
2152
2183
  ["path", {
2153
2184
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
2154
2185
  key: "1oefj6"
@@ -2167,7 +2198,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2167
2198
  d: "m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",
2168
2199
  key: "wt3hpn"
2169
2200
  }]
2170
- ]), di = X("file-text", [
2201
+ ]), hi = X("file-text", [
2171
2202
  ["path", {
2172
2203
  d: "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",
2173
2204
  key: "1oefj6"
@@ -2188,7 +2219,10 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2188
2219
  d: "M16 17H8",
2189
2220
  key: "z1uh3a"
2190
2221
  }]
2191
- ]), fi = X("grip-vertical", [
2222
+ ]), gi = X("funnel", [["path", {
2223
+ d: "M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",
2224
+ key: "sc7q7i"
2225
+ }]]), _i = X("grip-vertical", [
2192
2226
  ["circle", {
2193
2227
  cx: "9",
2194
2228
  cy: "12",
@@ -2225,7 +2259,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2225
2259
  r: "1",
2226
2260
  key: "f4zoj3"
2227
2261
  }]
2228
- ]), pi = X("image-up", [
2262
+ ]), vi = X("image-up", [
2229
2263
  ["path", {
2230
2264
  d: "M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21",
2231
2265
  key: "9csbqa"
@@ -2244,7 +2278,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2244
2278
  r: "2",
2245
2279
  key: "af1f0g"
2246
2280
  }]
2247
- ]), mi = X("image", [
2281
+ ]), yi = X("image", [
2248
2282
  ["rect", {
2249
2283
  width: "18",
2250
2284
  height: "18",
@@ -2264,7 +2298,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2264
2298
  d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",
2265
2299
  key: "1xmnt7"
2266
2300
  }]
2267
- ]), hi = X("info", [
2301
+ ]), bi = X("info", [
2268
2302
  ["circle", {
2269
2303
  cx: "12",
2270
2304
  cy: "12",
@@ -2279,28 +2313,31 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2279
2313
  d: "M12 8h.01",
2280
2314
  key: "e9boi3"
2281
2315
  }]
2282
- ]), gi = X("message-circle", [["path", {
2316
+ ]), xi = X("loader-circle", [["path", {
2317
+ d: "M21 12a9 9 0 1 1-6.219-8.56",
2318
+ key: "13zald"
2319
+ }]]), Si = X("message-circle", [["path", {
2283
2320
  d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
2284
2321
  key: "1sd12s"
2285
- }]]), _i = X("navigation", [["polygon", {
2322
+ }]]), Ci = X("navigation", [["polygon", {
2286
2323
  points: "3 11 22 2 13 21 11 13 3 11",
2287
2324
  key: "1ltx0t"
2288
- }]]), vi = X("pencil", [["path", {
2325
+ }]]), wi = X("pencil", [["path", {
2289
2326
  d: "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",
2290
2327
  key: "1a8usu"
2291
2328
  }], ["path", {
2292
2329
  d: "m15 5 4 4",
2293
2330
  key: "1mk7zo"
2294
- }]]), yi = X("puzzle", [["path", {
2331
+ }]]), Ti = X("puzzle", [["path", {
2295
2332
  d: "M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z",
2296
2333
  key: "w46dr5"
2297
- }]]), bi = X("redo-2", [["path", {
2334
+ }]]), Ei = X("redo-2", [["path", {
2298
2335
  d: "m15 14 5-5-5-5",
2299
2336
  key: "12vg1m"
2300
2337
  }], ["path", {
2301
2338
  d: "M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13",
2302
2339
  key: "6uklza"
2303
- }]]), xi = X("refresh-cw", [
2340
+ }]]), Di = X("refresh-cw", [
2304
2341
  ["path", {
2305
2342
  d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",
2306
2343
  key: "v9h5vc"
@@ -2317,19 +2354,19 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2317
2354
  d: "M8 16H3v5",
2318
2355
  key: "1cv678"
2319
2356
  }]
2320
- ]), Si = X("reply", [["path", {
2357
+ ]), Oi = X("reply", [["path", {
2321
2358
  d: "M20 18v-2a4 4 0 0 0-4-4H4",
2322
2359
  key: "5vmcpk"
2323
2360
  }], ["path", {
2324
2361
  d: "m9 17-5-5 5-5",
2325
2362
  key: "nvlc11"
2326
- }]]), Ci = X("send", [["path", {
2363
+ }]]), ki = X("send", [["path", {
2327
2364
  d: "M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",
2328
2365
  key: "1ffxy3"
2329
2366
  }], ["path", {
2330
2367
  d: "m21.854 2.147-10.94 10.939",
2331
2368
  key: "12cjpa"
2332
- }]]), wi = X("share-2", [
2369
+ }]]), Ai = X("share-2", [
2333
2370
  ["circle", {
2334
2371
  cx: "18",
2335
2372
  cy: "5",
@@ -2362,13 +2399,45 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2362
2399
  y2: "10.49",
2363
2400
  key: "1n3mei"
2364
2401
  }]
2365
- ]), Ti = X("shield-check", [["path", {
2402
+ ]), ji = X("shield-check", [["path", {
2366
2403
  d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
2367
2404
  key: "oel41y"
2368
2405
  }], ["path", {
2369
2406
  d: "m9 12 2 2 4-4",
2370
2407
  key: "dzmm74"
2371
- }]]), Ei = X("table", [
2408
+ }]]), Mi = X("shield-x", [
2409
+ ["path", {
2410
+ d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
2411
+ key: "oel41y"
2412
+ }],
2413
+ ["path", {
2414
+ d: "m14.5 9.5-5 5",
2415
+ key: "17q4r4"
2416
+ }],
2417
+ ["path", {
2418
+ d: "m9.5 9.5 5 5",
2419
+ key: "18nt4w"
2420
+ }]
2421
+ ]), Ni = X("sparkles", [
2422
+ ["path", {
2423
+ d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
2424
+ key: "1s2grr"
2425
+ }],
2426
+ ["path", {
2427
+ d: "M20 2v4",
2428
+ key: "1rf3ol"
2429
+ }],
2430
+ ["path", {
2431
+ d: "M22 4h-4",
2432
+ key: "gwowj6"
2433
+ }],
2434
+ ["circle", {
2435
+ cx: "4",
2436
+ cy: "20",
2437
+ r: "2",
2438
+ key: "6kqj1y"
2439
+ }]
2440
+ ]), Pi = X("table", [
2372
2441
  ["path", {
2373
2442
  d: "M12 3v18",
2374
2443
  key: "108xh3"
@@ -2389,7 +2458,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2389
2458
  d: "M3 15h18",
2390
2459
  key: "5xshup"
2391
2460
  }]
2392
- ]), Di = X("trash-2", [
2461
+ ]), Fi = X("trash-2", [
2393
2462
  ["path", {
2394
2463
  d: "M10 11v6",
2395
2464
  key: "nco0om"
@@ -2410,13 +2479,26 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2410
2479
  d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",
2411
2480
  key: "e791ji"
2412
2481
  }]
2413
- ]), Oi = X("undo-2", [["path", {
2482
+ ]), Ii = X("triangle-alert", [
2483
+ ["path", {
2484
+ d: "m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",
2485
+ key: "wmoenq"
2486
+ }],
2487
+ ["path", {
2488
+ d: "M12 9v4",
2489
+ key: "juzpu7"
2490
+ }],
2491
+ ["path", {
2492
+ d: "M12 17h.01",
2493
+ key: "p32p05"
2494
+ }]
2495
+ ]), Li = X("undo-2", [["path", {
2414
2496
  d: "M9 14 4 9l5-5",
2415
2497
  key: "102s5s"
2416
2498
  }], ["path", {
2417
2499
  d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11",
2418
2500
  key: "f3b9sd"
2419
- }]]), ki = X("upload", [
2501
+ }]]), Ri = X("upload", [
2420
2502
  ["path", {
2421
2503
  d: "M12 3v12",
2422
2504
  key: "1x0j5s"
@@ -2429,7 +2511,7 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2429
2511
  d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",
2430
2512
  key: "ih7n3h"
2431
2513
  }]
2432
- ]), Ai = X("video", [["path", {
2514
+ ]), zi = X("video", [["path", {
2433
2515
  d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
2434
2516
  key: "ftymec"
2435
2517
  }], ["rect", {
@@ -2439,20 +2521,20 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2439
2521
  height: "12",
2440
2522
  rx: "2",
2441
2523
  key: "158x01"
2442
- }]]), ji = X("x", [["path", {
2524
+ }]]), Bi = X("x", [["path", {
2443
2525
  d: "M18 6 6 18",
2444
2526
  key: "1bl5f8"
2445
2527
  }], ["path", {
2446
2528
  d: "m6 6 12 12",
2447
2529
  key: "d8bk6v"
2448
- }]]), Mi = X("zap", [["path", {
2530
+ }]]), Vi = X("zap", [["path", {
2449
2531
  d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
2450
2532
  key: "1xq2db"
2451
- }]]), Ni = ["innerHTML"], Pi = [
2533
+ }]]), Hi = ["innerHTML"], Ui = [
2452
2534
  "src",
2453
2535
  "width",
2454
2536
  "height"
2455
- ], Fi = /* @__PURE__ */ B({
2537
+ ], Wi = /* @__PURE__ */ B({
2456
2538
  __name: "CustomBlockIcon",
2457
2539
  props: {
2458
2540
  icon: {},
@@ -2468,40 +2550,40 @@ var Wr = ({ name: e, iconNode: t, absoluteStrokeWidth: n, "absolute-stroke-width
2468
2550
  height: `${n.value}px`
2469
2551
  }),
2470
2552
  innerHTML: e.icon
2471
- }, null, 12, Ni)) : i.value ? (f(), k("img", {
2553
+ }, null, 12, Hi)) : i.value ? (f(), k("img", {
2472
2554
  key: 1,
2473
2555
  src: e.icon,
2474
2556
  width: n.value,
2475
2557
  height: n.value,
2476
2558
  class: "tpl:inline-block",
2477
2559
  alt: ""
2478
- }, null, 8, Pi)) : (f(), N(j($r), {
2560
+ }, null, 8, Ui)) : (f(), N(j(ti), {
2479
2561
  key: 2,
2480
2562
  size: n.value,
2481
2563
  "stroke-width": 1.5
2482
2564
  }, null, 8, ["size"]));
2483
2565
  }
2484
- }), Ii = (e, t) => {
2566
+ }), Gi = (e, t) => {
2485
2567
  let n = e.__vccOpts || e;
2486
2568
  for (let [e, r] of t) n[e] = r;
2487
2569
  return n;
2488
- }, Li = {}, Ri = { class: "tpl-loading-track" };
2489
- function zi(e, t) {
2490
- return f(), k("div", Ri);
2570
+ }, Ki = {}, qi = { class: "tpl-loading-track" };
2571
+ function Ji(e, t) {
2572
+ return f(), k("div", qi);
2491
2573
  }
2492
- var Bi = /*#__PURE__*/ Ii(Li, [["render", zi], ["__scopeId", "data-v-1ed538ec"]]);
2574
+ var Yi = /*#__PURE__*/ Gi(Ki, [["render", Ji], ["__scopeId", "data-v-1ed538ec"]]);
2493
2575
  //#endregion
2494
2576
  //#region src/composables/useEditorRoot.ts
2495
- function Vi() {
2496
- return v(or, document) ?? document;
2577
+ function Xi() {
2578
+ return v(fr, document) ?? document;
2497
2579
  }
2498
2580
  //#endregion
2499
2581
  //#region src/composables/useFocusTrap.ts
2500
- var Hi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
2501
- function Ui(e, t) {
2502
- let n = Vi(), r = null, i = null, a = null;
2582
+ var Zi = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
2583
+ function Qi(e, t) {
2584
+ let n = Xi(), r = null, i = null, a = null;
2503
2585
  function o() {
2504
- return e.value ? Array.from(e.value.querySelectorAll(Hi)).filter((e) => e.offsetParent !== null) : [];
2586
+ return e.value ? Array.from(e.value.querySelectorAll(Zi)).filter((e) => e.offsetParent !== null) : [];
2505
2587
  }
2506
2588
  function s(e) {
2507
2589
  if (e.key !== "Tab") return;
@@ -2531,18 +2613,18 @@ function Ui(e, t) {
2531
2613
  }
2532
2614
  //#endregion
2533
2615
  //#region src/composables/useCloudI18n.ts
2534
- function Wi(e, t) {
2616
+ function $i(e, t) {
2535
2617
  return e.replace(/\{(\w+)\}/g, (e, n) => n in t ? String(t[n]) : `{${n}}`);
2536
2618
  }
2537
- function Gi(e) {
2538
- let t = e ?? v(pr, null);
2619
+ function ea(e) {
2620
+ let t = e ?? v(yr, null);
2539
2621
  return {
2540
2622
  t: t ? u(t) ? t.value : t : null,
2541
- format: Wi
2623
+ format: $i
2542
2624
  };
2543
2625
  }
2544
- function Ki(e) {
2545
- let { t, format: n } = Gi(e);
2626
+ function ta(e) {
2627
+ let { t, format: n } = ea(e);
2546
2628
  if (!t) throw Error("useCloudI18nStrict() requires a cloud translations provider. Ensure the component is a descendant of CloudEditor.");
2547
2629
  return {
2548
2630
  t,
@@ -2551,13 +2633,13 @@ function Ki(e) {
2551
2633
  }
2552
2634
  //#endregion
2553
2635
  //#region src/composables/useMergeTag.ts
2554
- function qi() {
2555
- let e = v(Yn, []), t = v(Xn, dt.liquid), n = v(Zn, null), r = v(Qn, !0), i = v($n, null), a = C(!1);
2636
+ function na() {
2637
+ let e = v(Zn, []), t = v(Qn, dt.liquid), n = v($n, null), r = v(er, !0), i = v(tr, null), a = C(!1);
2556
2638
  function o(e) {
2557
- return gt(e, t);
2639
+ return vt(e, t);
2558
2640
  }
2559
2641
  function s(t) {
2560
- return _t(t, e);
2642
+ return yt(t, e);
2561
2643
  }
2562
2644
  async function c() {
2563
2645
  if (n) {
@@ -2591,8 +2673,8 @@ function qi() {
2591
2673
  }
2592
2674
  //#endregion
2593
2675
  //#region src/composables/useEmoji.ts
2594
- function Ji() {
2595
- let [e, t] = ln(!1), r = n([]), i = !1;
2676
+ function ra() {
2677
+ let [e, t] = dn(!1), r = n([]), i = !1;
2596
2678
  l(() => {
2597
2679
  i = !0;
2598
2680
  }), H(e, async (e) => {
@@ -2617,7 +2699,7 @@ function Ji() {
2617
2699
  }
2618
2700
  //#endregion
2619
2701
  //#region src/composables/useDragDrop.ts
2620
- function Yi(e) {
2702
+ function ia(e) {
2621
2703
  let { onBlockMove: t, onBlockAdd: n } = e, r = C(!1), i = C(null), a = C(null);
2622
2704
  function o(e) {
2623
2705
  r.value = !0, i.value = e;
@@ -2667,7 +2749,7 @@ function Yi(e) {
2667
2749
  }
2668
2750
  //#endregion
2669
2751
  //#region src/composables/useFonts.ts
2670
- var Xi = [
2752
+ var aa = [
2671
2753
  {
2672
2754
  value: "Arial",
2673
2755
  label: "Arial"
@@ -2696,7 +2778,7 @@ var Xi = [
2696
2778
  value: "Courier New",
2697
2779
  label: "Courier New"
2698
2780
  }
2699
- ], Zi = {
2781
+ ], oa = {
2700
2782
  arial: "Arial, sans-serif",
2701
2783
  helvetica: "Helvetica, sans-serif",
2702
2784
  georgia: "Georgia, serif",
@@ -2704,14 +2786,14 @@ var Xi = [
2704
2786
  verdana: "Verdana, sans-serif",
2705
2787
  "trebuchet ms": "'Trebuchet MS', sans-serif",
2706
2788
  "courier new": "'Courier New', monospace"
2707
- }, Qi = "Arial, sans-serif";
2708
- function $i(e) {
2709
- let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? Qi);
2789
+ }, sa = "Arial, sans-serif";
2790
+ function ca(e) {
2791
+ let t = C(e?.customFonts ?? []), n = C(!0), r = C(!1), i = O(() => e?.defaultFallback ?? sa);
2710
2792
  function a(e) {
2711
2793
  n.value = e;
2712
2794
  }
2713
2795
  let o = O(() => {
2714
- let e = [...Xi];
2796
+ let e = [...aa];
2715
2797
  if (!n.value) return e.sort((e, t) => e.label.localeCompare(t.label));
2716
2798
  let r = t.value.map((e) => ({
2717
2799
  value: e.name,
@@ -2724,23 +2806,23 @@ function $i(e) {
2724
2806
  return o.value.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
2725
2807
  }
2726
2808
  function u(e) {
2727
- return Xi.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
2809
+ return aa.some((t) => t.label.toLowerCase() === e.toLowerCase() || t.value.toLowerCase().startsWith(e.toLowerCase()));
2728
2810
  }
2729
2811
  function d() {
2730
2812
  if (e?.defaultFont) {
2731
- if (!n.value && !u(e.defaultFont)) return Qi;
2813
+ if (!n.value && !u(e.defaultFont)) return sa;
2732
2814
  if (c(e.defaultFont)) {
2733
2815
  let t = o.value.find((t) => t.label.toLowerCase() === e.defaultFont.toLowerCase() || t.value.toLowerCase().startsWith(e.defaultFont.toLowerCase()));
2734
2816
  if (t) return t.value;
2735
2817
  }
2736
2818
  }
2737
- return Qi;
2819
+ return sa;
2738
2820
  }
2739
2821
  let f = O(() => d());
2740
2822
  function p(e) {
2741
2823
  if (!e) return i.value;
2742
2824
  let n = t.value.find((t) => t.name.toLowerCase() === e.toLowerCase());
2743
- return n ? `'${n.name}', ${n.fallback ?? i.value}` : Zi[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
2825
+ return n ? `'${n.name}', ${n.fallback ?? i.value}` : oa[e.toLowerCase()] || (e.includes(",") ? e : `${e}, ${i.value}`);
2744
2826
  }
2745
2827
  let m = [], h = !1;
2746
2828
  async function g() {
@@ -2756,7 +2838,7 @@ function $i(e) {
2756
2838
  t.onload = () => n(), t.onerror = () => r(/* @__PURE__ */ Error(`Failed to load font: ${e.name}`)), document.head.appendChild(t);
2757
2839
  });
2758
2840
  } catch (t) {
2759
- wr.warn(`Failed to load custom font "${e.name}":`, t);
2841
+ jr.warn(`Failed to load custom font "${e.name}":`, t);
2760
2842
  }
2761
2843
  });
2762
2844
  await Promise.allSettled(e), !h && (r.value = !0);
@@ -2782,12 +2864,79 @@ function $i(e) {
2782
2864
  };
2783
2865
  }
2784
2866
  //#endregion
2867
+ //#region src/composables/useLogicTag.ts
2868
+ function la() {
2869
+ let e = v(nr, []), t = v(rr, []), n = v(Qn, dt.liquid), r = v(ar, null), i = v(ir, null), a = C(!1), o = !!r || e.length > 0 || t.length > 0, s = e.length > 0 || t.length > 0;
2870
+ async function c() {
2871
+ if (r) {
2872
+ a.value = !0;
2873
+ try {
2874
+ return await r();
2875
+ } finally {
2876
+ a.value = !1;
2877
+ }
2878
+ }
2879
+ if (i && s) {
2880
+ a.value = !0;
2881
+ try {
2882
+ return await i.open(e, t);
2883
+ } finally {
2884
+ a.value = !1;
2885
+ }
2886
+ }
2887
+ return null;
2888
+ }
2889
+ return {
2890
+ logicTags: e,
2891
+ logicPairs: t,
2892
+ syntax: n,
2893
+ canInsertLogicTag: o,
2894
+ isRequesting: a,
2895
+ requestLogicTag: c
2896
+ };
2897
+ }
2898
+ //#endregion
2899
+ //#region src/utils/mergeTagNodeSpec.ts
2900
+ function ua(e, t, n) {
2901
+ return St(e, n) ? {
2902
+ type: "logicMergeTagNode",
2903
+ attrs: {
2904
+ value: e,
2905
+ keyword: Ct(e, n)
2906
+ }
2907
+ } : {
2908
+ type: "mergeTagNode",
2909
+ attrs: {
2910
+ label: t,
2911
+ value: e
2912
+ }
2913
+ };
2914
+ }
2915
+ //#endregion
2916
+ //#region src/utils/insertLogicTag.ts
2917
+ function da(e) {
2918
+ return "before" in e && "after" in e;
2919
+ }
2920
+ function fa(e, t, n) {
2921
+ if (!da(t)) {
2922
+ e.chain().focus().insertContent(ua(t.value, t.label, n)).run();
2923
+ return;
2924
+ }
2925
+ let r = ua(t.before, t.label, n), i = ua(t.after, t.label, n), { from: a, to: o } = e.state.selection;
2926
+ if (a !== o) {
2927
+ e.chain().focus().insertContentAt(o, i).insertContentAt(a, r).run();
2928
+ return;
2929
+ }
2930
+ e.chain().focus().insertContentAt(a, [r, i]).setTextSelection(a + 1).run();
2931
+ }
2932
+ //#endregion
2785
2933
  //#region src/composables/useRichTextLinkDialog.ts
2786
- function ea(e) {
2934
+ function pa(e) {
2787
2935
  let t = C(!1), n = C(""), r = C(null);
2788
- Ui(r, t);
2936
+ Qi(r, t);
2789
2937
  function i() {
2790
- n.value = e.value?.getAttributes("link").href || "", t.value = !0;
2938
+ let r = e.value?.getAttributes("link").href || "";
2939
+ n.value = r, t.value = !0;
2791
2940
  }
2792
2941
  function a() {
2793
2942
  if (n.value) {
@@ -2836,20 +2985,20 @@ function ea(e) {
2836
2985
  }
2837
2986
  //#endregion
2838
2987
  //#region src/composables/useRichTextEditor.ts
2839
- function ta(e) {
2840
- let t = v(Ln, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = qi(), l = v(In, null), d = (u(l) ? l.value : l)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", f = pt(s), p = n(null), { showLinkDialog: m, linkUrl: h, linkDialogRef: g, openLinkDialog: _, insertLink: y, removeLink: b, closeLinkDialog: x, handleLinkKeydown: S } = ea(p), { start: w, stop: ee } = cn(() => p.value?.commands.focus("end"), 0, { immediate: !1 }), T = n(null), E = C(!0), D = C(null), te = !1;
2841
- async function ne() {
2842
- D.value = null, E.value = !0;
2988
+ function ma(e) {
2989
+ let t = v(zn, null), { mergeTags: r, canRequestMergeTag: i, isRequesting: a, requestMergeTag: o, syntax: s, autocomplete: c } = na(), { canInsertLogicTag: l, isRequesting: d, requestLogicTag: f } = la(), p = v(Rn, null), m = (u(p) ? p.value : p)?.mergeTag?.suggestionEmpty ?? "No matching merge tags", h = mt(s), g = n(null), { showLinkDialog: _, linkUrl: y, linkDialogRef: b, openLinkDialog: x, insertLink: S, removeLink: w, closeLinkDialog: T, handleLinkKeydown: E } = pa(g), { start: ee, stop: D } = un(() => g.value?.commands.focus("end"), 0, { immediate: !1 }), te = n(null), ne = C(!0), O = C(null), k = !1;
2990
+ async function A() {
2991
+ O.value = null, ne.value = !0;
2843
2992
  try {
2844
2993
  let { TiptapEditor: n, EC: i, extensions: a } = await e.loadExtensions({
2845
2994
  mergeTags: r,
2846
2995
  syntax: s,
2847
- triggerChar: f,
2996
+ triggerChar: h,
2848
2997
  autocompleteEnabled: c,
2849
- suggestionEmptyText: d
2998
+ suggestionEmptyText: m
2850
2999
  });
2851
- if (te) return;
2852
- T.value = i;
3000
+ if (k) return;
3001
+ te.value = i;
2853
3002
  let o = /* @__PURE__ */ new Map();
2854
3003
  a.forEach((e, t) => o.set(e.name, t));
2855
3004
  let l = new n({
@@ -2857,67 +3006,74 @@ function ta(e) {
2857
3006
  content: e.blockContent(),
2858
3007
  editable: !0,
2859
3008
  onUpdate: ({ editor: n }) => {
2860
- te || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
3009
+ k || t && t.updateBlock(e.blockId(), { content: n.getHTML() });
2861
3010
  }
2862
3011
  });
2863
- if (te) {
3012
+ if (k) {
2864
3013
  l.destroy();
2865
3014
  return;
2866
3015
  }
2867
- p.value = l, E.value = !1, w();
3016
+ g.value = l, ne.value = !1, ee();
2868
3017
  } catch (t) {
2869
- if (te) return;
2870
- wr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), D.value = t instanceof Error ? t.message : "Failed to load editor", E.value = !1;
3018
+ if (k) return;
3019
+ jr.error(`[${e.editorName ?? "RichTextEditor"}] Failed to initialize TipTap editor:`, t), O.value = t instanceof Error ? t.message : "Failed to load editor", ne.value = !1;
2871
3020
  }
2872
3021
  }
2873
- function O() {
2874
- p.value?.destroy(), p.value = null, ne();
3022
+ function j() {
3023
+ g.value?.destroy(), g.value = null, A();
2875
3024
  }
2876
- ne();
2877
- let k = H(() => e.blockContent(), (e) => {
2878
- p.value && p.value.getHTML() !== e && p.value.commands.setContent(e, { emitUpdate: !1 });
3025
+ A();
3026
+ let M = H(() => e.blockContent(), (e) => {
3027
+ g.value && g.value.getHTML() !== e && g.value.commands.setContent(e, { emitUpdate: !1 });
2879
3028
  });
2880
- function A(t) {
2881
- if (a.value) return;
3029
+ function N(t) {
3030
+ if (a.value || d.value) return;
2882
3031
  let n = t.composedPath().find((e) => e instanceof HTMLElement);
2883
3032
  n && (e.onClickOutsideSideEffect?.(n), !(n.closest(".tpl-text-editor-wrapper") || n.closest(".tpl-text-toolbar") || n.closest(".tpl-link-dialog")) && e.onDone());
2884
3033
  }
2885
- q(document, "mousedown", A), re(() => {
2886
- te = !0, k(), ee(), p.value?.destroy();
3034
+ q(document, "mousedown", N), re(() => {
3035
+ k = !0, M(), D(), g.value?.destroy();
2887
3036
  });
2888
- async function j() {
3037
+ async function ie() {
2889
3038
  let e = await o();
2890
- te || (e && p.value ? p.value.chain().focus().insertMergeTag({
3039
+ k || (e && g.value ? g.value.chain().focus().insertMergeTag({
2891
3040
  label: e.label,
2892
3041
  value: e.value
2893
- }).run() : p.value?.commands.focus());
3042
+ }).run() : g.value?.commands.focus());
3043
+ }
3044
+ async function P() {
3045
+ let e = await f();
3046
+ k || (e && g.value ? fa(g.value, e, s) : g.value?.commands.focus());
2894
3047
  }
2895
3048
  return {
2896
- editor: p,
2897
- EditorContent: T,
2898
- isLoading: E,
2899
- initError: D,
2900
- retry: O,
2901
- showLinkDialog: m,
2902
- linkUrl: h,
2903
- linkDialogRef: g,
3049
+ editor: g,
3050
+ EditorContent: te,
3051
+ isLoading: ne,
3052
+ initError: O,
3053
+ retry: j,
3054
+ showLinkDialog: _,
3055
+ linkUrl: y,
3056
+ linkDialogRef: b,
2904
3057
  mergeTags: r,
2905
3058
  canRequestMergeTag: i,
2906
3059
  isRequestingMergeTag: a,
2907
3060
  syntax: s,
2908
- openLinkDialog: _,
2909
- insertLink: y,
2910
- removeLink: b,
2911
- closeLinkDialog: x,
2912
- handleLinkKeydown: S,
2913
- handleAddMergeTag: j
3061
+ canInsertLogicTag: l,
3062
+ isRequestingLogicTag: d,
3063
+ openLinkDialog: x,
3064
+ insertLink: S,
3065
+ removeLink: w,
3066
+ closeLinkDialog: T,
3067
+ handleLinkKeydown: E,
3068
+ handleAddMergeTag: ie,
3069
+ handleAddLogicTag: P
2914
3070
  };
2915
3071
  }
2916
3072
  //#endregion
2917
3073
  //#region src/composables/useSmallScreenNotice.ts
2918
- var na = "(max-width: 767px)";
2919
- function ra(e) {
2920
- let t = Sn(na);
3074
+ var ha = "(max-width: 767px)";
3075
+ function ga(e) {
3076
+ let t = wn(ha);
2921
3077
  return {
2922
3078
  isSmallScreen: t,
2923
3079
  showNotice: O(() => (P(e) ?? !0) && t.value)
@@ -2925,20 +3081,20 @@ function ra(e) {
2925
3081
  }
2926
3082
  //#endregion
2927
3083
  //#region src/components/blocks/CustomBlock.vue?vue&type=script&setup=true&lang.ts
2928
- var ia = { class: "tpl:w-full" }, aa = {
3084
+ var _a = { class: "tpl:w-full" }, va = {
2929
3085
  key: 0,
2930
3086
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-warning)] tpl:bg-[var(--tpl-warning-light)]"
2931
- }, oa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, sa = {
3087
+ }, ya = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ba = {
2932
3088
  key: 1,
2933
3089
  class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-danger)] tpl:bg-[var(--tpl-danger-light)]"
2934
- }, ca = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, la = {
3090
+ }, xa = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Sa = {
2935
3091
  key: 2,
2936
3092
  class: "tpl:relative"
2937
- }, ua = ["innerHTML"], da = {
3093
+ }, Ca = ["innerHTML"], wa = {
2938
3094
  key: 0,
2939
3095
  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]",
2940
3096
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 80%, transparent)" }
2941
- }, fa = /* @__PURE__ */ B({
3097
+ }, Ta = /* @__PURE__ */ B({
2942
3098
  __name: "CustomBlock",
2943
3099
  props: {
2944
3100
  block: {},
@@ -2946,7 +3102,7 @@ var ia = { class: "tpl:w-full" }, aa = {
2946
3102
  },
2947
3103
  emits: ["fetchData"],
2948
3104
  setup(e, { emit: t }) {
2949
- let n = e, i = t, { t: a } = Y(), o = v(Gn, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Ft({
3105
+ let n = e, i = t, { t: a } = Y(), o = v(qn, null), s = C(""), c = C(!1), l = O(() => o?.getDefinition(n.block.customType)), u = O(() => !!l.value), { isFetching: d, fetch: p, needsFetch: m, hasDataSource: h } = Lt({
2950
3106
  definition: l,
2951
3107
  block: O(() => n.block),
2952
3108
  onUpdate: (e, t) => {
@@ -2967,15 +3123,15 @@ var ia = { class: "tpl:w-full" }, aa = {
2967
3123
  }
2968
3124
  }
2969
3125
  }
2970
- let _ = nn(g, 150);
3126
+ let _ = an(g, 150);
2971
3127
  return r(() => {
2972
3128
  g();
2973
3129
  }), H(() => n.block.fieldValues, () => {
2974
3130
  _();
2975
- }, { deep: !0 }), (e, t) => (f(), k("div", ia, [u.value ? c.value ? (f(), k("div", sa, [V(j(Zr), {
3131
+ }, { deep: !0 }), (e, t) => (f(), k("div", _a, [u.value ? c.value ? (f(), k("div", ba, [V(j(Ii), {
2976
3132
  size: 24,
2977
3133
  class: "tpl:text-[var(--tpl-danger)]"
2978
- }), I("span", ca, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", la, [I("div", { innerHTML: s.value }, null, 8, ua), j(h) && j(m) ? (f(), k("div", da, [j(d) ? (f(), N(Bi, {
3134
+ }), I("span", xa, D(j(a).customBlocks.renderError), 1)])) : (f(), k("div", Sa, [I("div", { innerHTML: s.value }, null, 8, Ca), j(h) && j(m) ? (f(), k("div", wa, [j(d) ? (f(), N(Yi, {
2979
3135
  key: 1,
2980
3136
  class: "tpl:w-48"
2981
3137
  })) : (f(), k("button", {
@@ -2983,16 +3139,16 @@ var ia = { class: "tpl:w-full" }, aa = {
2983
3139
  type: "button",
2984
3140
  class: "tpl:flex tpl:cursor-pointer tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2 tpl:text-sm tpl:font-semibold tpl:shadow-sm tpl:transition-all tpl:duration-150 hover:tpl:border-[var(--tpl-primary)] hover:tpl:shadow-md tpl:bg-[var(--tpl-primary-light)] tpl:text-[var(--tpl-primary-hover)]",
2985
3141
  onClick: t[0] ||= M((...e) => j(p) && j(p)(...e), ["stop"])
2986
- }, [l.value?.icon ? (f(), N(Fi, {
3142
+ }, [l.value?.icon ? (f(), N(Wi, {
2987
3143
  key: 0,
2988
3144
  icon: l.value.icon,
2989
3145
  size: 16
2990
- }, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", aa, [V(j(yi), {
3146
+ }, null, 8, ["icon"])) : A("", !0), z(" " + D(l.value?.dataSource?.label || j(a).customBlocks.dataSource.fetchButton), 1)]))])) : A("", !0)])) : (f(), k("div", va, [V(j(Ti), {
2991
3147
  size: 24,
2992
3148
  class: "tpl:text-[var(--tpl-warning)]"
2993
- }), I("span", oa, D(j(a).customBlocks.definitionNotFound), 1)]))]));
3149
+ }), I("span", ya, D(j(a).customBlocks.definitionNotFound), 1)]))]));
2994
3150
  }
2995
- }), pa = { class: "tpl:w-full" }, ma = /* @__PURE__ */ B({
3151
+ }), Ea = { class: "tpl:w-full" }, Da = /* @__PURE__ */ B({
2996
3152
  __name: "DividerBlock",
2997
3153
  props: {
2998
3154
  block: {},
@@ -3004,18 +3160,18 @@ var ia = { class: "tpl:w-full" }, aa = {
3004
3160
  width: t.block.width === "full" ? "100%" : `${t.block.width}px`,
3005
3161
  margin: t.block.width === "full" ? "0" : "0 auto"
3006
3162
  }));
3007
- return (e, t) => (f(), k("div", pa, [I("hr", {
3163
+ return (e, t) => (f(), k("div", Ea, [I("hr", {
3008
3164
  class: "tpl:m-0 tpl:border-none",
3009
3165
  style: L(n.value)
3010
3166
  }, null, 4)]));
3011
3167
  }
3012
- }), ha = { class: "tpl:w-full" }, ga = { 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)]" }, _a = {
3168
+ }), Oa = { class: "tpl:w-full" }, ka = { class: "tpl:flex tpl:min-h-[80px] tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border tpl:border-dashed tpl:py-4 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-hover)]" }, Aa = {
3013
3169
  key: 0,
3014
3170
  class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]"
3015
- }, va = {
3171
+ }, ja = {
3016
3172
  key: 1,
3017
3173
  class: "tpl:text-sm tpl:text-[var(--tpl-text-dim)]"
3018
- }, ya = /* @__PURE__ */ B({
3174
+ }, Ma = /* @__PURE__ */ B({
3019
3175
  __name: "HtmlBlock",
3020
3176
  props: {
3021
3177
  block: {},
@@ -3023,15 +3179,15 @@ var ia = { class: "tpl:w-full" }, aa = {
3023
3179
  },
3024
3180
  setup(e) {
3025
3181
  let t = e, { t: n } = Y(), r = O(() => t.block.content.trim().length > 0);
3026
- return (e, t) => (f(), k("div", ha, [I("div", ga, [V(j(oi), {
3182
+ return (e, t) => (f(), k("div", Oa, [I("div", ka, [V(j(ui), {
3027
3183
  size: 24,
3028
3184
  class: "tpl:text-[var(--tpl-text-dim)]"
3029
- }), r.value ? (f(), k("span", _a, D(j(n).html.preview), 1)) : (f(), k("span", va, D(j(n).html.empty), 1))])]));
3185
+ }), r.value ? (f(), k("span", Aa, D(j(n).html.preview), 1)) : (f(), k("span", ja, D(j(n).html.empty), 1))])]));
3030
3186
  }
3031
3187
  });
3032
3188
  //#endregion
3033
3189
  //#region src/composables/useAliveFlag.ts
3034
- function ba() {
3190
+ function Na() {
3035
3191
  let e = { alive: !0 };
3036
3192
  return re(() => {
3037
3193
  e.alive = !1;
@@ -3039,13 +3195,13 @@ function ba() {
3039
3195
  }
3040
3196
  //#endregion
3041
3197
  //#region src/composables/useImageDrop.ts
3042
- var xa = "image/";
3043
- function Sa(e) {
3044
- let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 ? !0 : P(r), { isOverDropZone: a } = Tn(t, {
3198
+ var Pa = "image/";
3199
+ function Fa(e) {
3200
+ let { target: t, onFiles: n, enabled: r } = e, i = () => r === void 0 || P(r), { isOverDropZone: a } = Dn(t, {
3045
3201
  preventDefaultForUnhandled: !0,
3046
3202
  onDrop: (e) => {
3047
3203
  if (!i()) return;
3048
- let t = (e ?? []).filter((e) => e.type.startsWith(xa));
3204
+ let t = (e ?? []).filter((e) => e.type.startsWith(Pa));
3049
3205
  t.length > 0 && n([t[0]]);
3050
3206
  }
3051
3207
  });
@@ -3053,17 +3209,17 @@ function Sa(e) {
3053
3209
  }
3054
3210
  //#endregion
3055
3211
  //#region src/components/blocks/ImageBlock.vue?vue&type=script&setup=true&lang.ts
3056
- var Ca = {
3212
+ var Ia = {
3057
3213
  key: 0,
3058
3214
  class: "tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-10 tpl:flex tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded tpl:border-2 tpl:border-dashed tpl:text-xs tpl:font-medium tpl:border-[var(--tpl-primary)] tpl:text-[var(--tpl-primary)]",
3059
3215
  style: { "background-color": "color-mix(in srgb, var(--tpl-bg) 85%, transparent)" }
3060
- }, wa = ["href"], Ta = ["src", "alt"], Ea = ["src", "alt"], Da = {
3216
+ }, La = ["href"], Ra = ["src", "alt"], za = ["src", "alt"], Ba = {
3061
3217
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3062
3218
  style: { opacity: "0.7" }
3063
- }, Oa = ["href"], ka = ["src", "alt"], Aa = ["src", "alt"], ja = {
3219
+ }, Va = ["href"], Ha = ["src", "alt"], Ua = ["src", "alt"], Wa = {
3064
3220
  key: 4,
3065
3221
  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)]"
3066
- }, Ma = ["aria-label"], Na = { key: 1 }, Pa = /* @__PURE__ */ B({
3222
+ }, Ga = ["aria-label"], Ka = { key: 1 }, qa = /* @__PURE__ */ B({
3067
3223
  __name: "ImageBlock",
3068
3224
  props: {
3069
3225
  block: {},
@@ -3071,7 +3227,7 @@ var Ca = {
3071
3227
  },
3072
3228
  emits: ["update"],
3073
3229
  setup(e, { emit: t }) {
3074
- let n = e, r = t, { t: i } = Y(), { syntax: a } = qi(), o = v(er, null), s = O(() => !!o), c = ba();
3230
+ let n = e, r = t, { t: i } = Y(), { syntax: a } = na(), o = v(or, null), s = O(() => !!o), c = Na();
3075
3231
  async function l() {
3076
3232
  let e = await o?.({ accept: ["images"] });
3077
3233
  if (c.alive && e) {
@@ -3098,7 +3254,7 @@ var Ca = {
3098
3254
  }
3099
3255
  }
3100
3256
  }
3101
- let { isOver: h } = Sa({
3257
+ let { isOver: h } = Fa({
3102
3258
  target: u,
3103
3259
  enabled: p,
3104
3260
  onFiles: m
@@ -3111,18 +3267,18 @@ var Ca = {
3111
3267
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
3112
3268
  marginRight: e === "center" ? "auto" : void 0
3113
3269
  };
3114
- }), y = O(() => yt(n.block.src, a));
3270
+ }), y = O(() => xt(n.block.src, a));
3115
3271
  return (t, n) => (f(), k("div", {
3116
3272
  ref_key: "dropZoneRef",
3117
3273
  ref: u,
3118
3274
  "data-testid": "image-drop-zone",
3119
3275
  class: "tpl:relative tpl:w-full",
3120
3276
  style: L(g.value)
3121
- }, [p.value && (j(h) || d.value) ? (f(), k("div", Ca, [d.value ? (f(), k(R, { key: 0 }, [V(j(Jr), {
3277
+ }, [p.value && (j(h) || d.value) ? (f(), k("div", Ia, [d.value ? (f(), k(R, { key: 0 }, [V(j(xi), {
3122
3278
  class: "tpl-spinner",
3123
3279
  size: 20,
3124
3280
  "stroke-width": 2
3125
- }), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(ki), {
3281
+ }), z(" " + D(j(i).image.uploading), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Ri), {
3126
3282
  size: 20,
3127
3283
  "stroke-width": 1.5
3128
3284
  }), z(" " + D(j(i).image.dropToUpload), 1)], 64))])) : A("", !0), e.block.src && y.value && e.block.placeholderUrl ? (f(), k(R, { key: 1 }, [e.block.linkUrl ? (f(), k("a", {
@@ -3137,22 +3293,22 @@ var Ca = {
3137
3293
  src: e.block.placeholderUrl,
3138
3294
  alt: e.block.alt || j(i).image.altTextPlaceholder,
3139
3295
  style: L(_.value)
3140
- }, null, 12, Ta)], 8, wa)) : (f(), k("img", {
3296
+ }, null, 12, Ra)], 8, La)) : (f(), k("img", {
3141
3297
  key: 1,
3142
3298
  class: "tpl:border-0",
3143
3299
  src: e.block.placeholderUrl,
3144
3300
  alt: e.block.alt,
3145
3301
  style: L(_.value)
3146
- }, null, 12, Ea))], 64)) : e.block.src && y.value ? (f(), k("div", {
3302
+ }, null, 12, za))], 64)) : e.block.src && y.value ? (f(), k("div", {
3147
3303
  key: 2,
3148
3304
  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)]",
3149
3305
  style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, _.value])
3150
- }, [V(j(mi), {
3306
+ }, [V(j(yi), {
3151
3307
  size: 32,
3152
3308
  "stroke-width": 1.5,
3153
3309
  class: "tpl:text-[var(--tpl-primary)]",
3154
3310
  style: { opacity: "0.5" }
3155
- }), I("span", Da, D(e.block.src), 1)], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
3311
+ }), I("span", Ba, [V(Vr, { text: e.block.src }, null, 8, ["text"])])], 4)) : e.block.src ? (f(), k(R, { key: 3 }, [e.block.linkUrl ? (f(), k("a", {
3156
3312
  key: 0,
3157
3313
  href: e.block.linkUrl,
3158
3314
  target: "_blank",
@@ -3164,26 +3320,26 @@ var Ca = {
3164
3320
  src: e.block.src,
3165
3321
  alt: e.block.alt || j(i).image.altTextPlaceholder,
3166
3322
  style: L(_.value)
3167
- }, null, 12, ka)], 8, Oa)) : (f(), k("img", {
3323
+ }, null, 12, Ha)], 8, Va)) : (f(), k("img", {
3168
3324
  key: 1,
3169
3325
  class: "tpl:border-0",
3170
3326
  src: e.block.src,
3171
3327
  alt: e.block.alt,
3172
3328
  style: L(_.value)
3173
- }, null, 12, Aa))], 64)) : (f(), k("div", ja, [s.value ? (f(), k("button", {
3329
+ }, null, 12, Ua))], 64)) : (f(), k("div", Wa, [s.value ? (f(), k("button", {
3174
3330
  key: 0,
3175
3331
  "aria-label": j(i).image.browseMedia,
3176
3332
  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)]",
3177
3333
  onClick: M(l, ["stop"])
3178
- }, [V(j(mi), {
3334
+ }, [V(j(yi), {
3179
3335
  size: 14,
3180
3336
  "stroke-width": 1.5
3181
- }), z(" " + D(j(i).image.browseMedia), 1)], 8, Ma)) : (f(), k("span", Na, D(j(i).image.clickToAdd), 1))]))], 4));
3337
+ }), z(" " + D(j(i).image.browseMedia), 1)], 8, Ga)) : (f(), k("span", Ka, D(j(i).image.clickToAdd), 1))]))], 4));
3182
3338
  }
3183
- }), Fa = { class: "tpl:w-full" }, Ia = ["href"], La = {
3339
+ }), Ja = { class: "tpl:w-full" }, Ya = ["href"], Xa = {
3184
3340
  key: 1,
3185
3341
  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)]"
3186
- }, Ra = /* @__PURE__ */ B({
3342
+ }, Za = /* @__PURE__ */ B({
3187
3343
  __name: "MenuBlock",
3188
3344
  props: {
3189
3345
  block: {},
@@ -3202,7 +3358,7 @@ var Ca = {
3202
3358
  function a(e) {
3203
3359
  return e || t.block.linkColor || t.block.color;
3204
3360
  }
3205
- return (t, o) => (f(), k("div", Fa, [i.value ? (f(), k("div", {
3361
+ return (t, o) => (f(), k("div", Ja, [i.value ? (f(), k("div", {
3206
3362
  key: 0,
3207
3363
  style: L(r.value)
3208
3364
  }, [(f(!0), k(R, null, h(e.block.items, (t, n) => (f(), k(R, { key: t.id }, [I("a", {
@@ -3214,15 +3370,15 @@ var Ca = {
3214
3370
  textDecoration: t.underline ? "underline" : "none"
3215
3371
  }),
3216
3372
  onClick: o[0] ||= M(() => {}, ["prevent"])
3217
- }, D(t.text || "..."), 13, Ia), n < e.block.items.length - 1 ? (f(), k("span", {
3373
+ }, [V(Vr, { text: t.text || "..." }, null, 8, ["text"])], 12, Ya), n < e.block.items.length - 1 ? (f(), k("span", {
3218
3374
  key: 0,
3219
3375
  style: L({
3220
3376
  color: e.block.separatorColor,
3221
3377
  padding: `0 ${e.block.spacing}px`
3222
3378
  })
3223
- }, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", La, [V(j(_i), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
3379
+ }, D(e.block.separator), 5)) : A("", !0)], 64))), 128))], 4)) : (f(), k("div", Xa, [V(j(Ci), { size: 16 }), I("span", null, D(j(n).menu.addLinks), 1)]))]));
3224
3380
  }
3225
- }), za = /* @__PURE__ */ new Set([
3381
+ }), Qa = /* @__PURE__ */ new Set([
3226
3382
  "http",
3227
3383
  "https",
3228
3384
  "mailto",
@@ -3232,7 +3388,7 @@ var Ca = {
3232
3388
  "sms",
3233
3389
  "xmpp",
3234
3390
  "cid"
3235
- ]), Ba = /* @__PURE__ */ new Set([
3391
+ ]), $a = /* @__PURE__ */ new Set([
3236
3392
  "SCRIPT",
3237
3393
  "STYLE",
3238
3394
  "IFRAME",
@@ -3242,7 +3398,7 @@ var Ca = {
3242
3398
  "META",
3243
3399
  "BASE",
3244
3400
  "FORM"
3245
- ]), Va = /* @__PURE__ */ new Set([
3401
+ ]), eo = /* @__PURE__ */ new Set([
3246
3402
  "href",
3247
3403
  "xlink:href",
3248
3404
  "formaction",
@@ -3251,16 +3407,16 @@ var Ca = {
3251
3407
  "background",
3252
3408
  "poster"
3253
3409
  ]);
3254
- function Ha(e, t) {
3410
+ function to(e, t) {
3255
3411
  let n = e.replace(/[\t\n\r]/g, "").replace(/^[\u0000-\u0020]+/, "").trimEnd();
3256
3412
  if (!n || n.startsWith("#")) return !0;
3257
3413
  let r = /^([a-z][a-z0-9+.-]*):/i.exec(n);
3258
3414
  if (!r) return !0;
3259
3415
  let i = r[1].toLowerCase();
3260
- return za.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
3416
+ return Qa.has(i) ? !0 : t && i === "data" ? /^data:image\/(png|jpe?g|gif|webp|svg\+xml);/i.test(n) : !1;
3261
3417
  }
3262
- function Ua(e) {
3263
- if (Ba.has(e.tagName)) {
3418
+ function no(e) {
3419
+ if ($a.has(e.tagName)) {
3264
3420
  e.remove();
3265
3421
  return;
3266
3422
  }
@@ -3272,29 +3428,29 @@ function Ua(e) {
3272
3428
  e.removeAttribute(n);
3273
3429
  continue;
3274
3430
  }
3275
- if (Va.has(t)) {
3276
- Ha(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
3431
+ if (eo.has(t)) {
3432
+ to(e.getAttribute(n) ?? "", !1) || e.removeAttribute(n);
3277
3433
  continue;
3278
3434
  }
3279
3435
  if (t === "src") {
3280
- Ha(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
3436
+ to(e.getAttribute(n) ?? "", !0) || e.removeAttribute(n);
3281
3437
  continue;
3282
3438
  }
3283
3439
  t === "srcdoc" && e.removeAttribute(n);
3284
3440
  }
3285
3441
  let n = Array.from(e.children);
3286
- for (let e of n) Ua(e);
3442
+ for (let e of n) no(e);
3287
3443
  }
3288
- function Wa(e) {
3444
+ function ro(e) {
3289
3445
  if (typeof DOMParser > "u") return e;
3290
3446
  let t = new DOMParser().parseFromString(`<!doctype html><body>${e}</body>`, "text/html").body, n = Array.from(t.children);
3291
- for (let e of n) Ua(e);
3447
+ for (let e of n) no(e);
3292
3448
  return t.innerHTML;
3293
3449
  }
3294
3450
  //#endregion
3295
3451
  //#region src/composables/useEditableTextBlock.ts
3296
- function Ga(e) {
3297
- let t = v(Yn, []), { syntax: n } = qi(), r = O(() => Wa(St(vt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = Dn(a), c = O(() => ({
3452
+ function io(e) {
3453
+ let t = v(Zn, []), { syntax: n } = na(), r = O(() => ro(wt(bt(e(), t), n))), i = C(!1), a = C(null), { top: o, left: s } = kn(a), c = O(() => ({
3298
3454
  top: o.value - 8,
3299
3455
  left: s.value
3300
3456
  }));
@@ -3315,14 +3471,14 @@ function Ga(e) {
3315
3471
  }
3316
3472
  //#endregion
3317
3473
  //#region src/components/blocks/ParagraphBlock.vue?vue&type=script&setup=true&lang.ts
3318
- var Ka = ["innerHTML"], qa = /* @__PURE__ */ B({
3474
+ var ao = ["innerHTML"], oo = /* @__PURE__ */ B({
3319
3475
  __name: "ParagraphBlock",
3320
3476
  props: {
3321
3477
  block: {},
3322
3478
  viewport: {}
3323
3479
  },
3324
3480
  setup(e) {
3325
- let t = e, n = T(() => import("./ParagraphEditor-pGrfSccu.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ga(() => t.block.content);
3481
+ let t = e, n = E(() => import("./ParagraphEditor-B3fG0vge.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = io(() => t.block.content);
3326
3482
  return (t, l) => (f(), k("div", {
3327
3483
  ref_key: "blockRef",
3328
3484
  ref: i,
@@ -3341,41 +3497,46 @@ var Ka = ["innerHTML"], qa = /* @__PURE__ */ B({
3341
3497
  key: 1,
3342
3498
  class: "tpl-text-content tpl:outline-none [&_a]:tpl:underline [&_li]:tpl:my-1 [&_ol]:tpl:my-2 [&_ol]:tpl:pl-6 [&_p]:tpl:m-0 [&_p]:tpl:mb-2 [&_p:last-child]:tpl:mb-0 [&_s]:tpl:line-through [&_sub]:tpl:align-sub [&_sub]:tpl:text-[0.75em] [&_sup]:tpl:align-super [&_sup]:tpl:text-[0.75em] [&_ul]:tpl:my-2 [&_ul]:tpl:pl-6",
3343
3499
  innerHTML: j(o)
3344
- }, null, 8, Ka))], 544));
3500
+ }, null, 8, ao))], 544));
3345
3501
  }
3346
3502
  });
3347
3503
  //#endregion
3348
3504
  //#region src/utils/blockComponentResolver.ts
3349
- function Ja(e, t, n) {
3505
+ function so(e, t, n) {
3350
3506
  if (t) {
3351
3507
  let n = t.getComponent(e);
3352
3508
  if (n) return n;
3353
3509
  }
3354
3510
  return n[e.type] ?? null;
3355
3511
  }
3356
- function Ya(e) {
3357
- let { padding: t, backgroundColor: n } = e.styles;
3358
- return {
3512
+ function co(e) {
3513
+ let { padding: t, backgroundColor: n } = e.styles, r = {
3359
3514
  padding: `${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`,
3360
3515
  backgroundColor: n || "transparent"
3361
3516
  };
3517
+ return e.type === "section" && e.borderRadius && e.borderRadius > 0 && (r.borderRadius = `${e.borderRadius}px`), r;
3518
+ }
3519
+ function lo(e) {
3520
+ if (e.type !== "section" || !e.wrapper) return null;
3521
+ let t = e.wrapper, n = {};
3522
+ return t.backgroundColor && (n.backgroundColor = t.backgroundColor), t.padding && (n.padding = `${t.padding.top}px ${t.padding.right}px ${t.padding.bottom}px ${t.padding.left}px`), t.borderRadius && t.borderRadius > 0 && (n.borderRadius = `${t.borderRadius}px`), n;
3362
3523
  }
3363
3524
  //#endregion
3364
3525
  //#region src/components/blocks/BlockWrapper.vue?vue&type=script&setup=true&lang.ts
3365
- var Xa = ["data-block-id", "data-block-type"], Za = ["aria-label"], Qa = [
3526
+ var uo = ["data-block-id", "data-block-type"], fo = ["aria-label"], po = [
3366
3527
  "aria-label",
3367
3528
  "aria-pressed",
3368
3529
  "title"
3369
- ], $a = ["aria-label", "title"], eo = ["aria-label", "title"], to = ["aria-label", "title"], no = {
3530
+ ], mo = ["aria-label", "title"], ho = ["aria-label", "title"], go = ["aria-label", "title"], _o = {
3370
3531
  key: 1,
3371
3532
  class: "tpl-block-hidden-overlay tpl:pointer-events-none tpl:absolute tpl:inset-0 tpl:z-[5] tpl:flex tpl:items-center tpl:justify-center tpl:rounded-sm"
3372
- }, ro = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, io = {
3533
+ }, vo = { class: "tpl:flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-2 tpl:py-1 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-bg-elevated)] tpl:text-[var(--tpl-text-muted)] tpl:shadow-[var(--tpl-shadow-sm)]" }, yo = {
3373
3534
  key: 2,
3374
3535
  class: "tpl:absolute tpl:-left-1 tpl:top-1/2 tpl:z-[5] tpl:-translate-x-full tpl:-translate-y-1/2"
3375
- }, ao = ["aria-label", "title"], oo = {
3536
+ }, bo = ["aria-label", "title"], xo = {
3376
3537
  key: 3,
3377
3538
  class: "tpl:absolute tpl:-right-1 tpl:-top-1 tpl:z-[5] tpl:translate-x-full"
3378
- }, so = ["aria-label"], co = /*#__PURE__*/ Ii(/* @__PURE__ */ B({
3539
+ }, So = ["aria-label"], Co = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
3379
3540
  __name: "BlockWrapper",
3380
3541
  props: {
3381
3542
  block: {},
@@ -3385,7 +3546,7 @@ var Xa = ["data-block-id", "data-block-type"], Za = ["aria-label"], Qa = [
3385
3546
  },
3386
3547
  emits: ["select"],
3387
3548
  setup(e, { emit: t }) {
3388
- let n = T(() => import("./BlockIssueBadge-BQDUuJxy.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(ir, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
3549
+ let n = E(() => import("./BlockIssueBadge-BxwEiiF3.js")), r = e, i = t, { t: a, format: s } = Y(), c = v(ur, null), l = C(null), u = O(() => c?.liftedBlockId.value === r.block.id), d = O(() => u.value ? s(a.blockActions.dragLifted, { block: r.block.type }) : a.blockActions.drag);
3389
3550
  async function p() {
3390
3551
  await m(), l.value?.focus();
3391
3552
  }
@@ -3411,26 +3572,26 @@ var Xa = ["data-block-id", "data-block-type"], Za = ["aria-label"], Qa = [
3411
3572
  let g = O(() => !r.viewport || !r.block.visibility ? !1 : r.block.visibility[r.viewport] === !1), _ = O(() => r.previewMode === !0 && g.value), y = O(() => r.viewport ? {
3412
3573
  desktop: a.viewport.desktop,
3413
3574
  mobile: a.viewport.mobile
3414
- }[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(zn, null), S = v(Bn, null), w = v(rr, {}), ee = O(() => !!w.savedModules), E = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
3415
- let e = Ya(r.block);
3416
- return {
3575
+ }[r.viewport] ?? r.viewport : ""), b = O(() => !!r.block.displayCondition), x = v(Vn, null), S = v(Hn, null), w = v(lr, {}), T = O(() => !!w.savedModules), ee = O(() => w.comments?.getBlockCount(r.block.id) ?? 0), te = O(() => {
3576
+ let e = co(r.block), t = {
3417
3577
  padding: e.padding,
3418
3578
  backgroundColor: e.backgroundColor
3419
3579
  };
3420
- });
3421
- function ne(e) {
3580
+ return e.borderRadius && (t.borderRadius = e.borderRadius), t;
3581
+ }), ne = O(() => lo(r.block));
3582
+ function re(e) {
3422
3583
  r.previewMode || (e.stopPropagation(), i("select"));
3423
3584
  }
3424
- function re() {
3585
+ function N() {
3425
3586
  x?.deleteBlock(r.block.id);
3426
3587
  }
3427
- function N() {
3588
+ function ie() {
3428
3589
  x?.duplicateBlock(r.block);
3429
3590
  }
3430
- function ie() {
3591
+ function P() {
3431
3592
  w.savedModules?.openSaveDialog(r.block.id);
3432
3593
  }
3433
- function P() {
3594
+ function ae() {
3434
3595
  S?.toggleBlock(r.block.id);
3435
3596
  }
3436
3597
  return (t, r) => _.value ? A("", !0) : (f(), k("div", {
@@ -3442,7 +3603,7 @@ var Xa = ["data-block-id", "data-block-type"], Za = ["aria-label"], Qa = [
3442
3603
  }]),
3443
3604
  "data-block-id": e.block.id,
3444
3605
  "data-block-type": e.block.type,
3445
- onClick: ne
3606
+ onClick: re
3446
3607
  }, [
3447
3608
  V(j(n), { "block-id": e.block.id }, null, 8, ["block-id"]),
3448
3609
  e.isSelected ? (f(), k("div", {
@@ -3460,90 +3621,98 @@ var Xa = ["data-block-id", "data-block-type"], Za = ["aria-label"], Qa = [
3460
3621
  "aria-keyshortcuts": "Space Enter ArrowUp ArrowDown Escape",
3461
3622
  title: j(a).blockActions.drag,
3462
3623
  onKeydown: h
3463
- }, [V(j(fi), {
3624
+ }, [V(j(_i), {
3464
3625
  size: 14,
3465
3626
  "stroke-width": 1.5
3466
- })], 40, Qa),
3627
+ })], 40, po),
3467
3628
  I("button", {
3468
3629
  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",
3469
3630
  "aria-label": j(a).blockActions.duplicate,
3470
3631
  title: j(a).blockActions.duplicate,
3471
- onClick: M(N, ["stop"])
3472
- }, [V(j(si), {
3632
+ onClick: M(ie, ["stop"])
3633
+ }, [V(j(di), {
3473
3634
  size: 14,
3474
3635
  "stroke-width": 1.5
3475
- })], 8, $a),
3476
- ee.value ? (f(), k("button", {
3636
+ })], 8, mo),
3637
+ T.value ? (f(), k("button", {
3477
3638
  key: 0,
3478
3639
  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",
3479
3640
  "aria-label": j(a).blockActions.saveAsModule,
3480
3641
  title: j(a).blockActions.saveAsModule,
3481
- onClick: M(ie, ["stop"])
3482
- }, [V(j(Qr), {
3642
+ onClick: M(P, ["stop"])
3643
+ }, [V(j(ei), {
3483
3644
  size: 14,
3484
3645
  "stroke-width": 1.5
3485
- })], 8, eo)) : A("", !0),
3646
+ })], 8, ho)) : A("", !0),
3486
3647
  I("button", {
3487
3648
  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",
3488
3649
  "aria-label": j(a).blockActions.delete,
3489
3650
  title: j(a).blockActions.delete,
3490
- onClick: M(re, ["stop"])
3491
- }, [V(j(Di), {
3651
+ onClick: M(N, ["stop"])
3652
+ }, [V(j(Fi), {
3492
3653
  size: 14,
3493
3654
  "stroke-width": 1.5
3494
- })], 8, to)
3495
- ], 8, Za)) : A("", !0),
3496
- g.value ? (f(), k("div", no, [I("span", ro, [V(j(ci), {
3655
+ })], 8, go)
3656
+ ], 8, fo)) : A("", !0),
3657
+ g.value ? (f(), k("div", _o, [I("span", vo, [V(j(fi), {
3497
3658
  size: 12,
3498
3659
  "stroke-width": 1.5
3499
3660
  }), z(" " + D(j(s)(j(a).blockActions.hiddenOnViewport, { viewport: y.value })), 1)])])) : A("", !0),
3500
- b.value && !g.value ? (f(), k("div", io, [I("button", {
3661
+ b.value && !g.value ? (f(), k("div", yo, [I("button", {
3501
3662
  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)]",
3502
3663
  "aria-label": j(a).blockActions.conditionToggle,
3503
3664
  title: e.block.displayCondition?.label,
3504
- onClick: M(P, ["stop"])
3505
- }, [V(j(qr), {
3665
+ onClick: M(ae, ["stop"])
3666
+ }, [V(j(gi), {
3506
3667
  size: 12,
3507
3668
  "stroke-width": 2
3508
- })], 8, ao)])) : A("", !0),
3509
- E.value > 0 && !g.value ? (f(), k("div", oo, [I("button", {
3669
+ })], 8, bo)])) : A("", !0),
3670
+ ee.value > 0 && !g.value ? (f(), k("div", xo, [I("button", {
3510
3671
  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)]",
3511
- "aria-label": j(s)(j(a).blockActions.comments, { count: String(E.value) }),
3672
+ "aria-label": j(s)(j(a).blockActions.comments, { count: String(ee.value) }),
3512
3673
  onClick: r[0] ||= M((t) => j(w).comments?.openForBlock(e.block.id), ["stop"])
3513
- }, [V(j(gi), {
3674
+ }, [V(j(Si), {
3514
3675
  size: 12,
3515
3676
  "stroke-width": 2.5
3516
- }), z(" " + D(E.value), 1)], 8, so)])) : A("", !0),
3517
- I("div", {
3677
+ }), z(" " + D(ee.value), 1)], 8, So)])) : A("", !0),
3678
+ ne.value ? (f(), k("div", {
3679
+ key: 4,
3680
+ class: "tpl-section-wrapper",
3681
+ style: L(ne.value)
3682
+ }, [I("div", {
3518
3683
  class: "tpl-block-content",
3519
3684
  style: L(te.value)
3520
- }, [o(t.$slots, "default", {}, void 0, !0)], 4)
3521
- ], 10, Xa));
3685
+ }, [o(t.$slots, "default", {}, void 0, !0)], 4)], 4)) : (f(), k("div", {
3686
+ key: 5,
3687
+ class: "tpl-block-content",
3688
+ style: L(te.value)
3689
+ }, [o(t.$slots, "default", {}, void 0, !0)], 4))
3690
+ ], 10, uo));
3522
3691
  }
3523
- }), [["__scopeId", "data-v-4a48371d"]]);
3692
+ }), [["__scopeId", "data-v-7aeef19d"]]);
3524
3693
  //#endregion
3525
3694
  //#region src/utils/unwrapParagraph.ts
3526
- function lo(e) {
3695
+ function wo(e) {
3527
3696
  let t = e.match(/^\s*<p\b[^>]*>([\s\S]*)<\/p>\s*$/);
3528
3697
  return !t || /<\/p>\s*<p\b/i.test(t[1]) ? e : t[1];
3529
3698
  }
3530
3699
  //#endregion
3531
3700
  //#region src/components/blocks/TitleBlock.vue
3532
- var uo = /* @__PURE__ */ B({
3701
+ var To = /* @__PURE__ */ B({
3533
3702
  __name: "TitleBlock",
3534
3703
  props: {
3535
3704
  block: {},
3536
3705
  viewport: {}
3537
3706
  },
3538
3707
  setup(e) {
3539
- let t = e, n = T(() => import("./TitleEditor-BvFbL16O.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = Ga(() => t.block.content), l = O(() => {
3708
+ let t = e, n = E(() => import("./TitleEditor-BiZbLYF1.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = io(() => t.block.content), l = O(() => {
3540
3709
  let e = {
3541
3710
  fontSize: `${pe[t.block.level]}px`,
3542
3711
  color: t.block.color,
3543
3712
  textAlign: t.block.textAlign
3544
3713
  };
3545
3714
  return t.block.fontFamily && (e.fontFamily = t.block.fontFamily), e;
3546
- }), u = O(() => `h${t.block.level}`), p = O(() => lo(o.value));
3715
+ }), u = O(() => `h${t.block.level}`), p = O(() => wo(o.value));
3547
3716
  return (t, o) => (f(), k("div", {
3548
3717
  ref_key: "blockRef",
3549
3718
  ref: i,
@@ -3566,11 +3735,19 @@ var uo = /* @__PURE__ */ B({
3566
3735
  innerHTML: p.value
3567
3736
  }, null, 8, ["innerHTML"]))], 36));
3568
3737
  }
3569
- }), fo = { class: "tpl:w-full" }, po = { class: "tpl:flex tpl:gap-0" }, mo = {
3738
+ });
3739
+ //#endregion
3740
+ //#region src/utils/sectionColumnDrop.ts
3741
+ function Eo(e) {
3742
+ return e.dataset.blockType !== "section" && e.dataset.paletteType !== "section";
3743
+ }
3744
+ //#endregion
3745
+ //#region src/components/blocks/SectionBlock.vue?vue&type=script&setup=true&lang.ts
3746
+ var Do = { class: "tpl:w-full" }, Oo = { class: "tpl:flex tpl:gap-0" }, ko = {
3570
3747
  key: 0,
3571
3748
  "data-testid": "section-drop-hint",
3572
3749
  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)]"
3573
- }, ho = /* @__PURE__ */ B({
3750
+ }, Ao = /* @__PURE__ */ B({
3574
3751
  __name: "SectionBlock",
3575
3752
  props: {
3576
3753
  block: {},
@@ -3578,13 +3755,13 @@ var uo = /* @__PURE__ */ B({
3578
3755
  },
3579
3756
  setup(e) {
3580
3757
  let t = {
3581
- title: uo,
3582
- paragraph: qa,
3583
- image: Pa,
3584
- button: Fr,
3585
- divider: ma,
3586
- custom: fa
3587
- }, n = e, { t: r } = Y(), i = J(Ln, "SectionBlock"), a = v(Bn, null), o = v(Gn, null), s = O(() => {
3758
+ title: To,
3759
+ paragraph: oo,
3760
+ image: qa,
3761
+ button: Wr,
3762
+ divider: Da,
3763
+ custom: Ta
3764
+ }, n = e, { t: r } = Y(), i = J(zn, "SectionBlock"), a = v(Hn, null), o = v(qn, null), s = O(() => {
3588
3765
  switch (n.block.columns) {
3589
3766
  case "2": return ["50%", "50%"];
3590
3767
  case "3": return [
@@ -3610,7 +3787,7 @@ var uo = /* @__PURE__ */ B({
3610
3787
  a[e] = r, i.updateBlock(n.block.id, { children: a });
3611
3788
  }
3612
3789
  function m(e) {
3613
- return Ja(e, o, t);
3790
+ return so(e, o, t);
3614
3791
  }
3615
3792
  function g(e, t) {
3616
3793
  e.type === "custom" && i.updateBlock(e.id, {
@@ -3618,7 +3795,7 @@ var uo = /* @__PURE__ */ B({
3618
3795
  dataSourceFetched: t.dataSourceFetched
3619
3796
  });
3620
3797
  }
3621
- return (t, n) => (f(), k("div", fo, [I("div", po, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
3798
+ return (t, n) => (f(), k("div", Do, [I("div", Oo, [(f(!0), k(R, null, h(l.value, (t, n) => (f(), k("div", {
3622
3799
  key: n,
3623
3800
  class: F(["tpl:relative tpl:min-h-[60px] tpl:rounded", u(n).length === 0 ? "tpl:border tpl:border-dashed tpl:border-[var(--tpl-border)]" : ""]),
3624
3801
  style: L({ width: s.value[n] })
@@ -3627,7 +3804,7 @@ var uo = /* @__PURE__ */ B({
3627
3804
  group: {
3628
3805
  name: "blocks",
3629
3806
  pull: !0,
3630
- put: (e, t, n) => n.dataset.blockType !== "section"
3807
+ put: (e, t, n) => j(Eo)(n)
3631
3808
  },
3632
3809
  animation: 150,
3633
3810
  "ghost-class": "tpl-ghost",
@@ -3640,7 +3817,7 @@ var uo = /* @__PURE__ */ B({
3640
3817
  class: "tpl:min-h-[60px]",
3641
3818
  "onUpdate:modelValue": (e) => p(n, e)
3642
3819
  }, {
3643
- default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(co, {
3820
+ default: b(() => [(f(!0), k(R, null, h(u(n), (t) => c((f(), k("div", { key: t.id }, [V(Co, {
3644
3821
  block: t,
3645
3822
  "is-selected": j(i).state.selectedBlockId === t.id,
3646
3823
  viewport: e.viewport,
@@ -3671,13 +3848,13 @@ var uo = /* @__PURE__ */ B({
3671
3848
  "model-value",
3672
3849
  "group",
3673
3850
  "onUpdate:modelValue"
3674
- ]), u(n).length === 0 ? (f(), k("div", mo, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
3851
+ ]), u(n).length === 0 ? (f(), k("div", ko, [I("span", null, D(j(r).section.dropHere), 1)])) : A("", !0)], 6))), 128))])]));
3675
3852
  }
3676
- }), go = me, _o = {
3853
+ }), jo = me, Mo = {
3677
3854
  small: 24,
3678
3855
  medium: 32,
3679
3856
  large: 48
3680
- }, vo = [
3857
+ }, No = [
3681
3858
  "facebook",
3682
3859
  "twitter",
3683
3860
  "instagram",
@@ -3695,11 +3872,11 @@ var uo = /* @__PURE__ */ B({
3695
3872
  "github",
3696
3873
  "dribbble",
3697
3874
  "behance"
3698
- ], yo = [
3875
+ ], Po = [
3699
3876
  "width",
3700
3877
  "height",
3701
3878
  "fill"
3702
- ], bo = ["d"], xo = /* @__PURE__ */ B({
3879
+ ], Fo = ["d"], Io = /* @__PURE__ */ B({
3703
3880
  __name: "SocialIconSvg",
3704
3881
  props: {
3705
3882
  platform: {},
@@ -3707,7 +3884,7 @@ var uo = /* @__PURE__ */ B({
3707
3884
  iconSize: {}
3708
3885
  },
3709
3886
  setup(e) {
3710
- let t = e, n = O(() => go[t.platform]), r = O(() => _o[t.iconSize]), i = O(() => {
3887
+ let t = e, n = O(() => jo[t.platform]), r = O(() => Mo[t.iconSize]), i = O(() => {
3711
3888
  let e = {
3712
3889
  display: "inline-flex",
3713
3890
  alignItems: "center",
@@ -3751,12 +3928,12 @@ var uo = /* @__PURE__ */ B({
3751
3928
  viewBox: "0 0 24 24",
3752
3929
  fill: o.value,
3753
3930
  xmlns: "http://www.w3.org/2000/svg"
3754
- }, [I("path", { d: n.value.path }, null, 8, bo)], 8, yo))], 4));
3931
+ }, [I("path", { d: n.value.path }, null, 8, Fo)], 8, Po))], 4));
3755
3932
  }
3756
- }), So = { class: "tpl:w-full" }, Co = ["href"], wo = {
3933
+ }), Lo = { class: "tpl:w-full" }, Ro = ["href"], zo = {
3757
3934
  key: 1,
3758
3935
  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)]"
3759
- }, To = /* @__PURE__ */ B({
3936
+ }, Bo = /* @__PURE__ */ B({
3760
3937
  __name: "SocialIconsBlock",
3761
3938
  props: {
3762
3939
  block: {},
@@ -3769,7 +3946,7 @@ var uo = /* @__PURE__ */ B({
3769
3946
  gap: `${t.block.spacing}px`,
3770
3947
  justifyContent: t.block.align === "left" ? "flex-start" : t.block.align === "right" ? "flex-end" : "center"
3771
3948
  })), i = O(() => t.block.icons.length > 0);
3772
- return (t, a) => (f(), k("div", So, [i.value ? (f(), k("div", {
3949
+ return (t, a) => (f(), k("div", Lo, [i.value ? (f(), k("div", {
3773
3950
  key: 0,
3774
3951
  style: L(r.value)
3775
3952
  }, [(f(!0), k(R, null, h(e.block.icons, (t) => (f(), k("a", {
@@ -3777,7 +3954,7 @@ var uo = /* @__PURE__ */ B({
3777
3954
  href: t.url || "#",
3778
3955
  class: "tpl:cursor-default",
3779
3956
  onClick: a[0] ||= M(() => {}, ["prevent"])
3780
- }, [V(xo, {
3957
+ }, [V(Io, {
3781
3958
  platform: t.platform,
3782
3959
  "icon-style": e.block.iconStyle,
3783
3960
  "icon-size": e.block.iconSize
@@ -3785,44 +3962,44 @@ var uo = /* @__PURE__ */ B({
3785
3962
  "platform",
3786
3963
  "icon-style",
3787
3964
  "icon-size"
3788
- ])], 8, Co))), 128))], 4)) : (f(), k("div", wo, [V(j(wi), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
3965
+ ])], 8, Ro))), 128))], 4)) : (f(), k("div", zo, [V(j(Ai), { size: 16 }), I("span", null, D(j(n).social.addIcons), 1)]))]));
3789
3966
  }
3790
- }), Eo = { class: "tpl:w-full" }, Do = {
3967
+ }), Vo = { class: "tpl:w-full" }, Ho = {
3791
3968
  key: 0,
3792
3969
  class: "tpl:absolute tpl:rounded tpl:px-2 tpl:py-0.5 tpl:text-[10px] tpl:font-medium",
3793
3970
  style: {
3794
3971
  "background-color": "var(--tpl-bg-hover)",
3795
3972
  color: "var(--tpl-text-dim)"
3796
3973
  }
3797
- }, Oo = /* @__PURE__ */ B({
3974
+ }, Uo = /* @__PURE__ */ B({
3798
3975
  __name: "SpacerBlock",
3799
3976
  props: {
3800
3977
  block: {},
3801
3978
  viewport: {}
3802
3979
  },
3803
3980
  setup(e) {
3804
- let t = e, n = J(Ln, "SpacerBlock"), r = O(() => ({
3981
+ let t = e, n = J(zn, "SpacerBlock"), r = O(() => ({
3805
3982
  height: `${t.block.height}px`,
3806
3983
  minHeight: `${t.block.height}px`,
3807
3984
  ...n.state.previewMode ? {} : { borderColor: "var(--tpl-border)" }
3808
3985
  }));
3809
- return (t, i) => (f(), k("div", Eo, [I("div", {
3986
+ return (t, i) => (f(), k("div", Vo, [I("div", {
3810
3987
  style: L(r.value),
3811
3988
  class: F(["tpl:relative tpl:flex tpl:items-center tpl:justify-center", { "tpl:border-y tpl:border-dashed": !j(n).state.previewMode }])
3812
- }, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Do, D(e.block.height) + "px ", 1))], 6)]));
3989
+ }, [j(n).state.previewMode ? A("", !0) : (f(), k("span", Ho, D(e.block.height) + "px ", 1))], 6)]));
3813
3990
  }
3814
- }), ko = { class: "tpl:w-full" }, Ao = { key: 0 }, jo = [
3991
+ }), Wo = { class: "tpl:w-full" }, Go = { key: 0 }, Ko = [
3815
3992
  "aria-label",
3816
3993
  "data-placeholder",
3817
3994
  "onBlur"
3818
- ], Mo = [
3995
+ ], qo = [
3819
3996
  "aria-label",
3820
3997
  "data-placeholder",
3821
3998
  "onBlur"
3822
- ], No = {
3999
+ ], Jo = {
3823
4000
  key: 1,
3824
4001
  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)]"
3825
- }, Po = /*#__PURE__*/ Ii(/* @__PURE__ */ B({
4002
+ }, Yo = /*#__PURE__*/ Gi(/* @__PURE__ */ B({
3826
4003
  __name: "TableBlock",
3827
4004
  props: {
3828
4005
  block: {},
@@ -3836,7 +4013,7 @@ var uo = /* @__PURE__ */ B({
3836
4013
  updated(e, t) {
3837
4014
  t.value !== t.oldValue && e.getRootNode().activeElement !== e && (e.textContent = t.value ?? "");
3838
4015
  }
3839
- }, n = e, { t: r } = Y(), i = J(Ln, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => ({
4016
+ }, n = e, { t: r } = Y(), i = J(zn, "TableBlock"), a = O(() => n.block.rows.length > 0), o = O(() => ({
3840
4017
  width: "100%",
3841
4018
  borderCollapse: "collapse",
3842
4019
  fontSize: `${n.block.fontSize}px`,
@@ -3865,31 +4042,31 @@ var uo = /* @__PURE__ */ B({
3865
4042
  } : n);
3866
4043
  i.updateBlock(n.block.id, { rows: o });
3867
4044
  }
3868
- return (e, n) => (f(), k("div", ko, [a.value ? (f(), k("table", {
4045
+ return (e, n) => (f(), k("div", Wo, [a.value ? (f(), k("table", {
3869
4046
  key: 0,
3870
4047
  style: L(o.value),
3871
4048
  class: "tpl-table-editable"
3872
- }, [u.value ? (f(), k("thead", Ao, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
4049
+ }, [u.value ? (f(), k("thead", Go, [I("tr", null, [(f(!0), k(R, null, h(u.value.cells, (e) => c((f(), k("th", {
3873
4050
  key: e.id,
3874
4051
  style: L(l.value),
3875
4052
  "aria-label": j(r).table.cellPlaceholder,
3876
4053
  contenteditable: "true",
3877
4054
  "data-placeholder": j(r).table.cellPlaceholder,
3878
4055
  onBlur: (t) => m(u.value.id, e.id, t),
3879
- onKeydown: n[0] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
4056
+ onKeydown: n[0] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
3880
4057
  onClick: M(p, ["stop"])
3881
- }, null, 44, jo)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
4058
+ }, null, 44, Ko)), [[t, e.content]])), 128))])])) : A("", !0), I("tbody", null, [(f(!0), k(R, null, h(d.value, (e) => (f(), k("tr", { key: e.id }, [(f(!0), k(R, null, h(e.cells, (i) => c((f(), k("td", {
3882
4059
  key: i.id,
3883
4060
  style: L(s.value),
3884
4061
  "aria-label": j(r).table.cellPlaceholder,
3885
4062
  contenteditable: "true",
3886
4063
  "data-placeholder": j(r).table.cellPlaceholder,
3887
4064
  onBlur: (t) => m(e.id, i.id, t),
3888
- onKeydown: n[1] ||= E(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
4065
+ onKeydown: n[1] ||= ee(M((e) => e.target.blur(), ["prevent"]), ["enter"]),
3889
4066
  onClick: M(p, ["stop"])
3890
- }, null, 44, Mo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", No, [V(j(Ei), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
4067
+ }, null, 44, qo)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), k("div", Jo, [V(j(Pi), { size: 16 }), I("span", null, D(j(r).table.empty), 1)]))]));
3891
4068
  }
3892
- }), [["__scopeId", "data-v-f065872a"]]), Fo = /* @__PURE__ */ B({
4069
+ }), [["__scopeId", "data-v-f065872a"]]), Xo = /* @__PURE__ */ B({
3893
4070
  __name: "VideoPlayButton",
3894
4071
  props: { hoverEffect: {
3895
4072
  type: Boolean,
@@ -3907,7 +4084,7 @@ var uo = /* @__PURE__ */ B({
3907
4084
  });
3908
4085
  //#endregion
3909
4086
  //#region src/utils/videoThumbnail.ts
3910
- function Io(e) {
4087
+ function Zo(e) {
3911
4088
  if (!e) return {
3912
4089
  platform: "unknown",
3913
4090
  videoId: null,
@@ -3939,25 +4116,25 @@ function Io(e) {
3939
4116
  thumbnailUrl: null
3940
4117
  };
3941
4118
  }
3942
- function Lo(e, t) {
3943
- return t || Io(e).thumbnailUrl;
4119
+ function Qo(e, t) {
4120
+ return t || Zo(e).thumbnailUrl;
3944
4121
  }
3945
4122
  //#endregion
3946
4123
  //#region src/components/blocks/VideoBlock.vue?vue&type=script&setup=true&lang.ts
3947
- var Ro = ["src", "alt"], zo = {
4124
+ var $o = ["src", "alt"], es = {
3948
4125
  class: "tpl:max-w-full tpl:truncate tpl:px-3 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-primary)]",
3949
4126
  style: { opacity: "0.7" }
3950
- }, Bo = ["href"], Vo = ["src", "alt"], Ho = ["src", "alt"], Uo = {
4127
+ }, ts = ["href"], ns = ["src", "alt"], rs = ["src", "alt"], is = {
3951
4128
  key: 3,
3952
4129
  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)]"
3953
- }, Wo = /* @__PURE__ */ B({
4130
+ }, as = /* @__PURE__ */ B({
3954
4131
  __name: "VideoBlock",
3955
4132
  props: {
3956
4133
  block: {},
3957
4134
  viewport: {}
3958
4135
  },
3959
4136
  setup(e) {
3960
- let t = e, { t: n } = Y(), { syntax: r } = qi(), i = O(() => yt(t.block.url, r) || yt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : Lo(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
4137
+ let t = e, { t: n } = Y(), { syntax: r } = na(), i = O(() => xt(t.block.url, r) || xt(t.block.thumbnailUrl, r)), a = O(() => i.value ? null : Qo(t.block.url, t.block.thumbnailUrl)), o = O(() => ({ textAlign: t.block.align })), s = O(() => {
3961
4138
  let e = t.block.align;
3962
4139
  return {
3963
4140
  maxWidth: "100%",
@@ -3966,7 +4143,7 @@ var Ro = ["src", "alt"], zo = {
3966
4143
  marginLeft: e === "center" || e === "right" ? "auto" : void 0,
3967
4144
  marginRight: e === "center" ? "auto" : void 0
3968
4145
  };
3969
- }), c = O(() => yt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
4146
+ }), c = O(() => xt(t.block.url, r) ? t.block.url : t.block.thumbnailUrl);
3970
4147
  return (t, r) => (f(), k("div", {
3971
4148
  class: "tpl:w-full",
3972
4149
  style: L(o.value)
@@ -3978,16 +4155,16 @@ var Ro = ["src", "alt"], zo = {
3978
4155
  class: "tpl:w-full tpl:border-0",
3979
4156
  src: e.block.placeholderUrl,
3980
4157
  alt: e.block.alt
3981
- }, null, 8, Ro), V(Fo)], 4)) : i.value ? (f(), k("div", {
4158
+ }, null, 8, $o), V(Xo)], 4)) : i.value ? (f(), k("div", {
3982
4159
  key: 1,
3983
4160
  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)]",
3984
4161
  style: L([{ "border-color": "color-mix(in srgb, var(--tpl-primary) 40%, transparent)" }, s.value])
3985
- }, [V(j(Ai), {
4162
+ }, [V(j(zi), {
3986
4163
  size: 36,
3987
4164
  "stroke-width": 1.5,
3988
4165
  class: "tpl:text-[var(--tpl-primary)]",
3989
4166
  style: { opacity: "0.5" }
3990
- }), I("span", zo, D(c.value), 1)], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
4167
+ }), I("span", es, [V(Vr, { text: c.value }, null, 8, ["text"])])], 4)) : a.value ? (f(), k(R, { key: 2 }, [e.block.url ? (f(), k("a", {
3991
4168
  key: 0,
3992
4169
  href: e.block.url,
3993
4170
  target: "_blank",
@@ -3999,7 +4176,7 @@ var Ro = ["src", "alt"], zo = {
3999
4176
  class: "tpl:w-full tpl:border-0",
4000
4177
  src: a.value,
4001
4178
  alt: e.block.alt
4002
- }, null, 8, Vo), V(Fo, { "hover-effect": "" })], 12, Bo)) : (f(), k("div", {
4179
+ }, null, 8, ns), V(Xo, { "hover-effect": "" })], 12, ts)) : (f(), k("div", {
4003
4180
  key: 1,
4004
4181
  class: "tpl:relative tpl:inline-block",
4005
4182
  style: L(s.value)
@@ -4007,48 +4184,48 @@ var Ro = ["src", "alt"], zo = {
4007
4184
  class: "tpl:w-full tpl:border-0",
4008
4185
  src: a.value,
4009
4186
  alt: e.block.alt
4010
- }, null, 8, Ho), V(Fo)], 4))], 64)) : (f(), k("div", Uo, [V(j(Ai), {
4187
+ }, null, 8, rs), V(Xo)], 4))], 64)) : (f(), k("div", is, [V(j(zi), {
4011
4188
  size: 40,
4012
4189
  "stroke-width": 1.5,
4013
4190
  class: "tpl:text-[var(--tpl-border-light)]"
4014
4191
  }), I("span", null, D(j(n).video.addVideo), 1)]))], 4));
4015
4192
  }
4016
- }), Go = {
4017
- section: ho,
4018
- title: uo,
4019
- paragraph: qa,
4020
- image: Pa,
4021
- button: Fr,
4022
- divider: ma,
4023
- video: Wo,
4024
- social: To,
4025
- menu: Ra,
4026
- table: Po,
4027
- spacer: Oo,
4028
- html: ya,
4029
- countdown: T(() => import("./CountdownBlock-DChGTAsH.js").then((e) => e.n))
4193
+ }), os = {
4194
+ section: Ao,
4195
+ title: To,
4196
+ paragraph: oo,
4197
+ image: qa,
4198
+ button: Wr,
4199
+ divider: Da,
4200
+ video: as,
4201
+ social: Bo,
4202
+ menu: Za,
4203
+ table: Yo,
4204
+ spacer: Uo,
4205
+ html: Ma,
4206
+ countdown: E(() => import("./CountdownBlock-BEVAJQtQ.js").then((e) => e.n))
4030
4207
  };
4031
- function Ko(e) {
4208
+ function ss(e) {
4032
4209
  let { editor: t, config: n, translations: r, fontsManager: i } = e, { t: a, format: o } = Y(r);
4033
4210
  t.setUiTheme(n.uiTheme ?? "auto");
4034
- let { resolvedTheme: c } = yr(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = xr({
4211
+ let { resolvedTheme: c } = Er(O(() => t.state.uiTheme)), u = C(n.theme ?? {}), { themeStyles: d } = Or({
4035
4212
  themeOverrides: u,
4036
4213
  resolvedTheme: c,
4037
4214
  extraStyles: e.themeExtraStyles
4038
- }), f = At({
4215
+ }), f = Mt({
4039
4216
  content: t.content,
4040
4217
  setContent: (e, n) => t.setContent(e, n),
4041
4218
  ...e.historyOptions
4042
4219
  });
4043
- It(t, f);
4044
- let m = Mt({
4220
+ Rt(t, f);
4221
+ let m = Pt({
4045
4222
  addBlock: t.addBlock,
4046
4223
  removeBlock: t.removeBlock,
4047
4224
  updateBlock: t.updateBlock,
4048
4225
  selectBlock: t.selectBlock,
4049
4226
  findBlockLocation: t.findBlockLocation,
4050
4227
  blockDefaults: n.blockDefaults
4051
- }), h = Pt(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Nt({
4228
+ }), h = It(t), g = e.autoSaveOptions !== null && e.autoSaveOptions !== void 0 ? Ft({
4052
4229
  content: t.content,
4053
4230
  isDirty: () => t.state.isDirty,
4054
4231
  ...e.autoSaveOptions
@@ -4056,15 +4233,15 @@ function Ko(e) {
4056
4233
  g && (_ = H(f.isNavigating, (e) => {
4057
4234
  e ? g.pause() : g.resume();
4058
4235
  }));
4059
- let v = vr(t, {
4236
+ let v = Tr(t, {
4060
4237
  t: a,
4061
4238
  format: o
4062
- }), y = Tr();
4063
- if (Ar(y, Go), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, fa);
4239
+ }), y = Mr();
4240
+ if (Lr(y, os), n.customBlocks?.length) for (let e of n.customBlocks) y.registerCustom(e, Ta);
4064
4241
  function b(e) {
4065
- for (let t of e) y.registerCustom(t, fa);
4242
+ for (let t of e) y.registerCustom(t, Ta);
4066
4243
  }
4067
- let x = Fn();
4244
+ let x = Ln();
4068
4245
  if (s() && l(x.dispose), e.containerEl) {
4069
4246
  let t = e.containerEl;
4070
4247
  q(document, "pointerdown", (e) => {
@@ -4073,7 +4250,7 @@ function Ko(e) {
4073
4250
  }, { capture: !0 });
4074
4251
  }
4075
4252
  function S(r) {
4076
- x.isActive() && Mr(r, {
4253
+ x.isActive() && zr(r, {
4077
4254
  history: f,
4078
4255
  selectBlock: (e) => t.selectBlock(e),
4079
4256
  getSelectedBlockId: () => t.state.selectedBlockId,
@@ -4084,19 +4261,19 @@ function Ko(e) {
4084
4261
  }
4085
4262
  q(document, "keydown", S);
4086
4263
  let w = C(null);
4087
- p(or, e.editorRoot ?? document), p(sr, w), p(In, r), p(Ln, t), p(Rn, f), p(zn, m), p(Bn, h), p(Vn, i), p(Hn, d), p(Un, c), p(Wn, n.blockDefaults), p(Gn, y), p(Kn, n.customBlocks ?? []), p(qn, n.paletteBlocks), p(Jn, Er(t.content, y));
4088
- let ee = mt(n.mergeTags?.syntax);
4089
- p(Yn, n.mergeTags?.tags ?? []), p(Xn, ee), p(Zn, n.mergeTags?.onRequest ?? null), p(Qn, n.mergeTags?.autocomplete !== !1), p($n, mr()), p(er, n.onRequestMedia ?? null), p(tr, n.displayConditions?.conditions ?? []), p(nr, n.displayConditions?.allowCustom ?? !1), p(rr, e.capabilities ?? {}), p(ir, v);
4090
- let T = hr(n.lint) ? null : gr({
4264
+ p(fr, e.editorRoot ?? document), p(pr, w), p(Rn, r), p(zn, t), p(Bn, f), p(Vn, m), p(Hn, h), p(Un, i), p(Wn, d), p(Gn, c), p(Kn, n.blockDefaults), p(qn, y), p(Jn, n.customBlocks ?? []), p(Yn, n.paletteBlocks), p(Xn, Nr(t.content, y));
4265
+ let T = gt(n.mergeTags?.syntax);
4266
+ p(Zn, n.mergeTags?.tags ?? []), p(Qn, T), p($n, n.mergeTags?.onRequest ?? null), p(er, n.mergeTags?.autocomplete !== !1), p(tr, br()), p(nr, n.logicTags?.tags ?? []), p(rr, n.logicTags?.pairs ?? []), p(ar, n.logicTags?.onRequest ?? null), p(ir, xr()), p(or, n.onRequestMedia ?? null), p(sr, n.displayConditions?.conditions ?? []), p(cr, n.displayConditions?.allowCustom ?? !1), p(lr, e.capabilities ?? {}), p(ur, v);
4267
+ let E = Sr(n.lint) ? null : Cr({
4091
4268
  content: t.content,
4092
4269
  options: n.lint ?? {},
4093
4270
  updateBlock: t.updateBlock,
4094
4271
  updateSettings: t.updateSettings,
4095
4272
  removeBlock: t.removeBlock
4096
4273
  });
4097
- p(ar, T);
4098
- function E() {
4099
- _?.(), T?.destroy(), g?.destroy(), f.destroy();
4274
+ p(dr, E);
4275
+ function ee() {
4276
+ _?.(), E?.destroy(), g?.destroy(), f.destroy();
4100
4277
  }
4101
4278
  return {
4102
4279
  t: a,
@@ -4110,27 +4287,27 @@ function Ko(e) {
4110
4287
  themeOverrides: u,
4111
4288
  registry: y,
4112
4289
  keyboardReorder: v,
4113
- templateLint: T,
4290
+ templateLint: E,
4114
4291
  popoverRoot: w,
4115
4292
  registerCustomBlocks: b,
4116
- destroy: E
4293
+ destroy: ee
4117
4294
  };
4118
4295
  }
4119
4296
  //#endregion
4120
4297
  //#region src/composables/usePopoverRoot.ts
4121
- function qo() {
4122
- return v(sr, C(null));
4298
+ function cs() {
4299
+ return v(pr, C(null));
4123
4300
  }
4124
4301
  //#endregion
4125
4302
  //#region src/components/TplModal.vue?vue&type=script&setup=true&lang.ts
4126
- var Jo = ["data-tpl-theme"], Yo = /* @__PURE__ */ B({
4303
+ var ls = ["data-tpl-theme"], us = /* @__PURE__ */ B({
4127
4304
  __name: "TplModal",
4128
4305
  props: { visible: { type: Boolean } },
4129
4306
  emits: ["close", "keydown"],
4130
4307
  setup(e, { emit: t }) {
4131
4308
  let n = e, r = t, i = C(null);
4132
- Ui(i, O(() => n.visible));
4133
- let a = v(Un), s = qo();
4309
+ Qi(i, O(() => n.visible));
4310
+ let a = v(Gn), s = cs();
4134
4311
  function c(e) {
4135
4312
  e.key === "Escape" && r("close"), r("keydown", e);
4136
4313
  }
@@ -4159,11 +4336,11 @@ var Jo = ["data-tpl-theme"], Yo = /* @__PURE__ */ B({
4159
4336
  }, [I("div", {
4160
4337
  ref_key: "dialogRef",
4161
4338
  ref: i
4162
- }, [o(t.$slots, "default")], 512)], 40, Jo)) : A("", !0)]),
4339
+ }, [o(t.$slots, "default")], 512)], 40, ls)) : A("", !0)]),
4163
4340
  _: 3
4164
4341
  })], 8, ["to"])) : A("", !0);
4165
4342
  }
4166
- }), Xo = class e {
4343
+ }), ds = class e {
4167
4344
  static DEFAULT_BASE_URL = "https://templatical.com";
4168
4345
  accessToken = null;
4169
4346
  expiresAt = null;
@@ -4214,7 +4391,7 @@ var Jo = ["data-tpl-theme"], Yo = /* @__PURE__ */ B({
4214
4391
  return this.accessToken && !this.isTokenExpiringSoon() ? this.accessToken : this.refreshToken();
4215
4392
  }
4216
4393
  isTokenExpiringSoon() {
4217
- return this.expiresAt ? this.expiresAt.getTime() - Date.now() < e.REFRESH_THRESHOLD_MS : !0;
4394
+ return !this.expiresAt || this.expiresAt.getTime() - Date.now() < e.REFRESH_THRESHOLD_MS;
4218
4395
  }
4219
4396
  async refreshToken() {
4220
4397
  if (this.refreshPromise) return this.refreshPromise;
@@ -4237,7 +4414,7 @@ var Jo = ["data-tpl-theme"], Yo = /* @__PURE__ */ B({
4237
4414
  };
4238
4415
  e === "POST" && this.requestOptions.body && (t["Content-Type"] = "application/json", n.body = JSON.stringify(this.requestOptions.body));
4239
4416
  let r = await fetch(this.url, n);
4240
- if (!r.ok) throw new wt(`Token refresh failed: ${r.status}`, r.status);
4417
+ if (!r.ok) throw new Et(`Token refresh failed: ${r.status}`, r.status);
4241
4418
  let i = await r.json();
4242
4419
  if (!i.token || !i.expires_at || !i.project_id || !i.tenant) throw Error("Invalid token response: missing token, expires_at, project_id, or tenant");
4243
4420
  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 = {
@@ -4264,8 +4441,8 @@ var Jo = ["data-tpl-theme"], Yo = /* @__PURE__ */ B({
4264
4441
  return a.status === 401 && (a = await i(await this.refreshToken())), a;
4265
4442
  }
4266
4443
  };
4267
- function Zo(e, t) {
4268
- return e.mode === "direct" ? new Xo({
4444
+ function fs(e, t) {
4445
+ return e.mode === "direct" ? new ds({
4269
4446
  url: `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}/api/v1/auth/token`,
4270
4447
  baseUrl: e.baseUrl,
4271
4448
  requestOptions: {
@@ -4279,7 +4456,7 @@ function Zo(e, t) {
4279
4456
  }
4280
4457
  },
4281
4458
  onError: t
4282
- }) : new Xo({
4459
+ }) : new ds({
4283
4460
  url: e.url,
4284
4461
  baseUrl: e.baseUrl,
4285
4462
  requestOptions: e.requestOptions,
@@ -4291,16 +4468,16 @@ function Zo(e, t) {
4291
4468
  function Z(e, t) {
4292
4469
  return e.replace(/\{(\w+)\}/g, (e, n) => encodeURIComponent(t[n] ?? ""));
4293
4470
  }
4294
- var Qo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Qo}/templates/{template}`, $o = `${Q}/ai`, es = `${Qo}/media`, ts = `${es}/folders`, ns = `${Qo}/saved-modules`, $ = {
4471
+ var ps = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${ps}/templates/{template}`, ms = `${Q}/ai`, hs = `${ps}/media`, gs = `${hs}/folders`, _s = `${ps}/saved-modules`, $ = {
4295
4472
  health: "/api/v1/health",
4296
- "projects.config": `${Qo}/config`,
4297
- "broadcasting.auth": `${Qo}/broadcasting/auth`,
4298
- "templates.store": `${Qo}/templates`,
4473
+ "projects.config": `${ps}/config`,
4474
+ "broadcasting.auth": `${ps}/broadcasting/auth`,
4475
+ "templates.store": `${ps}/templates`,
4299
4476
  "templates.show": `${Q}`,
4300
4477
  "templates.update": `${Q}`,
4301
4478
  "templates.destroy": `${Q}`,
4302
4479
  "templates.export": `${Q}/export`,
4303
- "templates.importFromBeefree": `${Qo}/templates/import/from-beefree`,
4480
+ "templates.importFromBeefree": `${ps}/templates/import/from-beefree`,
4304
4481
  "templates.sendTestEmail": `${Q}/send-test-email`,
4305
4482
  "snapshots.index": `${Q}/snapshots`,
4306
4483
  "snapshots.store": `${Q}/snapshots`,
@@ -4311,31 +4488,31 @@ var Qo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Qo}/templates/{te
4311
4488
  "comments.update": `${Q}/comments/{comment}`,
4312
4489
  "comments.destroy": `${Q}/comments/{comment}`,
4313
4490
  "comments.resolve": `${Q}/comments/{comment}/resolve`,
4314
- "ai.generate": `${$o}/generate`,
4315
- "ai.conversationMessages": `${$o}/conversation-messages`,
4316
- "ai.suggestions": `${$o}/suggestions`,
4317
- "ai.rewriteText": `${$o}/rewrite-text`,
4318
- "ai.score": `${$o}/score`,
4319
- "ai.fixFinding": `${$o}/fix-finding`,
4320
- "ai.generateFromDesign": `${$o}/generate-from-design`,
4321
- "media.upload": `${es}/upload`,
4322
- "media.browse": `${es}/browse`,
4323
- "media.delete": `${es}/delete`,
4324
- "media.move": `${es}/move`,
4325
- "media.update": `${es}/{media}`,
4326
- "media.replace": `${es}/{media}/replace`,
4327
- "media.checkUsage": `${es}/check-usage`,
4328
- "media.frequentlyUsed": `${es}/frequently-used`,
4329
- "media.importFromUrl": `${es}/import-from-url`,
4330
- "folders.index": `${ts}`,
4331
- "folders.store": `${ts}`,
4332
- "folders.update": `${ts}/{mediaFolder}`,
4333
- "folders.destroy": `${ts}/{mediaFolder}`,
4334
- "savedModules.index": `${ns}`,
4335
- "savedModules.store": `${ns}`,
4336
- "savedModules.update": `${ns}/{savedModule}`,
4337
- "savedModules.destroy": `${ns}/{savedModule}`
4338
- }, rs = class {
4491
+ "ai.generate": `${ms}/generate`,
4492
+ "ai.conversationMessages": `${ms}/conversation-messages`,
4493
+ "ai.suggestions": `${ms}/suggestions`,
4494
+ "ai.rewriteText": `${ms}/rewrite-text`,
4495
+ "ai.score": `${ms}/score`,
4496
+ "ai.fixFinding": `${ms}/fix-finding`,
4497
+ "ai.generateFromDesign": `${ms}/generate-from-design`,
4498
+ "media.upload": `${hs}/upload`,
4499
+ "media.browse": `${hs}/browse`,
4500
+ "media.delete": `${hs}/delete`,
4501
+ "media.move": `${hs}/move`,
4502
+ "media.update": `${hs}/{media}`,
4503
+ "media.replace": `${hs}/{media}/replace`,
4504
+ "media.checkUsage": `${hs}/check-usage`,
4505
+ "media.frequentlyUsed": `${hs}/frequently-used`,
4506
+ "media.importFromUrl": `${hs}/import-from-url`,
4507
+ "folders.index": `${gs}`,
4508
+ "folders.store": `${gs}`,
4509
+ "folders.update": `${gs}/{mediaFolder}`,
4510
+ "folders.destroy": `${gs}/{mediaFolder}`,
4511
+ "savedModules.index": `${_s}`,
4512
+ "savedModules.store": `${_s}`,
4513
+ "savedModules.update": `${_s}/{savedModule}`,
4514
+ "savedModules.destroy": `${_s}/{savedModule}`
4515
+ }, vs = class {
4339
4516
  authManager;
4340
4517
  constructor(e) {
4341
4518
  this.authManager = e;
@@ -4363,7 +4540,7 @@ var Qo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Qo}/templates/{te
4363
4540
  });
4364
4541
  if (!n.ok) {
4365
4542
  let e = await n.json().catch(() => ({ message: `HTTP error ${n.status}` }));
4366
- throw new wt(this.extractFirstValidationError(e), n.status);
4543
+ throw new Et(this.extractFirstValidationError(e), n.status);
4367
4544
  }
4368
4545
  if (n.status !== 204) return (await n.json()).data;
4369
4546
  }
@@ -4521,14 +4698,14 @@ var Qo = "/api/v1/projects/{project}/tenants/{tenant}", Q = `${Qo}/templates/{te
4521
4698
  };
4522
4699
  //#endregion
4523
4700
  //#region ../core/src/cloud/websocket-client.ts
4524
- function is(e) {
4701
+ function ys(e) {
4525
4702
  return {
4526
4703
  host: e.host,
4527
4704
  port: e.port,
4528
4705
  appKey: e.app_key
4529
4706
  };
4530
4707
  }
4531
- var as = class {
4708
+ var bs = class {
4532
4709
  pusher = null;
4533
4710
  authManager;
4534
4711
  config;
@@ -4540,7 +4717,7 @@ var as = class {
4540
4717
  if (this.pusher) return;
4541
4718
  let e;
4542
4719
  try {
4543
- ({default: e} = await import("./pusher-BICWUP2j.js").then((e) => /* @__PURE__ */ t(e.t(), 1)));
4720
+ ({default: e} = await import("./pusher-CIwiKF8H.js").then((e) => /* @__PURE__ */ t(e.t(), 1)));
4544
4721
  } catch {
4545
4722
  throw Error("Cloud features require the optional peer dependency 'pusher-js'. Install it with: npm install pusher-js");
4546
4723
  }
@@ -4595,7 +4772,7 @@ var as = class {
4595
4772
  };
4596
4773
  //#endregion
4597
4774
  //#region ../core/src/cloud/mcp-operation-handler.ts
4598
- function os(e, t) {
4775
+ function xs(e, t) {
4599
4776
  let { operation: n, data: r } = t;
4600
4777
  switch (n) {
4601
4778
  case "add_block":
@@ -4623,11 +4800,11 @@ function os(e, t) {
4623
4800
  }
4624
4801
  //#endregion
4625
4802
  //#region ../core/src/cloud/editor.ts
4626
- function ss(e) {
4803
+ function Ss(e) {
4627
4804
  return e === "1" ? 1 : e === "3" ? 3 : 2;
4628
4805
  }
4629
- function cs(e) {
4630
- let t = new rs(e.authManager), n = S({
4806
+ function Cs(e) {
4807
+ let t = new vs(e.authManager), n = S({
4631
4808
  template: null,
4632
4809
  content: We(e.defaultFontFamily, e.templateDefaults),
4633
4810
  selectedBlockId: null,
@@ -4733,7 +4910,7 @@ function cs(e) {
4733
4910
  let l;
4734
4911
  if (r) {
4735
4912
  let e = o(n.content.blocks, r);
4736
- if (!e || e.type !== "section" || i < 0 || i >= ss(e.columns)) return;
4913
+ if (!e || e.type !== "section" || i < 0 || i >= Ss(e.columns)) return;
4737
4914
  e.children[i] = e.children[i] || [], l = e.children[i];
4738
4915
  } else l = n.content.blocks;
4739
4916
  let [u] = a.blocks.splice(c, 1);
@@ -4763,7 +4940,7 @@ function cs(e) {
4763
4940
  }
4764
4941
  }
4765
4942
  async function w() {
4766
- if (!n.template?.id) throw new wt("No template loaded. Call create() or load() before saving.");
4943
+ if (!n.template?.id) throw new Et("No template loaded. Call create() or load() before saving.");
4767
4944
  n.isSaving = !0;
4768
4945
  try {
4769
4946
  let e = await t.updateTemplate(n.template.id, n.content);
@@ -4774,17 +4951,17 @@ function cs(e) {
4774
4951
  n.isSaving = !1;
4775
4952
  }
4776
4953
  }
4777
- async function ee() {
4954
+ async function T() {
4778
4955
  if (n.template?.id) try {
4779
4956
  await t.createSnapshot(n.template.id, n.content);
4780
4957
  } catch (t) {
4781
4958
  throw e.onError?.(t), t;
4782
4959
  }
4783
4960
  }
4784
- function T() {
4961
+ function E() {
4785
4962
  return n.template?.id !== void 0;
4786
4963
  }
4787
- function E() {
4964
+ function ee() {
4788
4965
  n.isDirty = !0;
4789
4966
  }
4790
4967
  function D(e) {
@@ -4818,18 +4995,18 @@ function cs(e) {
4818
4995
  create: b,
4819
4996
  load: C,
4820
4997
  save: w,
4821
- createSnapshot: ee,
4822
- hasTemplate: T,
4823
- markDirty: E
4998
+ createSnapshot: T,
4999
+ hasTemplate: E,
5000
+ markDirty: ee
4824
5001
  };
4825
5002
  }
4826
5003
  //#endregion
4827
5004
  //#region ../core/src/cloud/ai-chat.ts
4828
- var ls = 0;
4829
- function us() {
4830
- return `msg_${Date.now()}_${++ls}`;
5005
+ var ws = 0;
5006
+ function Ts() {
5007
+ return `msg_${Date.now()}_${++ws}`;
4831
5008
  }
4832
- function ds(e) {
5009
+ function Es(e) {
4833
5010
  let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C([]), o = C(!1), s = C(!1), c = C(null), l = C(null), u = C(null), d = C(null), f = C(null), p = C(null), m = C(!1), h = C([]), g = C(!1);
4834
5011
  function _(e, t) {
4835
5012
  let n = a.value.findIndex((t) => t.id === e);
@@ -4923,14 +5100,14 @@ function ds(e) {
4923
5100
  let v = n();
4924
5101
  if (!v) throw Error("Template must be saved before using AI generation");
4925
5102
  o.value = !0, c.value = null, l.value = null, h.value = [];
4926
- let y = us();
5103
+ let y = Ts();
4927
5104
  a.value = [...a.value, {
4928
5105
  id: y,
4929
5106
  role: "user",
4930
5107
  content: e,
4931
5108
  timestamp: Date.now()
4932
5109
  }];
4933
- let b = us();
5110
+ let b = Ts();
4934
5111
  a.value = [...a.value, {
4935
5112
  id: b,
4936
5113
  role: "assistant",
@@ -5021,9 +5198,9 @@ function ds(e) {
5021
5198
  }
5022
5199
  //#endregion
5023
5200
  //#region ../core/src/cloud/ai-config.ts
5024
- function fs(e) {
5201
+ function Ds(e) {
5025
5202
  function t(t) {
5026
- return e === !1 ? !1 : e?.[t] !== !1;
5203
+ return e !== !1 && e?.[t] !== !1;
5027
5204
  }
5028
5205
  return {
5029
5206
  isFeatureEnabled: t,
@@ -5032,7 +5209,7 @@ function fs(e) {
5032
5209
  }
5033
5210
  //#endregion
5034
5211
  //#region ../core/src/cloud/template-scoring.ts
5035
- function ps(e) {
5212
+ function Os(e) {
5036
5213
  let { authManager: t, getTemplateId: n } = e, r = C(!1), i = C(null), a = C(null), o = C(null), s = C(""), c = C(null);
5037
5214
  async function l(e, o) {
5038
5215
  let s = n();
@@ -5177,7 +5354,7 @@ function ps(e) {
5177
5354
  }
5178
5355
  //#endregion
5179
5356
  //#region ../core/src/cloud/design-reference.ts
5180
- function ms(e) {
5357
+ function ks(e) {
5181
5358
  let { authManager: t, getTemplateId: n, onApply: r, onError: i } = e, a = C(!1), o = C(null);
5182
5359
  async function s(e) {
5183
5360
  let s = n();
@@ -5240,8 +5417,8 @@ function ms(e) {
5240
5417
  }
5241
5418
  //#endregion
5242
5419
  //#region ../core/src/cloud/comments.ts
5243
- function hs(e) {
5244
- let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new rs(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
5420
+ function As(e) {
5421
+ let { authManager: t, getTemplateId: n, getSocketId: r, onComment: i, onError: a, hasCommentingFeature: o } = e, s = new vs(t), c = C([]), l = C(!1), u = C(!1), d = O(() => (o?.() ?? !1) && t.userConfig !== null), f = O(() => {
5245
5422
  let e = 0;
5246
5423
  for (let t of c.value) e += 1 + (t.replies?.length ?? 0);
5247
5424
  return e;
@@ -5367,17 +5544,17 @@ function hs(e) {
5367
5544
  u.value = !1;
5368
5545
  }
5369
5546
  }
5370
- function ee(e) {
5547
+ function T(e) {
5371
5548
  if (e.parent_id) {
5372
5549
  let t = v(e.parent_id);
5373
5550
  t && (t.replies = [...t.replies ?? [], e]);
5374
5551
  } else c.value = [...c.value, e];
5375
5552
  _("created", e);
5376
5553
  }
5377
- function T(e) {
5554
+ function E(e) {
5378
5555
  D(e.id, e), _("updated", e);
5379
5556
  }
5380
- function E(e, t) {
5557
+ function ee(e, t) {
5381
5558
  let n = v(e), r = n ? {
5382
5559
  ...n,
5383
5560
  replies: [...n.replies ?? []]
@@ -5433,24 +5610,24 @@ function hs(e) {
5433
5610
  editComment: x,
5434
5611
  removeComment: S,
5435
5612
  toggleResolve: w,
5436
- applyRemoteCreate: ee,
5437
- applyRemoteUpdate: T,
5438
- applyRemoteDelete: E
5613
+ applyRemoteCreate: T,
5614
+ applyRemoteUpdate: E,
5615
+ applyRemoteDelete: ee
5439
5616
  };
5440
5617
  }
5441
5618
  //#endregion
5442
5619
  //#region ../core/src/cloud/comment-listener.ts
5443
- function gs(e) {
5620
+ function js(e) {
5444
5621
  let { comments: t, channel: n } = e;
5445
5622
  H(n, (e, n) => {
5446
5623
  n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
5447
- _s(t, e);
5624
+ Ms(t, e);
5448
5625
  });
5449
5626
  }), l(() => {
5450
5627
  n.value?.unbind("comment-broadcast");
5451
5628
  });
5452
5629
  }
5453
- function _s(e, t) {
5630
+ function Ms(e, t) {
5454
5631
  switch (t.action) {
5455
5632
  case "comment_created":
5456
5633
  e.applyRemoteCreate(t.comment);
@@ -5469,7 +5646,7 @@ function _s(e, t) {
5469
5646
  }
5470
5647
  //#endregion
5471
5648
  //#region ../core/src/cloud/collaboration.ts
5472
- var vs = [
5649
+ var Ns = [
5473
5650
  "pusher:member_added",
5474
5651
  "pusher:member_removed",
5475
5652
  "client-block_locked",
@@ -5477,10 +5654,10 @@ var vs = [
5477
5654
  "client-operation",
5478
5655
  "mcp-operation"
5479
5656
  ];
5480
- function ys(e) {
5481
- for (let t of vs) e.unbind(t);
5657
+ function Ps(e) {
5658
+ for (let t of Ns) e.unbind(t);
5482
5659
  }
5483
- var bs = [
5660
+ var Fs = [
5484
5661
  "#3b82f6",
5485
5662
  "#ef4444",
5486
5663
  "#10b981",
@@ -5492,10 +5669,10 @@ var bs = [
5492
5669
  "#6366f1",
5493
5670
  "#14b8a6"
5494
5671
  ];
5495
- function xs(e) {
5672
+ function Is(e) {
5496
5673
  let { authManager: t, editor: n, channel: r } = e, i = C([]), a = C(/* @__PURE__ */ new Map()), o = 0, s = !1, c = O(() => t.userConfig?.id ?? "");
5497
5674
  function u() {
5498
- let e = bs[o % bs.length];
5675
+ let e = Fs[o % Fs.length];
5499
5676
  return o++, e;
5500
5677
  }
5501
5678
  function d(e) {
@@ -5537,7 +5714,7 @@ function xs(e) {
5537
5714
  function h(e) {
5538
5715
  s = !0;
5539
5716
  try {
5540
- os(n, e);
5717
+ xs(n, e);
5541
5718
  } finally {
5542
5719
  s = !1;
5543
5720
  }
@@ -5557,7 +5734,7 @@ function xs(e) {
5557
5734
  return H(() => n.state.selectedBlockId, (e, t) => {
5558
5735
  s || (t && v(t), e && _(e));
5559
5736
  }), H(r, (t, n) => {
5560
- if (n && ys(n), !t) {
5737
+ if (n && Ps(n), !t) {
5561
5738
  i.value = [], a.value = /* @__PURE__ */ new Map(), o = 0;
5562
5739
  return;
5563
5740
  }
@@ -5589,7 +5766,7 @@ function xs(e) {
5589
5766
  h(e);
5590
5767
  });
5591
5768
  }), l(() => {
5592
- r.value && ys(r.value);
5769
+ r.value && Ps(r.value);
5593
5770
  }), {
5594
5771
  collaborators: i,
5595
5772
  lockedBlocks: a,
@@ -5599,7 +5776,7 @@ function xs(e) {
5599
5776
  }
5600
5777
  //#endregion
5601
5778
  //#region ../core/src/cloud/collaboration-broadcast.ts
5602
- function Ss(e, t) {
5779
+ function Ls(e, t) {
5603
5780
  let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
5604
5781
  e.addBlock = (e, r, i, a) => {
5605
5782
  n(e, r, i, a), t._broadcastOperation({
@@ -5654,11 +5831,11 @@ function Ss(e, t) {
5654
5831
  }
5655
5832
  //#endregion
5656
5833
  //#region ../core/src/cloud/web-socket.ts
5657
- function Cs(e) {
5834
+ function Rs(e) {
5658
5835
  let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = null, o = null;
5659
5836
  async function s(e, s) {
5660
5837
  if (a) return;
5661
- a = new as({
5838
+ a = new bs({
5662
5839
  authManager: t,
5663
5840
  config: s,
5664
5841
  onError: n
@@ -5686,8 +5863,8 @@ function Cs(e) {
5686
5863
  }
5687
5864
  //#endregion
5688
5865
  //#region ../core/src/cloud/saved-modules.ts
5689
- function ws(e) {
5690
- let t = new rs(e.authManager), n = C([]), r = C(!1);
5866
+ function zs(e) {
5867
+ let t = new vs(e.authManager), n = C([]), r = C(!1);
5691
5868
  async function i(i) {
5692
5869
  r.value = !0;
5693
5870
  try {
@@ -5735,8 +5912,8 @@ function ws(e) {
5735
5912
  }
5736
5913
  //#endregion
5737
5914
  //#region ../core/src/cloud/snapshots.ts
5738
- function Ts(e) {
5739
- let t = new rs(e.authManager), n = C([]), r = C(!1), i = C(!1);
5915
+ function Bs(e) {
5916
+ let t = new vs(e.authManager), n = C([]), r = C(!1), i = C(!1);
5740
5917
  async function a() {
5741
5918
  r.value = !0;
5742
5919
  try {
@@ -5768,8 +5945,8 @@ function Ts(e) {
5768
5945
  }
5769
5946
  //#endregion
5770
5947
  //#region ../core/src/cloud/test-email.ts
5771
- function Es(e) {
5772
- let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new rs(t), l = C(!1), u = C(null), d = C(null);
5948
+ function Vs(e) {
5949
+ let { authManager: t, getTemplateId: n, save: r, exportHtml: i, onError: a, isAuthReady: o, onBeforeTestEmail: s } = e, c = new vs(t), l = C(!1), u = C(null), d = C(null);
5773
5950
  o && H(o, (e) => {
5774
5951
  e && (d.value = t.testEmailConfig);
5775
5952
  }, { immediate: !0 });
@@ -5805,8 +5982,8 @@ function Es(e) {
5805
5982
  }
5806
5983
  //#endregion
5807
5984
  //#region ../core/src/cloud/export.ts
5808
- function Ds(e) {
5809
- let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new rs(t);
5985
+ function Hs(e) {
5986
+ let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new vs(t);
5810
5987
  function a() {
5811
5988
  let e = n?.();
5812
5989
  return {
@@ -5832,8 +6009,8 @@ function Ds(e) {
5832
6009
  }
5833
6010
  //#endregion
5834
6011
  //#region ../core/src/cloud/plan-config.ts
5835
- function Os(e) {
5836
- let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new rs(t), o = O(() => r.value?.features ?? null);
6012
+ function Us(e) {
6013
+ let { authManager: t, onError: n } = e, r = C(null), i = C(!1), a = new vs(t), o = O(() => r.value?.features ?? null);
5837
6014
  function s(e) {
5838
6015
  return r.value?.features[e] ?? !1;
5839
6016
  }
@@ -5859,11 +6036,11 @@ function Os(e) {
5859
6036
  }
5860
6037
  //#endregion
5861
6038
  //#region ../core/src/cloud/health-check.ts
5862
- var ks = 5e3;
5863
- function As(e) {
6039
+ var Ws = 5e3;
6040
+ function Gs(e) {
5864
6041
  return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
5865
6042
  }
5866
- async function js(e, t) {
6043
+ async function Ks(e, t) {
5867
6044
  let n = performance.now();
5868
6045
  try {
5869
6046
  let r = t ? await t.authenticatedFetch($.health, {
@@ -5915,7 +6092,7 @@ async function js(e, t) {
5915
6092
  };
5916
6093
  }
5917
6094
  }
5918
- async function Ms(e) {
6095
+ async function qs(e) {
5919
6096
  if (!e?.host || !e?.app_key) return {
5920
6097
  ok: !1,
5921
6098
  error: "WebSocket configuration not available"
@@ -5931,7 +6108,7 @@ async function Ms(e) {
5931
6108
  ok: !1,
5932
6109
  error: "WebSocket connection timed out"
5933
6110
  });
5934
- }, ks);
6111
+ }, Ws);
5935
6112
  try {
5936
6113
  n = new WebSocket(t);
5937
6114
  } catch (t) {
@@ -5951,8 +6128,8 @@ async function Ms(e) {
5951
6128
  };
5952
6129
  });
5953
6130
  }
5954
- async function Ns(e = {}) {
5955
- let t = await js(As(e), e.authManager), n = await Ms(t.wsConfig);
6131
+ async function Js(e = {}) {
6132
+ let t = await Ks(Gs(e), e.authManager), n = await qs(t.wsConfig);
5956
6133
  return {
5957
6134
  api: t.api,
5958
6135
  websocket: n,
@@ -5962,29 +6139,29 @@ async function Ns(e = {}) {
5962
6139
  }
5963
6140
  //#endregion
5964
6141
  //#region ../core/src/cloud/mcp-listener.ts
5965
- function Ps(e) {
6142
+ function Ys(e) {
5966
6143
  let { editor: t, channel: n, onOperation: r } = e;
5967
6144
  H(n, (e, n) => {
5968
6145
  n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
5969
- os(t, e), r?.(e);
6146
+ xs(t, e), r?.(e);
5970
6147
  });
5971
6148
  });
5972
6149
  }
5973
6150
  //#endregion
5974
6151
  //#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
5975
- var Fs = {
6152
+ var Xs = {
5976
6153
  key: 0,
5977
6154
  class: "tpl-ai-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
5978
- }, Is = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ls = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Rs = { class: "tpl:flex tpl:items-center tpl:gap-1" }, zs = ["title"], Bs = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, Vs = {
6155
+ }, Zs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Qs = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, $s = { class: "tpl:flex tpl:items-center tpl:gap-1" }, ec = ["title"], tc = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, nc = {
5979
6156
  key: 0,
5980
6157
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
5981
- }, Hs = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Us = {
6158
+ }, rc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ic = {
5982
6159
  key: 1,
5983
6160
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
5984
- }, Ws = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Gs = {
6161
+ }, ac = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, oc = {
5985
6162
  key: 2,
5986
6163
  class: "tpl:flex tpl:flex-col tpl:gap-4"
5987
- }, Ks = {
6164
+ }, sc = {
5988
6165
  key: 0,
5989
6166
  class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
5990
6167
  style: {
@@ -5993,10 +6170,10 @@ var Fs = {
5993
6170
  "max-width": "85%",
5994
6171
  "box-shadow": "var(--tpl-shadow)"
5995
6172
  }
5996
- }, qs = {
6173
+ }, cc = {
5997
6174
  key: 1,
5998
6175
  class: "tpl:flex tpl:flex-col tpl:gap-2"
5999
- }, Js = {
6176
+ }, lc = {
6000
6177
  key: 1,
6001
6178
  class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
6002
6179
  style: {
@@ -6005,21 +6182,21 @@ var Fs = {
6005
6182
  color: "var(--tpl-text)",
6006
6183
  "box-shadow": "var(--tpl-shadow)"
6007
6184
  }
6008
- }, Ys = {
6185
+ }, uc = {
6009
6186
  key: 0,
6010
6187
  class: "tpl:mx-3 tpl:mb-2 tpl:flex tpl:items-start tpl:gap-2 tpl:rounded-lg tpl:px-3 tpl:py-2 tpl:text-xs",
6011
6188
  style: {
6012
6189
  "background-color": "var(--tpl-danger-light)",
6013
6190
  color: "var(--tpl-danger)"
6014
6191
  }
6015
- }, Xs = {
6192
+ }, dc = {
6016
6193
  key: 1,
6017
6194
  class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
6018
6195
  style: {
6019
6196
  "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
6020
6197
  "backdrop-filter": "blur(2px)"
6021
6198
  }
6022
- }, Zs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, Qs = ["onClick"], $s = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ec = { 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)]" }, tc = ["placeholder", "disabled"], nc = ["disabled"], rc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ic = /*@__PURE__*/ B({
6199
+ }, fc = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, pc = ["onClick"], mc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, hc = { 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)]" }, gc = ["placeholder", "disabled"], _c = ["disabled"], vc = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, yc = /*@__PURE__*/ B({
6023
6200
  __name: "AiChatSidebar",
6024
6201
  props: {
6025
6202
  visible: { type: Boolean },
@@ -6027,14 +6204,14 @@ var Fs = {
6027
6204
  },
6028
6205
  emits: ["close"],
6029
6206
  setup(e, { emit: t }) {
6030
- let n = e, r = t, i = J(pr, "AiChatSidebar"), a = J(Ln, "AiChatSidebar"), o = J(cr, "AiChatSidebar"), s = v(Yn, []), l = ba(), u = ds({
6207
+ let n = e, r = t, i = J(yr, "AiChatSidebar"), a = J(zn, "AiChatSidebar"), o = J(mr, "AiChatSidebar"), s = v(Zn, []), l = Na(), u = Es({
6031
6208
  authManager: o,
6032
6209
  getTemplateId: () => a.state.template?.id ?? null,
6033
6210
  onApply: n.onApply,
6034
6211
  onError: void 0
6035
- }), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = sn(() => {
6212
+ }), d = C(""), p = C(null), g = C(!1), _ = C(0), { pause: y, resume: x } = ln(() => {
6036
6213
  _.value < (u.suggestions.value?.length ?? 0) ? _.value++ : y();
6037
- }, 150, { immediate: !1 }), { start: S } = cn(() => x(), 100, { immediate: !1 });
6214
+ }, 150, { immediate: !1 }), { start: S } = un(() => x(), 100, { immediate: !1 });
6038
6215
  H(() => u.suggestions.value?.length ?? 0, (e) => {
6039
6216
  if (y(), e === 0) {
6040
6217
  _.value = 0;
@@ -6053,18 +6230,18 @@ var Fs = {
6053
6230
  (u.messages.value?.length ?? 0) === 0 && a.content.value.blocks.length === 0 && u.loadSuggestions(a.content.value, s);
6054
6231
  }
6055
6232
  });
6056
- async function ee() {
6233
+ async function T() {
6057
6234
  let e = d.value.trim();
6058
6235
  !e || u.isGenerating.value || (d.value = "", u.error.value = null, u.failedPrompt.value = null, w(), await u.sendPrompt(e, a.content.value, s), l.alive && (u.failedPrompt.value && (d.value = u.failedPrompt.value), w()));
6059
6236
  }
6060
- function T(e) {
6237
+ function E(e) {
6061
6238
  return e.replace(/```json[\s\S]*?```/g, "").replace(/```json[\s\S]*/g, "").trim();
6062
6239
  }
6063
- function E(e) {
6064
- y(), d.value = e, ee();
6240
+ function ee(e) {
6241
+ y(), d.value = e, T();
6065
6242
  }
6066
6243
  function te(e) {
6067
- e.key === "Enter" && !e.shiftKey && (e.preventDefault(), ee());
6244
+ e.key === "Enter" && !e.shiftKey && (e.preventDefault(), T());
6068
6245
  }
6069
6246
  return (t, n) => (f(), N(ie, {
6070
6247
  "enter-active-class": "tpl-ai-slide-enter-active",
@@ -6074,42 +6251,42 @@ var Fs = {
6074
6251
  "leave-from-class": "tpl:translate-x-0",
6075
6252
  "leave-to-class": "tpl:translate-x-full"
6076
6253
  }, {
6077
- default: b(() => [e.visible ? (f(), k("div", Fs, [
6078
- I("div", Is, [I("div", Ls, [V(j(Xr), {
6254
+ default: b(() => [e.visible ? (f(), k("div", Xs, [
6255
+ I("div", Zs, [I("div", Qs, [V(j(Ni), {
6079
6256
  size: 13,
6080
6257
  "stroke-width": 2
6081
- }), I("span", null, D(j(i).aiChat.title), 1)]), I("div", Rs, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
6258
+ }), I("span", null, D(j(i).aiChat.title), 1)]), I("div", $s, [(j(u).messages.value?.length ?? 0) > 0 ? (f(), k("button", {
6082
6259
  key: 0,
6083
6260
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6084
6261
  title: j(i).aiChat.clear,
6085
6262
  onClick: n[0] ||= (e) => j(u).clearChat()
6086
- }, [V(j(Di), {
6263
+ }, [V(j(Fi), {
6087
6264
  size: 14,
6088
6265
  "stroke-width": 2
6089
- })], 8, zs)) : A("", !0), I("button", {
6266
+ })], 8, ec)) : A("", !0), I("button", {
6090
6267
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6091
6268
  onClick: n[1] ||= (e) => r("close")
6092
- }, [V(j(ji), {
6269
+ }, [V(j(Bi), {
6093
6270
  size: 14,
6094
6271
  "stroke-width": 2
6095
6272
  })])])]),
6096
- I("div", Bs, [
6273
+ I("div", tc, [
6097
6274
  I("div", {
6098
6275
  ref_key: "messagesContainer",
6099
6276
  ref: p,
6100
6277
  class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
6101
- }, [j(u).isLoadingHistory.value ? (f(), k("div", Vs, [V(j(Jr), {
6278
+ }, [j(u).isLoadingHistory.value ? (f(), k("div", nc, [V(j(xi), {
6102
6279
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
6103
6280
  size: 24,
6104
6281
  "stroke-width": 2
6105
- }), I("p", Hs, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", Us, [V(j(Xr), {
6282
+ }), I("p", rc, D(j(i).aiChat.loadingHistory), 1)])) : (j(u).messages.value?.length ?? 0) === 0 ? (f(), k("div", ic, [V(j(Ni), {
6106
6283
  size: 32,
6107
6284
  "stroke-width": 1.5,
6108
6285
  class: "tpl:text-[var(--tpl-text-dim)]"
6109
- }), I("p", Ws, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", Gs, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
6286
+ }), I("p", ac, D(j(i).aiChat.placeholder), 1)])) : (f(), k("div", oc, [(f(!0), k(R, null, h(j(u).messages.value, (e, t) => (f(), k("div", {
6110
6287
  key: e.id,
6111
6288
  class: "tpl:flex tpl:flex-col tpl:gap-2"
6112
- }, [e.role === "user" ? (f(), k("div", Ks, D(e.content), 1)) : (f(), k("div", qs, [!T(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Bi, { key: 0 })) : (f(), k("div", Js, D(T(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
6289
+ }, [e.role === "user" ? (f(), k("div", sc, D(e.content), 1)) : (f(), k("div", cc, [!E(e.content) && j(u).isGenerating.value && t === (j(u).messages.value?.length ?? 0) - 1 ? (f(), N(Yi, { key: 0 })) : (f(), k("div", lc, D(E(e.content) || j(i).aiChat.applied), 1)), e.id === j(u).lastApplyMessageId.value && !j(u).isGenerating.value ? (f(), k("button", {
6113
6290
  key: 2,
6114
6291
  class: "tpl:inline-flex tpl:items-center tpl:gap-1.5 tpl:self-start tpl:rounded-md tpl:border tpl:px-2.5 tpl:py-1.5 tpl:text-xs tpl:font-medium tpl:transition-all tpl:duration-150",
6115
6292
  style: {
@@ -6118,19 +6295,19 @@ var Fs = {
6118
6295
  "background-color": "transparent"
6119
6296
  },
6120
6297
  onClick: n[2] ||= (e) => j(u).toggleLastRevert()
6121
- }, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(bi), {
6298
+ }, [j(u).isLastChangeReverted.value ? (f(), k(R, { key: 0 }, [V(j(Ei), {
6122
6299
  size: 12,
6123
6300
  "stroke-width": 2
6124
- }), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Oi), {
6301
+ }), z(" " + D(j(i).aiChat.reapply), 1)], 64)) : (f(), k(R, { key: 1 }, [V(j(Li), {
6125
6302
  size: 12,
6126
6303
  "stroke-width": 2
6127
6304
  }), z(" " + D(j(i).aiChat.revert), 1)], 64))])) : A("", !0)]))]))), 128))]))], 512),
6128
- j(u).error.value ? (f(), k("div", Ys, [V(j(Gr), {
6305
+ j(u).error.value ? (f(), k("div", uc, [V(j(si), {
6129
6306
  size: 14,
6130
6307
  "stroke-width": 2,
6131
6308
  class: "tpl:mt-0.5 tpl:shrink-0"
6132
6309
  }), I("span", null, D(j(u).error.value === "ai_apply_failed" ? j(i).aiChat.applyFailed : j(i).aiChat.error), 1)])) : A("", !0),
6133
- (j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", Xs, [I("div", Zs, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
6310
+ (j(u).suggestions.value?.length ?? 0) > 0 ? (f(), k("div", dc, [I("div", fc, [(f(!0), k(R, null, h(j(u).suggestions.value ?? [], (e, t) => (f(), k("button", {
6134
6311
  key: t,
6135
6312
  class: F(["tpl-suggestion-btn tpl:cursor-pointer tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:text-left tpl:text-xs tpl:leading-snug tpl:transition-all tpl:duration-300 tpl:ease-out", (j(u).suggestions.value?.length ?? 0) - 1 - t < _.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
6136
6313
  style: {
@@ -6139,111 +6316,111 @@ var Fs = {
6139
6316
  "background-color": "var(--tpl-bg)",
6140
6317
  "box-shadow": "var(--tpl-shadow)"
6141
6318
  },
6142
- onClick: (t) => E(e)
6143
- }, D(e), 11, Qs))), 128))])])) : A("", !0)
6319
+ onClick: (t) => ee(e)
6320
+ }, D(e), 11, pc))), 128))])])) : A("", !0)
6144
6321
  ]),
6145
- I("div", $s, [I("div", ec, [c(I("textarea", {
6322
+ I("div", mc, [I("div", hc, [c(I("textarea", {
6146
6323
  "onUpdate:modelValue": n[3] ||= (e) => d.value = e,
6147
6324
  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)]",
6148
6325
  placeholder: j(i).aiChat.inputPlaceholder,
6149
6326
  disabled: j(u).isGenerating.value,
6150
6327
  rows: "3",
6151
6328
  onKeydown: te
6152
- }, null, 40, tc), [[ae, d.value]]), I("button", {
6329
+ }, null, 40, gc), [[ae, d.value]]), I("button", {
6153
6330
  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)]",
6154
6331
  disabled: !d.value.trim() || j(u).isGenerating.value,
6155
- onClick: ee
6156
- }, [V(j(Ci), {
6332
+ onClick: T
6333
+ }, [V(j(ki), {
6157
6334
  size: 16,
6158
6335
  "stroke-width": 2
6159
- })], 8, nc)]), I("p", rc, D(j(i).aiMenu.disclaimer), 1)])
6336
+ })], 8, _c)]), I("p", vc, D(j(i).aiMenu.disclaimer), 1)])
6160
6337
  ])) : A("", !0)]),
6161
6338
  _: 1
6162
6339
  }));
6163
6340
  }
6164
- }), ac = /* @__PURE__ */ e({ default: () => oc }), oc = /*#__PURE__*/ Ii(ic, [["__scopeId", "data-v-a55e4bff"]]), sc = 6e4, cc = 36e5, lc = 864e5;
6165
- function uc(e, t, n, r) {
6341
+ }), bc = /* @__PURE__ */ e({ default: () => xc }), xc = /*#__PURE__*/ Gi(yc, [["__scopeId", "data-v-a55e4bff"]]), Sc = 6e4, Cc = 36e5, wc = 864e5;
6342
+ function Tc(e, t, n, r) {
6166
6343
  let i = new Date(e).getTime();
6167
6344
  if (Number.isNaN(i)) return null;
6168
6345
  let a = Date.now() - i;
6169
6346
  if (a < -6e4) return null;
6170
- let o = Math.floor(a / sc), s = Math.floor(a / cc), c = Math.floor(a / lc);
6347
+ let o = Math.floor(a / Sc), s = Math.floor(a / Cc), c = Math.floor(a / wc);
6171
6348
  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));
6172
6349
  }
6173
6350
  //#endregion
6174
6351
  //#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
6175
- var dc = {
6352
+ var Ec = {
6176
6353
  key: 0,
6177
6354
  class: "tpl-comments-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
6178
- }, fc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, pc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, mc = {
6355
+ }, Dc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Oc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, kc = {
6179
6356
  key: 0,
6180
6357
  class: "tpl:ml-1 tpl:inline-flex tpl:size-5 tpl:items-center tpl:justify-center tpl:rounded-full tpl:text-[10px] tpl:font-semibold tpl:bg-[var(--tpl-primary)] tpl:text-[var(--tpl-bg)]"
6181
- }, hc = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, gc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, _c = {
6358
+ }, Ac = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, jc = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Mc = {
6182
6359
  key: 0,
6183
6360
  class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
6184
- }, vc = {
6361
+ }, Nc = {
6185
6362
  key: 1,
6186
6363
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
6187
- }, yc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, bc = {
6364
+ }, Pc = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Fc = {
6188
6365
  key: 2,
6189
6366
  class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
6190
- }, xc = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Sc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Cc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, wc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Tc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Ec = {
6367
+ }, Ic = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Lc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Rc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, zc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Bc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Vc = {
6191
6368
  key: 0,
6192
6369
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
6193
- }, Dc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Oc = ["title", "onClick"], kc = ["title", "onClick"], Ac = ["title", "onClick"], jc = {
6370
+ }, Hc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Uc = ["title", "onClick"], Wc = ["title", "onClick"], Gc = ["title", "onClick"], Kc = {
6194
6371
  key: 0,
6195
6372
  class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
6196
- }, Mc = {
6373
+ }, qc = {
6197
6374
  key: 0,
6198
6375
  class: "tpl:mt-1 tpl:inline-flex tpl:items-center tpl:gap-1 tpl:rounded tpl:px-1.5 tpl:py-0.5 tpl:text-[10px] tpl:font-medium tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
6199
- }, Nc = ["onClick"], Pc = {
6376
+ }, Jc = ["onClick"], Yc = {
6200
6377
  key: 2,
6201
6378
  class: "tpl:mt-2"
6202
- }, Fc = ["onKeydown"], Ic = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Lc = ["disabled", "onClick"], Rc = {
6379
+ }, Xc = ["onKeydown"], Zc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Qc = ["disabled", "onClick"], $c = {
6203
6380
  key: 3,
6204
6381
  class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
6205
- }, zc = {
6382
+ }, el = {
6206
6383
  key: 4,
6207
6384
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
6208
- }, Bc = { class: "tpl:flex-1" }, Vc = ["onClick"], Hc = {
6385
+ }, tl = { class: "tpl:flex-1" }, nl = ["onClick"], rl = {
6209
6386
  key: 5,
6210
6387
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
6211
- }, Uc = ["title", "onClick"], Wc = ["onClick"], Gc = {
6388
+ }, il = ["title", "onClick"], al = ["onClick"], ol = {
6212
6389
  key: 0,
6213
6390
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
6214
- }, Kc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, qc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Jc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Yc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Xc = {
6391
+ }, sl = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, cl = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, ll = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, ul = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, dl = {
6215
6392
  key: 0,
6216
6393
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
6217
- }, Zc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Qc = ["title", "onClick"], $c = ["title", "onClick"], el = {
6394
+ }, fl = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, pl = ["title", "onClick"], ml = ["title", "onClick"], hl = {
6218
6395
  key: 0,
6219
6396
  class: "tpl:mt-1.5"
6220
- }, tl = ["onKeydown"], nl = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, rl = ["disabled", "onClick"], il = {
6397
+ }, gl = ["onKeydown"], _l = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, vl = ["disabled", "onClick"], yl = {
6221
6398
  key: 1,
6222
6399
  class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
6223
- }, al = {
6400
+ }, bl = {
6224
6401
  key: 2,
6225
6402
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2 tpl:rounded-md tpl:px-2.5 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-danger-light)] tpl:text-[var(--tpl-danger)]"
6226
- }, ol = { class: "tpl:flex-1" }, sl = ["onClick"], cl = {
6403
+ }, xl = { class: "tpl:flex-1" }, Sl = ["onClick"], Cl = {
6227
6404
  key: 0,
6228
6405
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
6229
- }, ll = { class: "tpl:flex tpl:items-end tpl:gap-2" }, ul = ["placeholder", "onKeydown"], dl = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, fl = ["disabled", "onClick"], pl = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ml = {
6406
+ }, wl = { class: "tpl:flex tpl:items-end tpl:gap-2" }, Tl = ["placeholder", "onKeydown"], El = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Dl = ["disabled", "onClick"], Ol = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, kl = {
6230
6407
  key: 0,
6231
6408
  class: "tpl:flex tpl:min-h-[68px] tpl:items-center tpl:rounded-md tpl:px-3 tpl:py-2 tpl:text-xs tpl:bg-[var(--tpl-warning-light)] tpl:text-[var(--tpl-warning)]"
6232
- }, hl = {
6409
+ }, Al = {
6233
6410
  key: 1,
6234
6411
  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)]"
6235
- }, gl = ["placeholder", "disabled"], _l = ["disabled"], vl = /*@__PURE__*/ B({
6412
+ }, jl = ["placeholder", "disabled"], Ml = ["disabled"], Nl = /*@__PURE__*/ B({
6236
6413
  __name: "CommentsSidebar",
6237
6414
  props: { visible: { type: Boolean } },
6238
6415
  emits: ["close", "filterBlock"],
6239
6416
  setup(e, { expose: t, emit: n }) {
6240
- let r = e, i = n, { format: a } = Y(), { t: o } = Ki(), s = J(Ln, "CommentsSidebar"), l = J(cr, "CommentsSidebar"), u = J(ur, "CommentsSidebar"), d = C("unresolved"), p = C(null), g = C(""), _ = C(null), v = C(""), y = C(null), x = C(""), S = C(/* @__PURE__ */ new Set()), w = C(null), ee = C(null), T = O(() => l.userConfig?.id ?? null), E = O(() => {
6417
+ let r = e, i = n, { format: a } = Y(), { t: o } = ta(), s = J(zn, "CommentsSidebar"), l = J(mr, "CommentsSidebar"), u = J(gr, "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 = O(() => l.userConfig?.id ?? null), ee = O(() => {
6241
6418
  let e = /* @__PURE__ */ new Set();
6242
6419
  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);
6243
6420
  return e;
6244
6421
  });
6245
6422
  function te(e) {
6246
- return e ? !E.value.has(e) : !1;
6423
+ return e ? !ee.value.has(e) : !1;
6247
6424
  }
6248
6425
  let ne = O(() => d.value !== "block" || !p.value ? !1 : !(s.savedBlockIds?.value.has(p.value) ?? !0)), re = O(() => {
6249
6426
  let e = u.comments.value;
@@ -6302,10 +6479,10 @@ var dc = {
6302
6479
  await u.toggleResolve(e);
6303
6480
  }
6304
6481
  function _e(e) {
6305
- return e.author_identifier === T.value;
6482
+ return e.author_identifier === E.value;
6306
6483
  }
6307
6484
  function ve(e) {
6308
- return uc(e, o.snapshotHistory) ?? e;
6485
+ return Tc(e, o.snapshotHistory) ?? e;
6309
6486
  }
6310
6487
  function ye(e) {
6311
6488
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), fe());
@@ -6318,7 +6495,7 @@ var dc = {
6318
6495
  }
6319
6496
  function Se() {
6320
6497
  m(() => {
6321
- ee.value?.focus();
6498
+ T.value?.focus();
6322
6499
  });
6323
6500
  }
6324
6501
  return t({
@@ -6332,22 +6509,22 @@ var dc = {
6332
6509
  "leave-from-class": "tpl:translate-x-0",
6333
6510
  "leave-to-class": "tpl:translate-x-full"
6334
6511
  }, {
6335
- default: b(() => [e.visible ? (f(), k("div", dc, [
6336
- I("div", fc, [I("div", pc, [
6337
- V(j(gi), {
6512
+ default: b(() => [e.visible ? (f(), k("div", Ec, [
6513
+ I("div", Dc, [I("div", Oc, [
6514
+ V(j(Si), {
6338
6515
  size: 13,
6339
6516
  "stroke-width": 2
6340
6517
  }),
6341
6518
  I("span", null, D(j(o).comments.title), 1),
6342
- j(u).unresolvedCount.value > 0 ? (f(), k("span", mc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
6519
+ j(u).unresolvedCount.value > 0 ? (f(), k("span", kc, D(j(u).unresolvedCount.value), 1)) : A("", !0)
6343
6520
  ]), I("button", {
6344
6521
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6345
6522
  onClick: n[0] ||= (e) => i("close")
6346
- }, [V(j(ji), {
6523
+ }, [V(j(Bi), {
6347
6524
  size: 14,
6348
6525
  "stroke-width": 2
6349
6526
  })])]),
6350
- I("div", hc, [
6527
+ I("div", Ac, [
6351
6528
  I("button", {
6352
6529
  class: F(["tpl-comment-filter tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:transition-colors tpl:duration-150", d.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
6353
6530
  onClick: n[1] ||= (e) => M("unresolved")
@@ -6362,156 +6539,156 @@ var dc = {
6362
6539
  onClick: n[3] ||= (e) => M("block", j(s).state.selectedBlockId ?? void 0)
6363
6540
  }, D(j(o).comments.filterBlock), 3)) : A("", !0)
6364
6541
  ]),
6365
- I("div", gc, [j(u).isLoading.value ? (f(), k("div", _c, [V(j(Jr), {
6542
+ I("div", jc, [j(u).isLoading.value ? (f(), k("div", Mc, [V(j(xi), {
6366
6543
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
6367
6544
  size: 24,
6368
6545
  "stroke-width": 2
6369
- })])) : re.value.length === 0 ? (f(), k("div", vc, [V(j(gi), {
6546
+ })])) : re.value.length === 0 ? (f(), k("div", Nc, [V(j(Si), {
6370
6547
  size: 32,
6371
6548
  "stroke-width": 1.5,
6372
6549
  class: "tpl:text-[var(--tpl-text-dim)]"
6373
- }), I("p", yc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", bc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
6550
+ }), I("p", Pc, D(d.value === "all" ? j(o).comments.noCommentsHint : j(o).comments.noComments), 1)])) : (f(), k("div", Fc, [(f(!0), k(R, null, h(re.value, (e) => (f(), k("div", {
6374
6551
  key: e.id,
6375
6552
  class: "tpl-comment-thread"
6376
6553
  }, [
6377
- I("div", xc, [
6378
- I("div", Sc, [I("div", Cc, [
6379
- I("span", wc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
6380
- I("span", Tc, D(ve(e.created_at)), 1),
6381
- e.updated_at === e.created_at ? A("", !0) : (f(), k("span", Ec, " (" + D(j(o).comments.edited) + ") ", 1))
6382
- ]), I("div", Dc, [
6554
+ I("div", Ic, [
6555
+ I("div", Lc, [I("div", Rc, [
6556
+ I("span", zc, D(_e(e) ? j(o).comments.ownedByYou : e.author_name), 1),
6557
+ I("span", Bc, D(ve(e.created_at)), 1),
6558
+ e.updated_at === e.created_at ? A("", !0) : (f(), k("span", Vc, " (" + D(j(o).comments.edited) + ") ", 1))
6559
+ ]), I("div", Hc, [
6383
6560
  I("button", {
6384
6561
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6385
6562
  title: e.resolved_at ? j(o).comments.unresolve : j(o).comments.resolve,
6386
6563
  onClick: (t) => ge(e.id)
6387
- }, [V(j(Kr), {
6564
+ }, [V(j(ci), {
6388
6565
  size: 13,
6389
6566
  "stroke-width": 2,
6390
6567
  class: "tpl-resolve-icon",
6391
6568
  style: L({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
6392
- }, null, 8, ["style"])], 8, Oc),
6569
+ }, null, 8, ["style"])], 8, Uc),
6393
6570
  _e(e) ? (f(), k("button", {
6394
6571
  key: 0,
6395
6572
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6396
6573
  title: j(o).comments.edit,
6397
6574
  onClick: (t) => le(e)
6398
- }, [V(j(vi), {
6575
+ }, [V(j(wi), {
6399
6576
  size: 12,
6400
6577
  "stroke-width": 2
6401
- })], 8, kc)) : A("", !0),
6578
+ })], 8, Wc)) : A("", !0),
6402
6579
  _e(e) ? (f(), k("button", {
6403
6580
  key: 1,
6404
6581
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6405
6582
  title: j(o).comments.delete,
6406
6583
  onClick: (t) => ue(e.id)
6407
- }, [V(j(Di), {
6584
+ }, [V(j(Fi), {
6408
6585
  size: 12,
6409
6586
  "stroke-width": 2
6410
- })], 8, Ac)) : A("", !0)
6587
+ })], 8, Gc)) : A("", !0)
6411
6588
  ])]),
6412
6589
  V(ie, { name: "tpl-resolve" }, {
6413
- default: b(() => [e.resolved_at ? (f(), k("div", jc, [V(j(ei), {
6590
+ default: b(() => [e.resolved_at ? (f(), k("div", Kc, [V(j(ni), {
6414
6591
  size: 10,
6415
6592
  "stroke-width": 2.5
6416
6593
  }), I("span", null, D(j(a)(j(o).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : A("", !0)]),
6417
6594
  _: 2
6418
6595
  }, 1024),
6419
- e.block_id && te(e.block_id) ? (f(), k("span", Mc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
6596
+ e.block_id && te(e.block_id) ? (f(), k("span", qc, D(j(o).comments.missingBlock), 1)) : e.block_id ? (f(), k("button", {
6420
6597
  key: 1,
6421
6598
  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)]",
6422
6599
  onClick: (t) => j(s).selectBlock(e.block_id ?? "")
6423
- }, " Block ", 8, Nc)) : A("", !0),
6424
- y.value === e.id ? (f(), k("div", Pc, [c(I("textarea", {
6600
+ }, " Block ", 8, Jc)) : A("", !0),
6601
+ y.value === e.id ? (f(), k("div", Yc, [c(I("textarea", {
6425
6602
  "onUpdate:modelValue": n[4] ||= (e) => x.value = e,
6426
6603
  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)]",
6427
6604
  rows: "3",
6428
6605
  onKeydown: (t) => xe(t, e.id)
6429
- }, null, 40, Fc), [[ae, x.value]]), I("div", Ic, [I("button", {
6606
+ }, null, 40, Xc), [[ae, x.value]]), I("div", Zc, [I("button", {
6430
6607
  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)]",
6431
6608
  disabled: !x.value.trim() || j(u).isSubmitting.value,
6432
6609
  onClick: (t) => me(e.id)
6433
- }, D(j(o).comments.save), 9, Lc), I("button", {
6610
+ }, D(j(o).comments.save), 9, Qc), I("button", {
6434
6611
  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)]",
6435
6612
  onClick: n[5] ||= (e) => B()
6436
- }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", Rc, D(e.body), 1)),
6437
- w.value === e.id ? (f(), k("div", zc, [
6438
- I("span", Bc, D(j(o).comments.deleteConfirm), 1),
6613
+ }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", $c, D(e.body), 1)),
6614
+ w.value === e.id ? (f(), k("div", el, [
6615
+ I("span", tl, D(j(o).comments.deleteConfirm), 1),
6439
6616
  I("button", {
6440
6617
  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)]",
6441
6618
  onClick: (t) => he(e.id)
6442
- }, D(j(o).comments.delete), 9, Vc),
6619
+ }, D(j(o).comments.delete), 9, nl),
6443
6620
  I("button", {
6444
6621
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6445
6622
  onClick: n[6] ||= (e) => de()
6446
6623
  }, D(j(o).comments.cancel), 1)
6447
6624
  ])) : A("", !0),
6448
- y.value !== e.id && w.value !== e.id ? (f(), k("div", Hc, [I("button", {
6625
+ y.value !== e.id && w.value !== e.id ? (f(), k("div", rl, [I("button", {
6449
6626
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6450
6627
  title: j(o).comments.reply,
6451
6628
  onClick: (t) => se(e.id)
6452
- }, [V(j(Si), {
6629
+ }, [V(j(Oi), {
6453
6630
  size: 13,
6454
6631
  "stroke-width": 2,
6455
6632
  class: "tpl:text-[var(--tpl-primary)]"
6456
- })], 8, Uc), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
6633
+ })], 8, il), (e.replies?.length ?? 0) > 0 ? (f(), k("button", {
6457
6634
  key: 0,
6458
6635
  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)]",
6459
6636
  onClick: (t) => oe(e.id)
6460
- }, [S.value.has(e.id) ? (f(), N(j(ii), {
6637
+ }, [S.value.has(e.id) ? (f(), N(j(oi), {
6461
6638
  key: 0,
6462
6639
  size: 11,
6463
6640
  "stroke-width": 2
6464
- })) : (f(), N(j(ti), {
6641
+ })) : (f(), N(j(ri), {
6465
6642
  key: 1,
6466
6643
  size: 11,
6467
6644
  "stroke-width": 2
6468
- })), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, Wc)) : A("", !0)])) : A("", !0)
6645
+ })), z(" " + D((e.replies?.length ?? 0) === 1 ? j(a)(j(o).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : j(a)(j(o).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, al)) : A("", !0)])) : A("", !0)
6469
6646
  ]),
6470
6647
  V(ie, { name: "tpl-replies" }, {
6471
- default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", Gc, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
6648
+ default: b(() => [S.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), k("div", ol, [(f(!0), k(R, null, h(e.replies, (t, r) => (f(), k("div", {
6472
6649
  key: t.id,
6473
6650
  class: F(["tpl-comment-reply-card tpl:relative tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-2.5", r < (e.replies?.length ?? 0) - 1 ? "tpl:mb-2" : ""])
6474
6651
  }, [
6475
- I("div", Kc, [I("div", qc, [
6476
- I("span", Jc, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
6477
- I("span", Yc, D(ve(t.created_at)), 1),
6478
- t.updated_at === t.created_at ? A("", !0) : (f(), k("span", Xc, " (" + D(j(o).comments.edited) + ") ", 1))
6479
- ]), I("div", Zc, [_e(t) ? (f(), k("button", {
6652
+ I("div", sl, [I("div", cl, [
6653
+ I("span", ll, D(_e(t) ? j(o).comments.ownedByYou : t.author_name), 1),
6654
+ I("span", ul, D(ve(t.created_at)), 1),
6655
+ t.updated_at === t.created_at ? A("", !0) : (f(), k("span", dl, " (" + D(j(o).comments.edited) + ") ", 1))
6656
+ ]), I("div", fl, [_e(t) ? (f(), k("button", {
6480
6657
  key: 0,
6481
6658
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6482
6659
  title: j(o).comments.edit,
6483
6660
  onClick: (e) => le(t)
6484
- }, [V(j(vi), {
6661
+ }, [V(j(wi), {
6485
6662
  size: 11,
6486
6663
  "stroke-width": 2
6487
- })], 8, Qc)) : A("", !0), _e(t) ? (f(), k("button", {
6664
+ })], 8, pl)) : A("", !0), _e(t) ? (f(), k("button", {
6488
6665
  key: 1,
6489
6666
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6490
6667
  title: j(o).comments.delete,
6491
6668
  onClick: (e) => ue(t.id)
6492
- }, [V(j(Di), {
6669
+ }, [V(j(Fi), {
6493
6670
  size: 11,
6494
6671
  "stroke-width": 2
6495
- })], 8, $c)) : A("", !0)])]),
6496
- y.value === t.id ? (f(), k("div", el, [c(I("textarea", {
6672
+ })], 8, ml)) : A("", !0)])]),
6673
+ y.value === t.id ? (f(), k("div", hl, [c(I("textarea", {
6497
6674
  "onUpdate:modelValue": n[7] ||= (e) => x.value = e,
6498
6675
  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)]",
6499
6676
  rows: "2",
6500
6677
  onKeydown: (e) => xe(e, t.id)
6501
- }, null, 40, tl), [[ae, x.value]]), I("div", nl, [I("button", {
6678
+ }, null, 40, gl), [[ae, x.value]]), I("div", _l, [I("button", {
6502
6679
  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)]",
6503
6680
  disabled: !x.value.trim() || j(u).isSubmitting.value,
6504
6681
  onClick: (e) => me(t.id)
6505
- }, D(j(o).comments.save), 9, rl), I("button", {
6682
+ }, D(j(o).comments.save), 9, vl), I("button", {
6506
6683
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6507
6684
  onClick: n[8] ||= (e) => B()
6508
- }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", il, D(t.body), 1)),
6509
- w.value === t.id ? (f(), k("div", al, [
6510
- I("span", ol, D(j(o).comments.deleteConfirm), 1),
6685
+ }, D(j(o).comments.cancel), 1)])])) : (f(), k("p", yl, D(t.body), 1)),
6686
+ w.value === t.id ? (f(), k("div", bl, [
6687
+ I("span", xl, D(j(o).comments.deleteConfirm), 1),
6511
6688
  I("button", {
6512
6689
  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)]",
6513
6690
  onClick: (e) => he(t.id)
6514
- }, D(j(o).comments.delete), 9, sl),
6691
+ }, D(j(o).comments.delete), 9, Sl),
6515
6692
  I("button", {
6516
6693
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6517
6694
  onClick: n[9] ||= (e) => de()
@@ -6521,78 +6698,78 @@ var dc = {
6521
6698
  _: 2
6522
6699
  }, 1024),
6523
6700
  V(ie, { name: "tpl-replies" }, {
6524
- default: b(() => [_.value === e.id ? (f(), k("div", cl, [I("div", ll, [c(I("textarea", {
6701
+ default: b(() => [_.value === e.id ? (f(), k("div", Cl, [I("div", wl, [c(I("textarea", {
6525
6702
  "onUpdate:modelValue": n[10] ||= (e) => v.value = e,
6526
6703
  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)]",
6527
6704
  placeholder: j(o).comments.replyPlaceholder,
6528
6705
  rows: "2",
6529
6706
  onKeydown: (t) => be(t, e.id)
6530
- }, null, 40, ul), [[ae, v.value]]), I("div", dl, [I("button", {
6707
+ }, null, 40, Tl), [[ae, v.value]]), I("div", El, [I("button", {
6531
6708
  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)]",
6532
6709
  disabled: !v.value.trim() || j(u).isSubmitting.value,
6533
6710
  onClick: (t) => pe(e.id)
6534
- }, [V(j(Ci), {
6711
+ }, [V(j(ki), {
6535
6712
  size: 14,
6536
6713
  "stroke-width": 2
6537
- })], 8, fl), I("button", {
6714
+ })], 8, Dl), I("button", {
6538
6715
  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)]",
6539
6716
  onClick: n[11] ||= (e) => ce()
6540
- }, [V(j(ji), {
6717
+ }, [V(j(Bi), {
6541
6718
  size: 14,
6542
6719
  "stroke-width": 2
6543
6720
  })])])])])) : A("", !0)]),
6544
6721
  _: 2
6545
6722
  }, 1024)
6546
6723
  ]))), 128))]))]),
6547
- I("div", pl, [ne.value ? (f(), k("div", ml, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", hl, [c(I("textarea", {
6724
+ I("div", Ol, [ne.value ? (f(), k("div", kl, D(j(o).comments.saveTemplateFirst), 1)) : (f(), k("div", Al, [c(I("textarea", {
6548
6725
  ref_key: "newCommentInput",
6549
- ref: ee,
6726
+ ref: T,
6550
6727
  "onUpdate:modelValue": n[12] ||= (e) => g.value = e,
6551
6728
  class: "tpl:max-h-24 tpl:min-h-[48px] tpl:flex-1 tpl:resize-none tpl:border-none tpl:bg-transparent tpl:font-sans tpl:text-xs tpl:outline-none tpl:text-[var(--tpl-text)]",
6552
6729
  placeholder: j(o).comments.placeholder,
6553
6730
  disabled: j(u).isSubmitting.value,
6554
6731
  rows: "2",
6555
6732
  onKeydown: ye
6556
- }, null, 40, gl), [[ae, g.value]]), I("button", {
6733
+ }, null, 40, jl), [[ae, g.value]]), I("button", {
6557
6734
  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)]",
6558
6735
  disabled: !g.value.trim() || j(u).isSubmitting.value,
6559
6736
  onClick: fe
6560
- }, [j(u).isSubmitting.value ? (f(), N(j(Jr), {
6737
+ }, [j(u).isSubmitting.value ? (f(), N(j(xi), {
6561
6738
  key: 0,
6562
6739
  class: "tpl-spinner",
6563
6740
  size: 16,
6564
6741
  "stroke-width": 2
6565
- })) : (f(), N(j(Ci), {
6742
+ })) : (f(), N(j(ki), {
6566
6743
  key: 1,
6567
6744
  size: 16,
6568
6745
  "stroke-width": 2
6569
- }))], 8, _l)]))])
6746
+ }))], 8, Ml)]))])
6570
6747
  ])) : A("", !0)]),
6571
6748
  _: 1
6572
6749
  }));
6573
6750
  }
6574
- }), yl = /* @__PURE__ */ e({ default: () => bl }), bl = /*#__PURE__*/ Ii(vl, [["__scopeId", "data-v-d204f573"]]), xl = {
6751
+ }), Pl = /* @__PURE__ */ e({ default: () => Fl }), Fl = /*#__PURE__*/ Gi(Nl, [["__scopeId", "data-v-d204f573"]]), Il = {
6575
6752
  key: 0,
6576
6753
  class: "tpl-design-sidebar tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
6577
- }, Sl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Cl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, wl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Tl = {
6754
+ }, Ll = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Rl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, zl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Bl = {
6578
6755
  key: 0,
6579
6756
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6580
- }, El = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Dl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ol = {
6757
+ }, Vl = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Hl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ul = {
6581
6758
  key: 1,
6582
6759
  class: "tpl:flex tpl:flex-col tpl:gap-4"
6583
- }, kl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Al = {
6760
+ }, Wl = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Gl = {
6584
6761
  key: 0,
6585
6762
  class: "tpl:flex tpl:flex-col tpl:gap-2"
6586
- }, jl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ml = ["src", "alt"], Nl = {
6763
+ }, Kl = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, ql = ["src", "alt"], Jl = {
6587
6764
  key: 1,
6588
6765
  class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
6589
- }, Pl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Fl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Il = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ll = ["accept"], Rl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, zl = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Bl = ["placeholder"], Vl = {
6766
+ }, Yl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Xl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, Zl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ql = ["accept"], $l = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, eu = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, tu = ["placeholder"], nu = {
6590
6767
  key: 0,
6591
6768
  class: "tpl:flex tpl:flex-col tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:px-3 tpl:py-3 tpl:bg-[var(--tpl-warning-light)] tpl:border tpl:border-[var(--tpl-warning)]"
6592
- }, Hl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Ul = { class: "tpl:flex tpl:gap-2" }, Wl = {
6769
+ }, ru = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, iu = { class: "tpl:flex tpl:gap-2" }, au = {
6593
6770
  key: 1,
6594
6771
  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)]"
6595
- }, Gl = ["disabled"], Kl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ql = /*@__PURE__*/ B({
6772
+ }, ou = ["disabled"], su = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, cu = /*@__PURE__*/ B({
6596
6773
  __name: "DesignReferenceSidebar",
6597
6774
  props: {
6598
6775
  visible: { type: Boolean },
@@ -6600,11 +6777,11 @@ var dc = {
6600
6777
  },
6601
6778
  emits: ["close", "apply"],
6602
6779
  setup(e, { emit: t }) {
6603
- let n = e, r = t, { t: i } = Ki(), a = J(Ln, "DesignReferenceSidebar"), o = ms({
6604
- authManager: J(cr, "DesignReferenceSidebar"),
6780
+ let n = e, r = t, { t: i } = ta(), a = J(zn, "DesignReferenceSidebar"), o = ks({
6781
+ authManager: J(mr, "DesignReferenceSidebar"),
6605
6782
  getTemplateId: () => a.state.template?.id ?? null,
6606
6783
  onApply: (e) => r("apply", e)
6607
- }), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => o.isGenerating.value ? !1 : u.value !== null);
6784
+ }), s = C(null), l = C("image"), u = C(null), d = C(""), p = C(null), m = C(!1), h = C(!1), g = O(() => !o.isGenerating.value && u.value !== null);
6608
6785
  function _(e) {
6609
6786
  l.value = e, x();
6610
6787
  }
@@ -6642,12 +6819,12 @@ var dc = {
6642
6819
  function w() {
6643
6820
  h.value = !1;
6644
6821
  }
6645
- function ee(e) {
6822
+ function T(e) {
6646
6823
  e.preventDefault(), h.value = !1;
6647
6824
  let t = e.dataTransfer?.files?.[0];
6648
6825
  t && y(t);
6649
6826
  }
6650
- function T() {
6827
+ function E() {
6651
6828
  if (!g.value) return;
6652
6829
  if (n.hasExistingBlocks && !m.value) {
6653
6830
  m.value = !0;
@@ -6657,7 +6834,7 @@ var dc = {
6657
6834
  let e = {};
6658
6835
  d.value.trim() && (e.prompt = d.value.trim()), l.value === "image" && u.value ? e.imageUpload = u.value : l.value === "pdf" && u.value && (e.pdfUpload = u.value), o.generate(e);
6659
6836
  }
6660
- function E() {
6837
+ function ee() {
6661
6838
  m.value = !1;
6662
6839
  }
6663
6840
  return H(() => n.visible, (e) => {
@@ -6672,17 +6849,17 @@ var dc = {
6672
6849
  "leave-from-class": "tpl:translate-x-0",
6673
6850
  "leave-to-class": "tpl:translate-x-full"
6674
6851
  }, {
6675
- default: b(() => [e.visible ? (f(), k("div", xl, [I("div", Sl, [I("div", Cl, [V(j(pi), {
6852
+ default: b(() => [e.visible ? (f(), k("div", Il, [I("div", Ll, [I("div", Rl, [V(j(vi), {
6676
6853
  size: 13,
6677
6854
  "stroke-width": 2
6678
6855
  }), I("span", null, D(j(i).designReference.title), 1)]), I("button", {
6679
6856
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6680
6857
  onClick: n[0] ||= (e) => r("close")
6681
- }, [V(j(ji), {
6858
+ }, [V(j(Bi), {
6682
6859
  size: 14,
6683
6860
  "stroke-width": 2
6684
- })])]), I("div", wl, [j(o).isGenerating.value ? (f(), k("div", Tl, [I("div", El, [V(Bi), I("p", Dl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Ol, [
6685
- I("div", kl, [I("button", {
6861
+ })])]), I("div", zl, [j(o).isGenerating.value ? (f(), k("div", Bl, [I("div", Vl, [V(Yi), I("p", Hl, D(j(i).designReference.generating), 1)])])) : (f(), k("div", Ul, [
6862
+ I("div", Wl, [I("button", {
6686
6863
  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",
6687
6864
  style: L({
6688
6865
  backgroundColor: l.value === "image" ? "var(--tpl-bg)" : "transparent",
@@ -6690,7 +6867,7 @@ var dc = {
6690
6867
  boxShadow: l.value === "image" ? "var(--tpl-shadow)" : "none"
6691
6868
  }),
6692
6869
  onClick: n[1] ||= (e) => _("image")
6693
- }, [V(j(ui), {
6870
+ }, [V(j(mi), {
6694
6871
  size: 12,
6695
6872
  "stroke-width": 2
6696
6873
  }), z(" " + D(j(i).designReference.uploadImage), 1)], 4), I("button", {
@@ -6701,23 +6878,23 @@ var dc = {
6701
6878
  boxShadow: l.value === "pdf" ? "var(--tpl-shadow)" : "none"
6702
6879
  }),
6703
6880
  onClick: n[2] ||= (e) => _("pdf")
6704
- }, [V(j(di), {
6881
+ }, [V(j(hi), {
6705
6882
  size: 12,
6706
6883
  "stroke-width": 2
6707
6884
  }), z(" " + D(j(i).designReference.uploadPdf), 1)], 4)]),
6708
- I("div", null, [u.value ? (f(), k("div", Al, [I("div", jl, [p.value ? (f(), k("img", {
6885
+ I("div", null, [u.value ? (f(), k("div", Gl, [I("div", Kl, [p.value ? (f(), k("img", {
6709
6886
  key: 0,
6710
6887
  src: p.value,
6711
6888
  alt: u.value.name,
6712
6889
  class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
6713
- }, null, 8, Ml)) : (f(), k("div", Nl, [V(j(di), {
6890
+ }, null, 8, ql)) : (f(), k("div", Jl, [V(j(hi), {
6714
6891
  size: 32,
6715
6892
  "stroke-width": 1.5,
6716
6893
  class: "tpl:text-[var(--tpl-text-dim)]"
6717
- }), I("span", Pl, D(u.value.name), 1)])), I("button", {
6894
+ }), I("span", Yl, D(u.value.name), 1)])), I("button", {
6718
6895
  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)]",
6719
6896
  onClick: x
6720
- }, [V(j(ji), {
6897
+ }, [V(j(Bi), {
6721
6898
  size: 12,
6722
6899
  "stroke-width": 2
6723
6900
  })])])])) : (f(), k("div", {
@@ -6730,15 +6907,15 @@ var dc = {
6730
6907
  onClick: n[3] ||= (e) => s.value?.click(),
6731
6908
  onDragover: S,
6732
6909
  onDragleave: w,
6733
- onDrop: ee
6910
+ onDrop: T
6734
6911
  }, [
6735
- V(j(ki), {
6912
+ V(j(Ri), {
6736
6913
  size: 24,
6737
6914
  "stroke-width": 1.5,
6738
6915
  class: "tpl:text-[var(--tpl-text-dim)]"
6739
6916
  }),
6740
- I("span", Fl, D(j(i).designReference.dropHint), 1),
6741
- I("span", Il, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
6917
+ I("span", Xl, D(j(i).designReference.dropHint), 1),
6918
+ I("span", Zl, D(l.value === "image" ? j(i).designReference.acceptedImages : j(i).designReference.acceptedPdf), 1)
6742
6919
  ], 36)), I("input", {
6743
6920
  ref_key: "fileInput",
6744
6921
  ref: s,
@@ -6746,22 +6923,22 @@ var dc = {
6746
6923
  class: "tpl:hidden",
6747
6924
  accept: l.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
6748
6925
  onChange: v
6749
- }, null, 40, Ll)]),
6750
- I("div", Rl, [I("label", zl, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
6926
+ }, null, 40, Ql)]),
6927
+ I("div", $l, [I("label", eu, D(j(i).designReference.promptLabel), 1), c(I("textarea", {
6751
6928
  "onUpdate:modelValue": n[4] ||= (e) => d.value = e,
6752
6929
  class: F(["tpl:min-h-[72px] tpl:w-full tpl:resize-none tpl:rounded-[var(--tpl-radius-sm)] tpl:border tpl:px-3 tpl:py-2 tpl:font-sans tpl:text-sm tpl:outline-none tpl:transition-colors tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", ["tpl-design-prompt-input"]]),
6753
6930
  placeholder: j(i).designReference.promptPlaceholder,
6754
6931
  rows: "3"
6755
- }, null, 8, Bl), [[ae, d.value]])]),
6756
- m.value ? (f(), k("div", Vl, [I("p", Hl, D(j(i).designReference.replaceWarning), 1), I("div", Ul, [I("button", {
6932
+ }, null, 8, tu), [[ae, d.value]])]),
6933
+ m.value ? (f(), k("div", nu, [I("p", ru, D(j(i).designReference.replaceWarning), 1), I("div", iu, [I("button", {
6757
6934
  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)]",
6758
6935
  style: { "background-color": "transparent" },
6759
- onClick: E
6936
+ onClick: ee
6760
6937
  }, D(j(i).designReference.replaceCancel), 1), I("button", {
6761
6938
  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)]",
6762
- onClick: T
6939
+ onClick: E
6763
6940
  }, D(j(i).designReference.replaceConfirm), 1)])])) : A("", !0),
6764
- j(o).error.value ? (f(), k("div", Wl, [V(j(Gr), {
6941
+ j(o).error.value ? (f(), k("div", au, [V(j(si), {
6765
6942
  size: 14,
6766
6943
  "stroke-width": 2,
6767
6944
  class: "tpl:mt-0.5 tpl:shrink-0"
@@ -6770,36 +6947,36 @@ var dc = {
6770
6947
  key: 2,
6771
6948
  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)]",
6772
6949
  disabled: !g.value,
6773
- onClick: T
6774
- }, [V(j(pi), {
6950
+ onClick: E
6951
+ }, [V(j(vi), {
6775
6952
  size: 16,
6776
6953
  "stroke-width": 2
6777
- }), z(" " + D(j(i).designReference.generate), 1)], 8, Gl)),
6778
- I("p", Kl, D(j(i).aiMenu.disclaimer), 1)
6954
+ }), z(" " + D(j(i).designReference.generate), 1)], 8, ou)),
6955
+ I("p", su, D(j(i).aiMenu.disclaimer), 1)
6779
6956
  ]))])])) : A("", !0)]),
6780
6957
  _: 1
6781
6958
  }));
6782
6959
  }
6783
- }), Jl = /* @__PURE__ */ e({ default: () => Yl }), Yl = /*#__PURE__*/ Ii(ql, [["__scopeId", "data-v-bdbf8d0d"]]), Xl = ["disabled", "title"], Zl = ["title"], Ql = {
6960
+ }), lu = /* @__PURE__ */ e({ default: () => uu }), uu = /*#__PURE__*/ Gi(cu, [["__scopeId", "data-v-bdbf8d0d"]]), du = ["disabled", "title"], fu = ["title"], pu = {
6784
6961
  key: 0,
6785
6962
  class: "tpl-scale-in tpl:absolute tpl:top-full tpl:left-1/2 tpl:z-50 tpl:mt-2 tpl:w-72 tpl:-translate-x-1/2 tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:bg-[var(--tpl-bg-elevated)] tpl:border tpl:border-[var(--tpl-border)] tpl:shadow-[var(--tpl-shadow-lg)]",
6786
6963
  style: {
6787
6964
  "backdrop-filter": "blur(8px)",
6788
6965
  "-webkit-backdrop-filter": "blur(8px)"
6789
6966
  }
6790
- }, $l = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, eu = {
6967
+ }, mu = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, hu = {
6791
6968
  key: 0,
6792
6969
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
6793
- }, tu = {
6970
+ }, gu = {
6794
6971
  key: 1,
6795
6972
  class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
6796
- }, nu = {
6973
+ }, _u = {
6797
6974
  key: 2,
6798
6975
  class: "tpl:max-h-64 tpl:overflow-y-auto"
6799
- }, ru = ["disabled", "onClick"], iu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, au = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ou = {
6976
+ }, vu = ["disabled", "onClick"], yu = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, bu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, xu = {
6800
6977
  key: 0,
6801
6978
  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)]"
6802
- }, su = ["disabled", "title"], cu = /*@__PURE__*/ B({
6979
+ }, Su = ["disabled", "title"], Cu = /*@__PURE__*/ B({
6803
6980
  __name: "SnapshotHistory",
6804
6981
  props: {
6805
6982
  snapshots: {},
@@ -6808,7 +6985,7 @@ var dc = {
6808
6985
  },
6809
6986
  emits: ["load", "navigate"],
6810
6987
  setup(e, { emit: t }) {
6811
- let n = e, r = t, { format: i } = Y(), { t: a } = Ki(), o = C(!1), s = C(null), c = C(-1);
6988
+ let n = e, r = t, { format: i } = Y(), { t: a } = ta(), o = C(!1), s = C(null), c = C(-1);
6812
6989
  H(() => n.snapshots.length, () => {
6813
6990
  c.value = -1;
6814
6991
  });
@@ -6827,7 +7004,7 @@ var dc = {
6827
7004
  t !== -1 && (c.value = t, r("navigate", n.snapshots[t])), o.value = !1;
6828
7005
  }
6829
7006
  function _(e) {
6830
- let t = uc(e, a.snapshotHistory, i, 7);
7007
+ let t = Tc(e, a.snapshotHistory, i, 7);
6831
7008
  return t === null ? new Date(e).toLocaleDateString(void 0, {
6832
7009
  month: "short",
6833
7010
  day: "numeric",
@@ -6835,7 +7012,7 @@ var dc = {
6835
7012
  minute: "2-digit"
6836
7013
  }) : t;
6837
7014
  }
6838
- return gn(s, () => {
7015
+ return vn(s, () => {
6839
7016
  o.value = !1;
6840
7017
  }), (t, n) => (f(), k("div", {
6841
7018
  ref_key: "dropdownRef",
@@ -6847,34 +7024,34 @@ var dc = {
6847
7024
  disabled: !u.value,
6848
7025
  title: j(a).snapshotHistory.olderSnapshot,
6849
7026
  onClick: M(p, ["stop"])
6850
- }, [V(j(ni), {
7027
+ }, [V(j(ii), {
6851
7028
  size: 14,
6852
7029
  "stroke-width": 2
6853
- })], 8, Xl),
7030
+ })], 8, du),
6854
7031
  I("button", {
6855
7032
  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)]",
6856
7033
  title: j(a).snapshotHistory.tooltip,
6857
7034
  onClick: M(m, ["stop"])
6858
- }, [V(j(ai), {
7035
+ }, [V(j(li), {
6859
7036
  size: 16,
6860
7037
  "stroke-width": 1.5
6861
- }), V(j(ti), {
7038
+ }), V(j(ri), {
6862
7039
  class: F(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": o.value }]),
6863
7040
  size: 10,
6864
7041
  "stroke-width": 2
6865
- }, null, 8, ["class"])], 8, Zl),
7042
+ }, null, 8, ["class"])], 8, fu),
6866
7043
  V(ie, { name: "tpl-dropdown" }, {
6867
- default: b(() => [o.value ? (f(), k("div", Ql, [I("div", $l, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", eu, [V(j(Jr), {
7044
+ default: b(() => [o.value ? (f(), k("div", pu, [I("div", mu, D(j(a).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), k("div", hu, [V(j(xi), {
6868
7045
  class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
6869
7046
  size: 20,
6870
7047
  "stroke-width": 2
6871
- })])) : e.snapshots.length === 0 ? (f(), k("div", tu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", nu, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
7048
+ })])) : e.snapshots.length === 0 ? (f(), k("div", gu, D(j(a).snapshotHistory.noSnapshots), 1)) : (f(), k("div", _u, [(f(!0), k(R, null, h(e.snapshots, (t) => (f(), k("button", {
6872
7049
  key: t.id,
6873
7050
  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)]",
6874
7051
  style: { "background-color": "transparent" },
6875
7052
  disabled: e.isRestoring,
6876
7053
  onClick: (e) => g(t.id)
6877
- }, [I("div", iu, [I("div", au, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", ou, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, ru))), 128))]))])) : A("", !0)]),
7054
+ }, [I("div", yu, [I("div", bu, [I("span", null, D(_(t.created_at)), 1), t.is_autosave ? (f(), k("span", xu, D(j(a).snapshotHistory.auto), 1)) : A("", !0)])])], 8, vu))), 128))]))])) : A("", !0)]),
6878
7055
  _: 1
6879
7056
  }),
6880
7057
  I("button", {
@@ -6882,74 +7059,74 @@ var dc = {
6882
7059
  disabled: !l.value,
6883
7060
  title: j(a).snapshotHistory.newerSnapshot,
6884
7061
  onClick: M(d, ["stop"])
6885
- }, [V(j(ri), {
7062
+ }, [V(j(ai), {
6886
7063
  size: 14,
6887
7064
  "stroke-width": 2
6888
- })], 8, su)
7065
+ })], 8, Su)
6889
7066
  ], 512));
6890
7067
  }
6891
- }), lu = /* @__PURE__ */ e({ default: () => uu }), uu = cu;
7068
+ }), wu = /* @__PURE__ */ e({ default: () => Tu }), Tu = Cu;
6892
7069
  //#endregion
6893
7070
  //#region src/cloud/utils/scoringStyles.ts
6894
- function du(e) {
7071
+ function Eu(e) {
6895
7072
  return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
6896
7073
  }
6897
- function fu(e) {
7074
+ function Du(e) {
6898
7075
  return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
6899
7076
  }
6900
- function pu(e) {
7077
+ function Ou(e) {
6901
7078
  return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
6902
7079
  }
6903
- function mu(e) {
7080
+ function ku(e) {
6904
7081
  return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
6905
7082
  }
6906
7083
  //#endregion
6907
7084
  //#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
6908
- var hu = {
7085
+ var Au = {
6909
7086
  key: 0,
6910
7087
  class: "tpl-scoring-panel tpl:absolute tpl:top-14 tpl:right-0 tpl:bottom-0 tpl:z-panel tpl:flex tpl:w-[360px] tpl:flex-col tpl:border-l tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg-elevated)]"
6911
- }, gu = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, _u = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, vu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, yu = ["title"], bu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, xu = {
7088
+ }, ju = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Mu = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Nu = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Pu = ["title"], Fu = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Iu = {
6912
7089
  key: 0,
6913
7090
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6914
- }, Su = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Cu = {
7091
+ }, Lu = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Ru = {
6915
7092
  key: 1,
6916
7093
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6917
- }, wu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Tu = {
7094
+ }, zu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Bu = {
6918
7095
  key: 2,
6919
7096
  class: "tpl:flex tpl:flex-col tpl:gap-4"
6920
- }, Eu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Du = {
7097
+ }, Vu = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Hu = {
6921
7098
  key: 0,
6922
7099
  class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
6923
- }, Ou = {
7100
+ }, Uu = {
6924
7101
  key: 0,
6925
7102
  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)]"
6926
- }, ku = ["onClick"], Au = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, ju = {
7103
+ }, Wu = ["onClick"], Gu = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ku = {
6927
7104
  key: 0,
6928
7105
  class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
6929
- }, Mu = {
7106
+ }, qu = {
6930
7107
  key: 0,
6931
7108
  class: "tpl:border-t tpl:border-[var(--tpl-border)]"
6932
- }, Nu = {
7109
+ }, Ju = {
6933
7110
  key: 0,
6934
7111
  class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
6935
- }, Pu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, Fu = { class: "tpl:flex-1 tpl:min-w-0" }, Iu = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, Lu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, Ru = {
7112
+ }, Yu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, Xu = { class: "tpl:flex-1 tpl:min-w-0" }, Zu = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, Qu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, $u = {
6936
7113
  key: 0,
6937
7114
  class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
6938
- }, zu = {
7115
+ }, ed = {
6939
7116
  key: 1,
6940
7117
  class: "tpl:mt-2 tpl:flex tpl:justify-center"
6941
- }, Bu = ["disabled", "onClick"], Vu = {
7118
+ }, td = ["disabled", "onClick"], nd = {
6942
7119
  key: 0,
6943
7120
  class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
6944
- }, Hu = {
7121
+ }, rd = {
6945
7122
  key: 3,
6946
7123
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6947
- }, Uu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wu = { 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)]" }, Gu = /*@__PURE__*/ B({
7124
+ }, id = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, ad = { 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)]" }, od = /*@__PURE__*/ B({
6948
7125
  __name: "TemplateScoringPanel",
6949
7126
  props: { visible: { type: Boolean } },
6950
7127
  emits: ["close"],
6951
7128
  setup(e, { emit: t }) {
6952
- let n = e, r = t, { t: i } = Ki(), a = J(Ln, "TemplateScoringPanel"), o = J(fr, "TemplateScoringPanel"), s = v(Yn, []), c = C({
7129
+ let n = e, r = t, { t: i } = ta(), a = J(zn, "TemplateScoringPanel"), o = J(vr, "TemplateScoringPanel"), s = v(Zn, []), c = C({
6953
7130
  spam: !0,
6954
7131
  readability: !0,
6955
7132
  accessibility: !0,
@@ -6964,10 +7141,10 @@ var hu = {
6964
7141
  "accessibility",
6965
7142
  "bestPractices"
6966
7143
  ], p = {
6967
- spam: Yr,
6968
- readability: li,
6969
- accessibility: Xr,
6970
- bestPractices: Mi
7144
+ spam: Mi,
7145
+ readability: pi,
7146
+ accessibility: Ni,
7147
+ bestPractices: Vi
6971
7148
  };
6972
7149
  function m() {
6973
7150
  o.score(a.content.value, s);
@@ -6995,50 +7172,50 @@ var hu = {
6995
7172
  "leave-from-class": "tpl:translate-x-0",
6996
7173
  "leave-to-class": "tpl:translate-x-full"
6997
7174
  }, {
6998
- default: b(() => [e.visible ? (f(), k("div", hu, [I("div", gu, [I("div", _u, [V(j(Ti), {
7175
+ default: b(() => [e.visible ? (f(), k("div", Au, [I("div", ju, [I("div", Mu, [V(j(ji), {
6999
7176
  size: 13,
7000
7177
  "stroke-width": 2
7001
- }), I("span", null, D(j(i).scoring.title), 1)]), I("div", vu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
7178
+ }), I("span", null, D(j(i).scoring.title), 1)]), I("div", Nu, [j(o).scoringResult.value && !j(o).isScoring.value ? (f(), k("button", {
7002
7179
  key: 0,
7003
7180
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
7004
7181
  title: j(i).scoring.rescore,
7005
7182
  onClick: n[0] ||= (e) => m()
7006
- }, [V(j(xi), {
7183
+ }, [V(j(Di), {
7007
7184
  size: 14,
7008
7185
  "stroke-width": 2
7009
- })], 8, yu)) : A("", !0), I("button", {
7186
+ })], 8, Pu)) : A("", !0), I("button", {
7010
7187
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
7011
7188
  onClick: n[1] ||= (e) => r("close")
7012
- }, [V(j(ji), {
7189
+ }, [V(j(Bi), {
7013
7190
  size: 14,
7014
7191
  "stroke-width": 2
7015
- })])])]), I("div", bu, [j(o).isScoring.value ? (f(), k("div", xu, [I("p", Su, D(j(i).scoring.scoring), 1), V(Bi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", Cu, [
7016
- V(j(Gr), {
7192
+ })])])]), I("div", Fu, [j(o).isScoring.value ? (f(), k("div", Iu, [I("p", Lu, D(j(i).scoring.scoring), 1), V(Yi, { class: "tpl:w-3/4" })])) : j(o).error.value && !j(o).scoringResult.value ? (f(), k("div", Ru, [
7193
+ V(j(si), {
7017
7194
  size: 32,
7018
7195
  "stroke-width": 1.5,
7019
7196
  class: "tpl:text-[var(--tpl-danger)]"
7020
7197
  }),
7021
- I("p", wu, D(j(i).scoring.error), 1),
7198
+ I("p", zu, D(j(i).scoring.error), 1),
7022
7199
  I("button", {
7023
7200
  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)]",
7024
7201
  onClick: n[2] ||= (e) => m()
7025
- }, [V(j(xi), {
7202
+ }, [V(j(Di), {
7026
7203
  size: 12,
7027
7204
  "stroke-width": 2
7028
7205
  }), z(" " + D(j(i).scoring.rescore), 1)])
7029
- ])) : j(o).scoringResult.value ? (f(), k("div", Tu, [
7206
+ ])) : j(o).scoringResult.value ? (f(), k("div", Bu, [
7030
7207
  I("div", {
7031
7208
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
7032
- style: L({ backgroundColor: j(fu)(j(o).scoringResult.value.score) })
7209
+ style: L({ backgroundColor: j(Du)(j(o).scoringResult.value.score) })
7033
7210
  }, [
7034
7211
  I("span", {
7035
7212
  class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
7036
- style: L({ color: j(du)(j(o).scoringResult.value.score) })
7213
+ style: L({ color: j(Eu)(j(o).scoringResult.value.score) })
7037
7214
  }, D(j(o).scoringResult.value.score), 5),
7038
- I("span", Eu, D(j(i).scoring.overallScore), 1),
7039
- _() > 0 ? (f(), k("span", Du, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
7215
+ I("span", Vu, D(j(i).scoring.overallScore), 1),
7216
+ _() > 0 ? (f(), k("span", Hu, D(_()) + " " + D(j(i).scoring.findings), 1)) : A("", !0)
7040
7217
  ], 4),
7041
- j(o).fixError.value ? (f(), k("div", Ou, [V(j(Gr), {
7218
+ j(o).fixError.value ? (f(), k("div", Uu, [V(j(si), {
7042
7219
  size: 14,
7043
7220
  "stroke-width": 2,
7044
7221
  class: "tpl:mt-0.5 tpl:shrink-0"
@@ -7053,74 +7230,74 @@ var hu = {
7053
7230
  (f(), N(d(p[e]), {
7054
7231
  size: 14,
7055
7232
  "stroke-width": 2,
7056
- style: L({ color: j(du)(j(o).scoringResult.value.categories[e].score) })
7233
+ style: L({ color: j(Eu)(j(o).scoringResult.value.categories[e].score) })
7057
7234
  }, null, 8, ["style"])),
7058
- I("span", Au, D(j(i).scoring.categories[e]), 1),
7235
+ I("span", Gu, D(j(i).scoring.categories[e]), 1),
7059
7236
  I("span", {
7060
7237
  class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
7061
7238
  style: L({
7062
- color: j(du)(j(o).scoringResult.value.categories[e].score),
7063
- backgroundColor: j(fu)(j(o).scoringResult.value.categories[e].score)
7239
+ color: j(Eu)(j(o).scoringResult.value.categories[e].score),
7240
+ backgroundColor: j(Du)(j(o).scoringResult.value.categories[e].score)
7064
7241
  })
7065
7242
  }, D(j(o).scoringResult.value.categories[e].score), 5),
7066
- j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", ju, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
7067
- V(j(ti), {
7243
+ j(o).scoringResult.value.categories[e].findings.length > 0 ? (f(), k("span", Ku, D(j(o).scoringResult.value.categories[e].findings.length), 1)) : A("", !0),
7244
+ V(j(ri), {
7068
7245
  size: 12,
7069
7246
  "stroke-width": 2,
7070
7247
  class: F(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", c.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
7071
7248
  }, null, 8, ["class"])
7072
- ], 8, ku), c.value[e] ? (f(), k("div", Mu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Nu, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
7249
+ ], 8, Wu), c.value[e] ? (f(), k("div", qu, [j(o).scoringResult.value.categories[e].findings.length === 0 ? (f(), k("div", Ju, D(j(i).scoring.noFindings), 1)) : A("", !0), (f(!0), k(R, null, h(j(o).scoringResult.value.categories[e].findings, (e) => (f(), k("div", {
7073
7250
  key: e.id,
7074
7251
  class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
7075
- }, [I("div", Pu, [(f(), N(d(j(e.severity === "high" ? Gr : e.severity === "medium" ? Zr : hi)), {
7252
+ }, [I("div", Yu, [(f(), N(d(j(e.severity === "high" ? si : e.severity === "medium" ? Ii : bi)), {
7076
7253
  size: 13,
7077
7254
  "stroke-width": 2,
7078
7255
  class: "tpl:mt-0.5 tpl:shrink-0",
7079
- style: L({ color: j(pu)(e.severity) })
7080
- }, null, 8, ["style"])), I("div", Fu, [
7081
- I("div", Iu, [I("span", {
7256
+ style: L({ color: j(Ou)(e.severity) })
7257
+ }, null, 8, ["style"])), I("div", Xu, [
7258
+ I("div", Zu, [I("span", {
7082
7259
  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",
7083
7260
  style: L({
7084
- color: j(pu)(e.severity),
7085
- backgroundColor: j(mu)(e.severity)
7261
+ color: j(Ou)(e.severity),
7262
+ backgroundColor: j(ku)(e.severity)
7086
7263
  })
7087
- }, D(j(i).scoring.severity[e.severity]), 5), I("span", Lu, D(e.message), 1)]),
7088
- e.suggestion ? (f(), k("p", Ru, D(e.suggestion), 1)) : A("", !0),
7089
- e.blockId ? (f(), k("div", zu, [I("button", {
7264
+ }, D(j(i).scoring.severity[e.severity]), 5), I("span", Qu, D(e.message), 1)]),
7265
+ e.suggestion ? (f(), k("p", $u, D(e.suggestion), 1)) : A("", !0),
7266
+ e.blockId ? (f(), k("div", ed, [I("button", {
7090
7267
  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)]",
7091
7268
  style: { "background-color": "transparent" },
7092
7269
  disabled: j(o).fixingFindingId.value !== null,
7093
7270
  onClick: (t) => g(e)
7094
- }, [j(o).fixingFindingId.value === e.id ? (f(), N(j(Jr), {
7271
+ }, [j(o).fixingFindingId.value === e.id ? (f(), N(j(xi), {
7095
7272
  key: 0,
7096
7273
  class: "tpl-spinner",
7097
7274
  size: 11,
7098
7275
  "stroke-width": 2
7099
- })) : (f(), N(j(Xr), {
7276
+ })) : (f(), N(j(Ni), {
7100
7277
  key: 1,
7101
7278
  size: 11,
7102
7279
  "stroke-width": 2
7103
- })), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, Bu), j(o).fixError.value ? (f(), k("p", Vu, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
7280
+ })), z(" " + D(j(o).fixingFindingId.value === e.id ? j(i).scoring.fixing : j(i).scoring.fix), 1)], 8, td), j(o).fixError.value ? (f(), k("p", nd, D(j(o).fixError.value), 1)) : A("", !0)])) : A("", !0)
7104
7281
  ])])]))), 128))])) : A("", !0)])), 64))
7105
- ])) : (f(), k("div", Hu, [V(j(Ti), {
7282
+ ])) : (f(), k("div", rd, [V(j(ji), {
7106
7283
  size: 32,
7107
7284
  "stroke-width": 1.5,
7108
7285
  class: "tpl:text-[var(--tpl-text-dim)]"
7109
- }), I("p", Uu, D(j(i).scoring.emptyState), 1)])), I("p", Wu, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
7286
+ }), I("p", id, D(j(i).scoring.emptyState), 1)])), I("p", ad, D(j(i).aiMenu.disclaimer), 1)])])) : A("", !0)]),
7110
7287
  _: 1
7111
7288
  }));
7112
7289
  }
7113
- }), Ku = /* @__PURE__ */ e({ default: () => qu }), qu = /*#__PURE__*/ Ii(Gu, [["__scopeId", "data-v-c23c73d4"]]), Ju = ["aria-busy"], Yu = {
7290
+ }), sd = /* @__PURE__ */ e({ default: () => cd }), cd = /*#__PURE__*/ Gi(od, [["__scopeId", "data-v-c23c73d4"]]), ld = ["aria-busy"], ud = {
7114
7291
  id: "tpl-test-email-title",
7115
7292
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
7116
- }, Xu = { class: "tpl:mb-3" }, Zu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, Qu = ["value"], $u = ["disabled"], ed = ["value"], td = {
7293
+ }, dd = { class: "tpl:mb-3" }, fd = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, pd = ["value"], md = ["disabled"], hd = ["value"], gd = {
7117
7294
  key: 0,
7118
7295
  role: "alert",
7119
7296
  class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
7120
- }, nd = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, rd = ["disabled"], id = ["disabled"], ad = {
7297
+ }, _d = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, vd = ["disabled"], yd = ["disabled"], bd = {
7121
7298
  key: 0,
7122
7299
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
7123
- }, od = { key: 1 }, sd = /*@__PURE__*/ B({
7300
+ }, xd = { key: 1 }, Sd = /*@__PURE__*/ B({
7124
7301
  __name: "TestEmailModal",
7125
7302
  props: {
7126
7303
  visible: { type: Boolean },
@@ -7130,7 +7307,7 @@ var hu = {
7130
7307
  },
7131
7308
  emits: ["send", "close"],
7132
7309
  setup(e, { emit: t }) {
7133
- let n = e, r = t, { t: i } = Ki(), a = C("");
7310
+ let n = e, r = t, { t: i } = ta(), a = C("");
7134
7311
  H(() => n.visible, (e) => {
7135
7312
  e && (a.value = n.allowedEmails[0] ?? "");
7136
7313
  });
@@ -7143,7 +7320,7 @@ var hu = {
7143
7320
  function l(e) {
7144
7321
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), o()), e.key === "Escape" && s();
7145
7322
  }
7146
- return (t, n) => (f(), N(Yo, {
7323
+ return (t, n) => (f(), N(us, {
7147
7324
  visible: e.visible,
7148
7325
  onClose: s,
7149
7326
  onKeydown: l
@@ -7159,14 +7336,14 @@ var hu = {
7159
7336
  "box-shadow": "var(--tpl-shadow-xl)"
7160
7337
  }
7161
7338
  }, [
7162
- I("h3", Yu, D(j(i).testEmail.title), 1),
7163
- I("div", Xu, [I("label", Zu, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
7339
+ I("h3", ud, D(j(i).testEmail.title), 1),
7340
+ I("div", dd, [I("label", fd, D(j(i).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), k("input", {
7164
7341
  key: 0,
7165
7342
  type: "text",
7166
7343
  value: a.value,
7167
7344
  disabled: "",
7168
7345
  class: "tpl:h-9 tpl:w-full tpl:rounded-md tpl:border tpl:px-3 tpl:py-1 tpl:text-sm tpl:opacity-70 tpl:shadow-xs tpl:outline-none tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)] tpl:text-[var(--tpl-text)]"
7169
- }, null, 8, Qu)) : c((f(), k("select", {
7346
+ }, null, 8, pd)) : c((f(), k("select", {
7170
7347
  key: 1,
7171
7348
  "onUpdate:modelValue": n[0] ||= (e) => a.value = e,
7172
7349
  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)]",
@@ -7174,29 +7351,29 @@ var hu = {
7174
7351
  }, [(f(!0), k(R, null, h(e.allowedEmails, (e) => (f(), k("option", {
7175
7352
  key: e,
7176
7353
  value: e
7177
- }, D(e), 9, ed))), 128))], 8, $u)), [[w, a.value]])]),
7178
- e.error ? (f(), k("p", td, D(e.error), 1)) : A("", !0),
7179
- I("div", nd, [I("button", {
7354
+ }, D(e), 9, hd))), 128))], 8, md)), [[w, a.value]])]),
7355
+ e.error ? (f(), k("p", gd, D(e.error), 1)) : A("", !0),
7356
+ I("div", _d, [I("button", {
7180
7357
  type: "button",
7181
7358
  class: F(["tpl:cursor-pointer tpl:rounded-md tpl:border tpl:px-3 tpl:py-1.5 tpl:text-sm tpl:font-medium tpl:shadow-xs tpl:transition-all tpl:duration-150 tpl:border-[var(--tpl-border)] tpl:text-[var(--tpl-text)] tpl:bg-[var(--tpl-bg)]", { "tpl:cursor-not-allowed tpl:opacity-50": e.isSending }]),
7182
7359
  disabled: e.isSending,
7183
7360
  onClick: s
7184
- }, D(j(i).testEmail.cancel), 11, rd), I("button", {
7361
+ }, D(j(i).testEmail.cancel), 11, vd), I("button", {
7185
7362
  type: "button",
7186
7363
  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)]",
7187
7364
  disabled: !a.value || e.isSending,
7188
7365
  onClick: o
7189
- }, [e.isSending ? (f(), k("span", ad, [V(j(Jr), {
7366
+ }, [e.isSending ? (f(), k("span", bd, [V(j(xi), {
7190
7367
  class: "tpl:animate-spin",
7191
7368
  size: 12,
7192
7369
  "stroke-width": 2
7193
- }), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", od, D(j(i).testEmail.send), 1))], 8, id)])
7194
- ], 8, Ju)]),
7370
+ }), z(" " + D(j(i).testEmail.sending), 1)])) : (f(), k("span", xd, D(j(i).testEmail.send), 1))], 8, yd)])
7371
+ ], 8, ld)]),
7195
7372
  _: 1
7196
7373
  }, 8, ["visible"]));
7197
7374
  }
7198
- }), cd = /* @__PURE__ */ e({ default: () => ld }), ld = sd;
7375
+ }), Cd = /* @__PURE__ */ e({ default: () => wd }), wd = Sd;
7199
7376
  //#endregion
7200
- export { Ji as $, er as $t, Ko as A, ye as An, Jr as At, Ja as B, Ee as Bn, Wn as Bt, rs as C, bt as Cn, oi as Ct, Zo as D, st as Dn, ei as Dt, Xo as E, ct as En, ti as Et, vo as F, Te as Fn, _r as Ft, ba as G, fe as Gn, Bn as Gt, Ra as H, xe as Hn, rr as Ht, ho as I, _e as In, Y as It, fa as J, tr as Jt, ya as K, ue as Kn, Kn as Kt, uo as L, he as Ln, lr as Lt, Po as M, be as Mn, X as Mt, Oo as N, we as Nn, Fr as Nt, Yo as O, W as On, Zr as Ot, To as P, ve as Pn, wr as Pt, Yi as Q, Xn as Qt, co as R, Se as Rn, nr as Rt, is as S, _t as Sn, si as St, Z as T, lt as Tn, ri as Tt, Pa as U, pe as Un, pr as Ut, qa as V, ge as Vn, Gn as Vt, Sa as W, de as Wn, ur as Wt, ta as X, Vn as Xt, ra as Y, Ln as Yt, $i as Z, $n as Zt, gs as _, Ft as _n, hi as _t, yl as a, Un as an, Fi as at, fs as b, yt as bn, li as bt, Ns as c, wn as cn, Di as ct, Es as d, jn as dn, wi as dt, qn as en, qi as et, Ts as f, On as fn, Ci as ft, xs as g, cn as gn, gi as gt, Ss as h, sn as hn, _i as ht, Jl as i, Hn as in, Ii as it, Wo as j, De as jn, Gr as jt, qo as k, We as kn, Xr as kt, Os as l, Tn as ln, Ei as lt, Cs as m, nn as mn, vi as mt, Ku as n, fr as nn, Ki as nt, ac as o, J as on, ji as ot, ws as p, rn as pn, xi as pt, ma as q, Jn as qt, lu as r, ar as rn, Ui as rt, Ps as s, gn as sn, ki as st, cd as t, dr as tn, Gi as tt, Ds as u, q as un, Ti as ut, hs as v, Et as vn, mi as vt, $ as w, ut as wn, ai as wt, cs as x, xt as xn, ci as xt, ps as y, dt as yn, pi as yt, Ya as z, Ce as zn, cr as zt };
7377
+ export { ia as $, tr as $t, ss as A, lt as An, ai as At, so as B, Te as Bn, mr as Bt, vs as C, xt as Cn, vi as Ct, fs as D, mt as Dn, ui as Dt, ds as E, ht as En, di as Et, No as F, ye as Fn, jr as Ft, Na as G, Ee as Gn, gr as Gt, Za as H, he as Hn, qn as Ht, Ao as I, De as In, wr as It, Ta as J, pe as Jn, Xn as Jt, Ma as K, ge as Kn, Hn as Kt, To as L, be as Ln, Y as Lt, Yo as M, st as Mn, ni as Mt, Uo as N, W as Nn, X as Nt, us as O, St as On, li as Ot, Bo as P, We as Pn, Wr as Pt, ca as Q, ir as Qt, Co as R, we as Rn, hr as Rt, ys as S, dt as Sn, yi as St, Z as T, yt as Tn, fi as Tt, qa as U, Se as Un, lr as Ut, oo as V, _e as Vn, Kn as Vt, Fa as W, Ce as Wn, yr as Wt, ma as X, fe as Xn, zn as Xt, ga as Y, de as Yn, sr as Yt, la as Z, ue as Zn, Un as Zt, js as _, an as _n, wi as _t, Pl as a, dr as an, Gi as at, Ds as b, Lt as bn, xi as bt, Js as c, Gn as cn, Ri as ct, Vs as d, En as dn, Pi as dt, Qn as en, ra as et, Bs as f, Dn as fn, Ni as ft, Is as g, on as gn, Di as gt, Ls as h, An as hn, ki as ht, lu as i, vr as in, Qi as it, as as j, ct as jn, ri as jt, cs as k, ut as kn, si as kt, Us as l, J as ln, Ii as lt, Rs as m, Nn as mn, Ai as mt, sd as n, Yn as nn, ea as nt, bc as o, Wn as on, Wi as ot, zs as p, q as pn, ji as pt, Da as q, xe as qn, Jn as qt, wu as r, _r as rn, ta as rt, Ys as s, Rn as sn, Bi as st, Cd as t, or as tn, na as tt, Hs as u, vn as un, Fi as ut, As as v, ln as vn, Ci as vt, $ as w, Ct as wn, pi as wt, Cs as x, Ot as xn, bi as xt, Os as y, un as yn, Si as yt, co as z, ve as zn, cr as zt };
7201
7378
 
7202
- //# sourceMappingURL=features-DU6lA8l1.js.map
7379
+ //# sourceMappingURL=features-Dpczf9Su.js.map