@templatical/editor 0.6.1 → 0.6.3

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 (78) hide show
  1. package/dist/{AiChatSidebar-Br9dhkIB.js → AiChatSidebar-B3SJIKG_.js} +1 -1
  2. package/dist/{AiFeatureMenu-Ceewb3uB.js → AiFeatureMenu-BLLKoOos.js} +1 -1
  3. package/dist/{CloudEditor-D_flODpm.js → CloudEditor-BCz1ZTYC.js} +36 -30
  4. package/dist/{CollaboratorBar-BcSxXVY-.js → CollaboratorBar-DuPYW5iF.js} +1 -1
  5. package/dist/{CommentsSidebar-DceMRyIS.js → CommentsSidebar-B1pvJdqF.js} +1 -1
  6. package/dist/{DesignReferenceSidebar-50qFipmW.js → DesignReferenceSidebar-B8V_F2yF.js} +69 -67
  7. package/dist/{ModuleBrowserModal-BnSdG4DE.js → ModuleBrowserModal-DrUFMTDx.js} +4 -4
  8. package/dist/{ModulePreviewCanvas-B78PuZdk.js → ModulePreviewCanvas-CHdOwV_4.js} +1 -1
  9. package/dist/{ParagraphEditor-CPBYk2m3.js → ParagraphEditor-D75wl3BX.js} +1 -1
  10. package/dist/{SaveModuleDialog-Df__VToK.js → SaveModuleDialog-FZ9lxY7_.js} +2 -2
  11. package/dist/{SnapshotHistory-QBTbVrEK.js → SnapshotHistory-BR3eV120.js} +2 -2
  12. package/dist/{TestEmailModal-DaDMACHY.js → TestEmailModal--ue5w9fT.js} +2 -2
  13. package/dist/{TitleEditor-PHShl4tS.js → TitleEditor-fStSADI-.js} +1 -1
  14. package/dist/{TplModal-DzlNkBYQ.js → TplModal-BwSfxIHf.js} +1 -1
  15. package/dist/{blockTypeIcons-D0wkSpP9.js → blockTypeIcons-BcTrDjmH.js} +1 -1
  16. package/dist/bundle-stats.json +6 -6
  17. package/dist/cdn/chunks/{AccessibilityPanel-fjNLcnxu.js → AccessibilityPanel-B6DOjojm.js} +3 -3
  18. package/dist/cdn/chunks/{AccessibilityPanel-fjNLcnxu.js.map → AccessibilityPanel-B6DOjojm.js.map} +1 -1
  19. package/dist/cdn/chunks/{AiFeatureMenu-DSamZ3ve.js → AiFeatureMenu-qEdB2fZJ.js} +2 -2
  20. package/dist/cdn/chunks/{AiFeatureMenu-DSamZ3ve.js.map → AiFeatureMenu-qEdB2fZJ.js.map} +1 -1
  21. package/dist/cdn/chunks/{BlockA11yBadge-D73PKVS8.js → BlockA11yBadge-DcEZftf6.js} +2 -2
  22. package/dist/cdn/chunks/{BlockA11yBadge-D73PKVS8.js.map → BlockA11yBadge-DcEZftf6.js.map} +1 -1
  23. package/dist/cdn/chunks/{CloudEditor-BGfliRFn.js → CloudEditor-D2GsEC_n.js} +41 -35
  24. package/dist/cdn/chunks/CloudEditor-D2GsEC_n.js.map +1 -0
  25. package/dist/cdn/chunks/{CollaboratorBar-BRvF0m5t.js → CollaboratorBar--nO7TX6b.js} +3 -3
  26. package/dist/cdn/chunks/{CollaboratorBar-BRvF0m5t.js.map → CollaboratorBar--nO7TX6b.js.map} +1 -1
  27. package/dist/cdn/chunks/{CountdownBlock-IIZk8uja.js → CountdownBlock-5YdT1uUu.js} +2 -2
  28. package/dist/cdn/chunks/{CountdownBlock-IIZk8uja.js.map → CountdownBlock-5YdT1uUu.js.map} +1 -1
  29. package/dist/cdn/chunks/{CountdownToolbar-mXM3YITU.js → CountdownToolbar-DXPXrbAA.js} +3 -3
  30. package/dist/cdn/chunks/{CountdownToolbar-mXM3YITU.js.map → CountdownToolbar-DXPXrbAA.js.map} +1 -1
  31. package/dist/cdn/chunks/{ModuleBrowserModal-BgIdqEyV.js → ModuleBrowserModal-DxoPp81s.js} +5 -5
  32. package/dist/cdn/chunks/{ModuleBrowserModal-BgIdqEyV.js.map → ModuleBrowserModal-DxoPp81s.js.map} +1 -1
  33. package/dist/cdn/chunks/{ModulePreviewCanvas-BOFLwREg.js → ModulePreviewCanvas-CoLdb4ar.js} +2 -2
  34. package/dist/cdn/chunks/{ModulePreviewCanvas-BOFLwREg.js.map → ModulePreviewCanvas-CoLdb4ar.js.map} +1 -1
  35. package/dist/cdn/chunks/{NumberWithSuffix-Cxe5sPC2.js → NumberWithSuffix-CE3NrZhH.js} +2 -2
  36. package/dist/cdn/chunks/{NumberWithSuffix-Cxe5sPC2.js.map → NumberWithSuffix-CE3NrZhH.js.map} +1 -1
  37. package/dist/cdn/chunks/{ParagraphEditor-7Wycs4gM.js → ParagraphEditor-B6Ygu-Mq.js} +16 -16
  38. package/dist/cdn/chunks/{ParagraphEditor-7Wycs4gM.js.map → ParagraphEditor-B6Ygu-Mq.js.map} +1 -1
  39. package/dist/cdn/chunks/{RichTextEditorContent-DVw5mwEA.js → RichTextEditorContent-DL_y2SrR.js} +2 -2
  40. package/dist/cdn/chunks/{RichTextEditorContent-DVw5mwEA.js.map → RichTextEditorContent-DL_y2SrR.js.map} +1 -1
  41. package/dist/cdn/chunks/{SaveModuleDialog-Cz1xEjJG.js → SaveModuleDialog-B0TnO_o9.js} +2 -2
  42. package/dist/cdn/chunks/{SaveModuleDialog-Cz1xEjJG.js.map → SaveModuleDialog-B0TnO_o9.js.map} +1 -1
  43. package/dist/cdn/chunks/{TitleEditor-DTF4hRB6.js → TitleEditor-BHpfxvwy.js} +8 -8
  44. package/dist/cdn/chunks/{TitleEditor-DTF4hRB6.js.map → TitleEditor-BHpfxvwy.js.map} +1 -1
  45. package/dist/cdn/chunks/{blockTypeIcons-C5tZU4ot.js → blockTypeIcons-BzzY9_kA.js} +3 -3
  46. package/dist/cdn/chunks/{blockTypeIcons-C5tZU4ot.js.map → blockTypeIcons-BzzY9_kA.js.map} +1 -1
  47. package/dist/cdn/chunks/{extensions-BrVEX2vQ.js → extensions-DIxF31tA.js} +3 -3
  48. package/dist/cdn/chunks/{extensions-BrVEX2vQ.js.map → extensions-DIxF31tA.js.map} +1 -1
  49. package/dist/cdn/chunks/{features-BdkV7kQP.js → features-DEMb13KS.js} +419 -380
  50. package/dist/cdn/chunks/features-DEMb13KS.js.map +1 -0
  51. package/dist/cdn/chunks/{icons-oRXtYgc3.js → icons-CsLTcirh.js} +2 -2
  52. package/dist/cdn/chunks/{icons-oRXtYgc3.js.map → icons-CsLTcirh.js.map} +1 -1
  53. package/dist/cdn/chunks/{media-library-C7uyFrMO.js → media-library-CVaNvhpM.js} +3 -3
  54. package/dist/cdn/chunks/{media-library-C7uyFrMO.js.map → media-library-CVaNvhpM.js.map} +1 -1
  55. package/dist/cdn/chunks/{quality-C5gsx_Tw.js → quality-BaBfc54_.js} +2 -2
  56. package/dist/cdn/chunks/{quality-C5gsx_Tw.js.map → quality-BaBfc54_.js.map} +1 -1
  57. package/dist/cdn/chunks/{renderer-DM2gdPmx.js → renderer-CUxvx7ro.js} +11 -11
  58. package/dist/cdn/chunks/renderer-CUxvx7ro.js.map +1 -0
  59. package/dist/cdn/chunks/{src-BAAwLL7q.js → src-CRaqN-p8.js} +4 -4
  60. package/dist/cdn/chunks/{src-BAAwLL7q.js.map → src-CRaqN-p8.js.map} +1 -1
  61. package/dist/cdn/chunks/{styles-iDn0uW8_.js → styles-BHJULjNR.js} +177 -61
  62. package/dist/cdn/chunks/styles-BHJULjNR.js.map +1 -0
  63. package/dist/cdn/chunks/{tiptap-ClLEM7Xz.js → tiptap-ZhwKyFp7.js} +2 -2
  64. package/dist/cdn/chunks/{tiptap-ClLEM7Xz.js.map → tiptap-ZhwKyFp7.js.map} +1 -1
  65. package/dist/cdn/editor.css +1 -1
  66. package/dist/cdn/editor.js +5 -5
  67. package/dist/{cloud-WfWdqZVK.js → cloud-DEk_b4CR.js} +321 -293
  68. package/dist/{formatRelativeTime-WvH3Au71.js → formatRelativeTime-BOEf47hq.js} +3 -1
  69. package/dist/index.d.ts +11 -11
  70. package/dist/style.css +1 -1
  71. package/dist/{styles-B58wYIn4.js → styles-DEXEkBvg.js} +417 -301
  72. package/dist/templatical-editor.js +3 -3
  73. package/dist/{useEditorCore-Dz-qbVXX.js → useEditorCore-C6ost42Q.js} +71 -64
  74. package/package.json +7 -7
  75. package/dist/cdn/chunks/CloudEditor-BGfliRFn.js.map +0 -1
  76. package/dist/cdn/chunks/features-BdkV7kQP.js.map +0 -1
  77. package/dist/cdn/chunks/renderer-DM2gdPmx.js.map +0 -1
  78. package/dist/cdn/chunks/styles-iDn0uW8_.js.map +0 -1
@@ -1295,39 +1295,42 @@ function J(e, t) {
1295
1295
  //#endregion
1296
1296
  //#region src/composables/useAccessibilityLint.ts
1297
1297
  function tr(e) {
1298
- let t = n([]), r = n(!1), a = n(!1), o = R(null), s = e.options.disabled === !0, c = null;
1299
- s || l();
1300
- async function l() {
1298
+ let t = n([]), r = n(!1), a = n(!1), o = R(null), s = e.options.disabled === !0, c = null, l = !1;
1299
+ s || u();
1300
+ async function u() {
1301
1301
  try {
1302
- o.value = (await import("./quality-C5gsx_Tw.js").then((e) => e.t)).lintAccessibility, r.value = !0, u(), c = sn(e.content, u, {
1302
+ let t = await import("./quality-BaBfc54_.js").then((e) => e.t);
1303
+ if (l) return;
1304
+ o.value = t.lintAccessibility, r.value = !0, d(), c = sn(e.content, d, {
1303
1305
  debounce: e.debounce ?? 500,
1304
1306
  deep: !0
1305
1307
  });
1306
1308
  } catch {
1309
+ if (l) return;
1307
1310
  a.value = !0;
1308
1311
  }
1309
1312
  }
1310
- function u() {
1313
+ function d() {
1311
1314
  o.value && (t.value = o.value(e.content.value, e.options));
1312
1315
  }
1313
- let d = i(() => e.options, () => {
1314
- o.value && u();
1316
+ let f = i(() => e.options, () => {
1317
+ o.value && d();
1315
1318
  }, { deep: !0 });
1316
- function f(t) {
1319
+ function p(t) {
1317
1320
  t.fix && t.fix.apply({
1318
1321
  updateBlock: e.updateBlock,
1319
1322
  updateSettings: e.updateSettings
1320
1323
  });
1321
1324
  }
1322
- function p() {
1323
- c?.(), d();
1325
+ function m() {
1326
+ l = !0, c?.(), f();
1324
1327
  }
1325
1328
  return {
1326
1329
  issues: t,
1327
1330
  ready: r,
1328
1331
  unavailable: a,
1329
- applyFix: f,
1330
- destroy: p
1332
+ applyFix: p,
1333
+ destroy: m
1331
1334
  };
1332
1335
  }
1333
1336
  //#endregion
@@ -2268,7 +2271,8 @@ function wi(e, t) {
2268
2271
  e.shiftKey ? document.activeElement === n && (e.preventDefault(), r.focus()) : document.activeElement === r && (e.preventDefault(), n.focus());
2269
2272
  }
2270
2273
  function c() {
2271
- (r || a !== null) && l({ restoreFocus: !1 }), n = document.activeElement, a = requestAnimationFrame(() => {
2274
+ let t = r !== null || a !== null;
2275
+ t && l({ restoreFocus: !1 }), t || (n = document.activeElement), a = requestAnimationFrame(() => {
2272
2276
  a = null;
2273
2277
  let t = o();
2274
2278
  t.length > 0 && (e.value?.querySelector("[autofocus], input:not([disabled])") ?? t[0]).focus();
@@ -2908,7 +2912,7 @@ var ha = ["innerHTML"], ga = /* @__PURE__ */ g({
2908
2912
  viewport: {}
2909
2913
  },
2910
2914
  setup(e) {
2911
- let t = e, n = pe(() => import("./ParagraphEditor-7Wycs4gM.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content);
2915
+ let t = e, n = pe(() => import("./ParagraphEditor-B6Ygu-Mq.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content);
2912
2916
  return (t, l) => (f(), C("div", {
2913
2917
  ref_key: "blockRef",
2914
2918
  ref: i,
@@ -2972,7 +2976,7 @@ var ya = ["data-block-id", "data-block-type"], ba = ["aria-label"], xa = [
2972
2976
  },
2973
2977
  emits: ["select"],
2974
2978
  setup(e, { emit: t }) {
2975
- let r = pe(() => import("./BlockA11yBadge-D73PKVS8.js")), i = e, a = t, { t: s, format: c } = Y(), u = o(qn, null), d = n(null), p = F(() => u?.liftedBlockId.value === i.block.id), m = F(() => p.value ? c(s.blockActions.dragLifted, { block: i.block.type }) : s.blockActions.drag);
2979
+ let r = pe(() => import("./BlockA11yBadge-DcEZftf6.js")), i = e, a = t, { t: s, format: c } = Y(), u = o(qn, null), d = n(null), p = F(() => u?.liftedBlockId.value === i.block.id), m = F(() => p.value ? c(s.blockActions.dragLifted, { block: i.block.type }) : s.blockActions.drag);
2976
2980
  async function h() {
2977
2981
  await re(), d.value?.focus();
2978
2982
  }
@@ -3107,7 +3111,7 @@ var ya = ["data-block-id", "data-block-type"], ba = ["aria-label"], xa = [
3107
3111
  viewport: {}
3108
3112
  },
3109
3113
  setup(e) {
3110
- let t = e, n = pe(() => import("./TitleEditor-DTF4hRB6.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content), l = F(() => {
3114
+ let t = e, n = pe(() => import("./TitleEditor-BHpfxvwy.js")), { isEditing: r, blockRef: i, toolbarPosition: a, resolvedContent: o, handleDoubleClick: s, handleEditorDone: c } = ma(() => t.block.content), l = F(() => {
3111
3115
  let e = {
3112
3116
  fontSize: `${_e[t.block.level]}px`,
3113
3117
  color: t.block.color,
@@ -3456,13 +3460,11 @@ var ya = ["data-block-id", "data-block-type"], ba = ["aria-label"], xa = [
3456
3460
  }), Qa = { class: "tpl:w-full" }, $a = { key: 0 }, eo = [
3457
3461
  "aria-label",
3458
3462
  "data-placeholder",
3459
- "onBlur",
3460
- "textContent"
3463
+ "onBlur"
3461
3464
  ], to = [
3462
3465
  "aria-label",
3463
3466
  "data-placeholder",
3464
- "onBlur",
3465
- "textContent"
3467
+ "onBlur"
3466
3468
  ], no = {
3467
3469
  key: 1,
3468
3470
  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)]"
@@ -3473,62 +3475,67 @@ var ya = ["data-block-id", "data-block-type"], ba = ["aria-label"], xa = [
3473
3475
  viewport: {}
3474
3476
  },
3475
3477
  setup(e) {
3476
- let t = e, { t: n } = Y(), r = J(q, "TableBlock"), i = F(() => t.block.rows.length > 0), a = F(() => ({
3478
+ let t = {
3479
+ mounted(e, t) {
3480
+ e.textContent = t.value ?? "";
3481
+ },
3482
+ updated(e, t) {
3483
+ t.value !== t.oldValue && e.ownerDocument.activeElement !== e && (e.textContent = t.value ?? "");
3484
+ }
3485
+ }, n = e, { t: r } = Y(), i = J(q, "TableBlock"), a = F(() => n.block.rows.length > 0), o = F(() => ({
3477
3486
  width: "100%",
3478
3487
  borderCollapse: "collapse",
3479
- fontSize: `${t.block.fontSize}px`,
3480
- color: t.block.color,
3481
- textAlign: t.block.textAlign,
3482
- fontFamily: t.block.fontFamily || "inherit"
3483
- })), o = F(() => ({
3484
- border: `${t.block.borderWidth}px solid ${t.block.borderColor}`,
3485
- padding: `${t.block.cellPadding}px`,
3486
- textAlign: t.block.textAlign
3488
+ fontSize: `${n.block.fontSize}px`,
3489
+ color: n.block.color,
3490
+ textAlign: n.block.textAlign,
3491
+ fontFamily: n.block.fontFamily || "inherit"
3487
3492
  })), c = F(() => ({
3488
- ...o.value,
3493
+ border: `${n.block.borderWidth}px solid ${n.block.borderColor}`,
3494
+ padding: `${n.block.cellPadding}px`,
3495
+ textAlign: n.block.textAlign
3496
+ })), l = F(() => ({
3497
+ ...c.value,
3489
3498
  fontWeight: "bold",
3490
- backgroundColor: t.block.headerBackgroundColor || "transparent"
3491
- })), l = F(() => t.block.hasHeaderRow && t.block.rows.length > 0 ? t.block.rows[0] : null), u = F(() => t.block.hasHeaderRow ? t.block.rows.slice(1) : t.block.rows);
3492
- function d() {
3493
- r.selectBlock(t.block.id);
3494
- }
3495
- function p(e, n, i) {
3496
- let a = i.target.innerText.trim(), o = t.block.rows.map((t) => t.id === e ? {
3497
- ...t,
3498
- cells: t.cells.map((e) => e.id === n ? {
3499
+ backgroundColor: n.block.headerBackgroundColor || "transparent"
3500
+ })), u = F(() => n.block.hasHeaderRow && n.block.rows.length > 0 ? n.block.rows[0] : null), d = F(() => n.block.hasHeaderRow ? n.block.rows.slice(1) : n.block.rows);
3501
+ function p() {
3502
+ i.selectBlock(n.block.id);
3503
+ }
3504
+ function m(e, t, r) {
3505
+ let a = r.target.innerText.trim(), o = n.block.rows.map((n) => n.id === e ? {
3506
+ ...n,
3507
+ cells: n.cells.map((e) => e.id === t ? {
3499
3508
  ...e,
3500
3509
  content: a
3501
3510
  } : e)
3502
- } : t);
3503
- r.updateBlock(t.block.id, { rows: o });
3511
+ } : n);
3512
+ i.updateBlock(n.block.id, { rows: o });
3504
3513
  }
3505
- return (e, t) => (f(), C("div", Qa, [i.value ? (f(), C("table", {
3514
+ return (e, n) => (f(), C("div", Qa, [a.value ? (f(), C("table", {
3506
3515
  key: 0,
3507
- style: D(a.value),
3516
+ style: D(o.value),
3508
3517
  class: "tpl-table-editable"
3509
- }, [l.value ? (f(), C("thead", $a, [P("tr", null, [(f(!0), C(O, null, s(l.value.cells, (e) => (f(), C("th", {
3518
+ }, [u.value ? (f(), C("thead", $a, [P("tr", null, [(f(!0), C(O, null, s(u.value.cells, (e) => v((f(), C("th", {
3510
3519
  key: e.id,
3511
- style: D(c.value),
3512
- "aria-label": w(n).table.cellPlaceholder,
3520
+ style: D(l.value),
3521
+ "aria-label": w(r).table.cellPlaceholder,
3513
3522
  contenteditable: "true",
3514
- "data-placeholder": w(n).table.cellPlaceholder,
3515
- onBlur: (t) => p(l.value.id, e.id, t),
3516
- onKeydown: t[0] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
3517
- onClick: z(d, ["stop"]),
3518
- textContent: N(e.content)
3519
- }, null, 44, eo))), 128))])])) : j("", !0), P("tbody", null, [(f(!0), C(O, null, s(u.value, (e) => (f(), C("tr", { key: e.id }, [(f(!0), C(O, null, s(e.cells, (r) => (f(), C("td", {
3520
- key: r.id,
3521
- style: D(o.value),
3522
- "aria-label": w(n).table.cellPlaceholder,
3523
+ "data-placeholder": w(r).table.cellPlaceholder,
3524
+ onBlur: (t) => m(u.value.id, e.id, t),
3525
+ onKeydown: n[0] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
3526
+ onClick: z(p, ["stop"])
3527
+ }, null, 44, eo)), [[t, e.content]])), 128))])])) : j("", !0), P("tbody", null, [(f(!0), C(O, null, s(d.value, (e) => (f(), C("tr", { key: e.id }, [(f(!0), C(O, null, s(e.cells, (i) => v((f(), C("td", {
3528
+ key: i.id,
3529
+ style: D(c.value),
3530
+ "aria-label": w(r).table.cellPlaceholder,
3523
3531
  contenteditable: "true",
3524
- "data-placeholder": w(n).table.cellPlaceholder,
3525
- onBlur: (t) => p(e.id, r.id, t),
3526
- onKeydown: t[1] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
3527
- onClick: z(d, ["stop"]),
3528
- textContent: N(r.content)
3529
- }, null, 44, to))), 128))]))), 128))])], 4)) : (f(), C("div", no, [T(w(si), { size: 16 }), P("span", null, N(w(n).table.empty), 1)]))]));
3530
- }
3531
- }), [["__scopeId", "data-v-dfc60174"]]), io = /* @__PURE__ */ g({
3532
+ "data-placeholder": w(r).table.cellPlaceholder,
3533
+ onBlur: (t) => m(e.id, i.id, t),
3534
+ onKeydown: n[1] ||= ie(z((e) => e.target.blur(), ["prevent"]), ["enter"]),
3535
+ onClick: z(p, ["stop"])
3536
+ }, null, 44, to)), [[t, i.content]])), 128))]))), 128))])], 4)) : (f(), C("div", no, [T(w(si), { size: 16 }), P("span", null, N(w(r).table.empty), 1)]))]));
3537
+ }
3538
+ }), [["__scopeId", "data-v-4f49860b"]]), io = /* @__PURE__ */ g({
3532
3539
  __name: "VideoPlayButton",
3533
3540
  props: { hoverEffect: {
3534
3541
  type: Boolean,
@@ -3552,7 +3559,7 @@ function ao(e) {
3552
3559
  videoId: null,
3553
3560
  thumbnailUrl: null
3554
3561
  };
3555
- for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/]) {
3562
+ for (let t of [/(?:youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/embed\/)([a-zA-Z0-9_-]{11})/i, /youtube\.com\/shorts\/([a-zA-Z0-9_-]{11})/i]) {
3556
3563
  let n = e.match(t);
3557
3564
  if (n) {
3558
3565
  let e = n[1];
@@ -3563,7 +3570,7 @@ function ao(e) {
3563
3570
  };
3564
3571
  }
3565
3572
  }
3566
- let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/);
3573
+ let t = e.match(/vimeo\.com\/(?:video\/)?(\d+)/i);
3567
3574
  if (t) {
3568
3575
  let e = t[1];
3569
3576
  return {
@@ -3662,7 +3669,7 @@ var so = ["src", "alt"], co = {
3662
3669
  table: ro,
3663
3670
  spacer: Za,
3664
3671
  html: Qi,
3665
- countdown: pe(() => import("./CountdownBlock-IIZk8uja.js").then((e) => e.n))
3672
+ countdown: pe(() => import("./CountdownBlock-5YdT1uUu.js").then((e) => e.n))
3666
3673
  };
3667
3674
  function go(e) {
3668
3675
  let { editor: t, config: r, translations: a, fontsManager: o } = e, { t: s, format: c } = Y(a);
@@ -4526,24 +4533,28 @@ function jo(e) {
4526
4533
  let s = a.body?.getReader();
4527
4534
  if (!s) throw Error("Failed to read stream");
4528
4535
  let u = new TextDecoder(), g = "", y = null;
4529
- for (;;) {
4530
- let { done: e, value: t } = await s.read();
4531
- if (e) break;
4532
- g += u.decode(t, { stream: !0 });
4533
- let r = g.split("\n");
4534
- g = r.pop() ?? "";
4535
- for (let e of r) {
4536
- if (!e.startsWith("data: ")) continue;
4537
- let t = e.slice(6), r;
4538
- try {
4539
- r = JSON.parse(t);
4540
- } catch {
4541
- continue;
4536
+ try {
4537
+ for (;;) {
4538
+ let { done: e, value: t } = await s.read();
4539
+ if (e) break;
4540
+ g += u.decode(t, { stream: !0 });
4541
+ let r = g.split("\n");
4542
+ g = r.pop() ?? "";
4543
+ for (let e of r) {
4544
+ if (!e.startsWith("data: ")) continue;
4545
+ let t = e.slice(6), r;
4546
+ try {
4547
+ r = JSON.parse(t);
4548
+ } catch {
4549
+ continue;
4550
+ }
4551
+ if (r.type === "text") v(b, { content: (o.value.find((e) => e.id === b)?.content ?? "") + r.text });
4552
+ else if (r.type === "error") throw Error(r.message || "Failed to generate template");
4553
+ else r.type === "done" && (r.conversation_id && (d.value = r.conversation_id), v(b, { content: r.text }), y = r.content ?? null, y ? (p.value = n, m.value = y, f.value = b, h.value = !1, i?.(y)) : l.value = "ai_apply_failed");
4542
4554
  }
4543
- if (r.type === "text") v(b, { content: (o.value.find((e) => e.id === b)?.content ?? "") + r.text });
4544
- else if (r.type === "error") throw Error(r.message || "Failed to generate template");
4545
- else r.type === "done" && (r.conversation_id && (d.value = r.conversation_id), v(b, { content: r.text }), y = r.content ?? null, y ? (p.value = n, m.value = y, f.value = b, h.value = !1, i?.(y)) : l.value = "ai_apply_failed");
4546
4555
  }
4556
+ } finally {
4557
+ s.cancel().catch(() => {});
4547
4558
  }
4548
4559
  return y;
4549
4560
  } catch (t) {
@@ -5003,6 +5014,8 @@ function Io(e) {
5003
5014
  n && n.unbind("comment-broadcast"), e && e.bind("comment-broadcast", (e) => {
5004
5015
  Lo(t, e);
5005
5016
  });
5017
+ }), x(() => {
5018
+ n.value?.unbind("comment-broadcast");
5006
5019
  });
5007
5020
  }
5008
5021
  function Lo(e, t) {
@@ -5025,6 +5038,17 @@ function Lo(e, t) {
5025
5038
  //#endregion
5026
5039
  //#region ../core/src/cloud/collaboration.ts
5027
5040
  var Ro = [
5041
+ "pusher:member_added",
5042
+ "pusher:member_removed",
5043
+ "client-block_locked",
5044
+ "client-block_unlocked",
5045
+ "client-operation",
5046
+ "mcp-operation"
5047
+ ];
5048
+ function zo(e) {
5049
+ for (let t of Ro) e.unbind(t);
5050
+ }
5051
+ var Bo = [
5028
5052
  "#3b82f6",
5029
5053
  "#ef4444",
5030
5054
  "#10b981",
@@ -5036,10 +5060,10 @@ var Ro = [
5036
5060
  "#6366f1",
5037
5061
  "#14b8a6"
5038
5062
  ];
5039
- function zo(e) {
5063
+ function Vo(e) {
5040
5064
  let { authManager: t, editor: r, channel: a } = e, o = n([]), s = n(/* @__PURE__ */ new Map()), c = 0, l = !1, u = F(() => t.userConfig?.id ?? "");
5041
5065
  function d() {
5042
- let e = Ro[c % Ro.length];
5066
+ let e = Bo[c % Bo.length];
5043
5067
  return c++, e;
5044
5068
  }
5045
5069
  function f(e) {
@@ -5101,7 +5125,7 @@ function zo(e) {
5101
5125
  return i(() => r.state.selectedBlockId, (e, t) => {
5102
5126
  l || (t && y(t), e && v(e));
5103
5127
  }), i(a, (t, n) => {
5104
- if (n && (n.unbind("pusher:member_added"), n.unbind("pusher:member_removed"), n.unbind("client-block_locked"), n.unbind("client-block_unlocked"), n.unbind("client-operation"), n.unbind("mcp-operation")), !t) {
5128
+ if (n && zo(n), !t) {
5105
5129
  o.value = [], s.value = /* @__PURE__ */ new Map(), c = 0;
5106
5130
  return;
5107
5131
  }
@@ -5132,6 +5156,8 @@ function zo(e) {
5132
5156
  }), t.bind("mcp-operation", (e) => {
5133
5157
  g(e);
5134
5158
  });
5159
+ }), x(() => {
5160
+ a.value && zo(a.value);
5135
5161
  }), {
5136
5162
  collaborators: o,
5137
5163
  lockedBlocks: s,
@@ -5141,7 +5167,7 @@ function zo(e) {
5141
5167
  }
5142
5168
  //#endregion
5143
5169
  //#region ../core/src/cloud/collaboration-broadcast.ts
5144
- function Bo(e, t) {
5170
+ function Ho(e, t) {
5145
5171
  let n = e.addBlock, r = e.updateBlock, i = e.removeBlock, a = e.moveBlock, o = e.updateSettings, s = e.setContent;
5146
5172
  e.addBlock = (e, r, i) => {
5147
5173
  n(e, r, i), t._broadcastOperation({
@@ -5195,7 +5221,7 @@ function Bo(e, t) {
5195
5221
  }
5196
5222
  //#endregion
5197
5223
  //#region ../core/src/cloud/web-socket.ts
5198
- function Vo(e) {
5224
+ function Uo(e) {
5199
5225
  let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = null, s = null;
5200
5226
  async function c(e, n) {
5201
5227
  if (o) return;
@@ -5227,7 +5253,7 @@ function Vo(e) {
5227
5253
  }
5228
5254
  //#endregion
5229
5255
  //#region ../core/src/cloud/saved-modules.ts
5230
- function Ho(e) {
5256
+ function Wo(e) {
5231
5257
  let t = new wo(e.authManager), r = n([]), i = n(!1);
5232
5258
  async function a(n) {
5233
5259
  i.value = !0;
@@ -5276,7 +5302,7 @@ function Ho(e) {
5276
5302
  }
5277
5303
  //#endregion
5278
5304
  //#region ../core/src/cloud/snapshots.ts
5279
- function Uo(e) {
5305
+ function Go(e) {
5280
5306
  let t = new wo(e.authManager), r = n([]), i = n(!1), a = n(!1);
5281
5307
  async function o() {
5282
5308
  i.value = !0;
@@ -5309,7 +5335,7 @@ function Uo(e) {
5309
5335
  }
5310
5336
  //#endregion
5311
5337
  //#region ../core/src/cloud/test-email.ts
5312
- function Wo(e) {
5338
+ function Ko(e) {
5313
5339
  let { authManager: t, getTemplateId: r, save: a, exportHtml: o, onError: s, isAuthReady: c, onBeforeTestEmail: l } = e, u = new wo(t), d = n(!1), f = n(null), p = n(null);
5314
5340
  c && i(c, (e) => {
5315
5341
  e && (p.value = t.testEmailConfig);
@@ -5346,7 +5372,7 @@ function Wo(e) {
5346
5372
  }
5347
5373
  //#endregion
5348
5374
  //#region ../core/src/cloud/export.ts
5349
- function Go(e) {
5375
+ function qo(e) {
5350
5376
  let { authManager: t, getFontsConfig: n, canUseCustomFonts: r } = e, i = new wo(t);
5351
5377
  function a() {
5352
5378
  let e = n?.();
@@ -5373,7 +5399,7 @@ function Go(e) {
5373
5399
  }
5374
5400
  //#endregion
5375
5401
  //#region ../core/src/cloud/plan-config.ts
5376
- function Ko(e) {
5402
+ function Jo(e) {
5377
5403
  let { authManager: t, onError: r } = e, i = n(null), a = n(!1), o = new wo(t), s = F(() => i.value?.features ?? null);
5378
5404
  function c(e) {
5379
5405
  return i.value?.features[e] ?? !1;
@@ -5400,11 +5426,11 @@ function Ko(e) {
5400
5426
  }
5401
5427
  //#endregion
5402
5428
  //#region ../core/src/cloud/health-check.ts
5403
- var qo = 5e3;
5404
- function Jo(e) {
5429
+ var Yo = 5e3;
5430
+ function Xo(e) {
5405
5431
  return e.authManager ? e.authManager.resolveUrl($.health) : `${(e.baseUrl ?? "https://templatical.com").replace(/\/$/, "")}${$.health}`;
5406
5432
  }
5407
- async function Yo(e, t) {
5433
+ async function Zo(e, t) {
5408
5434
  let n = performance.now();
5409
5435
  try {
5410
5436
  let r = t ? await t.authenticatedFetch($.health, {
@@ -5456,7 +5482,7 @@ async function Yo(e, t) {
5456
5482
  };
5457
5483
  }
5458
5484
  }
5459
- async function Xo(e) {
5485
+ async function Qo(e) {
5460
5486
  if (!e?.host || !e?.app_key) return {
5461
5487
  ok: !1,
5462
5488
  error: "WebSocket configuration not available"
@@ -5467,24 +5493,33 @@ async function Xo(e) {
5467
5493
  };
5468
5494
  let t = `${e.port === 443 ? "wss" : "ws"}://${e.host}:${e.port}/app/${e.app_key}?protocol=7&client=js&version=8.4.0-rc2&flash=false`;
5469
5495
  return new Promise((e) => {
5470
- let n = setTimeout(() => {
5471
- r.close(), e({
5496
+ let n = null, r = setTimeout(() => {
5497
+ n?.close(), e({
5472
5498
  ok: !1,
5473
5499
  error: "WebSocket connection timed out"
5474
5500
  });
5475
- }, qo), r = new WebSocket(t);
5476
- r.onopen = () => {
5477
- clearTimeout(n), r.close(), e({ ok: !0 });
5478
- }, r.onerror = () => {
5479
- clearTimeout(n), e({
5501
+ }, Yo);
5502
+ try {
5503
+ n = new WebSocket(t);
5504
+ } catch (t) {
5505
+ clearTimeout(r), e({
5506
+ ok: !1,
5507
+ error: t instanceof Error ? t.message : "WebSocket connection failed"
5508
+ });
5509
+ return;
5510
+ }
5511
+ n.onopen = () => {
5512
+ clearTimeout(r), n?.close(), e({ ok: !0 });
5513
+ }, n.onerror = () => {
5514
+ clearTimeout(r), e({
5480
5515
  ok: !1,
5481
5516
  error: "WebSocket connection failed"
5482
5517
  });
5483
5518
  };
5484
5519
  });
5485
5520
  }
5486
- async function Zo(e = {}) {
5487
- let t = await Yo(Jo(e), e.authManager), n = await Xo(t.wsConfig);
5521
+ async function $o(e = {}) {
5522
+ let t = await Zo(Xo(e), e.authManager), n = await Qo(t.wsConfig);
5488
5523
  return {
5489
5524
  api: t.api,
5490
5525
  websocket: n,
@@ -5494,7 +5529,7 @@ async function Zo(e = {}) {
5494
5529
  }
5495
5530
  //#endregion
5496
5531
  //#region ../core/src/cloud/mcp-listener.ts
5497
- function Qo(e) {
5532
+ function es(e) {
5498
5533
  let { editor: t, channel: n, onOperation: r } = e;
5499
5534
  i(n, (e, n) => {
5500
5535
  n && n.unbind("mcp-operation"), e && e.bind("mcp-operation", (e) => {
@@ -5504,7 +5539,7 @@ function Qo(e) {
5504
5539
  }
5505
5540
  //#endregion
5506
5541
  //#region src/composables/useAliveFlag.ts
5507
- function $o() {
5542
+ function ts() {
5508
5543
  let e = { alive: !0 };
5509
5544
  return r(() => {
5510
5545
  e.alive = !1;
@@ -5512,19 +5547,19 @@ function $o() {
5512
5547
  }
5513
5548
  //#endregion
5514
5549
  //#region src/cloud/components/AiChatSidebar.vue?vue&type=script&setup=true&lang.ts
5515
- var es = {
5550
+ var ns = {
5516
5551
  key: 0,
5517
5552
  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)]"
5518
- }, ts = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, ns = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, rs = { class: "tpl:flex tpl:items-center tpl:gap-1" }, is = ["title"], as = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, os = {
5553
+ }, rs = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, is = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, as = { class: "tpl:flex tpl:items-center tpl:gap-1" }, os = ["title"], ss = { class: "tpl:relative tpl:flex tpl:min-h-0 tpl:flex-1 tpl:flex-col" }, cs = {
5519
5554
  key: 0,
5520
5555
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
5521
- }, ss = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, cs = {
5556
+ }, ls = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, us = {
5522
5557
  key: 1,
5523
5558
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
5524
- }, ls = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, us = {
5559
+ }, ds = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, fs = {
5525
5560
  key: 2,
5526
5561
  class: "tpl:flex tpl:flex-col tpl:gap-4"
5527
- }, ds = {
5562
+ }, ps = {
5528
5563
  key: 0,
5529
5564
  class: "tpl:self-end tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm",
5530
5565
  style: {
@@ -5533,10 +5568,10 @@ var es = {
5533
5568
  "max-width": "85%",
5534
5569
  "box-shadow": "var(--tpl-shadow)"
5535
5570
  }
5536
- }, fs = {
5571
+ }, ms = {
5537
5572
  key: 1,
5538
5573
  class: "tpl:flex tpl:flex-col tpl:gap-2"
5539
- }, ps = {
5574
+ }, hs = {
5540
5575
  key: 1,
5541
5576
  class: "tpl:rounded-[var(--tpl-radius-sm)] tpl:px-3.5 tpl:py-2.5 tpl:text-sm tpl:whitespace-pre-wrap",
5542
5577
  style: {
@@ -5545,21 +5580,21 @@ var es = {
5545
5580
  color: "var(--tpl-text)",
5546
5581
  "box-shadow": "var(--tpl-shadow)"
5547
5582
  }
5548
- }, ms = {
5583
+ }, gs = {
5549
5584
  key: 0,
5550
5585
  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",
5551
5586
  style: {
5552
5587
  "background-color": "var(--tpl-danger-light)",
5553
5588
  color: "var(--tpl-danger)"
5554
5589
  }
5555
- }, hs = {
5590
+ }, _s = {
5556
5591
  key: 1,
5557
5592
  class: "tpl:absolute tpl:right-0 tpl:bottom-0 tpl:left-0 tpl:z-10 tpl:px-3 tpl:pb-3",
5558
5593
  style: {
5559
5594
  "background-color": "color-mix(\n in srgb,\n var(--tpl-bg) 50%,\n transparent\n )",
5560
5595
  "backdrop-filter": "blur(2px)"
5561
5596
  }
5562
- }, gs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, _s = ["onClick"], vs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, ys = { 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)]" }, bs = ["placeholder", "disabled"], xs = ["disabled"], Ss = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Cs = /* @__PURE__ */ g({
5597
+ }, vs = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ys = ["onClick"], bs = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, xs = { class: "tpl-ai-input-wrapper tpl:flex tpl:items-end tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border tpl:px-3 tpl:py-2 tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Ss = ["placeholder", "disabled"], Cs = ["disabled"], ws = { class: "tpl:m-0 tpl:px-1 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, Ts = /* @__PURE__ */ g({
5563
5598
  __name: "AiChatSidebar",
5564
5599
  props: {
5565
5600
  visible: { type: Boolean },
@@ -5567,7 +5602,7 @@ var es = {
5567
5602
  },
5568
5603
  emits: ["close"],
5569
5604
  setup(e, { emit: t }) {
5570
- let r = e, a = t, l = J(er, "AiChatSidebar"), u = J(q, "AiChatSidebar"), d = J(Yn, "AiChatSidebar"), p = o(zn, []), m = $o(), h = jo({
5605
+ let r = e, a = t, l = J(er, "AiChatSidebar"), u = J(q, "AiChatSidebar"), d = J(Yn, "AiChatSidebar"), p = o(zn, []), m = ts(), h = jo({
5571
5606
  authManager: d,
5572
5607
  getTemplateId: () => u.state.template?.id ?? null,
5573
5608
  onApply: r.onApply,
@@ -5614,11 +5649,11 @@ var es = {
5614
5649
  "leave-from-class": "tpl:translate-x-0",
5615
5650
  "leave-to-class": "tpl:translate-x-full"
5616
5651
  }, {
5617
- default: c(() => [e.visible ? (f(), C("div", es, [
5618
- P("div", ts, [P("div", ns, [T(w(oi), {
5652
+ default: c(() => [e.visible ? (f(), C("div", ns, [
5653
+ P("div", rs, [P("div", is, [T(w(oi), {
5619
5654
  size: 13,
5620
5655
  "stroke-width": 2
5621
- }), P("span", null, N(w(l).aiChat.title), 1)]), P("div", rs, [(w(h).messages.value?.length ?? 0) > 0 ? (f(), C("button", {
5656
+ }), P("span", null, N(w(l).aiChat.title), 1)]), P("div", as, [(w(h).messages.value?.length ?? 0) > 0 ? (f(), C("button", {
5622
5657
  key: 0,
5623
5658
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
5624
5659
  title: w(l).aiChat.clear,
@@ -5626,30 +5661,30 @@ var es = {
5626
5661
  }, [T(w(ci), {
5627
5662
  size: 14,
5628
5663
  "stroke-width": 2
5629
- })], 8, is)) : j("", !0), P("button", {
5664
+ })], 8, os)) : j("", !0), P("button", {
5630
5665
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
5631
5666
  onClick: n[1] ||= (e) => a("close")
5632
5667
  }, [T(w(pi), {
5633
5668
  size: 14,
5634
5669
  "stroke-width": 2
5635
5670
  })])])]),
5636
- P("div", as, [
5671
+ P("div", ss, [
5637
5672
  P("div", {
5638
5673
  ref_key: "messagesContainer",
5639
5674
  ref: _,
5640
5675
  class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4"
5641
- }, [w(h).isLoadingHistory.value ? (f(), C("div", os, [T(w(Jr), {
5676
+ }, [w(h).isLoadingHistory.value ? (f(), C("div", cs, [T(w(Jr), {
5642
5677
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
5643
5678
  size: 24,
5644
5679
  "stroke-width": 2
5645
- }), P("p", ss, N(w(l).aiChat.loadingHistory), 1)])) : (w(h).messages.value?.length ?? 0) === 0 ? (f(), C("div", cs, [T(w(oi), {
5680
+ }), P("p", ls, N(w(l).aiChat.loadingHistory), 1)])) : (w(h).messages.value?.length ?? 0) === 0 ? (f(), C("div", us, [T(w(oi), {
5646
5681
  size: 32,
5647
5682
  "stroke-width": 1.5,
5648
5683
  class: "tpl:text-[var(--tpl-text-dim)]"
5649
- }), P("p", ls, N(w(l).aiChat.placeholder), 1)])) : (f(), C("div", us, [(f(!0), C(O, null, s(w(h).messages.value, (e, t) => (f(), C("div", {
5684
+ }), P("p", ds, N(w(l).aiChat.placeholder), 1)])) : (f(), C("div", fs, [(f(!0), C(O, null, s(w(h).messages.value, (e, t) => (f(), C("div", {
5650
5685
  key: e.id,
5651
5686
  class: "tpl:flex tpl:flex-col tpl:gap-2"
5652
- }, [e.role === "user" ? (f(), C("div", ds, N(e.content), 1)) : (f(), C("div", fs, [!A(e.content) && w(h).isGenerating.value && t === (w(h).messages.value?.length ?? 0) - 1 ? (f(), M(Si, { key: 0 })) : (f(), C("div", ps, N(A(e.content) || w(l).aiChat.applied), 1)), e.id === w(h).lastApplyMessageId.value && !w(h).isGenerating.value ? (f(), C("button", {
5687
+ }, [e.role === "user" ? (f(), C("div", ps, N(e.content), 1)) : (f(), C("div", ms, [!A(e.content) && w(h).isGenerating.value && t === (w(h).messages.value?.length ?? 0) - 1 ? (f(), M(Si, { key: 0 })) : (f(), C("div", hs, N(A(e.content) || w(l).aiChat.applied), 1)), e.id === w(h).lastApplyMessageId.value && !w(h).isGenerating.value ? (f(), C("button", {
5653
5688
  key: 2,
5654
5689
  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",
5655
5690
  style: {
@@ -5665,12 +5700,12 @@ var es = {
5665
5700
  size: 12,
5666
5701
  "stroke-width": 2
5667
5702
  }), B(" " + N(w(l).aiChat.revert), 1)], 64))])) : j("", !0)]))]))), 128))]))], 512),
5668
- w(h).error.value ? (f(), C("div", ms, [T(w(Pr), {
5703
+ w(h).error.value ? (f(), C("div", gs, [T(w(Pr), {
5669
5704
  size: 14,
5670
5705
  "stroke-width": 2,
5671
5706
  class: "tpl:mt-0.5 tpl:shrink-0"
5672
5707
  }), P("span", null, N(w(h).error.value === "ai_apply_failed" ? w(l).aiChat.applyFailed : w(l).aiChat.error), 1)])) : j("", !0),
5673
- (w(h).suggestions.value?.length ?? 0) > 0 ? (f(), C("div", hs, [P("div", gs, [(f(!0), C(O, null, s(w(h).suggestions.value ?? [], (e, t) => (f(), C("button", {
5708
+ (w(h).suggestions.value?.length ?? 0) > 0 ? (f(), C("div", _s, [P("div", vs, [(f(!0), C(O, null, s(w(h).suggestions.value ?? [], (e, t) => (f(), C("button", {
5674
5709
  key: t,
5675
5710
  class: L(["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", (w(h).suggestions.value?.length ?? 0) - 1 - t < b.value ? "tpl:translate-y-0 tpl:opacity-100" : "tpl:pointer-events-none tpl:-translate-y-2 tpl:opacity-0"]),
5676
5711
  style: {
@@ -5680,97 +5715,99 @@ var es = {
5680
5715
  "box-shadow": "var(--tpl-shadow)"
5681
5716
  },
5682
5717
  onClick: (t) => ee(e)
5683
- }, N(e), 11, _s))), 128))])])) : j("", !0)
5718
+ }, N(e), 11, ys))), 128))])])) : j("", !0)
5684
5719
  ]),
5685
- P("div", vs, [P("div", ys, [v(P("textarea", {
5720
+ P("div", bs, [P("div", xs, [v(P("textarea", {
5686
5721
  "onUpdate:modelValue": n[3] ||= (e) => g.value = e,
5687
5722
  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)]",
5688
5723
  placeholder: w(l).aiChat.inputPlaceholder,
5689
5724
  disabled: w(h).isGenerating.value,
5690
5725
  rows: "3",
5691
5726
  onKeydown: te
5692
- }, null, 40, bs), [[ue, g.value]]), P("button", {
5727
+ }, null, 40, Ss), [[ue, g.value]]), P("button", {
5693
5728
  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)]",
5694
5729
  disabled: !g.value.trim() || w(h).isGenerating.value,
5695
5730
  onClick: k
5696
5731
  }, [T(w(ni), {
5697
5732
  size: 16,
5698
5733
  "stroke-width": 2
5699
- })], 8, xs)]), P("p", Ss, N(w(l).aiMenu.disclaimer), 1)])
5734
+ })], 8, Cs)]), P("p", ws, N(w(l).aiMenu.disclaimer), 1)])
5700
5735
  ])) : j("", !0)]),
5701
5736
  _: 1
5702
5737
  }));
5703
5738
  }
5704
- }), ws = /* @__PURE__ */ t({ default: () => Ts }), Ts = /* @__PURE__ */ vi(Cs, [["__scopeId", "data-v-a55e4bff"]]), Es = 6e4, Ds = 36e5, Os = 864e5;
5705
- function ks(e, t, n, r) {
5739
+ }), Es = /* @__PURE__ */ t({ default: () => Ds }), Ds = /* @__PURE__ */ vi(Ts, [["__scopeId", "data-v-a55e4bff"]]), Os = 6e4, ks = 36e5, As = 864e5;
5740
+ function js(e, t, n, r) {
5706
5741
  let i = new Date(e).getTime();
5707
5742
  if (Number.isNaN(i)) return null;
5708
- let a = Date.now() - i, o = Math.floor(a / Es), s = Math.floor(a / Ds), c = Math.floor(a / Os);
5743
+ let a = Date.now() - i;
5744
+ if (a < -Os) return null;
5745
+ let o = Math.floor(a / Os), s = Math.floor(a / ks), c = Math.floor(a / As);
5709
5746
  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));
5710
5747
  }
5711
5748
  //#endregion
5712
5749
  //#region src/cloud/components/CommentsSidebar.vue?vue&type=script&setup=true&lang.ts
5713
- var As = {
5750
+ var Ms = {
5714
5751
  key: 0,
5715
5752
  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)]"
5716
- }, js = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ms = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ns = {
5753
+ }, Ns = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Ps = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text)]" }, Fs = {
5717
5754
  key: 0,
5718
5755
  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)]"
5719
- }, Ps = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Fs = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Is = {
5756
+ }, Is = { class: "tpl:flex tpl:gap-1 tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-2" }, Ls = { class: "tpl:flex-1 tpl:overflow-y-auto" }, Rs = {
5720
5757
  key: 0,
5721
5758
  class: "tpl:flex tpl:h-full tpl:items-center tpl:justify-center"
5722
- }, Ls = {
5759
+ }, zs = {
5723
5760
  key: 1,
5724
5761
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:px-6 tpl:text-center"
5725
- }, Rs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, zs = {
5762
+ }, Bs = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Vs = {
5726
5763
  key: 2,
5727
5764
  class: "tpl:flex tpl:flex-col tpl:gap-3 tpl:p-3"
5728
- }, Bs = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Vs = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Hs = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Us = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ws = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, Gs = {
5765
+ }, Hs = { class: "tpl-comment-card tpl:rounded-lg tpl:border tpl:px-3.5 tpl:py-3" }, Us = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, Ws = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, Gs = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, Ks = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, qs = {
5729
5766
  key: 0,
5730
5767
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
5731
- }, Ks = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, qs = ["title", "onClick"], Js = ["title", "onClick"], Ys = ["title", "onClick"], Xs = {
5768
+ }, Js = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, Ys = ["title", "onClick"], Xs = ["title", "onClick"], Zs = ["title", "onClick"], Qs = {
5732
5769
  key: 0,
5733
5770
  class: "tpl:mt-1 tpl:flex tpl:items-center tpl:gap-1 tpl:text-[10px] tpl:text-[var(--tpl-primary)]"
5734
- }, Zs = {
5771
+ }, $s = {
5735
5772
  key: 0,
5736
5773
  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)]"
5737
- }, Qs = ["onClick"], $s = {
5774
+ }, ec = ["onClick"], tc = {
5738
5775
  key: 2,
5739
5776
  class: "tpl:mt-2"
5740
- }, ec = ["onKeydown"], tc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, nc = ["disabled", "onClick"], rc = {
5777
+ }, nc = ["onKeydown"], rc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, ic = ["disabled", "onClick"], ac = {
5741
5778
  key: 3,
5742
5779
  class: "tpl:mt-1.5 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
5743
- }, ic = {
5780
+ }, oc = {
5744
5781
  key: 4,
5745
5782
  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)]"
5746
- }, ac = { class: "tpl:flex-1" }, oc = ["onClick"], sc = {
5783
+ }, sc = { class: "tpl:flex-1" }, cc = ["onClick"], lc = {
5747
5784
  key: 5,
5748
5785
  class: "tpl:mt-2 tpl:flex tpl:items-center tpl:gap-2"
5749
- }, cc = ["title", "onClick"], lc = ["onClick"], uc = {
5786
+ }, uc = ["title", "onClick"], dc = ["onClick"], fc = {
5750
5787
  key: 0,
5751
5788
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
5752
- }, dc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, fc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, pc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, mc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, hc = {
5789
+ }, pc = { class: "tpl:flex tpl:items-start tpl:justify-between tpl:gap-2" }, mc = { class: "tpl:flex tpl:items-center tpl:gap-1.5" }, hc = { class: "tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)]" }, gc = { class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]" }, _c = {
5753
5790
  key: 0,
5754
5791
  class: "tpl:text-[10px] tpl:italic tpl:text-[var(--tpl-text-dim)]"
5755
- }, gc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, _c = ["title", "onClick"], vc = ["title", "onClick"], yc = {
5792
+ }, vc = { class: "tpl:flex tpl:items-center tpl:gap-0.5" }, yc = ["title", "onClick"], bc = ["title", "onClick"], xc = {
5756
5793
  key: 0,
5757
5794
  class: "tpl:mt-1.5"
5758
- }, bc = ["onKeydown"], xc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, Sc = ["disabled", "onClick"], Cc = {
5795
+ }, Sc = ["onKeydown"], Cc = { class: "tpl:mt-1.5 tpl:flex tpl:gap-1.5" }, wc = ["disabled", "onClick"], Tc = {
5759
5796
  key: 1,
5760
5797
  class: "tpl:mt-1 tpl:text-xs tpl:leading-relaxed tpl:whitespace-pre-wrap tpl:text-[var(--tpl-text)]"
5761
- }, wc = {
5798
+ }, Ec = {
5762
5799
  key: 2,
5763
5800
  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)]"
5764
- }, Tc = { class: "tpl:flex-1" }, Ec = ["onClick"], Dc = {
5801
+ }, Dc = { class: "tpl:flex-1" }, Oc = ["onClick"], kc = {
5765
5802
  key: 0,
5766
5803
  class: "tpl-comment-replies tpl:ml-5 tpl:pl-3 tpl:pt-2"
5767
- }, Oc = { class: "tpl:flex tpl:items-end tpl:gap-2" }, kc = ["placeholder", "onKeydown"], Ac = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, jc = ["disabled", "onClick"], Mc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Nc = {
5804
+ }, Ac = { class: "tpl:flex tpl:items-end tpl:gap-2" }, jc = ["placeholder", "onKeydown"], Mc = { class: "tpl:flex tpl:shrink-0 tpl:flex-col tpl:gap-1" }, Nc = ["disabled", "onClick"], Pc = { class: "tpl:border-t tpl:p-3 tpl:border-[var(--tpl-border)]" }, Fc = {
5768
5805
  key: 0,
5769
5806
  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)]"
5770
- }, Pc = {
5807
+ }, Ic = {
5771
5808
  key: 1,
5772
5809
  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)]"
5773
- }, Fc = ["placeholder", "disabled"], Ic = ["disabled"], Lc = /* @__PURE__ */ g({
5810
+ }, Lc = ["placeholder", "disabled"], Rc = ["disabled"], zc = /* @__PURE__ */ g({
5774
5811
  __name: "CommentsSidebar",
5775
5812
  props: { visible: { type: Boolean } },
5776
5813
  emits: ["close", "filterBlock"],
@@ -5843,7 +5880,7 @@ var As = {
5843
5880
  return e.author_identifier === ee.value;
5844
5881
  }
5845
5882
  function be(e) {
5846
- return ks(e, u.snapshotHistory) ?? e;
5883
+ return js(e, u.snapshotHistory) ?? e;
5847
5884
  }
5848
5885
  function xe(e) {
5849
5886
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), me());
@@ -5870,14 +5907,14 @@ var As = {
5870
5907
  "leave-from-class": "tpl:translate-x-0",
5871
5908
  "leave-to-class": "tpl:translate-x-full"
5872
5909
  }, {
5873
- default: c(() => [e.visible ? (f(), C("div", As, [
5874
- P("div", js, [P("div", Ms, [
5910
+ default: c(() => [e.visible ? (f(), C("div", Ms, [
5911
+ P("div", Ns, [P("div", Ps, [
5875
5912
  T(w(Yr), {
5876
5913
  size: 13,
5877
5914
  "stroke-width": 2
5878
5915
  }),
5879
5916
  P("span", null, N(w(u).comments.title), 1),
5880
- w(m).unresolvedCount.value > 0 ? (f(), C("span", Ns, N(w(m).unresolvedCount.value), 1)) : j("", !0)
5917
+ w(m).unresolvedCount.value > 0 ? (f(), C("span", Fs, N(w(m).unresolvedCount.value), 1)) : j("", !0)
5881
5918
  ]), P("button", {
5882
5919
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
5883
5920
  onClick: n[0] ||= (e) => o("close")
@@ -5885,7 +5922,7 @@ var As = {
5885
5922
  size: 14,
5886
5923
  "stroke-width": 2
5887
5924
  })])]),
5888
- P("div", Ps, [
5925
+ P("div", Is, [
5889
5926
  P("button", {
5890
5927
  class: L(["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", h.value === "unresolved" ? "tpl-comment-filter--active" : ""]),
5891
5928
  onClick: n[1] ||= (e) => se("unresolved")
@@ -5900,24 +5937,24 @@ var As = {
5900
5937
  onClick: n[3] ||= (e) => se("block", w(d).state.selectedBlockId ?? void 0)
5901
5938
  }, N(w(u).comments.filterBlock), 3)) : j("", !0)
5902
5939
  ]),
5903
- P("div", Fs, [w(m).isLoading.value ? (f(), C("div", Is, [T(w(Jr), {
5940
+ P("div", Ls, [w(m).isLoading.value ? (f(), C("div", Rs, [T(w(Jr), {
5904
5941
  class: "tpl-spinner tpl:text-[var(--tpl-text-muted)]",
5905
5942
  size: 24,
5906
5943
  "stroke-width": 2
5907
- })])) : oe.value.length === 0 ? (f(), C("div", Ls, [T(w(Yr), {
5944
+ })])) : oe.value.length === 0 ? (f(), C("div", zs, [T(w(Yr), {
5908
5945
  size: 32,
5909
5946
  "stroke-width": 1.5,
5910
5947
  class: "tpl:text-[var(--tpl-text-dim)]"
5911
- }), P("p", Rs, N(h.value === "all" ? w(u).comments.noCommentsHint : w(u).comments.noComments), 1)])) : (f(), C("div", zs, [(f(!0), C(O, null, s(oe.value, (e) => (f(), C("div", {
5948
+ }), P("p", Bs, N(h.value === "all" ? w(u).comments.noCommentsHint : w(u).comments.noComments), 1)])) : (f(), C("div", Vs, [(f(!0), C(O, null, s(oe.value, (e) => (f(), C("div", {
5912
5949
  key: e.id,
5913
5950
  class: "tpl-comment-thread"
5914
5951
  }, [
5915
- P("div", Bs, [
5916
- P("div", Vs, [P("div", Hs, [
5917
- P("span", Us, N(ye(e) ? w(u).comments.ownedByYou : e.author_name), 1),
5918
- P("span", Ws, N(be(e.created_at)), 1),
5919
- e.updated_at === e.created_at ? j("", !0) : (f(), C("span", Gs, " (" + N(w(u).comments.edited) + ") ", 1))
5920
- ]), P("div", Ks, [
5952
+ P("div", Hs, [
5953
+ P("div", Us, [P("div", Ws, [
5954
+ P("span", Gs, N(ye(e) ? w(u).comments.ownedByYou : e.author_name), 1),
5955
+ P("span", Ks, N(be(e.created_at)), 1),
5956
+ e.updated_at === e.created_at ? j("", !0) : (f(), C("span", qs, " (" + N(w(u).comments.edited) + ") ", 1))
5957
+ ]), P("div", Js, [
5921
5958
  P("button", {
5922
5959
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
5923
5960
  title: e.resolved_at ? w(u).comments.unresolve : w(u).comments.resolve,
@@ -5927,7 +5964,7 @@ var As = {
5927
5964
  "stroke-width": 2,
5928
5965
  class: "tpl-resolve-icon",
5929
5966
  style: D({ color: e.resolved_at ? "var(--tpl-primary)" : void 0 })
5930
- }, null, 8, ["style"])], 8, qs),
5967
+ }, null, 8, ["style"])], 8, Ys),
5931
5968
  ye(e) ? (f(), C("button", {
5932
5969
  key: 0,
5933
5970
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
@@ -5936,7 +5973,7 @@ var As = {
5936
5973
  }, [T(w(Zr), {
5937
5974
  size: 12,
5938
5975
  "stroke-width": 2
5939
- })], 8, Js)) : j("", !0),
5976
+ })], 8, Xs)) : j("", !0),
5940
5977
  ye(e) ? (f(), C("button", {
5941
5978
  key: 1,
5942
5979
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
@@ -5945,45 +5982,45 @@ var As = {
5945
5982
  }, [T(w(ci), {
5946
5983
  size: 12,
5947
5984
  "stroke-width": 2
5948
- })], 8, Ys)) : j("", !0)
5985
+ })], 8, Zs)) : j("", !0)
5949
5986
  ])]),
5950
5987
  T(ae, { name: "tpl-resolve" }, {
5951
- default: c(() => [e.resolved_at ? (f(), C("div", Xs, [T(w(kr), {
5988
+ default: c(() => [e.resolved_at ? (f(), C("div", Qs, [T(w(kr), {
5952
5989
  size: 10,
5953
5990
  "stroke-width": 2.5
5954
5991
  }), P("span", null, N(w(l)(w(u).comments.resolvedBy, { name: e.resolved_by_name ?? "" })), 1)])) : j("", !0)]),
5955
5992
  _: 2
5956
5993
  }, 1024),
5957
- e.block_id && ne(e.block_id) ? (f(), C("span", Zs, N(w(u).comments.missingBlock), 1)) : e.block_id ? (f(), C("button", {
5994
+ e.block_id && ne(e.block_id) ? (f(), C("span", $s, N(w(u).comments.missingBlock), 1)) : e.block_id ? (f(), C("button", {
5958
5995
  key: 1,
5959
5996
  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)]",
5960
5997
  onClick: (t) => w(d).selectBlock(e.block_id ?? "")
5961
- }, " Block ", 8, Qs)) : j("", !0),
5962
- x.value === e.id ? (f(), C("div", $s, [v(P("textarea", {
5998
+ }, " Block ", 8, ec)) : j("", !0),
5999
+ x.value === e.id ? (f(), C("div", tc, [v(P("textarea", {
5963
6000
  "onUpdate:modelValue": n[4] ||= (e) => S.value = e,
5964
6001
  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)]",
5965
6002
  rows: "3",
5966
6003
  onKeydown: (t) => Ce(t, e.id)
5967
- }, null, 40, ec), [[ue, S.value]]), P("div", tc, [P("button", {
6004
+ }, null, 40, nc), [[ue, S.value]]), P("div", rc, [P("button", {
5968
6005
  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)]",
5969
6006
  disabled: !S.value.trim() || w(m).isSubmitting.value,
5970
6007
  onClick: (t) => ge(e.id)
5971
- }, N(w(u).comments.save), 9, nc), P("button", {
6008
+ }, N(w(u).comments.save), 9, ic), P("button", {
5972
6009
  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)]",
5973
6010
  onClick: n[5] ||= (e) => z()
5974
- }, N(w(u).comments.cancel), 1)])])) : (f(), C("p", rc, N(e.body), 1)),
5975
- k.value === e.id ? (f(), C("div", ic, [
5976
- P("span", ac, N(w(u).comments.deleteConfirm), 1),
6011
+ }, N(w(u).comments.cancel), 1)])])) : (f(), C("p", ac, N(e.body), 1)),
6012
+ k.value === e.id ? (f(), C("div", oc, [
6013
+ P("span", sc, N(w(u).comments.deleteConfirm), 1),
5977
6014
  P("button", {
5978
6015
  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)]",
5979
6016
  onClick: (t) => _e(e.id)
5980
- }, N(w(u).comments.delete), 9, oc),
6017
+ }, N(w(u).comments.delete), 9, cc),
5981
6018
  P("button", {
5982
6019
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
5983
6020
  onClick: n[6] ||= (e) => pe()
5984
6021
  }, N(w(u).comments.cancel), 1)
5985
6022
  ])) : j("", !0),
5986
- x.value !== e.id && k.value !== e.id ? (f(), C("div", sc, [P("button", {
6023
+ x.value !== e.id && k.value !== e.id ? (f(), C("div", lc, [P("button", {
5987
6024
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
5988
6025
  title: w(u).comments.reply,
5989
6026
  onClick: (t) => I(e.id)
@@ -5991,7 +6028,7 @@ var As = {
5991
6028
  size: 13,
5992
6029
  "stroke-width": 2,
5993
6030
  class: "tpl:text-[var(--tpl-primary)]"
5994
- })], 8, cc), (e.replies?.length ?? 0) > 0 ? (f(), C("button", {
6031
+ })], 8, uc), (e.replies?.length ?? 0) > 0 ? (f(), C("button", {
5995
6032
  key: 0,
5996
6033
  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)]",
5997
6034
  onClick: (t) => le(e.id)
@@ -6003,18 +6040,18 @@ var As = {
6003
6040
  key: 1,
6004
6041
  size: 11,
6005
6042
  "stroke-width": 2
6006
- })), B(" " + N((e.replies?.length ?? 0) === 1 ? w(l)(w(u).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : w(l)(w(u).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, lc)) : j("", !0)])) : j("", !0)
6043
+ })), B(" " + N((e.replies?.length ?? 0) === 1 ? w(l)(w(u).comments.replyOne, { count: String(e.replies?.length ?? 0) }) : w(l)(w(u).comments.replyMany, { count: String(e.replies?.length ?? 0) })), 1)], 8, dc)) : j("", !0)])) : j("", !0)
6007
6044
  ]),
6008
6045
  T(ae, { name: "tpl-replies" }, {
6009
- default: c(() => [E.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), C("div", uc, [(f(!0), C(O, null, s(e.replies, (t, r) => (f(), C("div", {
6046
+ default: c(() => [E.value.has(e.id) && (e.replies?.length ?? 0) > 0 ? (f(), C("div", fc, [(f(!0), C(O, null, s(e.replies, (t, r) => (f(), C("div", {
6010
6047
  key: t.id,
6011
6048
  class: L(["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" : ""])
6012
6049
  }, [
6013
- P("div", dc, [P("div", fc, [
6014
- P("span", pc, N(ye(t) ? w(u).comments.ownedByYou : t.author_name), 1),
6015
- P("span", mc, N(be(t.created_at)), 1),
6016
- t.updated_at === t.created_at ? j("", !0) : (f(), C("span", hc, " (" + N(w(u).comments.edited) + ") ", 1))
6017
- ]), P("div", gc, [ye(t) ? (f(), C("button", {
6050
+ P("div", pc, [P("div", mc, [
6051
+ P("span", hc, N(ye(t) ? w(u).comments.ownedByYou : t.author_name), 1),
6052
+ P("span", gc, N(be(t.created_at)), 1),
6053
+ t.updated_at === t.created_at ? j("", !0) : (f(), C("span", _c, " (" + N(w(u).comments.edited) + ") ", 1))
6054
+ ]), P("div", vc, [ye(t) ? (f(), C("button", {
6018
6055
  key: 0,
6019
6056
  class: "tpl-comment-action tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6020
6057
  title: w(u).comments.edit,
@@ -6022,7 +6059,7 @@ var As = {
6022
6059
  }, [T(w(Zr), {
6023
6060
  size: 11,
6024
6061
  "stroke-width": 2
6025
- })], 8, _c)) : j("", !0), ye(t) ? (f(), C("button", {
6062
+ })], 8, yc)) : j("", !0), ye(t) ? (f(), C("button", {
6026
6063
  key: 1,
6027
6064
  class: "tpl-comment-action tpl-comment-delete tpl:rounded tpl:p-1 tpl:transition-colors tpl:duration-150",
6028
6065
  title: w(u).comments.delete,
@@ -6030,26 +6067,26 @@ var As = {
6030
6067
  }, [T(w(ci), {
6031
6068
  size: 11,
6032
6069
  "stroke-width": 2
6033
- })], 8, vc)) : j("", !0)])]),
6034
- x.value === t.id ? (f(), C("div", yc, [v(P("textarea", {
6070
+ })], 8, bc)) : j("", !0)])]),
6071
+ x.value === t.id ? (f(), C("div", xc, [v(P("textarea", {
6035
6072
  "onUpdate:modelValue": n[7] ||= (e) => S.value = e,
6036
6073
  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)]",
6037
6074
  rows: "2",
6038
6075
  onKeydown: (e) => Ce(e, t.id)
6039
- }, null, 40, bc), [[ue, S.value]]), P("div", xc, [P("button", {
6076
+ }, null, 40, Sc), [[ue, S.value]]), P("div", Cc, [P("button", {
6040
6077
  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)]",
6041
6078
  disabled: !S.value.trim() || w(m).isSubmitting.value,
6042
6079
  onClick: (e) => ge(t.id)
6043
- }, N(w(u).comments.save), 9, Sc), P("button", {
6080
+ }, N(w(u).comments.save), 9, wc), P("button", {
6044
6081
  class: "tpl:rounded-md tpl:px-2.5 tpl:py-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6045
6082
  onClick: n[8] ||= (e) => z()
6046
- }, N(w(u).comments.cancel), 1)])])) : (f(), C("p", Cc, N(t.body), 1)),
6047
- k.value === t.id ? (f(), C("div", wc, [
6048
- P("span", Tc, N(w(u).comments.deleteConfirm), 1),
6083
+ }, N(w(u).comments.cancel), 1)])])) : (f(), C("p", Tc, N(t.body), 1)),
6084
+ k.value === t.id ? (f(), C("div", Ec, [
6085
+ P("span", Dc, N(w(u).comments.deleteConfirm), 1),
6049
6086
  P("button", {
6050
6087
  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)]",
6051
6088
  onClick: (e) => _e(t.id)
6052
- }, N(w(u).comments.delete), 9, Ec),
6089
+ }, N(w(u).comments.delete), 9, Oc),
6053
6090
  P("button", {
6054
6091
  class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]",
6055
6092
  onClick: n[9] ||= (e) => pe()
@@ -6059,20 +6096,20 @@ var As = {
6059
6096
  _: 2
6060
6097
  }, 1024),
6061
6098
  T(ae, { name: "tpl-replies" }, {
6062
- default: c(() => [y.value === e.id ? (f(), C("div", Dc, [P("div", Oc, [v(P("textarea", {
6099
+ default: c(() => [y.value === e.id ? (f(), C("div", kc, [P("div", Ac, [v(P("textarea", {
6063
6100
  "onUpdate:modelValue": n[10] ||= (e) => b.value = e,
6064
6101
  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)]",
6065
6102
  placeholder: w(u).comments.replyPlaceholder,
6066
6103
  rows: "2",
6067
6104
  onKeydown: (t) => Se(t, e.id)
6068
- }, null, 40, kc), [[ue, b.value]]), P("div", Ac, [P("button", {
6105
+ }, null, 40, jc), [[ue, b.value]]), P("div", Mc, [P("button", {
6069
6106
  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)]",
6070
6107
  disabled: !b.value.trim() || w(m).isSubmitting.value,
6071
6108
  onClick: (t) => he(e.id)
6072
6109
  }, [T(w(ni), {
6073
6110
  size: 14,
6074
6111
  "stroke-width": 2
6075
- })], 8, jc), P("button", {
6112
+ })], 8, Nc), P("button", {
6076
6113
  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)]",
6077
6114
  onClick: n[11] ||= (e) => de()
6078
6115
  }, [T(w(pi), {
@@ -6082,7 +6119,7 @@ var As = {
6082
6119
  _: 2
6083
6120
  }, 1024)
6084
6121
  ]))), 128))]))]),
6085
- P("div", Mc, [ie.value ? (f(), C("div", Nc, N(w(u).comments.saveTemplateFirst), 1)) : (f(), C("div", Pc, [v(P("textarea", {
6122
+ P("div", Pc, [ie.value ? (f(), C("div", Fc, N(w(u).comments.saveTemplateFirst), 1)) : (f(), C("div", Ic, [v(P("textarea", {
6086
6123
  ref_key: "newCommentInput",
6087
6124
  ref: A,
6088
6125
  "onUpdate:modelValue": n[12] ||= (e) => _.value = e,
@@ -6091,7 +6128,7 @@ var As = {
6091
6128
  disabled: w(m).isSubmitting.value,
6092
6129
  rows: "2",
6093
6130
  onKeydown: xe
6094
- }, null, 40, Fc), [[ue, _.value]]), P("button", {
6131
+ }, null, 40, Lc), [[ue, _.value]]), P("button", {
6095
6132
  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)]",
6096
6133
  disabled: !_.value.trim() || w(m).isSubmitting.value,
6097
6134
  onClick: me
@@ -6104,33 +6141,33 @@ var As = {
6104
6141
  key: 1,
6105
6142
  size: 16,
6106
6143
  "stroke-width": 2
6107
- }))], 8, Ic)]))])
6144
+ }))], 8, Rc)]))])
6108
6145
  ])) : j("", !0)]),
6109
6146
  _: 1
6110
6147
  }));
6111
6148
  }
6112
- }), Rc = /* @__PURE__ */ t({ default: () => zc }), zc = /* @__PURE__ */ vi(Lc, [["__scopeId", "data-v-d204f573"]]), Bc = {
6149
+ }), Bc = /* @__PURE__ */ t({ default: () => Vc }), Vc = /* @__PURE__ */ vi(zc, [["__scopeId", "data-v-d204f573"]]), Hc = {
6113
6150
  key: 0,
6114
6151
  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)]"
6115
- }, Vc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Hc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Uc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Wc = {
6152
+ }, Uc = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Wc = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Gc = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Kc = {
6116
6153
  key: 0,
6117
6154
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6118
- }, Gc = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Kc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, qc = {
6155
+ }, qc = { class: "tpl:flex tpl:w-full tpl:flex-col tpl:items-center tpl:gap-3" }, Jc = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Yc = {
6119
6156
  key: 1,
6120
6157
  class: "tpl:flex tpl:flex-col tpl:gap-4"
6121
- }, Jc = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Yc = {
6158
+ }, Xc = { class: "tpl:flex tpl:gap-1 tpl:rounded-[var(--tpl-radius-sm)] tpl:p-1 tpl:bg-[var(--tpl-bg-hover)]" }, Zc = {
6122
6159
  key: 0,
6123
6160
  class: "tpl:flex tpl:flex-col tpl:gap-2"
6124
- }, Xc = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, Zc = ["src", "alt"], Qc = {
6161
+ }, Qc = { class: "tpl:relative tpl:overflow-hidden tpl:rounded-[var(--tpl-radius)] tpl:border tpl:border-[var(--tpl-border)] tpl:bg-[var(--tpl-bg)]" }, $c = ["src", "alt"], el = {
6125
6162
  key: 1,
6126
6163
  class: "tpl:flex tpl:h-32 tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2"
6127
- }, $c = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, el = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, tl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, nl = ["accept"], rl = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, il = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, al = ["placeholder"], ol = {
6164
+ }, tl = { class: "tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, nl = { class: "tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]" }, rl = { class: "tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, il = ["accept"], al = { class: "tpl:flex tpl:flex-col tpl:gap-1.5" }, ol = { class: "tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, sl = ["placeholder"], cl = {
6128
6165
  key: 0,
6129
6166
  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)]"
6130
- }, sl = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, cl = { class: "tpl:flex tpl:gap-2" }, ll = {
6167
+ }, ll = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, ul = { class: "tpl:flex tpl:gap-2" }, dl = {
6131
6168
  key: 1,
6132
6169
  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)]"
6133
- }, ul = ["disabled"], dl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, fl = /* @__PURE__ */ g({
6170
+ }, fl = ["disabled"], pl = { class: "tpl:m-0 tpl:pt-1 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, ml = /* @__PURE__ */ g({
6134
6171
  __name: "DesignReferenceSidebar",
6135
6172
  props: {
6136
6173
  visible: { type: Boolean },
@@ -6138,68 +6175,70 @@ var As = {
6138
6175
  },
6139
6176
  emits: ["close", "apply"],
6140
6177
  setup(e, { emit: t }) {
6141
- let r = e, a = t, { t: o } = Di(), s = J(q, "DesignReferenceSidebar"), l = Po({
6178
+ let a = e, o = t, { t: s } = Di(), l = J(q, "DesignReferenceSidebar"), u = Po({
6142
6179
  authManager: J(Yn, "DesignReferenceSidebar"),
6143
- getTemplateId: () => s.state.template?.id ?? null,
6144
- onApply: (e) => a("apply", e)
6145
- }), u = n(null), d = n("image"), p = n(null), m = n(""), h = n(null), g = n(!1), _ = n(!1), y = F(() => l.isGenerating.value ? !1 : p.value !== null);
6146
- function b(e) {
6147
- d.value = e, E();
6148
- }
6180
+ getTemplateId: () => l.state.template?.id ?? null,
6181
+ onApply: (e) => o("apply", e)
6182
+ }), d = n(null), p = n("image"), m = n(null), h = n(""), g = n(null), _ = n(!1), y = n(!1), b = F(() => u.isGenerating.value ? !1 : m.value !== null);
6149
6183
  function x(e) {
6150
- let t = e.target, n = t.files?.[0];
6151
- n && S(n), t.value = "";
6184
+ p.value = e, O();
6152
6185
  }
6153
6186
  function S(e) {
6187
+ let t = e.target, n = t.files?.[0];
6188
+ n && E(n), t.value = "";
6189
+ }
6190
+ function E(e) {
6154
6191
  if (e.size > 10485760) {
6155
- l.error.value = o.designReference.fileTooLarge;
6192
+ u.error.value = s.designReference.fileTooLarge;
6156
6193
  return;
6157
6194
  }
6158
- if (d.value === "image") {
6195
+ if (p.value === "image") {
6159
6196
  if (![
6160
6197
  "image/png",
6161
6198
  "image/jpeg",
6162
6199
  "image/jpg",
6163
6200
  "image/webp"
6164
6201
  ].includes(e.type)) {
6165
- l.error.value = o.designReference.invalidFileType;
6202
+ u.error.value = s.designReference.invalidFileType;
6166
6203
  return;
6167
6204
  }
6168
- } else if (d.value === "pdf" && e.type !== "application/pdf") {
6169
- l.error.value = o.designReference.invalidFileType;
6205
+ } else if (p.value === "pdf" && e.type !== "application/pdf") {
6206
+ u.error.value = s.designReference.invalidFileType;
6170
6207
  return;
6171
6208
  }
6172
- p.value = e, l.error.value = null, h.value && URL.revokeObjectURL(h.value), e.type.startsWith("image/") ? h.value = URL.createObjectURL(e) : h.value = null;
6209
+ m.value = e, u.error.value = null, g.value && URL.revokeObjectURL(g.value), e.type.startsWith("image/") ? g.value = URL.createObjectURL(e) : g.value = null;
6173
6210
  }
6174
- function E() {
6175
- h.value &&= (URL.revokeObjectURL(h.value), null), p.value = null;
6211
+ function O() {
6212
+ g.value &&= (URL.revokeObjectURL(g.value), null), m.value = null;
6176
6213
  }
6177
- function O(e) {
6178
- e.preventDefault(), _.value = !0;
6214
+ function k(e) {
6215
+ e.preventDefault(), y.value = !0;
6179
6216
  }
6180
- function k() {
6181
- _.value = !1;
6217
+ function A() {
6218
+ y.value = !1;
6182
6219
  }
6183
- function A(e) {
6184
- e.preventDefault(), _.value = !1;
6220
+ function ee(e) {
6221
+ e.preventDefault(), y.value = !1;
6185
6222
  let t = e.dataTransfer?.files?.[0];
6186
- t && S(t);
6223
+ t && E(t);
6187
6224
  }
6188
- function ee() {
6189
- if (!y.value) return;
6190
- if (r.hasExistingBlocks && !g.value) {
6191
- g.value = !0;
6225
+ function te() {
6226
+ if (!b.value) return;
6227
+ if (a.hasExistingBlocks && !_.value) {
6228
+ _.value = !0;
6192
6229
  return;
6193
6230
  }
6194
- g.value = !1;
6231
+ _.value = !1;
6195
6232
  let e = {};
6196
- m.value.trim() && (e.prompt = m.value.trim()), d.value === "image" && p.value ? e.imageUpload = p.value : d.value === "pdf" && p.value && (e.pdfUpload = p.value), l.generate(e);
6233
+ h.value.trim() && (e.prompt = h.value.trim()), p.value === "image" && m.value ? e.imageUpload = m.value : p.value === "pdf" && m.value && (e.pdfUpload = m.value), u.generate(e);
6197
6234
  }
6198
- function te() {
6199
- g.value = !1;
6235
+ function ne() {
6236
+ _.value = !1;
6200
6237
  }
6201
- return i(() => r.visible, (e) => {
6202
- e || (g.value = !1);
6238
+ return i(() => a.visible, (e) => {
6239
+ e || (_.value = !1);
6240
+ }), r(() => {
6241
+ g.value &&= (URL.revokeObjectURL(g.value), null);
6203
6242
  }), (t, n) => (f(), M(ae, {
6204
6243
  "enter-active-class": "tpl-design-slide-enter-active",
6205
6244
  "enter-from-class": "tpl:translate-x-full",
@@ -6208,51 +6247,51 @@ var As = {
6208
6247
  "leave-from-class": "tpl:translate-x-0",
6209
6248
  "leave-to-class": "tpl:translate-x-full"
6210
6249
  }, {
6211
- default: c(() => [e.visible ? (f(), C("div", Bc, [P("div", Vc, [P("div", Hc, [T(w(Gr), {
6250
+ default: c(() => [e.visible ? (f(), C("div", Hc, [P("div", Uc, [P("div", Wc, [T(w(Gr), {
6212
6251
  size: 13,
6213
6252
  "stroke-width": 2
6214
- }), P("span", null, N(w(o).designReference.title), 1)]), P("button", {
6253
+ }), P("span", null, N(w(s).designReference.title), 1)]), P("button", {
6215
6254
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6216
- onClick: n[0] ||= (e) => a("close")
6255
+ onClick: n[0] ||= (e) => o("close")
6217
6256
  }, [T(w(pi), {
6218
6257
  size: 14,
6219
6258
  "stroke-width": 2
6220
- })])]), P("div", Uc, [w(l).isGenerating.value ? (f(), C("div", Wc, [P("div", Gc, [T(Si), P("p", Kc, N(w(o).designReference.generating), 1)])])) : (f(), C("div", qc, [
6221
- P("div", Jc, [P("button", {
6259
+ })])]), P("div", Gc, [w(u).isGenerating.value ? (f(), C("div", Kc, [P("div", qc, [T(Si), P("p", Jc, N(w(s).designReference.generating), 1)])])) : (f(), C("div", Yc, [
6260
+ P("div", Xc, [P("button", {
6222
6261
  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",
6223
6262
  style: D({
6224
- backgroundColor: d.value === "image" ? "var(--tpl-bg)" : "transparent",
6225
- color: d.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
6226
- boxShadow: d.value === "image" ? "var(--tpl-shadow)" : "none"
6263
+ backgroundColor: p.value === "image" ? "var(--tpl-bg)" : "transparent",
6264
+ color: p.value === "image" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
6265
+ boxShadow: p.value === "image" ? "var(--tpl-shadow)" : "none"
6227
6266
  }),
6228
- onClick: n[1] ||= (e) => b("image")
6267
+ onClick: n[1] ||= (e) => x("image")
6229
6268
  }, [T(w(Vr), {
6230
6269
  size: 12,
6231
6270
  "stroke-width": 2
6232
- }), B(" " + N(w(o).designReference.uploadImage), 1)], 4), P("button", {
6271
+ }), B(" " + N(w(s).designReference.uploadImage), 1)], 4), P("button", {
6233
6272
  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",
6234
6273
  style: D({
6235
- backgroundColor: d.value === "pdf" ? "var(--tpl-bg)" : "transparent",
6236
- color: d.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
6237
- boxShadow: d.value === "pdf" ? "var(--tpl-shadow)" : "none"
6274
+ backgroundColor: p.value === "pdf" ? "var(--tpl-bg)" : "transparent",
6275
+ color: p.value === "pdf" ? "var(--tpl-primary)" : "var(--tpl-text-muted)",
6276
+ boxShadow: p.value === "pdf" ? "var(--tpl-shadow)" : "none"
6238
6277
  }),
6239
- onClick: n[2] ||= (e) => b("pdf")
6278
+ onClick: n[2] ||= (e) => x("pdf")
6240
6279
  }, [T(w(Hr), {
6241
6280
  size: 12,
6242
6281
  "stroke-width": 2
6243
- }), B(" " + N(w(o).designReference.uploadPdf), 1)], 4)]),
6244
- P("div", null, [p.value ? (f(), C("div", Yc, [P("div", Xc, [h.value ? (f(), C("img", {
6282
+ }), B(" " + N(w(s).designReference.uploadPdf), 1)], 4)]),
6283
+ P("div", null, [m.value ? (f(), C("div", Zc, [P("div", Qc, [g.value ? (f(), C("img", {
6245
6284
  key: 0,
6246
- src: h.value,
6247
- alt: p.value.name,
6285
+ src: g.value,
6286
+ alt: m.value.name,
6248
6287
  class: "tpl:h-auto tpl:max-h-48 tpl:w-full tpl:object-contain"
6249
- }, null, 8, Zc)) : (f(), C("div", Qc, [T(w(Hr), {
6288
+ }, null, 8, $c)) : (f(), C("div", el, [T(w(Hr), {
6250
6289
  size: 32,
6251
6290
  "stroke-width": 1.5,
6252
6291
  class: "tpl:text-[var(--tpl-text-dim)]"
6253
- }), P("span", $c, N(p.value.name), 1)])), P("button", {
6292
+ }), P("span", tl, N(m.value.name), 1)])), P("button", {
6254
6293
  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)]",
6255
- onClick: E
6294
+ onClick: O
6256
6295
  }, [T(w(pi), {
6257
6296
  size: 12,
6258
6297
  "stroke-width": 2
@@ -6260,63 +6299,63 @@ var As = {
6260
6299
  key: 1,
6261
6300
  class: "tpl-design-dropzone tpl:flex tpl:cursor-pointer tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:border-2 tpl:border-dashed tpl:px-4 tpl:py-8 tpl:transition-colors tpl:duration-150",
6262
6301
  style: D({
6263
- borderColor: _.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
6264
- backgroundColor: _.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
6302
+ borderColor: y.value ? "var(--tpl-primary)" : "var(--tpl-border-light)",
6303
+ backgroundColor: y.value ? "var(--tpl-primary-light)" : "var(--tpl-bg)"
6265
6304
  }),
6266
- onClick: n[3] ||= (e) => u.value?.click(),
6267
- onDragover: O,
6268
- onDragleave: k,
6269
- onDrop: A
6305
+ onClick: n[3] ||= (e) => d.value?.click(),
6306
+ onDragover: k,
6307
+ onDragleave: A,
6308
+ onDrop: ee
6270
6309
  }, [
6271
6310
  T(w(di), {
6272
6311
  size: 24,
6273
6312
  "stroke-width": 1.5,
6274
6313
  class: "tpl:text-[var(--tpl-text-dim)]"
6275
6314
  }),
6276
- P("span", el, N(w(o).designReference.dropHint), 1),
6277
- P("span", tl, N(d.value === "image" ? w(o).designReference.acceptedImages : w(o).designReference.acceptedPdf), 1)
6315
+ P("span", nl, N(w(s).designReference.dropHint), 1),
6316
+ P("span", rl, N(p.value === "image" ? w(s).designReference.acceptedImages : w(s).designReference.acceptedPdf), 1)
6278
6317
  ], 36)), P("input", {
6279
6318
  ref_key: "fileInput",
6280
- ref: u,
6319
+ ref: d,
6281
6320
  type: "file",
6282
6321
  class: "tpl:hidden",
6283
- accept: d.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
6284
- onChange: x
6285
- }, null, 40, nl)]),
6286
- P("div", rl, [P("label", il, N(w(o).designReference.promptLabel), 1), v(P("textarea", {
6287
- "onUpdate:modelValue": n[4] ||= (e) => m.value = e,
6322
+ accept: p.value === "image" ? "image/png,image/jpeg,image/webp" : "application/pdf",
6323
+ onChange: S
6324
+ }, null, 40, il)]),
6325
+ P("div", al, [P("label", ol, N(w(s).designReference.promptLabel), 1), v(P("textarea", {
6326
+ "onUpdate:modelValue": n[4] ||= (e) => h.value = e,
6288
6327
  class: L(["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"]]),
6289
- placeholder: w(o).designReference.promptPlaceholder,
6328
+ placeholder: w(s).designReference.promptPlaceholder,
6290
6329
  rows: "3"
6291
- }, null, 8, al), [[ue, m.value]])]),
6292
- g.value ? (f(), C("div", ol, [P("p", sl, N(w(o).designReference.replaceWarning), 1), P("div", cl, [P("button", {
6330
+ }, null, 8, sl), [[ue, h.value]])]),
6331
+ _.value ? (f(), C("div", cl, [P("p", ll, N(w(s).designReference.replaceWarning), 1), P("div", ul, [P("button", {
6293
6332
  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)]",
6294
6333
  style: { "background-color": "transparent" },
6295
- onClick: te
6296
- }, N(w(o).designReference.replaceCancel), 1), P("button", {
6334
+ onClick: ne
6335
+ }, N(w(s).designReference.replaceCancel), 1), P("button", {
6297
6336
  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)]",
6298
- onClick: ee
6299
- }, N(w(o).designReference.replaceConfirm), 1)])])) : j("", !0),
6300
- w(l).error.value ? (f(), C("div", ll, [T(w(Pr), {
6337
+ onClick: te
6338
+ }, N(w(s).designReference.replaceConfirm), 1)])])) : j("", !0),
6339
+ w(u).error.value ? (f(), C("div", dl, [T(w(Pr), {
6301
6340
  size: 14,
6302
6341
  "stroke-width": 2,
6303
6342
  class: "tpl:mt-0.5 tpl:shrink-0"
6304
- }), P("span", null, N(w(o).designReference.error), 1)])) : j("", !0),
6305
- g.value ? j("", !0) : (f(), C("button", {
6343
+ }), P("span", null, N(w(s).designReference.error), 1)])) : j("", !0),
6344
+ _.value ? j("", !0) : (f(), C("button", {
6306
6345
  key: 2,
6307
6346
  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)]",
6308
- disabled: !y.value,
6309
- onClick: ee
6347
+ disabled: !b.value,
6348
+ onClick: te
6310
6349
  }, [T(w(Gr), {
6311
6350
  size: 16,
6312
6351
  "stroke-width": 2
6313
- }), B(" " + N(w(o).designReference.generate), 1)], 8, ul)),
6314
- P("p", dl, N(w(o).aiMenu.disclaimer), 1)
6352
+ }), B(" " + N(w(s).designReference.generate), 1)], 8, fl)),
6353
+ P("p", pl, N(w(s).aiMenu.disclaimer), 1)
6315
6354
  ]))])])) : j("", !0)]),
6316
6355
  _: 1
6317
6356
  }));
6318
6357
  }
6319
- }), pl = /* @__PURE__ */ t({ default: () => ml }), ml = /* @__PURE__ */ vi(fl, [["__scopeId", "data-v-7e3f1324"]]), hl = ["data-tpl-theme"], gl = /* @__PURE__ */ g({
6358
+ }), hl = /* @__PURE__ */ t({ default: () => gl }), gl = /* @__PURE__ */ vi(ml, [["__scopeId", "data-v-bdbf8d0d"]]), _l = ["data-tpl-theme"], vl = /* @__PURE__ */ g({
6320
6359
  __name: "TplModal",
6321
6360
  props: { visible: { type: Boolean } },
6322
6361
  emits: ["close", "keydown"],
@@ -6349,30 +6388,30 @@ var As = {
6349
6388
  }, [P("div", {
6350
6389
  ref_key: "dialogRef",
6351
6390
  ref: a
6352
- }, [l(t.$slots, "default")], 512)], 40, hl)) : j("", !0)]),
6391
+ }, [l(t.$slots, "default")], 512)], 40, _l)) : j("", !0)]),
6353
6392
  _: 3
6354
6393
  })]));
6355
6394
  }
6356
- }), _l = ["disabled", "title"], vl = ["title"], yl = {
6395
+ }), yl = ["disabled", "title"], bl = ["title"], xl = {
6357
6396
  key: 0,
6358
6397
  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)]",
6359
6398
  style: {
6360
6399
  "backdrop-filter": "blur(8px)",
6361
6400
  "-webkit-backdrop-filter": "blur(8px)"
6362
6401
  }
6363
- }, bl = { class: "tpl:border-b tpl:px-3 tpl:py-2 tpl:text-xs tpl:font-semibold tpl:text-[var(--tpl-text)] tpl:border-[var(--tpl-border)]" }, xl = {
6402
+ }, Sl = { 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)]" }, Cl = {
6364
6403
  key: 0,
6365
6404
  class: "tpl:flex tpl:items-center tpl:justify-center tpl:py-8"
6366
- }, Sl = {
6405
+ }, wl = {
6367
6406
  key: 1,
6368
6407
  class: "tpl:px-3 tpl:py-6 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-muted)]"
6369
- }, Cl = {
6408
+ }, Tl = {
6370
6409
  key: 2,
6371
6410
  class: "tpl:max-h-64 tpl:overflow-y-auto"
6372
- }, wl = ["disabled", "onClick"], Tl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, El = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Dl = {
6411
+ }, El = ["disabled", "onClick"], Dl = { class: "tpl:flex tpl:flex-col tpl:gap-0.5" }, Ol = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, kl = {
6373
6412
  key: 0,
6374
6413
  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)]"
6375
- }, Ol = ["disabled", "title"], kl = /* @__PURE__ */ g({
6414
+ }, Al = ["disabled", "title"], jl = /* @__PURE__ */ g({
6376
6415
  __name: "SnapshotHistory",
6377
6416
  props: {
6378
6417
  snapshots: {},
@@ -6400,7 +6439,7 @@ var As = {
6400
6439
  t !== -1 && (p.value = t, a("navigate", r.snapshots[t])), u.value = !1;
6401
6440
  }
6402
6441
  function b(e) {
6403
- let t = ks(e, l.snapshotHistory, o, 7);
6442
+ let t = js(e, l.snapshotHistory, o, 7);
6404
6443
  return t === null ? new Date(e).toLocaleDateString(void 0, {
6405
6444
  month: "short",
6406
6445
  day: "numeric",
@@ -6423,7 +6462,7 @@ var As = {
6423
6462
  }, [T(w(jr), {
6424
6463
  size: 14,
6425
6464
  "stroke-width": 2
6426
- })], 8, _l),
6465
+ })], 8, yl),
6427
6466
  P("button", {
6428
6467
  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)]",
6429
6468
  title: w(l).snapshotHistory.tooltip,
@@ -6435,19 +6474,19 @@ var As = {
6435
6474
  class: L(["tpl:transition-transform tpl:duration-150", { "tpl:rotate-180": u.value }]),
6436
6475
  size: 10,
6437
6476
  "stroke-width": 2
6438
- }, null, 8, ["class"])], 8, vl),
6477
+ }, null, 8, ["class"])], 8, bl),
6439
6478
  T(ae, { name: "tpl-dropdown" }, {
6440
- default: c(() => [u.value ? (f(), C("div", yl, [P("div", bl, N(w(l).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), C("div", xl, [T(w(Jr), {
6479
+ default: c(() => [u.value ? (f(), C("div", xl, [P("div", Sl, N(w(l).snapshotHistory.dropdownTitle), 1), e.isLoading ? (f(), C("div", Cl, [T(w(Jr), {
6441
6480
  class: "tpl:animate-spin tpl:text-[var(--tpl-primary)]",
6442
6481
  size: 20,
6443
6482
  "stroke-width": 2
6444
- })])) : e.snapshots.length === 0 ? (f(), C("div", Sl, N(w(l).snapshotHistory.noSnapshots), 1)) : (f(), C("div", Cl, [(f(!0), C(O, null, s(e.snapshots, (t) => (f(), C("button", {
6483
+ })])) : e.snapshots.length === 0 ? (f(), C("div", wl, N(w(l).snapshotHistory.noSnapshots), 1)) : (f(), C("div", Tl, [(f(!0), C(O, null, s(e.snapshots, (t) => (f(), C("button", {
6445
6484
  key: t.id,
6446
6485
  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)]",
6447
6486
  style: { "background-color": "transparent" },
6448
6487
  disabled: e.isRestoring,
6449
6488
  onClick: (e) => y(t.id)
6450
- }, [P("div", Tl, [P("div", El, [P("span", null, N(b(t.created_at)), 1), t.is_autosave ? (f(), C("span", Dl, N(w(l).snapshotHistory.auto), 1)) : j("", !0)])])], 8, wl))), 128))]))])) : j("", !0)]),
6489
+ }, [P("div", Dl, [P("div", Ol, [P("span", null, N(b(t.created_at)), 1), t.is_autosave ? (f(), C("span", kl, N(w(l).snapshotHistory.auto), 1)) : j("", !0)])])], 8, El))), 128))]))])) : j("", !0)]),
6451
6490
  _: 1
6452
6491
  }),
6453
6492
  P("button", {
@@ -6458,66 +6497,66 @@ var As = {
6458
6497
  }, [T(w(Mr), {
6459
6498
  size: 14,
6460
6499
  "stroke-width": 2
6461
- })], 8, Ol)
6500
+ })], 8, Al)
6462
6501
  ], 512));
6463
6502
  }
6464
- }), Al = /* @__PURE__ */ t({ default: () => jl }), jl = kl;
6503
+ }), Ml = /* @__PURE__ */ t({ default: () => Nl }), Nl = jl;
6465
6504
  //#endregion
6466
6505
  //#region src/cloud/utils/scoringStyles.ts
6467
- function Ml(e) {
6506
+ function Pl(e) {
6468
6507
  return e >= 80 ? "var(--tpl-success)" : e >= 60 ? "var(--tpl-warning)" : "var(--tpl-danger)";
6469
6508
  }
6470
- function Nl(e) {
6509
+ function Fl(e) {
6471
6510
  return e >= 80 ? "var(--tpl-success-light)" : e >= 60 ? "var(--tpl-warning-light)" : "var(--tpl-danger-light)";
6472
6511
  }
6473
- function Pl(e) {
6512
+ function Il(e) {
6474
6513
  return e === "high" ? "var(--tpl-danger)" : e === "medium" ? "var(--tpl-warning)" : "var(--tpl-text-muted)";
6475
6514
  }
6476
- function Fl(e) {
6515
+ function Ll(e) {
6477
6516
  return e === "high" ? "var(--tpl-danger-light)" : e === "medium" ? "var(--tpl-warning-light)" : "var(--tpl-bg-hover)";
6478
6517
  }
6479
6518
  //#endregion
6480
6519
  //#region src/cloud/components/TemplateScoringPanel.vue?vue&type=script&setup=true&lang.ts
6481
- var Il = {
6520
+ var Rl = {
6482
6521
  key: 0,
6483
6522
  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)]"
6484
- }, 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 tpl:items-center tpl:gap-1" }, Bl = ["title"], Vl = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Hl = {
6523
+ }, zl = { class: "tpl:flex tpl:items-center tpl:justify-between tpl:border-b tpl:border-[var(--tpl-border)] tpl:px-4 tpl:py-3" }, Bl = { class: "tpl:flex tpl:items-center tpl:gap-1.5 tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-primary)]" }, Vl = { class: "tpl:flex tpl:items-center tpl:gap-1" }, Hl = ["title"], Ul = { class: "tpl:flex-1 tpl:overflow-y-auto tpl:p-4" }, Wl = {
6485
6524
  key: 0,
6486
6525
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6487
- }, Ul = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Wl = {
6526
+ }, Gl = { class: "tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kl = {
6488
6527
  key: 1,
6489
6528
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6490
- }, Gl = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Kl = {
6529
+ }, ql = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, Jl = {
6491
6530
  key: 2,
6492
6531
  class: "tpl:flex tpl:flex-col tpl:gap-4"
6493
- }, ql = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Jl = {
6532
+ }, Yl = { class: "tpl:text-xs tpl:font-medium tpl:uppercase tpl:tracking-wider tpl:text-[var(--tpl-text-muted)]" }, Xl = {
6494
6533
  key: 0,
6495
6534
  class: "tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
6496
- }, Yl = {
6535
+ }, Zl = {
6497
6536
  key: 0,
6498
6537
  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)]"
6499
- }, Xl = ["onClick"], Zl = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, Ql = {
6538
+ }, Ql = ["onClick"], $l = { class: "tpl:flex-1 tpl:text-xs tpl:font-medium tpl:text-[var(--tpl-text)]" }, eu = {
6500
6539
  key: 0,
6501
6540
  class: "tpl:text-[10px] tpl:text-[var(--tpl-text-dim)]"
6502
- }, $l = {
6541
+ }, tu = {
6503
6542
  key: 0,
6504
6543
  class: "tpl:border-t tpl:border-[var(--tpl-border)]"
6505
- }, eu = {
6544
+ }, nu = {
6506
6545
  key: 0,
6507
6546
  class: "tpl:px-3 tpl:py-3 tpl:text-center tpl:text-xs tpl:text-[var(--tpl-text-dim)]"
6508
- }, tu = { class: "tpl:flex tpl:items-start tpl:gap-2" }, nu = { class: "tpl:flex-1 tpl:min-w-0" }, ru = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, iu = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, au = {
6547
+ }, ru = { class: "tpl:flex tpl:items-start tpl:gap-2" }, iu = { class: "tpl:flex-1 tpl:min-w-0" }, au = { class: "tpl:flex tpl:items-start tpl:gap-1.5" }, ou = { class: "tpl:text-xs tpl:leading-snug tpl:text-[var(--tpl-text)]" }, su = {
6509
6548
  key: 0,
6510
6549
  class: "tpl:mt-1 tpl:text-[11px] tpl:leading-snug tpl:text-[var(--tpl-text-dim)]"
6511
- }, ou = {
6550
+ }, cu = {
6512
6551
  key: 1,
6513
6552
  class: "tpl:mt-2 tpl:flex tpl:justify-center"
6514
- }, su = ["disabled", "onClick"], cu = {
6553
+ }, lu = ["disabled", "onClick"], uu = {
6515
6554
  key: 0,
6516
6555
  class: "tpl:mt-1.5 tpl:text-[11px] tpl:text-[var(--tpl-danger)]"
6517
- }, lu = {
6556
+ }, du = {
6518
6557
  key: 3,
6519
6558
  class: "tpl:flex tpl:h-full tpl:flex-col tpl:items-center tpl:justify-center tpl:gap-3 tpl:text-center"
6520
- }, uu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, du = { class: "tpl:m-0 tpl:px-4 tpl:pb-2 tpl:pt-2 tpl:text-center tpl:text-[11px] tpl:text-[var(--tpl-text-dim)]" }, fu = /* @__PURE__ */ g({
6559
+ }, fu = { class: "tpl:max-w-[240px] tpl:text-sm tpl:text-[var(--tpl-text-muted)]" }, pu = { 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)]" }, mu = /* @__PURE__ */ g({
6521
6560
  __name: "TemplateScoringPanel",
6522
6561
  props: { visible: { type: Boolean } },
6523
6562
  emits: ["close"],
@@ -6568,10 +6607,10 @@ var Il = {
6568
6607
  "leave-from-class": "tpl:translate-x-0",
6569
6608
  "leave-to-class": "tpl:translate-x-full"
6570
6609
  }, {
6571
- default: c(() => [e.visible ? (f(), C("div", Il, [P("div", Ll, [P("div", Rl, [T(w(ii), {
6610
+ default: c(() => [e.visible ? (f(), C("div", Rl, [P("div", zl, [P("div", Bl, [T(w(ii), {
6572
6611
  size: 13,
6573
6612
  "stroke-width": 2
6574
- }), P("span", null, N(w(l).scoring.title), 1)]), P("div", zl, [w(d).scoringResult.value && !w(d).isScoring.value ? (f(), C("button", {
6613
+ }), P("span", null, N(w(l).scoring.title), 1)]), P("div", Vl, [w(d).scoringResult.value && !w(d).isScoring.value ? (f(), C("button", {
6575
6614
  key: 0,
6576
6615
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6577
6616
  title: w(l).scoring.rescore,
@@ -6579,19 +6618,19 @@ var Il = {
6579
6618
  }, [T(w(ei), {
6580
6619
  size: 14,
6581
6620
  "stroke-width": 2
6582
- })], 8, Bl)) : j("", !0), P("button", {
6621
+ })], 8, Hl)) : j("", !0), P("button", {
6583
6622
  class: "tpl:rounded-md tpl:p-0.5 tpl:transition-colors tpl:duration-150 tpl:text-[var(--tpl-text-muted)]",
6584
6623
  onClick: n[1] ||= (e) => a("close")
6585
6624
  }, [T(w(pi), {
6586
6625
  size: 14,
6587
6626
  "stroke-width": 2
6588
- })])])]), P("div", Vl, [w(d).isScoring.value ? (f(), C("div", Hl, [P("p", Ul, N(w(l).scoring.scoring), 1), T(Si, { class: "tpl:w-3/4" })])) : w(d).error.value && !w(d).scoringResult.value ? (f(), C("div", Wl, [
6627
+ })])])]), P("div", Ul, [w(d).isScoring.value ? (f(), C("div", Wl, [P("p", Gl, N(w(l).scoring.scoring), 1), T(Si, { class: "tpl:w-3/4" })])) : w(d).error.value && !w(d).scoringResult.value ? (f(), C("div", Kl, [
6589
6628
  T(w(Pr), {
6590
6629
  size: 32,
6591
6630
  "stroke-width": 1.5,
6592
6631
  class: "tpl:text-[var(--tpl-danger)]"
6593
6632
  }),
6594
- P("p", Gl, N(w(l).scoring.error), 1),
6633
+ P("p", ql, N(w(l).scoring.error), 1),
6595
6634
  P("button", {
6596
6635
  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)]",
6597
6636
  onClick: n[2] ||= (e) => y()
@@ -6599,19 +6638,19 @@ var Il = {
6599
6638
  size: 12,
6600
6639
  "stroke-width": 2
6601
6640
  }), B(" " + N(w(l).scoring.rescore), 1)])
6602
- ])) : w(d).scoringResult.value ? (f(), C("div", Kl, [
6641
+ ])) : w(d).scoringResult.value ? (f(), C("div", Jl, [
6603
6642
  P("div", {
6604
6643
  class: "tpl:flex tpl:flex-col tpl:items-center tpl:gap-2 tpl:rounded-[var(--tpl-radius)] tpl:p-5",
6605
- style: D({ backgroundColor: w(Nl)(w(d).scoringResult.value.score) })
6644
+ style: D({ backgroundColor: w(Fl)(w(d).scoringResult.value.score) })
6606
6645
  }, [
6607
6646
  P("span", {
6608
6647
  class: "tpl:text-4xl tpl:font-bold tpl:tabular-nums",
6609
- style: D({ color: w(Ml)(w(d).scoringResult.value.score) })
6648
+ style: D({ color: w(Pl)(w(d).scoringResult.value.score) })
6610
6649
  }, N(w(d).scoringResult.value.score), 5),
6611
- P("span", ql, N(w(l).scoring.overallScore), 1),
6612
- x() > 0 ? (f(), C("span", Jl, N(x()) + " " + N(w(l).scoring.findings), 1)) : j("", !0)
6650
+ P("span", Yl, N(w(l).scoring.overallScore), 1),
6651
+ x() > 0 ? (f(), C("span", Xl, N(x()) + " " + N(w(l).scoring.findings), 1)) : j("", !0)
6613
6652
  ], 4),
6614
- w(d).fixError.value ? (f(), C("div", Yl, [T(w(Pr), {
6653
+ w(d).fixError.value ? (f(), C("div", Zl, [T(w(Pr), {
6615
6654
  size: 14,
6616
6655
  "stroke-width": 2,
6617
6656
  class: "tpl:mt-0.5 tpl:shrink-0"
@@ -6626,40 +6665,40 @@ var Il = {
6626
6665
  (f(), M(h(v[e]), {
6627
6666
  size: 14,
6628
6667
  "stroke-width": 2,
6629
- style: D({ color: w(Ml)(w(d).scoringResult.value.categories[e].score) })
6668
+ style: D({ color: w(Pl)(w(d).scoringResult.value.categories[e].score) })
6630
6669
  }, null, 8, ["style"])),
6631
- P("span", Zl, N(w(l).scoring.categories[e]), 1),
6670
+ P("span", $l, N(w(l).scoring.categories[e]), 1),
6632
6671
  P("span", {
6633
6672
  class: "tpl:rounded-full tpl:px-2 tpl:py-0.5 tpl:text-xs tpl:font-semibold tpl:tabular-nums",
6634
6673
  style: D({
6635
- color: w(Ml)(w(d).scoringResult.value.categories[e].score),
6636
- backgroundColor: w(Nl)(w(d).scoringResult.value.categories[e].score)
6674
+ color: w(Pl)(w(d).scoringResult.value.categories[e].score),
6675
+ backgroundColor: w(Fl)(w(d).scoringResult.value.categories[e].score)
6637
6676
  })
6638
6677
  }, N(w(d).scoringResult.value.categories[e].score), 5),
6639
- w(d).scoringResult.value.categories[e].findings.length > 0 ? (f(), C("span", Ql, N(w(d).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
6678
+ w(d).scoringResult.value.categories[e].findings.length > 0 ? (f(), C("span", eu, N(w(d).scoringResult.value.categories[e].findings.length), 1)) : j("", !0),
6640
6679
  T(w(Ar), {
6641
6680
  size: 12,
6642
6681
  "stroke-width": 2,
6643
6682
  class: L(["tpl:transition-transform tpl:duration-200 tpl:text-[var(--tpl-text-dim)]", m.value[e] ? "tpl:rotate-0" : "tpl:-rotate-90"])
6644
6683
  }, null, 8, ["class"])
6645
- ], 8, Xl), m.value[e] ? (f(), C("div", $l, [w(d).scoringResult.value.categories[e].findings.length === 0 ? (f(), C("div", eu, N(w(l).scoring.noFindings), 1)) : j("", !0), (f(!0), C(O, null, s(w(d).scoringResult.value.categories[e].findings, (e) => (f(), C("div", {
6684
+ ], 8, Ql), m.value[e] ? (f(), C("div", tu, [w(d).scoringResult.value.categories[e].findings.length === 0 ? (f(), C("div", nu, N(w(l).scoring.noFindings), 1)) : j("", !0), (f(!0), C(O, null, s(w(d).scoringResult.value.categories[e].findings, (e) => (f(), C("div", {
6646
6685
  key: e.id,
6647
6686
  class: "tpl:border-t tpl:px-3 tpl:py-2.5 first:tpl:border-t-0 tpl:border-[var(--tpl-border-light)]"
6648
- }, [P("div", tu, [(f(), M(h(w(e.severity === "high" ? Pr : e.severity === "medium" ? li : qr)), {
6687
+ }, [P("div", ru, [(f(), M(h(w(e.severity === "high" ? Pr : e.severity === "medium" ? li : qr)), {
6649
6688
  size: 13,
6650
6689
  "stroke-width": 2,
6651
6690
  class: "tpl:mt-0.5 tpl:shrink-0",
6652
- style: D({ color: w(Pl)(e.severity) })
6653
- }, null, 8, ["style"])), P("div", nu, [
6654
- P("div", ru, [P("span", {
6691
+ style: D({ color: w(Il)(e.severity) })
6692
+ }, null, 8, ["style"])), P("div", iu, [
6693
+ P("div", au, [P("span", {
6655
6694
  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",
6656
6695
  style: D({
6657
- color: w(Pl)(e.severity),
6658
- backgroundColor: w(Fl)(e.severity)
6696
+ color: w(Il)(e.severity),
6697
+ backgroundColor: w(Ll)(e.severity)
6659
6698
  })
6660
- }, N(w(l).scoring.severity[e.severity]), 5), P("span", iu, N(e.message), 1)]),
6661
- e.suggestion ? (f(), C("p", au, N(e.suggestion), 1)) : j("", !0),
6662
- e.blockId ? (f(), C("div", ou, [P("button", {
6699
+ }, N(w(l).scoring.severity[e.severity]), 5), P("span", ou, N(e.message), 1)]),
6700
+ e.suggestion ? (f(), C("p", su, N(e.suggestion), 1)) : j("", !0),
6701
+ e.blockId ? (f(), C("div", cu, [P("button", {
6663
6702
  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)]",
6664
6703
  style: { "background-color": "transparent" },
6665
6704
  disabled: w(d).fixingFindingId.value !== null,
@@ -6673,27 +6712,27 @@ var Il = {
6673
6712
  key: 1,
6674
6713
  size: 11,
6675
6714
  "stroke-width": 2
6676
- })), B(" " + N(w(d).fixingFindingId.value === e.id ? w(l).scoring.fixing : w(l).scoring.fix), 1)], 8, su), w(d).fixError.value ? (f(), C("p", cu, N(w(d).fixError.value), 1)) : j("", !0)])) : j("", !0)
6715
+ })), B(" " + N(w(d).fixingFindingId.value === e.id ? w(l).scoring.fixing : w(l).scoring.fix), 1)], 8, lu), w(d).fixError.value ? (f(), C("p", uu, N(w(d).fixError.value), 1)) : j("", !0)])) : j("", !0)
6677
6716
  ])])]))), 128))])) : j("", !0)])), 64))
6678
- ])) : (f(), C("div", lu, [T(w(ii), {
6717
+ ])) : (f(), C("div", du, [T(w(ii), {
6679
6718
  size: 32,
6680
6719
  "stroke-width": 1.5,
6681
6720
  class: "tpl:text-[var(--tpl-text-dim)]"
6682
- }), P("p", uu, N(w(l).scoring.emptyState), 1)])), P("p", du, N(w(l).aiMenu.disclaimer), 1)])])) : j("", !0)]),
6721
+ }), P("p", fu, N(w(l).scoring.emptyState), 1)])), P("p", pu, N(w(l).aiMenu.disclaimer), 1)])])) : j("", !0)]),
6683
6722
  _: 1
6684
6723
  }));
6685
6724
  }
6686
- }), pu = /* @__PURE__ */ t({ default: () => mu }), mu = /* @__PURE__ */ vi(fu, [["__scopeId", "data-v-3a059e8d"]]), hu = ["aria-busy"], gu = {
6725
+ }), hu = /* @__PURE__ */ t({ default: () => gu }), gu = /* @__PURE__ */ vi(mu, [["__scopeId", "data-v-3a059e8d"]]), _u = ["aria-busy"], vu = {
6687
6726
  id: "tpl-test-email-title",
6688
6727
  class: "tpl:mb-4 tpl:text-sm tpl:font-semibold tpl:text-[var(--tpl-text)]"
6689
- }, _u = { class: "tpl:mb-3" }, vu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, yu = ["value"], bu = ["disabled"], xu = ["value"], Su = {
6728
+ }, yu = { class: "tpl:mb-3" }, bu = { class: "tpl:mb-1.5 tpl:block tpl:text-sm tpl:font-medium tpl:text-[var(--tpl-text-muted)]" }, xu = ["value"], Su = ["disabled"], Cu = ["value"], wu = {
6690
6729
  key: 0,
6691
6730
  role: "alert",
6692
6731
  class: "tpl:mb-3 tpl:text-xs tpl:text-[var(--tpl-danger)]"
6693
- }, Cu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, wu = ["disabled"], Tu = ["disabled"], Eu = {
6732
+ }, Tu = { class: "tpl:flex tpl:justify-end tpl:gap-2" }, Eu = ["disabled"], Du = ["disabled"], Ou = {
6694
6733
  key: 0,
6695
6734
  class: "tpl:flex tpl:items-center tpl:gap-1.5"
6696
- }, Du = { key: 1 }, Ou = /* @__PURE__ */ g({
6735
+ }, ku = { key: 1 }, Au = /* @__PURE__ */ g({
6697
6736
  __name: "TestEmailModal",
6698
6737
  props: {
6699
6738
  visible: { type: Boolean },
@@ -6716,7 +6755,7 @@ var Il = {
6716
6755
  function p(e) {
6717
6756
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), u()), e.key === "Escape" && d();
6718
6757
  }
6719
- return (t, n) => (f(), M(gl, {
6758
+ return (t, n) => (f(), M(vl, {
6720
6759
  visible: e.visible,
6721
6760
  onClose: d,
6722
6761
  onKeydown: p
@@ -6732,14 +6771,14 @@ var Il = {
6732
6771
  "box-shadow": "var(--tpl-shadow-xl)"
6733
6772
  }
6734
6773
  }, [
6735
- P("h3", gu, N(w(o).testEmail.title), 1),
6736
- P("div", _u, [P("label", vu, N(w(o).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), C("input", {
6774
+ P("h3", vu, N(w(o).testEmail.title), 1),
6775
+ P("div", yu, [P("label", bu, N(w(o).testEmail.recipientLabel), 1), e.allowedEmails.length === 1 ? (f(), C("input", {
6737
6776
  key: 0,
6738
6777
  type: "text",
6739
6778
  value: l.value,
6740
6779
  disabled: "",
6741
6780
  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)]"
6742
- }, null, 8, yu)) : v((f(), C("select", {
6781
+ }, null, 8, xu)) : v((f(), C("select", {
6743
6782
  key: 1,
6744
6783
  "onUpdate:modelValue": n[0] ||= (e) => l.value = e,
6745
6784
  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)]",
@@ -6747,29 +6786,29 @@ var Il = {
6747
6786
  }, [(f(!0), C(O, null, s(e.allowedEmails, (e) => (f(), C("option", {
6748
6787
  key: e,
6749
6788
  value: e
6750
- }, N(e), 9, xu))), 128))], 8, bu)), [[se, l.value]])]),
6751
- e.error ? (f(), C("p", Su, N(e.error), 1)) : j("", !0),
6752
- P("div", Cu, [P("button", {
6789
+ }, N(e), 9, Cu))), 128))], 8, Su)), [[se, l.value]])]),
6790
+ e.error ? (f(), C("p", wu, N(e.error), 1)) : j("", !0),
6791
+ P("div", Tu, [P("button", {
6753
6792
  type: "button",
6754
6793
  class: L(["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 }]),
6755
6794
  disabled: e.isSending,
6756
6795
  onClick: d
6757
- }, N(w(o).testEmail.cancel), 11, wu), P("button", {
6796
+ }, N(w(o).testEmail.cancel), 11, Eu), P("button", {
6758
6797
  type: "button",
6759
6798
  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)]",
6760
6799
  disabled: !l.value || e.isSending,
6761
6800
  onClick: u
6762
- }, [e.isSending ? (f(), C("span", Eu, [T(w(Jr), {
6801
+ }, [e.isSending ? (f(), C("span", Ou, [T(w(Jr), {
6763
6802
  class: "tpl:animate-spin",
6764
6803
  size: 12,
6765
6804
  "stroke-width": 2
6766
- }), B(" " + N(w(o).testEmail.sending), 1)])) : (f(), C("span", Du, N(w(o).testEmail.send), 1))], 8, Tu)])
6767
- ], 8, hu)]),
6805
+ }), B(" " + N(w(o).testEmail.sending), 1)])) : (f(), C("span", ku, N(w(o).testEmail.send), 1))], 8, Du)])
6806
+ ], 8, _u)]),
6768
6807
  _: 1
6769
6808
  }, 8, ["visible"]));
6770
6809
  }
6771
- }), ku = /* @__PURE__ */ t({ default: () => Au }), Au = Ou;
6810
+ }), ju = /* @__PURE__ */ t({ default: () => Mu }), Mu = Au;
6772
6811
  //#endregion
6773
- export { Di as $, Fn as $t, mo as A, Ee as An, _r as At, _a as B, Kn as Bt, To as C, Ce as Cn, Lr as Ct, _o as D, be as Dn, Ar as Dt, Z as E, Oe as En, Mr as Et, Va as F, he as Fn, Xn as Ft, qi as G, Wn as Gt, pa as H, Zn as Ht, Ra as I, ge as In, Gn as It, Pi as J, Bn as Jt, Gi as K, q as Kt, Na as L, me as Ln, Yn as Lt, Za as M, ye as Mn, nr as Mt, Ja as N, we as Nn, Y as Nt, vo as O, ve as On, kr as Ot, za as P, _e as Pn, Jn as Pt, Ei as Q, Pn as Qt, ja as R, In as Rt, Oo as S, Ae as Sn, Rr as St, $ as T, xe as Tn, Pr as Tt, la as U, Mn as Ut, ga as V, er as Vt, Qi as W, Rn as Wt, ki as X, Qn as Xt, Ai as Y, Un as Yt, Oi as Z, $n as Zt, zo as _, ft as _n, qr as _t, pl as a, On as an, li as at, No as b, H as bn, Br as bt, Qo as c, rn as cn, oi as ct, Go as d, Et as dn, ni as dt, J as en, wi as et, Wo as f, pt as fn, ei as ft, Bo as g, St as gn, Jr as gt, Vo as h, yt as hn, Yr as ht, gl as i, K as in, di as it, ro as j, ke as jn, lr as jt, go as k, Te as kn, X as kt, Zo as l, an as ln, ii as lt, Ho as m, Ct as mn, Xr as mt, pu as n, xn as nn, _i as nt, Rc as o, Tn as on, ci as ot, Uo as p, xt as pn, Zr as pt, Ii as q, Nn as qt, Al as r, Sn as rn, pi as rt, ws as s, en as sn, si as st, ku as t, pn as tn, vi as tt, Ko as u, Pt as un, ri as ut, Io as v, dt as vn, Kr as vt, wo as w, De as wn, Ir as wt, Mo as x, Se as xn, zr as xt, Fo as y, ut as yn, Gr as yt, va as z, Ln as zt };
6812
+ export { Di as $, Fn as $t, mo as A, Ee as An, _r as At, _a as B, Kn as Bt, To as C, Ce as Cn, Lr as Ct, _o as D, be as Dn, Ar as Dt, Z as E, Oe as En, Mr as Et, Va as F, he as Fn, Xn as Ft, qi as G, Wn as Gt, pa as H, Zn as Ht, Ra as I, ge as In, Gn as It, Pi as J, Bn as Jt, Gi as K, q as Kt, Na as L, me as Ln, Yn as Lt, Za as M, ye as Mn, nr as Mt, Ja as N, we as Nn, Y as Nt, vo as O, ve as On, kr as Ot, za as P, _e as Pn, Jn as Pt, Ei as Q, Pn as Qt, ja as R, In as Rt, Oo as S, Ae as Sn, Rr as St, $ as T, xe as Tn, Pr as Tt, la as U, Mn as Ut, ga as V, er as Vt, Qi as W, Rn as Wt, ki as X, Qn as Xt, Ai as Y, Un as Yt, Oi as Z, $n as Zt, Vo as _, ft as _n, qr as _t, hl as a, On as an, li as at, No as b, H as bn, Br as bt, es as c, rn as cn, oi as ct, qo as d, Et as dn, ni as dt, J as en, wi as et, Ko as f, pt as fn, ei as ft, Ho as g, St as gn, Jr as gt, Uo as h, yt as hn, Yr as ht, vl as i, K as in, di as it, ro as j, ke as jn, lr as jt, go as k, Te as kn, X as kt, $o as l, an as ln, ii as lt, Wo as m, Ct as mn, Xr as mt, hu as n, xn as nn, _i as nt, Bc as o, Tn as on, ci as ot, Go as p, xt as pn, Zr as pt, Ii as q, Nn as qt, Ml as r, Sn as rn, pi as rt, Es as s, en as sn, si as st, ju as t, pn as tn, vi as tt, Jo as u, Pt as un, ri as ut, Io as v, dt as vn, Kr as vt, wo as w, De as wn, Ir as wt, Mo as x, Se as xn, zr as xt, Fo as y, ut as yn, Gr as yt, va as z, Ln as zt };
6774
6813
 
6775
- //# sourceMappingURL=features-BdkV7kQP.js.map
6814
+ //# sourceMappingURL=features-DEMb13KS.js.map