@nivaro/react 0.3.35 → 0.3.36

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.
@@ -1,7 +1,7 @@
1
- import { jsxs as y, jsx as o, Fragment as ae } from "react/jsx-runtime";
1
+ import { jsxs as h, jsx as o, Fragment as se } from "react/jsx-runtime";
2
2
  import { useQueryClient as rr, useQuery as or } from "@tanstack/react-query";
3
3
  import { Percent as nr, ListOrdered as ar, AlertTriangle as vt, Lock as sr, Plus as ir, BarChart3 as lr, LayoutGrid as dr, Table2 as cr, Grid3x3 as ur, Users as pr } from "lucide-react";
4
- import { useState as N, useEffect as U, useMemo as b, useRef as j, useCallback as C } from "react";
4
+ import { useState as L, useEffect as q, useMemo as b, useRef as j, useCallback as C } from "react";
5
5
  import { createPortal as mr } from "react-dom";
6
6
  import { toast as gt } from "sonner";
7
7
  import { useNivaroClient as fr } from "../../context.js";
@@ -31,63 +31,64 @@ import { changeNotePolicyOf as xt, changeNoteMeta as Ur, changeNoteReady as $r,
31
31
  import { PresenceAvatars as Wr, DroppedBanner as Hr, RecoveryBanner as jr, UnsavedList as Gr } from "./CollabParts.js";
32
32
  import { CommandPalette as Qr } from "./commands/CommandPalette.js";
33
33
  import { nextSelection as Yr, targetKey as z } from "./design-context.js";
34
- import { WIDTH_LABELS as Jr } from "./field-zones.js";
35
- import { LayoutDndProvider as Zr, useLayoutDnd as Xr } from "./dnd/LayoutDndProvider.js";
36
- import { NO_DND as eo } from "./dnd/node.js";
37
- import { useDraftRecovery as to, stagedTip as ro } from "./draft-recovery.js";
38
- import { canvasRenderer as oo, EditorCanvas as no } from "./EditorCanvas.js";
39
- import { EditorTopBar as ao } from "./EditorTopBar.js";
40
- import { notesOf as so, noteKey as io } from "./editor-notes.js";
34
+ import { LayoutDndProvider as Jr, useLayoutDnd as Zr } from "./dnd/LayoutDndProvider.js";
35
+ import { NO_DND as Xr } from "./dnd/node.js";
36
+ import { useDraftRecovery as eo, stagedTip as to } from "./draft-recovery.js";
37
+ import { canvasRenderer as ro, EditorCanvas as oo } from "./EditorCanvas.js";
38
+ import { EditorTopBar as no } from "./EditorTopBar.js";
39
+ import { notesOf as ao, noteKey as so } from "./editor-notes.js";
41
40
  import { EntryEditorContext as St } from "./entry/entry-editor-context.js";
42
- import { useTabOrderEditor as lo, TabOrderBar as co } from "./entry/tab-order.js";
43
- import { useAppIsDark as uo, ThemePreviewTool as po, previewThemeClass as mo } from "./entry/theme-preview.js";
44
- import { useRulesView as fo, explainMarks as yo, RulesToggle as ho, RuleLoopsBanner as vo } from "./explain/CanvasRules.js";
45
- import { useDriverHover as go } from "./explain/driver-hover.js";
46
- import { useCanvasExplain as ko, useDefaultGhosts as wo } from "./explain/use-explain.js";
47
- import { FindReplaceButton as bo } from "./FindReplace.js";
48
- import { OutputsButton as xo } from "./outputs/OutputsButton.js";
49
- import { FormMapButton as So } from "./FormMapButton.js";
50
- import { useSectionChanges as Co } from "./history-api.js";
51
- import { useLayoutEditorHost as To } from "./host.js";
52
- import { overriddenTargets as Oo, overrideMark as Ao } from "./inheritance.js";
53
- import { BulkInspector as Po } from "./inspector/BulkInspector.js";
54
- import { requestInspectorTab as Lo } from "./inspector/tab-request.js";
41
+ import { useTabOrderEditor as io, TabOrderBar as lo } from "./entry/tab-order.js";
42
+ import { useAppIsDark as co, ThemePreviewTool as uo, previewThemeClass as po } from "./entry/theme-preview.js";
43
+ import { useRulesView as mo, explainMarks as fo, RulesToggle as yo, RuleLoopsBanner as ho } from "./explain/CanvasRules.js";
44
+ import { useDriverHover as vo } from "./explain/driver-hover.js";
45
+ import { useCanvasExplain as go, useDefaultGhosts as ko } from "./explain/use-explain.js";
46
+ import { FindReplaceButton as wo } from "./FindReplace.js";
47
+ import { FormMapButton as bo } from "./FormMapButton.js";
48
+ import { WIDTH_LABELS as xo } from "./field-zones.js";
49
+ import { useSectionChanges as So } from "./history-api.js";
50
+ import { useLayoutEditorHost as Co } from "./host.js";
51
+ import { overriddenTargets as To, overrideMark as Oo } from "./inheritance.js";
52
+ import { BulkInspector as Ao } from "./inspector/BulkInspector.js";
53
+ import { requestInspectorTab as Po } from "./inspector/tab-request.js";
55
54
  import { isTyping as $e } from "./is-typing.js";
56
- import { ARROW_DIRS as No, altArrowMove as Ro } from "./keyboard-move.js";
57
- import { LayoutsRail as Eo } from "./LayoutsRail.js";
58
- import { LintButton as Do, LintPanel as Fo } from "./lint/LintPanel.js";
59
- import { useLayoutLint as Io } from "./lint/lint-api.js";
60
- import { FieldStateMatrix as Ko } from "./matrix/FieldStateMatrix.js";
61
- import { RoleSectionMatrix as _o } from "./matrix/RoleSectionMatrix.js";
62
- import { FindTool as Mo, OutlineTool as Bo, ViewTools as qo, ShortcutsTool as Uo } from "./nav/NavTools.js";
63
- import { OutlinePanel as $o } from "./nav/OutlinePanel.js";
64
- import { useEditorNav as zo } from "./nav/useEditorNav.js";
65
- import { COMPACT_ZOOM as Vo } from "./nav/view-prefs.js";
55
+ import { ARROW_DIRS as Lo, altArrowMove as No } from "./keyboard-move.js";
56
+ import { LayoutsRail as Ro } from "./LayoutsRail.js";
57
+ import { LintButton as Eo, LintPanel as Do } from "./lint/LintPanel.js";
58
+ import { useLayoutLint as Fo } from "./lint/lint-api.js";
59
+ import { FieldStateMatrix as Io } from "./matrix/FieldStateMatrix.js";
60
+ import { RoleSectionMatrix as Ko } from "./matrix/RoleSectionMatrix.js";
61
+ import { FindTool as _o, OutlineTool as Mo, ViewTools as Bo, ShortcutsTool as qo } from "./nav/NavTools.js";
62
+ import { OutlinePanel as Uo } from "./nav/OutlinePanel.js";
63
+ import { useEditorNav as $o } from "./nav/useEditorNav.js";
64
+ import { COMPACT_ZOOM as zo } from "./nav/view-prefs.js";
65
+ import { OutputsButton as Vo } from "./outputs/OutputsButton.js";
66
66
  import { useLayoutOverview as Wo, useOverviewFields as Ho, useInvalidateLayouts as Nt, useRuleChoiceLabels as jo, useApproxRecordCount as Go } from "./overview/overview-api.js";
67
67
  import { purposeSegments as Qo, Sentence as Yo } from "./overview/purpose.js";
68
68
  import { PlacementsTable as Jo } from "./PlacementsTable.js";
69
69
  import { segTrack as Zo, amberStrip as Me, segOption as Xo } from "./panel-style.js";
70
- import { useLayoutPresence as en, peersByTarget as tn } from "./presence.js";
71
- import { PreviewModes as rn } from "./preview/PreviewModes.js";
72
- import { PreviewPanes as on } from "./preview/PreviewPanes.js";
73
- import { FormMoreMenu as nn } from "./reuse/FormMoreMenu.js";
74
- import { useRailCopy as an } from "./reuse/useRailCopy.js";
75
- import { StagedByOthers as sn } from "./StagedChip.js";
76
- import { StructureActions as ln, usePinMarks as dn } from "./StructureMenu.js";
77
- import { useRolePreview as cn } from "./settings/settings-api.js";
78
- import { layoutKindOf as un } from "./settings/settings-registry.js";
79
- import { useStagedDraft as pn, useStagedWriter as mn } from "./staged-api.js";
80
- import { ImpactButton as fn, TestingButton as yn } from "./testing/TestingPanels.js";
70
+ import { usePersonalDefaultMarks as en } from "./personal-default-marks.js";
71
+ import { useLayoutPresence as tn, peersByTarget as rn } from "./presence.js";
72
+ import { PreviewModes as on } from "./preview/PreviewModes.js";
73
+ import { PreviewPanes as nn } from "./preview/PreviewPanes.js";
74
+ import { FormMoreMenu as an } from "./reuse/FormMoreMenu.js";
75
+ import { useRailCopy as sn } from "./reuse/useRailCopy.js";
76
+ import { StagedByOthers as ln } from "./StagedChip.js";
77
+ import { StructureActions as dn, usePinMarks as cn } from "./StructureMenu.js";
78
+ import { useRolePreview as un } from "./settings/settings-api.js";
79
+ import { layoutKindOf as pn } from "./settings/settings-registry.js";
80
+ import { useStagedDraft as mn, useStagedWriter as fn } from "./staged-api.js";
81
+ import { ImpactButton as yn, TestingButton as hn } from "./testing/TestingPanels.js";
81
82
  import { MenuSeparator as Ce, ToolButton as Ct } from "./toolbar-kit.js";
82
- import { unsavedText as hn, UnsavedConfirm as vn } from "./UnsavedConfirm.js";
83
- import { unsavedKeys as gn, targetFromKey as Tt, describeTarget as Ot } from "./unsaved-marks.js";
84
- import { UsagePanel as kn } from "./usage/UsagePanel.js";
85
- import { useShowFillRates as wn, useFieldFillRates as bn, usageTodayText as xn, useLayoutUsageToday as Sn } from "./usage/usage-api.js";
86
- import { useLayoutDraft as Cn, useLayoutBundle as Be, layoutDraftKeys as Tn, touchesOverview as On } from "./useLayoutDraft.js";
87
- import { FormSettings as An } from "./settings/FormSettings.js";
88
- import { Inspector as Pn } from "./inspector/Inspector.js";
89
- function Ln(r) {
90
- U(() => {
83
+ import { unsavedText as vn, UnsavedConfirm as gn } from "./UnsavedConfirm.js";
84
+ import { unsavedKeys as kn, targetFromKey as Tt, describeTarget as Ot } from "./unsaved-marks.js";
85
+ import { UsagePanel as wn } from "./usage/UsagePanel.js";
86
+ import { useShowFillRates as bn, useFieldFillRates as xn, usageTodayText as Sn, useLayoutUsageToday as Cn } from "./usage/usage-api.js";
87
+ import { useLayoutDraft as Tn, useLayoutBundle as Be, layoutDraftKeys as On, touchesOverview as An } from "./useLayoutDraft.js";
88
+ import { FormSettings as Pn } from "./settings/FormSettings.js";
89
+ import { Inspector as Ln } from "./inspector/Inspector.js";
90
+ function Nn(r) {
91
+ q(() => {
91
92
  const i = (s) => {
92
93
  if (!(s.metaKey || s.ctrlKey) || s.altKey) return;
93
94
  const l = s.key.toLowerCase();
@@ -101,51 +102,51 @@ function Ln(r) {
101
102
  return window.addEventListener("keydown", i), () => window.removeEventListener("keydown", i);
102
103
  }, [r.undo, r.redo, r.autosave, r.flush, r.save]);
103
104
  }
104
- function Nn(r, i, s, l, m) {
105
- U(() => {
105
+ function Rn(r, i, s, l, m) {
106
+ q(() => {
106
107
  const d = (c) => {
107
- const v = No[c.key];
108
- if (!v || !c.altKey || c.metaKey || c.ctrlKey || c.shiftKey || c.defaultPrevented || !r || i.length !== 1 || l.current || $e(c.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) return;
108
+ const g = Lo[c.key];
109
+ if (!g || !c.altKey || c.metaKey || c.ctrlKey || c.shiftKey || c.defaultPrevented || !r || i.length !== 1 || l.current || $e(c.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]')) return;
109
110
  c.preventDefault();
110
- const p = Ro(r, i[0], v);
111
+ const p = No(r, i[0], g);
111
112
  if (!p) return;
112
113
  s(p.ops, { label: p.label }), m(p.next);
113
114
  const u = z(p.next);
114
115
  requestAnimationFrame(() => {
115
116
  var Q;
116
- const g = document.querySelector(
117
+ const k = document.querySelector(
117
118
  `[data-layout-editor] [data-design-target="${CSS.escape(u)}"]`
118
119
  );
119
- g == null || g.focus({ preventScroll: !0 }), (Q = g == null ? void 0 : g.scrollIntoView) == null || Q.call(g, { block: "nearest" });
120
+ k == null || k.focus({ preventScroll: !0 }), (Q = k == null ? void 0 : k.scrollIntoView) == null || Q.call(k, { block: "nearest" });
120
121
  });
121
122
  };
122
123
  return window.addEventListener("keydown", d), () => window.removeEventListener("keydown", d);
123
124
  }, [r, i, s, l, m]);
124
125
  }
125
- function Rn(r) {
126
+ function En(r) {
126
127
  const i = r.status === "saving" || r.dirty;
127
- wr(i, "Layout changes"), U(() => {
128
+ wr(i, "Layout changes"), q(() => {
128
129
  if (!i) return;
129
130
  const s = (l) => {
130
131
  r.flush(), l.preventDefault(), l.returnValue = "";
131
132
  };
132
133
  return window.addEventListener("beforeunload", s), () => window.removeEventListener("beforeunload", s);
133
- }, [i, r.flush]), U(() => {
134
+ }, [i, r.flush]), q(() => {
134
135
  const s = () => r.flush();
135
136
  return window.addEventListener("pagehide", s), () => window.removeEventListener("pagehide", s);
136
137
  }, [r.flush]);
137
138
  }
138
- function En(r) {
139
+ function Dn(r) {
139
140
  const i = rr(), s = Nt(r);
140
141
  return C(
141
142
  (l, m) => {
142
143
  const d = Number(l.layout.id);
143
- Number.isFinite(d) && i.invalidateQueries({ queryKey: Tn.versions(d) }), s({ lazy: !On(m) });
144
+ Number.isFinite(d) && i.invalidateQueries({ queryKey: On.versions(d) }), s({ lazy: !An(m) });
144
145
  },
145
146
  [i, s]
146
147
  );
147
148
  }
148
- function Dn(r, i) {
149
+ function Fn(r, i) {
149
150
  const s = fr();
150
151
  return or({
151
152
  queryKey: ["layout-editor", "preview-record", r, i],
@@ -156,9 +157,9 @@ function Dn(r, i) {
156
157
  staleTime: 3e4
157
158
  });
158
159
  }
159
- function Fn(r, i) {
160
+ function In(r, i) {
160
161
  const s = j(i);
161
- s.current = i, U(() => {
162
+ s.current = i, q(() => {
162
163
  if (!r) return;
163
164
  let l = !1;
164
165
  const m = (d) => {
@@ -166,13 +167,13 @@ function Fn(r, i) {
166
167
  if (l || d.defaultPrevented || d.button !== 0 || d.metaKey || d.ctrlKey || d.shiftKey || d.altKey) return;
167
168
  const c = (u = (p = d.target) == null ? void 0 : p.closest) == null ? void 0 : u.call(p, "a[href]");
168
169
  if (!c || c.target && c.target !== "_self" || c.hasAttribute("download")) return;
169
- let v;
170
+ let g;
170
171
  try {
171
- v = new URL(c.href, window.location.href);
172
+ g = new URL(c.href, window.location.href);
172
173
  } catch {
173
174
  return;
174
175
  }
175
- v.origin === window.location.origin && v.pathname + v.search !== window.location.pathname + window.location.search && (d.preventDefault(), d.stopPropagation(), s.current(() => {
176
+ g.origin === window.location.origin && g.pathname + g.search !== window.location.pathname + window.location.search && (d.preventDefault(), d.stopPropagation(), s.current(() => {
176
177
  l = !0;
177
178
  try {
178
179
  c.click();
@@ -192,13 +193,13 @@ function qe(r, i, s = null) {
192
193
  };
193
194
  return l(i) || s != null && l(s);
194
195
  }
195
- function In(r, i, s) {
196
+ function Kn(r, i, s) {
196
197
  const l = j(null), m = j(i);
197
- return m.current = i, U(() => {
198
- var v;
198
+ return m.current = i, q(() => {
199
+ var g;
199
200
  if (!r) return;
200
201
  const d = document.activeElement;
201
- (v = l.current) == null || v.focus();
202
+ (g = l.current) == null || g.focus();
202
203
  const c = (p) => {
203
204
  p.key !== "Escape" || p.defaultPrevented || s.current || $e(p.target) || document.querySelector('[data-radix-popper-content-wrapper], [role="menu"]') || (p.preventDefault(), m.current());
204
205
  };
@@ -207,7 +208,7 @@ function In(r, i, s) {
207
208
  };
208
209
  }, [r, s]), l;
209
210
  }
210
- function Kn({
211
+ function _n({
211
212
  collection: r,
212
213
  bundle: i,
213
214
  parent: s,
@@ -215,115 +216,115 @@ function Kn({
215
216
  stateKey: m = null,
216
217
  marks: d,
217
218
  overlay: c,
218
- ruleMarks: v,
219
+ ruleMarks: g,
219
220
  ghost: p,
220
221
  deps: u,
221
- noDnd: g = !1,
222
+ noDnd: k = !1,
222
223
  record: Q,
223
224
  selected: n,
224
- selection: fe,
225
+ selection: ye,
225
226
  onSelect: t,
226
- showHidden: E,
227
+ showHidden: R,
227
228
  fold: te = null,
228
229
  reveal: V = null,
229
- apply: P,
230
+ apply: A,
230
231
  whenIdle: Te,
231
- fillRate: ye,
232
- unsaved: he,
233
- peers: de,
234
- compare: h,
235
- lastChanges: R
232
+ fillRate: he,
233
+ unsaved: ve,
234
+ peers: ce,
235
+ compare: v,
236
+ lastChanges: N
236
237
  }) {
237
- const re = Xr(), I = g ? eo : re, se = oo(String(i.layout.layout_type ?? "grouped")), ie = (se === "item-edit-form" || se === "read-view") && (h == null ? void 0 : h.diff.bundle) || i, M = b(() => Lt(ie, s), [ie, s]), Y = b(
238
- () => s ? Oo(i, s) : null,
238
+ const re = Zr(), F = k ? Xr : re, ie = ro(String(i.layout.layout_type ?? "grouped")), le = (ie === "item-edit-form" || ie === "read-view") && (v == null ? void 0 : v.diff.bundle) || i, M = b(() => Lt(le, s), [le, s]), Y = b(
239
+ () => s ? To(i, s) : null,
239
240
  [i, s]
240
- ), W = b(() => Y != null && Y.size ? (k) => {
241
- const O = Y.get(z(k)), ge = (d == null ? void 0 : d(k)) ?? [];
242
- return O ? [...ge, Ao(O)] : ge;
241
+ ), W = b(() => Y != null && Y.size ? (y) => {
242
+ const _ = Y.get(z(y)), oe = (d == null ? void 0 : d(y)) ?? [];
243
+ return _ ? [...oe, Oo(_)] : oe;
243
244
  } : d, [Y, d]), Oe = b(
244
- () => _r(M.active, l, E),
245
- [M.active, l, E]
246
- ), { data: K = null } = cn(r, l), J = b(
247
- () => l ? Mr(K) : void 0,
248
- [l, K]
249
- ), L = b(() => so(i), [i]), _ = b(
250
- () => W && v ? (k) => [...W(k), ...v(k)] : W ?? v,
251
- [W, v]
252
- ), B = dn(i, _), Ae = b(
245
+ () => _r(M.active, l, R),
246
+ [M.active, l, R]
247
+ ), { data: I = null } = un(r, l), J = b(
248
+ () => l ? Mr(I) : void 0,
249
+ [l, I]
250
+ ), P = b(() => ao(i), [i]), K = b(
251
+ () => W && g ? (y) => [...W(y), ...g(y)] : W ?? g,
252
+ [W, g]
253
+ ), U = en(i, K), ke = cn(i, U), T = b(
253
254
  () => ({
254
255
  selected: n,
255
- selection: fe,
256
+ selection: ye,
256
257
  onSelect: t,
257
- showHidden: E,
258
- inheritedFrom: (k) => M.inherited.get(z(k)) ?? null,
259
- dnd: I,
258
+ showHidden: R,
259
+ inheritedFrom: (y) => M.inherited.get(z(y)) ?? null,
260
+ dnd: F,
260
261
  roleMark: J,
261
- marks: B,
262
+ marks: ke,
262
263
  overlay: c,
263
- fillRate: ye,
264
- note: (k) => {
265
- const O = io(k);
266
- return O ? L.get(O) ?? null : null;
264
+ fillRate: he,
265
+ note: (y) => {
266
+ const _ = so(y);
267
+ return _ ? P.get(_) ?? null : null;
267
268
  },
268
269
  fold: te,
269
270
  reveal: V,
270
- unsaved: he,
271
- peers: de,
272
- diffMark: h ? (k) => h.diff.marks.get(z(k)) ?? null : void 0,
273
- lastChange: R ? (k) => k.kind === "group" ? R[k.key] ?? null : null : void 0,
271
+ unsaved: ve,
272
+ peers: ce,
273
+ diffMark: v ? (y) => v.diff.marks.get(z(y)) ?? null : void 0,
274
+ lastChange: N ? (y) => y.kind === "group" ? N[y.key] ?? null : null : void 0,
274
275
  ghost: p,
275
- resizeWidth: g ? void 0 : (k, O) => {
276
- k.kind !== "field" && k.kind !== "slot" || P(
276
+ resizeWidth: k ? void 0 : (y, _) => {
277
+ y.kind !== "field" && y.kind !== "slot" || A(
277
278
  [
278
279
  {
279
280
  op: "update_placement",
280
- at: { field: k.field, group_key: k.group_key },
281
- patch: { col_span: O === 12 ? null : O }
281
+ at: { field: y.field, group_key: y.group_key },
282
+ patch: { col_span: _ === 12 ? null : _ }
282
283
  }
283
284
  ],
284
- { label: `Set the width to ${Jr[O] ?? O}` }
285
+ { label: `Set the width to ${xo[_] ?? _}` }
285
286
  );
286
287
  }
287
288
  }),
288
289
  [
289
290
  n,
290
- fe,
291
+ ye,
291
292
  t,
292
- E,
293
+ R,
293
294
  M.inherited,
294
- I,
295
+ F,
295
296
  J,
296
- B,
297
+ ke,
297
298
  c,
298
- ye,
299
- L,
299
+ he,
300
+ P,
300
301
  te,
301
302
  V,
302
- he,
303
- de,
304
- h,
305
- R,
303
+ ve,
304
+ ce,
305
+ v,
306
+ N,
306
307
  p,
307
- P,
308
- g
308
+ A,
309
+ k
309
310
  ]
310
- ), T = go(u);
311
- return /* @__PURE__ */ o("div", { ref: T, className: "flex min-h-full flex-col", children: /* @__PURE__ */ o(
312
- no,
311
+ ), Ae = vo(u);
312
+ return /* @__PURE__ */ o("div", { ref: Ae, className: "flex min-h-0 flex-1 flex-col", children: /* @__PURE__ */ o(
313
+ oo,
313
314
  {
314
315
  collection: r,
315
- bundle: ie,
316
+ bundle: le,
316
317
  layout: Oe,
317
318
  record: Q,
318
319
  stateKey: m,
319
320
  roleId: l,
320
- design: Ae,
321
- apply: P,
321
+ design: T,
322
+ apply: A,
322
323
  whenIdle: Te
323
324
  }
324
325
  ) });
325
326
  }
326
- function _n({
327
+ function Mn({
327
328
  collection: r,
328
329
  name: i,
329
330
  row: s,
@@ -332,19 +333,19 @@ function _n({
332
333
  fields: d,
333
334
  onDone: c
334
335
  }) {
335
- const v = jo(r, d, m), { data: p } = Go(r, s, m), u = xn(Sn(l).data), g = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Qo(s, d, v) : [];
336
- return g.length > 0 && typeof p == "number" && g.push({ text: ` (≈ ${p.toLocaleString()} ${p === 1 ? "record" : "records"})` }), u && g.push({ text: g.length > 0 ? `; ${u}` : u }), /* @__PURE__ */ y(
336
+ const g = jo(r, d, m), { data: p } = Go(r, s, m), u = Sn(Cn(l).data), k = s ? s.section === "forms" && (s.reason.kind === "default" || s.reason.kind === "fallback") ? [{ text: "used by every record no rule catches" }] : Qo(s, d, g) : [];
337
+ return k.length > 0 && typeof p == "number" && k.push({ text: ` (≈ ${p.toLocaleString()} ${p === 1 ? "record" : "records"})` }), u && k.push({ text: k.length > 0 ? `; ${u}` : u }), /* @__PURE__ */ h(
337
338
  "div",
338
339
  {
339
340
  "data-editing-banner": "",
340
341
  className: "flex shrink-0 items-center gap-3 border-b border-nvr-cyan/30 bg-nvr-cyan/10 px-4 py-1.5 text-[12.5px] text-slate-700 dark:text-slate-200",
341
342
  children: [
342
- /* @__PURE__ */ y("p", { className: "m-0 min-w-0 flex-1 truncate", children: [
343
+ /* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1 truncate", children: [
343
344
  "Editing ",
344
345
  /* @__PURE__ */ o("b", { className: "font-semibold text-slate-900 dark:text-foreground", children: i }),
345
- g.length > 0 && /* @__PURE__ */ y(ae, { children: [
346
+ k.length > 0 && /* @__PURE__ */ h(se, { children: [
346
347
  " — ",
347
- /* @__PURE__ */ o(Yo, { segs: g, muted: !0 })
348
+ /* @__PURE__ */ o(Yo, { segs: k, muted: !0 })
348
349
  ] })
349
350
  ] }),
350
351
  /* @__PURE__ */ o(
@@ -360,8 +361,8 @@ function _n({
360
361
  }
361
362
  );
362
363
  }
363
- function Mn({ view: r, onView: i }) {
364
- const s = (l, m, d, c) => /* @__PURE__ */ y(
364
+ function Bn({ view: r, onView: i }) {
365
+ const s = (l, m, d, c) => /* @__PURE__ */ h(
365
366
  "button",
366
367
  {
367
368
  type: "button",
@@ -377,7 +378,7 @@ function Mn({ view: r, onView: i }) {
377
378
  ]
378
379
  }
379
380
  );
380
- return /* @__PURE__ */ y(
381
+ return /* @__PURE__ */ h(
381
382
  "fieldset",
382
383
  {
383
384
  "aria-label": "Show the form as",
@@ -400,7 +401,7 @@ const Ue = (r) => G(
400
401
  "inline-flex h-7 items-center gap-1 rounded-md px-2.5 text-[12px] font-medium transition-colors",
401
402
  r ? "bg-accent text-slate-900 dark:text-foreground" : "text-slate-500 hover:bg-muted hover:text-slate-800 dark:text-muted-foreground dark:hover:text-foreground"
402
403
  );
403
- function ks({
404
+ function bs({
404
405
  collection: r,
405
406
  layoutId: i,
406
407
  onBack: s,
@@ -408,65 +409,65 @@ function ks({
408
409
  onLayoutChange: m,
409
410
  previewRecordId: d = null,
410
411
  portalContainer: c,
411
- onDirtyChange: v
412
+ onDirtyChange: g
412
413
  }) {
413
414
  var ut, pt, mt, ft, yt, ht;
414
- const p = To(), [u, g] = N(i);
415
- U(() => g(i), [i]);
416
- const Q = En(r), { draft: n, recorder: fe } = Kr(Cn(u, { onSaved: Q })), t = n.bundle, [E, te] = N("layouts"), [V, P] = N("inspector"), [Te, ye] = Er(), [he, de] = N(null), [h, R] = N([]), re = h.length > 0 ? h[h.length - 1] : null, [I, se] = N("canvas"), [ve, ie] = N(!1), [M, Y] = wn(), { data: W } = bn(r, M), Oe = b(
415
+ const p = Co(), [u, k] = L(i);
416
+ q(() => k(i), [i]);
417
+ const Q = Dn(r), { draft: n, recorder: ye } = Kr(Tn(u, { onSaved: Q })), t = n.bundle, [R, te] = L("layouts"), [V, A] = L("inspector"), [Te, he] = Er(), [ve, ce] = L(null), [v, N] = L([]), re = v.length > 0 ? v[v.length - 1] : null, [F, ie] = L("canvas"), [ge, le] = L(!1), [M, Y] = bn(), { data: W } = xn(r, M), Oe = b(
417
418
  () => M && W && W.total > 0 ? (e) => W.pct.get(e) ?? null : void 0,
418
419
  [M, W]
419
- ), [K, J] = N({
420
+ ), [I, J] = L({
420
421
  record: d ? { id: d, label: `#${d}` } : null,
421
422
  roleId: null
422
- }), { data: L } = Wo(r), { data: _ = [] } = Ho(r), B = L == null ? void 0 : L.rows.find((e) => e.layout_id === u), Ae = (t == null ? void 0 : t.layout.parent_layout_id) != null ? Number(t.layout.parent_layout_id) : null, { data: T = null } = Be(Ae), { data: k = null } = Dn(r, ((ut = K.record) == null ? void 0 : ut.id) ?? null), O = b(
423
+ }), { data: P } = Wo(r), { data: K = [] } = Ho(r), U = P == null ? void 0 : P.rows.find((e) => e.layout_id === u), ke = (t == null ? void 0 : t.layout.parent_layout_id) != null ? Number(t.layout.parent_layout_id) : null, { data: T = null } = Be(ke), { data: Ae = null } = Fn(r, ((ut = I.record) == null ? void 0 : ut.id) ?? null), y = b(
423
424
  () => t ? Lt(t, T).active : null,
424
425
  [t, T]
425
426
  );
426
427
  br(kt);
427
- const ge = b(() => xr(O), [O]), ke = Io(r, t, T), { data: Rt } = Be(u), Z = Br(t, Rt ?? null, n.unsavedCount, u), { data: Et } = Co(u, t != null), [ze, Dt] = N([]), Ft = b(() => {
428
+ const _ = b(() => xr(y), [y]), oe = Fo(r, t, T), { data: Rt } = Be(u), Z = Br(t, Rt ?? null, n.unsavedCount, u), { data: Et } = So(u, t != null), [ze, Dt] = L([]), Ft = b(() => {
428
429
  const e = Pr(ze), a = /* @__PURE__ */ new WeakMap();
429
430
  return (f) => {
430
431
  if (!f || !e) return bt(f, e);
431
432
  const w = a.get(f);
432
433
  if (w) return w;
433
- const F = bt(f, e);
434
- return a.set(f, F), F;
434
+ const D = bt(f, e);
435
+ return a.set(f, D), D;
435
436
  };
436
- }, [ze]), [ce, It] = fo(), we = ko(r, O, ce), ue = wo(r, O, ce && !K.record), { data: le } = Be(u), X = vr(((pt = le == null ? void 0 : le.layout) == null ? void 0 : pt.conditions) ?? ((mt = t == null ? void 0 : t.layout) == null ? void 0 : mt.conditions)), D = xt(le == null ? void 0 : le.layout) ?? xt(t == null ? void 0 : t.layout) ?? (X ? "note" : null), [pe, Pe] = N({ reason: "", ticket: "" }), [Ve, We] = N(null), Le = j(pe);
437
- Le.current = pe;
437
+ }, [ze]), [ue, It] = mo(), we = go(r, y, ue), pe = ko(r, y, ue && !I.record), { data: de } = Be(u), X = vr(((pt = de == null ? void 0 : de.layout) == null ? void 0 : pt.conditions) ?? ((mt = t == null ? void 0 : t.layout) == null ? void 0 : mt.conditions)), E = xt(de == null ? void 0 : de.layout) ?? xt(t == null ? void 0 : t.layout) ?? (X ? "note" : null), [me, Pe] = L({ reason: "", ticket: "" }), [Ve, We] = L(null), Le = j(me);
438
+ Le.current = me;
438
439
  const He = C(async () => {
439
- const e = D ? {
440
+ const e = E ? {
440
441
  ...Ur(Le.current),
441
442
  ...X ? { freeze_override: Le.current.reason.trim() } : {}
442
443
  } : void 0;
443
444
  await n.save(e);
444
445
  const a = n.unsavedOps().length === 0;
445
446
  return a && e && Pe((f) => ({ ...f, reason: "" })), a;
446
- }, [n.save, n.unsavedOps, D, X]), je = C(() => {
447
+ }, [n.save, n.unsavedOps, E, X]), je = C(() => {
447
448
  var e, a;
448
- return D ? (n.unsavedOps().length > 0 && We(
449
+ return E ? (n.unsavedOps().length > 0 && We(
449
450
  ((e = $.current) == null ? void 0 : e.querySelector("[data-editor-save]")) ?? ((a = $.current) == null ? void 0 : a.querySelector("[data-editor-topbar]")) ?? null
450
451
  ), Promise.resolve()) : n.save();
451
- }, [D, n.save, n.unsavedOps]);
452
- U(() => {
453
- D && n.autosave && n.setAutosave(!1);
454
- }, [D, n.autosave, n.setAutosave]);
455
- const Kt = D ? { ...n, save: je, setAutosave: void 0 } : n;
456
- Ln(D ? { ...n, save: je } : n), Rn(n);
457
- const $ = j(null), [_t, Ge] = N(null), Qe = j(n.dirty);
452
+ }, [E, n.save, n.unsavedOps]);
453
+ q(() => {
454
+ E && n.autosave && n.setAutosave(!1);
455
+ }, [E, n.autosave, n.setAutosave]);
456
+ const Kt = E ? { ...n, save: je, setAutosave: void 0 } : n;
457
+ Nn(E ? { ...n, save: je } : n), En(n);
458
+ const $ = j(null), [_t, Ge] = L(null), Qe = j(n.dirty);
458
459
  Qe.current = n.dirty;
459
- const oe = C((e, a, f) => {
460
- var F, me;
460
+ const ne = C((e, a, f) => {
461
+ var D, fe;
461
462
  if (!Qe.current) return a();
462
- const w = ((F = $.current) == null ? void 0 : F.querySelector("[data-editor-save]")) ?? ((me = $.current) == null ? void 0 : me.querySelector("[data-editor-topbar]")) ?? null;
463
+ const w = ((D = $.current) == null ? void 0 : D.querySelector("[data-editor-save]")) ?? ((fe = $.current) == null ? void 0 : fe.querySelector("[data-editor-topbar]")) ?? null;
463
464
  Ge({ what: e, go: a, anchor: f ?? w });
464
465
  }, []), Mt = He;
465
- Fn(n.dirty, (e, a) => oe("leave this page", e, a)), U(() => {
466
- v == null || v(n.dirty);
467
- }, [n.dirty, v]);
466
+ In(n.dirty, (e, a) => ne("leave this page", e, a)), q(() => {
467
+ g == null || g(n.dirty);
468
+ }, [n.dirty, g]);
468
469
  const Ye = j(n.unsavedOps);
469
- Ye.current = n.unsavedOps, U(
470
+ Ye.current = n.unsavedOps, q(
470
471
  () => () => {
471
472
  Ye.current().length > 0 && gt.warning("Unsaved form changes kept — open the form again to save or discard them");
472
473
  },
@@ -476,71 +477,71 @@ function ks({
476
477
  const e = n.whenIdle();
477
478
  e.then(() => Je()), s(e);
478
479
  }, [n.whenIdle, Je, s]), Ne = C(
479
- (e) => oe(l === "overlay" ? "go back to the record" : "leave this form", Ze, e),
480
- [oe, Ze, l]
480
+ (e) => ne(l === "overlay" ? "go back to the record" : "leave this form", Ze, e),
481
+ [ne, Ze, l]
481
482
  );
482
- U(() => {
483
- if (!t || h.length === 0) return;
484
- const e = h.filter((a) => qe(a, t, T));
485
- e.length !== h.length && R(e);
486
- }, [h, t, T]);
487
- const ne = l === "overlay", [Re, Bt] = N(null), Ee = j(!1), qt = C((e) => {
483
+ q(() => {
484
+ if (!t || v.length === 0) return;
485
+ const e = v.filter((a) => qe(a, t, T));
486
+ e.length !== v.length && N(e);
487
+ }, [v, t, T]);
488
+ const ae = l === "overlay", [Re, Bt] = L(null), Ee = j(!1), qt = C((e) => {
488
489
  Ee.current = e;
489
- }, []), Ut = In(ne && Re != null, () => Ne(), Ee), A = C((e, a) => {
490
- R((f) => Yr(f, e, a)), P("inspector");
491
- }, []), Xe = C((e) => R([e]), []), q = lo(t, n.apply), $t = b(() => q.intercept(A), [q.intercept, A]), [De, zt] = N(!1), Fe = uo(), Ie = b(
490
+ }, []), Ut = Kn(ae && Re != null, () => Ne(), Ee), O = C((e, a) => {
491
+ N((f) => Yr(f, e, a)), A("inspector");
492
+ }, []), Xe = C((e) => N([e]), []), B = io(t, n.apply), $t = b(() => B.intercept(O), [B.intercept, O]), [De, zt] = L(!1), Fe = co(), Ie = b(
492
493
  () => ({
493
- tabOrderActive: q.active,
494
+ tabOrderActive: B.active,
494
495
  startTabOrder: () => {
495
- se("canvas"), q.start();
496
+ ie("canvas"), B.start();
496
497
  }
497
498
  }),
498
- [q.active, q.start]
499
+ [B.active, B.start]
499
500
  ), et = C(
500
501
  (e, a) => {
501
- if (e.kind === "group") return A({ kind: "group", key: e.key });
502
+ if (e.kind === "group") return O({ kind: "group", key: e.key });
502
503
  if (e.kind === "tab") {
503
- A(a), (a.kind === "field" || a.kind === "header") && Lo(a.field, e.tab);
504
+ O(a), (a.kind === "field" || a.kind === "header") && Po(a.field, e.tab);
504
505
  return;
505
506
  }
506
507
  if (e.kind === "pipeline")
507
- return oe(
508
+ return ne(
508
509
  "open the pipeline",
509
510
  () => p.navigate(`/pipelines/${encodeURIComponent(e.id)}`)
510
511
  );
511
- oe(
512
+ ne(
512
513
  "open the field rules",
513
514
  () => p.navigate(`/data-model/${encodeURIComponent(r)}?tab=rules`)
514
515
  );
515
516
  },
516
- [A, oe, p, r]
517
+ [O, ne, p, r]
517
518
  ), Vt = b(() => {
518
519
  const e = /* @__PURE__ */ new Map();
519
- for (const [a, f] of ue)
520
+ for (const [a, f] of pe)
520
521
  (f.type === "boolean" || f.text.endsWith(" linked")) && e.set(a, f.text);
521
- return yo(we, { chips: ce, ghostTags: e, open: et });
522
- }, [we, ce, ue, et]), Wt = b(
523
- () => ue.size > 0 ? (e) => {
522
+ return fo(we, { chips: ue, ghostTags: e, open: et });
523
+ }, [we, ue, pe, et]), Wt = b(
524
+ () => pe.size > 0 ? (e) => {
524
525
  var a;
525
- return ((a = ue.get(e)) == null ? void 0 : a.text) ?? null;
526
+ return ((a = pe.get(e)) == null ? void 0 : a.text) ?? null;
526
527
  } : void 0,
527
- [ue]
528
+ [pe]
528
529
  ), Ht = C(
529
530
  (e) => {
530
531
  const a = t == null ? void 0 : t.placements.find((w) => w.field === e);
531
532
  if (!a) return;
532
533
  const f = a.group_key === Pt ? { kind: "header", field: e } : { kind: "field", field: e, group_key: a.group_key };
533
- A(f), requestAnimationFrame(
534
+ O(f), requestAnimationFrame(
534
535
  () => {
535
- var w, F;
536
- return (F = (w = document.querySelector(`[data-layout-editor] [data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : w.scrollIntoView) == null ? void 0 : F.call(w, { block: "center" });
536
+ var w, D;
537
+ return (D = (w = document.querySelector(`[data-layout-editor] [data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : w.scrollIntoView) == null ? void 0 : D.call(w, { block: "center" });
537
538
  }
538
539
  );
539
540
  },
540
- [t, A]
541
+ [t, O]
541
542
  );
542
- Nn(t, h, n.apply, Ee, Xe);
543
- const Ke = en(u, re ? z(re) : null), tt = b(() => tn(Ke), [Ke]), jt = C(
543
+ Rn(t, v, n.apply, Ee, Xe);
544
+ const Ke = tn(u, re ? z(re) : null), tt = b(() => rn(Ke), [Ke]), jt = C(
544
545
  (e) => (tt.get(z(e)) ?? []).map((a) => ({
545
546
  id: a.id,
546
547
  name: a.name,
@@ -548,15 +549,15 @@ function ks({
548
549
  chip: a.tone.chip
549
550
  })),
550
551
  [tt]
551
- ), rt = b(() => gn(n.unsavedSteps), [n.unsavedSteps]), Gt = C((e) => rt.has(z(e)), [rt]), [ot, be] = N(null), nt = C((e) => {
552
- se("canvas"), R([e]), P("inspector"), requestAnimationFrame(() => {
552
+ ), rt = b(() => kn(n.unsavedSteps), [n.unsavedSteps]), Gt = C((e) => rt.has(z(e)), [rt]), [ot, be] = L(null), nt = C((e) => {
553
+ ie("canvas"), N([e]), A("inspector"), requestAnimationFrame(() => {
553
554
  var f;
554
555
  const a = document.querySelector(
555
556
  `[data-layout-editor] [data-design-target="${CSS.escape(z(e))}"]`
556
557
  );
557
558
  (f = a == null ? void 0 : a.scrollIntoView) == null || f.call(a, { block: "center" }), a == null || a.focus({ preventScroll: !0 });
558
559
  });
559
- }, []), Qt = kr(), H = pn(u), at = mn(), Yt = b(
560
+ }, []), Qt = kr(), H = mn(u), at = fn(), Yt = b(
560
561
  () => {
561
562
  var e, a;
562
563
  return {
@@ -567,32 +568,32 @@ function ks({
567
568
  };
568
569
  },
569
570
  [H.isFetched, H.isError, H.data, at]
570
- ), xe = to(n, u, Qt, Yt), Jt = C(
571
+ ), xe = eo(n, u, Qt, Yt), Jt = C(
571
572
  (e) => J((a) => a.roleId === e ? a : { ...a, roleId: e }),
572
573
  []
573
574
  ), ee = (e) => {
574
575
  var w;
575
- if (P("inspector"), e === u) return;
576
+ if (A("inspector"), e === u) return;
576
577
  const a = document.activeElement, f = a instanceof HTMLElement && ((w = $.current) != null && w.contains(a)) ? a : null;
577
- oe(
578
+ ne(
578
579
  "open another form",
579
580
  () => {
580
- n.flush(), R([]), g(e), m == null || m(e);
581
+ n.flush(), N([]), k(e), m == null || m(e);
581
582
  },
582
583
  f
583
584
  );
584
- }, Zt = an(r, t, (L == null ? void 0 : L.rows) ?? [], ee), Xt = C(
585
+ }, Zt = sn(r, t, (P == null ? void 0 : P.rows) ?? [], ee), Xt = C(
585
586
  (e) => t ? Dr(e, {
586
587
  bundle: t,
587
- selection: h,
588
+ selection: v,
588
589
  select: (a) => {
589
- R([a]), P("inspector");
590
+ N([a]), A("inspector");
590
591
  },
591
- openSettings: () => P("settings"),
592
+ openSettings: () => A("settings"),
592
593
  openAddPanel: () => te("add"),
593
594
  root: $.current
594
595
  }) : Promise.resolve({ ok: !1, message: "The form is still loading" }),
595
- [t, h]
596
+ [t, v]
596
597
  ), st = j(ee);
597
598
  st.current = ee;
598
599
  const er = C(
@@ -604,72 +605,72 @@ function ks({
604
605
  const a = t == null ? void 0 : t.placements.find((w) => w.field === e.field);
605
606
  if (!a) return gt.info(`${e.label} is not on this form`);
606
607
  const f = { kind: "field", field: a.field, group_key: a.group_key };
607
- A(f), requestAnimationFrame(
608
+ O(f), requestAnimationFrame(
608
609
  () => {
609
- var w, F, me;
610
- return (me = (F = (w = $.current) == null ? void 0 : w.querySelector(`[data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : F.scrollIntoView) == null ? void 0 : me.call(F, { block: "center" });
610
+ var w, D, fe;
611
+ return (fe = (D = (w = $.current) == null ? void 0 : w.querySelector(`[data-design-target="${CSS.escape(z(f))}"]`)) == null ? void 0 : D.scrollIntoView) == null ? void 0 : fe.call(D, { block: "center" });
611
612
  }
612
613
  );
613
614
  }
614
615
  },
615
- [t, A]
616
- ), Se = String((t == null ? void 0 : t.layout.name) ?? (B == null ? void 0 : B.name) ?? ""), _e = String((t == null ? void 0 : t.layout.layout_type) ?? (B == null ? void 0 : B.layout_type) ?? "grouped"), x = _e !== "table" && _e !== "file", S = zo({
616
+ [t, O]
617
+ ), Se = String((t == null ? void 0 : t.layout.name) ?? (U == null ? void 0 : U.name) ?? ""), _e = String((t == null ? void 0 : t.layout.layout_type) ?? (U == null ? void 0 : U.layout_type) ?? "grouped"), x = _e !== "table" && _e !== "file", S = $o({
617
618
  bodyRef: $,
618
619
  bundle: t,
619
620
  parent: T,
620
- fields: _,
621
- onSelect: A,
622
- showHidden: ve,
623
- setShowHidden: ie,
624
- canvasShown: !(x && I === "table")
625
- }), it = S.outlineOpen && !!t && x, lt = p.warning ?? (L == null ? void 0 : L.warning) ?? null, tr = ne ? {
621
+ fields: K,
622
+ onSelect: O,
623
+ showHidden: ge,
624
+ setShowHidden: le,
625
+ canvasShown: !(x && F === "table")
626
+ }), it = S.outlineOpen && !!t && x, lt = p.warning ?? (P == null ? void 0 : P.warning) ?? null, tr = ae ? {
626
627
  role: "dialog",
627
628
  "aria-modal": !0,
628
629
  "aria-label": `Edit form ${Se}`,
629
630
  tabIndex: -1
630
- } : {}, dt = /* @__PURE__ */ y(
631
+ } : {}, dt = /* @__PURE__ */ h(
631
632
  "div",
632
633
  {
633
634
  ref: (e) => {
634
- $.current = e, ne && (Ut.current = e);
635
+ $.current = e, ae && (Ut.current = e);
635
636
  },
636
637
  "data-layout-editor": "",
637
638
  "data-mode": l,
638
639
  ...tr,
639
640
  className: G(
640
641
  "flex min-h-0 flex-col bg-slate-50 outline-none dark:bg-background",
641
- ne ? "fixed inset-0 z-[90]" : "flex-1"
642
+ ae ? "fixed inset-0 z-[90]" : "flex-1"
642
643
  ),
643
644
  children: [
644
645
  /* @__PURE__ */ o(
645
- ao,
646
+ no,
646
647
  {
647
648
  collection: r,
648
649
  layoutId: u,
649
650
  layoutName: Se,
650
651
  layoutType: _e,
651
- row: B,
652
- fields: _,
652
+ row: U,
653
+ fields: K,
653
654
  draft: Kt,
654
- preview: K,
655
+ preview: I,
655
656
  onPreview: J,
656
- showHidden: ve,
657
- onShowHidden: ie,
657
+ showHidden: ge,
658
+ onShowHidden: le,
658
659
  onBack: Ne,
659
- backLabel: ne ? "Back to record" : "Forms",
660
+ backLabel: ae ? "Back to record" : "Forms",
660
661
  onShowOnCanvas: Z.showVersion,
661
662
  onReviewChanges: Z.toggleReview,
662
663
  reviewing: ((ft = Z.compare) == null ? void 0 : ft.kind) === "unsaved",
663
664
  onOpenUnsaved: be,
664
- pendingTip: ro(xe.sync),
665
- presence: /* @__PURE__ */ y(ae, { children: [
665
+ pendingTip: to(xe.sync),
666
+ presence: /* @__PURE__ */ h(se, { children: [
666
667
  /* @__PURE__ */ o(
667
668
  Wr,
668
669
  {
669
670
  peers: Ke,
670
671
  describe: (e) => {
671
672
  const a = Tt(e);
672
- return a && t && qe(a, t, T) ? Ot(a, t, _) : null;
673
+ return a && t && qe(a, t, T) ? Ot(a, t, K) : null;
673
674
  },
674
675
  onJump: (e) => {
675
676
  const a = Tt(e);
@@ -677,28 +678,28 @@ function ks({
677
678
  }
678
679
  }
679
680
  ),
680
- /* @__PURE__ */ o(sn, { others: ((yt = H.data) == null ? void 0 : yt.others) ?? [] })
681
+ /* @__PURE__ */ o(ln, { others: ((yt = H.data) == null ? void 0 : yt.others) ?? [] })
681
682
  ] }),
682
683
  onSelectField: (e) => {
683
684
  var a;
684
- return A({
685
+ return O({
685
686
  kind: "field",
686
687
  field: e,
687
688
  group_key: ((a = t == null ? void 0 : t.placements.find((f) => f.field === e)) == null ? void 0 : a.group_key) ?? null
688
689
  });
689
690
  },
690
- view: t && x ? /* @__PURE__ */ y(ae, { children: [
691
- /* @__PURE__ */ o(Mn, { view: I, onView: se }),
692
- /* @__PURE__ */ o(ho, { on: ce, onChange: It })
691
+ view: t && x ? /* @__PURE__ */ h(se, { children: [
692
+ /* @__PURE__ */ o(Bn, { view: F, onView: ie }),
693
+ /* @__PURE__ */ o(yo, { on: ue, onChange: It })
693
694
  ] }) : null,
694
- tools: /* @__PURE__ */ y(ae, { children: [
695
+ tools: /* @__PURE__ */ h(se, { children: [
695
696
  t && x && /* @__PURE__ */ o(Or, { bundle: t, apply: n.apply }),
696
- t && /* @__PURE__ */ o(Mo, { find: S.find }),
697
- t && x && /* @__PURE__ */ o(bo, { bundle: t, apply: n.apply, collection: r }),
698
- t && x && /* @__PURE__ */ o(xo, { bundle: t, apply: n.apply, collection: r }),
697
+ t && /* @__PURE__ */ o(_o, { find: S.find }),
698
+ t && x && /* @__PURE__ */ o(wo, { bundle: t, apply: n.apply, collection: r }),
699
+ t && x && /* @__PURE__ */ o(Vo, { bundle: t, apply: n.apply, collection: r }),
699
700
  /* @__PURE__ */ o(Ce, {}),
700
701
  t && /* @__PURE__ */ o(
701
- Bo,
702
+ Mo,
702
703
  {
703
704
  outline: x ? {
704
705
  open: S.outlineOpen,
@@ -707,9 +708,9 @@ function ks({
707
708
  }
708
709
  ),
709
710
  t && /* @__PURE__ */ o(
710
- qo,
711
+ Bo,
711
712
  {
712
- view: x && I === "canvas" ? {
713
+ view: x && F === "canvas" ? {
713
714
  compact: S.compact,
714
715
  onCompact: S.setCompact,
715
716
  onExpandAll: S.expandAll,
@@ -734,18 +735,18 @@ function ks({
734
735
  label: "Set the tab order",
735
736
  icon: /* @__PURE__ */ o(ar, { className: "h-3.5 w-3.5" }),
736
737
  hint: "Click fields in the order Tab should visit them",
737
- checked: q.active,
738
- onClick: () => q.active ? q.cancel() : Ie.startTabOrder(),
738
+ checked: B.active,
739
+ onClick: () => B.active ? B.cancel() : Ie.startTabOrder(),
739
740
  data: { "data-editor-tab-order-toggle": "" }
740
741
  }
741
742
  ),
742
743
  t && x && /* @__PURE__ */ o(
743
- po,
744
+ uo,
744
745
  {
745
746
  on: De,
746
747
  onChange: zt,
747
748
  appDark: Fe,
748
- disabled: I !== "canvas"
749
+ disabled: F !== "canvas"
749
750
  }
750
751
  ),
751
752
  /* @__PURE__ */ o(Ce, {}),
@@ -755,14 +756,14 @@ function ks({
755
756
  collection: r,
756
757
  layoutId: u,
757
758
  dirty: n.dirty,
758
- recorder: fe
759
+ recorder: ye
759
760
  }
760
761
  ),
761
- /* @__PURE__ */ o(So, { bundle: t, collection: r }),
762
+ /* @__PURE__ */ o(bo, { bundle: t, collection: r }),
762
763
  /* @__PURE__ */ o(Ce, {}),
763
- t && /* @__PURE__ */ o(Uo, { shortcuts: S.shortcuts })
764
+ t && /* @__PURE__ */ o(qo, { shortcuts: S.shortcuts })
764
765
  ] }),
765
- ai: /* @__PURE__ */ y(ae, { children: [
766
+ ai: /* @__PURE__ */ h(se, { children: [
766
767
  t && x && /* @__PURE__ */ o(
767
768
  Lr,
768
769
  {
@@ -779,9 +780,9 @@ function ks({
779
780
  layoutId: u,
780
781
  bundle: t,
781
782
  apply: n.apply,
782
- previewRecordShown: K.record != null,
783
+ previewRecordShown: I.record != null,
783
784
  onPins: Dt,
784
- onSelect: A
785
+ onSelect: O
785
786
  }
786
787
  ),
787
788
  /* @__PURE__ */ o(Ce, {}),
@@ -789,14 +790,14 @@ function ks({
789
790
  Nr,
790
791
  {
791
792
  active: V === "ask",
792
- onClick: () => P((e) => e === "ask" ? "inspector" : "ask")
793
+ onClick: () => A((e) => e === "ask" ? "inspector" : "ask")
793
794
  }
794
795
  ),
795
796
  /* @__PURE__ */ o(Qr, { collection: r, layoutId: u, draft: n }),
796
797
  t && /* @__PURE__ */ o(Fr, { layoutId: u, draft: n })
797
798
  ] }),
798
799
  testing: t ? /* @__PURE__ */ o(
799
- yn,
800
+ hn,
800
801
  {
801
802
  collection: r,
802
803
  layoutId: u,
@@ -804,11 +805,11 @@ function ks({
804
805
  parent: T,
805
806
  apply: n.apply,
806
807
  dirty: n.dirty,
807
- fields: _
808
+ fields: K
808
809
  }
809
810
  ) : null,
810
811
  beforeSave: t ? /* @__PURE__ */ o(
811
- fn,
812
+ yn,
812
813
  {
813
814
  collection: r,
814
815
  layoutId: u,
@@ -816,54 +817,54 @@ function ks({
816
817
  parent: T,
817
818
  apply: n.apply,
818
819
  dirty: n.dirty,
819
- fields: _
820
+ fields: K
820
821
  }
821
822
  ) : null,
822
- previewExtra: /* @__PURE__ */ y(ae, { children: [
823
+ previewExtra: /* @__PURE__ */ h(se, { children: [
823
824
  /* @__PURE__ */ o(
824
- rn,
825
+ on,
825
826
  {
826
827
  collection: r,
827
- value: K,
828
+ value: I,
828
829
  onChange: J,
829
- layout: O,
830
- fields: _
830
+ layout: y,
831
+ fields: K
831
832
  }
832
833
  ),
833
- /* @__PURE__ */ o(Sr, { scope: kt, options: ge })
834
+ /* @__PURE__ */ o(Sr, { scope: kt, options: _ })
834
835
  ] }),
835
836
  problems: t && /* @__PURE__ */ o(
836
- Do,
837
+ Eo,
837
838
  {
838
- findings: ke.findings,
839
+ findings: oe.findings,
839
840
  active: V === "checks",
840
- onClick: () => P((e) => e === "checks" ? "inspector" : "checks")
841
+ onClick: () => A((e) => e === "checks" ? "inspector" : "checks")
841
842
  }
842
843
  ),
843
844
  more: /* @__PURE__ */ o(
844
- nn,
845
+ an,
845
846
  {
846
847
  collection: r,
847
848
  bundle: t,
848
- previewRecord: K.record,
849
+ previewRecord: I.record,
849
850
  onOpenLayout: ee
850
851
  }
851
852
  )
852
853
  }
853
854
  ),
854
- ne && /* @__PURE__ */ o(
855
- _n,
855
+ ae && /* @__PURE__ */ o(
856
+ Mn,
856
857
  {
857
858
  collection: r,
858
859
  layoutId: u,
859
860
  name: Se,
860
- row: B,
861
- rows: (L == null ? void 0 : L.rows) ?? [],
862
- fields: _,
861
+ row: U,
862
+ rows: (P == null ? void 0 : P.rows) ?? [],
863
+ fields: K,
863
864
  onDone: Ne
864
865
  }
865
866
  ),
866
- n.status === "conflict" && n.dirty && /* @__PURE__ */ y(
867
+ n.status === "conflict" && n.dirty && /* @__PURE__ */ h(
867
868
  "div",
868
869
  {
869
870
  role: "alert",
@@ -874,11 +875,11 @@ function ks({
874
875
  ),
875
876
  children: [
876
877
  /* @__PURE__ */ o(vt, { className: "h-3.5 w-3.5 shrink-0" }),
877
- /* @__PURE__ */ y("p", { className: "m-0 min-w-0 flex-1", children: [
878
+ /* @__PURE__ */ h("p", { className: "m-0 min-w-0 flex-1", children: [
878
879
  n.error ?? "Someone else saved this form",
879
880
  ". Save again to try once more, or reload their version."
880
881
  ] }),
881
- /* @__PURE__ */ y(
882
+ /* @__PURE__ */ h(
882
883
  "button",
883
884
  {
884
885
  type: "button",
@@ -887,7 +888,7 @@ function ks({
887
888
  className: "inline-flex h-7 shrink-0 items-center rounded-md border border-amber-300 px-2.5 text-[12px] font-medium hover:bg-amber-100 dark:border-amber-500/40 dark:hover:bg-amber-500/15",
888
889
  children: [
889
890
  "Reload (discard my ",
890
- hn(n.unsavedCount),
891
+ vn(n.unsavedCount),
891
892
  ")"
892
893
  ]
893
894
  }
@@ -904,7 +905,7 @@ function ks({
904
905
  onDismiss: xe.dismiss
905
906
  }
906
907
  ),
907
- lt && /* @__PURE__ */ y(
908
+ lt && /* @__PURE__ */ h(
908
909
  "div",
909
910
  {
910
911
  role: "note",
@@ -918,7 +919,7 @@ function ks({
918
919
  ]
919
920
  }
920
921
  ),
921
- X && /* @__PURE__ */ y(
922
+ X && /* @__PURE__ */ h(
922
923
  "div",
923
924
  {
924
925
  role: "note",
@@ -933,16 +934,16 @@ function ks({
933
934
  ]
934
935
  }
935
936
  ),
936
- /* @__PURE__ */ o(vo, { explain: we, onShow: Ht }),
937
+ /* @__PURE__ */ o(ho, { explain: we, onShow: Ht }),
937
938
  /* @__PURE__ */ o(
938
- Zr,
939
+ Jr,
939
940
  {
940
941
  bundle: t,
941
942
  apply: n.apply,
942
943
  onDragActive: qt,
943
944
  onDropOnLayout: Zt,
944
- children: /* @__PURE__ */ y("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
945
- /* @__PURE__ */ y(
945
+ children: /* @__PURE__ */ h("div", { className: "flex min-h-0 flex-1 overflow-hidden", children: [
946
+ /* @__PURE__ */ h(
946
947
  "aside",
947
948
  {
948
949
  className: G(
@@ -950,7 +951,7 @@ function ks({
950
951
  it && "hidden"
951
952
  ),
952
953
  children: [
953
- /* @__PURE__ */ y(
954
+ /* @__PURE__ */ h(
954
955
  "div",
955
956
  {
956
957
  role: "tablist",
@@ -962,21 +963,21 @@ function ks({
962
963
  {
963
964
  type: "button",
964
965
  role: "tab",
965
- "aria-selected": E === "layouts",
966
+ "aria-selected": R === "layouts",
966
967
  "data-editor-tab": "layouts",
967
- className: Ue(E === "layouts"),
968
+ className: Ue(R === "layouts"),
968
969
  onClick: () => te("layouts"),
969
970
  children: "Forms"
970
971
  }
971
972
  ),
972
- /* @__PURE__ */ y(
973
+ /* @__PURE__ */ h(
973
974
  "button",
974
975
  {
975
976
  type: "button",
976
977
  role: "tab",
977
- "aria-selected": E === "add",
978
+ "aria-selected": R === "add",
978
979
  "data-editor-tab": "add",
979
- className: Ue(E === "add"),
980
+ className: Ue(R === "add"),
980
981
  onClick: () => te("add"),
981
982
  disabled: !t,
982
983
  "data-tip": "Add a field, section, panel or widget after the selection",
@@ -986,14 +987,14 @@ function ks({
986
987
  ]
987
988
  }
988
989
  ),
989
- /* @__PURE__ */ y(
990
+ /* @__PURE__ */ h(
990
991
  "button",
991
992
  {
992
993
  type: "button",
993
994
  role: "tab",
994
- "aria-selected": E === "usage",
995
+ "aria-selected": R === "usage",
995
996
  "data-editor-tab": "usage",
996
- className: Ue(E === "usage"),
997
+ className: Ue(R === "usage"),
997
998
  onClick: () => te("usage"),
998
999
  disabled: !t,
999
1000
  "data-tip": "How this form is used and where it slows people down",
@@ -1006,34 +1007,34 @@ function ks({
1006
1007
  ]
1007
1008
  }
1008
1009
  ),
1009
- /* @__PURE__ */ o("div", { className: "min-h-0 flex-1 overflow-y-auto", children: E === "add" && t ? /* @__PURE__ */ o(
1010
+ /* @__PURE__ */ o("div", { className: "min-h-0 flex-1 overflow-y-auto", children: R === "add" && t ? /* @__PURE__ */ o(
1010
1011
  Tr,
1011
1012
  {
1012
1013
  bundle: t,
1013
1014
  collection: r,
1014
1015
  selected: re,
1015
1016
  apply: n.apply,
1016
- onSelect: A
1017
+ onSelect: O
1017
1018
  }
1018
- ) : E === "usage" && t ? /* @__PURE__ */ o(
1019
- kn,
1019
+ ) : R === "usage" && t ? /* @__PURE__ */ o(
1020
+ wn,
1020
1021
  {
1021
1022
  bundle: t,
1022
1023
  collection: r,
1023
- fields: _,
1024
+ fields: K,
1024
1025
  apply: n.apply,
1025
1026
  showFill: M,
1026
1027
  onShowFill: Y,
1027
1028
  onOpenLayout: ee
1028
1029
  }
1029
1030
  ) : /* @__PURE__ */ o(
1030
- Eo,
1031
+ Ro,
1031
1032
  {
1032
1033
  collection: r,
1033
1034
  currentId: u,
1034
1035
  onOpen: ee,
1035
1036
  settingsOpen: V === "settings",
1036
- onSettings: () => P("settings"),
1037
+ onSettings: () => A("settings"),
1037
1038
  dropTargets: !0
1038
1039
  }
1039
1040
  ) })
@@ -1046,11 +1047,11 @@ function ks({
1046
1047
  "data-editor-outline-panel": "",
1047
1048
  className: "flex w-[260px] shrink-0 flex-col border-r border-slate-200 bg-white dark:border-border dark:bg-card",
1048
1049
  children: /* @__PURE__ */ o(
1049
- $o,
1050
+ Uo,
1050
1051
  {
1051
1052
  bundle: t,
1052
1053
  nodes: S.nodes,
1053
- selection: h,
1054
+ selection: v,
1054
1055
  onPick: S.selectAndReveal,
1055
1056
  onMoved: Xe,
1056
1057
  apply: n.apply,
@@ -1059,59 +1060,59 @@ function ks({
1059
1060
  )
1060
1061
  }
1061
1062
  ),
1062
- /* @__PURE__ */ y("main", { className: "min-w-0 flex-1 overflow-y-auto", children: [
1063
- I === "canvas" && /* @__PURE__ */ o(co, { editor: q }),
1064
- Z.compare && (I === "canvas" || !x) && /* @__PURE__ */ o(qr, { compare: Z.compare, onClose: Z.close }),
1065
- t && x && I === "states" ? /* @__PURE__ */ o(
1066
- Ko,
1063
+ /* @__PURE__ */ h("main", { className: "flex min-w-0 flex-1 flex-col overflow-y-auto", children: [
1064
+ F === "canvas" && /* @__PURE__ */ o(lo, { editor: B }),
1065
+ Z.compare && (F === "canvas" || !x) && /* @__PURE__ */ o(qr, { compare: Z.compare, onClose: Z.close }),
1066
+ t && x && F === "states" ? /* @__PURE__ */ o(
1067
+ Io,
1067
1068
  {
1068
1069
  bundle: t,
1069
1070
  parent: T,
1070
1071
  collection: r,
1071
1072
  apply: n.apply,
1072
- onSelect: A
1073
+ onSelect: O
1073
1074
  }
1074
- ) : t && x && I === "roles" ? /* @__PURE__ */ o(
1075
- _o,
1075
+ ) : t && x && F === "roles" ? /* @__PURE__ */ o(
1076
+ Ko,
1076
1077
  {
1077
1078
  bundle: t,
1078
1079
  parent: T,
1079
1080
  apply: n.apply,
1080
- onSelect: A
1081
+ onSelect: O
1081
1082
  }
1082
- ) : t && x && I === "table" ? /* @__PURE__ */ o(
1083
+ ) : t && x && F === "table" ? /* @__PURE__ */ o(
1083
1084
  Jo,
1084
1085
  {
1085
1086
  bundle: t,
1086
1087
  collection: r,
1087
1088
  apply: n.apply,
1088
1089
  flush: n.flush,
1089
- selection: h,
1090
- onSelect: A,
1091
- onSelection: R
1090
+ selection: v,
1091
+ onSelect: O,
1092
+ onSelection: N
1092
1093
  }
1093
1094
  ) : t ? /* @__PURE__ */ o(
1094
1095
  "div",
1095
1096
  {
1096
1097
  "data-canvas-density": S.compact && x ? "compact" : "normal",
1097
- style: S.compact && x ? { zoom: Vo } : void 0,
1098
+ style: S.compact && x ? { zoom: zo } : void 0,
1098
1099
  className: G(
1099
- "min-h-full",
1100
- mo(De, Fe),
1100
+ "flex min-h-0 flex-1 flex-col",
1101
+ po(De, Fe),
1101
1102
  De && !Fe && "bg-background text-foreground"
1102
1103
  ),
1103
1104
  children: /* @__PURE__ */ o(
1104
- on,
1105
+ nn,
1105
1106
  {
1106
1107
  collection: r,
1107
1108
  bundle: t,
1108
1109
  parent: T,
1109
- preview: K,
1110
+ preview: I,
1110
1111
  onPreview: J,
1111
- record: k,
1112
- fields: _,
1112
+ record: Ae,
1113
+ fields: K,
1113
1114
  renderPane: (e) => /* @__PURE__ */ o(
1114
- Kn,
1115
+ _n,
1115
1116
  {
1116
1117
  collection: r,
1117
1118
  bundle: t,
@@ -1119,16 +1120,16 @@ function ks({
1119
1120
  roleId: e.roleId,
1120
1121
  stateKey: e.stateKey,
1121
1122
  marks: Ft(e.marks),
1122
- overlay: q.overlay(e.overlay),
1123
+ overlay: B.overlay(e.overlay),
1123
1124
  ruleMarks: Vt,
1124
1125
  ghost: Wt,
1125
1126
  deps: we.deps,
1126
1127
  noDnd: e.noDnd,
1127
1128
  record: e.record,
1128
1129
  selected: re,
1129
- selection: h,
1130
+ selection: v,
1130
1131
  onSelect: $t,
1131
- showHidden: ve,
1132
+ showHidden: ge,
1132
1133
  fold: S.fold,
1133
1134
  reveal: S.reveal,
1134
1135
  apply: n.apply,
@@ -1143,7 +1144,7 @@ function ks({
1143
1144
  }
1144
1145
  )
1145
1146
  }
1146
- ) : n.error ? /* @__PURE__ */ o("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */ y("div", { className: "flex flex-col gap-3 p-6", children: [
1147
+ ) : n.error ? /* @__PURE__ */ o("p", { className: "p-6 text-[13px] text-red-700 dark:text-red-300", children: n.error }) : /* @__PURE__ */ h("div", { className: "flex flex-col gap-3 p-6", children: [
1147
1148
  /* @__PURE__ */ o(wt, { className: "h-10 w-full rounded-lg" }),
1148
1149
  /* @__PURE__ */ o(wt, { className: "h-48 w-full rounded-lg" })
1149
1150
  ] })
@@ -1158,50 +1159,50 @@ function ks({
1158
1159
  {
1159
1160
  layoutId: u,
1160
1161
  layoutName: Se,
1161
- kind: un(t.layout),
1162
+ kind: pn(t.layout),
1162
1163
  bundle: t,
1163
1164
  thread: Te,
1164
- setThread: ye,
1165
- pending: he,
1166
- onPendingTaken: () => de(null),
1165
+ setThread: he,
1166
+ pending: ve,
1167
+ onPendingTaken: () => ce(null),
1167
1168
  jump: Xt,
1168
1169
  onCite: er,
1169
- recordId: ((ht = K.record) == null ? void 0 : ht.id) ?? null
1170
+ recordId: ((ht = I.record) == null ? void 0 : ht.id) ?? null
1170
1171
  }
1171
1172
  ) : V === "checks" ? /* @__PURE__ */ o(
1172
- Fo,
1173
+ Do,
1173
1174
  {
1174
- findings: ke.findings,
1175
- health: ke.health,
1176
- ready: ke.ready,
1177
- onSelect: (e) => R([e]),
1175
+ findings: oe.findings,
1176
+ health: oe.health,
1177
+ ready: oe.ready,
1178
+ onSelect: (e) => N([e]),
1178
1179
  apply: n.apply,
1179
- onOpenAiReview: p.aiReviewSlot ? () => P("settings") : void 0
1180
+ onOpenAiReview: p.aiReviewSlot ? () => A("settings") : void 0
1180
1181
  }
1181
1182
  ) : V === "settings" ? /* @__PURE__ */ o(
1182
- An,
1183
+ Pn,
1183
1184
  {
1184
1185
  bundle: t,
1185
1186
  apply: n.apply,
1186
1187
  flush: n.flush,
1187
1188
  collection: r,
1188
- previewRoleId: K.roleId,
1189
+ previewRoleId: I.roleId,
1189
1190
  onPreviewRoleChange: Jt,
1190
1191
  onAskWhere: p.isAdmin ? (e) => {
1191
- de(e), P("ask");
1192
+ ce(e), A("ask");
1192
1193
  } : void 0
1193
1194
  }
1194
- ) : h.length > 1 ? /* @__PURE__ */ o(
1195
- Po,
1195
+ ) : v.length > 1 ? /* @__PURE__ */ o(
1196
+ Ao,
1196
1197
  {
1197
1198
  bundle: t,
1198
- selection: h,
1199
+ selection: v,
1199
1200
  apply: n.apply,
1200
1201
  collection: r,
1201
- onSelection: R
1202
+ onSelection: N
1202
1203
  }
1203
1204
  ) : /* @__PURE__ */ o(
1204
- Pn,
1205
+ Ln,
1205
1206
  {
1206
1207
  bundle: t,
1207
1208
  target: re,
@@ -1218,36 +1219,36 @@ function ks({
1218
1219
  }
1219
1220
  ),
1220
1221
  /* @__PURE__ */ o(
1221
- ln,
1222
+ dn,
1222
1223
  {
1223
1224
  bundle: t,
1224
- selection: h,
1225
+ selection: v,
1225
1226
  apply: n.apply,
1226
- onSelection: R,
1227
+ onSelection: N,
1227
1228
  rootRef: $
1228
1229
  }
1229
1230
  ),
1230
1231
  /* @__PURE__ */ o(
1231
- vn,
1232
+ gn,
1232
1233
  {
1233
1234
  request: _t,
1234
1235
  count: n.unsavedCount,
1235
1236
  onSave: Mt,
1236
1237
  onDiscard: n.discard,
1237
1238
  onKeep: () => Ge(null),
1238
- note: D ? /* @__PURE__ */ o(zr, { policy: D, value: pe, onChange: Pe }) : void 0,
1239
- canSave: $r(D, pe)
1239
+ note: E ? /* @__PURE__ */ o(zr, { policy: E, value: me, onChange: Pe }) : void 0,
1240
+ canSave: $r(E, me)
1240
1241
  }
1241
1242
  ),
1242
- D && Ve && /* @__PURE__ */ o(
1243
+ E && Ve && /* @__PURE__ */ o(
1243
1244
  Vr,
1244
1245
  {
1245
1246
  open: !0,
1246
1247
  anchor: Ve,
1247
- policy: D,
1248
+ policy: E,
1248
1249
  intro: X ? At(X) : void 0,
1249
1250
  count: n.unsavedCount,
1250
- value: pe,
1251
+ value: me,
1251
1252
  onChange: Pe,
1252
1253
  onSave: He,
1253
1254
  onClose: () => We(null)
@@ -1259,12 +1260,12 @@ function ks({
1259
1260
  anchor: ot,
1260
1261
  steps: n.unsavedSteps,
1261
1262
  exists: (e) => !!t && qe(e, t, T),
1262
- describe: (e) => Ot(e, t, _),
1263
+ describe: (e) => Ot(e, t, K),
1263
1264
  onJump: (e) => {
1264
1265
  be(null), nt(e);
1265
1266
  },
1266
1267
  onSettings: () => {
1267
- be(null), P("settings");
1268
+ be(null), A("settings");
1268
1269
  },
1269
1270
  onClose: () => be(null)
1270
1271
  }
@@ -1272,10 +1273,10 @@ function ks({
1272
1273
  ]
1273
1274
  }
1274
1275
  );
1275
- if (!ne)
1276
+ if (!ae)
1276
1277
  return /* @__PURE__ */ o(St.Provider, { value: Ie, children: dt });
1277
1278
  const ct = c ?? (Re ? Cr(Re) ?? document.body : null);
1278
- return /* @__PURE__ */ y(ae, { children: [
1279
+ return /* @__PURE__ */ h(se, { children: [
1279
1280
  /* @__PURE__ */ o("span", { ref: Bt, hidden: !0, "data-layout-editor-marker": "" }),
1280
1281
  /* @__PURE__ */ o(St.Provider, { value: Ie, children: ct && mr(dt, ct) })
1281
1282
  ] });
@@ -1285,7 +1286,7 @@ function At(r) {
1285
1286
  return `Frozen until ${gr(r.until)}${i}. Saving asks for an override note, kept in History.`;
1286
1287
  }
1287
1288
  export {
1288
- ks as LayoutEditor,
1289
+ bs as LayoutEditor,
1289
1290
  $e as isTyping,
1290
1291
  qe as targetExists
1291
1292
  };