@printstack/print-studio 0.1.0 → 0.1.2

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 (72) hide show
  1. package/README.md +122 -154
  2. package/assets/render.worker-DkH7TepL.js +109 -0
  3. package/{cloneDeep-C5UZRjbH.js → cloneDeep-waBDTGc3.js} +10 -4
  4. package/components/print-s-logo/print-s-logo.vue.d.ts +1 -1
  5. package/components/s-form/types.d.ts +1 -1
  6. package/core/coordinate-space.d.ts +16 -0
  7. package/core/document-model.d.ts +1 -1
  8. package/core/element-registry.d.ts +3 -8
  9. package/core/page-extensions.d.ts +1 -1
  10. package/core/types.d.ts +8 -0
  11. package/core.js +2 -2
  12. package/designer/commands/menu-adapter.d.ts +3 -3
  13. package/designer/commands/menu-types.d.ts +8 -1
  14. package/designer/commands/types.d.ts +2 -0
  15. package/designer/components/dialogs/preview-dialog.vue.d.ts +10 -1
  16. package/designer/components/dialogs/print-preview-dialog.vue.d.ts +14 -0
  17. package/designer/components/dialogs/print-preview-source.d.ts +22 -0
  18. package/designer/components/dialogs/use-document-preview.d.ts +5 -1
  19. package/designer/components/dialogs/use-preview-renderer.d.ts +2 -0
  20. package/designer/components/dialogs/use-print-preview.d.ts +33 -0
  21. package/designer/components/fields/use-table-draft.d.ts +0 -4
  22. package/designer/components/panels/layer-row-types.d.ts +37 -0
  23. package/designer/components/panels/layer-row.vue.d.ts +17 -0
  24. package/designer/components/stage/marquee-overlay.vue.d.ts +8 -0
  25. package/designer/components/stage/node-style.d.ts +3 -0
  26. package/designer/components/stage/selection-member.vue.d.ts +14 -0
  27. package/designer/composables/use-theme.d.ts +3 -0
  28. package/designer/facade/editing.d.ts +2 -2
  29. package/designer/facade/entities.d.ts +1156 -22
  30. package/designer/facade/output.d.ts +2 -2
  31. package/designer/frame/print-designer-frame.vue.d.ts +2 -2
  32. package/designer/frame/shared.d.ts +2 -0
  33. package/designer/frame/view.d.ts +9 -0
  34. package/designer/interactions/marquee.d.ts +1 -1
  35. package/designer/interactions/move.d.ts +3 -1
  36. package/designer/mount-print-designer.d.ts +1 -1
  37. package/designer/mount-print-preview.d.ts +5 -0
  38. package/designer/plugins/plugin-manager.d.ts +3 -3
  39. package/designer/plugins/types.d.ts +1 -1
  40. package/designer/print-designer.vue.d.ts +2 -2
  41. package/designer/print-preview.vue.d.ts +4 -0
  42. package/designer/stores/document-store.d.ts +72 -0
  43. package/designer/stores/editor-store.d.ts +770 -14
  44. package/designer/stores/page-store.d.ts +25 -1
  45. package/designer/stores/template-store.d.ts +52 -4
  46. package/designer/stores/types.d.ts +1 -0
  47. package/designer/stores/ui-store.d.ts +232 -3
  48. package/designer/stores/view-store.d.ts +10 -1
  49. package/designer.d.ts +1 -1
  50. package/designer.js +3 -3
  51. package/{document-model-DC9sn2WV.js → document-model-Cc5RoO4j.js} +160 -179
  52. package/elements/table/table-style.d.ts +3 -10
  53. package/host-OAp3gFDx.js +123 -0
  54. package/index.js +5 -5
  55. package/locales/runtime.d.ts +8 -2
  56. package/locales/translations/zh-CN/app.json.d.ts +1 -0
  57. package/locales/translations/zh-CN/designer.json.d.ts +9 -4
  58. package/{mount-print-designer-BzHLGlv-.js → mount-print-designer-DnHTrBE9.js} +4 -3
  59. package/mount-print-preview-Bcb08lJ-.js +66 -0
  60. package/package.json +1 -1
  61. package/presets-BunYODhE.js +13 -0
  62. package/{registries-BOU8RLim.js → registries-sg39PGF1.js} +793 -790
  63. package/runtime/browser-output.d.ts +2 -0
  64. package/runtime.js +4 -4
  65. package/{saas-B3fJOgHX.js → saas-D-q51uTz.js} +1 -1
  66. package/saas.js +1 -1
  67. package/{studio-C_rqbJ9q.js → studio-B3B6zI06.js} +830 -754
  68. package/studio-types.d.ts +3 -2
  69. package/style.css +1 -1
  70. package/vue.js +1035 -941
  71. package/assets/render.worker-Cfbk18NW.js +0 -109
  72. package/presets-Cwp20ef6.js +0 -133
package/vue.js CHANGED
@@ -1,8 +1,9 @@
1
- import { B as e, C as t, E as n, F as r, H as i, I as a, L as o, M as s, N as c, P as l, Q as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, j as C, l as w, m as T, o as E, p as D, s as O, u as k, v as A, w as j, x as ee, y as te, z as ne } from "./registries-BOU8RLim.js";
2
- import { a as re, c as ie, i as ae, n as oe, o as se, r as ce, s as le, t as ue } from "./presets-Cwp20ef6.js";
3
- import { G as de, H as fe, M as pe, V as me, at as he, nt as ge, ot as _e, p as ve } from "./document-model-DC9sn2WV.js";
4
- import { A as ye, B as be, C as xe, D as Se, E as Ce, F as we, G as Te, H as Ee, I as De, L as Oe, M as ke, N as Ae, O as je, P as Me, R as Ne, S as Pe, T as Fe, U as Ie, W as Le, _ as Re, a as ze, b as Be, d as Ve, f as He, g as Ue, h as We, i as Ge, j as Ke, k as qe, m as Je, n as Ye, o as Xe, p as Ze, s as Qe, t as $e, u as et, v as tt, w as nt } from "./studio-C_rqbJ9q.js";
5
- import { A as rt, B as M, C as it, D as at, E as ot, F as st, O as ct, P as lt, R as ut, S as dt, T as ft, _ as pt, a as mt, b as ht, c as gt, d as _t, f as vt, g as yt, h as bt, i as xt, k as St, l as Ct, m as wt, n as Tt, o as Et, p as Dt, r as Ot, s as kt, t as At, u as jt, v as Mt, w as Nt, x as Pt, y as Ft } from "./cloneDeep-C5UZRjbH.js";
1
+ import { $ as e, B as t, C as n, E as r, F as i, H as a, I as o, L as s, M as c, N as l, P as u, R as d, S as f, T as p, V as m, _ as h, a as g, b as _, c as v, d as y, f as b, g as x, h as S, j as C, l as w, m as T, o as E, p as D, s as O, u as k, v as A, w as j, x as ee, y as te, z as ne } from "./registries-sg39PGF1.js";
2
+ import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./host-OAp3gFDx.js";
3
+ import { G as ue, H as de, M as fe, V as pe, at as me, it as he, p as ge, tt as _e } from "./document-model-Cc5RoO4j.js";
4
+ import { A as ve, B as ye, C as be, D as xe, E as Se, F as Ce, G as we, H as Te, I as Ee, K as De, L as Oe, M as ke, N as Ae, O as je, P as Me, R as Ne, S as Pe, T as Fe, W as Ie, _ as Le, a as Re, b as ze, d as Be, f as Ve, g as He, h as Ue, i as We, j as Ge, k as Ke, m as qe, n as Je, o as Ye, p as Xe, s as Ze, t as Qe, u as $e, v as et, w as tt } from "./studio-B3B6zI06.js";
5
+ import { A as nt, B as M, C as rt, D as it, E as at, F as ot, O as st, P as ct, R as lt, S as ut, T as dt, _ as ft, a as pt, b as mt, c as ht, d as gt, f as _t, g as vt, h as yt, i as bt, k as xt, l as St, m as Ct, n as wt, o as Tt, p as Et, r as Dt, s as Ot, t as kt, u as At, v as jt, w as Mt, x as Nt, y as Pt } from "./cloneDeep-waBDTGc3.js";
6
+ import { t as Ft } from "./presets-BunYODhE.js";
6
7
  import { t as It } from "./types-Vh_6jhVV.js";
7
8
  import { Comment as Lt, ErrorCodes as Rt, Fragment as N, Teleport as zt, Text as Bt, Transition as Vt, cloneVNode as Ht, computed as P, createBlock as F, createCommentVNode as I, createElementBlock as L, createElementVNode as R, createSlots as Ut, createTextVNode as Wt, createVNode as z, defineComponent as B, getCurrentInstance as Gt, getCurrentScope as Kt, guardReactiveProps as qt, h as Jt, handleError as Yt, hasInjectionContext as Xt, inject as Zt, isRef as Qt, isVNode as $t, markRaw as en, mergeModels as tn, mergeProps as V, nextTick as nn, normalizeClass as rn, normalizeProps as an, normalizeStyle as on, onBeforeUnmount as sn, onMounted as cn, onScopeDispose as ln, onUnmounted as un, onUpdated as dn, openBlock as H, provide as fn, reactive as pn, readonly as mn, ref as U, render as hn, renderList as gn, renderSlot as _n, resolveComponent as vn, resolveDirective as yn, resolveDynamicComponent as bn, shallowReactive as xn, shallowRef as Sn, toDisplayString as W, toRaw as Cn, toRefs as wn, toValue as Tn, unref as G, useId as En, useModel as Dn, useSlots as On, vShow as kn, watch as K, watchEffect as An, watchPostEffect as jn, withCtx as q, withDirectives as Mn, withModifiers as Nn } from "vue";
8
9
  import { AddIcon as Pn, AdjustmentIcon as Fn, ArrowDownIcon as In, ArrowRightIcon as Ln, ArrowUpIcon as Rn, BarcodeIcon as zn, BrowseIcon as Bn, BrowseOffIcon as Vn, CalendarIcon as Hn, CenterFocusStrongIcon as Un, CheckCircleFilledIcon as Wn, CheckIcon as Gn, CheckRectangleIcon as Kn, ChevronDownIcon as qn, ChevronLeftDoubleIcon as Jn, ChevronLeftIcon as Yn, ChevronRightDoubleIcon as Xn, ChevronRightIcon as Zn, ChevronUpIcon as Qn, CircleIcon as $n, ClearIcon as er, CloseCircleFilledIcon as tr, CloseIcon as nr, CopyIcon as rr, CursorIcon as ir, CutIcon as ar, DataBaseIcon as or, DeleteIcon as sr, DownloadIcon as cr, EditIcon as lr, EllipsisIcon as ur, ErrorCircleFilledIcon as dr, FileIcon as fr, FlipToBackIcon as pr, FlipToFrontIcon as mr, FolderIcon as hr, FolderOpenIcon as gr, FormatHorizontalAlignBottomIcon as _r, FormatHorizontalAlignCenterIcon as vr, FormatHorizontalAlignTopIcon as yr, FormatVerticalAlignCenterIcon as br, FormatVerticalAlignLeftIcon as xr, FormatVerticalAlignRightIcon as Sr, FullscreenExitIcon as Cr, FullscreenIcon as wr, GridViewIcon as Tr, HelpCircleIcon as Er, ImageIcon as Dr, InfoCircleFilledIcon as Or, KeyIcon as kr, LayersIcon as Ar, LinkIcon as jr, LinkUnlinkIcon as Mr, LockOffIcon as Nr, LockOnIcon as Pr, MergeCellsIcon as Fr, MinusIcon as Ir, MoreIcon as Lr, Move1Icon as Rr, MoveIcon as zr, PageFirstIcon as Br, PageLastIcon as Vr, PaletteIcon as Hr, PasteIcon as Ur, PrintIcon as Wr, QrcodeIcon as Gr, RectangleIcon as Kr, RefreshIcon as qr, RemoveIcon as Jr, RollbackIcon as Yr, RollfrontIcon as Xr, RotateIcon as Zr, RoundIcon as Qr, RulerIcon as $r, SlashIcon as ei, SwapIcon as ti, TableIcon as ni, TableSplitIcon as ri, TemplateIcon as ii, TextIcon as ai, TimeIcon as oi, UploadIcon as si, ViewColumnIcon as ci, ViewListIcon as li, ZoomInIcon as ui, ZoomOutIcon as di } from "tdesign-icons-vue-next";
@@ -49,16 +50,16 @@ function yi(e, t, n, r, i, a, o) {
49
50
  }
50
51
  function bi(e, t, n, r) {
51
52
  if (Object.is(e, t)) return !0;
52
- let i = at(e), a = at(t);
53
- if (i === "[object Arguments]" && (i = Mt), a === "[object Arguments]" && (a = Mt), i !== a) return !1;
53
+ let i = it(e), a = it(t);
54
+ if (i === "[object Arguments]" && (i = jt), a === "[object Arguments]" && (a = jt), i !== a) return !1;
54
55
  switch (i) {
55
- case Pt: return e.toString() === t.toString();
56
- case pt: return _i(e.valueOf(), t.valueOf());
57
- case Et:
58
- case gt:
59
- case dt: return Object.is(e.valueOf(), t.valueOf());
60
- case Ft: return e.source === t.source && e.flags === t.flags;
61
- case vt: return e === t;
56
+ case Nt: return e.toString() === t.toString();
57
+ case ft: return _i(e.valueOf(), t.valueOf());
58
+ case Tt:
59
+ case ht:
60
+ case ut: return Object.is(e.valueOf(), t.valueOf());
61
+ case Pt: return e.source === t.source && e.flags === t.flags;
62
+ case _t: return e === t;
62
63
  }
63
64
  n ??= /* @__PURE__ */ new Map();
64
65
  let o = n.get(e), s = n.get(t);
@@ -66,11 +67,11 @@ function bi(e, t, n, r) {
66
67
  n.set(e, t), n.set(t, e);
67
68
  try {
68
69
  switch (i) {
69
- case yt:
70
+ case vt:
70
71
  if (e.size !== t.size) return !1;
71
72
  for (let [i, a] of e.entries()) if (!t.has(i) || !yi(a, t.get(i), i, e, t, n, r)) return !1;
72
73
  return !0;
73
- case ht: {
74
+ case mt: {
74
75
  if (e.size !== t.size) return !1;
75
76
  let i = Array.from(e.values()), a = Array.from(t.values());
76
77
  for (let o = 0; o < i.length; o++) {
@@ -80,27 +81,27 @@ function bi(e, t, n, r) {
80
81
  }
81
82
  return !0;
82
83
  }
83
- case Ot:
84
- case ft:
85
- case ot:
86
- case it:
87
- case Nt:
88
- case mt:
89
- case bt:
90
84
  case Dt:
91
- case wt:
92
- case xt:
93
- case jt:
94
- case _t:
95
- if (St(e) !== St(t) || e.length !== t.length) return !1;
85
+ case dt:
86
+ case at:
87
+ case rt:
88
+ case Mt:
89
+ case pt:
90
+ case yt:
91
+ case Et:
92
+ case Ct:
93
+ case bt:
94
+ case At:
95
+ case gt:
96
+ if (xt(e) !== xt(t) || e.length !== t.length) return !1;
96
97
  for (let i = 0; i < e.length; i++) if (!yi(e[i], t[i], i, e, t, n, r)) return !1;
97
98
  return !0;
98
- case Tt: return e.byteLength === t.byteLength && bi(new Uint8Array(e), new Uint8Array(t), n, r);
99
- case kt: return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : bi(new Uint8Array(e), new Uint8Array(t), n, r);
100
- case Ct: return e.name === t.name && e.message === t.message;
101
- case Mt: {
99
+ case wt: return e.byteLength === t.byteLength && bi(new Uint8Array(e), new Uint8Array(t), n, r);
100
+ case Ot: return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : bi(new Uint8Array(e), new Uint8Array(t), n, r);
101
+ case St: return e.name === t.name && e.message === t.message;
102
+ case jt: {
102
103
  if (!(bi(e.constructor, t.constructor, n, r) || hi(e) && hi(t))) return !1;
103
- let i = [...Object.keys(e), ...ct(e)], a = [...Object.keys(t), ...ct(t)];
104
+ let i = [...Object.keys(e), ...st(e)], a = [...Object.keys(t), ...st(t)];
104
105
  if (i.length !== a.length) return !1;
105
106
  for (let a = 0; a < i.length; a++) {
106
107
  let o = i[a], s = e[o];
@@ -121,17 +122,17 @@ function xi(e, t) {
121
122
  return vi(e, t, mi);
122
123
  }
123
124
  // src/components/error-fallback/browser.ts
124
- function Si(e, t = {}) {
125
- let n = t.target ?? globalThis.window;
126
- if (!n) return function() {};
127
- function r(n) {
128
- "error" in n ? ((t.suppressDefault || u(n.error)) && n.preventDefault(), e.capture(n.error, { source: "browser.error" })) : t.captureResources && e.capture(n, { source: "browser.resource" });
125
+ function Si(t, n = {}) {
126
+ let r = n.target ?? globalThis.window;
127
+ if (!r) return function() {};
128
+ function i(r) {
129
+ "error" in r ? ((n.suppressDefault || e(r.error)) && r.preventDefault(), t.capture(r.error, { source: "browser.error" })) : n.captureResources && t.capture(r, { source: "browser.resource" });
129
130
  }
130
- function i(n) {
131
- (t.suppressDefault || u(n.reason)) && n.preventDefault(), e.capture(n.reason, { source: "browser.rejection" });
131
+ function a(r) {
132
+ (n.suppressDefault || e(r.reason)) && r.preventDefault(), t.capture(r.reason, { source: "browser.rejection" });
132
133
  }
133
- return n.addEventListener("error", r, !0), n.addEventListener("unhandledrejection", i), function() {
134
- n.removeEventListener("error", r, !0), n.removeEventListener("unhandledrejection", i);
134
+ return r.addEventListener("error", i, !0), r.addEventListener("unhandledrejection", a), function() {
135
+ r.removeEventListener("error", i, !0), r.removeEventListener("unhandledrejection", a);
135
136
  };
136
137
  }
137
138
  // src/components/error-fallback/vue.ts
@@ -443,7 +444,7 @@ function Ji(e) {
443
444
  function Yi(e) {
444
445
  let t = e.store();
445
446
  function n(e) {
446
- return e ?? lt(t.document.data);
447
+ return e ?? ct(t.document.data);
447
448
  }
448
449
  function r(e, n) {
449
450
  e.length > 0 && (t.ui.toast(M("designer.documentActions.bindingWarningsMessage", {
@@ -460,7 +461,7 @@ function Yi(e) {
460
461
  return;
461
462
  }
462
463
  let e = t.document.getDocument(), n = JSON.stringify(e, null, 2);
463
- Se(`${e.name || M("designer.documentActions.defaultFilename")}.json`, n), t.ui.toast(M("designer.documentActions.documentSavedMessage"), "success");
464
+ xe(`${e.name || M("designer.documentActions.defaultFilename")}.json`, n), t.ui.toast(M("designer.documentActions.documentSavedMessage"), "success");
464
465
  }
465
466
  async function a() {
466
467
  let e = await Ji(".json,application/json");
@@ -469,7 +470,7 @@ function Yi(e) {
469
470
  try {
470
471
  n = await qi(e, "text");
471
472
  } catch (t) {
472
- throw new rt(M("designer.documentActions.fileReadFailed", { fileName: e.name }), {
473
+ throw new nt(M("designer.documentActions.fileReadFailed", { fileName: e.name }), {
473
474
  cause: t,
474
475
  code: "file.read-failed"
475
476
  });
@@ -493,7 +494,7 @@ function Yi(e) {
493
494
  }
494
495
  }
495
496
  async function c(e) {
496
- await s("html", () => t.rendering.html(t.document.data, n(e)), (e, t) => Se(t, e.html, "text/html"));
497
+ await s("html", () => t.rendering.html(t.document.data, n(e)), (e, t) => xe(t, e.html, "text/html"));
497
498
  }
498
499
  function l() {
499
500
  t.rendering.cancel();
@@ -505,7 +506,7 @@ function Yi(e) {
505
506
  t.rendering.resume();
506
507
  }
507
508
  async function f(e) {
508
- await s("pdf", () => t.rendering.pdf(t.document.data, n(e)), (e, t) => Ce(t, e.blob));
509
+ await s("pdf", () => t.rendering.pdf(t.document.data, n(e)), (e, t) => Se(t, e.blob));
509
510
  }
510
511
  async function p(i) {
511
512
  let { html: a, warnings: o } = await t.rendering.html(t.document.data, n(i));
@@ -532,7 +533,7 @@ function Yi(e) {
532
533
  };
533
534
  }
534
535
  // src/designer/tools.ts
535
- function Xi(e = de) {
536
+ function Xi(e = ue) {
536
537
  return [
537
538
  {
538
539
  icon: "select",
@@ -638,7 +639,7 @@ function ta(e) {
638
639
  function na(e) {
639
640
  let t = Ie(e, !0), n = () => e.store(), r = () => Yi(e), i = () => !n().selection.isEmpty;
640
641
  function a(e) {
641
- let t = tt(n()).getScrollElement();
642
+ let t = et(n()).getScrollElement();
642
643
  if (!t) return;
643
644
  let r = [...t.querySelectorAll("[data-element-id]")].filter((t) => e.includes(t.dataset.elementId ?? ""));
644
645
  if (!r.length) return;
@@ -865,7 +866,7 @@ function na(e) {
865
866
  icon: "zoom",
866
867
  id: "view.zoomIn",
867
868
  order: 1,
868
- run: (e) => e.store().view.setZoom(ge(e.store().view.zoom * 1.25, .05, 8)),
869
+ run: (e) => e.store().view.setZoom(_e(e.store().view.zoom * 1.25, .05, 8)),
869
870
  shortcut: "Ctrl+=",
870
871
  get title() {
871
872
  return M("designer.builtins.zoomInTitle");
@@ -876,7 +877,7 @@ function na(e) {
876
877
  icon: "zoom-out",
877
878
  id: "view.zoomOut",
878
879
  order: 2,
879
- run: (e) => e.store().view.setZoom(ge(e.store().view.zoom / 1.25, .05, 8)),
880
+ run: (e) => e.store().view.setZoom(_e(e.store().view.zoom / 1.25, .05, 8)),
880
881
  shortcut: "Ctrl+-",
881
882
  get title() {
882
883
  return M("designer.builtins.zoomOutTitle");
@@ -887,7 +888,7 @@ function na(e) {
887
888
  icon: "fit",
888
889
  id: "view.zoomFit",
889
890
  order: 3,
890
- run: () => tt(n()).getStageController()?.fitToViewport(),
891
+ run: () => et(n()).getStageController()?.fitToViewport(),
891
892
  shortcut: "Ctrl+0",
892
893
  get title() {
893
894
  return M("designer.builtins.fitToWindowTitle");
@@ -898,7 +899,7 @@ function na(e) {
898
899
  icon: "zoom",
899
900
  id: "view.zoomActual",
900
901
  order: 4,
901
- run: () => tt(n()).getStageController()?.zoomReset(),
902
+ run: () => et(n()).getStageController()?.zoomReset(),
902
903
  shortcut: "Ctrl+1",
903
904
  get title() {
904
905
  return M("designer.builtins.actualSizeTitle");
@@ -914,7 +915,7 @@ function na(e) {
914
915
  order: 5,
915
916
  run: (e, ...t) => {
916
917
  let r = t[0], i = r ? e.store().page.get(r) : e.store().page.active;
917
- i && tt(n()).getStageController()?.centerPages(i);
918
+ i && et(n()).getStageController()?.centerPages(i);
918
919
  },
919
920
  get title() {
920
921
  return M("designer.builtins.locatePageTitle");
@@ -1039,7 +1040,32 @@ function na(e) {
1039
1040
  return M("designer.builtins.clearGuidesTitle");
1040
1041
  }
1041
1042
  },
1042
- ...He.map((e) => ({
1043
+ ...[
1044
+ "light",
1045
+ "dark",
1046
+ "system"
1047
+ ].map((e, t) => ({
1048
+ checked: () => n().ui.themeMode === e,
1049
+ dividerBefore: t === 0,
1050
+ group: "view",
1051
+ icon: "palette",
1052
+ id: `view.theme.${e}`,
1053
+ order: 40 + t,
1054
+ run: (t) => {
1055
+ t.store().ui.setThemeMode(e);
1056
+ },
1057
+ segment: {
1058
+ icon: "palette",
1059
+ id: "view.theme",
1060
+ get label() {
1061
+ return M("designer.theme.groupLabel");
1062
+ }
1063
+ },
1064
+ get title() {
1065
+ return M(`designer.theme.${e}`);
1066
+ }
1067
+ })),
1068
+ ...Ve.map((e) => ({
1043
1069
  checked: () => n().view.canvasBackgroundPreset === e.id,
1044
1070
  get help() {
1045
1071
  return M("designer.builtins.canvasBackgroundHelp");
@@ -1810,7 +1836,7 @@ var aa = {
1810
1836
  pxPerMm: {}
1811
1837
  },
1812
1838
  setup(e) {
1813
- let t = e, r = U(null), i = U(!1), a = P(() => Math.max(8, t.node.width * t.pxPerMm)), o = P(() => Math.max(8, t.node.height * t.pxPerMm)), s = P(() => ({
1839
+ let t = e, n = U(null), i = U(!1), a = P(() => Math.max(8, t.node.width * t.pxPerMm)), o = P(() => Math.max(8, t.node.height * t.pxPerMm)), s = P(() => ({
1814
1840
  background: String(t.node.props.background ?? "transparent"),
1815
1841
  displayValue: t.node.props.displayValue !== !1,
1816
1842
  fontSize: Number(t.node.props.fontSize ?? 9),
@@ -1822,9 +1848,9 @@ var aa = {
1822
1848
  return !e || e === "transparent" ? "transparent" : e;
1823
1849
  });
1824
1850
  function l() {
1825
- let e = r.value;
1851
+ let e = n.value;
1826
1852
  if (!e) return;
1827
- let c = Math.max(2, Math.round((window.devicePixelRatio || 1) * 1.5)), l = n(String(t.node.props.value ?? ""), s.value, a.value, o.value, c);
1853
+ let c = Math.max(2, Math.round((window.devicePixelRatio || 1) * 1.5)), l = r(String(t.node.props.value ?? ""), s.value, a.value, o.value, c);
1828
1854
  l ? (i.value = !1, e.width = l.width, e.height = l.height, e.getContext("2d")?.drawImage(l, 0, 0)) : i.value = !0;
1829
1855
  }
1830
1856
  return An(() => {
@@ -1834,7 +1860,7 @@ var aa = {
1834
1860
  style: on({ background: c.value })
1835
1861
  }, [R("canvas", {
1836
1862
  ref_key: "canvasRef",
1837
- ref: r,
1863
+ ref: n,
1838
1864
  class: "max-h-full max-w-full",
1839
1865
  style: on({
1840
1866
  width: `${a.value}px`,
@@ -1890,8 +1916,8 @@ var aa = {
1890
1916
  selected: { type: Boolean }
1891
1917
  },
1892
1918
  setup(e) {
1893
- let n = e, r = P(() => Math.max(.1, Number(n.node.props.strokeWidth) || .3) * n.pxPerMm), i = P(() => j(n.node, n.pxPerMm, "px")), a = P(() => t(String(n.node.props.color ?? "#333333"), n.node.props.dash, r.value, "px")), o = P(() => ({
1894
- ...t("var(--color-accent)", "solid", Math.max(r.value, 1.5), "px"),
1919
+ let t = e, r = P(() => Math.max(.1, Number(t.node.props.strokeWidth) || .3) * t.pxPerMm), i = P(() => j(t.node, t.pxPerMm, "px")), a = P(() => n(String(t.node.props.color ?? "#333333"), t.node.props.dash, r.value, "px")), o = P(() => ({
1920
+ ...n("var(--color-accent)", "solid", Math.max(r.value, 1.5), "px"),
1895
1921
  opacity: "0.55",
1896
1922
  pointerEvents: "none"
1897
1923
  })), s = P(() => {
@@ -2010,17 +2036,17 @@ function xa(e) {
2010
2036
  }
2011
2037
  function Sa(e, t) {
2012
2038
  let n = e, r;
2013
- for (let e of i(t)) if (!(r?.type === "array" && /^\d+$/.test(e))) {
2039
+ for (let e of a(t)) if (!(r?.type === "array" && /^\d+$/.test(e))) {
2014
2040
  if (r = n.find((t) => t.name === e), !r) return;
2015
2041
  n = r.children ?? [];
2016
2042
  }
2017
2043
  return r;
2018
2044
  }
2019
2045
  function Ca(e, t) {
2020
- let [n, ...r] = i(t);
2046
+ let [n, ...r] = a(t);
2021
2047
  if (n !== e.key) return;
2022
- let a = xa(e);
2023
- return r.length === 0 ? a : a && /^\d+$/.test(r[0]) ? Sa(a.children ?? [], r.slice(1).join(".")) : Sa(e.schema, r.join("."));
2048
+ let i = xa(e);
2049
+ return r.length === 0 ? i : i && /^\d+$/.test(r[0]) ? Sa(i.children ?? [], r.slice(1).join(".")) : Sa(e.schema, r.join("."));
2024
2050
  }
2025
2051
  function wa(e, t) {
2026
2052
  let n = Ca(e, t);
@@ -2054,7 +2080,7 @@ function ka(e) {
2054
2080
  }
2055
2081
  function Aa(e) {
2056
2082
  let t = [], n = 0;
2057
- for (let r of e.matchAll(s)) {
2083
+ for (let r of e.matchAll(c)) {
2058
2084
  let i = r.index ?? 0;
2059
2085
  i > n && t.push({
2060
2086
  kind: "text",
@@ -2212,12 +2238,12 @@ var Ra = [
2212
2238
  for (let e of Ra) Ma.register(e);
2213
2239
  // src/designer/components/variable-text/use-variable-text-bindings.ts
2214
2240
  function za(e) {
2215
- let t = vz().store();
2241
+ let t = Ez().store();
2216
2242
  function n(n) {
2217
2243
  return ja(n, t.dataSource.list, e());
2218
2244
  }
2219
2245
  function r(e) {
2220
- ut.global.locale.value;
2246
+ lt.global.locale.value;
2221
2247
  let t = n(e.path), r = e.formatter ? Ma.get(e.formatter) : void 0, i = [t?.label ?? e.path];
2222
2248
  return e.formatter && i.push(r?.label() ?? e.formatter), {
2223
2249
  invalid: !t || !(!e.formatter || Na(e.formatter, t.type)),
@@ -2264,7 +2290,7 @@ var Ba = { class: "variable-text-preview" }, Va = ["title"], Ha = /*@__PURE__*/
2264
2290
  pxPerMm: {}
2265
2291
  },
2266
2292
  setup(e) {
2267
- let t = e, n = vz().store(), r = P(() => {
2293
+ let t = e, n = Ez().store(), r = P(() => {
2268
2294
  let e = t.node.props.text;
2269
2295
  return typeof e == "string" ? e : "";
2270
2296
  }), i = P(() => E(t.node.props, t.pxPerMm));
@@ -23998,7 +24024,7 @@ var fM = 1, pM = r_(B({
23998
24024
  r_(lM);
23999
24025
  // src/designer/context/use-element-definition.ts
24000
24026
  function mM(e) {
24001
- let t = vz(), n = U(0), r = t.events.on("elements:changed", () => {
24027
+ let t = Ez(), n = U(0), r = t.events.on("elements:changed", () => {
24002
24028
  n.value += 1;
24003
24029
  });
24004
24030
  return ln(r), P(() => {
@@ -24009,7 +24035,7 @@ function mM(e) {
24009
24035
  }
24010
24036
  // src/components/popup-layer/use-popup-layer.ts
24011
24037
  function hM(e = {}, t = "popupProps", n) {
24012
- let r = Zt(ae, null), i = Zt(ie, void 0), a = U(!!Tn(e).defaultVisible), o = P(() => Tn(n) ?? Tn(e).visible ?? Tn(e).modelValue ?? a.value), s = r ? re(o, () => ({ zIndex: Tn(e).zIndex }), r) : void 0, c = P(() => {
24038
+ let r = Zt(se, null), i = Zt(ce, void 0), a = U(!!Tn(e).defaultVisible), o = P(() => Tn(n) ?? Tn(e).visible ?? Tn(e).modelValue ?? a.value), s = r ? ie(o, () => ({ zIndex: Tn(e).zIndex }), r) : void 0, c = P(() => {
24013
24039
  let n = {
24014
24040
  ...i ? { attach: () => i() ?? document.body } : {},
24015
24041
  ...Tn(e),
@@ -24748,10 +24774,10 @@ var gN = B({
24748
24774
  type: Object
24749
24775
  } },
24750
24776
  setup(e) {
24751
- let t = Zt(le, void 0), n = P(() => qM(e.item.type)), r = P(() => t ? a(t, e.item.field) : void 0), i = P(() => {
24777
+ let t = Zt(oe, void 0), n = P(() => qM(e.item.type)), r = P(() => t ? a(t, e.item.field) : void 0), i = P(() => {
24752
24778
  if (t) return t.fieldStates[e.item.field];
24753
24779
  });
24754
- fn(se, {
24780
+ fn(re, {
24755
24781
  errors: P(() => i.value?.errorMessages ?? []),
24756
24782
  status: P(() => uN(e.item.status, i.value)),
24757
24783
  touched: P(() => i.value?.touched ?? !1),
@@ -25032,7 +25058,7 @@ var xN = B({
25032
25058
  function x(e, t) {
25033
25059
  t == null ? i.delete(e) : i.set(e, t);
25034
25060
  }
25035
- return fn(le, pn({
25061
+ return fn(oe, pn({
25036
25062
  adapter: en(o),
25037
25063
  collectFieldRef: x,
25038
25064
  disabled: d,
@@ -25462,7 +25488,7 @@ var kN = [
25462
25488
  icon: `space-${e}`,
25463
25489
  labelKey: `designer.alignGrid.${t}`
25464
25490
  }))
25465
- }, n = e, r = vz(), { commands: i } = r, a = r.store();
25491
+ }, n = e, r = Ez(), { commands: i } = r, a = r.store();
25466
25492
  function o(e) {
25467
25493
  let t = typeof e == "number" && Number.isFinite(e) ? e : null;
25468
25494
  a.view.updateAlignPanel({ spacing: t });
@@ -25518,7 +25544,7 @@ var kN = [
25518
25544
  }, VN = /* @__PURE__ */ B({
25519
25545
  __name: "align-target",
25520
25546
  setup(e) {
25521
- let t = vz(), n = t.store(), { onVisibleChange: r, popupProps: i } = hM({}, "popup"), a = P(() => [
25547
+ let t = Ez(), n = t.store(), { onVisibleChange: r, popupProps: i } = hM({}, "popup"), a = P(() => [
25522
25548
  {
25523
25549
  label: M("designer.alignGrid.targetSelectionLabel"),
25524
25550
  value: "selection"
@@ -25634,7 +25660,7 @@ var kN = [
25634
25660
  }), [["__scopeId", "data-v-d4b959c2"]]);
25635
25661
  // src/designer/composables/use-restored-ui-state.ts
25636
25662
  function QN(e, t) {
25637
- let n = vz().store().ui;
25663
+ let n = Ez().store().ui;
25638
25664
  K(() => n.restoredState, (n) => t(n[e]), {
25639
25665
  flush: "post",
25640
25666
  immediate: !0
@@ -25745,7 +25771,7 @@ var tP = { class: "base-dialog__heading" }, nP = ["aria-label", "title"], rP = /
25745
25771
  "update:visible"
25746
25772
  ],
25747
25773
  setup(e, { emit: t }) {
25748
- let n = e, r = t, i = U(), a = Zt(ie, void 0), o = U(!1), { isTop: s, zIndex: c } = re(() => o.value, () => ({ zIndex: n.zIndex })), l = P(() => {
25774
+ let n = e, r = t, i = U(), a = Zt(ce, void 0), o = U(!1), { isTop: s, zIndex: c } = ie(() => o.value, () => ({ zIndex: n.zIndex })), l = P(() => {
25749
25775
  let e = n.height;
25750
25776
  return { height: typeof e == "number" ? `${e}px` : e ?? "auto" };
25751
25777
  }), u = P(() => p(n.confirmBtn, M("components.baseDialog.confirmButton"), Gn)), d = P(() => p(n.cancelBtn, M("components.baseDialog.cancelButton"), nr)), f = null;
@@ -26325,33 +26351,33 @@ function OP(e, t) {
26325
26351
  return !t || e == null ? !1 : t === "array" ? !Array.isArray(e) : t === "date" ? typeof e != "string" && typeof e != "number" : Array.isArray(e) ? !0 : typeof e !== t;
26326
26352
  }
26327
26353
  // src/designer/components/binding/use-binding-preview.ts
26328
- function kP(t) {
26354
+ function kP(e) {
26329
26355
  let n = P(() => {
26330
- let n = Object.fromEntries(t.getSources().map((e) => [e.key, e.sampleData])), i = r(n), a = t.getRelativeTo();
26356
+ let n = Object.fromEntries(e.getSources().map((e) => [e.key, e.sampleData])), r = i(n), a = e.getRelativeTo();
26331
26357
  if (a) {
26332
- let t = e(i, a);
26333
- if (!Array.isArray(t) || !t.length) return;
26334
- i = l(i, {
26358
+ let e = t(r, a);
26359
+ if (!Array.isArray(e) || !e.length) return;
26360
+ r = u(r, {
26335
26361
  collectionPath: a,
26336
26362
  index: 0,
26337
- item: t[0]
26363
+ item: e[0]
26338
26364
  });
26339
26365
  }
26340
- return e(i, t.selectedPath.value);
26341
- }), i = P(() => {
26342
- if (!t.selectedField.value) return null;
26343
- let e = t.expression.value.slice(t.selectedPath.value.length);
26366
+ return t(r, e.selectedPath.value);
26367
+ }), r = P(() => {
26368
+ if (!e.selectedField.value) return null;
26369
+ let t = e.expression.value.slice(e.selectedPath.value.length);
26344
26370
  return EP(n.value, {
26345
- expectedType: t.selectedField.value.type,
26346
- format: e && !t.unsupportedFormat.value ? (t) => m(`{{ value${e} }}`, r({ value: t }), new c()) : void 0
26371
+ expectedType: e.selectedField.value.type,
26372
+ format: t && !e.unsupportedFormat.value ? (e) => m(`{{ value${t} }}`, i({ value: e }), new l()) : void 0
26347
26373
  });
26348
26374
  });
26349
26375
  return {
26350
26376
  previewMessageKey: P(() => {
26351
- let e = i.value;
26377
+ let e = r.value;
26352
26378
  return !e || e.kind === "text" ? null : e.kind === "array" ? e.count === 0 ? "designer.samplePreview.emptyArray" : "designer.samplePreview.array" : `designer.samplePreview.${e.kind}`;
26353
26379
  }),
26354
- previewValue: i,
26380
+ previewValue: r,
26355
26381
  sampleValue: n
26356
26382
  };
26357
26383
  }
@@ -26721,7 +26747,7 @@ var dF = {
26721
26747
  type: "booleanField"
26722
26748
  };
26723
26749
  },
26724
- color(e, t, n, r = de) {
26750
+ color(e, t, n, r = ue) {
26725
26751
  let i = r.get(n.type)?.createProps() ?? {}, a = te({
26726
26752
  ...n,
26727
26753
  props: i
@@ -26800,7 +26826,7 @@ function fF(e, t) {
26800
26826
  lF.get(e) === t && (n ? lF.set(e, n) : lF.delete(e));
26801
26827
  };
26802
26828
  }
26803
- function pF(e, t, n, r = de, i = {}) {
26829
+ function pF(e, t, n, r = ue, i = {}) {
26804
26830
  let a = lF.get(e.type);
26805
26831
  if (!a) throw Error(`Unregistered inspector control: ${e.type}`);
26806
26832
  let o = a(e, t, n, r), s = i.nodes ?? [], c = s.length > 1 && s.some((t) => t.locked || e.disabledIf?.(t.props)) || (e.disabledIf?.(n.props) ?? (o.props && "disabled" in o.props ? o.props.disabled : e.controlProps?.disabled));
@@ -26828,7 +26854,7 @@ var mF = {
26828
26854
  },
26829
26855
  emits: ["commit"],
26830
26856
  setup(e, { emit: t }) {
26831
- let n = e, r = t, i = { labelWidth: 0 }, a = vz(), o = a.store(), s = U(!1), c = U(), l = Sn(), u = U(), d = U(""), f = U(0), p = P(() => n.nodes ?? [n.node]), m = P(() => p.value.length > 1), h = P(() => {
26857
+ let n = e, r = t, i = { labelWidth: 0 }, a = Ez(), o = a.store(), s = U(!1), c = U(), l = Sn(), u = U(), d = U(""), f = U(0), p = P(() => n.nodes ?? [n.node]), m = P(() => p.value.length > 1), h = P(() => {
26832
26858
  let e = te(n.node, n.field);
26833
26859
  return p.value.some((t) => !xi(te(t, n.field), e));
26834
26860
  }), g = P(() => n.field.feedback?.(n.node)), v = P(() => p.value.every((e) => n.field.showIf?.(e.props) ?? !0)), y = P(() => n.field.stacked ?? n.field.type === "textarea"), b = P(() => {
@@ -27020,10 +27046,10 @@ function _F(e, t, n = {}) {
27020
27046
  type: "number",
27021
27047
  value: {
27022
27048
  get(t) {
27023
- return me(t, e);
27049
+ return pe(t, e);
27024
27050
  },
27025
27051
  set(t, n) {
27026
- return fe(t, e, n);
27052
+ return de(t, e, n);
27027
27053
  }
27028
27054
  },
27029
27055
  ...n
@@ -27088,7 +27114,7 @@ var EF = { class: "flex w-full shrink-0 flex-col bg-panel pb-2" }, DF = { class:
27088
27114
  }, UF = { class: "truncate font-mono text-[10px] opacity-80" }, WF = { class: "flex gap-1" }, GF = /* @__PURE__ */ B({
27089
27115
  __name: "control-panel",
27090
27116
  setup(e) {
27091
- let { commands: t, elements: n } = vz(), r = vz().store(), i = U({ name: "" }), a = P(() => [{
27117
+ let { commands: t, elements: n } = Ez(), r = Ez().store(), i = U({ name: "" }), a = P(() => [{
27092
27118
  field: "name",
27093
27119
  label: M("designer.controlPanel.nameLabel"),
27094
27120
  props: { onBlur: function() {
@@ -27097,7 +27123,7 @@ var EF = { class: "flex w-full shrink-0 flex-col bg-panel pb-2" }, DF = { class:
27097
27123
  type: "input"
27098
27124
  }]), o = P(() => {
27099
27125
  let e = r.selection.primary;
27100
- return e ? pe(r.document.data, e, n) : null;
27126
+ return e ? fe(r.document.data, e, n) : null;
27101
27127
  }), s = mM(() => o.value?.type), c = P(() => o.value ? A(h(s.value?.inspectorSections ?? [], r.document.data, o.value, n), o.value) : []), l = P(() => TF(s.value)), u = P(() => r.repeatGroup.selected ? r.repeatGroup.selected : o.value ? r.repeatGroup.findByElement(o.value.id) ?? null : null);
27102
27128
  function d(e) {
27103
27129
  return Math.round(e * 100) / 100;
@@ -27290,54 +27316,233 @@ function XF(e, t, n) {
27290
27316
  return i ? [YF(i, n, typeof t == "string" ? {} : t)] : [];
27291
27317
  });
27292
27318
  }
27293
- // src/designer/components/panels/layers-panel.vue?vue&type=script&setup=true&lang.ts
27294
- var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-center gap-2 border-b border-edge px-3 py-1.5" }, $F = { class: "shrink-0 text-[11px] text-ink-dim" }, eI = { class: "w-8 shrink-0 text-right text-[10px] text-ink-dim" }, tI = [
27295
- "data-layer-group-id",
27296
- "onClick",
27297
- "onDblclick",
27298
- "onDragstart",
27299
- "onDragover",
27300
- "onContextmenu"
27301
- ], nI = {
27319
+ // src/designer/components/panels/layer-row.vue?vue&type=script&setup=true&lang.ts
27320
+ var ZF = ["data-layer-group-id"], QF = {
27302
27321
  key: 1,
27303
27322
  class: "min-w-0 flex-1 truncate"
27304
- }, rI = { class: "shrink-0 text-[9px] text-ink-dim/60" }, iI = [
27305
- "data-layer-id",
27306
- "onClick",
27307
- "onDblclick",
27308
- "onDragstart",
27309
- "onDragover",
27310
- "onContextmenu"
27311
- ], aI = {
27323
+ }, $F = { class: "shrink-0 text-[9px] text-ink-dim/60" }, eI = ["data-layer-id"], tI = {
27312
27324
  key: 3,
27313
27325
  class: "shrink-0 text-[9px] text-ink-dim/60"
27314
- }, oI = {
27326
+ }, nI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
27327
+ __name: "layer-row",
27328
+ props: {
27329
+ api: {},
27330
+ dropIndicator: {},
27331
+ renameText: {},
27332
+ renamingGroupId: {},
27333
+ row: {}
27334
+ },
27335
+ setup(e) {
27336
+ let t = e, n = Ez().store(), r = P(() => t.row.kind === "element" && n.selection.has(t.row.node.id)), i = P(() => t.row.kind === "element" && n.selection.hoverId === t.row.node.id && !n.selection.has(t.row.node.id)), a = P(() => t.row.kind === "element" ? n.selection.renamingId === t.row.node.id : t.renamingGroupId === t.row.group.id), o = P(() => t.row.kind === "group" && t.api.isGroupSelected(t.row.group)), s = P(() => {
27337
+ let e = [];
27338
+ return r.value && e.push("bg-accent-soft"), i.value && e.push("bg-panel-2"), e;
27339
+ });
27340
+ function c(e) {
27341
+ return Pe(n).get(e)?.icon ?? "dots";
27342
+ }
27343
+ function l() {
27344
+ return { paddingLeft: `${8 + t.row.depth * 14}px` };
27345
+ }
27346
+ return (t, i) => {
27347
+ let u = sy, d = jS;
27348
+ return e.row.kind === "group" ? (H(), L("div", {
27349
+ key: 0,
27350
+ "data-layer-group-id": e.row.group.id,
27351
+ draggable: "true",
27352
+ class: rn(["layers-panel__row group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px] font-medium", o.value ? ["bg-accent-soft"] : ["hover:bg-panel-2"]]),
27353
+ style: on({
27354
+ ...l(),
27355
+ ...e.dropIndicator
27356
+ }),
27357
+ onClick: i[3] ||= (t) => e.api.onGroupClick(t, e.row.group),
27358
+ onDblclick: i[4] ||= (t) => e.api.startRenameGroup(e.row.group),
27359
+ onDragstart: i[5] ||= (t) => e.api.onDragStart(e.row),
27360
+ onDragend: i[6] ||= (...t) => e.api.clearDragState && e.api.clearDragState(...t),
27361
+ onDragover: i[7] ||= (t) => e.api.onDragOver(t, e.row),
27362
+ onContextmenu: i[8] ||= Nn((t) => e.api.onGroupContextMenu(t, e.row.group), ["prevent"])
27363
+ }, [
27364
+ z(u, {
27365
+ variant: "text",
27366
+ shape: "square",
27367
+ size: "small",
27368
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27369
+ "text-ink": G(n).elementGroup.isVisible(e.row.group.id),
27370
+ "text-ink-dim/40": !G(n).elementGroup.isVisible(e.row.group.id)
27371
+ }]),
27372
+ title: G(n).elementGroup.isVisible(e.row.group.id) ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27373
+ onClick: i[0] ||= Nn((t) => e.api.execute("elementGroup.toggleFlag", e.row.group.id, "visible"), ["stop"])
27374
+ }, {
27375
+ default: q(() => [z($, {
27376
+ name: G(n).elementGroup.isVisible(e.row.group.id) ? "eye" : "eye-off",
27377
+ class: "mx-auto h-3.5 w-3.5"
27378
+ }, null, 8, ["name"])]),
27379
+ _: 1
27380
+ }, 8, ["class", "title"]),
27381
+ z(u, {
27382
+ variant: "text",
27383
+ shape: "square",
27384
+ size: "small",
27385
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": G(n).elementGroup.isLocked(e.row.group.id) }]),
27386
+ title: G(n).elementGroup.isLocked(e.row.group.id) ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27387
+ onClick: i[1] ||= Nn((t) => e.api.execute("elementGroup.toggleFlag", e.row.group.id, "locked"), ["stop"])
27388
+ }, {
27389
+ default: q(() => [z($, {
27390
+ name: G(n).elementGroup.isLocked(e.row.group.id) ? "lock" : "unlock",
27391
+ class: "mx-auto h-3.5 w-3.5"
27392
+ }, null, 8, ["name"])]),
27393
+ _: 1
27394
+ }, 8, ["class", "title"]),
27395
+ z(u, {
27396
+ variant: "text",
27397
+ shape: "square",
27398
+ size: "small",
27399
+ class: "h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink",
27400
+ title: G(n).elementGroup.isCollapsed(e.row.group.id) ? G(M)("designer.layersPanel.expandGroupLabel") : G(M)("designer.layersPanel.collapseGroupLabel"),
27401
+ onClick: i[2] ||= Nn((t) => e.api.execute("elementGroup.toggleCollapsed", e.row.group.id), ["stop"])
27402
+ }, {
27403
+ default: q(() => [z($, {
27404
+ name: G(n).elementGroup.isCollapsed(e.row.group.id) ? "chevron-right" : "chevron-down",
27405
+ class: "mx-auto h-3.5 w-3.5"
27406
+ }, null, 8, ["name"])]),
27407
+ _: 1
27408
+ }, 8, ["title"]),
27409
+ z($, {
27410
+ name: G(n).elementGroup.isCollapsed(e.row.group.id) ? "folder" : "folder-open",
27411
+ class: "h-3.5 w-3.5 shrink-0 text-accent/85"
27412
+ }, null, 8, ["name"]),
27413
+ a.value ? (H(), F(d, {
27414
+ key: 0,
27415
+ ref: e.api.setRenameInput,
27416
+ "model-value": e.renameText,
27417
+ class: "min-w-0 flex-1",
27418
+ "onUpdate:modelValue": e.api.updateRenameText,
27419
+ onBlur: e.api.commitRename,
27420
+ onClick: e.api.onRenameClick
27421
+ }, null, 8, [
27422
+ "model-value",
27423
+ "onUpdate:modelValue",
27424
+ "onBlur",
27425
+ "onClick"
27426
+ ])) : (H(), L("span", QF, W(e.row.group.name), 1)),
27427
+ R("span", $F, W(G(M)("designer.layersPanel.groupMemberCount", { count: e.row.group.elementIds.length })), 1)
27428
+ ], 46, ZF)) : (H(), L("div", {
27429
+ key: 1,
27430
+ "data-layer-id": e.row.node.id,
27431
+ draggable: "true",
27432
+ class: rn(["layers-panel__row group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px]", [...r.value ? [] : ["hover:bg-panel-2"], ...s.value]]),
27433
+ style: on({
27434
+ ...l(),
27435
+ ...e.dropIndicator
27436
+ }),
27437
+ onClick: i[12] ||= (t) => e.api.onRowClick(t, e.row.node),
27438
+ onDblclick: i[13] ||= (t) => e.api.startRename(e.row.node),
27439
+ onDragstart: i[14] ||= (t) => e.api.onDragStart(e.row),
27440
+ onDragend: i[15] ||= (...t) => e.api.clearDragState && e.api.clearDragState(...t),
27441
+ onDragover: i[16] ||= (t) => e.api.onDragOver(t, e.row),
27442
+ onContextmenu: i[17] ||= Nn((t) => e.api.onRowContextMenu(t, e.row.node), ["prevent"])
27443
+ }, [
27444
+ z(u, {
27445
+ variant: "text",
27446
+ shape: "square",
27447
+ size: "small",
27448
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27449
+ "text-ink": e.row.node.visible,
27450
+ "text-ink-dim/40": !e.row.node.visible
27451
+ }]),
27452
+ title: e.row.node.visible ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27453
+ onClick: i[9] ||= Nn((t) => e.api.execute("element.toggleVisibility", e.row.node.id), ["stop"])
27454
+ }, {
27455
+ default: q(() => [z($, {
27456
+ name: e.row.node.visible ? "eye" : "eye-off",
27457
+ class: "mx-auto h-3.5 w-3.5"
27458
+ }, null, 8, ["name"])]),
27459
+ _: 1
27460
+ }, 8, ["class", "title"]),
27461
+ z(u, {
27462
+ variant: "text",
27463
+ shape: "square",
27464
+ size: "small",
27465
+ class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": e.row.node.locked }]),
27466
+ title: e.row.node.locked ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27467
+ onClick: i[10] ||= Nn((t) => e.api.execute("element.toggleLock", e.row.node.id), ["stop"])
27468
+ }, {
27469
+ default: q(() => [z($, {
27470
+ name: e.row.node.locked ? "lock" : "unlock",
27471
+ class: "mx-auto h-3.5 w-3.5"
27472
+ }, null, 8, ["name"])]),
27473
+ _: 1
27474
+ }, 8, ["class", "title"]),
27475
+ z($, {
27476
+ name: c(e.row.node.type),
27477
+ class: "h-3.5 w-3.5 shrink-0 text-ink-dim"
27478
+ }, null, 8, ["name"]),
27479
+ e.row.group ? (H(), F(u, {
27480
+ key: 0,
27481
+ variant: "text",
27482
+ shape: "square",
27483
+ size: "small",
27484
+ type: "button",
27485
+ class: "h-5 w-5 shrink-0 rounded-sm text-accent/85 hover:bg-panel-3",
27486
+ title: G(M)("designer.layersPanel.repeatGroupTitle", {
27487
+ groupName: e.row.group.name,
27488
+ collection: e.row.group.collection || G(M)("designer.layersPanel.unboundCollection")
27489
+ }),
27490
+ onClick: i[11] ||= Nn((t) => G(n).selection.set([...e.row.group.elementIds]), ["stop"])
27491
+ }, {
27492
+ default: q(() => [z($, {
27493
+ name: "loop",
27494
+ class: "mx-auto h-3.5 w-3.5"
27495
+ })]),
27496
+ _: 1
27497
+ }, 8, ["title"])) : I("", !0),
27498
+ a.value ? (H(), F(d, {
27499
+ key: 1,
27500
+ ref: e.api.setRenameInput,
27501
+ "model-value": e.renameText,
27502
+ class: "min-w-0 flex-1",
27503
+ "onUpdate:modelValue": e.api.updateRenameText,
27504
+ onBlur: e.api.commitRename,
27505
+ onClick: e.api.onRenameClick
27506
+ }, null, 8, [
27507
+ "model-value",
27508
+ "onUpdate:modelValue",
27509
+ "onBlur",
27510
+ "onClick"
27511
+ ])) : (H(), L("span", {
27512
+ key: 2,
27513
+ class: rn(["min-w-0 flex-1 truncate", { "italic text-ink-dim/60": !e.row.node.visible }])
27514
+ }, W(e.row.node.name), 3)),
27515
+ e.row.node.locked ? (H(), L("span", tI, W(G(M)("designer.layersPanel.lockLabel")), 1)) : I("", !0)
27516
+ ], 46, eI));
27517
+ };
27518
+ }
27519
+ }), [["__scopeId", "data-v-c7146938"]]), rI = { class: "text-[10px] text-ink-dim/70" }, iI = { class: "flex items-center gap-2 border-b border-edge px-3 py-1.5" }, aI = { class: "shrink-0 text-[11px] text-ink-dim" }, oI = { class: "w-8 shrink-0 text-right text-[10px] text-ink-dim" }, sI = {
27315
27520
  key: 0,
27316
27521
  class: "px-3 py-6 text-center text-[11px] text-ink-dim/60"
27317
- }, sI = /* @__PURE__ */ B({
27522
+ }, cI = /* @__PURE__ */ B({
27318
27523
  __name: "layers-panel",
27319
27524
  setup(e) {
27320
- let t = vz().store(), n = vz(), r = U(null), i = U(null), a = P({
27525
+ let t = Ez().store(), n = Ez(), r = U(null), i = U(null), a = {}, o = { boxShadow: "inset 0 0 0 1.5px var(--color-accent)" }, s = { boxShadow: "inset 0 2px 0 0 var(--color-accent)" }, c = { boxShadow: "inset 0 -2px 0 0 var(--color-accent)" }, l = P({
27321
27526
  get: function() {
27322
27527
  return t.selection.renamingId;
27323
27528
  },
27324
27529
  set: function(e) {
27325
27530
  t.selection.setRenamingId(e);
27326
27531
  }
27327
- }), o = U(null), s = U(""), c = U(null);
27532
+ }), u = U(null), d = U(""), f = U(null);
27328
27533
  eP([{
27329
- run: k,
27534
+ run: j,
27330
27535
  shortcut: "Enter"
27331
27536
  }, {
27332
- run: O,
27537
+ run: A,
27333
27538
  shortcut: "Escape"
27334
27539
  }], {
27335
- enabled: () => a.value !== null || o.value !== null,
27540
+ enabled: () => l.value !== null || u.value !== null,
27336
27541
  isolate: !0,
27337
- target: c
27542
+ target: f
27338
27543
  });
27339
- let l = P(() => t.scope.active), u = P(() => l.value?.name ?? ""), d = P(() => {
27340
- let e = l.value;
27544
+ let p = P(() => t.scope.active), m = P(() => p.value?.name ?? ""), h = P(() => {
27545
+ let e = p.value;
27341
27546
  return e ? t.elementGroup.getRows(e.id).map((e) => e.kind === "group" ? {
27342
27547
  depth: e.depth,
27343
27548
  group: e.group,
@@ -27350,67 +27555,73 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27350
27555
  kind: "element",
27351
27556
  node: e.node
27352
27557
  }) : [];
27353
- }), f = P(() => t.selection.single), p = P(() => f.value !== null), m = P(() => {
27354
- let e = f.value;
27558
+ }), g = P(() => t.selection.single), _ = P(() => g.value !== null), v = P(() => {
27559
+ let e = g.value;
27355
27560
  return e ? e.opacity : 1;
27356
- }), h = P(() => {
27357
- let e = f.value;
27561
+ }), y = P(() => {
27562
+ let e = g.value;
27358
27563
  return e ? `${Math.round(e.opacity * 100)}%` : "—";
27359
- }), g = P(() => t.selection.sameType ? "designer.layersPanel.elementSettingsTitle" : "designer.layersPanel.selectElementForSettingsTitle");
27360
- function _(e) {
27361
- let n = f.value;
27564
+ }), b = P(() => t.selection.sameType ? "designer.layersPanel.elementSettingsTitle" : "designer.layersPanel.selectElementForSettingsTitle"), x = {
27565
+ clearDragState: se,
27566
+ commitRename: j,
27567
+ execute: de,
27568
+ isGroupSelected: C,
27569
+ onDragOver: ie,
27570
+ onDragStart: ne,
27571
+ onGroupClick: E,
27572
+ onGroupContextMenu: le,
27573
+ onRenameClick: ee,
27574
+ onRowClick: T,
27575
+ onRowContextMenu: ce,
27576
+ setRenameInput: k,
27577
+ startRename: D,
27578
+ startRenameGroup: O,
27579
+ updateRenameText: w
27580
+ };
27581
+ function S(e) {
27582
+ let n = g.value;
27362
27583
  n && t.element.update(n.id, { opacity: Number(e) }, { transient: !0 });
27363
27584
  }
27364
- function v(e) {
27365
- return { paddingLeft: `${8 + e * 14}px` };
27366
- }
27367
- function y(e) {
27585
+ function C(e) {
27368
27586
  return e.elementIds.length > 0 && e.elementIds.every((e) => t.selection.has(e));
27369
27587
  }
27370
- function b(e) {
27371
- return Pe(t).get(e)?.icon ?? "dots";
27372
- }
27373
- function x(e) {
27374
- let n = [];
27375
- return t.selection.has(e.id) && n.push("bg-accent-soft"), t.selection.hoverId === e.id && !t.selection.has(e.id) && n.push("bg-panel-2"), n;
27588
+ function w(e) {
27589
+ d.value = e;
27376
27590
  }
27377
- function S(e, n) {
27591
+ function T(e, n) {
27378
27592
  e.ctrlKey || e.metaKey || e.shiftKey ? t.selection.set([n.id], !0) : t.selection.set([n.id]);
27379
27593
  }
27380
- function C(e, n) {
27594
+ function E(e, n) {
27381
27595
  if (!(e.ctrlKey || e.metaKey || e.shiftKey)) {
27382
- le("elementGroup.selectMembers", n.id);
27596
+ de("elementGroup.selectMembers", n.id);
27383
27597
  return;
27384
27598
  }
27385
27599
  let r = n.elementIds.filter((e) => !t.selection.has(e)), i = r.length > 0 ? r : [...n.elementIds];
27386
27600
  t.selection.set(i, !0);
27387
27601
  }
27388
- function w(e) {
27389
- return y(e) ? ["bg-accent-soft"] : ["hover:bg-panel-2"];
27390
- }
27391
- function T(e) {
27392
- o.value = null, a.value = e.id, s.value = e.name;
27602
+ function D(e) {
27603
+ u.value = null, l.value = e.id, d.value = e.name;
27393
27604
  }
27394
- function E(e) {
27395
- a.value = null, o.value = e.id, s.value = e.name;
27605
+ function O(e) {
27606
+ l.value = null, u.value = e.id, d.value = e.name;
27396
27607
  }
27397
- function D(e) {
27608
+ function k(e) {
27398
27609
  if (e && typeof e == "object" && "$el" in e && e.$el instanceof HTMLElement) {
27399
27610
  let t = e.$el.querySelector("input");
27400
- t !== c.value && (c.value = t, t?.focus(), t?.select());
27401
- } else c.value = null;
27611
+ t !== f.value && (f.value = t, t?.focus(), t?.select());
27612
+ } else f.value = null;
27402
27613
  }
27403
- function O() {
27404
- a.value = null, o.value = null;
27614
+ function A() {
27615
+ l.value = null, u.value = null;
27405
27616
  }
27406
- function k() {
27407
- let e = s.value.trim();
27408
- a.value && e && n.commands.invoke("element.setName", a.value, s.value), o.value && e && n.commands.invoke("elementGroup.rename", o.value, e), a.value = null, o.value = null;
27617
+ function j() {
27618
+ let e = d.value.trim();
27619
+ l.value && e && n.commands.invoke("element.setName", l.value, d.value), u.value && e && n.commands.invoke("elementGroup.rename", u.value, e), l.value = null, u.value = null;
27409
27620
  }
27410
- function A(e) {
27621
+ function ee(e) {
27411
27622
  e.e.stopPropagation();
27412
27623
  }
27413
- function j(e) {
27624
+ function te(e) {
27414
27625
  return e.kind === "group" ? {
27415
27626
  id: e.group.id,
27416
27627
  kind: "group"
@@ -27419,41 +27630,41 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27419
27630
  kind: "element"
27420
27631
  };
27421
27632
  }
27422
- function ee(e) {
27423
- r.value = j(e);
27633
+ function ne(e) {
27634
+ r.value = te(e);
27424
27635
  }
27425
- function te(e, n) {
27636
+ function re(e, n) {
27426
27637
  let r = n.currentTarget.getBoundingClientRect(), i = (n.clientY - r.top) / r.height;
27427
27638
  return e.kind === "element" ? i > .5 ? "below" : "above" : i < .25 ? "above" : i > .75 && t.elementGroup.isCollapsed(e.group.id) ? "below" : "inside";
27428
27639
  }
27429
- function ne(e, t) {
27640
+ function ie(e, t) {
27430
27641
  r.value && (i.value = {
27431
- placement: te(t, e),
27642
+ placement: re(t, e),
27432
27643
  rowKey: t.key
27433
27644
  });
27434
27645
  }
27435
- function re(e) {
27436
- return i.value?.rowKey === e.key ? i.value.placement === "inside" ? { boxShadow: "inset 0 0 0 1.5px #4f7cff" } : i.value.placement === "below" ? { boxShadow: "inset 0 -2px 0 0 #4f7cff" } : { boxShadow: "inset 0 2px 0 0 #4f7cff" } : {};
27646
+ function ae(e) {
27647
+ return i.value?.rowKey === e.key ? i.value.placement === "inside" ? o : i.value.placement === "below" ? c : s : a;
27437
27648
  }
27438
- function ie() {
27439
- let e = r.value, a = t.scope.active, o = i.value, s = d.value.find((e) => e.key === o?.rowKey);
27440
- e && a && o && s && n.commands.invoke("element.moveLayerNodes", a.id, [e], j(s), o.placement), ae();
27649
+ function oe() {
27650
+ let e = r.value, a = t.scope.active, o = i.value, s = h.value.find((e) => e.key === o?.rowKey);
27651
+ e && a && o && s && n.commands.invoke("element.moveLayerNodes", a.id, [e], te(s), o.placement), se();
27441
27652
  }
27442
- function ae() {
27653
+ function se() {
27443
27654
  r.value = null, i.value = null;
27444
27655
  }
27445
- function oe(e, r) {
27656
+ function ce(e, r) {
27446
27657
  t.selection.has(r.id) || t.selection.set([r.id]), t.ui.openContextMenu(e.clientX, e.clientY, [
27447
- ...ce(["element.openSettings", "element.rename"]),
27658
+ ...ue(["element.openSettings", "element.rename"]),
27448
27659
  { type: "divider" },
27449
- ...ce([
27660
+ ...ue([
27450
27661
  "element.bringFront",
27451
27662
  "element.bringForward",
27452
27663
  "element.sendBackward",
27453
27664
  "element.sendBack"
27454
27665
  ]),
27455
27666
  { type: "divider" },
27456
- ...ce(["element.group", "element.ungroup"]),
27667
+ ...ue(["element.group", "element.ungroup"]),
27457
27668
  { type: "divider" },
27458
27669
  ...XF(n.commands, [
27459
27670
  {
@@ -27468,77 +27679,77 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27468
27679
  args: [r.id],
27469
27680
  id: "edit.delete"
27470
27681
  }
27471
- ], le)
27682
+ ], de)
27472
27683
  ]);
27473
27684
  }
27474
- function se(e, n) {
27475
- y(n) || le("elementGroup.selectMembers", n.id);
27685
+ function le(e, n) {
27686
+ C(n) || de("elementGroup.selectMembers", n.id);
27476
27687
  let r = t.elementGroup.isVisible(n.id), i = t.elementGroup.isLocked(n.id);
27477
27688
  t.ui.openContextMenu(e.clientX, e.clientY, [
27478
27689
  qF(M("designer.builtins.renameTitle"), () => {
27479
- E(n);
27690
+ O(n);
27480
27691
  }, { icon: "rename" }),
27481
- qF(M("designer.layersPanel.ungroupLabel"), () => le("elementGroup.ungroup", n.id), { icon: "folder-open" }),
27692
+ qF(M("designer.layersPanel.ungroupLabel"), () => de("elementGroup.ungroup", n.id), { icon: "folder-open" }),
27482
27693
  KF(),
27483
- ...ce([
27694
+ ...ue([
27484
27695
  "element.bringFront",
27485
27696
  "element.bringForward",
27486
27697
  "element.sendBackward",
27487
27698
  "element.sendBack"
27488
27699
  ]),
27489
27700
  KF(),
27490
- qF(M(i ? "designer.layersPanel.unlockLabel" : "designer.layersPanel.lockLabel"), () => le("elementGroup.toggleFlag", n.id, "locked"), { icon: i ? "unlock" : "lock" }),
27491
- qF(M(r ? "designer.layersPanel.hideLabel" : "designer.layersPanel.showLabel"), () => le("elementGroup.toggleFlag", n.id, "visible"), { icon: r ? "eye-off" : "eye" }),
27701
+ qF(M(i ? "designer.layersPanel.unlockLabel" : "designer.layersPanel.lockLabel"), () => de("elementGroup.toggleFlag", n.id, "locked"), { icon: i ? "unlock" : "lock" }),
27702
+ qF(M(r ? "designer.layersPanel.hideLabel" : "designer.layersPanel.showLabel"), () => de("elementGroup.toggleFlag", n.id, "visible"), { icon: r ? "eye-off" : "eye" }),
27492
27703
  KF(),
27493
- qF(M("designer.layersPanel.groupDeleteLabel"), () => le("elementGroup.remove", n.id, !0), {
27704
+ qF(M("designer.layersPanel.groupDeleteLabel"), () => de("elementGroup.remove", n.id, !0), {
27494
27705
  danger: !0,
27495
27706
  icon: "trash"
27496
27707
  })
27497
27708
  ]);
27498
27709
  }
27499
- function ce(e) {
27500
- return XF(n.commands, e, le);
27710
+ function ue(e) {
27711
+ return XF(n.commands, e, de);
27501
27712
  }
27502
- function le(e, ...t) {
27713
+ function de(e, ...t) {
27503
27714
  n.commands.dispatch(e, ...t);
27504
27715
  }
27505
- return K(a, (e) => {
27506
- s.value = e ? t.element.get(e)?.name ?? "" : "";
27716
+ return K(l, (e) => {
27717
+ d.value = e ? t.element.get(e)?.name ?? "" : "";
27507
27718
  }, { flush: "sync" }), (e, n) => {
27508
- let r = dA, i = sy, c = jS;
27719
+ let r = dA, i = sy;
27509
27720
  return H(), F(ZN, {
27510
27721
  class: "min-h-[160px]",
27511
27722
  "panel-id": "layers",
27512
27723
  title: G(M)("designer.layersPanel.panelTitle")
27513
27724
  }, {
27514
- actions: q(() => [R("span", ZF, W(u.value), 1)]),
27515
- default: q(() => [R("div", QF, [
27516
- R("span", $F, W(G(M)("designer.layersPanel.opacityLabel")), 1),
27725
+ actions: q(() => [R("span", rI, W(m.value), 1)]),
27726
+ default: q(() => [R("div", iI, [
27727
+ R("span", aI, W(G(M)("designer.layersPanel.opacityLabel")), 1),
27517
27728
  z(r, {
27518
27729
  min: 0,
27519
27730
  max: 1,
27520
27731
  step: .05,
27521
- value: m.value,
27522
- disabled: !p.value,
27732
+ value: v.value,
27733
+ disabled: !_.value,
27523
27734
  class: "min-w-0 flex-1",
27524
27735
  "aria-label": G(M)("designer.layersPanel.opacityLabel"),
27525
- onChange: _,
27736
+ onChange: S,
27526
27737
  onChangeEnd: n[0] ||= (e) => G(t).history.commit()
27527
27738
  }, null, 8, [
27528
27739
  "value",
27529
27740
  "disabled",
27530
27741
  "aria-label"
27531
27742
  ]),
27532
- R("span", eI, W(h.value), 1),
27743
+ R("span", oI, W(y.value), 1),
27533
27744
  z(i, {
27534
27745
  variant: "text",
27535
27746
  shape: "square",
27536
27747
  size: "small",
27537
27748
  type: "button",
27538
27749
  class: rn(["flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink disabled:cursor-not-allowed disabled:hover:bg-transparent disabled:hover:text-ink-dim", { "opacity-40": !G(t).selection.sameType }]),
27539
- title: G(M)(g.value),
27750
+ title: G(M)(b.value),
27540
27751
  disabled: !G(t).selection.sameType,
27541
- onClick: n[1] ||= (e) => le("element.openSettings")
27752
+ onClick: n[1] ||= (e) => de("element.openSettings")
27542
27753
  }, {
27543
27754
  default: q(() => [z($, {
27544
27755
  name: "sliders",
@@ -27552,230 +27763,74 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27552
27763
  ])
27553
27764
  ]), R("div", {
27554
27765
  class: "min-h-0 flex-1 overflow-y-auto",
27555
- onDragover: n[4] ||= Nn(() => {}, ["prevent"]),
27556
- onDrop: ie
27557
- }, [(H(!0), L(N, null, gn(d.value, (e) => (H(), L(N, { key: e.key }, [e.kind === "group" ? (H(), L("div", {
27558
- key: 0,
27559
- "data-layer-group-id": e.group.id,
27560
- draggable: "true",
27561
- class: rn(["group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px] font-medium", w(e.group)]),
27562
- style: on({
27563
- ...v(e.depth),
27564
- ...re(e)
27565
- }),
27566
- onClick: (t) => C(t, e.group),
27567
- onDblclick: (t) => E(e.group),
27568
- onDragstart: (t) => ee(e),
27569
- onDragend: ae,
27570
- onDragover: (t) => ne(t, e),
27571
- onContextmenu: Nn((t) => se(t, e.group), ["prevent"])
27572
- }, [
27573
- z(i, {
27574
- variant: "text",
27575
- shape: "square",
27576
- size: "small",
27577
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27578
- "text-ink": G(t).elementGroup.isVisible(e.group.id),
27579
- "text-ink-dim/40": !G(t).elementGroup.isVisible(e.group.id)
27580
- }]),
27581
- title: G(t).elementGroup.isVisible(e.group.id) ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27582
- onClick: Nn((t) => le("elementGroup.toggleFlag", e.group.id, "visible"), ["stop"])
27583
- }, {
27584
- default: q(() => [z($, {
27585
- name: G(t).elementGroup.isVisible(e.group.id) ? "eye" : "eye-off",
27586
- class: "mx-auto h-3.5 w-3.5"
27587
- }, null, 8, ["name"])]),
27588
- _: 2
27589
- }, 1032, [
27590
- "class",
27591
- "title",
27592
- "onClick"
27593
- ]),
27594
- z(i, {
27595
- variant: "text",
27596
- shape: "square",
27597
- size: "small",
27598
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": G(t).elementGroup.isLocked(e.group.id) }]),
27599
- title: G(t).elementGroup.isLocked(e.group.id) ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27600
- onClick: Nn((t) => le("elementGroup.toggleFlag", e.group.id, "locked"), ["stop"])
27601
- }, {
27602
- default: q(() => [z($, {
27603
- name: G(t).elementGroup.isLocked(e.group.id) ? "lock" : "unlock",
27604
- class: "mx-auto h-3.5 w-3.5"
27605
- }, null, 8, ["name"])]),
27606
- _: 2
27607
- }, 1032, [
27608
- "class",
27609
- "title",
27610
- "onClick"
27611
- ]),
27612
- z(i, {
27613
- variant: "text",
27614
- shape: "square",
27615
- size: "small",
27616
- class: "h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink",
27617
- title: G(t).elementGroup.isCollapsed(e.group.id) ? G(M)("designer.layersPanel.expandGroupLabel") : G(M)("designer.layersPanel.collapseGroupLabel"),
27618
- onClick: Nn((t) => le("elementGroup.toggleCollapsed", e.group.id), ["stop"])
27619
- }, {
27620
- default: q(() => [z($, {
27621
- name: G(t).elementGroup.isCollapsed(e.group.id) ? "chevron-right" : "chevron-down",
27622
- class: "mx-auto h-3.5 w-3.5"
27623
- }, null, 8, ["name"])]),
27624
- _: 2
27625
- }, 1032, ["title", "onClick"]),
27626
- z($, {
27627
- name: G(t).elementGroup.isCollapsed(e.group.id) ? "folder" : "folder-open",
27628
- class: "h-3.5 w-3.5 shrink-0 text-accent/85"
27629
- }, null, 8, ["name"]),
27630
- o.value === e.group.id ? (H(), F(c, {
27631
- key: 0,
27632
- ref_for: !0,
27633
- ref: D,
27634
- modelValue: s.value,
27635
- "onUpdate:modelValue": n[2] ||= (e) => s.value = e,
27636
- class: "min-w-0 flex-1",
27637
- onBlur: k,
27638
- onClick: A
27639
- }, null, 8, ["modelValue"])) : (H(), L("span", nI, W(e.group.name), 1)),
27640
- R("span", rI, W(G(M)("designer.layersPanel.groupMemberCount", { count: e.group.elementIds.length })), 1)
27641
- ], 46, tI)) : (H(), L("div", {
27642
- key: 1,
27643
- "data-layer-id": e.node.id,
27644
- draggable: "true",
27645
- class: rn(["group flex cursor-pointer items-center gap-1 border-b border-edge/40 py-1 pr-2 text-[11px]", [...G(t).selection.has(e.node.id) ? [] : ["hover:bg-panel-2"], ...x(e.node)]]),
27646
- style: on({
27647
- ...v(e.depth),
27648
- ...re(e)
27649
- }),
27650
- onClick: (t) => S(t, e.node),
27651
- onDblclick: (t) => T(e.node),
27652
- onDragstart: (t) => ee(e),
27653
- onDragend: ae,
27654
- onDragover: (t) => ne(t, e),
27655
- onContextmenu: Nn((t) => oe(t, e.node), ["prevent"])
27656
- }, [
27657
- z(i, {
27658
- variant: "text",
27659
- shape: "square",
27660
- size: "small",
27661
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", {
27662
- "text-ink": e.node.visible,
27663
- "text-ink-dim/40": !e.node.visible
27664
- }]),
27665
- title: e.node.visible ? G(M)("designer.layersPanel.hideLabel") : G(M)("designer.layersPanel.showLabel"),
27666
- onClick: Nn((t) => le("element.toggleVisibility", e.node.id), ["stop"])
27667
- }, {
27668
- default: q(() => [z($, {
27669
- name: e.node.visible ? "eye" : "eye-off",
27670
- class: "mx-auto h-3.5 w-3.5"
27671
- }, null, 8, ["name"])]),
27672
- _: 2
27673
- }, 1032, [
27674
- "class",
27675
- "title",
27676
- "onClick"
27677
- ]),
27678
- z(i, {
27679
- variant: "text",
27680
- shape: "square",
27681
- size: "small",
27682
- class: rn(["h-5 w-5 shrink-0 rounded-sm text-ink-dim hover:text-ink", { "text-accent": e.node.locked }]),
27683
- title: e.node.locked ? G(M)("designer.layersPanel.unlockLabel") : G(M)("designer.layersPanel.lockLabel"),
27684
- onClick: Nn((t) => le("element.toggleLock", e.node.id), ["stop"])
27685
- }, {
27686
- default: q(() => [z($, {
27687
- name: e.node.locked ? "lock" : "unlock",
27688
- class: "mx-auto h-3.5 w-3.5"
27689
- }, null, 8, ["name"])]),
27690
- _: 2
27691
- }, 1032, [
27692
- "class",
27693
- "title",
27694
- "onClick"
27695
- ]),
27696
- z($, {
27697
- name: b(e.node.type),
27698
- class: "h-3.5 w-3.5 shrink-0 text-ink-dim"
27699
- }, null, 8, ["name"]),
27700
- e.group ? (H(), F(i, {
27701
- key: 0,
27702
- variant: "text",
27703
- shape: "square",
27704
- size: "small",
27705
- type: "button",
27706
- class: "h-5 w-5 shrink-0 rounded-sm text-accent/85 hover:bg-panel-3",
27707
- title: G(M)("designer.layersPanel.repeatGroupTitle", {
27708
- groupName: e.group.name,
27709
- collection: e.group.collection || G(M)("designer.layersPanel.unboundCollection")
27710
- }),
27711
- onClick: Nn((n) => G(t).selection.set([...e.group.elementIds]), ["stop"])
27712
- }, {
27713
- default: q(() => [z($, {
27714
- name: "loop",
27715
- class: "mx-auto h-3.5 w-3.5"
27716
- })]),
27717
- _: 1
27718
- }, 8, ["title", "onClick"])) : I("", !0),
27719
- a.value === e.node.id ? (H(), F(c, {
27720
- key: 1,
27721
- ref_for: !0,
27722
- ref: D,
27723
- modelValue: s.value,
27724
- "onUpdate:modelValue": n[3] ||= (e) => s.value = e,
27725
- class: "min-w-0 flex-1",
27726
- onBlur: k,
27727
- onClick: A
27728
- }, null, 8, ["modelValue"])) : (H(), L("span", {
27729
- key: 2,
27730
- class: rn(["min-w-0 flex-1 truncate", { "italic text-ink-dim/60": !e.node.visible }])
27731
- }, W(e.node.name), 3)),
27732
- e.node.locked ? (H(), L("span", aI, W(G(M)("designer.layersPanel.lockLabel")), 1)) : I("", !0)
27733
- ], 46, iI))], 64))), 128)), d.value.length === 0 ? (H(), L("div", oI, W(G(M)("designer.layersPanel.noElementsMessage")), 1)) : I("", !0)], 32)]),
27766
+ onDragover: n[2] ||= Nn(() => {}, ["prevent"]),
27767
+ onDrop: oe
27768
+ }, [(H(!0), L(N, null, gn(h.value, (e) => (H(), F(nI, {
27769
+ key: e.key,
27770
+ api: x,
27771
+ "drop-indicator": ae(e),
27772
+ "rename-text": d.value,
27773
+ "renaming-group-id": u.value,
27774
+ row: e
27775
+ }, null, 8, [
27776
+ "drop-indicator",
27777
+ "rename-text",
27778
+ "renaming-group-id",
27779
+ "row"
27780
+ ]))), 128)), h.value.length === 0 ? (H(), L("div", sI, W(G(M)("designer.layersPanel.noElementsMessage")), 1)) : I("", !0)], 32)]),
27734
27781
  _: 1
27735
27782
  }, 8, ["title"]);
27736
27783
  };
27737
27784
  }
27738
- }), cI = { class: "flex shrink-0 flex-col pb-2" }, lI = ["title", "aria-label"], uI = ["title", "aria-label"], dI = ["data-template-id", "onContextmenu"], fI = ["title"], pI = {
27785
+ }), lI = { class: "pages-panel flex shrink-0 flex-col pb-2" }, uI = ["title", "aria-label"], dI = ["title", "aria-label"], fI = ["data-template-id", "onContextmenu"], pI = { class: "pages-panel__identity" }, mI = ["title"], hI = { class: "pages-panel__detail truncate text-[10px] text-ink-dim/80" }, gI = { class: "pages-panel__template-status" }, _I = {
27739
27786
  key: 0,
27740
- class: "shrink-0 rounded-sm bg-panel-3 px-1 py-px text-[9px] text-ink-dim"
27741
- }, mI = { class: "shrink-0 text-[10px] text-ink-dim/80" }, hI = [
27787
+ class: "rounded-sm bg-panel-3 px-1 py-px text-[9px] text-ink-dim"
27788
+ }, vI = { class: "pages-panel__actions" }, yI = [
27789
+ "title",
27790
+ "aria-label",
27791
+ "onClick"
27792
+ ], bI = [
27742
27793
  "title",
27743
27794
  "aria-label",
27744
27795
  "onClick"
27745
- ], gI = [
27796
+ ], xI = [
27746
27797
  "title",
27747
27798
  "aria-label",
27748
27799
  "onClick"
27749
- ], _I = [
27800
+ ], SI = [
27750
27801
  "title",
27751
27802
  "aria-label",
27752
27803
  "onClick"
27753
- ], vI = ["title", "aria-label"], yI = [
27804
+ ], CI = ["title", "aria-label"], wI = [
27754
27805
  "data-page-row",
27755
27806
  "onClick",
27756
27807
  "onDblclick",
27757
27808
  "onContextmenu"
27758
- ], bI = { class: "w-4 shrink-0 text-right text-[10px] text-ink-dim/70" }, xI = ["title"], SI = { class: "shrink-0 text-[10px] text-ink-dim/60" }, CI = ["title"], wI = [
27809
+ ], TI = { class: "pages-panel__identity" }, EI = { class: "w-4 shrink-0 text-right text-[10px] text-ink-dim/70" }, DI = ["title"], OI = { class: "pages-panel__detail truncate text-[10px] text-ink-dim/60" }, kI = ["title"], AI = { class: "pages-panel__actions" }, jI = [
27759
27810
  "title",
27760
27811
  "aria-label",
27761
27812
  "onClick"
27762
- ], TI = [
27813
+ ], MI = [
27763
27814
  "title",
27764
27815
  "aria-label",
27765
27816
  "onClick"
27766
- ], EI = [
27817
+ ], NI = [
27767
27818
  "title",
27768
27819
  "aria-label",
27769
27820
  "onClick"
27770
- ], DI = [
27821
+ ], PI = [
27771
27822
  "title",
27772
27823
  "aria-label",
27773
27824
  "disabled",
27774
27825
  "onClick"
27775
- ], OI = /* @__PURE__ */ B({
27826
+ ], FI = [
27827
+ "title",
27828
+ "aria-label",
27829
+ "onClick"
27830
+ ], II = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
27776
27831
  __name: "pages-panel",
27777
27832
  setup(e) {
27778
- let t = vz(), n = t.store(), r = P(() => {
27833
+ let t = Ez(), n = t.store(), r = P(() => {
27779
27834
  let e = i.value;
27780
27835
  return e ? n.template.list.find((t) => t.id === e) : null;
27781
27836
  }), i = U(null), a = P(() => n.template.list.map((e) => ({
@@ -27829,7 +27884,20 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27829
27884
  function _(e) {
27830
27885
  c("page.remove", e);
27831
27886
  }
27832
- function v(e, r) {
27887
+ function v(e) {
27888
+ if (e.type === "click" && e.currentTarget instanceof HTMLElement) {
27889
+ let t = e.currentTarget.getBoundingClientRect();
27890
+ return {
27891
+ x: t.left,
27892
+ y: t.bottom
27893
+ };
27894
+ }
27895
+ return {
27896
+ x: e.clientX,
27897
+ y: e.clientY
27898
+ };
27899
+ }
27900
+ function y(e, r) {
27833
27901
  let i = XF(t.commands, [
27834
27902
  "file.pageSetup",
27835
27903
  "page.applyTemplate",
@@ -27839,10 +27907,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27839
27907
  ].map((e) => ({
27840
27908
  args: [r],
27841
27909
  id: e
27842
- })), c);
27843
- n.ui.openContextMenu(e.clientX, e.clientY, i);
27910
+ })), c), a = v(e);
27911
+ n.ui.openContextMenu(a.x, a.y, i);
27844
27912
  }
27845
- function y(e, r) {
27913
+ function b(e, r) {
27846
27914
  let i = n.template.list.find((e) => e.id === r);
27847
27915
  if (!i) return;
27848
27916
  let a = ["template.enterEdit", "template.applyRange"];
@@ -27852,8 +27920,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27852
27920
  id: e
27853
27921
  })), (e, ...t) => {
27854
27922
  e === "template.remove" ? m(r) : c(e, ...t);
27855
- });
27856
- n.ui.openContextMenu(e.clientX, e.clientY, o);
27923
+ }), s = v(e);
27924
+ n.ui.openContextMenu(s.x, s.y, o);
27857
27925
  }
27858
27926
  return (e, t) => {
27859
27927
  let s = rP;
@@ -27861,7 +27929,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27861
27929
  "panel-id": "pages",
27862
27930
  title: G(M)("designer.pagesPanel.panelTitle")
27863
27931
  }, {
27864
- default: q(() => [R("div", cI, [z(JN, { title: G(M)("designer.pagesPanel.templatesSection") }, {
27932
+ default: q(() => [R("div", lI, [z(JN, { title: G(M)("designer.pagesPanel.templatesSection") }, {
27865
27933
  actions: q(() => [R("button", {
27866
27934
  type: "button",
27867
27935
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
@@ -27871,7 +27939,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27871
27939
  }, [z($, {
27872
27940
  name: "template",
27873
27941
  class: "h-3.5 w-3.5"
27874
- })], 8, lI), R("button", {
27942
+ })], 8, uI), R("button", {
27875
27943
  type: "button",
27876
27944
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
27877
27945
  title: G(M)("designer.pagesPanel.addTemplateTitle"),
@@ -27881,55 +27949,68 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27881
27949
  }, [z($, {
27882
27950
  name: "plus",
27883
27951
  class: "h-3.5 w-3.5"
27884
- })], 8, uI)]),
27952
+ })], 8, dI)]),
27885
27953
  default: q(() => [(H(!0), L(N, null, gn(a.value, (e) => (H(), L("div", {
27886
27954
  key: e.id,
27887
27955
  "data-template-id": e.id,
27888
- class: rn(["group flex items-center gap-1.5 border-b border-edge/40 px-2 py-1 text-[11px] hover:bg-panel-2", { "bg-accent-soft": e.editing }]),
27889
- onContextmenu: Nn((t) => y(t, e.id), ["stop", "prevent"])
27956
+ class: rn(["pages-panel__row pages-panel__template-row group border-b border-edge/40 px-2 py-1 text-[11px] hover:bg-panel-2", { "bg-accent-soft": e.editing }]),
27957
+ onContextmenu: Nn((t) => b(t, e.id), ["stop", "prevent"])
27890
27958
  }, [
27891
- z($, {
27959
+ R("div", pI, [z($, {
27892
27960
  name: "template",
27893
- class: rn(["h-3.5 w-3.5 shrink-0", e.editing ? "text-accent" : "text-ink-dim"])
27894
- }, null, 8, ["class"]),
27895
- R("span", {
27896
- class: rn(["min-w-0 flex-1 cursor-default truncate", { "text-accent": e.editing }]),
27961
+ class: rn(["h-3.5 w-4 shrink-0", e.editing ? "text-accent" : "text-ink-dim"])
27962
+ }, null, 8, ["class"]), R("span", {
27963
+ class: rn(["pages-panel__name cursor-default truncate", { "text-accent": e.editing }]),
27897
27964
  title: e.name
27898
- }, W(e.name), 11, fI),
27899
- e.builtin ? (H(), L("span", pI, W(G(M)("designer.pagesPanel.builtinBadge")), 1)) : I("", !0),
27900
- R("span", mI, W(G(M)("designer.pagesPanel.usageCount", { count: e.usage })), 1),
27901
- R("button", {
27902
- type: "button",
27903
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27904
- title: G(M)("designer.pagesPanel.editTemplateTitle"),
27905
- "aria-label": G(M)("designer.pagesPanel.editTemplateTitle"),
27906
- onClick: (t) => f(e.id)
27907
- }, [z($, {
27908
- name: "rename",
27909
- class: "h-3.5 w-3.5"
27910
- })], 8, hI),
27911
- R("button", {
27912
- type: "button",
27913
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27914
- title: G(M)("designer.pagesPanel.applyRangeTitle"),
27915
- "aria-label": G(M)("designer.pagesPanel.applyRangeTitle"),
27916
- onClick: (t) => p(e.id)
27917
- }, [z($, {
27918
- name: "apply-template",
27919
- class: "h-3.5 w-3.5"
27920
- })], 8, gI),
27921
- e.builtin ? I("", !0) : (H(), L("button", {
27922
- key: 1,
27923
- type: "button",
27924
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27925
- title: G(M)("designer.pagesPanel.removeTemplateTitle"),
27926
- "aria-label": G(M)("designer.pagesPanel.removeTemplateTitle"),
27927
- onClick: (t) => m(e.id)
27928
- }, [z($, {
27929
- name: "trash",
27930
- class: "h-3.5 w-3.5"
27931
- })], 8, _I))
27932
- ], 42, dI))), 128))]),
27965
+ }, W(e.name), 11, mI)]),
27966
+ R("span", hI, W(G(M)("designer.pagesPanel.usageCount", { count: e.usage })), 1),
27967
+ R("div", gI, [e.builtin ? (H(), L("span", _I, W(G(M)("designer.pagesPanel.builtinBadge")), 1)) : I("", !0)]),
27968
+ R("div", vI, [
27969
+ R("button", {
27970
+ type: "button",
27971
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27972
+ title: G(M)("designer.pagesPanel.editTemplateTitle"),
27973
+ "aria-label": G(M)("designer.pagesPanel.editTemplateTitle"),
27974
+ onClick: (t) => f(e.id)
27975
+ }, [z($, {
27976
+ name: "rename",
27977
+ class: "h-3.5 w-3.5"
27978
+ })], 8, yI),
27979
+ R("button", {
27980
+ type: "button",
27981
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27982
+ title: G(M)("designer.pagesPanel.applyRangeTitle"),
27983
+ "aria-label": G(M)("designer.pagesPanel.applyRangeTitle"),
27984
+ onClick: (t) => p(e.id)
27985
+ }, [z($, {
27986
+ name: "apply-template",
27987
+ class: "h-3.5 w-3.5"
27988
+ })], 8, bI),
27989
+ e.builtin ? I("", !0) : (H(), L("button", {
27990
+ key: 0,
27991
+ type: "button",
27992
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27993
+ title: G(M)("designer.pagesPanel.removeTemplateTitle"),
27994
+ "aria-label": G(M)("designer.pagesPanel.removeTemplateTitle"),
27995
+ onClick: (t) => m(e.id)
27996
+ }, [z($, {
27997
+ name: "trash",
27998
+ class: "h-3.5 w-3.5"
27999
+ })], 8, xI)),
28000
+ R("button", {
28001
+ type: "button",
28002
+ class: "pages-panel__more h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
28003
+ title: G(M)("designer.pagesPanel.moreActionsTitle"),
28004
+ "aria-label": G(M)("designer.pagesPanel.moreActionsTitle"),
28005
+ "aria-haspopup": "menu",
28006
+ onClick: Nn((t) => b(t, e.id), ["stop"]),
28007
+ onDblclick: t[0] ||= Nn(() => {}, ["stop"])
28008
+ }, [z($, {
28009
+ name: "dots",
28010
+ class: "h-3.5 w-3.5 rotate-90"
28011
+ })], 40, SI)
28012
+ ])
28013
+ ], 42, fI))), 128))]),
27933
28014
  _: 1
27934
28015
  }, 8, ["title"]), z(JN, { title: G(M)("designer.pagesPanel.pagesSection") }, {
27935
28016
  actions: q(() => [R("button", {
@@ -27937,71 +28018,84 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
27937
28018
  class: "flex h-5 w-5 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
27938
28019
  title: G(M)("designer.builtins.addPageTitle"),
27939
28020
  "aria-label": G(M)("designer.builtins.addPageTitle"),
27940
- onClick: t[0] ||= (e) => c("page.add")
28021
+ onClick: t[1] ||= (e) => c("page.add")
27941
28022
  }, [z($, {
27942
28023
  name: "plus",
27943
28024
  class: "h-3.5 w-3.5"
27944
- })], 8, vI)]),
28025
+ })], 8, CI)]),
27945
28026
  default: q(() => [(H(!0), L(N, null, gn(o.value, (e) => (H(), L("div", {
27946
28027
  key: e.id,
27947
28028
  "data-page-row": e.id,
27948
- class: rn(["group flex cursor-pointer items-center gap-1.5 border-b border-edge/40 px-2 py-1 text-[11px]", e.active ? "bg-accent-soft" : "hover:bg-panel-2"]),
28029
+ class: rn(["pages-panel__row pages-panel__page-row group cursor-pointer border-b border-edge/40 px-2 py-1 text-[11px]", e.active ? "bg-accent-soft" : "hover:bg-panel-2"]),
27949
28030
  onClick: (t) => l(e.id),
27950
28031
  onDblclick: (t) => c("file.pageSetup", e.id),
27951
- onContextmenu: Nn((t) => v(t, e.id), ["stop", "prevent"])
28032
+ onContextmenu: Nn((t) => y(t, e.id), ["stop", "prevent"])
27952
28033
  }, [
27953
- R("span", bI, W(e.index + 1), 1),
27954
- R("span", {
27955
- class: rn(["min-w-0 flex-1 truncate", { "text-accent": e.active }]),
28034
+ R("div", TI, [R("span", EI, W(e.index + 1), 1), R("span", {
28035
+ class: rn(["pages-panel__name truncate", { "text-accent": e.active }]),
27956
28036
  title: e.name
27957
- }, W(e.name), 11, xI),
27958
- R("span", SI, W(e.sizeText), 1),
28037
+ }, W(e.name), 11, DI)]),
28038
+ R("span", OI, W(e.sizeText), 1),
27959
28039
  R("span", {
27960
- class: rn(["max-w-[86px] shrink-0 truncate rounded-sm px-1 py-px text-[9px]", e.usesCustomTemplate ? "bg-accent-soft text-accent" : "bg-panel-3 text-ink-dim"]),
28040
+ class: rn(["pages-panel__applied-template truncate rounded-sm px-1 py-px text-[9px]", e.usesCustomTemplate ? "bg-accent-soft text-accent" : "bg-panel-3 text-ink-dim"]),
27961
28041
  title: G(M)("designer.pagesPanel.appliedTemplateTitle", { templateName: e.templateName })
27962
- }, W(e.templateName), 11, CI),
27963
- R("button", {
27964
- type: "button",
27965
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27966
- title: G(M)("designer.pagesPanel.applyTemplateTitle"),
27967
- "aria-label": G(M)("designer.pagesPanel.applyTemplateTitle"),
27968
- onClick: Nn((t) => g(e.id), ["stop"])
27969
- }, [z($, {
27970
- name: "apply-template",
27971
- class: "h-3.5 w-3.5"
27972
- })], 8, wI),
27973
- R("button", {
27974
- type: "button",
27975
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27976
- title: G(M)("designer.builtins.duplicatePageTitle"),
27977
- "aria-label": G(M)("designer.builtins.duplicatePageTitle"),
27978
- onClick: Nn((t) => c("page.copy", e.id), ["stop"])
27979
- }, [z($, {
27980
- name: "copy",
27981
- class: "h-3.5 w-3.5"
27982
- })], 8, TI),
27983
- R("button", {
27984
- type: "button",
27985
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
27986
- title: G(M)("designer.templateBanner.detachTitle"),
27987
- "aria-label": G(M)("designer.templateBanner.detachTitle"),
27988
- onClick: Nn((t) => c("page.detachTemplate", e.id), ["stop"])
27989
- }, [z($, {
27990
- name: "copy",
27991
- class: "h-3.5 w-3.5"
27992
- })], 8, EI),
27993
- R("button", {
27994
- type: "button",
27995
- class: "flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
27996
- title: G(M)("designer.builtins.deletePageTitle"),
27997
- "aria-label": G(M)("designer.builtins.deletePageTitle"),
27998
- disabled: G(n).page.list.length <= 1,
27999
- onClick: Nn((t) => _(e.id), ["stop"])
28000
- }, [z($, {
28001
- name: "trash",
28002
- class: "h-3.5 w-3.5"
28003
- })], 8, DI)
28004
- ], 42, yI))), 128))]),
28042
+ }, W(e.templateName), 11, kI),
28043
+ R("div", AI, [
28044
+ R("button", {
28045
+ type: "button",
28046
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28047
+ title: G(M)("designer.pagesPanel.applyTemplateTitle"),
28048
+ "aria-label": G(M)("designer.pagesPanel.applyTemplateTitle"),
28049
+ onClick: Nn((t) => g(e.id), ["stop"])
28050
+ }, [z($, {
28051
+ name: "apply-template",
28052
+ class: "h-3.5 w-3.5"
28053
+ })], 8, jI),
28054
+ R("button", {
28055
+ type: "button",
28056
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28057
+ title: G(M)("designer.builtins.duplicatePageTitle"),
28058
+ "aria-label": G(M)("designer.builtins.duplicatePageTitle"),
28059
+ onClick: Nn((t) => c("page.copy", e.id), ["stop"])
28060
+ }, [z($, {
28061
+ name: "copy",
28062
+ class: "h-3.5 w-3.5"
28063
+ })], 8, MI),
28064
+ R("button", {
28065
+ type: "button",
28066
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-ink group-hover:opacity-100",
28067
+ title: G(M)("designer.templateBanner.detachTitle"),
28068
+ "aria-label": G(M)("designer.templateBanner.detachTitle"),
28069
+ onClick: Nn((t) => c("page.detachTemplate", e.id), ["stop"])
28070
+ }, [z($, {
28071
+ name: "copy",
28072
+ class: "h-3.5 w-3.5"
28073
+ })], 8, NI),
28074
+ R("button", {
28075
+ type: "button",
28076
+ class: "pages-panel__action flex h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim opacity-0 hover:bg-panel-3 hover:text-danger group-hover:opacity-100",
28077
+ title: G(M)("designer.builtins.deletePageTitle"),
28078
+ "aria-label": G(M)("designer.builtins.deletePageTitle"),
28079
+ disabled: G(n).page.list.length <= 1,
28080
+ onClick: Nn((t) => _(e.id), ["stop"])
28081
+ }, [z($, {
28082
+ name: "trash",
28083
+ class: "h-3.5 w-3.5"
28084
+ })], 8, PI),
28085
+ R("button", {
28086
+ type: "button",
28087
+ class: "pages-panel__more h-5 w-5 shrink-0 items-center justify-center rounded-sm text-ink-dim hover:bg-panel-3 hover:text-ink",
28088
+ title: G(M)("designer.pagesPanel.moreActionsTitle"),
28089
+ "aria-label": G(M)("designer.pagesPanel.moreActionsTitle"),
28090
+ "aria-haspopup": "menu",
28091
+ onClick: Nn((t) => y(t, e.id), ["stop"]),
28092
+ onDblclick: t[2] ||= Nn(() => {}, ["stop"])
28093
+ }, [z($, {
28094
+ name: "dots",
28095
+ class: "h-3.5 w-3.5 rotate-90"
28096
+ })], 40, FI)
28097
+ ])
28098
+ ], 42, wI))), 128))]),
28005
28099
  _: 1
28006
28100
  }, 8, ["title"])])]),
28007
28101
  _: 1
@@ -28015,15 +28109,15 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28015
28109
  theme: "danger"
28016
28110
  },
28017
28111
  onConfirm: h,
28018
- onClose: t[1] ||= (e) => i.value = null,
28019
- onCancel: t[2] ||= (e) => i.value = null
28112
+ onClose: t[3] ||= (e) => i.value = null,
28113
+ onCancel: t[4] ||= (e) => i.value = null
28020
28114
  }, {
28021
28115
  default: q(() => [Wt(W(G(M)("designer.pagesPanel.removeConfirmMessage", { templateName: r.value.name })), 1)]),
28022
28116
  _: 1
28023
28117
  }, 8, ["title", "confirm-btn"])) : I("", !0)], 64);
28024
28118
  };
28025
28119
  }
28026
- }), kI = {
28120
+ }), [["__scopeId", "data-v-d7fdb82f"]]), LI = {
28027
28121
  name: "builtin:panels",
28028
28122
  setup(e) {
28029
28123
  let t = e.store().panel, n = [
@@ -28036,7 +28130,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28036
28130
  }
28037
28131
  }),
28038
28132
  t.register({
28039
- component: OI,
28133
+ component: II,
28040
28134
  icon: "file",
28041
28135
  id: "pages",
28042
28136
  title: function() {
@@ -28044,7 +28138,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28044
28138
  }
28045
28139
  }),
28046
28140
  t.register({
28047
- component: sI,
28141
+ component: cI,
28048
28142
  icon: "layers",
28049
28143
  id: "layers",
28050
28144
  title: function() {
@@ -28069,10 +28163,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28069
28163
  e.commands.get(i.id) === i && (e.commands.unregister(i.id), r && e.commands.register(r));
28070
28164
  };
28071
28165
  }
28072
- }, AI = {
28166
+ }, RI = {
28073
28167
  key: 2,
28074
28168
  class: "text-ink-dim"
28075
- }, jI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28169
+ }, zI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28076
28170
  __name: "field-boolean",
28077
28171
  props: /*@__PURE__*/ tn({
28078
28172
  disabled: { type: Boolean },
@@ -28134,13 +28228,13 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28134
28228
  "model-value",
28135
28229
  "disabled",
28136
28230
  "aria-label"
28137
- ])), e.mixed ? I("", !0) : (H(), L("span", AI, W(i.value ? G(M)("designer.fieldBoolean.enabledLabel") : G(M)("designer.fieldBoolean.disabledLabel")), 1))], 512);
28231
+ ])), e.mixed ? I("", !0) : (H(), L("span", RI, W(i.value ? G(M)("designer.fieldBoolean.enabledLabel") : G(M)("designer.fieldBoolean.disabledLabel")), 1))], 512);
28138
28232
  };
28139
28233
  }
28140
- }), [["__scopeId", "data-v-e09fcb7f"]]), MI = { class: "flex min-w-0 items-center gap-1" }, NI = {
28234
+ }), [["__scopeId", "data-v-e09fcb7f"]]), BI = { class: "flex min-w-0 items-center gap-1" }, VI = {
28141
28235
  class: "field-color__swatch",
28142
28236
  "aria-hidden": "true"
28143
- }, PI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28237
+ }, HI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28144
28238
  __name: "field-color",
28145
28239
  props: /*@__PURE__*/ tn({
28146
28240
  allowNone: { type: Boolean },
@@ -28152,7 +28246,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28152
28246
  }),
28153
28247
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
28154
28248
  setup(e, { emit: t }) {
28155
- let n = e, r = vz(), { popupProps: i } = hM({ onVisibleChange: f }), a = ["monochrome"], o = t, s = Dn(e, "modelValue"), c = P(() => s.value || "#ffffff");
28249
+ let n = e, r = Ez(), { popupProps: i } = hM({ onVisibleChange: f }), a = ["monochrome"], o = t, s = Dn(e, "modelValue"), c = P(() => s.value || "#ffffff");
28156
28250
  function l(e) {
28157
28251
  s.value = String(e);
28158
28252
  }
@@ -28160,7 +28254,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28160
28254
  try {
28161
28255
  await navigator.clipboard.writeText(s.value || c.value);
28162
28256
  } catch (e) {
28163
- throw new rt(M("designer.fieldColor.copyFailedMessage"), {
28257
+ throw new nt(M("designer.fieldColor.copyFailedMessage"), {
28164
28258
  cause: e,
28165
28259
  code: "color.copy-failed"
28166
28260
  });
@@ -28178,7 +28272,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28178
28272
  }
28179
28273
  return (t, n) => {
28180
28274
  let r = sy, o = Zj;
28181
- return H(), L("div", MI, [
28275
+ return H(), L("div", BI, [
28182
28276
  z(o, {
28183
28277
  class: "shrink-0",
28184
28278
  "model-value": c.value,
@@ -28194,7 +28288,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28194
28288
  variant: "outline",
28195
28289
  "aria-label": G(M)("designer.canvasColorDialog.colorLabel")
28196
28290
  }, {
28197
- default: q(() => [R("span", NI, [R("span", {
28291
+ default: q(() => [R("span", VI, [R("span", {
28198
28292
  class: "field-color__fill",
28199
28293
  style: on({ backgroundColor: e.mixed ? void 0 : c.value })
28200
28294
  }, null, 4)])]),
@@ -28253,7 +28347,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28253
28347
  ]);
28254
28348
  };
28255
28349
  }
28256
- }), [["__scopeId", "data-v-26436bed"]]), FI = { class: "field-data-preview" }, II = { class: "field-data-preview__table" }, LI = { class: "field-data-preview__row field-data-preview__row--head" }, RI = ["title"], zI = ["title"], BI = 5, VI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28350
+ }), [["__scopeId", "data-v-26436bed"]]), UI = { class: "field-data-preview" }, WI = { class: "field-data-preview__table" }, GI = { class: "field-data-preview__row field-data-preview__row--head" }, KI = ["title"], qI = ["title"], JI = 5, YI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28257
28351
  __name: "field-data-preview",
28258
28352
  props: {
28259
28353
  bindings: {},
@@ -28261,42 +28355,42 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28261
28355
  modelValue: {},
28262
28356
  node: {}
28263
28357
  },
28264
- setup(t) {
28265
- let n = t, i = vz().store(), a = P(() => n.bindings?.rows), o = P(() => Array.isArray(n.columns) ? n.columns : []), s = P(() => {
28266
- let t = a.value;
28267
- if (!t) return null;
28268
- let n = lt(i.document.data), o = r(n), s = e(o, t);
28269
- return Array.isArray(s) ? s.slice(0, BI) : null;
28358
+ setup(e) {
28359
+ let n = e, r = Ez().store(), a = P(() => n.bindings?.rows), o = P(() => Array.isArray(n.columns) ? n.columns : []), s = P(() => {
28360
+ let e = a.value;
28361
+ if (!e) return null;
28362
+ let n = ct(r.document.data), o = i(n), s = t(o, e);
28363
+ return Array.isArray(s) ? s.slice(0, JI) : null;
28270
28364
  }), c = P(() => {
28271
- let t = a.value;
28272
- if (!t) return 0;
28273
- let n = lt(i.document.data), o = e(r(n), t);
28365
+ let e = a.value;
28366
+ if (!e) return 0;
28367
+ let n = ct(r.document.data), o = t(i(n), e);
28274
28368
  return Array.isArray(o) ? o.length : 0;
28275
28369
  });
28276
- function u(t, n, i) {
28277
- if (!i) return "";
28278
- let o = l(r({}), {
28370
+ function l(e, n, r) {
28371
+ if (!r) return "";
28372
+ let o = u(i({}), {
28279
28373
  collectionPath: a.value ?? "",
28280
28374
  index: n,
28281
- item: t
28282
- }), s = e(o, i);
28375
+ item: e
28376
+ }), s = t(o, r);
28283
28377
  return s == null ? "" : String(s);
28284
28378
  }
28285
- return (e, t) => (H(), L("div", FI, [a.value ? !s.value || s.value.length === 0 ? (H(), F(HN, {
28379
+ return (e, t) => (H(), L("div", UI, [a.value ? !s.value || s.value.length === 0 ? (H(), F(HN, {
28286
28380
  key: 1,
28287
28381
  text: G(M)("designer.fieldDataPreview.emptyTitle")
28288
- }, null, 8, ["text"])) : (H(), L(N, { key: 2 }, [R("div", II, [R("div", LI, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("span", {
28382
+ }, null, 8, ["text"])) : (H(), L(N, { key: 2 }, [R("div", WI, [R("div", GI, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("span", {
28289
28383
  key: t,
28290
28384
  class: "field-data-preview__cell",
28291
28385
  title: e.title
28292
- }, W(e.title || G(M)("designer.fieldDataPreview.unboundColumnHint")), 9, RI))), 128))]), (H(!0), L(N, null, gn(s.value, (e, t) => (H(), L("div", {
28386
+ }, W(e.title || G(M)("designer.fieldDataPreview.unboundColumnHint")), 9, KI))), 128))]), (H(!0), L(N, null, gn(s.value, (e, t) => (H(), L("div", {
28293
28387
  key: t,
28294
28388
  class: "field-data-preview__row"
28295
28389
  }, [(H(!0), L(N, null, gn(o.value, (n, r) => (H(), L("span", {
28296
28390
  key: r,
28297
28391
  class: "field-data-preview__cell",
28298
- title: u(e, t, n.bind)
28299
- }, W(u(e, t, n.bind)), 9, zI))), 128))]))), 128))]), z(HN, { text: G(M)("designer.fieldDataPreview.rowsLabel", {
28392
+ title: l(e, t, n.bind)
28393
+ }, W(l(e, t, n.bind)), 9, qI))), 128))]))), 128))]), z(HN, { text: G(M)("designer.fieldDataPreview.rowsLabel", {
28300
28394
  previewCount: s.value.length,
28301
28395
  rowCount: c.value
28302
28396
  }) }, null, 8, ["text"])], 64)) : (H(), F(HN, {
@@ -28304,10 +28398,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28304
28398
  text: G(M)("designer.fieldDataPreview.unboundTitle")
28305
28399
  }, null, 8, ["text"]))]));
28306
28400
  }
28307
- }), [["__scopeId", "data-v-541f8e52"]]), HI = { class: "flex flex-col gap-2" }, UI = { class: "field-image__source" }, WI = {
28401
+ }), [["__scopeId", "data-v-541f8e52"]]), XI = { class: "flex flex-col gap-2" }, ZI = { class: "field-image__source" }, QI = {
28308
28402
  key: 0,
28309
28403
  class: "flex h-20 items-center justify-center rounded-sm border border-edge bg-panel-3 p-1"
28310
- }, GI = ["src"], KI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28404
+ }, $I = ["src"], eL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28311
28405
  __name: "field-image",
28312
28406
  props: {
28313
28407
  modelValue: {},
@@ -28350,7 +28444,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28350
28444
  try {
28351
28445
  a = await qi(i, "dataUrl");
28352
28446
  } catch (e) {
28353
- throw new rt(M("designer.pageView.imageReadFailed", { fileName: i.name }), {
28447
+ throw new nt(M("designer.pageView.imageReadFailed", { fileName: i.name }), {
28354
28448
  cause: e,
28355
28449
  code: "image.read-failed"
28356
28450
  });
@@ -28362,8 +28456,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28362
28456
  }
28363
28457
  return (e, t) => {
28364
28458
  let n = jS;
28365
- return H(), L("div", HI, [
28366
- R("div", UI, [z(n, {
28459
+ return H(), L("div", XI, [
28460
+ R("div", ZI, [z(n, {
28367
28461
  modelValue: r.value,
28368
28462
  "onUpdate:modelValue": t[0] ||= (e) => r.value = e,
28369
28463
  class: "min-w-0 flex-1",
@@ -28374,10 +28468,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28374
28468
  actions: a.value,
28375
28469
  gap: 1
28376
28470
  }, null, 8, ["actions"])]),
28377
- r.value ? (H(), L("div", WI, [R("img", {
28471
+ r.value ? (H(), L("div", QI, [R("img", {
28378
28472
  src: r.value,
28379
28473
  class: "h-full w-full object-contain"
28380
- }, null, 8, GI)])) : I("", !0),
28474
+ }, null, 8, $I)])) : I("", !0),
28381
28475
  R("input", {
28382
28476
  ref_key: "fileRef",
28383
28477
  ref: i,
@@ -28389,10 +28483,10 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28389
28483
  ]);
28390
28484
  };
28391
28485
  }
28392
- }), [["__scopeId", "data-v-23c1c524"]]), qI = {
28486
+ }), [["__scopeId", "data-v-23c1c524"]]), tL = {
28393
28487
  key: 0,
28394
28488
  class: "field-borders field-borders--single"
28395
- }, JI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28489
+ }, nL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28396
28490
  __name: "field-table-borders",
28397
28491
  props: /*@__PURE__*/ tn({
28398
28492
  inheritable: { type: Boolean },
@@ -28403,7 +28497,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28403
28497
  }),
28404
28498
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
28405
28499
  setup(e, { emit: t }) {
28406
- let n = t, r = Dn(e, "modelValue"), i = ce(), a = P(() => [
28500
+ let n = t, r = Dn(e, "modelValue"), i = ae(), a = P(() => [
28407
28501
  {
28408
28502
  label: M("designer.fieldBorders.modeAllOption"),
28409
28503
  value: "all"
@@ -28424,7 +28518,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28424
28518
  label: M("designer.fieldBorders.modeNoneOption"),
28425
28519
  value: "none"
28426
28520
  }
28427
- ]), s = P(() => [
28521
+ ]), o = P(() => [
28428
28522
  {
28429
28523
  label: M("designer.fieldBorders.solidOption"),
28430
28524
  value: "solid"
@@ -28437,8 +28531,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28437
28531
  label: M("designer.fieldBorders.dottedOption"),
28438
28532
  value: "dotted"
28439
28533
  }
28440
- ]), c = D(), l = P(() => o(r.value) ? r.value : { ...c }), u = P(() => {
28441
- if (!o(r.value)) return {
28534
+ ]), c = D(), l = P(() => s(r.value) ? r.value : { ...c }), u = P(() => {
28535
+ if (!s(r.value)) return {
28442
28536
  inner: { ...c },
28443
28537
  mode: "all",
28444
28538
  outer: { ...c }
@@ -28497,20 +28591,20 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28497
28591
  }
28498
28592
  });
28499
28593
  }
28500
- return (t, o) => {
28594
+ return (t, s) => {
28501
28595
  let g = hC, _ = MT, v = fA;
28502
- return e.sideMode ? (H(), L("div", qI, [
28596
+ return e.sideMode ? (H(), L("div", tL, [
28503
28597
  z(fP, {
28504
28598
  class: "field-borders__row",
28505
28599
  label: G(M)("designer.fieldBorders.colorTitle"),
28506
28600
  "label-width": 56
28507
28601
  }, {
28508
- default: q(() => [z(PI, {
28602
+ default: q(() => [z(HI, {
28509
28603
  "model-value": l.value.color,
28510
28604
  "reset-value": G(c).color,
28511
28605
  "allow-none": "",
28512
- "onUpdate:modelValue": o[0] ||= (e) => p({ color: String(e) }),
28513
- onCommit: o[1] ||= (e) => n("commit")
28606
+ "onUpdate:modelValue": s[0] ||= (e) => p({ color: String(e) }),
28607
+ onCommit: s[1] ||= (e) => n("commit")
28514
28608
  }, null, 8, ["model-value", "reset-value"])]),
28515
28609
  _: 1
28516
28610
  }, 8, ["label"]),
@@ -28526,8 +28620,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28526
28620
  max: 3,
28527
28621
  step: .05,
28528
28622
  suffix: G(M)("elements.tableElement.distanceUnit"),
28529
- "onUpdate:modelValue": o[2] ||= (e) => p({ width: Number(e) || .2 }),
28530
- onBlur: o[3] ||= (e) => n("commit")
28623
+ "onUpdate:modelValue": s[2] ||= (e) => p({ width: Number(e) || .2 }),
28624
+ onBlur: s[3] ||= (e) => n("commit")
28531
28625
  }, null, 8, ["model-value", "suffix"])]),
28532
28626
  _: 1
28533
28627
  }, 8, ["label"]),
@@ -28538,9 +28632,9 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28538
28632
  }, {
28539
28633
  default: q(() => [z(_, {
28540
28634
  "model-value": l.value.style,
28541
- options: s.value,
28542
- "onUpdate:modelValue": o[4] ||= (e) => p({ style: String(e) }),
28543
- onChange: o[5] ||= (e) => n("commit")
28635
+ options: o.value,
28636
+ "onUpdate:modelValue": s[4] ||= (e) => p({ style: String(e) }),
28637
+ onChange: s[5] ||= (e) => n("commit")
28544
28638
  }, null, 8, ["model-value", "options"])]),
28545
28639
  _: 1
28546
28640
  }, 8, ["label"])
@@ -28555,7 +28649,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28555
28649
  default: q(() => [z(v, {
28556
28650
  "aria-label": G(M)("designer.elementWorkspace.inheritBorders"),
28557
28651
  "model-value": !r.value,
28558
- "onUpdate:modelValue": o[6] ||= (e) => f(e ? void 0 : u.value)
28652
+ "onUpdate:modelValue": s[6] ||= (e) => f(e ? void 0 : u.value)
28559
28653
  }, null, 8, ["aria-label", "model-value"])]),
28560
28654
  _: 1
28561
28655
  }, 8, ["label"])) : I("", !0), !e.inheritable || r.value ? (H(), L(N, { key: 1 }, [
@@ -28567,8 +28661,8 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28567
28661
  default: q(() => [z(_, {
28568
28662
  "model-value": u.value.mode,
28569
28663
  options: a.value,
28570
- "onUpdate:modelValue": o[7] ||= (e) => m({ mode: String(e) }),
28571
- onChange: o[8] ||= (e) => n("commit")
28664
+ "onUpdate:modelValue": s[7] ||= (e) => m({ mode: String(e) }),
28665
+ onChange: s[8] ||= (e) => n("commit")
28572
28666
  }, null, 8, ["model-value", "options"])]),
28573
28667
  _: 1
28574
28668
  }, 8, ["label", "label-width"]),
@@ -28582,14 +28676,14 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28582
28676
  label: G(M)("designer.fieldBorders.colorTitle"),
28583
28677
  "label-width": 56
28584
28678
  }, {
28585
- default: q(() => [z(PI, {
28679
+ default: q(() => [z(HI, {
28586
28680
  "model-value": u.value.outer.color,
28587
28681
  "reset-value": G(c).color,
28588
- "onUpdate:modelValue": o[9] ||= (e) => m({ outer: {
28682
+ "onUpdate:modelValue": s[9] ||= (e) => m({ outer: {
28589
28683
  ...u.value.outer,
28590
28684
  color: String(e)
28591
28685
  } }),
28592
- onCommit: o[10] ||= (e) => n("commit")
28686
+ onCommit: s[10] ||= (e) => n("commit")
28593
28687
  }, null, 8, ["model-value", "reset-value"])]),
28594
28688
  _: 1
28595
28689
  }, 8, ["label"]),
@@ -28605,11 +28699,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28605
28699
  max: 3,
28606
28700
  step: .05,
28607
28701
  suffix: G(M)("elements.tableElement.distanceUnit"),
28608
- "onUpdate:modelValue": o[11] ||= (e) => m({ outer: {
28702
+ "onUpdate:modelValue": s[11] ||= (e) => m({ outer: {
28609
28703
  ...u.value.outer,
28610
28704
  width: Number(e) || .2
28611
28705
  } }),
28612
- onBlur: o[12] ||= (e) => n("commit")
28706
+ onBlur: s[12] ||= (e) => n("commit")
28613
28707
  }, null, 8, ["model-value", "suffix"])]),
28614
28708
  _: 1
28615
28709
  }, 8, ["label"]),
@@ -28620,12 +28714,12 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28620
28714
  }, {
28621
28715
  default: q(() => [z(_, {
28622
28716
  "model-value": u.value.outer.style,
28623
- options: s.value,
28624
- "onUpdate:modelValue": o[13] ||= (e) => m({ outer: {
28717
+ options: o.value,
28718
+ "onUpdate:modelValue": s[13] ||= (e) => m({ outer: {
28625
28719
  ...u.value.outer,
28626
28720
  style: String(e)
28627
28721
  } }),
28628
- onChange: o[14] ||= (e) => n("commit")
28722
+ onChange: s[14] ||= (e) => n("commit")
28629
28723
  }, null, 8, ["model-value", "options"])]),
28630
28724
  _: 1
28631
28725
  }, 8, ["label"])
@@ -28642,15 +28736,15 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28642
28736
  label: G(M)("designer.fieldBorders.colorTitle"),
28643
28737
  "label-width": 56
28644
28738
  }, {
28645
- default: q(() => [z(PI, {
28739
+ default: q(() => [z(HI, {
28646
28740
  "model-value": u.value.inner.color,
28647
28741
  "reset-value": G(c).color,
28648
28742
  "allow-none": "",
28649
- "onUpdate:modelValue": o[15] ||= (e) => m({ inner: {
28743
+ "onUpdate:modelValue": s[15] ||= (e) => m({ inner: {
28650
28744
  ...u.value.inner,
28651
28745
  color: String(e)
28652
28746
  } }),
28653
- onCommit: o[16] ||= (e) => n("commit")
28747
+ onCommit: s[16] ||= (e) => n("commit")
28654
28748
  }, null, 8, ["model-value", "reset-value"])]),
28655
28749
  _: 1
28656
28750
  }, 8, ["label"]),
@@ -28666,11 +28760,11 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28666
28760
  max: 3,
28667
28761
  step: .05,
28668
28762
  suffix: G(M)("elements.tableElement.distanceUnit"),
28669
- "onUpdate:modelValue": o[17] ||= (e) => m({ inner: {
28763
+ "onUpdate:modelValue": s[17] ||= (e) => m({ inner: {
28670
28764
  ...u.value.inner,
28671
28765
  width: Number(e) || .2
28672
28766
  } }),
28673
- onBlur: o[18] ||= (e) => n("commit")
28767
+ onBlur: s[18] ||= (e) => n("commit")
28674
28768
  }, null, 8, ["model-value", "suffix"])]),
28675
28769
  _: 1
28676
28770
  }, 8, ["label"]),
@@ -28681,12 +28775,12 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28681
28775
  }, {
28682
28776
  default: q(() => [z(_, {
28683
28777
  "model-value": u.value.inner.style,
28684
- options: s.value,
28685
- "onUpdate:modelValue": o[19] ||= (e) => m({ inner: {
28778
+ options: o.value,
28779
+ "onUpdate:modelValue": s[19] ||= (e) => m({ inner: {
28686
28780
  ...u.value.inner,
28687
28781
  style: String(e)
28688
28782
  } }),
28689
- onChange: o[20] ||= (e) => n("commit")
28783
+ onChange: s[20] ||= (e) => n("commit")
28690
28784
  }, null, 8, ["model-value", "options"])]),
28691
28785
  _: 1
28692
28786
  }, 8, ["label"])
@@ -28704,12 +28798,12 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28704
28798
  label: G(M)("designer.fieldBorders.colorTitle"),
28705
28799
  "label-width": 56
28706
28800
  }, {
28707
- default: q(() => [z(PI, {
28801
+ default: q(() => [z(HI, {
28708
28802
  "model-value": u.value[e.key]?.color ?? u.value.outer.color,
28709
28803
  "reset-value": u.value.outer.color,
28710
28804
  "allow-none": "",
28711
28805
  "onUpdate:modelValue": (t) => h(e.key, { color: String(t) }),
28712
- onCommit: o[21] ||= (e) => n("commit")
28806
+ onCommit: s[21] ||= (e) => n("commit")
28713
28807
  }, null, 8, [
28714
28808
  "model-value",
28715
28809
  "reset-value",
@@ -28730,7 +28824,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28730
28824
  step: .05,
28731
28825
  suffix: G(M)("elements.tableElement.distanceUnit"),
28732
28826
  "onUpdate:modelValue": (t) => h(e.key, { width: Number(t) || .2 }),
28733
- onBlur: o[22] ||= (e) => n("commit")
28827
+ onBlur: s[22] ||= (e) => n("commit")
28734
28828
  }, null, 8, [
28735
28829
  "model-value",
28736
28830
  "suffix",
@@ -28745,9 +28839,9 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28745
28839
  }, {
28746
28840
  default: q(() => [z(_, {
28747
28841
  "model-value": u.value[e.key]?.style ?? u.value.outer.style,
28748
- options: s.value,
28842
+ options: o.value,
28749
28843
  "onUpdate:modelValue": (t) => h(e.key, { style: String(t) }),
28750
- onChange: o[23] ||= (e) => n("commit")
28844
+ onChange: s[23] ||= (e) => n("commit")
28751
28845
  }, null, 8, [
28752
28846
  "model-value",
28753
28847
  "options",
@@ -28761,7 +28855,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28761
28855
  ], 64)) : I("", !0)], 2));
28762
28856
  };
28763
28857
  }
28764
- }), [["__scopeId", "data-v-d84f9db1"]]), YI = { class: "continuation-layout" }, XI = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28858
+ }), [["__scopeId", "data-v-d84f9db1"]]), rL = { class: "continuation-layout" }, iL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
28765
28859
  __name: "field-table-continuation-layout",
28766
28860
  props: {
28767
28861
  modelValue: {},
@@ -28770,7 +28864,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28770
28864
  },
28771
28865
  emits: ["update:modelValue"],
28772
28866
  setup(e) {
28773
- let t = e, n = vz(), r = n.store(), i = P(() => r.template.get(t.modelValue?.templateId ?? "")), a = P(() => {
28867
+ let t = e, n = Ez(), r = n.store(), i = P(() => r.template.get(t.modelValue?.templateId ?? "")), a = P(() => {
28774
28868
  let e = i.value;
28775
28869
  if (!e) return "";
28776
28870
  let n = e.page.elements.find((e) => e.id === t.modelValue?.elementId);
@@ -28784,7 +28878,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28784
28878
  }
28785
28879
  return (e, t) => {
28786
28880
  let n = sy;
28787
- return H(), L("div", YI, [z(n, {
28881
+ return H(), L("div", rL, [z(n, {
28788
28882
  size: "small",
28789
28883
  variant: "outline",
28790
28884
  disabled: !i.value,
@@ -28803,7 +28897,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28803
28897
  }, null, 8, ["text"]))]);
28804
28898
  };
28805
28899
  }
28806
- }), [["__scopeId", "data-v-2567153b"]]), ZI = { class: "flex flex-col gap-1" }, QI = { class: "min-w-0 truncate" }, $I = /* @__PURE__ */ B({
28900
+ }), [["__scopeId", "data-v-2567153b"]]), aL = { class: "flex flex-col gap-1" }, oL = { class: "min-w-0 truncate" }, sL = /* @__PURE__ */ B({
28807
28901
  __name: "collection-picker-field",
28808
28902
  props: {
28809
28903
  modelValue: {},
@@ -28814,7 +28908,7 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28814
28908
  let t = Dn(e, "modelValue");
28815
28909
  return (e, n) => {
28816
28910
  let r = sy;
28817
- return H(), L("div", ZI, [z(r, {
28911
+ return H(), L("div", aL, [z(r, {
28818
28912
  variant: "outline",
28819
28913
  block: "",
28820
28914
  type: "button",
@@ -28826,17 +28920,17 @@ var ZF = { class: "text-[10px] text-ink-dim/70" }, QF = { class: "flex items-cen
28826
28920
  default: q(() => [t.value ? (H(), L(N, { key: 0 }, [z($, {
28827
28921
  name: "link",
28828
28922
  class: "mr-1 inline h-3 w-3 shrink-0 text-accent"
28829
- }), R("span", QI, W(t.value), 1)], 64)) : (H(), L(N, { key: 1 }, [Wt(W(G(M)("designer.collectionPickerField.unboundPlaceholder")), 1)], 64))]),
28923
+ }), R("span", oL, W(t.value), 1)], 64)) : (H(), L(N, { key: 1 }, [Wt(W(G(M)("designer.collectionPickerField.unboundPlaceholder")), 1)], 64))]),
28830
28924
  _: 1
28831
28925
  }, 8, ["theme", "title"])]);
28832
28926
  };
28833
28927
  }
28834
28928
  });
28835
28929
  // src/elements/table/table-structure.ts
28836
- function eL(e) {
28930
+ function cL(e) {
28837
28931
  return e.headerRows?.length ? e.headerRows : [e.columns.map((e) => e.title)];
28838
28932
  }
28839
- function tL(e, t) {
28933
+ function lL(e, t) {
28840
28934
  let n = [];
28841
28935
  for (let r of e) {
28842
28936
  let e = t.flatMap((e, t) => e >= r.col && e < r.col + r.colspan ? [t] : []);
@@ -28848,8 +28942,8 @@ function tL(e, t) {
28848
28942
  }
28849
28943
  return n;
28850
28944
  }
28851
- function nL(e, t, n) {
28852
- let r = tL(e.headerMerges ?? [], t), i = tL(e.merges ?? [], t);
28945
+ function uL(e, t, n) {
28946
+ let r = lL(e.headerMerges ?? [], t), i = lL(e.merges ?? [], t);
28853
28947
  if (!r || !i) return null;
28854
28948
  let a = t.map((t) => {
28855
28949
  let r = e.columns[t] ?? n;
@@ -28884,7 +28978,7 @@ function nL(e, t, n) {
28884
28978
  }
28885
28979
  };
28886
28980
  }
28887
- function rL(e, t, n) {
28981
+ function dL(e, t, n) {
28888
28982
  let r = Math.min(e.col, t.col), i = Math.max(e.col, t.col) + 1, a = Math.min(e.row, t.row), o = Math.max(e.row, t.row) + 1, s = !0;
28889
28983
  for (; s;) {
28890
28984
  s = !1;
@@ -28906,7 +29000,7 @@ function rL(e, t, n) {
28906
29000
  rowspan: o - a
28907
29001
  };
28908
29002
  }
28909
- function iL(e, t, n, r) {
29003
+ function fL(e, t, n, r) {
28910
29004
  let i = n + 1, a = t[n] + t[i], o = e[n], s = e[i];
28911
29005
  if (!o || !s || !Number.isFinite(a)) return e;
28912
29006
  let c = Math.max(.2, o.minWidthMm ?? 0, a - (s.maxWidthMm || a)), l = Math.min(a - Math.max(.2, s.minWidthMm ?? 0), o.maxWidthMm || a);
@@ -28916,46 +29010,46 @@ function iL(e, t, n, r) {
28916
29010
  let o = t[r];
28917
29011
  return r === n ? o = u : r === i && (o = a - u), {
28918
29012
  ...e,
28919
- width: _e(o, 2),
29013
+ width: me(o, 2),
28920
29014
  widthMode: "fixed"
28921
29015
  };
28922
29016
  });
28923
29017
  }
28924
29018
  // src/designer/services/text-input.ts
28925
- var aL = /* @__PURE__ */ new WeakMap();
28926
- function oL(e) {
28927
- return aL.set(e.element, e), () => {
28928
- aL.get(e.element) === e && aL.delete(e.element);
29019
+ var pL = /* @__PURE__ */ new WeakMap();
29020
+ function mL(e) {
29021
+ return pL.set(e.element, e), () => {
29022
+ pL.get(e.element) === e && pL.delete(e.element);
28929
29023
  };
28930
29024
  }
28931
29025
  // src/designer/components/variable-text/use-variable-text-editor.ts
28932
- var sL = String.fromCodePoint(8203);
28933
- function cL(e) {
29026
+ var hL = String.fromCodePoint(8203);
29027
+ function gL(e) {
28934
29028
  return e instanceof HTMLElement && e.dataset.expression !== void 0;
28935
29029
  }
28936
- function lL(e) {
28937
- return e?.nodeType === Node.TEXT_NODE && (e.textContent ?? "").replaceAll(sL, "") === "";
29030
+ function _L(e) {
29031
+ return e?.nodeType === Node.TEXT_NODE && (e.textContent ?? "").replaceAll(hL, "") === "";
28938
29032
  }
28939
- function uL(e, t) {
28940
- if (e.nodeType === Node.TEXT_NODE) return (e.textContent ?? "").replaceAll(sL, "");
29033
+ function vL(e, t) {
29034
+ if (e.nodeType === Node.TEXT_NODE) return (e.textContent ?? "").replaceAll(hL, "");
28941
29035
  if (!(e instanceof HTMLElement)) return "";
28942
29036
  if (e.dataset.expression !== void 0) return e.dataset.expression;
28943
29037
  if (e.dataset.sentinel !== void 0) return "";
28944
29038
  if (e.tagName === "BR") return "\n";
28945
- let n = dL(e.childNodes);
29039
+ let n = yL(e.childNodes);
28946
29040
  return (e.tagName === "DIV" || e.tagName === "P") && !t ? `\n${n}` : n;
28947
29041
  }
28948
- function dL(e) {
28949
- return [...e].map((e, t) => uL(e, t === 0)).join("");
29042
+ function yL(e) {
29043
+ return [...e].map((e, t) => vL(e, t === 0)).join("");
28950
29044
  }
28951
- function fL(e) {
29045
+ function bL(e) {
28952
29046
  let t = null;
28953
29047
  function n() {
28954
29048
  return e.root.value;
28955
29049
  }
28956
29050
  function r() {
28957
29051
  let e = n();
28958
- return e ? dL(e.childNodes) : "";
29052
+ return e ? yL(e.childNodes) : "";
28959
29053
  }
28960
29054
  function i(t, n) {
28961
29055
  let r = Oa(n.replace(/^\{\{|\}\}$/g, "")), i = e.describe(r);
@@ -28974,8 +29068,8 @@ function fL(e) {
28974
29068
  e.querySelectorAll("[data-sentinel]").forEach((e) => {
28975
29069
  e.remove();
28976
29070
  });
28977
- for (let t of [...e.childNodes]) cL(t) && t.previousSibling?.nodeType !== Node.TEXT_NODE && e.insertBefore(document.createTextNode(sL), t);
28978
- if (cL(e.lastChild) && e.append(document.createTextNode(sL)), r().endsWith("\n")) {
29071
+ for (let t of [...e.childNodes]) gL(t) && t.previousSibling?.nodeType !== Node.TEXT_NODE && e.insertBefore(document.createTextNode(hL), t);
29072
+ if (gL(e.lastChild) && e.append(document.createTextNode(hL)), r().endsWith("\n")) {
28979
29073
  let t = document.createElement("br");
28980
29074
  t.dataset.sentinel = "", e.append(t);
28981
29075
  }
@@ -29069,11 +29163,11 @@ function fL(e) {
29069
29163
  let i;
29070
29164
  if (n.nodeType === Node.TEXT_NODE) {
29071
29165
  let t = n.textContent ?? "";
29072
- if ((e === "backward" ? t.slice(0, r) : t.slice(r)).replaceAll(sL, "") !== "") return null;
29166
+ if ((e === "backward" ? t.slice(0, r) : t.slice(r)).replaceAll(hL, "") !== "") return null;
29073
29167
  i = e === "backward" ? n.previousSibling : n.nextSibling;
29074
29168
  } else i = e === "backward" ? n.childNodes[r - 1] : n.childNodes[r];
29075
- for (; lL(i);) i = e === "backward" ? i?.previousSibling : i?.nextSibling;
29076
- return cL(i) ? i : null;
29169
+ for (; _L(i);) i = e === "backward" ? i?.previousSibling : i?.nextSibling;
29170
+ return gL(i) ? i : null;
29077
29171
  }
29078
29172
  function w(e, t) {
29079
29173
  let n = C(e);
@@ -29084,7 +29178,7 @@ function fL(e) {
29084
29178
  }
29085
29179
  function E() {
29086
29180
  let e = document.getSelection();
29087
- return !e || e.rangeCount === 0 ? "" : dL(e.getRangeAt(0).cloneContents().childNodes);
29181
+ return !e || e.rangeCount === 0 ? "" : yL(e.getRangeAt(0).cloneContents().childNodes);
29088
29182
  }
29089
29183
  function D(e) {
29090
29184
  let t = E();
@@ -29122,13 +29216,13 @@ function fL(e) {
29122
29216
  };
29123
29217
  }
29124
29218
  // src/designer/components/variable-text/variable-formatter-editor.vue?vue&type=script&setup=true&lang.ts
29125
- var pL = {
29219
+ var xL = {
29126
29220
  class: "variable-formatter",
29127
29221
  role: "dialog"
29128
- }, mL = { class: "variable-formatter__heading" }, hL = { class: "min-w-0 truncate" }, gL = {
29222
+ }, SL = { class: "variable-formatter__heading" }, CL = { class: "min-w-0 truncate" }, wL = {
29129
29223
  key: 0,
29130
29224
  class: "variable-formatter__type"
29131
- }, _L = { class: "variable-formatter__path" }, vL = { class: "variable-formatter__actions" }, yL = "", bL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29225
+ }, TL = { class: "variable-formatter__path" }, EL = { class: "variable-formatter__actions" }, DL = "", OL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29132
29226
  __name: "variable-formatter-editor",
29133
29227
  props: {
29134
29228
  field: {},
@@ -29147,17 +29241,17 @@ var pL = {
29147
29241
  }));
29148
29242
  return [{
29149
29243
  label: M("designer.variableText.originalFormat"),
29150
- value: yL
29244
+ value: DL
29151
29245
  }, ...e];
29152
29246
  }), s = P(() => n.variable.formatter ? Ma.get(n.variable.formatter) : void 0), c = P(() => {
29153
29247
  let e = n.variable.formatter;
29154
29248
  return !!e && !Na(e ?? "", n.field?.type);
29155
- }), l = P(() => c.value ? void 0 : n.variable.formatter ?? yL), u = P(() => {
29249
+ }), l = P(() => c.value ? void 0 : n.variable.formatter ?? DL), u = P(() => {
29156
29250
  let e = s.value;
29157
29251
  return e ? Pa(e, n.variable.args) : [];
29158
29252
  });
29159
29253
  function d(e) {
29160
- let t = String(e ?? yL), i = Ma.get(t);
29254
+ let t = String(e ?? DL), i = Ma.get(t);
29161
29255
  !t || !i ? r("update:variable", {
29162
29256
  args: [],
29163
29257
  path: n.variable.path
@@ -29185,16 +29279,16 @@ var pL = {
29185
29279
  }
29186
29280
  return (t, n) => {
29187
29281
  let m = MT, h = hC, g = sy;
29188
- return H(), L("div", pL, [
29189
- R("div", mL, [
29282
+ return H(), L("div", xL, [
29283
+ R("div", SL, [
29190
29284
  z($, {
29191
29285
  name: "link",
29192
29286
  class: "h-3.5 w-3.5 text-accent"
29193
29287
  }),
29194
- R("strong", hL, W(e.field?.label ?? e.variable.path), 1),
29195
- e.field?.type ? (H(), L("span", gL, W(G(M)(`designer.fieldTree.${e.field.type}`)), 1)) : I("", !0)
29288
+ R("strong", CL, W(e.field?.label ?? e.variable.path), 1),
29289
+ e.field?.type ? (H(), L("span", wL, W(G(M)(`designer.fieldTree.${e.field.type}`)), 1)) : I("", !0)
29196
29290
  ]),
29197
- R("code", _L, W(e.variable.path), 1),
29291
+ R("code", TL, W(e.variable.path), 1),
29198
29292
  z(fP, {
29199
29293
  label: G(M)("designer.variableText.formatterLabel"),
29200
29294
  stacked: ""
@@ -29262,7 +29356,7 @@ var pL = {
29262
29356
  ]))]),
29263
29357
  _: 2
29264
29358
  }, 1032, ["label"]))), 128)) : I("", !0),
29265
- R("div", vL, [z(g, {
29359
+ R("div", EL, [z(g, {
29266
29360
  theme: "danger",
29267
29361
  variant: "outline",
29268
29362
  size: "small",
@@ -29285,7 +29379,7 @@ var pL = {
29285
29379
  ]);
29286
29380
  };
29287
29381
  }
29288
- }), [["__scopeId", "data-v-4c47ca89"]]), xL = [
29382
+ }), [["__scopeId", "data-v-4c47ca89"]]), kL = [
29289
29383
  "contenteditable",
29290
29384
  "aria-label",
29291
29385
  "aria-multiline",
@@ -29294,7 +29388,7 @@ var pL = {
29294
29388
  "data-empty",
29295
29389
  "data-placeholder",
29296
29390
  "title"
29297
- ], SL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29391
+ ], AL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29298
29392
  __name: "variable-text-field",
29299
29393
  props: /*@__PURE__*/ tn({
29300
29394
  ariaLabel: {},
@@ -29316,10 +29410,10 @@ var pL = {
29316
29410
  "leave"
29317
29411
  ], ["update:modelValue"]),
29318
29412
  setup(e, { expose: t, emit: n }) {
29319
- let r = e, i = n, a = Dn(e, "modelValue"), o = za(() => r.relativeTo), s = vz().store(), c = U(), l = U(), u = U(), d = U(!1), f = Sn(null), p = U(null), m = U({}), { popupProps: h } = hM({}, "popup", () => f.value !== null), g = P(() => !r.disabled && !r.readonly), _ = P(() => {
29413
+ let r = e, i = n, a = Dn(e, "modelValue"), o = za(() => r.relativeTo), s = Ez().store(), c = U(), l = U(), u = U(), d = U(!1), f = Sn(null), p = U(null), m = U({}), { popupProps: h } = hM({}, "popup", () => f.value !== null), g = P(() => !r.disabled && !r.readonly), _ = P(() => {
29320
29414
  let e = p.value;
29321
29415
  if (e) return o.resolveField(e.path);
29322
- }), v = fL({
29416
+ }), v = bL({
29323
29417
  describe: o.describe,
29324
29418
  editable: () => g.value,
29325
29419
  getValue: () => a.value ?? "",
@@ -29419,11 +29513,11 @@ var pL = {
29419
29513
  }), K(() => a.value, v.syncFromValue), K(() => [
29420
29514
  s.dataSource.list,
29421
29515
  r.relativeTo,
29422
- ut.global.locale.value
29516
+ lt.global.locale.value
29423
29517
  ], () => {
29424
29518
  v.refreshChips();
29425
29519
  }, { deep: !0 }), cn(() => {
29426
- v.syncFromValue(), c.value && (y = oL({
29520
+ v.syncFromValue(), c.value && (y = mL({
29427
29521
  editable: () => g.value,
29428
29522
  element: c.value,
29429
29523
  multiline: () => !!r.multiline,
@@ -29467,7 +29561,7 @@ var pL = {
29467
29561
  onCut: n[2] ||= (...e) => G(v).onCut && G(v).onCut(...e),
29468
29562
  onInput: T,
29469
29563
  onPaste: n[3] ||= (...e) => G(v).onPaste && G(v).onPaste(...e)
29470
- }, null, 40, xL),
29564
+ }, null, 40, kL),
29471
29565
  g.value ? (H(), L("div", {
29472
29566
  key: 0,
29473
29567
  class: "variable-text__actions",
@@ -29497,7 +29591,7 @@ var pL = {
29497
29591
  content: q(() => [R("div", {
29498
29592
  ref_key: "formatterRef",
29499
29593
  ref: u
29500
- }, [p.value ? (H(), F(bL, {
29594
+ }, [p.value ? (H(), F(OL, {
29501
29595
  key: 0,
29502
29596
  variable: p.value,
29503
29597
  field: _.value,
@@ -29528,11 +29622,11 @@ var pL = {
29528
29622
  ], 34);
29529
29623
  };
29530
29624
  }
29531
- }), [["__scopeId", "data-v-fbc139e6"]]), CL = { class: "field-table__merge-rules" }, wL = { class: "field-table__merge-toolbar" }, TL = [
29625
+ }), [["__scopeId", "data-v-fbc139e6"]]), jL = { class: "field-table__merge-rules" }, ML = { class: "field-table__merge-toolbar" }, NL = [
29532
29626
  "aria-expanded",
29533
29627
  "aria-controls",
29534
29628
  "onClick"
29535
- ], EL = { class: "field-table__merge-title" }, DL = ["title"], OL = ["id"], kL = { class: "field-table__merge-fields" }, AL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29629
+ ], PL = { class: "field-table__merge-title" }, FL = ["title"], IL = ["id"], LL = { class: "field-table__merge-fields" }, RL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29536
29630
  __name: "field-table-merge-rules",
29537
29631
  props: {
29538
29632
  bindings: {},
@@ -29540,7 +29634,7 @@ var pL = {
29540
29634
  },
29541
29635
  emits: ["commit", "update:propsObject"],
29542
29636
  setup(e, { emit: t }) {
29543
- let n = e, r = t, i = vz().store(), a = En(), o = U([]), s = U([]), c = U([]), l = U(null), u = U(null), d = P(() => n.propsObject.columns ?? []), f = P(() => n.bindings?.rows);
29637
+ let n = e, r = t, i = Ez().store(), a = En(), o = U([]), s = U([]), c = U([]), l = U(null), u = U(null), d = P(() => n.propsObject.columns ?? []), f = P(() => n.bindings?.rows);
29544
29638
  function p() {
29545
29639
  o.value = T(n.propsObject.mergeRules), s.value = o.value.map((e) => e.columns.map((e) => e + 1).join(",")), c.value = o.value.map((e) => (e.fields ?? []).join(",")), l.value !== null && l.value >= o.value.length && (l.value = null);
29546
29640
  }
@@ -29605,10 +29699,10 @@ var pL = {
29605
29699
  default: q(() => [Wt(" " + W(G(M)("elements.tableElement.mergeAddLabel")), 1)]),
29606
29700
  _: 1
29607
29701
  })]),
29608
- default: q(() => [R("div", CL, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("div", {
29702
+ default: q(() => [R("div", jL, [(H(!0), L(N, null, gn(o.value, (e, t) => (H(), L("div", {
29609
29703
  key: t,
29610
29704
  class: "field-table__merge-rule"
29611
- }, [R("div", wL, [R("button", {
29705
+ }, [R("div", ML, [R("button", {
29612
29706
  type: "button",
29613
29707
  class: "field-table__merge-toggle",
29614
29708
  "aria-expanded": l.value === t,
@@ -29619,12 +29713,12 @@ var pL = {
29619
29713
  name: l.value === t ? "chevron-down" : "chevron-right",
29620
29714
  class: "h-3.5 w-3.5 shrink-0"
29621
29715
  }, null, 8, ["name"]),
29622
- R("span", EL, W(G(M)("elements.tableElement.mergeRuleTitle", { number: t + 1 })), 1),
29716
+ R("span", PL, W(G(M)("elements.tableElement.mergeRuleTitle", { number: t + 1 })), 1),
29623
29717
  R("span", {
29624
29718
  class: "field-table__merge-summary",
29625
29719
  title: v(e)
29626
- }, W(v(e)), 9, DL)
29627
- ], 8, TL), z(n, {
29720
+ }, W(v(e)), 9, FL)
29721
+ ], 8, NL), z(n, {
29628
29722
  class: "field-table__merge-remove",
29629
29723
  variant: "text",
29630
29724
  theme: "danger",
@@ -29645,7 +29739,7 @@ var pL = {
29645
29739
  ])]), Mn(R("div", {
29646
29740
  id: `${G(a)}-${t}`,
29647
29741
  class: "field-table__merge-content"
29648
- }, [R("div", kL, [z(fP, {
29742
+ }, [R("div", LL, [z(fP, {
29649
29743
  stacked: "",
29650
29744
  label: G(M)("elements.tableElement.mergeColumnsLabel"),
29651
29745
  help: G(M)("elements.tableElement.mergeColumnsHelp")
@@ -29701,7 +29795,7 @@ var pL = {
29701
29795
  }, 1032, ["label", "help"])]), z(HN, {
29702
29796
  variant: "accent",
29703
29797
  text: G(M)("elements.tableElement.mergeFieldsWarning")
29704
- }, null, 8, ["text"])], 8, OL), [[kn, l.value === t]])]))), 128))]), u.value === null ? I("", !0) : (H(), F(cF, {
29798
+ }, null, 8, ["text"])], 8, IL), [[kn, l.value === t]])]))), 128))]), u.value === null ? I("", !0) : (H(), F(cF, {
29705
29799
  key: 0,
29706
29800
  sources: G(i).dataSource.list,
29707
29801
  mode: "field",
@@ -29718,7 +29812,7 @@ var pL = {
29718
29812
  }, 8, ["title", "hint"]);
29719
29813
  };
29720
29814
  }
29721
- }), [["__scopeId", "data-v-658a10b2"]]), jL = { class: "table-cell-style" }, ML = { class: "table-cell-style__fields" }, NL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29815
+ }), [["__scopeId", "data-v-658a10b2"]]), zL = { class: "table-cell-style" }, BL = { class: "table-cell-style__fields" }, VL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
29722
29816
  __name: "field-table-cell-style",
29723
29817
  props: {
29724
29818
  modelValue: {},
@@ -29745,7 +29839,7 @@ var pL = {
29745
29839
  }
29746
29840
  return (e, t) => {
29747
29841
  let r = hC, s = MT, c = fA, l = sy;
29748
- return H(), L("details", jL, [R("summary", null, W(G(M)("designer.elementWorkspace.cellStyleSummary", { inheritance: G(M)(n.value ? "designer.elementWorkspace.customize" : "designer.elementWorkspace.inherit") })), 1), R("div", ML, [
29842
+ return H(), L("details", zL, [R("summary", null, W(G(M)("designer.elementWorkspace.cellStyleSummary", { inheritance: G(M)(n.value ? "designer.elementWorkspace.customize" : "designer.elementWorkspace.inherit") })), 1), R("div", BL, [
29749
29843
  z(fP, {
29750
29844
  label: G(M)("elements.tableElement.fontSizeLabel"),
29751
29845
  stacked: ""
@@ -29775,7 +29869,7 @@ var pL = {
29775
29869
  label: G(M)("elements.tableElement.summaryColorLabel"),
29776
29870
  stacked: ""
29777
29871
  }, {
29778
- default: q(() => [z(PI, {
29872
+ default: q(() => [z(HI, {
29779
29873
  "model-value": n.value?.color,
29780
29874
  "onUpdate:modelValue": t[2] ||= (e) => a({ color: String(e) })
29781
29875
  }, null, 8, ["model-value"])]),
@@ -29785,7 +29879,7 @@ var pL = {
29785
29879
  label: G(M)("elements.tableElement.summaryBackgroundLabel"),
29786
29880
  stacked: ""
29787
29881
  }, {
29788
- default: q(() => [z(PI, {
29882
+ default: q(() => [z(HI, {
29789
29883
  "model-value": n.value?.background,
29790
29884
  "allow-none": "",
29791
29885
  "onUpdate:modelValue": t[3] ||= (e) => a({ background: String(e) })
@@ -29812,11 +29906,11 @@ var pL = {
29812
29906
  ])]);
29813
29907
  };
29814
29908
  }
29815
- }), [["__scopeId", "data-v-5008fa97"]]), PL = /* @__PURE__ */ new WeakMap();
29816
- function FL(e) {
29909
+ }), [["__scopeId", "data-v-5008fa97"]]), HL = /* @__PURE__ */ new WeakMap();
29910
+ function UL(e) {
29817
29911
  let { pointerId: t, startPoint: n, target: r } = e, i = e.threshold ?? 0, a = !1, o = !1, s = e.tag ?? "unknown", c = e.startClient ?? n, l = r, u;
29818
- for (; l && !u;) u = PL.get(l), l = l.parentElement;
29819
- let d = u?.events ?? Te();
29912
+ for (; l && !u;) u = HL.get(l), l = l.parentElement;
29913
+ let d = u?.events ?? De();
29820
29914
  try {
29821
29915
  r.setPointerCapture?.(t);
29822
29916
  } catch {}
@@ -29862,8 +29956,8 @@ function FL(e) {
29862
29956
  return u?.handles.add(v), v;
29863
29957
  }
29864
29958
  // src/designer/components/fields/use-table-selection.ts
29865
- function IL(e) {
29866
- let t = U(null), n = U(null), r, i = P(() => !t.value || !n.value || n.value.row >= e.rows.value.length || n.value.col >= e.columnCount.value ? null : rL(t.value, n.value, e.merges.value));
29959
+ function WL(e) {
29960
+ let t = U(null), n = U(null), r, i = P(() => !t.value || !n.value || n.value.row >= e.rows.value.length || n.value.col >= e.columnCount.value ? null : dL(t.value, n.value, e.merges.value));
29867
29961
  function a() {
29868
29962
  r?.(), r = void 0, t.value = null, n.value = null;
29869
29963
  }
@@ -29887,7 +29981,7 @@ function IL(e) {
29887
29981
  if (t.button !== 0) return;
29888
29982
  r?.(), o(n, i, t.shiftKey);
29889
29983
  let a = t.currentTarget;
29890
- r = FL({
29984
+ r = UL({
29891
29985
  onMove(t) {
29892
29986
  let n = document.elementFromPoint(t.lastPoint.x, t.lastPoint.y)?.closest(e.cellSelector);
29893
29987
  if (n && a.closest(e.rootSelector)?.contains(n)) {
@@ -29916,8 +30010,8 @@ function IL(e) {
29916
30010
  };
29917
30011
  }
29918
30012
  // src/designer/components/fields/use-table-cells.ts
29919
- function LL(e) {
29920
- let { columnCount: t, commit: n, merges: r, rows: i } = e, a = IL({
30013
+ function GL(e) {
30014
+ let { columnCount: t, commit: n, merges: r, rows: i } = e, a = WL({
29921
30015
  cellSelector: "[data-row]",
29922
30016
  columnCount: t,
29923
30017
  getCell(e) {
@@ -29992,7 +30086,7 @@ function LL(e) {
29992
30086
  };
29993
30087
  }
29994
30088
  // src/designer/components/fields/use-table-draft.ts
29995
- function RL(e, t) {
30089
+ function KL(e, t) {
29996
30090
  let n = U(c()), r = l("columns"), i = l("rows"), a = P({
29997
30091
  get: () => n.value.merges ?? [],
29998
30092
  set: (e) => {
@@ -30000,7 +30094,7 @@ function RL(e, t) {
30000
30094
  }
30001
30095
  }), o = l("summary"), s = P(() => r.value.length);
30002
30096
  function c() {
30003
- let t = S(At(e()));
30097
+ let t = S(kt(e()));
30004
30098
  return t.rows = (t.rows ?? []).map((e) => Array.from({ length: t.columns.length }, (t, n) => typeof e[n] == "string" ? e[n] : "")), t;
30005
30099
  }
30006
30100
  function l(e) {
@@ -30012,12 +30106,12 @@ function RL(e, t) {
30012
30106
  });
30013
30107
  }
30014
30108
  function u(e) {
30015
- n.value = At(e);
30109
+ n.value = kt(e);
30016
30110
  }
30017
30111
  function d() {
30018
30112
  t({
30019
30113
  ...e(),
30020
- ...At(n.value)
30114
+ ...kt(n.value)
30021
30115
  });
30022
30116
  }
30023
30117
  return K(e, () => {
@@ -30034,14 +30128,14 @@ function RL(e, t) {
30034
30128
  };
30035
30129
  }
30036
30130
  // src/designer/components/fields/field-table-rows.vue?vue&type=script&setup=true&lang.ts
30037
- var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = { class: "table-rows__toolbar" }, HL = { class: "table-rows__formula" }, UL = ["title"], WL = {
30131
+ var qL = { class: "table-rows" }, JL = { class: "table-rows__controls" }, YL = { class: "table-rows__toolbar" }, XL = { class: "table-rows__formula" }, ZL = ["title"], QL = {
30038
30132
  key: 1,
30039
30133
  class: "table-rows__editing"
30040
- }, GL = { class: "table-rows__viewport" }, KL = [
30134
+ }, $L = { class: "table-rows__viewport" }, eR = [
30041
30135
  "aria-label",
30042
30136
  "aria-rowcount",
30043
30137
  "aria-colcount"
30044
- ], qL = ["title"], JL = ["onClick"], YL = [
30138
+ ], tR = ["title"], nR = ["onClick"], rR = [
30045
30139
  "aria-label",
30046
30140
  "aria-selected",
30047
30141
  "aria-rowindex",
@@ -30052,7 +30146,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30052
30146
  "onPointerdown",
30053
30147
  "onClick",
30054
30148
  "onDblclick"
30055
- ], XL = { key: 2 }, ZL = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30149
+ ], iR = { key: 2 }, aR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30056
30150
  __name: "field-table-rows",
30057
30151
  props: {
30058
30152
  propsObject: {},
@@ -30060,7 +30154,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30060
30154
  },
30061
30155
  emits: ["commit", "update:propsObject"],
30062
30156
  setup(e, { emit: t }) {
30063
- let n = e, r = t, { columnCount: i, columns: a, commit: o, merges: s, rows: c } = RL(() => n.propsObject, x), l = LL({
30157
+ let n = e, r = t, { columnCount: i, columns: a, commit: o, merges: s, rows: c } = KL(() => n.propsObject, x), l = GL({
30064
30158
  columnCount: i,
30065
30159
  commit: o,
30066
30160
  merges: s,
@@ -30175,12 +30269,12 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30175
30269
  target: () => p.value?.$el
30176
30270
  }), sn(C), (t, n) => {
30177
30271
  let r = sy;
30178
- return H(), L("div", zL, [
30272
+ return H(), L("div", qL, [
30179
30273
  e.rowsBinding ? (H(), F(HN, {
30180
30274
  key: 0,
30181
30275
  text: G(M)("designer.fieldTable.boundRowsHint")
30182
30276
  }, null, 8, ["text"])) : I("", !0),
30183
- R("div", BL, [R("div", VL, [
30277
+ R("div", JL, [R("div", YL, [
30184
30278
  z(r, {
30185
30279
  size: "small",
30186
30280
  variant: "outline",
@@ -30217,10 +30311,10 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30217
30311
  default: q(() => [Wt(W(G(M)("designer.fieldTable.deleteRowTitle")), 1)]),
30218
30312
  _: 1
30219
30313
  }, 8, ["disabled"])
30220
- ]), R("div", HL, [R("span", {
30314
+ ]), R("div", XL, [R("span", {
30221
30315
  class: "table-rows__address",
30222
30316
  title: G(M)("designer.fieldTable.currentCell")
30223
- }, W(_.value), 9, UL), m.value ? (H(), L("span", WL, W(G(M)("designer.fieldTable.inlineEditing")), 1)) : (H(), F(SL, {
30317
+ }, W(_.value), 9, ZL), m.value ? (H(), L("span", QL, W(G(M)("designer.fieldTable.inlineEditing")), 1)) : (H(), F(AL, {
30224
30318
  key: 0,
30225
30319
  ref_key: "editor",
30226
30320
  ref: p,
@@ -30238,7 +30332,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30238
30332
  ]))])]),
30239
30333
  z(HN, { text: G(M)("designer.fieldTable.gridHelp") }, null, 8, ["text"]),
30240
30334
  z(HN, { text: G(M)("designer.fieldTable.mergePreservesContent") }, null, 8, ["text"]),
30241
- R("div", GL, [R("div", {
30335
+ R("div", $L, [R("div", {
30242
30336
  ref_key: "grid",
30243
30337
  ref: f,
30244
30338
  class: "table-rows__grid",
@@ -30255,7 +30349,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30255
30349
  key: `title-${t}`,
30256
30350
  class: "table-rows__heading",
30257
30351
  title: e.title
30258
- }, W(S(0, t).replace(/1$/, "")) + " · " + W(e.title), 9, qL))), 128)),
30352
+ }, W(S(0, t).replace(/1$/, "")) + " · " + W(e.title), 9, tR))), 128)),
30259
30353
  (H(!0), L(N, null, gn(G(c), (e, t) => (H(), L(N, { key: t }, [R("button", {
30260
30354
  class: "table-rows__index",
30261
30355
  tabindex: "-1",
@@ -30264,7 +30358,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30264
30358
  gridColumn: 1
30265
30359
  }),
30266
30360
  onClick: (e) => G(l).select(t, 0)
30267
- }, W(t + 1), 13, JL), (H(!0), L(N, null, gn(G(a), (r, i) => (H(), L(N, { key: i }, [G(l).coveredCells.value.has(`${t}:${i}`) ? I("", !0) : (H(), L("div", {
30361
+ }, W(t + 1), 13, nR), (H(!0), L(N, null, gn(G(a), (r, i) => (H(), L(N, { key: i }, [G(l).coveredCells.value.has(`${t}:${i}`) ? I("", !0) : (H(), L("div", {
30268
30362
  key: 0,
30269
30363
  class: rn(["table-rows__cell", {
30270
30364
  "table-rows__cell--selected": G(l).contains(t, i),
@@ -30288,7 +30382,7 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30288
30382
  onPointerdown: n[3] ||= Nn(() => {}, ["stop"]),
30289
30383
  onClick: n[4] ||= Nn(() => {}, ["stop"]),
30290
30384
  onDblclick: n[5] ||= Nn(() => {}, ["stop"])
30291
- }, [z(SL, {
30385
+ }, [z(AL, {
30292
30386
  ref_for: !0,
30293
30387
  ref: b,
30294
30388
  modelValue: g.value,
@@ -30299,8 +30393,8 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30299
30393
  }, null, 8, ["modelValue", "aria-label"])], 32)) : e[i]?.includes("{{") ? (H(), F(Wa, {
30300
30394
  key: 1,
30301
30395
  text: e[i]
30302
- }, null, 8, ["text"])) : (H(), L("span", XL, W(e[i] || "\xA0"), 1))], 46, YL))], 64))), 128))], 64))), 128))
30303
- ], 12, KL)]),
30396
+ }, null, 8, ["text"])) : (H(), L("span", iR, W(e[i] || "\xA0"), 1))], 46, rR))], 64))), 128))], 64))), 128))
30397
+ ], 12, eR)]),
30304
30398
  G(i) === 0 ? (H(), F(HN, {
30305
30399
  key: 1,
30306
30400
  text: G(M)("designer.fieldTable.noColumnsMessage")
@@ -30310,10 +30404,10 @@ var zL = { class: "table-rows" }, BL = { class: "table-rows__controls" }, VL = {
30310
30404
  }
30311
30405
  }), [["__scopeId", "data-v-6a072c2e"]]);
30312
30406
  // src/designer/components/fields/use-table-columns.ts
30313
- function QL(e) {
30407
+ function oR(e) {
30314
30408
  let t = U(null), n = U(null);
30315
30409
  function r(t) {
30316
- let n = nL(e.getProps(), t, e.createColumn(t.length));
30410
+ let n = uL(e.getProps(), t, e.createColumn(t.length));
30317
30411
  return n ? (e.write(n), !0) : (e.onBlocked(), !1);
30318
30412
  }
30319
30413
  function i() {
@@ -30356,21 +30450,21 @@ function QL(e) {
30356
30450
  };
30357
30451
  }
30358
30452
  // src/designer/components/fields/field-table.vue?vue&type=script&setup=true&lang.ts
30359
- var $L = { class: "field-table" }, eR = [
30453
+ var sR = { class: "field-table" }, cR = [
30360
30454
  "draggable",
30361
30455
  "onDragstart",
30362
30456
  "onDragover",
30363
30457
  "onDrop"
30364
- ], tR = ["title"], nR = {
30458
+ ], lR = ["title"], uR = {
30365
30459
  key: 1,
30366
30460
  class: "field-table__entry-head"
30367
- }, rR = { class: "field-table__entry-body" }, iR = { class: "field-table__width" }, aR = {
30461
+ }, dR = { class: "field-table__entry-body" }, fR = { class: "field-table__width" }, pR = {
30368
30462
  key: 2,
30369
30463
  class: "field-table__advanced"
30370
- }, oR = { class: "field-table__stack" }, sR = {
30464
+ }, mR = { class: "field-table__stack" }, hR = {
30371
30465
  key: 2,
30372
30466
  class: "field-table__summary"
30373
- }, cR = { class: "field-table__summary-title" }, lR = { class: "field-table__summary-fields" }, uR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30467
+ }, gR = { class: "field-table__summary-title" }, _R = { class: "field-table__summary-fields" }, vR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
30374
30468
  __name: "field-table",
30375
30469
  props: {
30376
30470
  bindings: {},
@@ -30384,7 +30478,7 @@ var $L = { class: "field-table" }, eR = [
30384
30478
  },
30385
30479
  emits: ["commit", "update:propsObject"],
30386
30480
  setup(e, { emit: t }) {
30387
- let n = e, r = t, i = vz().store(), a = ce(), { onVisibleChange: o, popupProps: s } = hM({}, "popup"), { columns: c, commit: l, draft: u, replace: d, summary: f } = RL(() => n.propsObject, j), { addColumn: p, dragColumnIndex: m, dragOverColumnIndex: h, onColumnDragEnd: g, onColumnDragOver: _, onColumnDragStart: v, onColumnDrop: y, removeColumn: b } = QL({
30481
+ let n = e, r = t, i = Ez().store(), a = ae(), { onVisibleChange: o, popupProps: s } = hM({}, "popup"), { columns: c, commit: l, draft: u, replace: d, summary: f } = KL(() => n.propsObject, j), { addColumn: p, dragColumnIndex: m, dragOverColumnIndex: h, onColumnDragEnd: g, onColumnDragOver: _, onColumnDragStart: v, onColumnDrop: y, removeColumn: b } = oR({
30388
30482
  createColumn(e) {
30389
30483
  return {
30390
30484
  align: "left",
@@ -30508,23 +30602,23 @@ var $L = { class: "field-table" }, eR = [
30508
30602
  let n = t === null ? void 0 : c.value[t];
30509
30603
  n && (n.bind = e, l());
30510
30604
  }
30511
- function ae(e) {
30605
+ function oe(e) {
30512
30606
  let t = String(e);
30513
30607
  return f.value.columns[t] || (f.value.columns[t] = {
30514
30608
  text: "",
30515
30609
  type: "none"
30516
30610
  }), f.value.columns[t];
30517
30611
  }
30518
- function oe(e, t) {
30519
- let n = ae(e);
30612
+ function se(e, t) {
30613
+ let n = oe(e);
30520
30614
  n.type = t === "sum" || t === "text" ? t : "none", n.type === "text" && n.text === void 0 && (n.text = ""), l();
30521
30615
  }
30522
- function se(e, t) {
30523
- ae(e).text = t;
30616
+ function ce(e, t) {
30617
+ oe(e).text = t;
30524
30618
  }
30525
30619
  return (t, n) => {
30526
- let u = sy, d = jS, b = MT, j = hC, ce = fA;
30527
- return H(), L("div", $L, [e.tableMode === "columns" ? (H(), L(N, { key: 0 }, [
30620
+ let u = sy, d = jS, b = MT, j = hC, ae = fA;
30621
+ return H(), L("div", sR, [e.tableMode === "columns" ? (H(), L(N, { key: 0 }, [
30528
30622
  !x.value && !e.embedded ? (H(), F(HN, {
30529
30623
  key: 0,
30530
30624
  text: G(M)("designer.fieldTable.bindRowsFirstTitle")
@@ -30549,14 +30643,14 @@ var $L = { class: "field-table" }, eR = [
30549
30643
  }, [z($, {
30550
30644
  name: "drag",
30551
30645
  class: "h-3.5 w-3.5"
30552
- })], 8, tR)),
30553
- e.embedded ? I("", !0) : (H(), L("div", nR, [
30646
+ })], 8, lR)),
30647
+ e.embedded ? I("", !0) : (H(), L("div", uR, [
30554
30648
  e.embedded ? I("", !0) : (H(), F(fP, {
30555
30649
  key: 0,
30556
30650
  label: G(M)("designer.fieldTable.columnTitleLabel"),
30557
30651
  class: "min-w-0 flex-1"
30558
30652
  }, {
30559
- default: q(() => [z(SL, {
30653
+ default: q(() => [z(AL, {
30560
30654
  modelValue: t.title,
30561
30655
  "onUpdate:modelValue": (e) => t.title = e,
30562
30656
  placeholder: G(M)("designer.fieldTable.columnTitlePlaceholder"),
@@ -30607,7 +30701,7 @@ var $L = { class: "field-table" }, eR = [
30607
30701
  "onClick"
30608
30702
  ]))
30609
30703
  ])),
30610
- R("div", rR, [z(fP, {
30704
+ R("div", dR, [z(fP, {
30611
30705
  label: G(M)("designer.fieldTable.bindingPlaceholder"),
30612
30706
  help: G(M)("designer.fieldTable.bindingTitle")
30613
30707
  }, {
@@ -30644,7 +30738,7 @@ var $L = { class: "field-table" }, eR = [
30644
30738
  ])]),
30645
30739
  _: 2
30646
30740
  }, 1032, ["label", "help"]), z(fP, { label: G(M)("designer.fieldTable.widthModeTitle") }, {
30647
- default: q(() => [R("div", iR, [z(b, {
30741
+ default: q(() => [R("div", fR, [z(b, {
30648
30742
  "model-value": t.widthMode ?? "weight",
30649
30743
  "popup-props": G(s),
30650
30744
  options: w.value,
@@ -30675,7 +30769,7 @@ var $L = { class: "field-table" }, eR = [
30675
30769
  ])])]),
30676
30770
  _: 2
30677
30771
  }, 1032, ["label"])]),
30678
- !e.widthOnly && (e.expanded || D.value === r) ? (H(), L("div", aR, [
30772
+ !e.widthOnly && (e.expanded || D.value === r) ? (H(), L("div", pR, [
30679
30773
  z(fP, { label: G(M)("designer.fieldTable.alignTitle") }, {
30680
30774
  default: q(() => [z(b, {
30681
30775
  modelValue: t.align,
@@ -30731,7 +30825,7 @@ var $L = { class: "field-table" }, eR = [
30731
30825
  _: 2
30732
30826
  }, 1032, ["label"]),
30733
30827
  z(fP, { label: G(M)("designer.fieldTable.boldTitle") }, {
30734
- default: q(() => [z(ce, {
30828
+ default: q(() => [z(ae, {
30735
30829
  "model-value": t.bold === !0,
30736
30830
  "onUpdate:modelValue": (e) => {
30737
30831
  t.bold = e === !0, G(l)();
@@ -30740,7 +30834,7 @@ var $L = { class: "field-table" }, eR = [
30740
30834
  _: 2
30741
30835
  }, 1032, ["label"]),
30742
30836
  z(fP, { label: G(M)("designer.fieldTable.textColorTitle") }, {
30743
- default: q(() => [z(PI, {
30837
+ default: q(() => [z(HI, {
30744
30838
  "model-value": t.color ?? "",
30745
30839
  "onUpdate:modelValue": (e) => {
30746
30840
  t.color = String(e), G(l)();
@@ -30749,7 +30843,7 @@ var $L = { class: "field-table" }, eR = [
30749
30843
  _: 2
30750
30844
  }, 1032, ["label"]),
30751
30845
  z(fP, { label: G(M)("designer.fieldTable.backgroundTitle") }, {
30752
- default: q(() => [z(PI, {
30846
+ default: q(() => [z(HI, {
30753
30847
  "model-value": t.background ?? "",
30754
30848
  "allow-none": "",
30755
30849
  "onUpdate:modelValue": (e) => {
@@ -30759,7 +30853,7 @@ var $L = { class: "field-table" }, eR = [
30759
30853
  _: 2
30760
30854
  }, 1032, ["label"]),
30761
30855
  z(fP, { label: G(M)("designer.fieldTable.wrapTitle") }, {
30762
- default: q(() => [z(ce, {
30856
+ default: q(() => [z(ae, {
30763
30857
  "model-value": t.wrap !== !1,
30764
30858
  "onUpdate:modelValue": (e) => {
30765
30859
  t.wrap = e === !0, G(l)();
@@ -30768,7 +30862,7 @@ var $L = { class: "field-table" }, eR = [
30768
30862
  _: 2
30769
30863
  }, 1032, ["label"]),
30770
30864
  z(fP, { label: G(M)("designer.fieldTable.formatTitle") }, {
30771
- default: q(() => [R("div", oR, [
30865
+ default: q(() => [R("div", mR, [
30772
30866
  z(b, {
30773
30867
  "model-value": t.format?.type ?? "none",
30774
30868
  "popup-props": G(s),
@@ -30840,7 +30934,7 @@ var $L = { class: "field-table" }, eR = [
30840
30934
  label: G(M)("designer.fieldTable.mergeSameTitle"),
30841
30935
  help: G(M)("designer.fieldTable.mergeSameHelp")
30842
30936
  }, {
30843
- default: q(() => [z(ce, {
30937
+ default: q(() => [z(ae, {
30844
30938
  "model-value": t.mergeSame === !0,
30845
30939
  "onUpdate:modelValue": (e) => {
30846
30940
  t.mergeSame = e === !0, G(l)();
@@ -30889,7 +30983,7 @@ var $L = { class: "field-table" }, eR = [
30889
30983
  _: 2
30890
30984
  }, 1032, ["label"])
30891
30985
  ])) : I("", !0)
30892
- ], 42, eR)), [[kn, e.columnIndex === void 0 || e.columnIndex === r]])), 128)),
30986
+ ], 42, cR)), [[kn, e.columnIndex === void 0 || e.columnIndex === r]])), 128)),
30893
30987
  e.embedded ? I("", !0) : (H(), F(u, {
30894
30988
  key: 1,
30895
30989
  block: "",
@@ -30903,25 +30997,25 @@ var $L = { class: "field-table" }, eR = [
30903
30997
  default: q(() => [Wt(" " + W(G(M)("designer.fieldTable.addColumnButton")), 1)]),
30904
30998
  _: 1
30905
30999
  }, 8, ["onClick"])),
30906
- !e.embedded || e.showMergeRules ? (H(), F(AL, {
31000
+ !e.embedded || e.showMergeRules ? (H(), F(RL, {
30907
31001
  key: 2,
30908
31002
  "props-object": e.propsObject,
30909
31003
  bindings: e.bindings,
30910
31004
  "onUpdate:propsObject": n[2] ||= (e) => r("update:propsObject", e),
30911
31005
  onCommit: n[3] ||= (e) => r("commit")
30912
31006
  }, null, 8, ["props-object", "bindings"])) : I("", !0)
30913
- ], 64)) : e.tableMode === "rows" || e.tableMode === "headers" ? (H(), F(ZL, {
31007
+ ], 64)) : e.tableMode === "rows" || e.tableMode === "headers" ? (H(), F(aR, {
30914
31008
  key: 1,
30915
31009
  "props-object": e.propsObject,
30916
31010
  "rows-binding": x.value,
30917
31011
  "onUpdate:propsObject": n[4] ||= (e) => r("update:propsObject", e),
30918
31012
  onCommit: n[5] ||= (e) => r("commit")
30919
- }, null, 8, ["props-object", "rows-binding"])) : (H(), L("div", sR, [(H(!0), L(N, null, gn(G(c), (e, t) => (H(), L("div", {
31013
+ }, null, 8, ["props-object", "rows-binding"])) : (H(), L("div", hR, [(H(!0), L(N, null, gn(G(c), (e, t) => (H(), L("div", {
30920
31014
  key: t,
30921
31015
  class: "field-table__summary-column"
30922
31016
  }, [
30923
- R("div", cR, W(e.title || G(M)("designer.fieldTable.columnTitlePlaceholder")), 1),
30924
- R("div", lR, [z(fP, {
31017
+ R("div", gR, W(e.title || G(M)("designer.fieldTable.columnTitlePlaceholder")), 1),
31018
+ R("div", _R, [z(fP, {
30925
31019
  stacked: "",
30926
31020
  label: G(M)("designer.fieldTable.summaryTypeTitle")
30927
31021
  }, {
@@ -30931,7 +31025,7 @@ var $L = { class: "field-table" }, eR = [
30931
31025
  options: k.value,
30932
31026
  onPopupVisibleChange: G(o),
30933
31027
  "onUpdate:modelValue": (e) => {
30934
- oe(t, String(e));
31028
+ se(t, String(e));
30935
31029
  }
30936
31030
  }, null, 8, [
30937
31031
  "model-value",
@@ -30946,10 +31040,10 @@ var $L = { class: "field-table" }, eR = [
30946
31040
  stacked: "",
30947
31041
  label: G(M)("designer.fieldTable.summaryTextTitle")
30948
31042
  }, {
30949
- default: q(() => [z(SL, {
31043
+ default: q(() => [z(AL, {
30950
31044
  "model-value": G(f).columns[String(t)]?.text ?? "",
30951
31045
  "onUpdate:modelValue": (e) => {
30952
- se(t, String(e));
31046
+ ce(t, String(e));
30953
31047
  },
30954
31048
  onCommit: G(l)
30955
31049
  }, null, 8, [
@@ -30959,9 +31053,9 @@ var $L = { class: "field-table" }, eR = [
30959
31053
  ])]),
30960
31054
  _: 2
30961
31055
  }, 1032, ["label"])) : I("", !0)]),
30962
- z(NL, {
31056
+ z(VL, {
30963
31057
  "model-value": G(f).columns[String(t)]?.style,
30964
- "onUpdate:modelValue": (e) => ae(t).style = e,
31058
+ "onUpdate:modelValue": (e) => oe(t).style = e,
30965
31059
  onCommit: G(l)
30966
31060
  }, null, 8, [
30967
31061
  "model-value",
@@ -30987,7 +31081,7 @@ var $L = { class: "field-table" }, eR = [
30987
31081
  }
30988
31082
  }), [["__scopeId", "data-v-d7760b2c"]]);
30989
31083
  // src/designer/components/fields/use-table-column-resize.ts
30990
- function dR(e) {
31084
+ function yR(e) {
30991
31085
  let t;
30992
31086
  function n(n, r) {
30993
31087
  if (n.button !== 0) return;
@@ -30995,13 +31089,13 @@ function dR(e) {
30995
31089
  let i = n.currentTarget, a = i.closest("table")?.getBoundingClientRect().width ?? 0;
30996
31090
  if (a <= 0) return;
30997
31091
  let o = [...e.widths.value], s = o.reduce((e, t) => e + t, 0), c = e.table.value.columns;
30998
- t = FL({
31092
+ t = UL({
30999
31093
  onEnd(t, n) {
31000
31094
  n && e.commit();
31001
31095
  },
31002
31096
  onMove(t) {
31003
31097
  let n = (t.lastPoint.x - t.startPoint.x) * s / a;
31004
- e.write({ columns: iL(c, o, r, n) });
31098
+ e.write({ columns: fL(c, o, r, n) });
31005
31099
  },
31006
31100
  pointerId: n.pointerId,
31007
31101
  startPoint: {
@@ -31016,8 +31110,8 @@ function dR(e) {
31016
31110
  return sn(() => t?.()), { resizeColumn: n };
31017
31111
  }
31018
31112
  // src/designer/components/fields/use-table-header-selection.ts
31019
- function fR(e) {
31020
- return IL({
31113
+ function bR(e) {
31114
+ return WL({
31021
31115
  ...e,
31022
31116
  cellSelector: "[data-header-row]",
31023
31117
  getCell(e) {
@@ -31031,11 +31125,11 @@ function fR(e) {
31031
31125
  });
31032
31126
  }
31033
31127
  // src/designer/components/fields/use-table-headers.ts
31034
- function pR(t) {
31035
- let { selection: n, table: i } = t, o = U(!1), s = P(() => eL(i.value)), c = P(() => !!i.value.headerRows?.length), l = P(() => {
31128
+ function xR(e) {
31129
+ let { selection: n, table: r } = e, a = U(!1), s = P(() => cL(r.value)), c = P(() => !!r.value.headerRows?.length), l = P(() => {
31036
31130
  let e = n.value;
31037
- return !!(e && (e.colspan > 1 || e.rowspan > 1) && !(i.value.headerMerges ?? []).some((t) => e.row === t.row && e.col === t.col && e.rowspan === t.rowspan && e.colspan === t.colspan));
31038
- }), u = P(() => (i.value.headerMerges ?? []).some(d));
31131
+ return !!(e && (e.colspan > 1 || e.rowspan > 1) && !(r.value.headerMerges ?? []).some((t) => e.row === t.row && e.col === t.col && e.rowspan === t.rowspan && e.colspan === t.colspan));
31132
+ }), u = P(() => (r.value.headerMerges ?? []).some(d));
31039
31133
  function d(e) {
31040
31134
  let t = n.value;
31041
31135
  return !!(t && e.row >= t.row && e.row < t.row + t.rowspan && e.col >= t.col && e.col < t.col + t.colspan);
@@ -31043,49 +31137,49 @@ function pR(t) {
31043
31137
  function f(n, l, u) {
31044
31138
  let d = String(u);
31045
31139
  if ((s.value[n]?.[l] ?? "") === d) return;
31046
- if (o.value = !0, c.value) {
31047
- let e = s.value.map((e) => [...e]);
31048
- e[n][l] = d, t.write({ headerRows: e });
31140
+ if (a.value = !0, c.value) {
31141
+ let t = s.value.map((e) => [...e]);
31142
+ t[n][l] = d, e.write({ headerRows: t });
31049
31143
  return;
31050
31144
  }
31051
- let f = i.value.columns.map((n, i) => {
31052
- if (i !== l) return n;
31053
- let o = n.bind, s = t.getRowsBinding();
31054
- if (!o && s) {
31055
- let i = e(r(t.getInput()), s);
31056
- Array.isArray(i) && i.length > 0 && (o = a(n.title, i[0]) || void 0);
31145
+ let f = r.value.columns.map((n, r) => {
31146
+ if (r !== l) return n;
31147
+ let a = n.bind, s = e.getRowsBinding();
31148
+ if (!a && s) {
31149
+ let r = t(i(e.getInput()), s);
31150
+ Array.isArray(r) && r.length > 0 && (a = o(n.title, r[0]) || void 0);
31057
31151
  }
31058
31152
  return {
31059
31153
  ...n,
31060
- bind: o,
31154
+ bind: a,
31061
31155
  title: d
31062
31156
  };
31063
31157
  });
31064
- t.write({ columns: f });
31158
+ e.write({ columns: f });
31065
31159
  }
31066
31160
  function p() {
31067
- o.value && (o.value = !1, t.commit());
31161
+ a.value && (a.value = !1, e.commit());
31068
31162
  }
31069
31163
  function m() {
31070
- n.value && l.value && (t.write({ headerMerges: [...(i.value.headerMerges ?? []).filter((e) => !d(e)), { ...n.value }] }), t.commit());
31164
+ n.value && l.value && (e.write({ headerMerges: [...(r.value.headerMerges ?? []).filter((e) => !d(e)), { ...n.value }] }), e.commit());
31071
31165
  }
31072
31166
  function h() {
31073
- t.write({ headerMerges: (i.value.headerMerges ?? []).filter((e) => !d(e)) }), t.commit();
31167
+ e.write({ headerMerges: (r.value.headerMerges ?? []).filter((e) => !d(e)) }), e.commit();
31074
31168
  }
31075
31169
  function g() {
31076
- t.write({ headerRows: [...s.value, i.value.columns.map(() => "")] }), t.commit();
31170
+ e.write({ headerRows: [...s.value, r.value.columns.map(() => "")] }), e.commit();
31077
31171
  }
31078
31172
  function _() {
31079
- let e = n.value?.row;
31080
- if (e === void 0 || s.value.length <= 1) return;
31081
- let r = i.value.headerMerges ?? [];
31082
- r.some((t) => e >= t.row && e < t.row + t.rowspan) ? t.onBlocked() : (t.write({
31083
- headerMerges: r.map((t) => t.row > e ? {
31084
- ...t,
31085
- row: t.row - 1
31086
- } : t),
31087
- headerRows: s.value.filter((t, n) => n !== e)
31088
- }), t.commit(), t.clearSelection());
31173
+ let t = n.value?.row;
31174
+ if (t === void 0 || s.value.length <= 1) return;
31175
+ let i = r.value.headerMerges ?? [];
31176
+ i.some((e) => t >= e.row && t < e.row + e.rowspan) ? e.onBlocked() : (e.write({
31177
+ headerMerges: i.map((e) => e.row > t ? {
31178
+ ...e,
31179
+ row: e.row - 1
31180
+ } : e),
31181
+ headerRows: s.value.filter((e, n) => n !== t)
31182
+ }), e.commit(), e.clearSelection());
31089
31183
  }
31090
31184
  return {
31091
31185
  addRow: g,
@@ -31100,32 +31194,32 @@ function pR(t) {
31100
31194
  };
31101
31195
  }
31102
31196
  // src/designer/components/fields/field-table-structure.vue?vue&type=script&setup=true&lang.ts
31103
- var mR = { class: "table-structure" }, hR = { class: "table-structure__section-content" }, gR = {
31197
+ var SR = { class: "table-structure" }, CR = { class: "table-structure__section-content" }, wR = {
31104
31198
  key: 0,
31105
31199
  class: "table-structure__options"
31106
- }, _R = {
31200
+ }, TR = {
31107
31201
  key: 1,
31108
31202
  class: "table-structure__toolbar"
31109
- }, vR = { class: "table-structure__viewport" }, yR = ["onDrop"], bR = [
31203
+ }, ER = { class: "table-structure__viewport" }, DR = ["onDrop"], OR = [
31110
31204
  "draggable",
31111
31205
  "aria-pressed",
31112
31206
  "onClick",
31113
31207
  "onDragstart"
31114
- ], xR = {
31208
+ ], kR = {
31115
31209
  key: 0,
31116
31210
  class: "table-structure__binding"
31117
- }, SR = [
31211
+ }, AR = [
31118
31212
  "aria-label",
31119
31213
  "title",
31120
31214
  "onPointerdown",
31121
31215
  "onClick"
31122
- ], CR = [
31216
+ ], jR = [
31123
31217
  "colspan",
31124
31218
  "rowspan",
31125
31219
  "data-header-row",
31126
31220
  "data-header-col",
31127
31221
  "onPointerdown"
31128
- ], wR = { key: 0 }, TR = ["onClick"], ER = ["colspan", "rowspan"], DR = ["aria-label", "onClick"], OR = { class: "table-structure__section-content" }, kR = { class: "table-structure__selection" }, AR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31222
+ ], MR = { key: 0 }, NR = ["onClick"], PR = ["colspan", "rowspan"], FR = ["aria-label", "onClick"], IR = { class: "table-structure__section-content" }, LR = { class: "table-structure__selection" }, RR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31129
31223
  __name: "field-table-structure",
31130
31224
  props: /*@__PURE__*/ tn({
31131
31225
  bindings: {},
@@ -31137,19 +31231,19 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31137
31231
  }),
31138
31232
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
31139
31233
  setup(e, { emit: t }) {
31140
- let n = e, i = Dn(e, "modelValue"), a = t, o = vz(), s = o.store(), l = U(0), u = U(!1), d = P(() => S(i.value)), f = P(() => eL(d.value)), p = P(() => k(d.value.columns.map((e) => ({
31234
+ let n = e, r = Dn(e, "modelValue"), a = t, o = Ez(), s = o.store(), c = U(0), u = U(!1), d = P(() => S(r.value)), f = P(() => cL(d.value)), p = P(() => k(d.value.columns.map((e) => ({
31141
31235
  ...e,
31142
31236
  mergeSame: !1
31143
31237
  })), f.value, d.value.headerMerges)), m = P(() => b(d.value, n.node?.width ?? 120)), h = P(() => m.value.reduce((e, t) => e + t, 0) || 1), g = P(() => Math.max(280, ...m.value.map((e) => 80 * h.value / e))), _ = P(() => {
31144
31238
  let e = d.value;
31145
31239
  if (n.node && n.bindings?.rows) {
31146
- let t = new c(), a = r(lt(s.document.data));
31240
+ let t = new l(), a = i(ct(s.document.data));
31147
31241
  a.elements = o.elements;
31148
- let l = ne({
31242
+ let c = ne({
31149
31243
  ...n.node,
31150
- props: i.value
31244
+ props: r.value
31151
31245
  }, a, t);
31152
- e = S(l.props);
31246
+ e = S(c.props);
31153
31247
  }
31154
31248
  return w({
31155
31249
  ...e,
@@ -31163,21 +31257,21 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31163
31257
  elementWidthMm: n.node?.width ?? 120,
31164
31258
  rows: e.rows.slice(0, 3)
31165
31259
  }).rows;
31166
- }), v = P(() => Math.min(l.value, Math.max(0, d.value.columns.length - 1))), { begin: y, clear: x, contains: C, focus: T, select: E, selection: D } = fR({
31260
+ }), v = P(() => Math.min(c.value, Math.max(0, d.value.columns.length - 1))), { begin: y, clear: x, contains: C, focus: T, select: E, selection: D } = bR({
31167
31261
  columnCount: P(() => d.value.columns.length),
31168
31262
  merges: P(() => d.value.headerMerges ?? []),
31169
31263
  onColumnSelect: me,
31170
31264
  rows: f
31171
- }), { addRow: O, canMerge: A, canSplit: j, commitText: ee, mergeSelection: te, removeRow: re, setText: ie, splitSelection: ae } = pR({
31265
+ }), { addRow: O, canMerge: A, canSplit: j, commitText: ee, mergeSelection: te, removeRow: re, setText: ie, splitSelection: ae } = xR({
31172
31266
  clearSelection: x,
31173
31267
  commit: ve,
31174
- getInput: () => lt(s.document.data),
31268
+ getInput: () => ct(s.document.data),
31175
31269
  getRowsBinding: () => n.bindings?.rows,
31176
31270
  onBlocked: pe,
31177
31271
  selection: D,
31178
31272
  table: d,
31179
31273
  write: fe
31180
- }), { addColumn: oe, dragColumnIndex: se, moveColumn: ce, onColumnDrop: le, removeColumn: ue } = QL({
31274
+ }), { addColumn: oe, dragColumnIndex: se, moveColumn: ce, onColumnDrop: le, removeColumn: ue } = oR({
31181
31275
  createColumn(e) {
31182
31276
  return {
31183
31277
  align: "left",
@@ -31190,7 +31284,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31190
31284
  write(e) {
31191
31285
  fe({ ...e }), x(), ve();
31192
31286
  }
31193
- }), { resizeColumn: de } = dR({
31287
+ }), { resizeColumn: de } = yR({
31194
31288
  commit: ve,
31195
31289
  onColumnSelect: me,
31196
31290
  table: d,
@@ -31200,16 +31294,16 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31200
31294
  function fe(e) {
31201
31295
  if (n.widthOnly) {
31202
31296
  let t = e.columns;
31203
- t && (i.value = {
31204
- ...i.value,
31297
+ t && (r.value = {
31298
+ ...r.value,
31205
31299
  columns: d.value.columns.map((e, n) => ({
31206
31300
  ...e,
31207
31301
  width: t[n]?.width ?? e.width,
31208
31302
  widthMode: t[n]?.widthMode ?? e.widthMode
31209
31303
  }))
31210
31304
  });
31211
- } else i.value = {
31212
- ...i.value,
31305
+ } else r.value = {
31306
+ ...r.value,
31213
31307
  ...e
31214
31308
  };
31215
31309
  }
@@ -31217,16 +31311,16 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31217
31311
  s.ui.toast(M("designer.tableStructure.mergeProtected"));
31218
31312
  }
31219
31313
  function me(e) {
31220
- l.value = e;
31314
+ c.value = e;
31221
31315
  }
31222
31316
  function he() {
31223
- oe() && (l.value = d.value.columns.length - 1);
31317
+ oe() && (c.value = d.value.columns.length - 1);
31224
31318
  }
31225
31319
  function ge() {
31226
31320
  ue(v.value);
31227
31321
  }
31228
31322
  function _e(e, t) {
31229
- ce(e, t) && (l.value = t);
31323
+ ce(e, t) && (c.value = t);
31230
31324
  }
31231
31325
  function ve() {
31232
31326
  a("commit");
@@ -31241,27 +31335,27 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31241
31335
  };
31242
31336
  }
31243
31337
  function xe(e) {
31244
- l.value = e, x();
31338
+ c.value = e, x();
31245
31339
  }
31246
31340
  return QN("column", (e) => {
31247
- l.value = e ?? 0;
31341
+ c.value = e ?? 0;
31248
31342
  }), (t, n) => {
31249
- let r = sy;
31250
- return H(), L("div", mR, [
31343
+ let i = sy;
31344
+ return H(), L("div", SR, [
31251
31345
  z(JN, { title: G(M)("designer.tableStructure.headerSection") }, {
31252
- default: q(() => [R("div", hR, [
31253
- e.widthOnly ? I("", !0) : (H(), L("div", gR, [z(fP, { label: G(M)("elements.tableElement.showHeaderLabel") }, {
31254
- default: q(() => [z(jI, {
31346
+ default: q(() => [R("div", CR, [
31347
+ e.widthOnly ? I("", !0) : (H(), L("div", wR, [z(fP, { label: G(M)("elements.tableElement.showHeaderLabel") }, {
31348
+ default: q(() => [z(zI, {
31255
31349
  "model-value": d.value.headerVisible !== !1,
31256
- "onUpdate:modelValue": n[0] ||= (e) => i.value = {
31257
- ...i.value,
31350
+ "onUpdate:modelValue": n[0] ||= (e) => r.value = {
31351
+ ...r.value,
31258
31352
  headerVisible: e
31259
31353
  },
31260
31354
  onCommit: ve
31261
31355
  }, null, 8, ["model-value"])]),
31262
31356
  _: 1
31263
31357
  }, 8, ["label"])])),
31264
- e.widthOnly ? I("", !0) : (H(), L("div", _R, [z(r, {
31358
+ e.widthOnly ? I("", !0) : (H(), L("div", TR, [z(i, {
31265
31359
  variant: "outline",
31266
31360
  size: "small",
31267
31361
  title: G(M)("designer.tableStructure.addColumn"),
@@ -31274,7 +31368,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31274
31368
  default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.addColumn")), 1)]),
31275
31369
  _: 1
31276
31370
  }, 8, ["title"]), d.value.headerVisible === !1 ? I("", !0) : (H(), L(N, { key: 0 }, [
31277
- z(r, {
31371
+ z(i, {
31278
31372
  variant: "outline",
31279
31373
  size: "small",
31280
31374
  onClick: G(O)
@@ -31286,7 +31380,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31286
31380
  default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.addHeaderRow")), 1)]),
31287
31381
  _: 1
31288
31382
  }, 8, ["onClick"]),
31289
- z(r, {
31383
+ z(i, {
31290
31384
  variant: "outline",
31291
31385
  size: "small",
31292
31386
  disabled: !G(D) || f.value.length <= 1,
@@ -31299,7 +31393,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31299
31393
  default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.removeHeaderRow")), 1)]),
31300
31394
  _: 1
31301
31395
  }, 8, ["disabled", "onClick"]),
31302
- z(r, {
31396
+ z(i, {
31303
31397
  variant: "outline",
31304
31398
  size: "small",
31305
31399
  disabled: !G(A),
@@ -31312,7 +31406,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31312
31406
  default: q(() => [Wt(" " + W(G(M)("designer.tableStructure.mergeSelection")), 1)]),
31313
31407
  _: 1
31314
31408
  }, 8, ["disabled", "onClick"]),
31315
- z(r, {
31409
+ z(i, {
31316
31410
  variant: "outline",
31317
31411
  size: "small",
31318
31412
  disabled: !G(j),
@@ -31326,7 +31420,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31326
31420
  _: 1
31327
31421
  }, 8, ["disabled", "onClick"])
31328
31422
  ], 64))])),
31329
- R("div", vR, [R("table", {
31423
+ R("div", ER, [R("table", {
31330
31424
  class: "table-structure__table",
31331
31425
  style: on({ minWidth: `${g.value}px` })
31332
31426
  }, [
@@ -31353,8 +31447,8 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31353
31447
  class: "h-3.5 w-3.5"
31354
31448
  }),
31355
31449
  R("span", null, W(ye(r)), 1),
31356
- t.bind ? (H(), L("span", xR, W(t.bind), 1)) : I("", !0)
31357
- ], 40, bR), r < d.value.columns.length - 1 ? (H(), L("button", {
31450
+ t.bind ? (H(), L("span", kR, W(t.bind), 1)) : I("", !0)
31451
+ ], 40, OR), r < d.value.columns.length - 1 ? (H(), L("button", {
31358
31452
  key: 0,
31359
31453
  type: "button",
31360
31454
  class: "table-structure__resize",
@@ -31365,7 +31459,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31365
31459
  }, [z($, {
31366
31460
  name: "drag",
31367
31461
  class: "h-3.5 w-3.5"
31368
- })], 40, SR)) : I("", !0)], 40, yR))), 128))]), d.value.headerVisible === !1 ? I("", !0) : (H(!0), L(N, { key: 0 }, gn(f.value, (t, n) => (H(), L("tr", { key: n }, [(H(!0), L(N, null, gn(d.value.columns, (r, i) => (H(), L(N, { key: i }, [p.value.covered.has(`${n}:${i}`) ? I("", !0) : (H(), L("th", {
31462
+ })], 40, AR)) : I("", !0)], 40, DR))), 128))]), d.value.headerVisible === !1 ? I("", !0) : (H(!0), L(N, { key: 0 }, gn(f.value, (t, n) => (H(), L("tr", { key: n }, [(H(!0), L(N, null, gn(d.value.columns, (r, i) => (H(), L(N, { key: i }, [p.value.covered.has(`${n}:${i}`) ? I("", !0) : (H(), L("th", {
31369
31463
  key: 0,
31370
31464
  colspan: be(n, i).colspan,
31371
31465
  rowspan: be(n, i).rowspan,
@@ -31373,11 +31467,11 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31373
31467
  "data-header-col": i,
31374
31468
  class: rn({ "table-structure__header--selected": G(C)(n, i) }),
31375
31469
  onPointerdown: (t) => !e.widthOnly && G(y)(t, n, i)
31376
- }, [e.widthOnly ? (H(), L("span", wR, W(t[i] || "\xA0"), 1)) : (H(), L("div", {
31470
+ }, [e.widthOnly ? (H(), L("span", MR, W(t[i] || "\xA0"), 1)) : (H(), L("div", {
31377
31471
  key: 1,
31378
31472
  class: "table-structure__header-input",
31379
31473
  onClick: Nn((e) => G(E)(n, i, !0), ["shift"])
31380
- }, [z(SL, {
31474
+ }, [z(AL, {
31381
31475
  "model-value": t[i] ?? "",
31382
31476
  "aria-label": G(M)("designer.tableStructure.headerCell", {
31383
31477
  row: n + 1,
@@ -31392,7 +31486,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31392
31486
  "onUpdate:modelValue",
31393
31487
  "onFocus",
31394
31488
  "onCommit"
31395
- ])], 8, TR))], 42, CR))], 64))), 128))]))), 128))]),
31489
+ ])], 8, NR))], 42, jR))], 64))), 128))]))), 128))]),
31396
31490
  R("tbody", null, [(H(!0), L(N, null, gn(_.value, (e, t) => (H(), L("tr", { key: t }, [(H(!0), L(N, null, gn(e.cells, (e) => (H(), L("td", {
31397
31491
  key: e.col,
31398
31492
  colspan: e.colSpan,
@@ -31405,7 +31499,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31405
31499
  }, [z($, {
31406
31500
  name: "table",
31407
31501
  class: "h-3.5 w-3.5 shrink-0"
31408
- }), Wt(" " + W(e.text || "\xA0"), 1)], 8, DR)], 8, ER))), 128))]))), 128))])
31502
+ }), Wt(" " + W(e.text || "\xA0"), 1)], 8, FR)], 8, PR))), 128))]))), 128))])
31409
31503
  ], 4)])
31410
31504
  ])]),
31411
31505
  _: 1
@@ -31414,9 +31508,9 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31414
31508
  key: 0,
31415
31509
  title: G(M)("designer.tableStructure.columnSection")
31416
31510
  }, {
31417
- default: q(() => [R("div", OR, [R("div", kR, [
31511
+ default: q(() => [R("div", IR, [R("div", LR, [
31418
31512
  R("span", null, W(G(M)("designer.tableStructure.columnSettings", { number: v.value + 1 })), 1),
31419
- e.widthOnly ? I("", !0) : (H(), F(r, {
31513
+ e.widthOnly ? I("", !0) : (H(), F(i, {
31420
31514
  key: 0,
31421
31515
  variant: "text",
31422
31516
  shape: "square",
@@ -31435,7 +31529,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31435
31529
  "aria-label",
31436
31530
  "aria-expanded"
31437
31531
  ])),
31438
- e.widthOnly ? I("", !0) : (H(), F(r, {
31532
+ e.widthOnly ? I("", !0) : (H(), F(i, {
31439
31533
  key: 1,
31440
31534
  variant: "text",
31441
31535
  shape: "square",
@@ -31454,7 +31548,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31454
31548
  "aria-label",
31455
31549
  "disabled"
31456
31550
  ])),
31457
- e.widthOnly ? I("", !0) : (H(), F(r, {
31551
+ e.widthOnly ? I("", !0) : (H(), F(i, {
31458
31552
  key: 2,
31459
31553
  variant: "text",
31460
31554
  shape: "square",
@@ -31473,7 +31567,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31473
31567
  "aria-label",
31474
31568
  "disabled"
31475
31569
  ])),
31476
- e.widthOnly ? I("", !0) : (H(), F(r, {
31570
+ e.widthOnly ? I("", !0) : (H(), F(i, {
31477
31571
  key: 3,
31478
31572
  variant: "text",
31479
31573
  theme: "danger",
@@ -31488,9 +31582,9 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31488
31582
  })]),
31489
31583
  _: 1
31490
31584
  }, 8, ["title", "aria-label"]))
31491
- ]), d.value.columns.length ? (H(), F(uR, {
31585
+ ]), d.value.columns.length ? (H(), F(vR, {
31492
31586
  key: 0,
31493
- "props-object": i.value,
31587
+ "props-object": r.value,
31494
31588
  bindings: e.bindings,
31495
31589
  "table-mode": "columns",
31496
31590
  "column-index": v.value,
@@ -31508,17 +31602,17 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31508
31602
  ])) : I("", !0)])]),
31509
31603
  _: 1
31510
31604
  }, 8, ["title"])) : I("", !0),
31511
- e.widthOnly ? I("", !0) : (H(), F(AL, {
31605
+ e.widthOnly ? I("", !0) : (H(), F(RL, {
31512
31606
  key: 1,
31513
- "props-object": i.value,
31607
+ "props-object": r.value,
31514
31608
  bindings: e.bindings,
31515
- "onUpdate:propsObject": n[7] ||= (e) => i.value = e,
31609
+ "onUpdate:propsObject": n[7] ||= (e) => r.value = e,
31516
31610
  onCommit: ve
31517
31611
  }, null, 8, ["props-object", "bindings"]))
31518
31612
  ]);
31519
31613
  };
31520
31614
  }
31521
- }), [["__scopeId", "data-v-c2e01866"]]), jR = /* @__PURE__ */ B({
31615
+ }), [["__scopeId", "data-v-c2e01866"]]), zR = /* @__PURE__ */ B({
31522
31616
  __name: "table-inspector-control",
31523
31617
  props: /*@__PURE__*/ tn({
31524
31618
  bindings: { default: void 0 },
@@ -31532,7 +31626,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31532
31626
  }),
31533
31627
  emits: /*@__PURE__*/ tn(["commit"], ["update:modelValue"]),
31534
31628
  setup(e, { emit: t }) {
31535
- let n = e, r = Dn(e, "modelValue"), i = t, a = vz(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node : pe(a.store().document.data, {
31629
+ let n = e, r = Dn(e, "modelValue"), i = t, a = Ez(), o = P(() => n.tableMode !== "layout" || !n.node ? n.node : fe(a.store().document.data, {
31536
31630
  ...n.node,
31537
31631
  props: r.value
31538
31632
  }, a.elements)), s = P({
@@ -31546,7 +31640,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31546
31640
  function c() {
31547
31641
  i("commit");
31548
31642
  }
31549
- return (t, n) => e.tableMode === "structure" || e.tableMode === "layout" ? (H(), F(AR, {
31643
+ return (t, n) => e.tableMode === "structure" || e.tableMode === "layout" ? (H(), F(RR, {
31550
31644
  key: 0,
31551
31645
  modelValue: s.value,
31552
31646
  "onUpdate:modelValue": n[0] ||= (e) => s.value = e,
@@ -31559,7 +31653,7 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31559
31653
  "width-only",
31560
31654
  "bindings",
31561
31655
  "node"
31562
- ])) : (H(), F(uR, {
31656
+ ])) : (H(), F(vR, {
31563
31657
  key: 1,
31564
31658
  "props-object": r.value,
31565
31659
  "onUpdate:propsObject": n[1] ||= (e) => r.value = e,
@@ -31572,27 +31666,27 @@ var mR = { class: "table-structure" }, hR = { class: "table-structure__section-c
31572
31666
  "table-mode"
31573
31667
  ]));
31574
31668
  }
31575
- }), MR = 0, NR;
31576
- function PR() {
31577
- --MR, MR === 0 && (NR?.(), NR = void 0);
31669
+ }), BR = 0, VR;
31670
+ function HR() {
31671
+ --BR, BR === 0 && (VR?.(), VR = void 0);
31578
31672
  }
31579
- var FR = {
31673
+ var UR = {
31580
31674
  get description() {
31581
31675
  return M("designer.tdesignForms.pluginDescription");
31582
31676
  },
31583
31677
  name: "builtin:tdesign-forms",
31584
31678
  setup: () => {
31585
- if (MR += 1, MR > 1) return PR;
31679
+ if (BR += 1, BR > 1) return HR;
31586
31680
  let e = [
31587
- ["tableContinuationLayoutField", XI],
31588
- ["booleanField", jI],
31589
- ["imageField", KI],
31590
- ["colorField", PI],
31591
- ["collectionPicker", $I],
31592
- ["tableField", jR],
31593
- ["tableBordersField", JI],
31594
- ["tableDataPreview", VI],
31595
- ["variableTextField", SL]
31681
+ ["tableContinuationLayoutField", iL],
31682
+ ["booleanField", zI],
31683
+ ["imageField", eL],
31684
+ ["colorField", HI],
31685
+ ["collectionPicker", sL],
31686
+ ["tableField", zR],
31687
+ ["tableBordersField", nL],
31688
+ ["tableDataPreview", YI],
31689
+ ["variableTextField", AL]
31596
31690
  ].map(([e, t]) => {
31597
31691
  let n = qM(e);
31598
31692
  return WM(e, t, { override: !0 }), function() {
@@ -31630,14 +31724,14 @@ var FR = {
31630
31724
  columns: n.props.columns
31631
31725
  },
31632
31726
  type: "tableDataPreview"
31633
- }))), NR = () => {
31727
+ }))), VR = () => {
31634
31728
  for (let t of e.reverse()) t();
31635
- }, PR;
31729
+ }, HR;
31636
31730
  }
31637
- }, IR = {
31731
+ }, WR = {
31638
31732
  name: "builtin:template-library",
31639
31733
  setup(e) {
31640
- let t = e.templateLibrary.register(Ze()), n = e.commands.registerScoped([
31734
+ let t = e.templateLibrary.register(Xe()), n = e.commands.registerScoped([
31641
31735
  {
31642
31736
  dividerBefore: !0,
31643
31737
  group: "file",
@@ -31683,13 +31777,13 @@ var FR = {
31683
31777
  try {
31684
31778
  o = JSON.parse(a);
31685
31779
  } catch (e) {
31686
- throw new rt(M("designer.documentStore.invalidDocumentMessage"), {
31780
+ throw new nt(M("designer.documentStore.invalidDocumentMessage"), {
31687
31781
  cause: e,
31688
31782
  code: "document.invalid"
31689
31783
  });
31690
31784
  }
31691
- let { document: s, skippedTypes: c } = ve(o, e.elements);
31692
- if (c.length) throw new rt(M("designer.documentStore.skippedElementTypesMessage", { elementTypes: c.join(", ") }), { code: "document.unsupported-elements" });
31785
+ let { document: s, skippedTypes: c } = ge(o, e.elements);
31786
+ if (c.length) throw new nt(M("designer.documentStore.skippedElementTypesMessage", { elementTypes: c.join(", ") }), { code: "document.unsupported-elements" });
31693
31787
  await r.create(s);
31694
31788
  },
31695
31789
  get title() {
@@ -31725,21 +31819,21 @@ var FR = {
31725
31819
  }
31726
31820
  };
31727
31821
  // src/plugins/pen/editing-geometry.ts
31728
- function LR(e, t) {
31822
+ function GR(e, t) {
31729
31823
  let n = Ne(e.props), r = e.rotation * Math.PI / 180, i = (t.x / n.viewWidth - .5) * e.width, a = (t.y / n.viewHeight - .5) * e.height;
31730
31824
  return {
31731
31825
  x: e.x + e.width / 2 + i * Math.cos(r) - a * Math.sin(r),
31732
31826
  y: e.y + e.height / 2 + i * Math.sin(r) + a * Math.cos(r)
31733
31827
  };
31734
31828
  }
31735
- function RR(e, t) {
31829
+ function KR(e, t) {
31736
31830
  let n = Ne(e.props), r = e.rotation * Math.PI / 180, i = t.x - e.x - e.width / 2, a = t.y - e.y - e.height / 2;
31737
31831
  return {
31738
31832
  x: ((i * Math.cos(r) + a * Math.sin(r)) / e.width + .5) * n.viewWidth,
31739
31833
  y: ((-i * Math.sin(r) + a * Math.cos(r)) / e.height + .5) * n.viewHeight
31740
31834
  };
31741
31835
  }
31742
- function zR(e, t, n, r) {
31836
+ function qR(e, t, n, r) {
31743
31837
  let i = {
31744
31838
  incoming: { ...e.incoming },
31745
31839
  outgoing: { ...e.outgoing },
@@ -31758,8 +31852,8 @@ function zR(e, t, n, r) {
31758
31852
  }
31759
31853
  return i;
31760
31854
  }
31761
- function BR(e, t) {
31762
- let n = Ne(e.props), r = we(t, n.closed), i = LR(e, {
31855
+ function JR(e, t) {
31856
+ let n = Ne(e.props), r = Ce(t, n.closed), i = GR(e, {
31763
31857
  x: r.x + r.width / 2,
31764
31858
  y: r.y + r.height / 2
31765
31859
  }), a = r.width / n.viewWidth * e.width, o = r.height / n.viewHeight * e.height;
@@ -31777,13 +31871,13 @@ function BR(e, t) {
31777
31871
  };
31778
31872
  }
31779
31873
  // src/plugins/pen/pen-edit-surface.vue?vue&type=script&setup=true&lang.ts
31780
- var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31874
+ var YR = ["aria-label"], XR = ["transform"], ZR = ["d", "stroke-width"], QR = [
31781
31875
  "x1",
31782
31876
  "y1",
31783
31877
  "x2",
31784
31878
  "y2",
31785
31879
  "stroke-width"
31786
- ], GR = [
31880
+ ], $R = [
31787
31881
  "data-pen-control",
31788
31882
  "data-anchor-index",
31789
31883
  "cx",
@@ -31791,7 +31885,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31791
31885
  "r",
31792
31886
  "stroke-width",
31793
31887
  "onPointerdown"
31794
- ], KR = [
31888
+ ], ez = [
31795
31889
  "data-anchor-index",
31796
31890
  "x",
31797
31891
  "y",
@@ -31799,7 +31893,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31799
31893
  "height",
31800
31894
  "stroke-width",
31801
31895
  "onPointerdown"
31802
- ], qR = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31896
+ ], tz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31803
31897
  __name: "pen-edit-surface",
31804
31898
  props: {
31805
31899
  context: {},
@@ -31808,9 +31902,9 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31808
31902
  },
31809
31903
  setup(e) {
31810
31904
  let t = e, n = U(), r = Sn(), i = P(() => t.context.canvas.pxPerMm), a = P(() => Ne(t.node.props).anchors.map((e) => ({
31811
- incoming: LR(t.node, e.incoming),
31812
- outgoing: LR(t.node, e.outgoing),
31813
- point: LR(t.node, e.point)
31905
+ incoming: GR(t.node, e.incoming),
31906
+ outgoing: GR(t.node, e.outgoing),
31907
+ point: GR(t.node, e.point)
31814
31908
  }))), o = `pen.edit.${t.node.id}`, s;
31815
31909
  eP([{
31816
31910
  run: () => c("cancel"),
@@ -31851,7 +31945,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31851
31945
  edit: o,
31852
31946
  index: i,
31853
31947
  node: t.node,
31854
- origin: RR(t.node, l(e)),
31948
+ origin: KR(t.node, l(e)),
31855
31949
  pointerId: e.pointerId,
31856
31950
  pullHandles: s
31857
31951
  }, n.value?.focus({ preventScroll: !0 }), n.value?.setPointerCapture(e.pointerId);
@@ -31859,11 +31953,11 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31859
31953
  function p(e) {
31860
31954
  let n = r.value;
31861
31955
  if (!n || e.pointerId !== n.pointerId || t.context.canvas.panning) return;
31862
- let i = RR(n.node, l(e)), a = n.anchors[n.index], o = {
31956
+ let i = KR(n.node, l(e)), a = n.anchors[n.index], o = {
31863
31957
  x: a[n.control].x + i.x - n.origin.x,
31864
31958
  y: a[n.control].y + i.y - n.origin.y
31865
- }, s = n.anchors.map((t, r) => r === n.index ? zR(t, n.control, o, e.altKey && !n.pullHandles) : t);
31866
- n.edit.update(BR(n.node, s)) || d(!1);
31959
+ }, s = n.anchors.map((t, r) => r === n.index ? qR(t, n.control, o, e.altKey && !n.pullHandles) : t);
31960
+ n.edit.update(JR(n.node, s)) || d(!1);
31867
31961
  }
31868
31962
  function m(e) {
31869
31963
  e.pointerId === r.value?.pointerId && h(() => d(!0));
@@ -31905,11 +31999,11 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31905
31999
  onPointercancel: r[1] ||= (e) => d(!1),
31906
32000
  onLostpointercapture: r[2] ||= (e) => d(!1)
31907
32001
  }, [R("title", null, W(G(Ae)("editHelp")), 1), R("g", { transform: `scale(${i.value})` }, [R("path", {
31908
- d: G(De)(a.value, e.node.props.closed === !0),
32002
+ d: G(Ee)(a.value, e.node.props.closed === !0),
31909
32003
  fill: "none",
31910
32004
  stroke: "#287dff",
31911
32005
  "stroke-width": 1 / i.value
31912
- }, null, 8, UR), (H(!0), L(N, null, gn(a.value, (e, t) => (H(), L("g", { key: t }, [
32006
+ }, null, 8, ZR), (H(!0), L(N, null, gn(a.value, (e, t) => (H(), L("g", { key: t }, [
31913
32007
  R("line", {
31914
32008
  x1: e.incoming.x,
31915
32009
  y1: e.incoming.y,
@@ -31917,7 +32011,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31917
32011
  y2: e.outgoing.y,
31918
32012
  stroke: "#287dff",
31919
32013
  "stroke-width": 1 / i.value
31920
- }, null, 8, WR),
32014
+ }, null, 8, QR),
31921
32015
  (H(), L(N, null, gn(["incoming", "outgoing"], (n) => R("circle", {
31922
32016
  key: n,
31923
32017
  "data-pen-control": n,
@@ -31930,7 +32024,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31930
32024
  stroke: "#287dff",
31931
32025
  "stroke-width": 1 / i.value,
31932
32026
  onPointerdown: (e) => h(() => f(e, t, n))
31933
- }, null, 40, GR)), 64)),
32027
+ }, null, 40, $R)), 64)),
31934
32028
  R("rect", {
31935
32029
  "data-pen-control": "point",
31936
32030
  "data-anchor-index": t,
@@ -31943,30 +32037,30 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31943
32037
  stroke: "white",
31944
32038
  "stroke-width": 1 / i.value,
31945
32039
  onPointerdown: (e) => h(() => f(e, t, "point"))
31946
- }, null, 40, KR)
31947
- ]))), 128))], 8, HR)], 40, VR));
32040
+ }, null, 40, ez)
32041
+ ]))), 128))], 8, XR)], 40, YR));
31948
32042
  }
31949
- }), [["__scopeId", "data-v-f5c06aa3"]]), JR = ["aria-label"], YR = ["transform"], XR = ["d", "stroke-width"], ZR = [
32043
+ }), [["__scopeId", "data-v-f5c06aa3"]]), nz = ["aria-label"], rz = ["transform"], iz = ["d", "stroke-width"], az = [
31950
32044
  "x1",
31951
32045
  "y1",
31952
32046
  "x2",
31953
32047
  "y2",
31954
32048
  "stroke-width"
31955
- ], QR = [
32049
+ ], oz = [
31956
32050
  "cx",
31957
32051
  "cy",
31958
32052
  "r"
31959
- ], $R = [
32053
+ ], sz = [
31960
32054
  "cx",
31961
32055
  "cy",
31962
32056
  "r"
31963
- ], ez = [
32057
+ ], cz = [
31964
32058
  "x",
31965
32059
  "y",
31966
32060
  "width",
31967
32061
  "height",
31968
32062
  "stroke-width"
31969
- ], tz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32063
+ ], lz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
31970
32064
  __name: "pen-surface",
31971
32065
  props: {
31972
32066
  context: {},
@@ -31976,7 +32070,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
31976
32070
  setup(e) {
31977
32071
  let t = e, n = U(), r = U([]), i = U(), a = U(), o = U(), s = U(!1), c = P(() => t.context.canvas.pxPerMm), l = P(() => t.context.canvas.panning), u = P(() => {
31978
32072
  let e = [...r.value];
31979
- return i.value && a.value === void 0 && !s.value && e.push(Me(i.value)), De(e, s.value);
32073
+ return i.value && a.value === void 0 && !s.value && e.push(Me(i.value)), Ee(e, s.value);
31980
32074
  }), d = `pen.${t.pageId}`, f;
31981
32075
  eP([
31982
32076
  {
@@ -32020,7 +32114,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32020
32114
  g(), r.value = [], i.value = void 0, s.value = !1;
32021
32115
  }
32022
32116
  function v(e = !1) {
32023
- r.value.length < 2 || t.context.canvas.add(qe, we(r.value, e), t.pageId), _();
32117
+ r.value.length < 2 || t.context.canvas.add(Ke, Ce(r.value, e), t.pageId), _();
32024
32118
  }
32025
32119
  function y() {
32026
32120
  g(), r.value.pop(), s.value = !1, r.value.length === 0 && _();
@@ -32120,7 +32214,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32120
32214
  fill: "none",
32121
32215
  stroke: "#287dff",
32122
32216
  "stroke-width": 1.5 / c.value
32123
- }, null, 8, XR), (H(!0), L(N, null, gn(r.value, (e, t) => (H(), L("g", { key: t }, [
32217
+ }, null, 8, iz), (H(!0), L(N, null, gn(r.value, (e, t) => (H(), L("g", { key: t }, [
32124
32218
  R("line", {
32125
32219
  x1: e.incoming.x,
32126
32220
  y1: e.incoming.y,
@@ -32128,19 +32222,19 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32128
32222
  y2: e.outgoing.y,
32129
32223
  stroke: "#287dff",
32130
32224
  "stroke-width": 1 / c.value
32131
- }, null, 8, ZR),
32225
+ }, null, 8, az),
32132
32226
  R("circle", {
32133
32227
  cx: e.incoming.x,
32134
32228
  cy: e.incoming.y,
32135
32229
  r: 2 / c.value,
32136
32230
  fill: "#287dff"
32137
- }, null, 8, QR),
32231
+ }, null, 8, oz),
32138
32232
  R("circle", {
32139
32233
  cx: e.outgoing.x,
32140
32234
  cy: e.outgoing.y,
32141
32235
  r: 2 / c.value,
32142
32236
  fill: "#287dff"
32143
- }, null, 8, $R),
32237
+ }, null, 8, sz),
32144
32238
  R("rect", {
32145
32239
  x: e.point.x - 3 / c.value,
32146
32240
  y: e.point.y - 3 / c.value,
@@ -32149,20 +32243,20 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32149
32243
  fill: "white",
32150
32244
  stroke: "#287dff",
32151
32245
  "stroke-width": 1 / c.value
32152
- }, null, 8, ez)
32153
- ]))), 128))], 8, YR)], 42, JR));
32246
+ }, null, 8, cz)
32247
+ ]))), 128))], 8, rz)], 42, nz));
32154
32248
  }
32155
- }), [["__scopeId", "data-v-c9805a95"]]), nz = {
32249
+ }), [["__scopeId", "data-v-c9805a95"]]), uz = {
32156
32250
  key: 0,
32157
32251
  class: "pen-overlay__help"
32158
- }, rz = {
32252
+ }, dz = {
32159
32253
  key: 1,
32160
32254
  class: "pen-overlay__help"
32161
- }, iz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32255
+ }, fz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32162
32256
  __name: "pen-overlay",
32163
32257
  props: { context: {} },
32164
32258
  setup(e) {
32165
- let t = e, n = U(), r = Sn([]), i = P(() => t.context.canvas.activeTool === ye), a = P(() => {
32259
+ let t = e, n = U(), r = Sn([]), i = P(() => t.context.canvas.activeTool === ve), a = P(() => {
32166
32260
  let e = t.context.canvas;
32167
32261
  if (e.activeTool !== "select" || e.previewing || e.panning) return;
32168
32262
  let n = e.selection, r = n.length === 1 ? n[0] : void 0;
@@ -32190,11 +32284,11 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32190
32284
  ref: n,
32191
32285
  hidden: ""
32192
32286
  }, null, 512),
32193
- i.value ? (H(), L("div", nz, W(G(Ae)("help")), 1)) : a.value ? (H(), L("div", rz, W(G(Ae)("editHelp")), 1)) : I("", !0),
32287
+ i.value ? (H(), L("div", uz, W(G(Ae)("help")), 1)) : a.value ? (H(), L("div", dz, W(G(Ae)("editHelp")), 1)) : I("", !0),
32194
32288
  i.value || a.value ? (H(!0), L(N, { key: 2 }, gn(r.value, (t) => (H(), F(zt, {
32195
32289
  key: t.id,
32196
32290
  to: t.target
32197
- }, [i.value ? (H(), F(tz, {
32291
+ }, [i.value ? (H(), F(lz, {
32198
32292
  key: 0,
32199
32293
  context: e.context,
32200
32294
  "page-id": t.id,
@@ -32203,7 +32297,7 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32203
32297
  "context",
32204
32298
  "page-id",
32205
32299
  "surface"
32206
- ])) : a.value && o.value === t.id ? (H(), F(qR, {
32300
+ ])) : a.value && o.value === t.id ? (H(), F(tz, {
32207
32301
  key: a.value.id,
32208
32302
  context: e.context,
32209
32303
  node: a.value,
@@ -32215,19 +32309,19 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32215
32309
  ])) : I("", !0)], 8, ["to"]))), 128)) : I("", !0)
32216
32310
  ], 64));
32217
32311
  }
32218
- }), [["__scopeId", "data-v-7e06a67d"]]), az = ["viewBox"], oz = [
32312
+ }), [["__scopeId", "data-v-7e06a67d"]]), pz = ["viewBox"], mz = [
32219
32313
  "d",
32220
32314
  "fill",
32221
32315
  "stroke",
32222
32316
  "stroke-width"
32223
- ], sz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32317
+ ], hz = /*#__PURE__*/ Ua(/* @__PURE__ */ B({
32224
32318
  __name: "pen-preview",
32225
32319
  props: {
32226
32320
  node: {},
32227
32321
  pxPerMm: {}
32228
32322
  },
32229
32323
  setup(e) {
32230
- let t = e, n = P(() => Ne(t.node.props)), r = P(() => De(n.value.anchors, n.value.closed));
32324
+ let t = e, n = P(() => Ne(t.node.props)), r = P(() => Ee(n.value.anchors, n.value.closed));
32231
32325
  return (t, i) => (H(), L("svg", {
32232
32326
  width: "100%",
32233
32327
  height: "100%",
@@ -32241,9 +32335,9 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32241
32335
  "stroke-width": G(Oe)(e.node.props),
32242
32336
  "stroke-linecap": "round",
32243
32337
  "stroke-linejoin": "round"
32244
- }, null, 8, oz)], 8, az));
32338
+ }, null, 8, mz)], 8, pz));
32245
32339
  }
32246
- }), [["__scopeId", "data-v-60b47ca0"]]), cz = {
32340
+ }), [["__scopeId", "data-v-60b47ca0"]]), gz = {
32247
32341
  manifest: {
32248
32342
  apiVersion: "1.0",
32249
32343
  id: "print-studio:pen-tool",
@@ -32259,24 +32353,24 @@ var VR = ["aria-label"], HR = ["transform"], UR = ["d", "stroke-width"], WR = [
32259
32353
  setup(e) {
32260
32354
  e.locales.register(ke);
32261
32355
  let t = e.canvas.registerElement({
32262
- ...Ke(),
32263
- previewComponent: en(sz)
32356
+ ...Ge(),
32357
+ previewComponent: en(hz)
32264
32358
  }, { replace: !0 });
32265
32359
  return e.slots.add("designer.shell.after", "pen.overlay", {
32266
- component: en(iz),
32360
+ component: en(fz),
32267
32361
  props: { context: e }
32268
32362
  }), t;
32269
32363
  }
32270
- }, lz = {
32364
+ }, _z = {
32271
32365
  name: "builtin:pen-tool",
32272
32366
  setup(e) {
32273
- if (!e.plugins.has(cz.manifest.id)) return e.plugins.use(cz), () => {
32274
- e.plugins.dispose(cz.manifest.id);
32367
+ if (!e.plugins.has(gz.manifest.id)) return e.plugins.use(gz), () => {
32368
+ e.plugins.dispose(gz.manifest.id);
32275
32369
  };
32276
32370
  }
32277
32371
  };
32278
32372
  // src/designer/tutorials/scene.ts
32279
- function uz() {
32373
+ function vz() {
32280
32374
  let e = [], t = {}, n;
32281
32375
  function r(t) {
32282
32376
  e.push(t);
@@ -32297,12 +32391,12 @@ function uz() {
32297
32391
  };
32298
32392
  }
32299
32393
  function s() {
32300
- let r = [...e], i = At(t), a = At(n);
32394
+ let r = [...e], i = kt(t), a = kt(n);
32301
32395
  return (e) => {
32302
32396
  let t = e.store();
32303
32397
  for (let t of r) t(e);
32304
32398
  t.ui.closeContextMenu();
32305
- let n = At(i);
32399
+ let n = kt(i);
32306
32400
  if (n.dialog) {
32307
32401
  let e = n.dialog, r = e.pageId === "$active" ? t.scope.active.id : e.pageId;
32308
32402
  t.ui.openDialog(e.name, r, e.groupId, e.guideId, {
@@ -32327,15 +32421,15 @@ function uz() {
32327
32421
  };
32328
32422
  }
32329
32423
  // src/designer/tutorials/screenplay.ts
32330
- function dz(e, t) {
32331
- let n = [], r = uz(), i = {}, a = {
32424
+ function yz(e, t) {
32425
+ let n = [], r = vz(), i = {}, a = {
32332
32426
  key: "",
32333
32427
  label: "",
32334
32428
  schema: [{
32335
32429
  name: "field1",
32336
32430
  type: "string"
32337
32431
  }]
32338
- }, o = "", s = 0, c, l = t?.createProps().fontSize, u = (t) => Ue(e.id, t), d = (e) => ({
32432
+ }, o = "", s = 0, c, l = t?.createProps().fontSize, u = (t) => He(e.id, t), d = (e) => ({
32339
32433
  selector: "[data-menu-label]",
32340
32434
  text: M(`designer.types.${e}`)
32341
32435
  }), f = (e) => ({ selector: `[data-command="${e}"]` }), p = (e = "") => ({ selector: `$dialog ${e}`.trim() });
@@ -32402,7 +32496,7 @@ function dz(e, t) {
32402
32496
  text: t
32403
32497
  }, M("designer.tutorialPlayback.optionHint", { setting: t })), i = {
32404
32498
  ...i,
32405
- target: `element:${Je}`
32499
+ target: `element:${qe}`
32406
32500
  }, r.updateUi({
32407
32501
  select: void 0,
32408
32502
  values: i
@@ -32470,35 +32564,35 @@ function dz(e, t) {
32470
32564
  "table",
32471
32565
  {
32472
32566
  ...t,
32473
- id: Je,
32567
+ id: qe,
32474
32568
  name: u("detailsName")
32475
32569
  },
32476
32570
  e.store().scope.active.id
32477
32571
  ],
32478
32572
  command: "element.add",
32479
32573
  drawing: t,
32480
- elementId: Je
32574
+ elementId: qe
32481
32575
  }), r.remember((e) => {
32482
32576
  let n = e.store();
32483
32577
  n.element.add("table", {
32484
32578
  ...t,
32485
- id: Je,
32579
+ id: qe,
32486
32580
  name: u("detailsName")
32487
- }, n.scope.active.id), n.selection.set([Je]);
32488
- }), T({ selector: `[data-element-id="${Je}"]` }, M("designer.tutorialPlayback.elementMenuHint")), g(f("element.openSettings")), r.updateUi({
32581
+ }, n.scope.active.id), n.selection.set([qe]);
32582
+ }), T({ selector: `[data-element-id="${qe}"]` }, M("designer.tutorialPlayback.elementMenuHint")), g(f("element.openSettings")), r.updateUi({
32489
32583
  dialog: { name: "element" },
32490
32584
  tab: void 0
32491
32585
  }), x(M("elements.tableElement.dataTab")), g(p("[data-inspector-key=\"rows\"] .inspector-field__binding button"), M("designer.tutorialPlayback.tableDataTabHint")), r.updateUi({ binding: {
32492
32586
  field: "rows",
32493
- nodeId: Je,
32587
+ nodeId: qe,
32494
32588
  path: ""
32495
32589
  } }), g({ selector: "$dialog button[title=\"bill.items\"]" }, M("designer.tutorialPlayback.collectionHint")), r.updateUi({ binding: {
32496
32590
  field: "rows",
32497
- nodeId: Je,
32591
+ nodeId: qe,
32498
32592
  path: "bill.items"
32499
- } }), g(p("#replace")), r.remember((e) => e.store().element.update(Je, { bindings: { rows: "bill.items" } })), r.updateUi({ binding: void 0 }), x(M("elements.tableElement.columnsTab"));
32593
+ } }), g(p("#replace")), r.remember((e) => e.store().element.update(qe, { bindings: { rows: "bill.items" } })), r.updateUi({ binding: void 0 }), x(M("elements.tableElement.columnsTab"));
32500
32594
  let n = [];
32501
- Re.forEach((e, t) => {
32595
+ Le.forEach((e, t) => {
32502
32596
  n.push({
32503
32597
  target: {
32504
32598
  ...p(`[data-header-row="0"][data-header-col="${t}"]`),
@@ -32512,16 +32606,16 @@ function dz(e, t) {
32512
32606
  },
32513
32607
  value: e.bind
32514
32608
  });
32515
- }), h("input", p(".table-structure"), M("designer.tutorialPlayback.columnsTitle"), M("designer.tutorialPlayback.columnsHint"), { inputs: n }), Re.forEach((e, t) => {
32609
+ }), h("input", p(".table-structure"), M("designer.tutorialPlayback.columnsTitle"), M("designer.tutorialPlayback.columnsHint"), { inputs: n }), Le.forEach((e, t) => {
32516
32610
  O(t, {
32517
32611
  bind: e.bind,
32518
32612
  title: u(e.key)
32519
32613
  });
32520
- }), r.updateUi({ column: Re.length - 1 }), w();
32614
+ }), r.updateUi({ column: Le.length - 1 }), w();
32521
32615
  }
32522
32616
  function O(e, t) {
32523
32617
  r.remember((n) => {
32524
- let r = n.store(), i = r.element.find(Je)?.node;
32618
+ let r = n.store(), i = r.element.find(qe)?.node;
32525
32619
  if (!i) return;
32526
32620
  let a = i.props.columns.map((n, r) => r === e ? {
32527
32621
  ...n,
@@ -32533,7 +32627,7 @@ function dz(e, t) {
32533
32627
  function k(e, t = !1, n = !1) {
32534
32628
  r.updateUi({
32535
32629
  dataSource: {
32536
- draft: At(a),
32630
+ draft: kt(a),
32537
32631
  replacement: t,
32538
32632
  sampleJson: o,
32539
32633
  saved: n,
@@ -32597,12 +32691,12 @@ function dz(e, t) {
32597
32691
  }, null, 2), M("designer.dataSourceDialog.sampleDataLabel"), void 0, M("designer.tutorialPlayback.sampleInputPurpose")), o = n.at(-1)?.value ?? "", k("sample"), g({
32598
32692
  selector: "$dialog button",
32599
32693
  text: M("designer.dataSourceDialog.generateSchemaButton")
32600
- }, M("designer.tutorialPlayback.inferSchemaHint")), k("sample", !0), g(p(".t-dialog__footer .t-button--theme-primary")), a.schema = st(JSON.parse(o)), k("schema"), g(p("#save"));
32601
- let j = At({
32694
+ }, M("designer.tutorialPlayback.inferSchemaHint")), k("sample", !0), g(p(".t-dialog__footer .t-button--theme-primary")), a.schema = ot(JSON.parse(o)), k("schema"), g(p("#save"));
32695
+ let j = kt({
32602
32696
  ...a,
32603
32697
  sampleData: JSON.parse(o)
32604
32698
  });
32605
- return r.remember((e) => e.store().dataSource.upsert(At(j))), k("schema", !1, !0), g(p("#close")), r.closeUi(), i = {}, E("tutorial-number", { y: 33 }, M("designer.tutorial.documentNumber", {
32699
+ return r.remember((e) => e.store().dataSource.upsert(kt(j))), k("schema", !1, !0), g(p("#close")), r.closeUi(), i = {}, E("tutorial-number", { y: 33 }, M("designer.tutorial.documentNumber", {
32606
32700
  date: "{{ bill.date }}",
32607
32701
  number: "{{ bill.number }}"
32608
32702
  })), D(), E("tutorial-total", { y: 77 }, M("designer.tutorial.documentTotal", { amount: "{{ bill.total | currency }}" })), E("tutorial-signature", { y: 88 }, u("signature")), m(), h("command", { selector: "[data-element-id=\"tutorial-total\"]" }, M("designer.tutorialPlayback.selectTitle"), M("designer.tutorialPlayback.followSelectHint"), {
@@ -32614,7 +32708,7 @@ function dz(e, t) {
32614
32708
  }), y("name", M("designer.tutorial.documentSummary"), "designer.followBlock.nameLabel"), S(p("[data-sform-field=\"target\"] .t-select"), u("detailsName")), y("gap", 5, "designer.followBlock.gapLabel"), g(p("#confirm")), r.remember((e) => {
32615
32709
  let t = e.store();
32616
32710
  t.followBlock.create(t.page.list[0].id, ["tutorial-total", "tutorial-signature"], {
32617
- id: Je,
32711
+ id: qe,
32618
32712
  kind: "element"
32619
32713
  }, 5, M("designer.tutorial.documentSummary"));
32620
32714
  }), r.closeUi(), i = {}, m(), g(d("page")), r.updateUi({ menu: M("designer.types.page") }), g(f("page.add")), r.updateUi({
@@ -32635,7 +32729,7 @@ function dz(e, t) {
32635
32729
  }), _(p(), M("designer.tutorialPlayback.printPreviewHint")), w(), m(), _({ selector: "[data-tutorial=\"canvas\"]" }, M("designer.tutorialPlayback.completeHint")), n;
32636
32730
  }
32637
32731
  // src/designer/plugins/tutorials.ts
32638
- var fz = {
32732
+ var bz = {
32639
32733
  name: "builtin:tutorials",
32640
32734
  setup(e) {
32641
32735
  let t = e.commands.registerScoped([
@@ -32643,8 +32737,8 @@ var fz = {
32643
32737
  id: "tutorial.start",
32644
32738
  run: (t, n) => {
32645
32739
  if (typeof n == "string") {
32646
- let t = We.find((e) => e.id === n);
32647
- t && e.store().tutorial.start(n, () => dz(t, e.elements.get("text")));
32740
+ let t = Ue.find((e) => e.id === n);
32741
+ t && e.store().tutorial.start(n, () => yz(t, e.elements.get("text")));
32648
32742
  }
32649
32743
  },
32650
32744
  get title() {
@@ -32687,38 +32781,38 @@ var fz = {
32687
32781
  e.store().tutorial.finish(!1), e.store().tutorial.close(), t();
32688
32782
  };
32689
32783
  }
32690
- }, pz = {
32784
+ }, xz = {
32691
32785
  get description() {
32692
32786
  return M("designer.builtins.commandsPluginDescription");
32693
32787
  },
32694
32788
  name: "builtin:commands",
32695
32789
  setup: (e) => na(e)
32696
32790
  };
32697
- function mz(e, t = (t) => e.plugins.use(t)) {
32698
- e.plugins.has(xe.name) || (e.plugins.trustHostPlugin(xe), t(xe)), Ee(e);
32791
+ function Sz(e, t = (t) => e.plugins.use(t)) {
32792
+ e.plugins.has(be.name) || (e.plugins.trustHostPlugin(be), t(be)), Te(e);
32699
32793
  for (let n of [
32700
- pz,
32701
- fz,
32702
- IR,
32703
- kI,
32794
+ xz,
32795
+ bz,
32796
+ WR,
32797
+ LI,
32704
32798
  Ka,
32705
- lz,
32706
- FR,
32799
+ _z,
32800
+ UR,
32707
32801
  aa
32708
32802
  ]) e.plugins.has(n.name) || (e.plugins.trustHostPlugin(n), t(n));
32709
32803
  }
32710
32804
  // src/designer/context/editor-context.ts
32711
- var hz = null;
32712
- function gz() {
32713
- if (hz) return hz;
32714
- let e = Te(), t = new be(), n = {
32715
- commands: new Le(() => n, e),
32716
- elements: de,
32717
- errors: nt(),
32805
+ var Cz = null;
32806
+ function wz() {
32807
+ if (Cz) return Cz;
32808
+ let e = De(), t = new ye(), n = {
32809
+ commands: new we(() => n, e),
32810
+ elements: ue,
32811
+ errors: tt(),
32718
32812
  events: e,
32719
32813
  extensions: t,
32720
32814
  getSelection: () => {
32721
- let e = Ve(), t = e.selection.nodes;
32815
+ let e = Be(), t = e.selection.nodes;
32722
32816
  return {
32723
32817
  bounds: e.selection.bounds,
32724
32818
  ids: [...e.selection.ids],
@@ -32728,9 +32822,9 @@ function gz() {
32728
32822
  },
32729
32823
  parsers: g,
32730
32824
  plugins: new Fe(() => n),
32731
- preferences: new Be(),
32732
- store: () => Ve(),
32733
- templateLibrary: new et(),
32825
+ preferences: new ze(),
32826
+ store: () => Be(),
32827
+ templateLibrary: new $e(),
32734
32828
  get use() {
32735
32829
  return n.plugins.use.bind(n.plugins);
32736
32830
  },
@@ -32738,22 +32832,22 @@ function gz() {
32738
32832
  return n.store().zIndex;
32739
32833
  }
32740
32834
  };
32741
- return hz = n, n;
32835
+ return Cz = n, n;
32742
32836
  }
32743
- function _z(e, t = {}) {
32744
- let n = Qe(t);
32745
- return hz = n, n.store().config.configure(t), e.provide(Xe, n), e.provide(ae, n.zIndex), Ci(e, n.errors), Si(n.errors), mz(n), n;
32837
+ function Tz(e, t = {}) {
32838
+ let n = Ze(t);
32839
+ return Cz = n, n.store().config.configure(t), e.provide(Ye, n), e.provide(se, n.zIndex), Ci(e, n.errors), Si(n.errors), Sz(n), n;
32746
32840
  }
32747
- function vz() {
32748
- return Zt(Xe, null) ?? gz();
32841
+ function Ez() {
32842
+ return Zt(Ye, null) ?? wz();
32749
32843
  }
32750
32844
  // src/designer/facade/use-print-studio.ts
32751
- function yz(e = {}) {
32752
- let t = Xt() ? Zt(Xe, null) : null, n = e.context ?? t, r = n ? Ye(n, e) : $e(e);
32845
+ function Dz(e = {}) {
32846
+ let t = Xt() ? Zt(Ye, null) : null, n = e.context ?? t, r = n ? Je(n, e) : Qe(e);
32753
32847
  return Kt() && ln(r.dispose), r;
32754
32848
  }
32755
32849
  // src/designer/frame/print-designer-frame.vue
32756
- var bz = /* @__PURE__ */ B({
32850
+ var Oz = /* @__PURE__ */ B({
32757
32851
  __name: "print-designer-frame",
32758
32852
  props: {
32759
32853
  context: {},
@@ -32777,15 +32871,15 @@ var bz = /* @__PURE__ */ B({
32777
32871
  "ready"
32778
32872
  ],
32779
32873
  setup(e, { expose: t, emit: n }) {
32780
- let r = e, i = n, a = U(), o = (r.studio ? Ge(r.studio) : r.context) ?? Qe({
32781
- createDocument: () => ue(r.presets),
32874
+ let r = e, i = n, a = U(), o = (r.studio ? We(r.studio) : r.context) ?? Ze({
32875
+ createDocument: () => Ft(r.presets),
32782
32876
  elements: r.elements,
32783
32877
  initialDocument: r.initialDocument,
32784
32878
  onSave: r.onSave ? h : void 0,
32785
32879
  parsers: r.parsers,
32786
32880
  rendering: r.rendering,
32787
32881
  storage: r.storage ?? !1
32788
- }), s, c = !1, l = r.studio ? ze(r.studio, d) : void 0, u = xn({
32882
+ }), s, c = !1, l = r.studio ? Re(r.studio, d) : void 0, u = xn({
32789
32883
  context: o,
32790
32884
  "onDirty-change": (e) => i("dirty-change", e),
32791
32885
  onDispose: d,
@@ -32834,7 +32928,7 @@ var bz = /* @__PURE__ */ B({
32834
32928
  u.ui = e;
32835
32929
  }), cn(() => {
32836
32930
  if (a.value && !c) try {
32837
- s = oe(a.value, u);
32931
+ s = le(a.value, u);
32838
32932
  } catch (e) {
32839
32933
  _(e), d();
32840
32934
  }
@@ -32845,4 +32939,4 @@ var bz = /* @__PURE__ */ B({
32845
32939
  }, null, 512));
32846
32940
  }
32847
32941
  });
32848
- export { bz as PrintDesigner, Qe as createEditorContext, It as definePlugin, _z as installDesigner, yz as usePrintStudio };
32942
+ export { Oz as PrintDesigner, Ze as createEditorContext, It as definePlugin, Tz as installDesigner, Dz as usePrintStudio };