@thebuoyant-tsdev/mui-ts-library 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6,12 +6,13 @@ import B from "@mui/icons-material/ErrorOutlined";
6
6
  import V from "@mui/icons-material/CheckCircleOutlined";
7
7
  import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
8
8
  import { EditorView as G, highlightActiveLine as K, highlightActiveLineGutter as q, keymap as J, lineNumbers as ee, placeholder as te } from "@codemirror/view";
9
- import { Compartment as ne, EditorState as re } from "@codemirror/state";
10
- import { json as ie, jsonParseLinter as ae } from "@codemirror/lang-json";
11
- import { defaultKeymap as oe, history as se, historyKeymap as ce, redo as le, undo as ue } from "@codemirror/commands";
12
- import { HighlightStyle as de, syntaxHighlighting as fe } from "@codemirror/language";
13
- import { lintGutter as pe, linter as me } from "@codemirror/lint";
14
- import { tags as Y } from "@lezer/highlight";
9
+ import { Compartment as ne, EditorState as Y } from "@codemirror/state";
10
+ import { json as re, jsonParseLinter as ie } from "@codemirror/lang-json";
11
+ import { defaultKeymap as ae, history as oe, historyKeymap as se, redo as ce, undo as le } from "@codemirror/commands";
12
+ import { HighlightStyle as ue, syntaxHighlighting as de } from "@codemirror/language";
13
+ import { lintGutter as fe, linter as pe } from "@codemirror/lint";
14
+ import { tags as X } from "@lezer/highlight";
15
+ import { showMinimap as me } from "@replit/codemirror-minimap";
15
16
  import he from "@mui/icons-material/ContentCopy";
16
17
  import ge from "@mui/icons-material/Check";
17
18
  import _e from "@mui/icons-material/Delete";
@@ -76,17 +77,35 @@ var _t = {
76
77
  error: "error",
77
78
  success: "success"
78
79
  };
79
- function bt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i }) {
80
- let { title: a, description: o, confirmLabel: s, cancelLabel: c, severity: l = "info", hideCancelButton: d = !1, maxWidth: f = "xs", showIcon: g = !0 } = t, y = g ? vt[l] : null, b = yt[l], x = s ?? n.confirmLabel, S = c ?? n.cancelLabel;
80
+ function bt({ open: e, options: t, translation: n, onConfirm: i, onCancel: a }) {
81
+ let { title: o, description: c, confirmLabel: l, cancelLabel: d, countdown: f, severity: g = "info", hideCancelButton: y = !1, maxWidth: b = "xs", showIcon: x = !0 } = t, S = x ? vt[g] : null, C = yt[g], w = l ?? n.confirmLabel, T = d ?? n.cancelLabel, [E, D] = s(null);
82
+ r(() => {
83
+ if (!e || !f || f <= 0) {
84
+ D(null);
85
+ return;
86
+ }
87
+ D(f);
88
+ let t = setInterval(() => {
89
+ D((e) => e === null || e <= 1 ? (clearInterval(t), 0) : e - 1);
90
+ }, 1e3);
91
+ return () => clearInterval(t);
92
+ }, [e, f]), r(() => {
93
+ E === 0 && i();
94
+ }, [E]);
95
+ function O(e) {
96
+ e.key === "Enter" && (e.preventDefault(), i());
97
+ }
98
+ let k = E !== null && E > 0 ? `${w} (${E})` : w;
81
99
  return /* @__PURE__ */ W(p, {
82
100
  open: e,
83
- onClose: i,
84
- maxWidth: f,
101
+ onClose: a,
102
+ onKeyDown: O,
103
+ maxWidth: b,
85
104
  fullWidth: !0,
86
- "aria-labelledby": a ? "confirm-dialog-title" : void 0,
87
- "aria-describedby": o ? "confirm-dialog-description" : void 0,
105
+ "aria-labelledby": o ? "confirm-dialog-title" : void 0,
106
+ "aria-describedby": c ? "confirm-dialog-description" : void 0,
88
107
  children: [
89
- a && /* @__PURE__ */ W(_, {
108
+ o && /* @__PURE__ */ W(_, {
90
109
  id: "confirm-dialog-title",
91
110
  "data-testid": "confirm-dialog-title",
92
111
  sx: {
@@ -94,22 +113,22 @@ function bt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
94
113
  alignItems: "center",
95
114
  gap: 1
96
115
  },
97
- children: [y && /* @__PURE__ */ U(y, {
98
- color: l,
116
+ children: [S && /* @__PURE__ */ U(S, {
117
+ color: g,
99
118
  "data-testid": "confirm-dialog-icon",
100
119
  fontSize: "small"
101
- }), a]
120
+ }), o]
102
121
  }),
103
- o && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, {}), /* @__PURE__ */ U(h, { children: typeof o == "string" ? /* @__PURE__ */ U(I, {
122
+ c && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(v, {}), /* @__PURE__ */ U(h, { children: typeof c == "string" ? /* @__PURE__ */ U(I, {
104
123
  id: "confirm-dialog-description",
105
124
  "data-testid": "confirm-dialog-description",
106
125
  variant: "body2",
107
126
  color: "text.secondary",
108
- children: o
127
+ children: c
109
128
  }) : /* @__PURE__ */ U("div", {
110
129
  id: "confirm-dialog-description",
111
130
  "data-testid": "confirm-dialog-description",
112
- children: o
131
+ children: c
113
132
  }) })] }),
114
133
  /* @__PURE__ */ U(v, {}),
115
134
  /* @__PURE__ */ W(m, {
@@ -117,18 +136,18 @@ function bt({ open: e, options: t, translation: n, onConfirm: r, onCancel: i })
117
136
  px: 2,
118
137
  py: 1.5
119
138
  },
120
- children: [!d && /* @__PURE__ */ U(u, {
139
+ children: [!y && /* @__PURE__ */ U(u, {
121
140
  "data-testid": "confirm-dialog-cancel-btn",
122
- onClick: i,
141
+ onClick: a,
123
142
  color: "inherit",
124
- children: S
143
+ children: T
125
144
  }), /* @__PURE__ */ U(u, {
126
145
  "data-testid": "confirm-dialog-confirm-btn",
127
- onClick: r,
128
- color: b,
146
+ onClick: i,
147
+ color: C,
129
148
  variant: "contained",
130
149
  autoFocus: !0,
131
- children: x
150
+ children: k
132
151
  })]
133
152
  })
134
153
  ]
@@ -194,142 +213,151 @@ var wt = {
194
213
  };
195
214
  //#endregion
196
215
  //#region src/components/json-editor/JsonEditorContent.tsx
197
- function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, highlightColors: c, onViewReady: u, onCursorChange: d, onBlur: f, onFocus: p }) {
198
- let m = o(null), h = o(null), g = o(t), _ = o(d), v = o(f), y = o(p), b = o(u), x = o(new ne()), S = o(new ne()), C = L(), w = C.palette.mode === "dark", T = c?.propertyName ?? C.palette.primary.main, E = c?.string ?? C.palette.success.main, D = c?.number ?? C.palette.warning.main, O = c?.boolean ?? C.palette.info.main, k = c?.null ?? C.palette.text.secondary;
216
+ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, showMinimap: c = !1, highlightColors: u, onViewReady: d, onCursorChange: f, onBlur: p, onFocus: m }) {
217
+ let h = o(null), g = o(null), _ = o(t), v = o(f), y = o(p), b = o(m), x = o(d), S = o(new ne()), C = o(new ne()), w = L(), T = w.palette.mode === "dark", E = u?.propertyName ?? w.palette.primary.main, D = u?.string ?? w.palette.success.main, O = u?.number ?? w.palette.warning.main, k = u?.boolean ?? w.palette.info.main, A = u?.null ?? w.palette.text.secondary;
199
218
  return r(() => {
200
- g.current = t;
219
+ _.current = t;
201
220
  }, [t]), r(() => {
202
- _.current = d;
203
- }, [d]), r(() => {
204
221
  v.current = f;
205
222
  }, [f]), r(() => {
206
223
  y.current = p;
207
224
  }, [p]), r(() => {
208
- b.current = u;
209
- }, [u]), r(() => {
210
- if (!m.current) return;
211
- let t = h.current?.state.doc.toString() ?? e ?? "", r = de.define([
225
+ b.current = m;
226
+ }, [m]), r(() => {
227
+ x.current = d;
228
+ }, [d]), r(() => {
229
+ if (!h.current) return;
230
+ let t = g.current?.state.doc.toString() ?? e ?? "", r = ue.define([
212
231
  {
213
- tag: Y.propertyName,
214
- color: T,
232
+ tag: X.propertyName,
233
+ color: E,
215
234
  fontWeight: "bold"
216
235
  },
217
236
  {
218
- tag: Y.string,
219
- color: E
237
+ tag: X.string,
238
+ color: D
220
239
  },
221
240
  {
222
- tag: Y.number,
223
- color: D
241
+ tag: X.number,
242
+ color: O
224
243
  },
225
244
  {
226
- tag: Y.bool,
227
- color: O,
245
+ tag: X.bool,
246
+ color: k,
228
247
  fontWeight: "bold"
229
248
  },
230
249
  {
231
- tag: Y.null,
232
- color: k,
250
+ tag: X.null,
251
+ color: A,
233
252
  fontStyle: "italic"
234
253
  },
235
254
  {
236
- tag: Y.bracket,
237
- color: C.palette.text.secondary
255
+ tag: X.bracket,
256
+ color: w.palette.text.secondary
238
257
  },
239
258
  {
240
- tag: Y.punctuation,
241
- color: C.palette.text.disabled
259
+ tag: X.punctuation,
260
+ color: w.palette.text.disabled
242
261
  },
243
262
  {
244
- tag: Y.invalid,
245
- color: C.palette.error.main,
263
+ tag: X.invalid,
264
+ color: w.palette.error.main,
246
265
  textDecoration: "underline wavy"
247
266
  }
248
- ]), o = [
249
- G.theme({
250
- "&": {
251
- height: "100%",
252
- fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
253
- fontSize: "0.875rem"
254
- },
255
- ".cm-scroller": { overflow: "auto" },
256
- ".cm-content": {
257
- padding: "8px 4px",
258
- caretColor: C.palette.text.primary
259
- },
260
- ".cm-gutters": {
261
- backgroundColor: w ? C.palette.grey[900] : C.palette.grey[50],
262
- color: C.palette.text.disabled,
263
- border: "none",
264
- borderRight: `1px solid ${C.palette.divider}`
265
- },
266
- ".cm-lineNumbers .cm-gutterElement": {
267
- minWidth: "36px",
268
- paddingLeft: "4px"
269
- },
270
- ".cm-activeLineGutter": { backgroundColor: C.palette.action.selected },
271
- ".cm-activeLine": { backgroundColor: C.palette.action.hover },
272
- "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: C.palette.primary.main + "40" },
273
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: C.palette.text.primary },
274
- "&.cm-focused": { outline: "none" },
275
- ".cm-placeholder": {
276
- color: C.palette.text.disabled,
277
- fontStyle: "italic"
278
- },
279
- ".cm-gutter-lint": { width: "16px" },
280
- ".cm-lint-marker-error": { color: C.palette.error.main },
281
- ".cm-lint-marker-warning": { color: C.palette.warning.main },
282
- ".cm-tooltip.cm-tooltip-lint": {
283
- backgroundColor: C.palette.background.paper,
284
- border: `1px solid ${C.palette.divider}`,
285
- borderRadius: "4px"
286
- },
287
- ".cm-diagnostic-error": { borderLeft: `3px solid ${C.palette.error.main}` },
288
- ".cm-diagnostic-warning": { borderLeft: `3px solid ${C.palette.warning.main}` }
289
- }, { dark: w }),
290
- fe(r),
291
- ie(),
292
- pe(),
293
- me(ae()),
294
- se(),
295
- J.of([...oe, ...ce]),
296
- x.current.of(G.editable.of(!i && !a)),
297
- S.current.of(re.readOnly.of(a)),
267
+ ]), o = G.theme({
268
+ "&": {
269
+ height: "100%",
270
+ fontFamily: "'Fira Code', 'JetBrains Mono', 'Consolas', monospace",
271
+ fontSize: "0.875rem"
272
+ },
273
+ ".cm-scroller": { overflow: "auto" },
274
+ ".cm-content": {
275
+ padding: "8px 4px",
276
+ caretColor: w.palette.text.primary
277
+ },
278
+ ".cm-gutters": {
279
+ backgroundColor: T ? w.palette.grey[900] : w.palette.grey[50],
280
+ color: w.palette.text.disabled,
281
+ border: "none",
282
+ borderRight: `1px solid ${w.palette.divider}`
283
+ },
284
+ ".cm-lineNumbers .cm-gutterElement": {
285
+ paddingLeft: "4px",
286
+ paddingRight: "8px"
287
+ },
288
+ ".cm-activeLineGutter": { backgroundColor: w.palette.action.selected },
289
+ ".cm-activeLine": { backgroundColor: w.palette.action.hover },
290
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: w.palette.primary.main + "40" },
291
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: w.palette.text.primary },
292
+ "&.cm-focused": { outline: "none" },
293
+ ".cm-placeholder": {
294
+ color: w.palette.text.disabled,
295
+ fontStyle: "italic"
296
+ },
297
+ ".cm-gutter-lint": { width: "16px" },
298
+ ".cm-lint-marker-error": { color: w.palette.error.main },
299
+ ".cm-lint-marker-warning": { color: w.palette.warning.main },
300
+ ".cm-tooltip.cm-tooltip-lint": {
301
+ backgroundColor: w.palette.background.paper,
302
+ border: `1px solid ${w.palette.divider}`,
303
+ borderRadius: "4px"
304
+ },
305
+ ".cm-diagnostic-error": { borderLeft: `3px solid ${w.palette.error.main}` },
306
+ ".cm-diagnostic-warning": { borderLeft: `3px solid ${w.palette.warning.main}` }
307
+ }, { dark: T }), l = c ? [me.of({
308
+ create: () => {
309
+ let e = document.createElement("div");
310
+ return e.style.width = "80px", e.style.overflow = "hidden", e.style.borderLeft = `1px solid ${w.palette.divider}`, e.style.backgroundColor = T ? w.palette.grey[900] : w.palette.grey[50], { dom: e };
311
+ },
312
+ displayText: "blocks",
313
+ showOverlay: "always"
314
+ })] : [], u = [
315
+ o,
316
+ de(r),
317
+ re(),
318
+ fe(),
319
+ pe(ie()),
320
+ oe(),
321
+ J.of([...ae, ...se]),
322
+ S.current.of(G.editable.of(!i && !a)),
323
+ C.current.of(Y.readOnly.of(a)),
298
324
  K(),
299
325
  ...s ? [ee(), q()] : [],
300
326
  ...n ? [te(n)] : [],
327
+ ...l,
301
328
  G.updateListener.of((e) => {
302
- e.docChanged && g.current?.(e.state.doc.toString());
329
+ e.docChanged && _.current?.(e.state.doc.toString());
303
330
  let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
304
- _.current(n.number, t - n.from + 1);
331
+ v.current(n.number, t - n.from + 1);
305
332
  }),
306
333
  G.domEventHandlers({
307
334
  blur: () => {
308
- v.current?.();
335
+ y.current?.();
309
336
  },
310
337
  focus: () => {
311
- y.current?.();
338
+ b.current?.();
312
339
  }
313
340
  })
314
- ], c = new G({
315
- state: re.create({
341
+ ], d = new G({
342
+ state: Y.create({
316
343
  doc: t,
317
- extensions: o
344
+ extensions: u
318
345
  }),
319
- parent: m.current
346
+ parent: h.current
320
347
  });
321
- return h.current = c, b.current(c), () => {
322
- b.current(null), c.destroy(), h.current = null;
348
+ return g.current = d, x.current(d), () => {
349
+ x.current(null), d.destroy(), g.current = null;
323
350
  };
324
351
  }, [
325
- w,
326
352
  T,
327
353
  E,
328
354
  D,
329
355
  O,
330
- k
356
+ k,
357
+ A,
358
+ c
331
359
  ]), r(() => {
332
- let t = h.current;
360
+ let t = g.current;
333
361
  if (!t) return;
334
362
  let n = t.state.doc.toString();
335
363
  n !== (e ?? "") && t.dispatch({ changes: {
@@ -338,16 +366,16 @@ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
338
366
  insert: e ?? ""
339
367
  } });
340
368
  }, [e]), r(() => {
341
- h.current?.dispatch({ effects: [x.current.reconfigure(G.editable.of(!i && !a)), S.current.reconfigure(re.readOnly.of(a))] });
369
+ g.current?.dispatch({ effects: [S.current.reconfigure(G.editable.of(!i && !a)), C.current.reconfigure(Y.readOnly.of(a))] });
342
370
  }, [i, a]), /* @__PURE__ */ U(l, {
343
- ref: m,
371
+ ref: h,
344
372
  sx: {
345
373
  flex: 1,
346
374
  overflow: "hidden",
347
375
  display: "flex",
348
376
  flexDirection: "column",
349
377
  opacity: i ? .5 : 1,
350
- backgroundColor: C.palette.background.paper,
378
+ backgroundColor: w.palette.background.paper,
351
379
  "& .cm-editor": {
352
380
  flex: 1,
353
381
  display: "flex",
@@ -358,7 +386,7 @@ function Et({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
358
386
  }
359
387
  //#endregion
360
388
  //#region src/components/shared/ToolbarButton.tsx
361
- function X({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
389
+ function Z({ label: e, icon: t, onClick: n, active: r, disabled: i }) {
362
390
  return /* @__PURE__ */ U(F, {
363
391
  title: e,
364
392
  arrow: !0,
@@ -423,11 +451,11 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
423
451
  }
424
452
  function m() {
425
453
  let t = e.current;
426
- t && (ue(t), t.focus());
454
+ t && (le(t), t.focus());
427
455
  }
428
456
  function h() {
429
457
  let t = e.current;
430
- t && (le(t), t.focus());
458
+ t && (ce(t), t.focus());
431
459
  }
432
460
  let g = t.showFormat || t.showCompact, _ = t.showCopy || t.showClear, y = t.showUndoRedo;
433
461
  return /* @__PURE__ */ W(l, {
@@ -447,12 +475,12 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
447
475
  display: "flex",
448
476
  gap: .25
449
477
  },
450
- children: [t.showFormat && /* @__PURE__ */ U(X, {
478
+ children: [t.showFormat && /* @__PURE__ */ U(Z, {
451
479
  label: n.format,
452
480
  icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
453
481
  onClick: u,
454
482
  disabled: c
455
- }), t.showCompact && /* @__PURE__ */ U(X, {
483
+ }), t.showCompact && /* @__PURE__ */ U(Z, {
456
484
  label: n.compact,
457
485
  icon: /* @__PURE__ */ U(xe, { fontSize: "small" }),
458
486
  onClick: d,
@@ -469,7 +497,7 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
469
497
  display: "flex",
470
498
  gap: .25
471
499
  },
472
- children: [t.showCopy && /* @__PURE__ */ U(X, {
500
+ children: [t.showCopy && /* @__PURE__ */ U(Z, {
473
501
  label: a ? n.copySuccess : n.copy,
474
502
  icon: a ? /* @__PURE__ */ U(ge, {
475
503
  fontSize: "small",
@@ -477,7 +505,7 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
477
505
  }) : /* @__PURE__ */ U(he, { fontSize: "small" }),
478
506
  onClick: f,
479
507
  disabled: c
480
- }), t.showClear && /* @__PURE__ */ U(X, {
508
+ }), t.showClear && /* @__PURE__ */ U(Z, {
481
509
  label: n.clear,
482
510
  icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
483
511
  onClick: p,
@@ -494,12 +522,12 @@ function Dt({ viewRef: e, toolbarConfig: t, translation: n, indent: r, disabled:
494
522
  display: "flex",
495
523
  gap: .25
496
524
  },
497
- children: [/* @__PURE__ */ U(X, {
525
+ children: [/* @__PURE__ */ U(Z, {
498
526
  label: n.undo,
499
527
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
500
528
  onClick: m,
501
529
  disabled: c
502
- }), /* @__PURE__ */ U(X, {
530
+ }), /* @__PURE__ */ U(Z, {
503
531
  label: n.redo,
504
532
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
505
533
  onClick: h,
@@ -575,31 +603,31 @@ function At(e) {
575
603
  return !1;
576
604
  }
577
605
  }
578
- function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0, showValidation: y = !1, toolbarConfig: b, translation: x, highlightColors: S, onBlur: C, onFocus: w }) {
579
- let T = {
606
+ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a, width: c, disabled: u = !1, readonly: d = !1, error: f = !1, helperText: p, name: m, indent: h = 2, showLineNumbers: g = !0, showLineColumn: _ = !0, showMinimap: y = !1, showValidation: b = !1, toolbarConfig: x, translation: S, highlightColors: C, onBlur: w, onFocus: T }) {
607
+ let E = {
580
608
  ...Tt,
581
- ...x
582
- }, E = {
609
+ ...S
610
+ }, D = {
583
611
  ...wt,
584
- ...b
585
- }, D = kt(a), k = kt(c), A = D === "auto", j = A ? void 0 : D ?? 300, M = o(null), [N, P] = s({
612
+ ...x
613
+ }, k = kt(a), A = kt(c), j = k === "auto", M = j ? void 0 : k ?? 300, N = o(null), [P, F] = s({
586
614
  line: 1,
587
615
  col: 1
588
- }), [F, I] = s(() => At(e ?? "")), L = t((e) => {
589
- M.current = e;
590
- }, []), R = t((e, t) => {
591
- P({
616
+ }), [I, L] = s(() => At(e ?? "")), R = t((e) => {
617
+ N.current = e;
618
+ }, []), z = t((e, t) => {
619
+ F({
592
620
  line: e,
593
621
  col: t
594
622
  });
595
- }, []), z = t((e) => {
623
+ }, []), B = t((e) => {
596
624
  let t = At(e);
597
- I(t), r?.(t), n?.(e);
598
- }, [n, r]), B = _ || y || !!p;
625
+ L(t), r?.(t), n?.(e);
626
+ }, [n, r]), V = _ || b || !!p;
599
627
  return /* @__PURE__ */ W(l, {
600
628
  sx: {
601
- width: k ?? "100%",
602
- ...A ? {
629
+ width: A ?? "100%",
630
+ ...j ? {
603
631
  display: "flex",
604
632
  flexDirection: "column",
605
633
  flex: 1
@@ -612,7 +640,7 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
612
640
  display: "flex",
613
641
  flexDirection: "column",
614
642
  overflow: "hidden",
615
- ...A ? { flex: 1 } : { height: j },
643
+ ...j ? { flex: 1 } : { height: M },
616
644
  borderColor: f ? "error.main" : void 0,
617
645
  "&:focus-within": {
618
646
  borderColor: f ? "error.main" : "primary.main",
@@ -620,34 +648,35 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
620
648
  }
621
649
  },
622
650
  children: [!d && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Dt, {
623
- viewRef: M,
624
- toolbarConfig: E,
625
- translation: T,
651
+ viewRef: N,
652
+ toolbarConfig: D,
653
+ translation: E,
626
654
  indent: h,
627
655
  disabled: u
628
656
  }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(Et, {
629
657
  value: e,
630
- onChange: z,
658
+ onChange: B,
631
659
  placeholder: i,
632
660
  disabled: u,
633
661
  readonly: d,
634
662
  showLineNumbers: g,
635
- highlightColors: S,
636
- onViewReady: L,
637
- onCursorChange: R,
638
- onBlur: C,
639
- onFocus: w
663
+ showMinimap: y,
664
+ highlightColors: C,
665
+ onViewReady: R,
666
+ onCursorChange: z,
667
+ onBlur: w,
668
+ onFocus: T
640
669
  })]
641
670
  }),
642
- B && /* @__PURE__ */ U(Ot, {
671
+ V && /* @__PURE__ */ U(Ot, {
643
672
  helperText: p,
644
673
  error: f,
645
674
  showLineColumn: _,
646
- showValidation: y,
647
- isValid: F,
648
- cursorLine: N.line,
649
- cursorCol: N.col,
650
- translation: T
675
+ showValidation: b,
676
+ isValid: I,
677
+ cursorLine: P.line,
678
+ cursorCol: P.col,
679
+ translation: E
651
680
  }),
652
681
  m && /* @__PURE__ */ U("input", {
653
682
  type: "hidden",
@@ -660,7 +689,7 @@ function jt({ value: e, onChange: n, onValidChange: r, placeholder: i, height: a
660
689
  //#endregion
661
690
  //#region src/components/gantt-chart/util/gantt-chart.util.ts
662
691
  function Mt(e) {
663
- let t = /* @__PURE__ */ new Date(), n = qt(t), r = Jt(t);
692
+ let t = /* @__PURE__ */ new Date(), n = Jt(t), r = Yt(t);
664
693
  if (e.length === 0) return {
665
694
  start: n,
666
695
  end: r
@@ -673,11 +702,11 @@ function Mt(e) {
673
702
  }
674
703
  function Nt(e, t) {
675
704
  return t === "weeks" ? {
676
- start: Ut(e.start),
705
+ start: Wt(e.start),
677
706
  end: e.end
678
707
  } : t === "quarters" ? {
679
- start: qt(e.start),
680
- end: Jt(e.end)
708
+ start: Jt(e.start),
709
+ end: Yt(e.end)
681
710
  } : e;
682
711
  }
683
712
  function Pt(e, t) {
@@ -722,10 +751,10 @@ function zt(e) {
722
751
  function Bt(e, t) {
723
752
  return new Date(e.getFullYear(), e.getMonth() + t, e.getDate());
724
753
  }
725
- function Z(e, t) {
754
+ function Vt(e, t) {
726
755
  return new Date(e.getFullYear(), e.getMonth(), e.getDate() + t, 0, 0, 0, 0);
727
756
  }
728
- function Vt(e, t, n) {
757
+ function Ht(e, t, n) {
729
758
  if (n === 0) return e;
730
759
  let r = /* @__PURE__ */ new Map();
731
760
  for (let t of e) for (let e of t.dependencies ?? []) r.has(e) || r.set(e, []), r.get(e).push(t.id);
@@ -743,41 +772,41 @@ function Vt(e, t, n) {
743
772
  }
744
773
  return e.map((e) => i.get(e.id));
745
774
  }
746
- function Ht(e) {
775
+ function Ut(e) {
747
776
  let t = [], n = Rt(e.start);
748
777
  for (; n <= e.end;) t.push(n), n = Bt(n, 1);
749
778
  return t;
750
779
  }
751
- function Ut(e) {
780
+ function Wt(e) {
752
781
  let t = new Date(e), n = t.getDay(), r = n === 0 ? -6 : 1 - n;
753
782
  return t.setDate(t.getDate() + r), t.setHours(0, 0, 0, 0), t;
754
783
  }
755
- function Wt(e) {
784
+ function Gt(e) {
756
785
  let t = new Date(Date.UTC(e.getFullYear(), e.getMonth(), e.getDate())), n = t.getUTCDay() || 7;
757
786
  t.setUTCDate(t.getUTCDate() + 4 - n);
758
787
  let r = new Date(Date.UTC(t.getUTCFullYear(), 0, 1));
759
788
  return Math.ceil(((t.getTime() - r.getTime()) / 864e5 + 1) / 7);
760
789
  }
761
- function Gt(e) {
762
- let t = [], n = Ut(e.start);
790
+ function Kt(e) {
791
+ let t = [], n = Wt(e.start);
763
792
  for (; n <= e.end;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 7);
764
793
  return t;
765
794
  }
766
- function Kt(e) {
795
+ function qt(e) {
767
796
  let t = [], n = new Date(e.start.getFullYear(), e.start.getMonth(), e.start.getDate(), 0, 0, 0, 0), r = new Date(e.end.getFullYear(), e.end.getMonth(), e.end.getDate(), 0, 0, 0, 0).getTime();
768
797
  for (; n.getTime() <= r;) t.push(new Date(n)), n = new Date(n.getFullYear(), n.getMonth(), n.getDate() + 1, 0, 0, 0, 0);
769
798
  return t;
770
799
  }
771
- function qt(e) {
800
+ function Jt(e) {
772
801
  let t = Math.floor(e.getMonth() / 3) * 3;
773
802
  return new Date(e.getFullYear(), t, 1, 0, 0, 0, 0);
774
803
  }
775
- function Jt(e) {
804
+ function Yt(e) {
776
805
  let t = Math.floor(e.getMonth() / 3) * 3 + 2;
777
806
  return zt(new Date(e.getFullYear(), t, 1));
778
807
  }
779
- function Yt(e) {
780
- let t = [], n = qt(e.start);
808
+ function Xt(e) {
809
+ let t = [], n = Jt(e.start);
781
810
  for (; n <= e.end;) {
782
811
  let e = Math.floor(n.getMonth() / 3) + 1;
783
812
  t.push({
@@ -788,7 +817,7 @@ function Yt(e) {
788
817
  }
789
818
  return t;
790
819
  }
791
- function Xt(e) {
820
+ function Zt(e) {
792
821
  if (e.length === 0) return /* @__PURE__ */ new Set();
793
822
  let t = /* @__PURE__ */ new Map();
794
823
  for (let n of e) for (let e of n.dependencies ?? []) t.has(e) || t.set(e, []), t.get(e).push(n.id);
@@ -808,14 +837,14 @@ function Xt(e) {
808
837
  }
809
838
  //#endregion
810
839
  //#region src/components/gantt-chart/GanttChart.store.ts
811
- function Zt(e, t) {
840
+ function Qt(e, t) {
812
841
  let n = t.startDate < e.start ? Rt(Bt(t.startDate, -1)) : e.start, r = t.endDate > e.end ? zt(Bt(t.endDate, 1)) : e.end;
813
842
  return n === e.start && r === e.end ? e : {
814
843
  start: n,
815
844
  end: r
816
845
  };
817
846
  }
818
- function Qt(e, t = "months", n = !1, r, i = !1) {
847
+ function $t(e, t = "months", n = !1, r, i = !1) {
819
848
  let a = Mt(e);
820
849
  return Ce((o, s) => ({
821
850
  tasks: e,
@@ -841,7 +870,7 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
841
870
  return {
842
871
  tasks: n,
843
872
  taskTree: Ft(n),
844
- timelineRange: Zt(t.timelineRange, e)
873
+ timelineRange: Qt(t.timelineRange, e)
845
874
  };
846
875
  });
847
876
  },
@@ -850,10 +879,10 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
850
879
  let n = t.tasks.find((t) => t.id === e.id), r = t.tasks.map((t) => t.id === e.id ? e : t);
851
880
  if (t.cascadeDependencies && n) {
852
881
  let t = e.endDate.getTime() - n.endDate.getTime();
853
- r = Vt(r, e.id, t);
882
+ r = Ht(r, e.id, t);
854
883
  }
855
- let i = Zt(t.timelineRange, e);
856
- for (let e of r) i = Zt(i, e);
884
+ let i = Qt(t.timelineRange, e);
885
+ for (let e of r) i = Qt(i, e);
857
886
  return {
858
887
  tasks: r,
859
888
  taskTree: Ft(r),
@@ -924,7 +953,7 @@ function Qt(e, t = "months", n = !1, r, i = !1) {
924
953
  }
925
954
  //#endregion
926
955
  //#region src/components/gantt-chart/GanttChart.types.ts
927
- var $t = {
956
+ var en = {
928
957
  scaleDays: "Tage",
929
958
  scaleWeeks: "Wochen",
930
959
  scaleMonths: "Monate",
@@ -939,6 +968,7 @@ var $t = {
939
968
  statusDone: "Done",
940
969
  statusBlocked: "Blocked",
941
970
  weekColumnPrefix: "KW",
971
+ todayLabel: "Heute",
942
972
  dateLocale: "de-DE",
943
973
  dialogAddTitle: "Aufgabe hinzufügen",
944
974
  dialogEditTitle: "Aufgabe bearbeiten",
@@ -964,12 +994,12 @@ var $t = {
964
994
  addTaskTooltip: "Aufgabe hinzufügen",
965
995
  editTaskTooltip: "Aufgabe bearbeiten",
966
996
  deleteTaskTooltip: "Aufgabe löschen"
967
- }, en = {
997
+ }, tn = {
968
998
  planned: "warning.light",
969
999
  "in-progress": "info.main",
970
1000
  done: "success.main",
971
1001
  blocked: "error.main"
972
- }, tn = {
1002
+ }, nn = {
973
1003
  planned: "warning",
974
1004
  "in-progress": "info",
975
1005
  done: "success",
@@ -977,16 +1007,16 @@ var $t = {
977
1007
  };
978
1008
  //#endregion
979
1009
  //#region src/components/gantt-chart/GanttTaskDialog.tsx
980
- function nn(e) {
1010
+ function rn(e) {
981
1011
  return e.toISOString().slice(0, 10);
982
1012
  }
983
- function rn(e, t, n) {
1013
+ function an(e, t, n) {
984
1014
  return e < t ? t : e > n ? n : e;
985
1015
  }
986
- function an(e) {
987
- return e.flatMap((e) => [e, ...an(e.children)]);
1016
+ function on(e) {
1017
+ return e.flatMap((e) => [e, ...on(e.children)]);
988
1018
  }
989
- function on({ label: e }) {
1019
+ function sn({ label: e }) {
990
1020
  let t = o(null), [n, r] = s(!1);
991
1021
  return /* @__PURE__ */ U(F, {
992
1022
  title: e,
@@ -1009,8 +1039,8 @@ function on({ label: e }) {
1009
1039
  })
1010
1040
  });
1011
1041
  }
1012
- function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, onClose: c }) {
1013
- let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() => an(g), [g]), S = a(() => {
1042
+ function cn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, onClose: c }) {
1043
+ let f = $(), g = Q((e) => e.taskTree), v = Q((e) => e.timelineRange), x = a(() => on(g), [g]), S = a(() => {
1014
1044
  if (t === "add" || !n) return /* @__PURE__ */ new Set();
1015
1045
  let e = (t) => [t.id, ...t.children.flatMap(e)], r = x.find((e) => e.id === n.id);
1016
1046
  return new Set(r ? e(r) : [n.id]);
@@ -1018,7 +1048,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1018
1048
  t,
1019
1049
  n,
1020
1050
  x
1021
- ]), C = x.filter((e) => !S.has(e.id)), T = C, D = nn(rn(/* @__PURE__ */ new Date(), v.start, v.end)), [O, k] = s({
1051
+ ]), C = x.filter((e) => !S.has(e.id)), T = C, D = rn(an(/* @__PURE__ */ new Date(), v.start, v.end)), [O, k] = s({
1022
1052
  name: "",
1023
1053
  startDate: D,
1024
1054
  endDate: D,
@@ -1029,11 +1059,11 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1029
1059
  });
1030
1060
  r(() => {
1031
1061
  if (!e) return;
1032
- let r = nn(rn(/* @__PURE__ */ new Date(), v.start, v.end));
1062
+ let r = rn(an(/* @__PURE__ */ new Date(), v.start, v.end));
1033
1063
  k(t === "edit" && n ? {
1034
1064
  name: n.name,
1035
- startDate: nn(n.startDate),
1036
- endDate: nn(n.endDate),
1065
+ startDate: rn(n.startDate),
1066
+ endDate: rn(n.endDate),
1037
1067
  status: n.status,
1038
1068
  isMilestone: n.isMilestone ?? !1,
1039
1069
  parentId: n.parentId ?? "",
@@ -1214,7 +1244,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1214
1244
  flexShrink: 0
1215
1245
  },
1216
1246
  children: "└"
1217
- }), /* @__PURE__ */ U(on, { label: e.name })]
1247
+ }), /* @__PURE__ */ U(sn, { label: e.name })]
1218
1248
  })
1219
1249
  }, e.id))]
1220
1250
  })]
@@ -1258,7 +1288,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1258
1288
  flexShrink: 0
1259
1289
  },
1260
1290
  children: "└"
1261
- }), /* @__PURE__ */ U(on, { label: e.name })]
1291
+ }), /* @__PURE__ */ U(sn, { label: e.name })]
1262
1292
  })
1263
1293
  }, e.id))
1264
1294
  })]
@@ -1280,7 +1310,7 @@ function sn({ open: e, mode: t, initialTask: n, defaultParentId: i, onSave: o, o
1280
1310
  }
1281
1311
  //#endregion
1282
1312
  //#region src/components/gantt-chart/GanttDeleteDialog.tsx
1283
- function cn({ open: e, task: t, onConfirm: n, onClose: r }) {
1313
+ function ln({ open: e, task: t, onConfirm: n, onClose: r }) {
1284
1314
  let i = $(), a = i.dialogDeleteConfirm.replace("{name}", t?.name ?? "");
1285
1315
  return /* @__PURE__ */ W(p, {
1286
1316
  open: e,
@@ -1306,7 +1336,7 @@ function cn({ open: e, task: t, onConfirm: n, onClose: r }) {
1306
1336
  }
1307
1337
  //#endregion
1308
1338
  //#region src/components/gantt-chart/GanttTaskPanel.tsx
1309
- function ln(e, t) {
1339
+ function un(e, t) {
1310
1340
  return {
1311
1341
  planned: t.statusPlanned,
1312
1342
  "in-progress": t.statusInProgress,
@@ -1314,8 +1344,8 @@ function ln(e, t) {
1314
1344
  blocked: t.statusBlocked
1315
1345
  }[e];
1316
1346
  }
1317
- function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: c, onStatusChange: u, inlineEdit: d, onInlineRename: p }) {
1318
- let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } = Mn(), b = () => {
1347
+ function dn({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onTaskClick: i, onAddTask: a, onEditTask: o, onDeleteTask: c, onStatusChange: u, inlineEdit: d, onInlineRename: p }) {
1348
+ let [m, h] = s(null), [g, _] = s(null), v = $(), { statusColors: y } = Nn(), b = () => {
1319
1349
  g !== null && g.trim() && p?.(e, g.trim()), _(null);
1320
1350
  };
1321
1351
  return /* @__PURE__ */ W(l, {
@@ -1371,7 +1401,7 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1371
1401
  borderRadius: e.isMilestone ? 0 : "50%",
1372
1402
  transform: e.isMilestone ? "rotate(45deg)" : void 0,
1373
1403
  flexShrink: 0,
1374
- bgcolor: e.color ?? y?.[e.status] ?? en[e.status] ?? "grey.400"
1404
+ bgcolor: e.color ?? y?.[e.status] ?? tn[e.status] ?? "grey.400"
1375
1405
  } }),
1376
1406
  g === null ? /* @__PURE__ */ U(I, {
1377
1407
  variant: "body2",
@@ -1459,10 +1489,10 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1459
1489
  justifyContent: "center"
1460
1490
  },
1461
1491
  children: [/* @__PURE__ */ U(f, {
1462
- label: ln(e.status, v),
1492
+ label: un(e.status, v),
1463
1493
  size: "small",
1464
1494
  variant: "outlined",
1465
- color: e.color ?? y?.[e.status] ? "default" : tn[e.status] ?? "default",
1495
+ color: e.color ?? y?.[e.status] ? "default" : nn[e.status] ?? "default",
1466
1496
  sx: {
1467
1497
  height: 20,
1468
1498
  fontSize: 10,
@@ -1489,15 +1519,15 @@ function un({ task: e, expandedIds: t, toggleExpand: n, hasActionsColumn: r, onT
1489
1519
  onClick: () => {
1490
1520
  u(e, t), h(null);
1491
1521
  },
1492
- children: ln(t, v)
1522
+ children: un(t, v)
1493
1523
  }, t))
1494
1524
  })]
1495
1525
  })
1496
1526
  ]
1497
1527
  });
1498
1528
  }
1499
- function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: o, onDeleteTask: c, onStatusChange: u, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
1500
- let v = $(), y = kn(), b = Q((e) => e.taskTree), x = Q((e) => e.expandedIds), S = Q((e) => e.toggleExpand), C = Q((e) => e.timeScale), w = Q((e) => e.addTask), T = Q((e) => e.updateTask), E = Q((e) => e.deleteTask), D = a(() => Lt(b, x), [b, x]), O = we({
1529
+ function fn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTask: i, onEditTask: o, onDeleteTask: c, onStatusChange: u, onTasksChange: d, enableBuiltinDialogs: f, onTaskCreated: p, onTaskUpdated: m, onTaskDeleted: h, inlineEdit: g, virtualizeRows: _ = !1 }) {
1530
+ let v = $(), y = An(), b = Q((e) => e.taskTree), x = Q((e) => e.expandedIds), S = Q((e) => e.toggleExpand), C = Q((e) => e.timeScale), w = Q((e) => e.addTask), T = Q((e) => e.updateTask), E = Q((e) => e.deleteTask), D = a(() => Lt(b, x), [b, x]), O = we({
1501
1531
  count: D.length,
1502
1532
  getScrollElement: () => e.current,
1503
1533
  estimateSize: () => 40,
@@ -1619,7 +1649,7 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1619
1649
  height: 40,
1620
1650
  transform: `translateY(${e.start}px)`
1621
1651
  },
1622
- children: /* @__PURE__ */ U(un, {
1652
+ children: /* @__PURE__ */ U(dn, {
1623
1653
  task: D[e.index],
1624
1654
  expandedIds: x,
1625
1655
  toggleExpand: S,
@@ -1633,7 +1663,7 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1633
1663
  onInlineRename: g ? V : void 0
1634
1664
  })
1635
1665
  }, e.key))
1636
- }) : D.map((e) => /* @__PURE__ */ U(un, {
1666
+ }) : D.map((e) => /* @__PURE__ */ U(dn, {
1637
1667
  task: e,
1638
1668
  expandedIds: x,
1639
1669
  toggleExpand: S,
@@ -1647,21 +1677,21 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1647
1677
  onInlineRename: g ? V : void 0
1648
1678
  }, e.id)),
1649
1679
  f && /* @__PURE__ */ W(H, { children: [
1650
- /* @__PURE__ */ U(sn, {
1680
+ /* @__PURE__ */ U(cn, {
1651
1681
  open: k,
1652
1682
  mode: "add",
1653
1683
  defaultParentId: F?.id,
1654
1684
  onSave: R,
1655
1685
  onClose: () => A(!1)
1656
1686
  }),
1657
- /* @__PURE__ */ U(sn, {
1687
+ /* @__PURE__ */ U(cn, {
1658
1688
  open: j,
1659
1689
  mode: "edit",
1660
1690
  initialTask: F ?? void 0,
1661
1691
  onSave: z,
1662
1692
  onClose: () => M(!1)
1663
1693
  }),
1664
- /* @__PURE__ */ U(cn, {
1694
+ /* @__PURE__ */ U(ln, {
1665
1695
  open: N,
1666
1696
  task: F,
1667
1697
  onConfirm: B,
@@ -1673,10 +1703,10 @@ function dn({ scrollRef: e, onScroll: t, panelWidth: n, onTaskClick: r, onAddTas
1673
1703
  }
1674
1704
  //#endregion
1675
1705
  //#region src/components/gantt-chart/hooks/useGanttDrag.ts
1676
- var fn = 864e5;
1677
- function pn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
1678
- let a = Q((e) => e.updateTask), c = kn(), l = $(), u = o(1);
1679
- u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / fn) : 1;
1706
+ var pn = 864e5;
1707
+ function mn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r, onTasksChange: i }) {
1708
+ let a = Q((e) => e.updateTask), c = An(), l = $(), u = o(1);
1709
+ u.current = e > 0 ? e / ((t.end.getTime() - t.start.getTime()) / pn) : 1;
1680
1710
  let d = o(n);
1681
1711
  d.current = n;
1682
1712
  let f = o(r);
@@ -1713,14 +1743,14 @@ function pn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
1713
1743
  let n = c.getState().tasks.find((t) => t.id === e.taskId);
1714
1744
  if (n) {
1715
1745
  if (t.type === "move") {
1716
- let r = Z(e.originalStart, t.deltaDays), i = Z(e.originalEnd, t.deltaDays);
1746
+ let r = Vt(e.originalStart, t.deltaDays), i = Vt(e.originalEnd, t.deltaDays);
1717
1747
  a({
1718
1748
  ...n,
1719
1749
  startDate: r,
1720
1750
  endDate: i
1721
1751
  }), d.current?.(n, r, i);
1722
1752
  } else {
1723
- let r = Z(e.originalEnd, t.deltaDays), i = r > e.originalStart ? r : Z(e.originalStart, 1);
1753
+ let r = Vt(e.originalEnd, t.deltaDays), i = r > e.originalStart ? r : Vt(e.originalStart, 1);
1724
1754
  a({
1725
1755
  ...n,
1726
1756
  endDate: i
@@ -1777,7 +1807,7 @@ function pn({ totalWidth: e, displayRange: t, onTaskMoved: n, onTaskResized: r,
1777
1807
  }
1778
1808
  //#endregion
1779
1809
  //#region src/components/gantt-chart/GanttTimelineHeader.tsx
1780
- function mn({ items: e }) {
1810
+ function hn({ items: e }) {
1781
1811
  return /* @__PURE__ */ U(l, {
1782
1812
  sx: { display: "flex" },
1783
1813
  children: e.map((e) => /* @__PURE__ */ U(l, {
@@ -1800,7 +1830,8 @@ function mn({ items: e }) {
1800
1830
  }, e.key))
1801
1831
  });
1802
1832
  }
1803
- function hn({ columns: e, groups: t }) {
1833
+ function gn({ columns: e, groups: t, todayX: n, todayLabel: r, todayTooltip: i, todayColor: a }) {
1834
+ let o = L(), s = t ? 80 : 40, c = a ?? o.palette.primary.main, u = o.palette.getContrastText(c);
1804
1835
  return /* @__PURE__ */ W(l, {
1805
1836
  sx: {
1806
1837
  position: "sticky",
@@ -1809,34 +1840,72 @@ function hn({ columns: e, groups: t }) {
1809
1840
  zIndex: 1,
1810
1841
  borderBottom: "1px solid",
1811
1842
  borderColor: "divider",
1812
- height: t ? 80 : 40,
1843
+ height: s,
1813
1844
  overflow: "visible"
1814
1845
  },
1815
- children: [t && /* @__PURE__ */ U(l, {
1816
- sx: {
1817
- height: 40,
1818
- borderBottom: "1px solid",
1819
- borderColor: "divider",
1820
- overflow: "visible"
1821
- },
1822
- children: /* @__PURE__ */ U(mn, { items: t })
1823
- }), /* @__PURE__ */ U(mn, { items: e })]
1846
+ children: [
1847
+ t && /* @__PURE__ */ U(l, {
1848
+ sx: {
1849
+ height: 40,
1850
+ borderBottom: "1px solid",
1851
+ borderColor: "divider",
1852
+ overflow: "visible"
1853
+ },
1854
+ children: /* @__PURE__ */ U(hn, { items: t })
1855
+ }),
1856
+ /* @__PURE__ */ U(hn, { items: e }),
1857
+ n != null && r && /* @__PURE__ */ U(F, {
1858
+ title: i ?? "",
1859
+ placement: "top",
1860
+ arrow: !0,
1861
+ children: /* @__PURE__ */ U(f, {
1862
+ "data-testid": "gantt-today-chip",
1863
+ size: "small",
1864
+ label: r,
1865
+ sx: {
1866
+ position: "absolute",
1867
+ bottom: 0,
1868
+ left: n,
1869
+ transform: "translateX(-50%) translateY(50%)",
1870
+ zIndex: 3,
1871
+ height: 20,
1872
+ fontSize: "0.65rem",
1873
+ fontWeight: 700,
1874
+ letterSpacing: "0.03em",
1875
+ backgroundColor: c,
1876
+ color: u,
1877
+ border: `1.5px solid ${c}`,
1878
+ boxShadow: o.shadows[2],
1879
+ cursor: "default",
1880
+ userSelect: "none",
1881
+ "& .MuiChip-label": {
1882
+ px: "6px",
1883
+ py: 0
1884
+ },
1885
+ "&:hover": {
1886
+ backgroundColor: c,
1887
+ opacity: .9
1888
+ }
1889
+ }
1890
+ })
1891
+ })
1892
+ ]
1824
1893
  });
1825
1894
  }
1826
1895
  //#endregion
1827
1896
  //#region src/components/gantt-chart/GanttBarRow.tsx
1828
- function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: u = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
1829
- let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = Mn(), C = n?.taskId === e.id, w = e;
1897
+ function _n({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth: i, gridColumnWidth: a, criticalTaskIds: o, draggable: s = !1, resizable: c = !1, progressDraggable: u = !1, onTaskClick: d, onMilestoneClick: f, onContextMenu: p, suppressClickRef: m, handleBarMouseDown: h, handleProgressMouseDown: g, formatDragDate: _ }) {
1898
+ let v = L(), { statusColors: y, criticalPathColor: b, milestoneColor: x, barBorderRadius: S } = Nn(), C = n?.taskId === e.id, w = e;
1830
1899
  if (C && n) if (n.type === "move") w = {
1831
1900
  ...e,
1832
- startDate: Z(e.startDate, n.deltaDays),
1833
- endDate: Z(e.endDate, n.deltaDays)
1901
+ startDate: Vt(e.startDate, n.deltaDays),
1902
+ endDate: Vt(e.endDate, n.deltaDays)
1834
1903
  };
1835
1904
  else if (n.type === "resize") {
1836
- let t = Z(e.endDate, n.deltaDays);
1905
+ let t = Vt(e.endDate, n.deltaDays);
1837
1906
  w = {
1838
1907
  ...e,
1839
- endDate: t > e.startDate ? t : Z(e.startDate, 1)
1908
+ endDate: t > e.startDate ? t : Vt(e.startDate, 1)
1840
1909
  };
1841
1910
  } else n.type === "progress" && n.newProgress !== void 0 && (w = {
1842
1911
  ...e,
@@ -1860,7 +1929,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1860
1929
  backgroundSize: `${a}px 100%`,
1861
1930
  backgroundRepeat: "repeat-x"
1862
1931
  },
1863
- children: e.isMilestone ? /* @__PURE__ */ U(_n, {
1932
+ children: e.isMilestone ? /* @__PURE__ */ U(vn, {
1864
1933
  task: e,
1865
1934
  left: T,
1866
1935
  milestoneColor: x,
@@ -1868,7 +1937,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1868
1937
  isCritical: o.has(e.id),
1869
1938
  onMilestoneClick: f,
1870
1939
  theme: v
1871
- }) : /* @__PURE__ */ U(vn, {
1940
+ }) : /* @__PURE__ */ U(yn, {
1872
1941
  task: e,
1873
1942
  effectiveTask: w,
1874
1943
  left: T,
@@ -1893,7 +1962,7 @@ function gn({ task: e, virtualTop: t, activeDrag: n, displayRange: r, totalWidth
1893
1962
  })
1894
1963
  });
1895
1964
  }
1896
- function _n({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCritical: i, onMilestoneClick: a, theme: o }) {
1965
+ function vn({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCritical: i, onMilestoneClick: a, theme: o }) {
1897
1966
  return t < 0 || t > 100 ? null : /* @__PURE__ */ U(l, {
1898
1967
  "data-testid": `gantt-milestone-${e.id}`,
1899
1968
  sx: {
@@ -1911,14 +1980,14 @@ function _n({ task: e, left: t, milestoneColor: n, criticalPathColor: r, isCriti
1911
1980
  onClick: () => a?.(e)
1912
1981
  });
1913
1982
  }
1914
- function vn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDragging: a, activeDrag: o, draggable: s, resizable: c, progressDraggable: u, isCritical: d, statusColors: f, criticalPathColor: p, barBorderRadius: m, onTaskClick: h, onContextMenu: g, suppressClickRef: _, handleBarMouseDown: v, handleProgressMouseDown: y, formatDragDate: b, theme: x }) {
1983
+ function yn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDragging: a, activeDrag: o, draggable: s, resizable: c, progressDraggable: u, isCritical: d, statusColors: f, criticalPathColor: p, barBorderRadius: m, onTaskClick: h, onContextMenu: g, suppressClickRef: _, handleBarMouseDown: v, handleProgressMouseDown: y, formatDragDate: b, theme: x }) {
1915
1984
  let S = Math.max(0, n), C = Math.min(100, n + Math.max(r, .5)) - S;
1916
1985
  return C <= 0 ? null : /* @__PURE__ */ W(H, { children: [
1917
- a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(yn, {
1986
+ a && o && o.type !== "progress" && o.deltaDays !== 0 && /* @__PURE__ */ U(bn, {
1918
1987
  left: S,
1919
1988
  children: o.type === "move" ? `${b(t.startDate)} – ${b(t.endDate)}` : `→ ${b(t.endDate)}`
1920
1989
  }),
1921
- a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(yn, {
1990
+ a && o?.type === "progress" && o.newProgress !== void 0 && /* @__PURE__ */ W(bn, {
1922
1991
  left: S,
1923
1992
  children: [o.newProgress, "%"]
1924
1993
  }),
@@ -1931,7 +2000,7 @@ function vn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
1931
2000
  height: 16,
1932
2001
  top: "50%",
1933
2002
  transform: "translateY(-50%)",
1934
- bgcolor: e.color ?? f?.[e.status] ?? en[e.status] ?? "grey.300",
2003
+ bgcolor: e.color ?? f?.[e.status] ?? tn[e.status] ?? "grey.300",
1935
2004
  borderRadius: m === void 0 ? 1 : `${m}px`,
1936
2005
  overflow: "hidden",
1937
2006
  opacity: a ? .75 : 1,
@@ -2000,7 +2069,7 @@ function vn({ task: e, effectiveTask: t, left: n, width: r, totalWidth: i, isDra
2000
2069
  })
2001
2070
  ] });
2002
2071
  }
2003
- function yn({ left: e, children: t }) {
2072
+ function bn({ left: e, children: t }) {
2004
2073
  return /* @__PURE__ */ U(l, {
2005
2074
  sx: {
2006
2075
  position: "absolute",
@@ -2021,8 +2090,8 @@ function yn({ left: e, children: t }) {
2021
2090
  }
2022
2091
  //#endregion
2023
2092
  //#region src/components/gantt-chart/GanttWeekendStrips.tsx
2024
- function bn({ strips: e, totalWidth: t, height: n, top: r }) {
2025
- let { weekendColor: i } = Mn();
2093
+ function xn({ strips: e, totalWidth: t, height: n, top: r }) {
2094
+ let { weekendColor: i } = Nn();
2026
2095
  return e.length === 0 ? null : /* @__PURE__ */ U(l, {
2027
2096
  "aria-hidden": !0,
2028
2097
  "data-testid": "gantt-weekend-strips",
@@ -2046,7 +2115,7 @@ function bn({ strips: e, totalWidth: t, height: n, top: r }) {
2046
2115
  }
2047
2116
  //#endregion
2048
2117
  //#region src/components/gantt-chart/GanttStatusContextMenu.tsx
2049
- function xn({ contextMenu: e, onClose: t, onSelect: n }) {
2118
+ function Sn({ contextMenu: e, onClose: t, onSelect: n }) {
2050
2119
  let r = $(), i = {
2051
2120
  planned: r.statusPlanned,
2052
2121
  "in-progress": r.statusInProgress,
@@ -2078,8 +2147,8 @@ function xn({ contextMenu: e, onClose: t, onSelect: n }) {
2078
2147
  }
2079
2148
  //#endregion
2080
2149
  //#region src/components/gantt-chart/GanttDependencyArrows.tsx
2081
- function Sn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
2082
- let o = L(), { todayLineColor: s } = Mn();
2150
+ function Cn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, arrowMarkerId: a }) {
2151
+ let o = L(), { todayLineColor: s } = Nn();
2083
2152
  return e.length === 0 && t === null ? null : /* @__PURE__ */ W("svg", {
2084
2153
  "data-testid": "gantt-dependency-arrows",
2085
2154
  style: {
@@ -2128,7 +2197,7 @@ function Sn({ dependencyLines: e, todayX: t, totalWidth: n, height: r, top: i, a
2128
2197
  }
2129
2198
  //#endregion
2130
2199
  //#region src/components/gantt-chart/GanttTimeline.tsx
2131
- function Cn(e, t, n) {
2200
+ function wn(e, t, n) {
2132
2201
  if (n === 0) return [];
2133
2202
  let r = [], i = new Map(e.map((e, t) => [e.id, t]));
2134
2203
  for (let a of e) {
@@ -2146,21 +2215,21 @@ function Cn(e, t, n) {
2146
2215
  }
2147
2216
  return r;
2148
2217
  }
2149
- function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, draggable: u = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
2150
- let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T = kn(), E = $(), D = `gantt-arrow-${i().replace(/:/g, "")}`, O = a(() => Lt(y, x), [y, x]), k = a(() => Nt(S, C), [S, C]), A = a(() => C === "days" ? Kt(k).map((e) => ({
2218
+ function Tn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, draggable: u = !1, resizable: d = !1, progressDraggable: f = !1, showCriticalPath: p = !1, virtualizeRows: m = !1, onTaskMoved: h, onTaskResized: g, onTasksChange: _, onStatusChange: v }) {
2219
+ let y = Q((e) => e.taskTree), b = Q((e) => e.tasks), x = Q((e) => e.expandedIds), S = Q((e) => e.timelineRange), C = Q((e) => e.timeScale), w = Q((e) => e.updateTask), T = An(), E = $(), D = L(), { todayLineColor: O } = Nn(), k = `gantt-arrow-${i().replace(/:/g, "")}`, A = a(() => Lt(y, x), [y, x]), j = a(() => Nt(S, C), [S, C]), M = a(() => C === "days" ? qt(j).map((e) => ({
2151
2220
  key: e.toISOString(),
2152
2221
  label: String(e.getDate()),
2153
2222
  width: 20,
2154
2223
  isWeekend: e.getDay() === 0 || e.getDay() === 6
2155
- })) : C === "weeks" ? Gt(k).map((e) => ({
2224
+ })) : C === "weeks" ? Kt(j).map((e) => ({
2156
2225
  key: e.toISOString(),
2157
- label: `${E.weekColumnPrefix}${Wt(e)}`,
2226
+ label: `${E.weekColumnPrefix}${Gt(e)}`,
2158
2227
  width: 40
2159
- })) : C === "quarters" ? Yt(k).map((e) => ({
2228
+ })) : C === "quarters" ? Xt(j).map((e) => ({
2160
2229
  key: e.key,
2161
2230
  label: e.label,
2162
2231
  width: 360
2163
- })) : Ht(k).map((e) => ({
2232
+ })) : Ut(j).map((e) => ({
2164
2233
  key: e.toISOString(),
2165
2234
  label: e.toLocaleString(E.dateLocale, {
2166
2235
  month: "short",
@@ -2169,13 +2238,13 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2169
2238
  width: 120
2170
2239
  })), [
2171
2240
  C,
2172
- k,
2241
+ j,
2173
2242
  E.weekColumnPrefix,
2174
2243
  E.dateLocale
2175
- ]), j = a(() => A.reduce((e, t) => e + t.width, 0), [A]), M = a(() => {
2244
+ ]), N = a(() => M.reduce((e, t) => e + t.width, 0), [M]), P = a(() => {
2176
2245
  if (C !== "days") return;
2177
2246
  let e = /* @__PURE__ */ new Map();
2178
- for (let t of A) {
2247
+ for (let t of M) {
2179
2248
  let n = new Date(t.key), r = `${n.getFullYear()}-${n.getMonth()}`;
2180
2249
  e.has(r) || e.set(r, {
2181
2250
  label: n.toLocaleString(E.dateLocale, {
@@ -2191,46 +2260,51 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2191
2260
  }));
2192
2261
  }, [
2193
2262
  C,
2194
- A,
2263
+ M,
2195
2264
  E.dateLocale
2196
- ]), N = a(() => Cn(O, k, j), [
2197
- O,
2198
- k,
2199
- j
2200
- ]), P = a(() => p ? Xt(b) : /* @__PURE__ */ new Set(), [p, b]), F = we({
2201
- count: O.length,
2265
+ ]), F = a(() => wn(A, j, N), [
2266
+ A,
2267
+ j,
2268
+ N
2269
+ ]), I = a(() => p ? Zt(b) : /* @__PURE__ */ new Set(), [p, b]), R = we({
2270
+ count: A.length,
2202
2271
  getScrollElement: () => e.current,
2203
2272
  estimateSize: () => 40,
2204
2273
  overscan: 5
2205
- }), I = a(() => {
2274
+ }), z = a(() => {
2206
2275
  if (C !== "days") return [];
2207
2276
  let e = 0;
2208
- return A.flatMap((t) => {
2277
+ return M.flatMap((t) => {
2209
2278
  let n = t.isWeekend ? [{
2210
2279
  key: t.key,
2211
2280
  left: e
2212
2281
  }] : [];
2213
2282
  return e += t.width, n;
2214
2283
  });
2215
- }, [C, A]), L = a(() => {
2216
- let e = Date.now(), t = k.start.getTime(), n = k.end.getTime();
2217
- return e < t || e > n ? null : (e - t) / (n - t) * j;
2218
- }, [k, j]);
2284
+ }, [C, M]), B = a(() => {
2285
+ let e = Date.now(), t = j.start.getTime(), n = j.end.getTime();
2286
+ return e < t || e > n ? null : (e - t) / (n - t) * N;
2287
+ }, [j, N]), V = a(() => (/* @__PURE__ */ new Date()).toLocaleDateString(E.dateLocale, {
2288
+ weekday: "long",
2289
+ day: "numeric",
2290
+ month: "long",
2291
+ year: "numeric"
2292
+ }), [E.dateLocale]), G = O ?? D.palette.primary.main;
2219
2293
  r(() => {
2220
- if (L === null || !e.current) return;
2294
+ if (B === null || !e.current) return;
2221
2295
  let t = e.current.clientWidth;
2222
- e.current.scrollLeft = Math.max(0, L - t / 2);
2296
+ e.current.scrollLeft = Math.max(0, B - t / 2);
2223
2297
  }, []);
2224
- let R = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, z = M ? 80 : 40, { activeDrag: B, suppressClickRef: V, handleBarMouseDown: G, handleProgressMouseDown: K, formatDragDate: q } = pn({
2225
- totalWidth: j,
2226
- displayRange: k,
2298
+ let K = C === "days" ? 20 : C === "weeks" ? 40 : C === "quarters" ? 360 : 120, q = P ? 80 : 40, { activeDrag: J, suppressClickRef: ee, handleBarMouseDown: te, handleProgressMouseDown: ne, formatDragDate: Y } = mn({
2299
+ totalWidth: N,
2300
+ displayRange: j,
2227
2301
  onTaskMoved: h,
2228
2302
  onTaskResized: g,
2229
2303
  onTasksChange: _
2230
- }), [J, ee] = s(null), te = o(v);
2231
- te.current = v;
2232
- let ne = o(_);
2233
- return ne.current = _, /* @__PURE__ */ U(l, {
2304
+ }), [re, ie] = s(null), ae = o(v);
2305
+ ae.current = v;
2306
+ let oe = o(_);
2307
+ return oe.current = _, /* @__PURE__ */ U(l, {
2234
2308
  ref: e,
2235
2309
  onScroll: t,
2236
2310
  "data-testid": "gantt-timeline-scroll",
@@ -2240,88 +2314,92 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2240
2314
  },
2241
2315
  children: /* @__PURE__ */ W(l, {
2242
2316
  sx: {
2243
- minWidth: j,
2317
+ minWidth: N,
2244
2318
  position: "relative"
2245
2319
  },
2246
2320
  children: [
2247
- /* @__PURE__ */ U(hn, {
2248
- columns: A,
2249
- groups: M
2321
+ /* @__PURE__ */ U(gn, {
2322
+ columns: M,
2323
+ groups: P,
2324
+ todayX: B,
2325
+ todayLabel: E.todayLabel,
2326
+ todayTooltip: V,
2327
+ todayColor: G
2250
2328
  }),
2251
- /* @__PURE__ */ U(bn, {
2252
- strips: I,
2253
- totalWidth: j,
2254
- height: O.length * 40,
2255
- top: z
2329
+ /* @__PURE__ */ U(xn, {
2330
+ strips: z,
2331
+ totalWidth: N,
2332
+ height: A.length * 40,
2333
+ top: q
2256
2334
  }),
2257
2335
  m ? /* @__PURE__ */ U(l, {
2258
2336
  sx: {
2259
2337
  position: "relative",
2260
- height: F.getTotalSize()
2338
+ height: R.getTotalSize()
2261
2339
  },
2262
- children: F.getVirtualItems().map((e) => /* @__PURE__ */ U(gn, {
2263
- task: O[e.index],
2340
+ children: R.getVirtualItems().map((e) => /* @__PURE__ */ U(_n, {
2341
+ task: A[e.index],
2264
2342
  virtualTop: e.start,
2265
- activeDrag: B,
2266
- displayRange: k,
2267
- totalWidth: j,
2268
- gridColumnWidth: R,
2269
- criticalTaskIds: P,
2343
+ activeDrag: J,
2344
+ displayRange: j,
2345
+ totalWidth: N,
2346
+ gridColumnWidth: K,
2347
+ criticalTaskIds: I,
2270
2348
  draggable: u,
2271
2349
  resizable: d,
2272
2350
  progressDraggable: f,
2273
2351
  onTaskClick: n,
2274
2352
  onMilestoneClick: c,
2275
- onContextMenu: (e, t, n) => ee({
2353
+ onContextMenu: (e, t, n) => ie({
2276
2354
  task: e,
2277
2355
  mouseX: t,
2278
2356
  mouseY: n
2279
2357
  }),
2280
- suppressClickRef: V,
2281
- handleBarMouseDown: G,
2282
- handleProgressMouseDown: K,
2283
- formatDragDate: q
2358
+ suppressClickRef: ee,
2359
+ handleBarMouseDown: te,
2360
+ handleProgressMouseDown: ne,
2361
+ formatDragDate: Y
2284
2362
  }, e.key))
2285
- }) : /* @__PURE__ */ U(H, { children: O.map((e) => /* @__PURE__ */ U(gn, {
2363
+ }) : /* @__PURE__ */ U(H, { children: A.map((e) => /* @__PURE__ */ U(_n, {
2286
2364
  task: e,
2287
- activeDrag: B,
2288
- displayRange: k,
2289
- totalWidth: j,
2290
- gridColumnWidth: R,
2291
- criticalTaskIds: P,
2365
+ activeDrag: J,
2366
+ displayRange: j,
2367
+ totalWidth: N,
2368
+ gridColumnWidth: K,
2369
+ criticalTaskIds: I,
2292
2370
  draggable: u,
2293
2371
  resizable: d,
2294
2372
  progressDraggable: f,
2295
2373
  onTaskClick: n,
2296
2374
  onMilestoneClick: c,
2297
- onContextMenu: (e, t, n) => ee({
2375
+ onContextMenu: (e, t, n) => ie({
2298
2376
  task: e,
2299
2377
  mouseX: t,
2300
2378
  mouseY: n
2301
2379
  }),
2302
- suppressClickRef: V,
2303
- handleBarMouseDown: G,
2304
- handleProgressMouseDown: K,
2305
- formatDragDate: q
2380
+ suppressClickRef: ee,
2381
+ handleBarMouseDown: te,
2382
+ handleProgressMouseDown: ne,
2383
+ formatDragDate: Y
2306
2384
  }, e.id)) }),
2307
- /* @__PURE__ */ U(xn, {
2308
- contextMenu: J,
2309
- onClose: () => ee(null),
2385
+ /* @__PURE__ */ U(Sn, {
2386
+ contextMenu: re,
2387
+ onClose: () => ie(null),
2310
2388
  onSelect: (e, t) => {
2311
2389
  let n = T.getState().tasks.find((t) => t.id === e.id) ?? e;
2312
2390
  w({
2313
2391
  ...n,
2314
2392
  status: t
2315
- }), te.current?.(n, t), ne.current?.(T.getState().tasks), ee(null);
2393
+ }), ae.current?.(n, t), oe.current?.(T.getState().tasks), ie(null);
2316
2394
  }
2317
2395
  }),
2318
- /* @__PURE__ */ U(Sn, {
2319
- dependencyLines: N,
2320
- todayX: L,
2321
- totalWidth: j,
2322
- height: O.length * 40,
2323
- top: z,
2324
- arrowMarkerId: D
2396
+ /* @__PURE__ */ U(Cn, {
2397
+ dependencyLines: F,
2398
+ todayX: B,
2399
+ totalWidth: N,
2400
+ height: A.length * 40,
2401
+ top: q,
2402
+ arrowMarkerId: k
2325
2403
  })
2326
2404
  ]
2327
2405
  })
@@ -2329,14 +2407,14 @@ function wn({ scrollRef: e, onScroll: t, onTaskClick: n, onMilestoneClick: c, dr
2329
2407
  }
2330
2408
  //#endregion
2331
2409
  //#region src/components/gantt-chart/GanttToolbar.tsx
2332
- function Tn(e) {
2410
+ function En(e) {
2333
2411
  return `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`;
2334
2412
  }
2335
- function En(e) {
2413
+ function Dn(e) {
2336
2414
  let [t, n, r] = e.split("-").map(Number);
2337
2415
  return !t || !n || !r ? null : new Date(t, n - 1, r, 0, 0, 0, 0);
2338
2416
  }
2339
- function Dn({ onScrollToToday: e, config: t }) {
2417
+ function On({ onScrollToToday: e, config: t }) {
2340
2418
  let n = $(), r = Q((e) => e.timeScale), i = Q((e) => e.defaultTimeScale), o = Q((e) => e.setTimeScale), s = Q((e) => e.timelineRange), c = Q((e) => e.isRangeCustomized), u = Q((e) => e.isExpandedCustomized), d = Q((e) => e.setTimelineRange), f = Q((e) => e.resetTimelineRange), p = Q((e) => e.resetView), m = Q((e) => e.tasks), h = Q((e) => e.expandedIds), g = Q((e) => e.expandAll), _ = Q((e) => e.collapseAll), v = m.length > 0 && m.every((e) => h.has(e.id)), y = r !== i || c || u, b = a(() => Date.now(), []), x = b >= s.start.getTime() && b <= s.end.getTime(), C = {
2341
2419
  days: n.scaleDays,
2342
2420
  weeks: n.scaleWeeks,
@@ -2405,9 +2483,9 @@ function Dn({ onScrollToToday: e, config: t }) {
2405
2483
  type: "date",
2406
2484
  size: "small",
2407
2485
  label: n.rangeFrom,
2408
- value: Tn(s.start),
2486
+ value: En(s.start),
2409
2487
  onChange: (e) => {
2410
- let t = En(e.target.value);
2488
+ let t = Dn(e.target.value);
2411
2489
  t && d({
2412
2490
  start: t,
2413
2491
  end: s.end
@@ -2422,9 +2500,9 @@ function Dn({ onScrollToToday: e, config: t }) {
2422
2500
  type: "date",
2423
2501
  size: "small",
2424
2502
  label: n.rangeTo,
2425
- value: Tn(s.end),
2503
+ value: En(s.end),
2426
2504
  onChange: (e) => {
2427
- let t = En(e.target.value);
2505
+ let t = Dn(e.target.value);
2428
2506
  t && d({
2429
2507
  start: s.start,
2430
2508
  end: t
@@ -2461,34 +2539,34 @@ function Dn({ onScrollToToday: e, config: t }) {
2461
2539
  }
2462
2540
  //#endregion
2463
2541
  //#region src/components/gantt-chart/GanttChart.tsx
2464
- var On = e(null);
2542
+ var kn = e(null);
2465
2543
  function Q(e) {
2466
- let t = n(On);
2544
+ let t = n(kn);
2467
2545
  if (!t) throw Error("GanttChartStoreContext is missing.");
2468
2546
  return Se(t, e);
2469
2547
  }
2470
- function kn() {
2471
- let e = n(On);
2548
+ function An() {
2549
+ let e = n(kn);
2472
2550
  if (!e) throw Error("GanttChartStoreContext is missing.");
2473
2551
  return e;
2474
2552
  }
2475
- var An = e($t);
2553
+ var jn = e(en);
2476
2554
  function $() {
2477
- return n(An);
2478
- }
2479
- var jn = e({});
2480
- function Mn() {
2481
2555
  return n(jn);
2482
2556
  }
2483
- function Nn(e, t) {
2557
+ var Mn = e({});
2558
+ function Nn() {
2559
+ return n(Mn);
2560
+ }
2561
+ function Pn(e, t) {
2484
2562
  return e === void 0 ? t : e === "auto" ? "100%" : typeof e == "string" && /^\d+$/.test(e) ? Number(e) : e;
2485
2563
  }
2486
- var Pn = [
2564
+ var Fn = [
2487
2565
  "days",
2488
2566
  "weeks",
2489
2567
  "months",
2490
2568
  "quarters"
2491
- ], Fn = {
2569
+ ], In = {
2492
2570
  showScaleDays: !0,
2493
2571
  showScaleWeeks: !0,
2494
2572
  showScaleMonths: !0,
@@ -2499,11 +2577,11 @@ var Pn = [
2499
2577
  showRangeReset: !0,
2500
2578
  showResetView: !0
2501
2579
  };
2502
- function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
2503
- let N = Nn(b, 400), P = a(() => ({
2504
- ...Fn,
2580
+ function Ln({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEditTask: u, onDeleteTask: d, onStatusChange: f, onTasksChange: p, enableBuiltinDialogs: m = !0, onTaskCreated: h, onTaskUpdated: g, onTaskDeleted: _, showToolbar: v = !0, toolbarConfig: y, height: b, width: x, minPanelWidth: S = 200, maxPanelWidth: C = 600, zoomable: w = !1, draggable: T = !1, resizable: E = !1, inlineEdit: D = !1, progressDraggable: O = !1, showCriticalPath: k = !1, virtualizeRows: A = !1, onTaskMoved: j, onTaskResized: M }) {
2581
+ let N = Pn(b, 400), P = a(() => ({
2582
+ ...In,
2505
2583
  ...y
2506
- }), [y]), F = Nn(x, "100%"), I = Q((e) => e.setTasks), L = Q((e) => e.timeScale), R = Q((e) => e.setTimeScale), z = Q((e) => e.timelineRange), B = o(null), V = o(null), H = o(!1), [G, K] = s(320);
2584
+ }), [y]), F = Pn(x, "100%"), I = Q((e) => e.setTasks), L = Q((e) => e.timeScale), R = Q((e) => e.setTimeScale), z = Q((e) => e.timelineRange), B = o(null), V = o(null), H = o(!1), [G, K] = s(320);
2507
2585
  r(() => {
2508
2586
  I(e);
2509
2587
  }, [e, I]);
@@ -2521,8 +2599,8 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2521
2599
  let e = V.current, t = (e) => {
2522
2600
  if (!e.ctrlKey) return;
2523
2601
  e.preventDefault();
2524
- let t = Pn.indexOf(L);
2525
- e.deltaY < 0 && t > 0 ? R(Pn[t - 1]) : e.deltaY > 0 && t < Pn.length - 1 && R(Pn[t + 1]);
2602
+ let t = Fn.indexOf(L);
2603
+ e.deltaY < 0 && t > 0 ? R(Fn[t - 1]) : e.deltaY > 0 && t < Fn.length - 1 && R(Fn[t + 1]);
2526
2604
  };
2527
2605
  return e.addEventListener("wheel", t, { passive: !1 }), () => e.removeEventListener("wheel", t);
2528
2606
  }, [
@@ -2555,7 +2633,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2555
2633
  borderRadius: 1,
2556
2634
  overflow: "hidden"
2557
2635
  },
2558
- children: [v && /* @__PURE__ */ U(Dn, {
2636
+ children: [v && /* @__PURE__ */ U(On, {
2559
2637
  onScrollToToday: ee,
2560
2638
  config: P
2561
2639
  }), /* @__PURE__ */ W(l, {
@@ -2565,7 +2643,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2565
2643
  overflow: "hidden"
2566
2644
  },
2567
2645
  children: [
2568
- /* @__PURE__ */ U(dn, {
2646
+ /* @__PURE__ */ U(fn, {
2569
2647
  scrollRef: B,
2570
2648
  onScroll: q,
2571
2649
  panelWidth: G,
@@ -2593,7 +2671,7 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2593
2671
  },
2594
2672
  onMouseDown: te
2595
2673
  }),
2596
- /* @__PURE__ */ U(wn, {
2674
+ /* @__PURE__ */ U(Tn, {
2597
2675
  scrollRef: V,
2598
2676
  onScroll: J,
2599
2677
  onTaskClick: n,
@@ -2612,14 +2690,14 @@ function In({ tasks: e, onTaskClick: n, onMilestoneClick: i, onAddTask: c, onEdi
2612
2690
  })]
2613
2691
  });
2614
2692
  }
2615
- function Ln({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: o, translations: c, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
2693
+ function Rn({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showToolbar: r = !0, defaultRangeStart: i, defaultRangeEnd: o, translations: c, enableBuiltinDialogs: l = !0, toolbarConfig: u, zoomable: d = !1, draggable: f = !1, resizable: p = !1, inlineEdit: m = !1, progressDraggable: h = !1, showCriticalPath: g = !1, virtualizeRows: _ = !1, cascadeDependencies: v = !1, statusColors: y, ganttTheme: b, onTaskClick: x, onMilestoneClick: S, onAddTask: C, onEditTask: w, onDeleteTask: T, onStatusChange: E, onTasksChange: D, onTaskMoved: O, onTaskResized: k, onTaskCreated: A, onTaskUpdated: j, onTaskDeleted: M, height: N, width: P, minPanelWidth: F, maxPanelWidth: I }) {
2616
2694
  let L = a(() => ({
2617
- ...$t,
2695
+ ...en,
2618
2696
  ...c
2619
2697
  }), [c]), [R] = s(() => {
2620
- if (!(i !== void 0 || o !== void 0)) return Qt(e, t, n, void 0, v);
2698
+ if (!(i !== void 0 || o !== void 0)) return $t(e, t, n, void 0, v);
2621
2699
  let r = Mt(e);
2622
- return Qt(e, t, n, {
2700
+ return $t(e, t, n, {
2623
2701
  start: i ?? r.start,
2624
2702
  end: o ?? r.end
2625
2703
  }, v);
@@ -2630,13 +2708,13 @@ function Ln({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
2630
2708
  ...b?.statusColors
2631
2709
  }
2632
2710
  }), [y, b]);
2633
- return /* @__PURE__ */ U(An.Provider, {
2711
+ return /* @__PURE__ */ U(jn.Provider, {
2634
2712
  value: L,
2635
- children: /* @__PURE__ */ U(jn.Provider, {
2713
+ children: /* @__PURE__ */ U(Mn.Provider, {
2636
2714
  value: z,
2637
- children: /* @__PURE__ */ U(On.Provider, {
2715
+ children: /* @__PURE__ */ U(kn.Provider, {
2638
2716
  value: R,
2639
- children: /* @__PURE__ */ U(In, {
2717
+ children: /* @__PURE__ */ U(Ln, {
2640
2718
  tasks: e,
2641
2719
  timeScale: t,
2642
2720
  enableBuiltinDialogs: l,
@@ -2672,8 +2750,8 @@ function Ln({ tasks: e, timeScale: t = "months", initialExpandAll: n = !1, showT
2672
2750
  }
2673
2751
  //#endregion
2674
2752
  //#region src/components/password-strength-meter/util/password-strength.util.ts
2675
- var Rn = (e) => Math.max(0, Math.min(4, Math.round(e)));
2676
- function zn(e, t) {
2753
+ var zn = (e) => Math.max(0, Math.min(4, Math.round(e)));
2754
+ function Bn(e, t) {
2677
2755
  let n = e ?? "", r = n.length, i = /[a-z]/.test(n), a = /[A-Z]/.test(n), o = /\d/.test(n), s = /[^A-Za-z0-9]/.test(n), c = [
2678
2756
  i,
2679
2757
  a,
@@ -2695,7 +2773,7 @@ function zn(e, t) {
2695
2773
  }
2696
2774
  let l = 0;
2697
2775
  l += 1, r >= t + 4 && (l += 1), c >= 2 && (l += 1), c >= 3 && (l += 1), /^(.)\1+$/.test(n) && (l -= 2), /1234|abcd|qwer|password|passwort|admin/i.test(n) && (l -= 2);
2698
- let u = Rn(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
2776
+ let u = zn(l), d = u <= 1 ? "weak" : u === 2 ? "ok" : u === 3 ? "good" : "very good";
2699
2777
  return {
2700
2778
  score: u,
2701
2779
  percent: u * 25,
@@ -2709,7 +2787,40 @@ function zn(e, t) {
2709
2787
  }
2710
2788
  //#endregion
2711
2789
  //#region src/components/password-strength-meter/PasswordStrengthBar.tsx
2712
- function Bn({ percent: e, color: t, ariaLabel: n }) {
2790
+ function Vn({ percent: e, color: t, ariaLabel: n, segments: r = !1 }) {
2791
+ if (r) {
2792
+ let r = Math.round(e / 25);
2793
+ return /* @__PURE__ */ U(l, {
2794
+ role: "progressbar",
2795
+ "aria-label": n,
2796
+ "aria-valuenow": e,
2797
+ "aria-valuemin": 0,
2798
+ "aria-valuemax": 100,
2799
+ sx: {
2800
+ width: "100%",
2801
+ display: "flex",
2802
+ gap: "3px",
2803
+ mt: .5
2804
+ },
2805
+ children: [
2806
+ 0,
2807
+ 1,
2808
+ 2,
2809
+ 3
2810
+ ].map((e) => /* @__PURE__ */ U(l, {
2811
+ "data-testid": e < r ? "psm-meter-segment-active" : "psm-meter-segment",
2812
+ sx: {
2813
+ flex: 1,
2814
+ height: "8px",
2815
+ borderRadius: "3px",
2816
+ border: "1px solid",
2817
+ borderColor: "divider",
2818
+ backgroundColor: e < r ? t : "transparent",
2819
+ transition: "background-color 0.3s ease-in-out"
2820
+ }
2821
+ }, e))
2822
+ });
2823
+ }
2713
2824
  return /* @__PURE__ */ U(l, {
2714
2825
  role: "progressbar",
2715
2826
  "aria-label": n,
@@ -2739,7 +2850,7 @@ function Bn({ percent: e, color: t, ariaLabel: n }) {
2739
2850
  }
2740
2851
  //#endregion
2741
2852
  //#region src/components/password-strength-meter/PasswordStrengthMeter.types.ts
2742
- var Vn = {
2853
+ var Hn = {
2743
2854
  label: "Password",
2744
2855
  summaryHeaderLabel: "Requirements for your password",
2745
2856
  summaryMinChars: "At least {n} characters",
@@ -2750,18 +2861,18 @@ var Vn = {
2750
2861
  showPasswordLabel: "Show password",
2751
2862
  hidePasswordLabel: "Hide password",
2752
2863
  meterAriaLabel: "Password strength"
2753
- }, Hn = {
2864
+ }, Un = {
2754
2865
  weak: "#cc0000",
2755
2866
  ok: "#fdc010",
2756
2867
  good: "#8bc34a",
2757
2868
  veryGood: "#43a047"
2758
- }, Un = {
2869
+ }, Wn = {
2759
2870
  failure: "#cc0000",
2760
2871
  success: "#43a047"
2761
2872
  };
2762
2873
  //#endregion
2763
2874
  //#region src/components/password-strength-meter/PasswordStrengthMeter.tsx
2764
- function Wn({ label: e, fulfilled: t, checkColors: n }) {
2875
+ function Gn({ label: e, fulfilled: t, checkColors: n }) {
2765
2876
  return /* @__PURE__ */ W(j, {
2766
2877
  direction: "row",
2767
2878
  sx: {
@@ -2787,14 +2898,14 @@ function Wn({ label: e, fulfilled: t, checkColors: n }) {
2787
2898
  })]
2788
2899
  });
2789
2900
  }
2790
- function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, helperText: c, autoComplete: u, showPasswordAdornment: d = !0, showMeter: f = !0, showSummary: p = !0, inputSize: m = "medium", translation: h, meterColors: g, passwordMinLength: _ = 8, checkColors: v = Un, onPasswordChange: b }) {
2791
- let T = {
2792
- ...Vn,
2793
- ...h
2794
- }, E = {
2901
+ function Kn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, helperText: c, autoComplete: u, customRequirements: d, showPasswordAdornment: f = !0, showMeter: p = !0, showSegmentedBar: m = !1, showSummary: h = !0, inputSize: g = "medium", translation: _, meterColors: v, passwordMinLength: b = 8, checkColors: T = Wn, onPasswordChange: E }) {
2902
+ let O = {
2795
2903
  ...Hn,
2796
- ...g
2797
- }, O = `${i()}-password`, [k, A] = s(!1), [M, N] = s(""), P = e === void 0 ? M : e, F = a(() => zn(P, _), [P, _]);
2904
+ ..._
2905
+ }, k = {
2906
+ ...Un,
2907
+ ...v
2908
+ }, A = `${i()}-password`, [M, N] = s(!1), [P, F] = s(""), L = e === void 0 ? P : e, R = a(() => Bn(L, b), [L, b]);
2798
2909
  return /* @__PURE__ */ W(j, { children: [
2799
2910
  /* @__PURE__ */ W(y, {
2800
2911
  variant: "outlined",
@@ -2802,19 +2913,19 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2802
2913
  error: o,
2803
2914
  children: [
2804
2915
  /* @__PURE__ */ U(w, {
2805
- htmlFor: O,
2806
- size: m,
2807
- children: T.label
2916
+ htmlFor: A,
2917
+ size: g,
2918
+ children: O.label
2808
2919
  }),
2809
2920
  /* @__PURE__ */ U(D, {
2810
- id: O,
2811
- type: k ? "text" : "password",
2921
+ id: A,
2922
+ type: M ? "text" : "password",
2812
2923
  fullWidth: !0,
2813
- size: m,
2814
- value: P,
2924
+ size: g,
2925
+ value: L,
2815
2926
  onChange: (t) => {
2816
2927
  let n = t.target.value;
2817
- e === void 0 && N(n), b && b(n, zn(n, _));
2928
+ e === void 0 && F(n), E && E(n, Bn(n, b));
2818
2929
  },
2819
2930
  disabled: r,
2820
2931
  inputRef: n,
@@ -2823,14 +2934,14 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2823
2934
  name: t,
2824
2935
  autoComplete: u
2825
2936
  },
2826
- endAdornment: d ? /* @__PURE__ */ U(C, {
2937
+ endAdornment: f ? /* @__PURE__ */ U(C, {
2827
2938
  position: "end",
2828
2939
  children: /* @__PURE__ */ U(S, {
2829
2940
  "data-testid": "psm-toggle",
2830
2941
  disabled: r,
2831
- "aria-label": k ? T.hidePasswordLabel : T.showPasswordLabel,
2942
+ "aria-label": M ? O.hidePasswordLabel : O.showPasswordLabel,
2832
2943
  onClick: () => {
2833
- A((e) => !e);
2944
+ N((e) => !e);
2834
2945
  },
2835
2946
  onMouseDown: (e) => {
2836
2947
  e.preventDefault();
@@ -2839,28 +2950,29 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2839
2950
  e.preventDefault();
2840
2951
  },
2841
2952
  edge: "end",
2842
- children: U(k ? Ne : Me, {})
2953
+ children: U(M ? Ne : Me, {})
2843
2954
  })
2844
2955
  }) : null,
2845
- label: T.label
2956
+ label: O.label
2846
2957
  }),
2847
2958
  c && /* @__PURE__ */ U(x, { children: c })
2848
2959
  ]
2849
2960
  }),
2850
- f && /* @__PURE__ */ U(Bn, {
2851
- percent: F.percent,
2961
+ p && /* @__PURE__ */ U(Vn, {
2962
+ percent: R.percent,
2852
2963
  color: ((e) => {
2853
2964
  switch (e.meterStatus) {
2854
- case "weak": return E.weak;
2855
- case "ok": return E.ok;
2856
- case "good": return E.good;
2857
- case "very good": return E.veryGood;
2965
+ case "weak": return k.weak;
2966
+ case "ok": return k.ok;
2967
+ case "good": return k.good;
2968
+ case "very good": return k.veryGood;
2858
2969
  default: return "transparent";
2859
2970
  }
2860
- })(F),
2861
- ariaLabel: T.meterAriaLabel
2971
+ })(R),
2972
+ ariaLabel: O.meterAriaLabel,
2973
+ segments: m
2862
2974
  }),
2863
- p && /* @__PURE__ */ W(l, {
2975
+ h && /* @__PURE__ */ W(l, {
2864
2976
  "data-testid": "psm-summary",
2865
2977
  sx: {
2866
2978
  mt: .5,
@@ -2873,40 +2985,48 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2873
2985
  display: "block",
2874
2986
  fontSize: 14
2875
2987
  },
2876
- children: T.summaryHeaderLabel
2988
+ children: O.summaryHeaderLabel
2877
2989
  }), /* @__PURE__ */ W(j, {
2878
2990
  direction: "row",
2879
2991
  spacing: 6,
2880
2992
  children: [/* @__PURE__ */ W(j, {
2881
2993
  direction: "column",
2882
2994
  children: [
2883
- /* @__PURE__ */ U(Wn, {
2884
- label: T.summaryMinChars.replace("{n}", String(_)),
2885
- fulfilled: F.length >= _,
2886
- checkColors: v
2995
+ /* @__PURE__ */ U(Gn, {
2996
+ label: O.summaryMinChars.replace("{n}", String(b)),
2997
+ fulfilled: R.length >= b,
2998
+ checkColors: T
2887
2999
  }),
2888
- /* @__PURE__ */ U(Wn, {
2889
- label: T.summaryCapitalLetter,
2890
- fulfilled: F.hasUpper,
2891
- checkColors: v
3000
+ /* @__PURE__ */ U(Gn, {
3001
+ label: O.summaryCapitalLetter,
3002
+ fulfilled: R.hasUpper,
3003
+ checkColors: T
2892
3004
  }),
2893
- /* @__PURE__ */ U(Wn, {
2894
- label: T.summaryLowerCaseLetter,
2895
- fulfilled: F.hasLower,
2896
- checkColors: v
3005
+ /* @__PURE__ */ U(Gn, {
3006
+ label: O.summaryLowerCaseLetter,
3007
+ fulfilled: R.hasLower,
3008
+ checkColors: T
2897
3009
  })
2898
3010
  ]
2899
3011
  }), /* @__PURE__ */ W(j, {
2900
3012
  direction: "column",
2901
- children: [/* @__PURE__ */ U(Wn, {
2902
- label: T.summaryNumber,
2903
- fulfilled: F.hasDigit,
2904
- checkColors: v
2905
- }), /* @__PURE__ */ U(Wn, {
2906
- label: T.summarySpecialChar,
2907
- fulfilled: F.hasSymbol,
2908
- checkColors: v
2909
- })]
3013
+ children: [
3014
+ /* @__PURE__ */ U(Gn, {
3015
+ label: O.summaryNumber,
3016
+ fulfilled: R.hasDigit,
3017
+ checkColors: T
3018
+ }),
3019
+ /* @__PURE__ */ U(Gn, {
3020
+ label: O.summarySpecialChar,
3021
+ fulfilled: R.hasSymbol,
3022
+ checkColors: T
3023
+ }),
3024
+ d?.map((e, t) => /* @__PURE__ */ U(Gn, {
3025
+ label: e.label,
3026
+ fulfilled: typeof e.fulfilled == "function" ? e.fulfilled(L) : e.fulfilled,
3027
+ checkColors: T
3028
+ }, t))
3029
+ ]
2910
3030
  })]
2911
3031
  })]
2912
3032
  })
@@ -2914,7 +3034,7 @@ function Gn({ value: e, name: t, inputRef: n, disabled: r = !1, error: o = !1, h
2914
3034
  }
2915
3035
  //#endregion
2916
3036
  //#region src/components/tag-selection/TagSelection.store.ts
2917
- function Kn(e) {
3037
+ function qn(e) {
2918
3038
  return Ce((t) => ({
2919
3039
  tags: e,
2920
3040
  searchValue: "",
@@ -2952,7 +3072,7 @@ function Kn(e) {
2952
3072
  }
2953
3073
  //#endregion
2954
3074
  //#region src/components/tag-selection/TagSelectionAutocomplete.tsx
2955
- var qn = [
3075
+ var Jn = [
2956
3076
  "default",
2957
3077
  "primary",
2958
3078
  "secondary",
@@ -2961,7 +3081,7 @@ var qn = [
2961
3081
  "success",
2962
3082
  "warning"
2963
3083
  ];
2964
- function Jn({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: u = "medium", disabled: d = !1, loading: p = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
3084
+ function Yn({ availableTags: e, searchValue: t, translation: n, onSearchChange: r, onTagSelect: i, onTagCreate: a, inputSize: o = "medium", chipSize: u = "medium", disabled: d = !1, loading: p = !1, isMaxReached: m = !1, allowCreate: h = !1, listboxMaxHeight: g }) {
2965
3085
  let [_, v] = s("default"), [y, b] = s(!1), x = d || m, C = e.filter((e) => e.label.toLowerCase().includes(t.trim().toLowerCase())), w = h && t.trim() !== "" && C.length === 0, T = y && !w, E = () => {
2966
3086
  a?.(t.trim(), _), v("default");
2967
3087
  }, D = () => {
@@ -3060,7 +3180,7 @@ function Jn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
3060
3180
  gap: .5,
3061
3181
  alignItems: "center"
3062
3182
  },
3063
- children: qn.map((e) => /* @__PURE__ */ U(f, {
3183
+ children: Jn.map((e) => /* @__PURE__ */ U(f, {
3064
3184
  size: u,
3065
3185
  color: e,
3066
3186
  label: e,
@@ -3073,7 +3193,7 @@ function Jn({ availableTags: e, searchValue: t, translation: n, onSearchChange:
3073
3193
  }
3074
3194
  //#endregion
3075
3195
  //#region src/components/tag-selection/TagSelectionChip.tsx
3076
- function Yn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
3196
+ function Xn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled: i = !1 }) {
3077
3197
  let a = !!(e.foregroundColor || e.backgroundColor);
3078
3198
  return /* @__PURE__ */ U(f, {
3079
3199
  size: r,
@@ -3100,7 +3220,7 @@ function Yn({ tag: e, onDelete: t, onClick: n, chipSize: r = "medium", disabled:
3100
3220
  }
3101
3221
  //#endregion
3102
3222
  //#region src/components/tag-selection/TagSelectionSelectedTags.tsx
3103
- function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: c = "bottom" }) {
3223
+ function Zn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsLabel: r, chipSize: i = "medium", disabled: a = !1, maxVisibleChips: o, popoverPlacement: c = "bottom" }) {
3104
3224
  let [u, d] = s(null), p = o === void 0 ? e : e.slice(0, o), m = o === void 0 ? [] : e.slice(o), h = !!u && m.length > 0, g = c === "top" ? {
3105
3225
  vertical: "top",
3106
3226
  horizontal: "left"
@@ -3130,7 +3250,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3130
3250
  flexWrap: "wrap",
3131
3251
  gap: 1
3132
3252
  },
3133
- children: [p.map((e) => /* @__PURE__ */ U(Yn, {
3253
+ children: [p.map((e) => /* @__PURE__ */ U(Xn, {
3134
3254
  tag: e,
3135
3255
  onDelete: n,
3136
3256
  chipSize: i,
@@ -3155,7 +3275,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3155
3275
  gap: .5,
3156
3276
  maxWidth: 320
3157
3277
  },
3158
- children: m.map((e) => /* @__PURE__ */ U(Yn, {
3278
+ children: m.map((e) => /* @__PURE__ */ U(Xn, {
3159
3279
  tag: e,
3160
3280
  onDelete: a ? void 0 : n,
3161
3281
  chipSize: i,
@@ -3168,7 +3288,7 @@ function Xn({ selectedTags: e, translation: t, onTagDelete: n, showSelectedTagsL
3168
3288
  }
3169
3289
  //#endregion
3170
3290
  //#region src/components/tag-selection/TagSelection.types.ts
3171
- var Zn = {
3291
+ var Qn = {
3172
3292
  selectedTagsLabel: "Selected tags",
3173
3293
  autoCompleteLabel: "Search and add tags",
3174
3294
  noSelectedTagsText: "No tags selected.",
@@ -3176,14 +3296,14 @@ var Zn = {
3176
3296
  placeholder: "Type to search...",
3177
3297
  loadingText: "Loading...",
3178
3298
  maxTagsReachedText: "Maximum number of tags reached."
3179
- }, Qn = e(null);
3180
- function $n(e) {
3181
- let t = n(Qn);
3299
+ }, $n = e(null);
3300
+ function er(e) {
3301
+ let t = n($n);
3182
3302
  if (!t) throw Error("TagSelectionStoreContext is missing.");
3183
3303
  return Se(t, e);
3184
3304
  }
3185
- function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: o = "medium", chipSize: s = "small", disabled: c = !1, loading: u = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
3186
- let S = $n((e) => e.tags), C = $n((e) => e.searchValue), w = $n((e) => e.setTags), T = $n((e) => e.setSearchValue), E = $n((e) => e.selectTag), D = $n((e) => e.deleteTag), O = $n((e) => e.addTag);
3305
+ function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: i = !0, inputSize: o = "medium", chipSize: s = "small", disabled: c = !1, loading: u = !1, maxTags: d, allowCreate: f = !1, maxVisibleChips: p, popoverPlacement: m = "bottom", listboxMaxHeight: h, translation: g, onTagSelect: _, onTagDelete: v, onTagsChange: y, onSearchChange: b, onTagCreate: x }) {
3306
+ let S = er((e) => e.tags), C = er((e) => e.searchValue), w = er((e) => e.setTags), T = er((e) => e.setSearchValue), E = er((e) => e.selectTag), D = er((e) => e.deleteTag), O = er((e) => e.addTag);
3187
3307
  r(() => {
3188
3308
  w(e);
3189
3309
  }, [e, w]);
@@ -3192,7 +3312,7 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3192
3312
  };
3193
3313
  return /* @__PURE__ */ U(l, {
3194
3314
  sx: { width: "100%" },
3195
- children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(Xn, {
3315
+ children: /* @__PURE__ */ W(j, { children: [t && /* @__PURE__ */ U(Zn, {
3196
3316
  selectedTags: k,
3197
3317
  translation: g,
3198
3318
  onTagDelete: (e) => {
@@ -3208,7 +3328,7 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3208
3328
  disabled: c,
3209
3329
  maxVisibleChips: p,
3210
3330
  popoverPlacement: m
3211
- }), i && /* @__PURE__ */ U(Jn, {
3331
+ }), i && /* @__PURE__ */ U(Yn, {
3212
3332
  availableTags: A,
3213
3333
  searchValue: C,
3214
3334
  translation: g,
@@ -3245,14 +3365,14 @@ function er({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3245
3365
  })] })
3246
3366
  });
3247
3367
  }
3248
- function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
3368
+ function nr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0, showAutoComplete: r = !0, translation: i, inputSize: a = "medium", chipSize: o = "small", disabled: c = !1, loading: l = !1, maxTags: u, allowCreate: d = !1, maxVisibleChips: f, popoverPlacement: p = "bottom", listboxMaxHeight: m, onTagSelect: h, onTagDelete: g, onTagsChange: _, onSearchChange: v, onTagCreate: y }) {
3249
3369
  let b = {
3250
- ...Zn,
3370
+ ...Qn,
3251
3371
  ...i
3252
- }, [x] = s(() => Kn(e));
3253
- return /* @__PURE__ */ U(Qn.Provider, {
3372
+ }, [x] = s(() => qn(e));
3373
+ return /* @__PURE__ */ U($n.Provider, {
3254
3374
  value: x,
3255
- children: /* @__PURE__ */ U(er, {
3375
+ children: /* @__PURE__ */ U(tr, {
3256
3376
  tags: e,
3257
3377
  showSelectedTags: t,
3258
3378
  showSelectedTagsLabel: n,
@@ -3277,7 +3397,7 @@ function tr({ tags: e, showSelectedTags: t = !0, showSelectedTagsLabel: n = !0,
3277
3397
  }
3278
3398
  //#endregion
3279
3399
  //#region src/components/rich-text-editor/RichTextEditor.types.ts
3280
- var nr = {
3400
+ var rr = {
3281
3401
  showBold: !0,
3282
3402
  showItalic: !0,
3283
3403
  showUnderline: !0,
@@ -3296,7 +3416,7 @@ var nr = {
3296
3416
  showUndoRedo: !0,
3297
3417
  showClearFormat: !0,
3298
3418
  showFullscreenButton: !1
3299
- }, rr = {
3419
+ }, ir = {
3300
3420
  bold: "Bold",
3301
3421
  italic: "Italic",
3302
3422
  underline: "Underline",
@@ -3330,7 +3450,7 @@ var nr = {
3330
3450
  };
3331
3451
  //#endregion
3332
3452
  //#region src/components/rich-text-editor/RichTextEditorContent.tsx
3333
- function ir({ editor: e, error: t, disabled: n, readonly: r }) {
3453
+ function ar({ editor: e, error: t, disabled: n, readonly: r }) {
3334
3454
  return /* @__PURE__ */ U(l, {
3335
3455
  sx: {
3336
3456
  flex: 1,
@@ -3419,7 +3539,7 @@ function ir({ editor: e, error: t, disabled: n, readonly: r }) {
3419
3539
  }
3420
3540
  //#endregion
3421
3541
  //#region src/components/rich-text-editor/RichTextEditorLinkDialog.tsx
3422
- function ar({ open: e, onClose: t, editor: n, translation: i }) {
3542
+ function or({ open: e, onClose: t, editor: n, translation: i }) {
3423
3543
  let [a, o] = s("");
3424
3544
  r(() => {
3425
3545
  if (e) {
@@ -3485,7 +3605,7 @@ function ar({ open: e, onClose: t, editor: n, translation: i }) {
3485
3605
  }
3486
3606
  //#endregion
3487
3607
  //#region src/components/rich-text-editor/RichTextEditorColorPicker.tsx
3488
- var or = [
3608
+ var sr = [
3489
3609
  "#000000",
3490
3610
  "#434343",
3491
3611
  "#666666",
@@ -3504,7 +3624,7 @@ var or = [
3504
3624
  "#8a2be2",
3505
3625
  "#ff1493",
3506
3626
  "#a52a2a"
3507
- ], sr = [
3627
+ ], cr = [
3508
3628
  "#ffff00",
3509
3629
  "#ffd700",
3510
3630
  "#ffa500",
@@ -3524,7 +3644,7 @@ var or = [
3524
3644
  "#ffffff",
3525
3645
  "#000000"
3526
3646
  ];
3527
- function cr({ color: e, active: t, onClick: n }) {
3647
+ function lr({ color: e, active: t, onClick: n }) {
3528
3648
  return /* @__PURE__ */ U(F, {
3529
3649
  title: e,
3530
3650
  placement: "top",
@@ -3566,8 +3686,8 @@ function cr({ color: e, active: t, onClick: n }) {
3566
3686
  })
3567
3687
  });
3568
3688
  }
3569
- function lr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: s, removeLabel: c }) {
3570
- let u = o(null), d = r === "highlight" ? sr : or;
3689
+ function ur({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelectColor: a, onRemoveColor: s, removeLabel: c }) {
3690
+ let u = o(null), d = r === "highlight" ? cr : sr;
3571
3691
  function f(e) {
3572
3692
  a(e.target.value);
3573
3693
  }
@@ -3591,7 +3711,7 @@ function lr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
3591
3711
  gap: .5,
3592
3712
  mb: 1
3593
3713
  },
3594
- children: d.map((e) => /* @__PURE__ */ U(cr, {
3714
+ children: d.map((e) => /* @__PURE__ */ U(lr, {
3595
3715
  color: e,
3596
3716
  active: i?.toLowerCase() === e.toLowerCase(),
3597
3717
  onClick: (e) => {
@@ -3661,7 +3781,7 @@ function lr({ anchorEl: e, open: t, onClose: n, mode: r, activeColor: i, onSelec
3661
3781
  }
3662
3782
  //#endregion
3663
3783
  //#region src/components/rich-text-editor/RichTextEditorToolbar.tsx
3664
- function ur({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3784
+ function dr({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3665
3785
  return /* @__PURE__ */ U(F, {
3666
3786
  title: e,
3667
3787
  arrow: !0,
@@ -3693,7 +3813,7 @@ function ur({ label: e, icon: t, activeColor: n, disabled: r, onClick: i }) {
3693
3813
  }) })
3694
3814
  });
3695
3815
  }
3696
- function dr({ level: e }) {
3816
+ function fr({ level: e }) {
3697
3817
  return /* @__PURE__ */ W(l, {
3698
3818
  component: "span",
3699
3819
  sx: {
@@ -3704,7 +3824,7 @@ function dr({ level: e }) {
3704
3824
  children: ["H", e]
3705
3825
  });
3706
3826
  }
3707
- function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
3827
+ function pr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullscreen: i, onToggleFullscreen: a }) {
3708
3828
  let [o, c] = s(!1), [u, d] = s(null), [f, p] = s(null), m = r || !e, h = e?.getAttributes("textStyle")?.color, g = e?.getAttributes("highlight")?.color, _ = t.showBold || t.showItalic || t.showUnderline || t.showStrike, y = t.showHeading1 || t.showHeading2 || t.showHeading3, b = t.showBulletList || t.showOrderedList, x = t.showBlockquote || t.showCodeBlock || t.showLink || t.showHorizontalRule, C = t.showTextColor || t.showHighlight, w = t.showUndoRedo || t.showClearFormat, T = [
3709
3829
  _,
3710
3830
  y,
@@ -3739,28 +3859,28 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3739
3859
  gap: .25
3740
3860
  },
3741
3861
  children: [
3742
- t.showBold && /* @__PURE__ */ U(X, {
3862
+ t.showBold && /* @__PURE__ */ U(Z, {
3743
3863
  label: n.bold,
3744
3864
  icon: /* @__PURE__ */ U(Ke, { fontSize: "small" }),
3745
3865
  onClick: () => e?.chain().focus().toggleBold().run(),
3746
3866
  active: e?.isActive("bold"),
3747
3867
  disabled: m
3748
3868
  }),
3749
- t.showItalic && /* @__PURE__ */ U(X, {
3869
+ t.showItalic && /* @__PURE__ */ U(Z, {
3750
3870
  label: n.italic,
3751
3871
  icon: /* @__PURE__ */ U(qe, { fontSize: "small" }),
3752
3872
  onClick: () => e?.chain().focus().toggleItalic().run(),
3753
3873
  active: e?.isActive("italic"),
3754
3874
  disabled: m
3755
3875
  }),
3756
- t.showUnderline && /* @__PURE__ */ U(X, {
3876
+ t.showUnderline && /* @__PURE__ */ U(Z, {
3757
3877
  label: n.underline,
3758
3878
  icon: /* @__PURE__ */ U(Je, { fontSize: "small" }),
3759
3879
  onClick: () => e?.chain().focus().toggleUnderline().run(),
3760
3880
  active: e?.isActive("underline"),
3761
3881
  disabled: m
3762
3882
  }),
3763
- t.showStrike && /* @__PURE__ */ U(X, {
3883
+ t.showStrike && /* @__PURE__ */ U(Z, {
3764
3884
  label: n.strike,
3765
3885
  icon: /* @__PURE__ */ U(Ye, { fontSize: "small" }),
3766
3886
  onClick: () => e?.chain().focus().toggleStrike().run(),
@@ -3776,23 +3896,23 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3776
3896
  gap: .25
3777
3897
  },
3778
3898
  children: [
3779
- t.showHeading1 && /* @__PURE__ */ U(X, {
3899
+ t.showHeading1 && /* @__PURE__ */ U(Z, {
3780
3900
  label: n.heading1,
3781
- icon: /* @__PURE__ */ U(dr, { level: 1 }),
3901
+ icon: /* @__PURE__ */ U(fr, { level: 1 }),
3782
3902
  onClick: () => e?.chain().focus().toggleHeading({ level: 1 }).run(),
3783
3903
  active: e?.isActive("heading", { level: 1 }),
3784
3904
  disabled: m
3785
3905
  }),
3786
- t.showHeading2 && /* @__PURE__ */ U(X, {
3906
+ t.showHeading2 && /* @__PURE__ */ U(Z, {
3787
3907
  label: n.heading2,
3788
- icon: /* @__PURE__ */ U(dr, { level: 2 }),
3908
+ icon: /* @__PURE__ */ U(fr, { level: 2 }),
3789
3909
  onClick: () => e?.chain().focus().toggleHeading({ level: 2 }).run(),
3790
3910
  active: e?.isActive("heading", { level: 2 }),
3791
3911
  disabled: m
3792
3912
  }),
3793
- t.showHeading3 && /* @__PURE__ */ U(X, {
3913
+ t.showHeading3 && /* @__PURE__ */ U(Z, {
3794
3914
  label: n.heading3,
3795
- icon: /* @__PURE__ */ U(dr, { level: 3 }),
3915
+ icon: /* @__PURE__ */ U(fr, { level: 3 }),
3796
3916
  onClick: () => e?.chain().focus().toggleHeading({ level: 3 }).run(),
3797
3917
  active: e?.isActive("heading", { level: 3 }),
3798
3918
  disabled: m
@@ -3805,13 +3925,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3805
3925
  display: "flex",
3806
3926
  gap: .25
3807
3927
  },
3808
- children: [t.showBulletList && /* @__PURE__ */ U(X, {
3928
+ children: [t.showBulletList && /* @__PURE__ */ U(Z, {
3809
3929
  label: n.bulletList,
3810
3930
  icon: /* @__PURE__ */ U(Xe, { fontSize: "small" }),
3811
3931
  onClick: () => e?.chain().focus().toggleBulletList().run(),
3812
3932
  active: e?.isActive("bulletList"),
3813
3933
  disabled: m
3814
- }), t.showOrderedList && /* @__PURE__ */ U(X, {
3934
+ }), t.showOrderedList && /* @__PURE__ */ U(Z, {
3815
3935
  label: n.orderedList,
3816
3936
  icon: /* @__PURE__ */ U(Ze, { fontSize: "small" }),
3817
3937
  onClick: () => e?.chain().focus().toggleOrderedList().run(),
@@ -3826,28 +3946,28 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3826
3946
  gap: .25
3827
3947
  },
3828
3948
  children: [
3829
- t.showBlockquote && /* @__PURE__ */ U(X, {
3949
+ t.showBlockquote && /* @__PURE__ */ U(Z, {
3830
3950
  label: n.blockquote,
3831
3951
  icon: /* @__PURE__ */ U(Qe, { fontSize: "small" }),
3832
3952
  onClick: () => e?.chain().focus().toggleBlockquote().run(),
3833
3953
  active: e?.isActive("blockquote"),
3834
3954
  disabled: m
3835
3955
  }),
3836
- t.showCodeBlock && /* @__PURE__ */ U(X, {
3956
+ t.showCodeBlock && /* @__PURE__ */ U(Z, {
3837
3957
  label: n.codeBlock,
3838
3958
  icon: /* @__PURE__ */ U($e, { fontSize: "small" }),
3839
3959
  onClick: () => e?.chain().focus().toggleCodeBlock().run(),
3840
3960
  active: e?.isActive("codeBlock"),
3841
3961
  disabled: m
3842
3962
  }),
3843
- t.showLink && /* @__PURE__ */ U(X, {
3963
+ t.showLink && /* @__PURE__ */ U(Z, {
3844
3964
  label: n.link,
3845
3965
  icon: /* @__PURE__ */ U(et, { fontSize: "small" }),
3846
3966
  onClick: () => c(!0),
3847
3967
  active: e?.isActive("link"),
3848
3968
  disabled: m
3849
3969
  }),
3850
- t.showHorizontalRule && /* @__PURE__ */ U(X, {
3970
+ t.showHorizontalRule && /* @__PURE__ */ U(Z, {
3851
3971
  label: n.horizontalRule,
3852
3972
  icon: /* @__PURE__ */ U(tt, { fontSize: "small" }),
3853
3973
  onClick: () => e?.chain().focus().setHorizontalRule().run(),
@@ -3861,13 +3981,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3861
3981
  display: "flex",
3862
3982
  gap: .25
3863
3983
  },
3864
- children: [t.showTextColor && /* @__PURE__ */ U(ur, {
3984
+ children: [t.showTextColor && /* @__PURE__ */ U(dr, {
3865
3985
  label: n.textColor,
3866
3986
  icon: /* @__PURE__ */ U(nt, { fontSize: "small" }),
3867
3987
  activeColor: h,
3868
3988
  disabled: m,
3869
3989
  onClick: (e) => d(e.currentTarget)
3870
- }), t.showHighlight && /* @__PURE__ */ U(ur, {
3990
+ }), t.showHighlight && /* @__PURE__ */ U(dr, {
3871
3991
  label: n.highlight,
3872
3992
  icon: /* @__PURE__ */ U(rt, { fontSize: "small" }),
3873
3993
  activeColor: g,
@@ -3881,17 +4001,17 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3881
4001
  display: "flex",
3882
4002
  gap: .25
3883
4003
  },
3884
- children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(X, {
4004
+ children: [t.showUndoRedo && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(Z, {
3885
4005
  label: n.undo,
3886
4006
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
3887
4007
  onClick: () => e?.chain().focus().undo().run(),
3888
4008
  disabled: m || !e?.can().undo()
3889
- }), /* @__PURE__ */ U(X, {
4009
+ }), /* @__PURE__ */ U(Z, {
3890
4010
  label: n.redo,
3891
4011
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
3892
4012
  onClick: () => e?.chain().focus().redo().run(),
3893
4013
  disabled: m || !e?.can().redo()
3894
- })] }), t.showClearFormat && /* @__PURE__ */ U(X, {
4014
+ })] }), t.showClearFormat && /* @__PURE__ */ U(Z, {
3895
4015
  label: n.clearFormat,
3896
4016
  icon: /* @__PURE__ */ U(it, { fontSize: "small" }),
3897
4017
  onClick: () => e?.chain().focus().clearNodes().unsetAllMarks().run(),
@@ -3917,13 +4037,13 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3917
4037
  })
3918
4038
  ]
3919
4039
  }),
3920
- t.showLink && e && /* @__PURE__ */ U(ar, {
4040
+ t.showLink && e && /* @__PURE__ */ U(or, {
3921
4041
  open: o,
3922
4042
  onClose: () => c(!1),
3923
4043
  editor: e,
3924
4044
  translation: n
3925
4045
  }),
3926
- t.showTextColor && /* @__PURE__ */ U(lr, {
4046
+ t.showTextColor && /* @__PURE__ */ U(ur, {
3927
4047
  anchorEl: u,
3928
4048
  open: !!u,
3929
4049
  onClose: () => d(null),
@@ -3933,7 +4053,7 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3933
4053
  onRemoveColor: () => e?.chain().focus().unsetColor().run(),
3934
4054
  removeLabel: n.removeTextColor
3935
4055
  }),
3936
- t.showHighlight && /* @__PURE__ */ U(lr, {
4056
+ t.showHighlight && /* @__PURE__ */ U(ur, {
3937
4057
  anchorEl: f,
3938
4058
  open: !!f,
3939
4059
  onClose: () => p(null),
@@ -3947,7 +4067,7 @@ function fr({ editor: e, toolbarConfig: t, translation: n, disabled: r, isFullsc
3947
4067
  }
3948
4068
  //#endregion
3949
4069
  //#region src/components/rich-text-editor/RichTextEditorFooter.tsx
3950
- function pr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
4070
+ function mr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxCharacters: i, showWordCount: a, wordCount: o, translation: s }) {
3951
4071
  let c = i === void 0 ? s.characterCount.replace("{count}", String(r)) : s.characterCountMax.replace("{count}", String(r)).replace("{max}", String(i)), u = i !== void 0 && r >= i ? "error" : "text.secondary", d = s.wordCount.replace("{count}", String(o));
3952
4072
  return /* @__PURE__ */ W(l, {
3953
4073
  sx: {
@@ -3977,12 +4097,12 @@ function pr({ helperText: e, error: t, showCharacterCount: n, charCount: r, maxC
3977
4097
  }
3978
4098
  //#endregion
3979
4099
  //#region src/components/rich-text-editor/RichTextEditor.tsx
3980
- function mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: c, readonly: u = !1, showCharacterCount: d = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: y, onChange: b, onFocus: x }) {
4100
+ function hr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxCharacters: a, name: o, placeholder: c, readonly: u = !1, showCharacterCount: d = !1, showToolbar: f = !0, showWordCount: p = !1, toolbarConfig: m, translation: h, value: g, width: _, onBlur: y, onChange: b, onFocus: x }) {
3981
4101
  let S = {
3982
- ...rr,
4102
+ ...ir,
3983
4103
  ...h
3984
4104
  }, C = {
3985
- ...nr,
4105
+ ...rr,
3986
4106
  ...m
3987
4107
  }, [w, T] = s(!1), E = kt(n), D = kt(_), k = E === "auto", A = k ? void 0 : E ?? 200, j = a !== void 0 && a > 0 || d || p, M = Ie({
3988
4108
  shouldRerenderOnTransaction: !0,
@@ -4054,21 +4174,21 @@ function mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
4054
4174
  borderWidth: 2
4055
4175
  }
4056
4176
  },
4057
- children: [f && !u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(fr, {
4177
+ children: [f && !u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(pr, {
4058
4178
  editor: M,
4059
4179
  toolbarConfig: C,
4060
4180
  translation: S,
4061
4181
  disabled: e,
4062
4182
  isFullscreen: w,
4063
4183
  onToggleFullscreen: () => T((e) => !e)
4064
- }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(ir, {
4184
+ }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(ar, {
4065
4185
  editor: M,
4066
4186
  error: t,
4067
4187
  disabled: e,
4068
4188
  readonly: u
4069
4189
  })]
4070
4190
  }),
4071
- F && /* @__PURE__ */ U(pr, {
4191
+ F && /* @__PURE__ */ U(mr, {
4072
4192
  helperText: i,
4073
4193
  error: t,
4074
4194
  showCharacterCount: d || a !== void 0 && a > 0,
@@ -4088,13 +4208,13 @@ function mr({ disabled: e = !1, error: t = !1, height: n, helperText: i, maxChar
4088
4208
  }
4089
4209
  //#endregion
4090
4210
  //#region src/components/sql-editor/SqlEditor.types.ts
4091
- var hr = {
4211
+ var gr = {
4092
4212
  showFormat: !0,
4093
4213
  showCopy: !0,
4094
4214
  showClear: !0,
4095
4215
  showExecute: !1,
4096
4216
  showUndoRedo: !0
4097
- }, gr = {
4217
+ }, _r = {
4098
4218
  format: "Format SQL",
4099
4219
  copy: "Copy",
4100
4220
  copySuccess: "Copied!",
@@ -4104,70 +4224,72 @@ var hr = {
4104
4224
  redo: "Redo",
4105
4225
  lineColumn: "Ln {line}, Col {col}",
4106
4226
  errorCount: "{count} error(s)"
4107
- }, _r = {
4227
+ }, vr = {
4108
4228
  standard: ut,
4109
4229
  mysql: st,
4110
4230
  postgresql: ct,
4111
4231
  sqlite: lt,
4112
4232
  mssql: ot
4113
4233
  };
4114
- function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, dialect: c = "standard", keywordColor: u, stringColor: d, identifierColor: f, schema: p, onLint: m, onDiagnosticsChange: h, onViewReady: g, onCursorChange: _, onBlur: v, onFocus: y }) {
4115
- let b = o(null), x = o(null), S = o(t), C = o(_), w = o(v), T = o(y), E = o(g), D = o(m), O = o(h), k = o(new ne()), A = o(new ne()), j = L(), M = j.palette.mode === "dark", N = !!m, P = JSON.stringify(p);
4234
+ function yr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly: a = !1, showLineNumbers: s = !0, dialect: c = "standard", keywordColor: u, stringColor: d, identifierColor: f, schema: p, onExecute: m, onLint: h, onDiagnosticsChange: g, onViewReady: _, onCursorChange: v, onBlur: y, onFocus: b }) {
4235
+ let x = o(null), S = o(null), C = o(t), w = o(v), T = o(y), E = o(b), D = o(_), O = o(m), k = o(h), A = o(g), j = o(new ne()), M = o(new ne()), N = L(), P = N.palette.mode === "dark", F = !!h, I = JSON.stringify(p);
4116
4236
  return r(() => {
4117
- S.current = t;
4237
+ C.current = t;
4118
4238
  }, [t]), r(() => {
4119
- C.current = _;
4120
- }, [_]), r(() => {
4121
4239
  w.current = v;
4122
4240
  }, [v]), r(() => {
4123
4241
  T.current = y;
4124
4242
  }, [y]), r(() => {
4125
- E.current = g;
4126
- }, [g]), r(() => {
4127
- D.current = m;
4243
+ E.current = b;
4244
+ }, [b]), r(() => {
4245
+ D.current = _;
4246
+ }, [_]), r(() => {
4247
+ O.current = m;
4128
4248
  }, [m]), r(() => {
4129
- O.current = h;
4249
+ k.current = h;
4130
4250
  }, [h]), r(() => {
4131
- if (!b.current) return;
4132
- let t = x.current?.state.doc.toString() ?? e ?? "", r = u ?? j.palette.primary.main, o = d ?? j.palette.success.main, l = f ?? j.palette.info.main, m = de.define([
4251
+ A.current = g;
4252
+ }, [g]), r(() => {
4253
+ if (!x.current) return;
4254
+ let t = S.current?.state.doc.toString() ?? e ?? "", r = u ?? N.palette.primary.main, o = d ?? N.palette.success.main, l = f ?? N.palette.info.main, m = ue.define([
4133
4255
  {
4134
- tag: Y.keyword,
4256
+ tag: X.keyword,
4135
4257
  color: r,
4136
4258
  fontWeight: "bold"
4137
4259
  },
4138
4260
  {
4139
- tag: Y.name,
4261
+ tag: X.name,
4140
4262
  color: l
4141
4263
  },
4142
4264
  {
4143
- tag: [Y.string, Y.special(Y.string)],
4265
+ tag: [X.string, X.special(X.string)],
4144
4266
  color: o,
4145
4267
  fontWeight: "bold"
4146
4268
  },
4147
4269
  {
4148
- tag: Y.number,
4149
- color: j.palette.warning.main
4270
+ tag: X.number,
4271
+ color: N.palette.warning.main
4150
4272
  },
4151
4273
  {
4152
- tag: [Y.lineComment, Y.blockComment],
4153
- color: j.palette.text.disabled,
4274
+ tag: [X.lineComment, X.blockComment],
4275
+ color: N.palette.text.disabled,
4154
4276
  fontStyle: "italic"
4155
4277
  },
4156
4278
  {
4157
- tag: Y.operator,
4158
- color: j.palette.text.secondary
4279
+ tag: X.operator,
4280
+ color: N.palette.text.secondary
4159
4281
  },
4160
4282
  {
4161
- tag: [Y.function(Y.variableName), Y.function(Y.name)],
4162
- color: j.palette.secondary.main
4283
+ tag: [X.function(X.variableName), X.function(X.name)],
4284
+ color: N.palette.secondary.main
4163
4285
  },
4164
4286
  {
4165
- tag: Y.typeName,
4166
- color: j.palette.info.main
4287
+ tag: X.typeName,
4288
+ color: N.palette.info.main
4167
4289
  },
4168
4290
  {
4169
- tag: Y.invalid,
4170
- color: j.palette.error.main,
4291
+ tag: X.invalid,
4292
+ color: N.palette.error.main,
4171
4293
  textDecoration: "underline wavy"
4172
4294
  }
4173
4295
  ]), h = G.theme({
@@ -4179,64 +4301,64 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4179
4301
  ".cm-scroller": { overflow: "auto" },
4180
4302
  ".cm-content": {
4181
4303
  padding: "8px 4px",
4182
- caretColor: j.palette.text.primary
4304
+ caretColor: N.palette.text.primary
4183
4305
  },
4184
4306
  ".cm-gutters": {
4185
- backgroundColor: M ? j.palette.grey[900] : j.palette.grey[50],
4186
- color: j.palette.text.disabled,
4307
+ backgroundColor: P ? N.palette.grey[900] : N.palette.grey[50],
4308
+ color: N.palette.text.disabled,
4187
4309
  border: "none",
4188
- borderRight: `1px solid ${j.palette.divider}`
4310
+ borderRight: `1px solid ${N.palette.divider}`
4189
4311
  },
4190
4312
  ".cm-lineNumbers .cm-gutterElement": {
4191
- minWidth: "36px",
4192
- paddingLeft: "4px"
4313
+ paddingLeft: "4px",
4314
+ paddingRight: "8px"
4193
4315
  },
4194
- ".cm-activeLineGutter": { backgroundColor: j.palette.action.selected },
4195
- ".cm-activeLine": { backgroundColor: j.palette.action.hover },
4196
- "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: j.palette.primary.main + "40" },
4197
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: j.palette.text.primary },
4316
+ ".cm-activeLineGutter": { backgroundColor: N.palette.action.selected },
4317
+ ".cm-activeLine": { backgroundColor: N.palette.action.hover },
4318
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground": { backgroundColor: N.palette.primary.main + "40" },
4319
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: N.palette.text.primary },
4198
4320
  "&.cm-focused": { outline: "none" },
4199
4321
  ".cm-placeholder": {
4200
- color: j.palette.text.disabled,
4322
+ color: N.palette.text.disabled,
4201
4323
  fontStyle: "italic"
4202
4324
  },
4203
4325
  ".cm-tooltip": {
4204
- backgroundColor: j.palette.background.paper,
4205
- border: `1px solid ${j.palette.divider}`,
4326
+ backgroundColor: N.palette.background.paper,
4327
+ border: `1px solid ${N.palette.divider}`,
4206
4328
  borderRadius: "4px",
4207
- boxShadow: j.shadows[4]
4329
+ boxShadow: N.shadows[4]
4208
4330
  },
4209
- ".cm-tooltip-autocomplete > ul > li": { color: j.palette.text.primary },
4331
+ ".cm-tooltip-autocomplete > ul > li": { color: N.palette.text.primary },
4210
4332
  ".cm-tooltip-autocomplete > ul > li[aria-selected]": {
4211
- backgroundColor: j.palette.primary.main + "20",
4212
- color: j.palette.primary.main
4333
+ backgroundColor: N.palette.primary.main + "20",
4334
+ color: N.palette.primary.main
4213
4335
  },
4214
4336
  ".cm-completionMatchedText": {
4215
- color: j.palette.primary.main,
4337
+ color: N.palette.primary.main,
4216
4338
  textDecoration: "none",
4217
4339
  fontWeight: "bold"
4218
4340
  },
4219
4341
  ".cm-completionDetail": {
4220
- color: j.palette.text.secondary,
4342
+ color: N.palette.text.secondary,
4221
4343
  fontStyle: "italic"
4222
4344
  },
4223
4345
  ".cm-gutter-lint": { width: "16px" },
4224
- ".cm-lint-marker-error": { color: j.palette.error.main },
4225
- ".cm-lint-marker-warning": { color: j.palette.warning.main },
4346
+ ".cm-lint-marker-error": { color: N.palette.error.main },
4347
+ ".cm-lint-marker-warning": { color: N.palette.warning.main },
4226
4348
  ".cm-tooltip.cm-tooltip-lint": {
4227
- backgroundColor: j.palette.background.paper,
4228
- border: `1px solid ${j.palette.divider}`,
4349
+ backgroundColor: N.palette.background.paper,
4350
+ border: `1px solid ${N.palette.divider}`,
4229
4351
  borderRadius: "4px"
4230
4352
  },
4231
- ".cm-diagnostic-error": { borderLeft: `3px solid ${j.palette.error.main}` },
4232
- ".cm-diagnostic-warning": { borderLeft: `3px solid ${j.palette.warning.main}` },
4233
- ".cm-diagnostic-info": { borderLeft: `3px solid ${j.palette.info.main}` }
4234
- }, { dark: M }), g = p ? Object.fromEntries(p.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
4353
+ ".cm-diagnostic-error": { borderLeft: `3px solid ${N.palette.error.main}` },
4354
+ ".cm-diagnostic-warning": { borderLeft: `3px solid ${N.palette.warning.main}` },
4355
+ ".cm-diagnostic-info": { borderLeft: `3px solid ${N.palette.info.main}` }
4356
+ }, { dark: P }), g = p ? Object.fromEntries(p.tables.map((e) => [e.name, (e.columns ?? []).map((e) => ({
4235
4357
  label: e.name,
4236
4358
  detail: e.type,
4237
4359
  type: "property"
4238
4360
  }))])) : void 0, _ = async (e) => {
4239
- let t = D.current;
4361
+ let t = k.current;
4240
4362
  if (!t) return [];
4241
4363
  let n = e.state.doc.toString();
4242
4364
  try {
@@ -4249,63 +4371,67 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4249
4371
  message: t.message
4250
4372
  };
4251
4373
  });
4252
- return O.current?.(r.length), r;
4374
+ return A.current?.(r.length), r;
4253
4375
  } catch {
4254
4376
  return [];
4255
4377
  }
4256
- }, v = [
4378
+ }, v = J.of([{
4379
+ key: "Mod-Enter",
4380
+ run: (e) => (O.current?.(e.state.doc.toString()), !0)
4381
+ }]), y = [
4257
4382
  h,
4258
- fe(m),
4383
+ de(m),
4259
4384
  dt({
4260
- dialect: _r[c],
4385
+ dialect: vr[c],
4261
4386
  schema: g
4262
4387
  }),
4263
- se(),
4388
+ oe(),
4264
4389
  ft(),
4390
+ v,
4265
4391
  J.of([
4266
- ...oe,
4267
- ...ce,
4392
+ ...ae,
4393
+ ...se,
4268
4394
  ...pt
4269
4395
  ]),
4270
- k.current.of(G.editable.of(!i && !a)),
4271
- A.current.of(re.readOnly.of(a)),
4396
+ j.current.of(G.editable.of(!i && !a)),
4397
+ M.current.of(Y.readOnly.of(a)),
4272
4398
  K(),
4273
4399
  ...s ? [ee(), q()] : [],
4274
4400
  ...n ? [te(n)] : [],
4275
- ...N ? [pe(), me(_, { delay: 600 })] : [],
4401
+ ...F ? [fe(), pe(_, { delay: 600 })] : [],
4276
4402
  G.updateListener.of((e) => {
4277
- e.docChanged && S.current?.(e.state.doc.toString());
4403
+ e.docChanged && C.current?.(e.state.doc.toString());
4278
4404
  let t = e.state.selection.main.head, n = e.state.doc.lineAt(t);
4279
- C.current(n.number, t - n.from + 1);
4405
+ w.current(n.number, t - n.from + 1);
4280
4406
  }),
4281
4407
  G.domEventHandlers({
4282
4408
  blur: () => {
4283
- w.current?.();
4409
+ T.current?.();
4284
4410
  },
4285
4411
  focus: () => {
4286
- T.current?.();
4412
+ E.current?.();
4287
4413
  }
4288
4414
  })
4289
- ], y = new G({
4290
- state: re.create({
4415
+ ], b = new G({
4416
+ state: Y.create({
4291
4417
  doc: t,
4292
- extensions: v
4418
+ extensions: y
4293
4419
  }),
4294
- parent: b.current
4420
+ parent: x.current
4295
4421
  });
4296
- return x.current = y, E.current(y), () => {
4297
- E.current(null), y.destroy(), x.current = null;
4422
+ return S.current = b, D.current(b), () => {
4423
+ D.current(null), b.destroy(), S.current = null;
4298
4424
  };
4299
4425
  }, [
4300
- M,
4426
+ P,
4301
4427
  c,
4302
- N,
4428
+ F,
4303
4429
  u,
4304
4430
  d,
4305
4431
  f,
4306
- P
4432
+ I
4307
4433
  ]), r(() => {
4308
- let t = x.current;
4434
+ let t = S.current;
4309
4435
  if (!t) return;
4310
4436
  let n = t.state.doc.toString();
4311
4437
  n !== (e ?? "") && t.dispatch({ changes: {
@@ -4314,16 +4440,16 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4314
4440
  insert: e ?? ""
4315
4441
  } });
4316
4442
  }, [e]), r(() => {
4317
- x.current?.dispatch({ effects: [k.current.reconfigure(G.editable.of(!i && !a)), A.current.reconfigure(re.readOnly.of(a))] });
4443
+ S.current?.dispatch({ effects: [j.current.reconfigure(G.editable.of(!i && !a)), M.current.reconfigure(Y.readOnly.of(a))] });
4318
4444
  }, [i, a]), /* @__PURE__ */ U(l, {
4319
- ref: b,
4445
+ ref: x,
4320
4446
  sx: {
4321
4447
  flex: 1,
4322
4448
  overflow: "hidden",
4323
4449
  display: "flex",
4324
4450
  flexDirection: "column",
4325
4451
  opacity: i ? .5 : 1,
4326
- backgroundColor: j.palette.background.paper,
4452
+ backgroundColor: N.palette.background.paper,
4327
4453
  "& .cm-editor": {
4328
4454
  flex: 1,
4329
4455
  display: "flex",
@@ -4334,14 +4460,14 @@ function vr({ value: e, onChange: t, placeholder: n, disabled: i = !1, readonly:
4334
4460
  }
4335
4461
  //#endregion
4336
4462
  //#region src/components/sql-editor/SqlEditorToolbar.tsx
4337
- var yr = {
4463
+ var br = {
4338
4464
  standard: "sql",
4339
4465
  mysql: "mysql",
4340
4466
  postgresql: "postgresql",
4341
4467
  sqlite: "sqlite",
4342
4468
  mssql: "tsql"
4343
4469
  };
4344
- function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
4470
+ function xr({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled: i, onExecute: a }) {
4345
4471
  let [o, c] = s(!1), u = i || !e.current;
4346
4472
  function d() {
4347
4473
  let t = e.current?.state.doc.toString() ?? "";
@@ -4359,18 +4485,18 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4359
4485
  }
4360
4486
  function p() {
4361
4487
  let t = e.current;
4362
- t && (ue(t), t.focus());
4488
+ t && (le(t), t.focus());
4363
4489
  }
4364
4490
  function m() {
4365
4491
  let t = e.current;
4366
- t && (le(t), t.focus());
4492
+ t && (ce(t), t.focus());
4367
4493
  }
4368
4494
  function h() {
4369
4495
  let t = e.current;
4370
4496
  if (!t) return;
4371
4497
  let n = t.state.doc.toString();
4372
4498
  try {
4373
- let e = ht(n, { language: yr[r] });
4499
+ let e = ht(n, { language: br[r] });
4374
4500
  t.dispatch({ changes: {
4375
4501
  from: 0,
4376
4502
  to: t.state.doc.length,
@@ -4401,7 +4527,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4401
4527
  display: "flex",
4402
4528
  gap: .25
4403
4529
  },
4404
- children: /* @__PURE__ */ U(X, {
4530
+ children: /* @__PURE__ */ U(Z, {
4405
4531
  label: n.format,
4406
4532
  icon: /* @__PURE__ */ U(be, { fontSize: "small" }),
4407
4533
  onClick: h,
@@ -4418,7 +4544,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4418
4544
  display: "flex",
4419
4545
  gap: .25
4420
4546
  },
4421
- children: [t.showCopy && /* @__PURE__ */ U(X, {
4547
+ children: [t.showCopy && /* @__PURE__ */ U(Z, {
4422
4548
  label: o ? n.copySuccess : n.copy,
4423
4549
  icon: o ? /* @__PURE__ */ U(ge, {
4424
4550
  fontSize: "small",
@@ -4426,7 +4552,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4426
4552
  }) : /* @__PURE__ */ U(he, { fontSize: "small" }),
4427
4553
  onClick: d,
4428
4554
  disabled: u
4429
- }), t.showClear && /* @__PURE__ */ U(X, {
4555
+ }), t.showClear && /* @__PURE__ */ U(Z, {
4430
4556
  label: n.clear,
4431
4557
  icon: /* @__PURE__ */ U(_e, { fontSize: "small" }),
4432
4558
  onClick: f,
@@ -4443,12 +4569,12 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4443
4569
  display: "flex",
4444
4570
  gap: .25
4445
4571
  },
4446
- children: [/* @__PURE__ */ U(X, {
4572
+ children: [/* @__PURE__ */ U(Z, {
4447
4573
  label: n.undo,
4448
4574
  icon: /* @__PURE__ */ U(ve, { fontSize: "small" }),
4449
4575
  onClick: p,
4450
4576
  disabled: u
4451
- }), /* @__PURE__ */ U(X, {
4577
+ }), /* @__PURE__ */ U(Z, {
4452
4578
  label: n.redo,
4453
4579
  icon: /* @__PURE__ */ U(ye, { fontSize: "small" }),
4454
4580
  onClick: m,
@@ -4459,7 +4585,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4459
4585
  orientation: "vertical",
4460
4586
  flexItem: !0,
4461
4587
  sx: { mx: .5 }
4462
- }), /* @__PURE__ */ U(X, {
4588
+ }), /* @__PURE__ */ U(Z, {
4463
4589
  label: n.execute,
4464
4590
  icon: /* @__PURE__ */ U(mt, { fontSize: "small" }),
4465
4591
  onClick: g,
@@ -4471,7 +4597,7 @@ function br({ viewRef: e, toolbarConfig: t, translation: n, dialect: r, disabled
4471
4597
  }
4472
4598
  //#endregion
4473
4599
  //#region src/components/sql-editor/SqlEditorFooter.tsx
4474
- function xr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
4600
+ function Sr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, diagnosticsCount: i, cursorLine: a, cursorCol: o, translation: s }) {
4475
4601
  let c = s.lineColumn.replace("{line}", String(a)).replace("{col}", String(o)), u = s.errorCount.replace("{count}", String(i));
4476
4602
  return /* @__PURE__ */ W(l, {
4477
4603
  sx: {
@@ -4512,12 +4638,12 @@ function xr({ helperText: e, error: t, showLineColumn: n, showErrorCount: r, dia
4512
4638
  }
4513
4639
  //#endregion
4514
4640
  //#region src/components/sql-editor/SqlEditor.tsx
4515
- function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: c = !1, readonly: u = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: y, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
4641
+ function Cr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabled: c = !1, readonly: u = !1, error: d = !1, helperText: f, name: p, dialect: m = "standard", showLineNumbers: h = !0, showLineColumn: g = !0, showErrorCount: _ = !1, toolbarConfig: y, translation: b, highlightColors: x, schema: S, onExecute: C, onLint: w, onBlur: T, onFocus: E }) {
4516
4642
  let D = {
4517
- ...gr,
4643
+ ..._r,
4518
4644
  ...b
4519
4645
  }, k = {
4520
- ...hr,
4646
+ ...gr,
4521
4647
  ...y
4522
4648
  }, A = kt(i), j = kt(a), M = A === "auto", N = M ? void 0 : A ?? 300, P = o(null), [F, I] = s({
4523
4649
  line: 1,
@@ -4555,14 +4681,14 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4555
4681
  borderWidth: 2
4556
4682
  }
4557
4683
  },
4558
- children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(br, {
4684
+ children: [!u && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(xr, {
4559
4685
  viewRef: P,
4560
4686
  toolbarConfig: k,
4561
4687
  translation: D,
4562
4688
  dialect: m,
4563
4689
  disabled: c,
4564
4690
  onExecute: C
4565
- }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(vr, {
4691
+ }), /* @__PURE__ */ U(v, {})] }), /* @__PURE__ */ U(yr, {
4566
4692
  value: e,
4567
4693
  onChange: n,
4568
4694
  placeholder: r,
@@ -4574,6 +4700,7 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4574
4700
  stringColor: x?.string,
4575
4701
  identifierColor: x?.identifier,
4576
4702
  schema: S,
4703
+ onExecute: C,
4577
4704
  onLint: w,
4578
4705
  onDiagnosticsChange: w ? V : void 0,
4579
4706
  onViewReady: z,
@@ -4582,7 +4709,7 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4582
4709
  onFocus: E
4583
4710
  })]
4584
4711
  }),
4585
- G && /* @__PURE__ */ U(xr, {
4712
+ G && /* @__PURE__ */ U(Sr, {
4586
4713
  helperText: f,
4587
4714
  error: d,
4588
4715
  showLineColumn: g,
@@ -4601,4 +4728,4 @@ function Sr({ value: e, onChange: n, placeholder: r, height: i, width: a, disabl
4601
4728
  });
4602
4729
  }
4603
4730
  //#endregion
4604
- export { St as ConfirmDialogProvider, Un as DEFAULT_CHECK_COLORS, _t as DEFAULT_CONFIRM_DIALOG_TRANSLATION, $t as DEFAULT_GANTT_TRANSLATIONS, wt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Tt as DEFAULT_JSON_EDITOR_TRANSLATION, Hn as DEFAULT_METER_COLORS, Vn as DEFAULT_PASSWORD_TRANSLATIONS, nr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, rr as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, hr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, gr as DEFAULT_SQL_EDITOR_TRANSLATION, Zn as DEFAULT_TAG_SELECTION_TRANSLATION, Ln as GanttChart, jt as JsonEditor, Gn as PasswordStrengthMeter, mr as RichTextEditor, Sr as SqlEditor, tr as TagSelection, Ct as useConfirm, Q as useGanttChartStore, Mn as useGanttTheme, $ as useGanttTranslations, kn as useRawGanttChartStore };
4731
+ export { St as ConfirmDialogProvider, Wn as DEFAULT_CHECK_COLORS, _t as DEFAULT_CONFIRM_DIALOG_TRANSLATION, en as DEFAULT_GANTT_TRANSLATIONS, wt as DEFAULT_JSON_EDITOR_TOOLBAR_CONFIG, Tt as DEFAULT_JSON_EDITOR_TRANSLATION, Un as DEFAULT_METER_COLORS, Hn as DEFAULT_PASSWORD_TRANSLATIONS, rr as DEFAULT_RICH_TEXT_EDITOR_TOOLBAR_CONFIG, ir as DEFAULT_RICH_TEXT_EDITOR_TRANSLATION, gr as DEFAULT_SQL_EDITOR_TOOLBAR_CONFIG, _r as DEFAULT_SQL_EDITOR_TRANSLATION, Qn as DEFAULT_TAG_SELECTION_TRANSLATION, Rn as GanttChart, jt as JsonEditor, Kn as PasswordStrengthMeter, hr as RichTextEditor, Cr as SqlEditor, nr as TagSelection, Ct as useConfirm, Q as useGanttChartStore, Nn as useGanttTheme, $ as useGanttTranslations, An as useRawGanttChartStore };