@oliasoft-open-source/react-ui-library 9.1.1 → 9.2.0-beta-1

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
@@ -6488,55 +6488,48 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6488
6488
  richTextToolbarContainer: "_richTextToolbarContainer_1gbkk_5"
6489
6489
  }, Yd = /* @__PURE__ */ function(e) {
6490
6490
  return e.BOLD = "bold", e.ITALIC = "italic", e.CODE = "code", e.UL = "ul", e.OL = "ol", e.MENTION = "at", e;
6491
- }({}), Xd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null, testId: i }) => {
6492
- var a, o, s, c, l;
6493
- let u = [
6491
+ }({}), Xd = ({ editor: e, disabled: t = !1, showMentionButton: n = !1, toolbarComponent: r = null }) => {
6492
+ var i, a, o, s, c;
6493
+ let l = [
6494
6494
  {
6495
6495
  icon: Yd.BOLD,
6496
6496
  onClick: () => e == null ? void 0 : e.chain().focus().toggleBold().run(),
6497
- active: (a = e == null ? void 0 : e.isActive("bold")) != null && a,
6498
- testId: "bold"
6497
+ active: (i = e == null ? void 0 : e.isActive("bold")) != null && i
6499
6498
  },
6500
6499
  {
6501
6500
  icon: Yd.ITALIC,
6502
6501
  onClick: () => e == null ? void 0 : e.chain().focus().toggleItalic().run(),
6503
- active: (o = e == null ? void 0 : e.isActive("italic")) != null && o,
6504
- testId: "italic"
6502
+ active: (a = e == null ? void 0 : e.isActive("italic")) != null && a
6505
6503
  },
6506
6504
  {
6507
6505
  icon: Yd.CODE,
6508
6506
  onClick: () => e == null ? void 0 : e.chain().focus().toggleCode().run(),
6509
- active: (s = e == null ? void 0 : e.isActive("code")) != null && s,
6510
- testId: "code"
6507
+ active: (o = e == null ? void 0 : e.isActive("code")) != null && o
6511
6508
  },
6512
6509
  {
6513
6510
  icon: Yd.UL,
6514
6511
  onClick: () => e == null ? void 0 : e.chain().focus().toggleBulletList().run(),
6515
- active: (c = e == null ? void 0 : e.isActive("bulletList")) != null && c,
6516
- testId: "bulletList"
6512
+ active: (s = e == null ? void 0 : e.isActive("bulletList")) != null && s
6517
6513
  },
6518
6514
  {
6519
6515
  icon: Yd.OL,
6520
6516
  onClick: () => e == null ? void 0 : e.chain().focus().toggleOrderedList().run(),
6521
- active: (l = e == null ? void 0 : e.isActive("orderedList")) != null && l,
6522
- testId: "orderedList"
6517
+ active: (c = e == null ? void 0 : e.isActive("orderedList")) != null && c
6523
6518
  }
6524
6519
  ];
6525
6520
  if (n) {
6526
- var d;
6527
- u.push({
6521
+ var u;
6522
+ l.push({
6528
6523
  icon: Yd.MENTION,
6529
6524
  onClick: () => e == null ? void 0 : e.chain().focus().insertContent("@").run(),
6530
- active: (d = e == null ? void 0 : e.isActive("mention")) != null && d,
6531
- testId: "mention"
6525
+ active: (u = e == null ? void 0 : e.isActive("mention")) != null && u
6532
6526
  });
6533
6527
  }
6534
6528
  return /* @__PURE__ */ C("div", {
6535
6529
  className: Jd.richTextToolbarContainer,
6536
- "data-testid": i,
6537
6530
  children: [/* @__PURE__ */ S("div", {
6538
6531
  className: Jd.richTextToolbar,
6539
- children: u.map((e, n) => /* @__PURE__ */ S(q, {
6532
+ children: l.map((e, n) => /* @__PURE__ */ S(q, {
6540
6533
  small: !0,
6541
6534
  round: !0,
6542
6535
  basic: !0,
@@ -6544,8 +6537,7 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6544
6537
  colored: Ti.MUTED,
6545
6538
  onClick: e.onClick,
6546
6539
  active: e.active,
6547
- disabled: t,
6548
- testId: i && `${i}-${e.testId}`
6540
+ disabled: t
6549
6541
  }, n))
6550
6542
  }), r]
6551
6543
  });
@@ -6695,68 +6687,63 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
6695
6687
  command: t,
6696
6688
  items: r,
6697
6689
  editable: n.view.dom
6698
- }), uf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a, testId: o }, s) => {
6699
- var c, l, f, m;
6700
- let g = u(W), y = r || g, b = !!a, x = _(a), w = _(null), T = _(n == null ? "" : n), [E, D] = v(null);
6690
+ }), uf = c(o(({ placeholder: e, onChange: t, value: n, disabled: r, toolbarComponent: i, mentions: a }, o) => {
6691
+ var s, c, l, f;
6692
+ let m = u(W), g = r || m, y = !!a, b = _(a), x = _(null), w = _(n == null ? "" : n), [T, E] = v(null);
6701
6693
  d(() => {
6702
- x.current = a;
6694
+ b.current = a;
6703
6695
  }, [a]);
6704
- let O = h(() => [
6696
+ let D = h(() => [
6705
6697
  ci,
6706
6698
  li.configure({ placeholder: e }),
6707
6699
  ui,
6708
- of(() => x.current, () => ({
6709
- onStart: (e) => D(lf(e)),
6710
- onUpdate: (e) => D(lf(e)),
6711
- onExit: () => D(null),
6700
+ of(() => b.current, () => ({
6701
+ onStart: (e) => E(lf(e)),
6702
+ onUpdate: (e) => E(lf(e)),
6703
+ onExit: () => E(null),
6712
6704
  onKeyDown: ({ event: e }) => {
6713
6705
  var t, n;
6714
- return (t = (n = w.current) == null ? void 0 : n.onKeyDown(e)) != null && t;
6706
+ return (t = (n = x.current) == null ? void 0 : n.onKeyDown(e)) != null && t;
6715
6707
  }
6716
6708
  }))
6717
- ], []), k = si({
6718
- extensions: O,
6719
- content: T.current,
6709
+ ], []), O = si({
6710
+ extensions: D,
6711
+ content: w.current,
6720
6712
  contentType: "markdown",
6721
- editable: !y,
6713
+ editable: !g,
6722
6714
  editorProps: { attributes: { class: sf.editable } },
6723
6715
  onUpdate: ({ editor: e }) => {
6724
6716
  t == null || t(e.getMarkdown(), { mentionedIds: rf(e) });
6725
6717
  }
6726
6718
  });
6727
6719
  return d(() => {
6728
- k && n !== void 0 && n !== k.getMarkdown() && k.commands.setContent(n, {
6720
+ O && n !== void 0 && n !== O.getMarkdown() && O.commands.setContent(n, {
6729
6721
  emitUpdate: !1,
6730
6722
  contentType: "markdown"
6731
6723
  });
6732
- }, [n, k]), d(() => {
6733
- k && k.setEditable(!y);
6734
- }, [y, k]), p(s, () => ({
6735
- clearContent: () => k == null ? void 0 : k.commands.clearContent(!1),
6736
- editor: k,
6737
- getMentionedIds: () => rf(k)
6738
- }), [k]), /* @__PURE__ */ C("div", {
6724
+ }, [n, O]), d(() => {
6725
+ O && O.setEditable(!g);
6726
+ }, [g, O]), p(o, () => ({
6727
+ clearContent: () => O == null ? void 0 : O.commands.clearContent(!1),
6728
+ editor: O,
6729
+ getMentionedIds: () => rf(O)
6730
+ }), [O]), /* @__PURE__ */ C("div", {
6739
6731
  className: sf.richTextInput,
6740
- "data-testid": o,
6741
6732
  children: [
6742
6733
  /* @__PURE__ */ S(Xd, {
6743
- editor: k,
6744
- disabled: y,
6745
- showMentionButton: b && ((c = a == null ? void 0 : a.showMentionButton) == null || c),
6746
- toolbarComponent: i,
6747
- testId: o && `${o}-toolbar`
6748
- }),
6749
- /* @__PURE__ */ S(oi, {
6750
- editor: k,
6751
- "data-testid": o && `${o}-editor`
6734
+ editor: O,
6735
+ disabled: g,
6736
+ showMentionButton: y && ((s = a == null ? void 0 : a.showMentionButton) == null || s),
6737
+ toolbarComponent: i
6752
6738
  }),
6753
- b && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(cf, {
6754
- ref: w,
6755
- editable: (l = E == null ? void 0 : E.editable) == null ? null : l,
6756
- getRect: (f = E == null ? void 0 : E.clientRect) == null ? null : f,
6757
- items: (m = E == null ? void 0 : E.items) == null ? [] : m,
6758
- onDismiss: () => D(null),
6759
- onSelect: (e) => E == null ? void 0 : E.command(e)
6739
+ /* @__PURE__ */ S(oi, { editor: O }),
6740
+ y && /* @__PURE__ */ S(Xi, { children: /* @__PURE__ */ S(cf, {
6741
+ ref: x,
6742
+ editable: (c = T == null ? void 0 : T.editable) == null ? null : c,
6743
+ getRect: (l = T == null ? void 0 : T.clientRect) == null ? null : l,
6744
+ items: (f = T == null ? void 0 : T.items) == null ? [] : f,
6745
+ onDismiss: () => E(null),
6746
+ onSelect: (e) => T == null ? void 0 : T.command(e)
6760
6747
  }) })
6761
6748
  ]
6762
6749
  });
@@ -8365,10 +8352,96 @@ var ko = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), Ao =
8365
8352
  compareMethod: Si.WORDS
8366
8353
  })
8367
8354
  }) });
8355
+ }, zp = { backgroundColor: "var(--color-background-error-muted)" }, Bp = { backgroundColor: "var(--color-background-success-muted)" }, Vp = { backgroundColor: "var(--color-background-warning-muted)" }, Hp = (e) => {
8356
+ var t;
8357
+ if (e.id != null) return String(e.id);
8358
+ let n = (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value;
8359
+ return n == null ? "" : String(n);
8360
+ }, Up = (e, t) => ({
8361
+ ...e,
8362
+ cells: e.cells.map((e) => ({
8363
+ ...e,
8364
+ style: {
8365
+ ...e.style,
8366
+ ...t
8367
+ }
8368
+ }))
8369
+ }), Wp = (e, t) => ({
8370
+ ...e,
8371
+ cells: e.cells.map((e, n) => {
8372
+ var r;
8373
+ let i = (r = t.cells) == null ? void 0 : r[n], a = i == null ? void 0 : i.value;
8374
+ return !i || dn(e.value, a) ? e : {
8375
+ ...e,
8376
+ style: {
8377
+ ...e.style,
8378
+ ...Vp
8379
+ },
8380
+ tooltip: a
8381
+ };
8382
+ })
8383
+ }), Gp = (e = [], t = []) => {
8384
+ let n = /* @__PURE__ */ new Map();
8385
+ for (let e of t) n.set(Hp(e), e);
8386
+ let r = new Set(e.map(Hp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
8387
+ for (let e = t.length - 1; e >= 0; e--) {
8388
+ let n = t[e], c = Hp(n);
8389
+ if (r.has(c)) {
8390
+ o = c;
8391
+ continue;
8392
+ }
8393
+ if (o === null) a.push(n);
8394
+ else {
8395
+ var s;
8396
+ let e = (s = i.get(o)) == null ? [] : s;
8397
+ e.unshift(n), i.set(o, e);
8398
+ }
8399
+ }
8400
+ a.reverse();
8401
+ let c = [];
8402
+ for (let t of e) {
8403
+ let e = Hp(t), r = i.get(e);
8404
+ if (r) for (let e of r) c.push({
8405
+ status: "deleted",
8406
+ row: e
8407
+ });
8408
+ let a = n.get(e);
8409
+ a ? c.push({
8410
+ status: "matched",
8411
+ row: t,
8412
+ compareRow: a
8413
+ }) : c.push({
8414
+ status: "added",
8415
+ row: t
8416
+ });
8417
+ }
8418
+ for (let e of a) c.push({
8419
+ status: "deleted",
8420
+ row: e
8421
+ });
8422
+ return c;
8423
+ }, Kp = (e) => e.status === "deleted" ? Up(e.row, zp) : e.status === "added" ? Up(e.row, Bp) : Wp(e.row, e.compareRow), qp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
8424
+ let i = h(() => Gp(e.rows, t), [e.rows, t]), a = h(() => i.map((e) => e.row), [i]), o = l(({ row: e, rowIndex: t }) => {
8425
+ let r = i[t], a = r ? Kp(r) : e;
8426
+ return n ? n({
8427
+ row: a,
8428
+ rowIndex: t
8429
+ }) : a;
8430
+ }, [i, n]);
8431
+ return /* @__PURE__ */ S($l, {
8432
+ ...r,
8433
+ beforeRenderRow: o,
8434
+ table: {
8435
+ ...e,
8436
+ rows: a,
8437
+ rowCount: i.length,
8438
+ striped: !1
8439
+ }
8440
+ });
8368
8441
  };
8369
8442
  //#endregion
8370
8443
  //#region src/helpers/date.ts
8371
- function zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
8444
+ function Jp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
8372
8445
  return e ? new Date(e).toLocaleString(a, {
8373
8446
  year: "numeric",
8374
8447
  month: "short",
@@ -8382,28 +8455,28 @@ function zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
8382
8455
  }
8383
8456
  //#endregion
8384
8457
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
8385
- function Bp(e) {
8458
+ function Yp(e) {
8386
8459
  var t;
8387
8460
  let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
8388
8461
  if (!n) throw Error("Invalid RegExp");
8389
8462
  return new RegExp((t = n[1]) == null ? "" : t, n[2]);
8390
8463
  }
8391
- function Vp(e) {
8464
+ function Xp(e) {
8392
8465
  if (typeof e != "object") return e;
8393
8466
  if (e === null) return null;
8394
- if (Array.isArray(e)) return e.map(Vp);
8467
+ if (Array.isArray(e)) return e.map(Xp);
8395
8468
  if (e instanceof Date) return new Date(e.getTime());
8396
- if (e instanceof RegExp) return Bp(e);
8469
+ if (e instanceof RegExp) return Yp(e);
8397
8470
  let t = {};
8398
- for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Vp(e[n]));
8471
+ for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Xp(e[n]));
8399
8472
  return t;
8400
8473
  }
8401
8474
  //#endregion
8402
8475
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
8403
- function Hp(e, t) {
8476
+ function Zp(e, t) {
8404
8477
  if (e.length === 0) throw Error(t || "Expected a non-empty array");
8405
8478
  }
8406
- var Up = (e) => e[e.length - 1], Wp = class {
8479
+ var Qp = (e) => e[e.length - 1], $p = class {
8407
8480
  setResult(e) {
8408
8481
  return this.result = e, this.hasResult = !0, this;
8409
8482
  }
@@ -8411,16 +8484,16 @@ var Up = (e) => e[e.length - 1], Wp = class {
8411
8484
  return this.exiting = !0, this;
8412
8485
  }
8413
8486
  push(e, t) {
8414
- return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Hp(this.children), Up(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
8487
+ return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Zp(this.children), Qp(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
8415
8488
  }
8416
- }, Gp = class extends Wp {
8489
+ }, em = class extends $p {
8417
8490
  constructor(e, t) {
8418
8491
  super(), this.left = e, this.right = t, this.pipe = "diff";
8419
8492
  }
8420
8493
  prepareDeltaResult(e) {
8421
8494
  var t, n, r, i;
8422
8495
  if (typeof e == "object" && ((t = this.options) != null && t.omitRemovedValues && Array.isArray(e) && e.length > 1 && (e.length === 2 || e[2] === 0 || e[2] === 3) && (e[0] = 0), (n = this.options) != null && n.cloneDiffValues)) {
8423
- let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Vp;
8496
+ let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Xp;
8424
8497
  typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
8425
8498
  }
8426
8499
  return e;
@@ -8428,15 +8501,15 @@ var Up = (e) => e[e.length - 1], Wp = class {
8428
8501
  setResult(e) {
8429
8502
  return this.prepareDeltaResult(e), super.setResult(e);
8430
8503
  }
8431
- }, Kp = class extends Wp {
8504
+ }, tm = class extends $p {
8432
8505
  constructor(e, t) {
8433
8506
  super(), this.left = e, this.delta = t, this.pipe = "patch";
8434
8507
  }
8435
- }, qp = class extends Wp {
8508
+ }, nm = class extends $p {
8436
8509
  constructor(e) {
8437
8510
  super(), this.delta = e, this.pipe = "reverse";
8438
8511
  }
8439
- }, Jp = class {
8512
+ }, rm = class {
8440
8513
  constructor(e) {
8441
8514
  this.name = e, this.filters = [];
8442
8515
  }
@@ -8500,7 +8573,7 @@ var Up = (e) => e[e.length - 1], Wp = class {
8500
8573
  }
8501
8574
  }), this);
8502
8575
  }
8503
- }, Yp = class {
8576
+ }, im = class {
8504
8577
  constructor(e) {
8505
8578
  this.selfOptions = e || {}, this.pipes = {};
8506
8579
  }
@@ -8527,7 +8600,7 @@ var Up = (e) => e[e.length - 1], Wp = class {
8527
8600
  for (; r;) n.nextAfterChildren !== void 0 && (n.next = n.nextAfterChildren, n.nextAfterChildren = null), typeof r == "string" && (r = this.pipe(r)), r.process(n), i = r, r = null, n && n.next && (n = n.next, r = n.pipe || i);
8528
8601
  return n.hasResult ? n.result : void 0;
8529
8602
  }
8530
- }, Xp = (e, t, n, r) => e[n] === t[r], Zp = (e, t, n, r) => {
8603
+ }, am = (e, t, n, r) => e[n] === t[r], om = (e, t, n, r) => {
8531
8604
  var i, a, o;
8532
8605
  let s = e.length, c = t.length, l, u, d = Array(s + 1);
8533
8606
  for (l = 0; l < s + 1; l++) {
@@ -8543,7 +8616,7 @@ var Up = (e) => e[e.length - 1], Wp = class {
8543
8616
  for (u = 1; u < c + 1; u++) n(e, t, l - 1, u - 1, r) ? s[u] = ((i = f[u - 1]) == null ? 0 : i) + 1 : s[u] = Math.max((a = f[u]) == null ? 0 : a, (o = s[u - 1]) == null ? 0 : o);
8544
8617
  }
8545
8618
  return d;
8546
- }, Qp = (e, t, n, r) => {
8619
+ }, sm = (e, t, n, r) => {
8547
8620
  let i = t.length, a = n.length, o = {
8548
8621
  sequence: [],
8549
8622
  indices1: [],
@@ -8565,11 +8638,11 @@ var Up = (e) => e[e.length - 1], Wp = class {
8565
8638
  }
8566
8639
  }
8567
8640
  return o;
8568
- }, $p = { get: (e, t, n, r) => {
8641
+ }, cm = { get: (e, t, n, r) => {
8569
8642
  let i = r || {};
8570
- return Qp(Zp(e, t, n || Xp, i), e, t, i);
8571
- } }, em = 3;
8572
- function tm(e, t, n, r) {
8643
+ return sm(om(e, t, n || am, i), e, t, i);
8644
+ } }, lm = 3;
8645
+ function um(e, t, n, r) {
8573
8646
  for (let i = 0; i < n; i++) {
8574
8647
  let n = e[i];
8575
8648
  for (let e = 0; e < r; e++) {
@@ -8579,7 +8652,7 @@ function tm(e, t, n, r) {
8579
8652
  }
8580
8653
  return !1;
8581
8654
  }
8582
- function nm(e, t, n, r, i) {
8655
+ function dm(e, t, n, r, i) {
8583
8656
  let a = e[n], o = t[r];
8584
8657
  if (a === o) return !0;
8585
8658
  if (typeof a != "object" || typeof o != "object") return !1;
@@ -8592,15 +8665,15 @@ function nm(e, t, n, r, i) {
8592
8665
  let l = i.hashCache2[r];
8593
8666
  return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
8594
8667
  }
8595
- var rm = function(e) {
8668
+ var fm = function(e) {
8596
8669
  var t, n, r, i, a;
8597
8670
  if (!e.leftIsArray) return;
8598
8671
  let o = {
8599
8672
  objectHash: (t = e.options) == null ? void 0 : t.objectHash,
8600
8673
  matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
8601
8674
  }, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
8602
- for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !tm(f, p, m, h)); s < m && s < h && nm(f, p, s, s, o);) l = s, g = new Gp(f[l], p[l]), e.push(g, l), s++;
8603
- for (; c + s < m && c + s < h && nm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Gp(f[u], p[d]), e.push(g, d), c++;
8675
+ for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !um(f, p, m, h)); s < m && s < h && dm(f, p, s, s, o);) l = s, g = new em(f[l], p[l]), e.push(g, l), s++;
8676
+ for (; c + s < m && c + s < h && dm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new em(f[u], p[d]), e.push(g, d), c++;
8604
8677
  let _;
8605
8678
  if (s + c === m) {
8606
8679
  if (m === h) {
@@ -8624,7 +8697,7 @@ var rm = function(e) {
8624
8697
  return;
8625
8698
  }
8626
8699
  o.hashCache1 = void 0, o.hashCache2 = void 0;
8627
- let v = f.slice(s, m - c), y = p.slice(s, h - c), b = $p.get(v, y, nm, o), x = [];
8700
+ let v = f.slice(s, m - c), y = p.slice(s, h - c), b = cm.get(v, y, dm, o), x = [];
8628
8701
  for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
8629
8702
  let t = `_${l}`;
8630
8703
  _[t] = [
@@ -8645,8 +8718,8 @@ var rm = function(e) {
8645
8718
  if (S && w > 0) for (let n = 0; n < w; n++) {
8646
8719
  u = x[n];
8647
8720
  let r = u === void 0 ? void 0 : _[`_${u}`];
8648
- if (u !== void 0 && r && nm(v, y, u - s, l - s, o)) {
8649
- r.splice(1, 2, l, em), r.splice(1, 2, l, em), C || (r[0] = ""), d = l, g = new Gp(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
8721
+ if (u !== void 0 && r && dm(v, y, u - s, l - s, o)) {
8722
+ r.splice(1, 2, l, lm), r.splice(1, 2, l, lm), C || (r[0] = ""), d = l, g = new em(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
8650
8723
  break;
8651
8724
  }
8652
8725
  }
@@ -8654,20 +8727,20 @@ var rm = function(e) {
8654
8727
  } else {
8655
8728
  if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
8656
8729
  if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
8657
- d = b.indices2[t] + s, g = new Gp(f[u], p[d]), e.push(g, d);
8730
+ d = b.indices2[t] + s, g = new em(f[u], p[d]), e.push(g, d);
8658
8731
  }
8659
8732
  }
8660
8733
  e.setResult(_).exit();
8661
8734
  };
8662
- rm.filterName = "arrays";
8663
- var im = {
8735
+ fm.filterName = "arrays";
8736
+ var pm = {
8664
8737
  numerically(e, t) {
8665
8738
  return e - t;
8666
8739
  },
8667
8740
  numericallyBy(e) {
8668
8741
  return (t, n) => t[e] - n[e];
8669
8742
  }
8670
- }, am = function(e) {
8743
+ }, mm = function(e) {
8671
8744
  var t;
8672
8745
  if (!e.nested) return;
8673
8746
  let n = e.delta;
@@ -8676,7 +8749,7 @@ var im = {
8676
8749
  for (r in a) if (r !== "_t") {
8677
8750
  if (r[0] === "_") {
8678
8751
  let e = r;
8679
- if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === em)) s.push(Number.parseInt(r.slice(1), 10));
8752
+ if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === lm)) s.push(Number.parseInt(r.slice(1), 10));
8680
8753
  else throw Error(`only removal or move can be applied at original array indices, invalid diff type: ${(t = a[e]) == null ? void 0 : t[2]}`);
8681
8754
  } else {
8682
8755
  let e = r;
@@ -8689,15 +8762,15 @@ var im = {
8689
8762
  });
8690
8763
  }
8691
8764
  }
8692
- for (s = s.sort(im.numerically), r = s.length - 1; r >= 0; r--) {
8765
+ for (s = s.sort(pm.numerically), r = s.length - 1; r >= 0; r--) {
8693
8766
  if (i = s[r], i === void 0) continue;
8694
8767
  let e = a[`_${i}`], t = o.splice(i, 1)[0];
8695
- (e == null ? void 0 : e[2]) === em && c.push({
8768
+ (e == null ? void 0 : e[2]) === lm && c.push({
8696
8769
  index: e[1],
8697
8770
  value: t
8698
8771
  });
8699
8772
  }
8700
- c = c.sort(im.numericallyBy("index"));
8773
+ c = c.sort(pm.numericallyBy("index"));
8701
8774
  let u = c.length;
8702
8775
  for (r = 0; r < u; r++) {
8703
8776
  let e = c[r];
@@ -8707,7 +8780,7 @@ var im = {
8707
8780
  if (d > 0) for (r = 0; r < d; r++) {
8708
8781
  let t = l[r];
8709
8782
  if (t === void 0) continue;
8710
- let n = new Kp(o[t.index], t.delta);
8783
+ let n = new tm(o[t.index], t.delta);
8711
8784
  e.push(n, t.index);
8712
8785
  }
8713
8786
  if (!e.children) {
@@ -8716,8 +8789,8 @@ var im = {
8716
8789
  }
8717
8790
  e.exit();
8718
8791
  };
8719
- am.filterName = "arrays";
8720
- var om = function(e) {
8792
+ mm.filterName = "arrays";
8793
+ var hm = function(e) {
8721
8794
  if (!e || !e.children || e.delta._t !== "a") return;
8722
8795
  let t = e.left, n = e.children.length;
8723
8796
  for (let r = 0; r < n; r++) {
@@ -8728,16 +8801,16 @@ var om = function(e) {
8728
8801
  }
8729
8802
  e.setResult(t).exit();
8730
8803
  };
8731
- om.filterName = "arraysCollectChildren";
8732
- var sm = function(e) {
8804
+ hm.filterName = "arraysCollectChildren";
8805
+ var gm = function(e) {
8733
8806
  if (!e.nested) {
8734
8807
  let t = e.delta;
8735
- if (t[2] === em) {
8808
+ if (t[2] === lm) {
8736
8809
  let n = t;
8737
8810
  e.newName = `_${n[1]}`, e.setResult([
8738
8811
  n[0],
8739
8812
  Number.parseInt(e.childName.substring(1), 10),
8740
- em
8813
+ lm
8741
8814
  ]).exit();
8742
8815
  }
8743
8816
  return;
@@ -8747,20 +8820,20 @@ var sm = function(e) {
8747
8820
  let n = t;
8748
8821
  for (let t in n) {
8749
8822
  if (t === "_t") continue;
8750
- let r = new qp(n[t]);
8823
+ let r = new nm(n[t]);
8751
8824
  e.push(r, t);
8752
8825
  }
8753
8826
  e.exit();
8754
8827
  };
8755
- sm.filterName = "arrays";
8756
- var cm = (e, t, n) => {
8828
+ gm.filterName = "arrays";
8829
+ var _m = (e, t, n) => {
8757
8830
  if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
8758
8831
  if (Array.isArray(n) && n[2] === 0) return `_${t}`;
8759
8832
  let r = +t;
8760
8833
  for (let n in e) {
8761
8834
  let i = e[n];
8762
8835
  if (Array.isArray(i)) {
8763
- if (i[2] === em) {
8836
+ if (i[2] === lm) {
8764
8837
  let e = Number.parseInt(n.substring(1), 10), a = i[1];
8765
8838
  if (a === +t) return e;
8766
8839
  e <= r && a > r ? r++ : e >= r && a < r && r--;
@@ -8768,7 +8841,7 @@ var cm = (e, t, n) => {
8768
8841
  }
8769
8842
  }
8770
8843
  return r;
8771
- }, lm = (e) => {
8844
+ }, vm = (e) => {
8772
8845
  if (!e || !e.children) return;
8773
8846
  let t = e.delta;
8774
8847
  if (t._t !== "a") return;
@@ -8779,22 +8852,22 @@ var cm = (e, t, n) => {
8779
8852
  let a = r.newName;
8780
8853
  if (a === void 0) {
8781
8854
  if (r.childName === void 0) throw Error("child.childName is undefined");
8782
- a = cm(n, r.childName, r.result);
8855
+ a = _m(n, r.childName, r.result);
8783
8856
  }
8784
8857
  i[a] !== r.result && (i[a] = r.result);
8785
8858
  }
8786
8859
  e.setResult(i).exit();
8787
8860
  };
8788
- lm.filterName = "arraysCollectChildren";
8861
+ vm.filterName = "arraysCollectChildren";
8789
8862
  //#endregion
8790
8863
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
8791
- var um = function(e) {
8864
+ var ym = function(e) {
8792
8865
  e.left instanceof Date ? (e.right instanceof Date && e.left.getTime() === e.right.getTime() ? e.setResult(void 0) : e.setResult([e.left, e.right]), e.exit()) : e.right instanceof Date && e.setResult([e.left, e.right]).exit();
8793
8866
  };
8794
- um.filterName = "dates";
8867
+ ym.filterName = "dates";
8795
8868
  //#endregion
8796
8869
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
8797
- var dm = /* @__PURE__ */ new Set(["__proto__"]), fm = (e) => {
8870
+ var bm = /* @__PURE__ */ new Set(["__proto__"]), xm = (e) => {
8798
8871
  if (!e || !e.children) return;
8799
8872
  let t = e.children.length, n = e.result;
8800
8873
  for (let r = 0; r < t; r++) {
@@ -8806,18 +8879,18 @@ var dm = /* @__PURE__ */ new Set(["__proto__"]), fm = (e) => {
8806
8879
  }
8807
8880
  n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
8808
8881
  };
8809
- fm.filterName = "collectChildren";
8810
- var pm = (e) => {
8882
+ xm.filterName = "collectChildren";
8883
+ var Sm = (e) => {
8811
8884
  var t;
8812
8885
  if (e.leftIsArray || e.leftType !== "object") return;
8813
8886
  let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
8814
8887
  for (let t in n) {
8815
8888
  if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
8816
- let a = new Gp(n[t], r[t]);
8889
+ let a = new em(n[t], r[t]);
8817
8890
  e.push(a, t);
8818
8891
  }
8819
8892
  for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
8820
- let n = new Gp(void 0, r[t]);
8893
+ let n = new em(void 0, r[t]);
8821
8894
  e.push(n, t);
8822
8895
  }
8823
8896
  if (!e.children || e.children.length === 0) {
@@ -8826,15 +8899,15 @@ var pm = (e) => {
8826
8899
  }
8827
8900
  e.exit();
8828
8901
  };
8829
- pm.filterName = "objects";
8830
- var mm = function(e) {
8902
+ Sm.filterName = "objects";
8903
+ var Cm = function(e) {
8831
8904
  if (!e.nested) return;
8832
8905
  let t = e.delta;
8833
8906
  if (t._t) return;
8834
8907
  let n = t, r = !1;
8835
8908
  for (let t in n) {
8836
- if (dm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
8837
- let i = e.left, a = new Kp(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
8909
+ if (bm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
8910
+ let i = e.left, a = new tm(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
8838
8911
  e.push(a, t), r = !0;
8839
8912
  }
8840
8913
  if (!r) {
@@ -8843,8 +8916,8 @@ var mm = function(e) {
8843
8916
  }
8844
8917
  e.exit();
8845
8918
  };
8846
- mm.filterName = "objects";
8847
- var hm = function(e) {
8919
+ Cm.filterName = "objects";
8920
+ var wm = function(e) {
8848
8921
  if (!e || !e.children || e.delta._t) return;
8849
8922
  if (e.left === null || typeof e.left != "object") {
8850
8923
  e.setResult(e.left).exit();
@@ -8855,17 +8928,17 @@ var hm = function(e) {
8855
8928
  let n = e.children[r];
8856
8929
  if (n === void 0) continue;
8857
8930
  let i = n.childName;
8858
- dm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
8931
+ bm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
8859
8932
  }
8860
8933
  e.setResult(t).exit();
8861
8934
  };
8862
- hm.filterName = "collectChildren";
8863
- var gm = function(e) {
8935
+ wm.filterName = "collectChildren";
8936
+ var Tm = function(e) {
8864
8937
  if (!e.nested || e.delta._t) return;
8865
8938
  let t = e.delta, n = !1;
8866
8939
  for (let r in t) {
8867
- if (dm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8868
- let i = new qp(t[r]);
8940
+ if (bm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8941
+ let i = new nm(t[r]);
8869
8942
  e.push(i, r), n = !0;
8870
8943
  }
8871
8944
  if (!n) {
@@ -8874,25 +8947,25 @@ var gm = function(e) {
8874
8947
  }
8875
8948
  e.exit();
8876
8949
  };
8877
- gm.filterName = "objects";
8878
- var _m = (e) => {
8950
+ Tm.filterName = "objects";
8951
+ var Em = (e) => {
8879
8952
  if (!e || !e.children || e.delta._t) return;
8880
8953
  let t = e.children.length, n = {};
8881
8954
  for (let r = 0; r < t; r++) {
8882
8955
  let t = e.children[r];
8883
8956
  if (t === void 0) continue;
8884
8957
  let i = t.childName;
8885
- dm.has(i) || n[i] !== t.result && (n[i] = t.result);
8958
+ bm.has(i) || n[i] !== t.result && (n[i] = t.result);
8886
8959
  }
8887
8960
  e.setResult(n).exit();
8888
8961
  };
8889
- _m.filterName = "collectChildren";
8962
+ Em.filterName = "collectChildren";
8890
8963
  //#endregion
8891
8964
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
8892
- var vm = 2, ym = 60, bm = null;
8893
- function xm(e, t) {
8965
+ var Dm = 2, Om = 60, km = null;
8966
+ function Am(e, t) {
8894
8967
  var n;
8895
- if (!bm) {
8968
+ if (!km) {
8896
8969
  let r;
8897
8970
  if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
8898
8971
  else {
@@ -8900,7 +8973,7 @@ function xm(e, t) {
8900
8973
  let e = /* @__PURE__ */ Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");
8901
8974
  throw e.diff_match_patch_not_found = !0, e;
8902
8975
  }
8903
- bm = {
8976
+ km = {
8904
8977
  diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
8905
8978
  patch: (e, t) => {
8906
8979
  let n = r.patch_apply(r.patch_fromText(t), e);
@@ -8912,17 +8985,17 @@ function xm(e, t) {
8912
8985
  }
8913
8986
  };
8914
8987
  }
8915
- return bm;
8988
+ return km;
8916
8989
  }
8917
- var Sm = function(e) {
8990
+ var jm = function(e) {
8918
8991
  var t, n;
8919
8992
  if (e.leftType !== "string") return;
8920
- let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || ym;
8993
+ let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Om;
8921
8994
  if (r.length < a || i.length < a) {
8922
8995
  e.setResult([r, i]).exit();
8923
8996
  return;
8924
8997
  }
8925
- let o = xm(e.options);
8998
+ let o = Am(e.options);
8926
8999
  if (!o) {
8927
9000
  e.setResult([r, i]).exit();
8928
9001
  return;
@@ -8931,19 +9004,19 @@ var Sm = function(e) {
8931
9004
  e.setResult([
8932
9005
  s(r, i),
8933
9006
  0,
8934
- vm
9007
+ Dm
8935
9008
  ]).exit();
8936
9009
  };
8937
- Sm.filterName = "texts";
8938
- var Cm = function(e) {
9010
+ jm.filterName = "texts";
9011
+ var Mm = function(e) {
8939
9012
  if (e.nested) return;
8940
9013
  let t = e.delta;
8941
- if (t[2] !== vm) return;
8942
- let n = t, r = xm(e.options, !0).patch;
9014
+ if (t[2] !== Dm) return;
9015
+ let n = t, r = Am(e.options, !0).patch;
8943
9016
  e.setResult(r(e.left, n[0])).exit();
8944
9017
  };
8945
- Cm.filterName = "texts";
8946
- var wm = (e) => {
9018
+ Mm.filterName = "texts";
9019
+ var Nm = (e) => {
8947
9020
  var t, n, r;
8948
9021
  let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
8949
9022
  for (let e = 0; e < a.length; e++) {
@@ -8964,21 +9037,21 @@ var wm = (e) => {
8964
9037
  } else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
8965
9038
  }
8966
9039
  return a.join("\n");
8967
- }, Tm = function(e) {
9040
+ }, Pm = function(e) {
8968
9041
  if (e.nested) return;
8969
9042
  let t = e.delta;
8970
- if (t[2] !== vm) return;
9043
+ if (t[2] !== Dm) return;
8971
9044
  let n = t;
8972
9045
  e.setResult([
8973
- wm(n[0]),
9046
+ Nm(n[0]),
8974
9047
  0,
8975
- vm
9048
+ Dm
8976
9049
  ]).exit();
8977
9050
  };
8978
- Tm.filterName = "texts";
9051
+ Pm.filterName = "texts";
8979
9052
  //#endregion
8980
9053
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
8981
- var Em = function(e) {
9054
+ var Fm = function(e) {
8982
9055
  if (e.left === e.right) {
8983
9056
  e.setResult(void 0).exit();
8984
9057
  return;
@@ -9011,8 +9084,8 @@ var Em = function(e) {
9011
9084
  }
9012
9085
  e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
9013
9086
  };
9014
- Em.filterName = "trivial";
9015
- var Dm = function(e) {
9087
+ Fm.filterName = "trivial";
9088
+ var Im = function(e) {
9016
9089
  if (e.delta === void 0) {
9017
9090
  e.setResult(e.left).exit();
9018
9091
  return;
@@ -9036,8 +9109,8 @@ var Dm = function(e) {
9036
9109
  }
9037
9110
  t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
9038
9111
  };
9039
- Dm.filterName = "trivial";
9040
- var Om = function(e) {
9112
+ Im.filterName = "trivial";
9113
+ var Lm = function(e) {
9041
9114
  if (e.delta === void 0) {
9042
9115
  e.setResult(e.delta).exit();
9043
9116
  return;
@@ -9058,36 +9131,36 @@ var Om = function(e) {
9058
9131
  }
9059
9132
  t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
9060
9133
  };
9061
- Om.filterName = "trivial";
9134
+ Lm.filterName = "trivial";
9062
9135
  //#endregion
9063
9136
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
9064
- var km = class {
9137
+ var Rm = class {
9065
9138
  constructor(e) {
9066
- this.processor = new Yp(e), this.processor.pipe(new Jp("diff").append(fm, Em, um, Sm, pm, rm).shouldHaveResult()), this.processor.pipe(new Jp("patch").append(hm, om, Dm, Cm, mm, am).shouldHaveResult()), this.processor.pipe(new Jp("reverse").append(_m, lm, Om, Tm, gm, sm).shouldHaveResult());
9139
+ this.processor = new im(e), this.processor.pipe(new rm("diff").append(xm, Fm, ym, jm, Sm, fm).shouldHaveResult()), this.processor.pipe(new rm("patch").append(wm, hm, Im, Mm, Cm, mm).shouldHaveResult()), this.processor.pipe(new rm("reverse").append(Em, vm, Lm, Pm, Tm, gm).shouldHaveResult());
9067
9140
  }
9068
9141
  options(e) {
9069
9142
  return this.processor.options(e);
9070
9143
  }
9071
9144
  diff(e, t) {
9072
- return this.processor.process(new Gp(e, t));
9145
+ return this.processor.process(new em(e, t));
9073
9146
  }
9074
9147
  patch(e, t) {
9075
- return this.processor.process(new Kp(e, t));
9148
+ return this.processor.process(new tm(e, t));
9076
9149
  }
9077
9150
  reverse(e) {
9078
- return this.processor.process(new qp(e));
9151
+ return this.processor.process(new nm(e));
9079
9152
  }
9080
9153
  unpatch(e, t) {
9081
9154
  return this.patch(e, this.reverse(t));
9082
9155
  }
9083
9156
  clone(e) {
9084
- return Vp(e);
9157
+ return Xp(e);
9085
9158
  }
9086
9159
  };
9087
9160
  //#endregion
9088
9161
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
9089
- function Am(e) {
9090
- return new km(e);
9162
+ function zm(e) {
9163
+ return new Rm(e);
9091
9164
  }
9092
9165
  //#endregion
9093
9166
  //#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
@@ -9649,46 +9722,46 @@ $.Diff = function(e, t) {
9649
9722
  };
9650
9723
  //#endregion
9651
9724
  //#region src/components/audit-log/create-diff-patcher.tsx
9652
- var jm = (e = {}) => Am({
9725
+ var Bm = (e = {}) => zm({
9653
9726
  ...e,
9654
9727
  textDiff: {
9655
9728
  diffMatchPatch: $,
9656
9729
  minLength: 120
9657
9730
  },
9658
9731
  cloneDiffValues: !0
9659
- }), Mm = ["user", "unittemplate"], Nm = jm(), Pm = (e, t, n) => {
9732
+ }), Vm = ["user", "unittemplate"], Hm = Bm(), Um = (e, t, n) => {
9660
9733
  let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
9661
9734
  for (let e = t.length - 1; e >= 0; e--) {
9662
9735
  let n = r[t[e]];
9663
9736
  if (n) return n;
9664
9737
  }
9665
9738
  return n || "";
9666
- }, Fm = (e) => {
9739
+ }, Wm = (e) => {
9667
9740
  let t = (e) => _r(e) ? kr(e) : String(e);
9668
9741
  return Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : e.map(t).join(", ") : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : t(e);
9669
- }, Im = (e) => {
9742
+ }, Gm = (e) => {
9670
9743
  switch (e.length) {
9671
9744
  case 1: {
9672
9745
  let [t] = e;
9673
9746
  return {
9674
9747
  type: "created",
9675
9748
  before: "",
9676
- after: Fm(t)
9749
+ after: Wm(t)
9677
9750
  };
9678
9751
  }
9679
9752
  case 2: {
9680
9753
  let [t, n] = e;
9681
9754
  return {
9682
9755
  type: "modified",
9683
- before: Fm(t),
9684
- after: Fm(n)
9756
+ before: Wm(t),
9757
+ after: Wm(n)
9685
9758
  };
9686
9759
  }
9687
9760
  case 3: {
9688
9761
  let [t] = e;
9689
9762
  return {
9690
9763
  type: "deleted",
9691
- before: Fm(t),
9764
+ before: Wm(t),
9692
9765
  after: ""
9693
9766
  };
9694
9767
  }
@@ -9698,15 +9771,15 @@ var jm = (e = {}) => Am({
9698
9771
  after: ""
9699
9772
  };
9700
9773
  }
9701
- }, Lm = (e) => Array.isArray(e), Rm = (e, t) => t ? Lm(t) ? t.length === 0 ? e : t.reduce((e, t) => Nm.unpatch(nn(e), nn(t)), nn(e)) : Nm.unpatch(nn(e), nn(t)) : e, zm = (e) => e.createdAt || e.date, Bm = (e, t, n) => {
9702
- let r = zm(e);
9774
+ }, Km = (e) => Array.isArray(e), qm = (e, t) => t ? Km(t) ? t.length === 0 ? e : t.reduce((e, t) => Hm.unpatch(nn(e), nn(t)), nn(e)) : Hm.unpatch(nn(e), nn(t)) : e, Jm = (e) => e.createdAt || e.date, Ym = (e, t, n) => {
9775
+ let r = Jm(e);
9703
9776
  if (!r) return {
9704
9777
  oldJson: "",
9705
9778
  newJson: "",
9706
9779
  error: `Cannot create comparison view: missing date for audit log ${e.id}`
9707
9780
  };
9708
9781
  let i = t.filter((e) => {
9709
- let t = zm(e);
9782
+ let t = Jm(e);
9710
9783
  return !!(e.diffs && t && t >= r);
9711
9784
  }), a = Array.from({ length: i.length + 1 });
9712
9785
  a[0] = nn(n);
@@ -9719,7 +9792,7 @@ var jm = (e = {}) => Am({
9719
9792
  a[e + 1] = a[e];
9720
9793
  continue;
9721
9794
  }
9722
- a[e + 1] = Rm(a[e], t);
9795
+ a[e + 1] = qm(a[e], t);
9723
9796
  }
9724
9797
  let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
9725
9798
  o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
@@ -9734,10 +9807,10 @@ var jm = (e = {}) => Am({
9734
9807
  oldJson: o,
9735
9808
  newJson: s
9736
9809
  };
9737
- }, Vm = (e, t, n = {}, r = []) => {
9810
+ }, Xm = (e, t, n = {}, r = []) => {
9738
9811
  var i;
9739
9812
  if (!e) return;
9740
- let a = [...Mm, ...(i = n.hiddenKeys) == null ? [] : i];
9813
+ let a = [...Vm, ...(i = n.hiddenKeys) == null ? [] : i];
9741
9814
  Object.keys(e).forEach((i) => {
9742
9815
  var o;
9743
9816
  let s = e[i];
@@ -9750,12 +9823,12 @@ var jm = (e = {}) => Am({
9750
9823
  cn(s) ? t.push({
9751
9824
  deltaFormat: [...s],
9752
9825
  path: c
9753
- }) : gn(s) && Vm(s, t, n, c);
9826
+ }) : gn(s) && Xm(s, t, n, c);
9754
9827
  });
9755
- }, Hm = (e, t = {}) => {
9828
+ }, Zm = (e, t = {}) => {
9756
9829
  let n = [];
9757
- return e ? (Vm(e, n, t), n) : [];
9758
- }, Um = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Wm = (e) => {
9830
+ return e ? (Xm(e, n, t), n) : [];
9831
+ }, Qm = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), $m = (e) => {
9759
9832
  if (e == null || e === "") return "empty";
9760
9833
  if (typeof e == "boolean") return e ? "true" : "false";
9761
9834
  if (typeof e == "string") return e;
@@ -9766,27 +9839,27 @@ var jm = (e = {}) => Am({
9766
9839
  } catch {
9767
9840
  return String(e);
9768
9841
  }
9769
- }, Gm = (e, t = e.length - 1) => {
9842
+ }, eh = (e, t = e.length - 1) => {
9770
9843
  if (t >= e.length) return "Value";
9771
9844
  let n = e[t];
9772
- return !n || mr(n) ? Gm(e, t - 1) : Um(n);
9773
- }, Km = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
9774
- let o = Wm(r), s = Wm(i), c = a ? ` in ${a}` : "";
9845
+ return !n || mr(n) ? eh(e, t - 1) : Qm(n);
9846
+ }, th = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
9847
+ let o = $m(r), s = $m(i), c = a ? ` in ${a}` : "";
9775
9848
  switch (t) {
9776
9849
  case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
9777
9850
  case "created": return `${e} created ${s}${c}.`;
9778
9851
  case "deleted": return `${e} deleted ${o}${c}.`;
9779
9852
  default: return `${e} changed ${n}${c}.`;
9780
9853
  }
9781
- }, qm = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
9854
+ }, nh = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
9782
9855
  let i = {
9783
9856
  headers: [{ cells: [{ value: "Changes" }] }],
9784
9857
  rows: n.map((n) => {
9785
- let { deltaFormat: i, path: a } = n, o = Pm(e, a, r), { type: s, before: c, after: l } = Im(i);
9786
- return { cells: [{ value: Km({
9858
+ let { deltaFormat: i, path: a } = n, o = Um(e, a, r), { type: s, before: c, after: l } = Gm(i);
9859
+ return { cells: [{ value: th({
9787
9860
  userName: t,
9788
9861
  type: s,
9789
- property: Gm(a),
9862
+ property: eh(a),
9790
9863
  before: c,
9791
9864
  after: l,
9792
9865
  sectionName: o
@@ -9794,7 +9867,7 @@ var jm = (e = {}) => Am({
9794
9867
  })
9795
9868
  };
9796
9869
  return /* @__PURE__ */ S($l, { table: i });
9797
- }, Jm = Object.freeze({
9870
+ }, rh = Object.freeze({
9798
9871
  summary: {
9799
9872
  label: "Summary",
9800
9873
  value: "summary"
@@ -9803,13 +9876,13 @@ var jm = (e = {}) => Am({
9803
9876
  label: "Compare",
9804
9877
  value: "compare"
9805
9878
  }
9806
- }), Ym = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
9807
- let c = [Jm.summary, Jm.compare].map(({ label: e, value: t }) => ({
9879
+ }), ih = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
9880
+ let c = [rh.summary, rh.compare].map(({ label: e, value: t }) => ({
9808
9881
  label: e,
9809
9882
  value: t
9810
9883
  })), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
9811
9884
  if (!d) return null;
9812
- let { oldJson: f, newJson: p, error: m } = Bm(e, t, n);
9885
+ let { oldJson: f, newJson: p, error: m } = Ym(e, t, n);
9813
9886
  return /* @__PURE__ */ S(Ts, {
9814
9887
  visible: r,
9815
9888
  centered: !0,
@@ -9822,10 +9895,10 @@ var jm = (e = {}) => Am({
9822
9895
  onChange: (e) => u(c.find((t) => t.value === e.target.value)),
9823
9896
  options: c,
9824
9897
  value: l
9825
- }), l.value === "summary" ? /* @__PURE__ */ S(qm, {
9898
+ }), l.value === "summary" ? /* @__PURE__ */ S(nh, {
9826
9899
  userName: e.userName,
9827
9900
  sectionNames: a,
9828
- diffs: Hm(d, i),
9901
+ diffs: Zm(d, i),
9829
9902
  defaultSectionName: o
9830
9903
  }) : m ? /* @__PURE__ */ S("div", {
9831
9904
  style: { padding: 16 },
@@ -9843,7 +9916,7 @@ var jm = (e = {}) => Am({
9843
9916
  height: "90vh"
9844
9917
  } })
9845
9918
  });
9846
- }, Xm = [
9919
+ }, ah = [
9847
9920
  {
9848
9921
  label: "10 / page",
9849
9922
  value: 10
@@ -9856,8 +9929,8 @@ var jm = (e = {}) => Am({
9856
9929
  label: "50 / page",
9857
9930
  value: 50
9858
9931
  }
9859
- ], Zm = (e, t = {}) => {
9860
- let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Hm(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
9932
+ ], oh = (e, t = {}) => {
9933
+ let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Zm(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
9861
9934
  if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
9862
9935
  switch (a) {
9863
9936
  case "Created": return `Created by ${r}`;
@@ -9867,7 +9940,7 @@ var jm = (e = {}) => Am({
9867
9940
  case "Updated": return `Updated by ${r} (${c})`;
9868
9941
  default: return `Change by ${r}`;
9869
9942
  }
9870
- }, Qm = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: h }) => {
9943
+ }, sh = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: m, isLogDisabled: h }) => {
9871
9944
  let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
9872
9945
  if (e.snapshot) {
9873
9946
  f == null || f(e.snapshot, e);
@@ -9886,7 +9959,7 @@ var jm = (e = {}) => Am({
9886
9959
  return {
9887
9960
  cells: [
9888
9961
  {
9889
- value: e.snapshot ? `Snapshot: ${e.snapshot}` : Zm(e, l),
9962
+ value: e.snapshot ? `Snapshot: ${e.snapshot}` : oh(e, l),
9890
9963
  type: "Link",
9891
9964
  disabled: n,
9892
9965
  onClick: n ? void 0 : () => w(e),
@@ -9905,8 +9978,8 @@ var jm = (e = {}) => Am({
9905
9978
  type: "Static"
9906
9979
  },
9907
9980
  {
9908
- value: zp({
9909
- date: zm(e),
9981
+ value: Jp({
9982
+ date: Jm(e),
9910
9983
  showTime: !0
9911
9984
  }),
9912
9985
  type: "Static"
@@ -9949,14 +10022,14 @@ var jm = (e = {}) => Am({
9949
10022
  onChange: (e) => {
9950
10023
  u(Number(e.target.value));
9951
10024
  },
9952
- options: Xm,
10025
+ options: ah,
9953
10026
  value: a
9954
10027
  },
9955
10028
  onSelectPage: (e) => d(e),
9956
10029
  small: !0
9957
10030
  } }
9958
10031
  } })
9959
- }), g && y && y.diffs && /* @__PURE__ */ S(Ym, {
10032
+ }), g && y && y.diffs && /* @__PURE__ */ S(ih, {
9960
10033
  sectionNames: o,
9961
10034
  isOpen: g,
9962
10035
  onClose: () => _(!1),
@@ -9966,7 +10039,7 @@ var jm = (e = {}) => Am({
9966
10039
  data: t,
9967
10040
  transformDiffsConfig: l
9968
10041
  })] });
9969
- }, $m = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
10042
+ }, ch = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
9970
10043
  let i = window.location.href, a = _(i);
9971
10044
  return d(() => {
9972
10045
  a.current = i;
@@ -9989,20 +10062,20 @@ var jm = (e = {}) => Am({
9989
10062
  });
9990
10063
  };
9991
10064
  }, [e, t]), null;
9992
- }, eh = {
10065
+ }, lh = {
9993
10066
  errorBoundary: "_errorBoundary_hmco0_1",
9994
10067
  sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
9995
10068
  rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
9996
- }, th = ({ options: e }) => {
10069
+ }, uh = ({ options: e }) => {
9997
10070
  let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Dp();
9998
10071
  if (t) return /* @__PURE__ */ S(t, {});
9999
10072
  if (n || r) return /* @__PURE__ */ S("div", {
10000
- className: b(n ? eh.sidebarErrorBoundary : "", r ? eh.rightSidebarErrorBoundary : ""),
10073
+ className: b(n ? lh.sidebarErrorBoundary : "", r ? lh.rightSidebarErrorBoundary : ""),
10001
10074
  style: a,
10002
10075
  children: o == null ? void 0 : o.unexpectedError
10003
10076
  });
10004
10077
  let s = /* @__PURE__ */ S("div", {
10005
- className: eh.errorBoundary,
10078
+ className: lh.errorBoundary,
10006
10079
  style: a,
10007
10080
  children: /* @__PURE__ */ S(Gs, { message: {
10008
10081
  icon: !0,
@@ -10017,19 +10090,19 @@ var jm = (e = {}) => Am({
10017
10090
  padding: 0,
10018
10091
  children: s
10019
10092
  }) : s;
10020
- }, nh = ({ children: e, options: t }) => /* @__PURE__ */ S(Ci.ErrorBoundary, {
10021
- fallback: /* @__PURE__ */ S(th, { options: t }),
10093
+ }, dh = ({ children: e, options: t }) => /* @__PURE__ */ S(Ci.ErrorBoundary, {
10094
+ fallback: /* @__PURE__ */ S(uh, { options: t }),
10022
10095
  onError: (e, t) => {
10023
10096
  console.error("Error caught by boundary:", e, t);
10024
10097
  },
10025
10098
  children: e
10026
- }), rh = (e, t = {}) => (n) => /* @__PURE__ */ S(nh, {
10099
+ }), fh = (e, t = {}) => (n) => /* @__PURE__ */ S(dh, {
10027
10100
  options: t,
10028
10101
  children: /* @__PURE__ */ S(e, { ...n })
10029
- }), ih = (e = {}) => (t) => rh(t, e), ah = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, oh = (e) => {
10102
+ }), ph = (e = {}) => (t) => fh(t, e), mh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, hh = (e) => {
10030
10103
  Op(Cp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
10031
- e === Cp.Translations ? Op(e, Tp(t)) : Op(e, ah(t) ? t : { ...t });
10104
+ e === Cp.Translations ? Op(e, Tp(t)) : Op(e, mh(t) ? t : { ...t });
10032
10105
  });
10033
10106
  };
10034
10107
  //#endregion
10035
- export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align, Qm as AuditLog, no as Badge, go as Breadcrumb, mo as BreadcrumbLinkType, q as Button, vo as ButtonGroup, Di as ButtonPosition, ba as ButtonType, bo as Card, fa as CheckBox, Hi as Chevron, Gi as Collapse, Ti as Color, Vo as ColorInput, Bo as ColorInputPopover, Ko as Column, rs as Dialog, Rp as DiffViewer, W as DisabledContext, Zo as Divider, us as Drawer, ep as ElementType, uu as Empty, nh as ErrorBoundary, gd as Field, fd as FileButton, bs as FileInput, _d as Flex, yd as FormRow, Eo as Grid, H as GroupOrder, es as Heading, da as HelpIcon, G as Icon, U as IconType, hs as Input, ps as InputGroup, sl as InputGroupAddon, _s as InputReaderMethods, Ai as InputType, md as Label, Md as List, xd as ListHeading, Dd as ListSubheading, Pd as Loader, df as Mention, lo as Menu, Ka as MenuCarat, Ga as MenuType, Gs as Message, zs as MessageType, Ts as Modal, Zs as NativeSelect, bl as NumberInput, Vd as OptionDropdown, Ud as Page, cl as Pagination, op as PopConfirm, So as Popover, Wd as Portal, Kd as PrintHeader, Os as ProgressBar, qd as RadioButton, uf as RichTextInput, pf as Row, tl as Select, Pp as SettingField, vf as SideBar, bf as Skeleton, Al as Slider, Ns as SmartUploadModal, xs as Spacer, ya as Spinner, $l as Table, dd as TableImportExport, qf as Tabs, Yo as Text, Xf as TextArea, Jf as TextLink, Oi as TextTransform, ki as Theme, ni as Toaster, Yu as Toggle, K as Tooltip, rp as TopBar, up as Tree, Sp as TreeTable, wi as TriggerType, Bf as UnitInput, Wf as UnitSlider, Mp as UnitTable, $m as UsageTracker, Ku as dismissToast, Lf as initializeContext, oh as initializeGuiLibrary, vs as readFile, Gu as toast, Qs as useFocus, Ss as useKeyboardEvent, tc as useWindowWidth, ih as withChainableErrorBoundary, rh as withErrorBoundary };
10108
+ export { Ji as Accordion, ga as AccordionWithDefaultToggle, fo as Actions, Ei as Align, sh as AuditLog, no as Badge, go as Breadcrumb, mo as BreadcrumbLinkType, q as Button, vo as ButtonGroup, Di as ButtonPosition, ba as ButtonType, bo as Card, fa as CheckBox, Hi as Chevron, Gi as Collapse, Ti as Color, Vo as ColorInput, Bo as ColorInputPopover, Ko as Column, rs as Dialog, qp as DiffTable, Rp as DiffViewer, W as DisabledContext, Zo as Divider, us as Drawer, ep as ElementType, uu as Empty, dh as ErrorBoundary, gd as Field, fd as FileButton, bs as FileInput, _d as Flex, yd as FormRow, Eo as Grid, H as GroupOrder, es as Heading, da as HelpIcon, G as Icon, U as IconType, hs as Input, ps as InputGroup, sl as InputGroupAddon, _s as InputReaderMethods, Ai as InputType, md as Label, Md as List, xd as ListHeading, Dd as ListSubheading, Pd as Loader, df as Mention, lo as Menu, Ka as MenuCarat, Ga as MenuType, Gs as Message, zs as MessageType, Ts as Modal, Zs as NativeSelect, bl as NumberInput, Vd as OptionDropdown, Ud as Page, cl as Pagination, op as PopConfirm, So as Popover, Wd as Portal, Kd as PrintHeader, Os as ProgressBar, qd as RadioButton, uf as RichTextInput, pf as Row, tl as Select, Pp as SettingField, vf as SideBar, bf as Skeleton, Al as Slider, Ns as SmartUploadModal, xs as Spacer, ya as Spinner, $l as Table, dd as TableImportExport, qf as Tabs, Yo as Text, Xf as TextArea, Jf as TextLink, Oi as TextTransform, ki as Theme, ni as Toaster, Yu as Toggle, K as Tooltip, rp as TopBar, up as Tree, Sp as TreeTable, wi as TriggerType, Bf as UnitInput, Wf as UnitSlider, Mp as UnitTable, ch as UsageTracker, Ku as dismissToast, Lf as initializeContext, hh as initializeGuiLibrary, vs as readFile, Gu as toast, Qs as useFocus, Ss as useKeyboardEvent, tc as useWindowWidth, ph as withChainableErrorBoundary, fh as withErrorBoundary };