@oliasoft-open-source/react-ui-library 9.6.0-beta-1 → 9.6.0-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/global.css +1 -1
- package/dist/index.js +206 -221
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -870,40 +870,32 @@ var Ca = {
|
|
|
870
870
|
let { sections: t } = e;
|
|
871
871
|
return !s(t) && (!Array.isArray(t) || t.every((e) => un(e)));
|
|
872
872
|
}, J = {
|
|
873
|
-
layer: "
|
|
874
|
-
nested: "
|
|
875
|
-
fileInput: "
|
|
876
|
-
trigger: "
|
|
877
|
-
heading: "
|
|
878
|
-
headingIcon: "
|
|
879
|
-
clickable: "
|
|
880
|
-
option: "
|
|
881
|
-
active: "
|
|
882
|
-
disabled: "
|
|
883
|
-
selected: "
|
|
884
|
-
optionContent: "
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
arrow: "
|
|
891
|
-
divider: "
|
|
892
|
-
buttonLabel: "
|
|
893
|
-
component: "
|
|
894
|
-
right: "
|
|
895
|
-
actions: "
|
|
896
|
-
menuPopover: "
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
overlayEnterRight: "_overlayEnterRight_1wspp_1",
|
|
900
|
-
overlayEnterLeft: "_overlayEnterLeft_1wspp_1",
|
|
901
|
-
overlayExitTop: "_overlayExitTop_1wspp_1",
|
|
902
|
-
overlayExitBottom: "_overlayExitBottom_1wspp_1",
|
|
903
|
-
overlayExitRight: "_overlayExitRight_1wspp_1",
|
|
904
|
-
overlayExitLeft: "_overlayExitLeft_1wspp_1",
|
|
905
|
-
menuPopoverNested: "_menuPopoverNested_1wspp_271",
|
|
906
|
-
menuItem: "_menuItem_1wspp_274"
|
|
873
|
+
layer: "_layer_15mfd_1",
|
|
874
|
+
nested: "_nested_15mfd_14",
|
|
875
|
+
fileInput: "_fileInput_15mfd_17",
|
|
876
|
+
trigger: "_trigger_15mfd_23",
|
|
877
|
+
heading: "_heading_15mfd_32",
|
|
878
|
+
headingIcon: "_headingIcon_15mfd_38",
|
|
879
|
+
clickable: "_clickable_15mfd_45",
|
|
880
|
+
option: "_option_15mfd_49",
|
|
881
|
+
active: "_active_15mfd_68",
|
|
882
|
+
disabled: "_disabled_15mfd_73",
|
|
883
|
+
selected: "_selected_15mfd_76",
|
|
884
|
+
optionContent: "_optionContent_15mfd_83",
|
|
885
|
+
description: "_description_15mfd_87",
|
|
886
|
+
inline: "_inline_15mfd_91",
|
|
887
|
+
icon: "_icon_15mfd_96",
|
|
888
|
+
check: "_check_15mfd_97",
|
|
889
|
+
label: "_label_15mfd_123",
|
|
890
|
+
arrow: "_arrow_15mfd_139",
|
|
891
|
+
divider: "_divider_15mfd_143",
|
|
892
|
+
buttonLabel: "_buttonLabel_15mfd_151",
|
|
893
|
+
component: "_component_15mfd_158",
|
|
894
|
+
right: "_right_15mfd_164",
|
|
895
|
+
actions: "_actions_15mfd_169",
|
|
896
|
+
menuPopover: "_menuPopover_15mfd_176",
|
|
897
|
+
menuPopoverNested: "_menuPopoverNested_15mfd_198",
|
|
898
|
+
menuItem: "_menuItem_15mfd_201"
|
|
907
899
|
}, Ha = ({ label: e, onClick: t, icon: n, testId: r }) => /* @__PURE__ */ C("div", {
|
|
908
900
|
"data-testid": r,
|
|
909
901
|
children: [e, !!n && /* @__PURE__ */ S("span", {
|
|
@@ -1498,18 +1490,10 @@ var Ca = {
|
|
|
1498
1490
|
children: n
|
|
1499
1491
|
})]
|
|
1500
1492
|
}), So = {
|
|
1501
|
-
toggleBox: "
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
overlayEnterLeft: "_overlayEnterLeft_1i03y_1",
|
|
1506
|
-
overlayExitTop: "_overlayExitTop_1i03y_1",
|
|
1507
|
-
overlayExitBottom: "_overlayExitBottom_1i03y_1",
|
|
1508
|
-
overlayExitRight: "_overlayExitRight_1i03y_1",
|
|
1509
|
-
overlayExitLeft: "_overlayExitLeft_1i03y_1",
|
|
1510
|
-
arrowIcon: "_arrowIcon_1i03y_105",
|
|
1511
|
-
fullWidthStyleFix: "_fullWidthStyleFix_1i03y_133",
|
|
1512
|
-
dismiss: "_dismiss_1i03y_138"
|
|
1493
|
+
toggleBox: "_toggleBox_oy22o_1",
|
|
1494
|
+
arrowIcon: "_arrowIcon_oy22o_32",
|
|
1495
|
+
fullWidthStyleFix: "_fullWidthStyleFix_oy22o_48",
|
|
1496
|
+
dismiss: "_dismiss_oy22o_53"
|
|
1513
1497
|
}, Co = ({ children: e, content: t, placement: i = "top-center", closeOnOutsideClick: a = !0, fullWidth: o = !1, showCloseButton: c = !1, showArrow: f = !0, testId: p, disabled: m = !1, isOpen: h, onToggle: g, toggleOnTriggerClick: y = !0, isNonModal: w = !1, restoreTriggerFocusOnClose: T = !0 }) => {
|
|
1514
1498
|
let E = u(W), D = _(null), [O, k] = v(!1), A = m || E, j = h !== void 0, M = j ? h : O, N = l((e) => {
|
|
1515
1499
|
A || (j ? g == null || g(e) : k(e));
|
|
@@ -8423,12 +8407,12 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8423
8407
|
compareMethod: Ci.WORDS
|
|
8424
8408
|
})
|
|
8425
8409
|
}) });
|
|
8426
|
-
}, Hp = { backgroundColor: "var(--color-background-error-muted)" }, Up = { backgroundColor: "var(--color-background-success-muted)" }, Wp = { backgroundColor: "var(--color-background-warning-muted)" }, Gp = (e) => {
|
|
8410
|
+
}, Hp = { backgroundColor: "var(--color-background-error-muted)" }, Up = { backgroundColor: "var(--color-background-success-muted)" }, Wp = { backgroundColor: "var(--color-background-warning-muted)" }, Gp = (e) => typeof e == "object" && e && "value" in e ? e.value : e, Kp = (e) => {
|
|
8427
8411
|
var t;
|
|
8428
8412
|
if (e.id != null) return String(e.id);
|
|
8429
|
-
let n = (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value;
|
|
8413
|
+
let n = Gp((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
8430
8414
|
return n == null ? "" : String(n);
|
|
8431
|
-
},
|
|
8415
|
+
}, qp = (e, t) => ({
|
|
8432
8416
|
...e,
|
|
8433
8417
|
cells: e.cells.map((e) => ({
|
|
8434
8418
|
...e,
|
|
@@ -8437,7 +8421,7 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8437
8421
|
...t
|
|
8438
8422
|
}
|
|
8439
8423
|
}))
|
|
8440
|
-
}),
|
|
8424
|
+
}), Jp = (e, t) => ({
|
|
8441
8425
|
...e,
|
|
8442
8426
|
cells: e.cells.map((e, n) => {
|
|
8443
8427
|
var r;
|
|
@@ -8451,12 +8435,12 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8451
8435
|
tooltip: a
|
|
8452
8436
|
};
|
|
8453
8437
|
})
|
|
8454
|
-
}),
|
|
8438
|
+
}), Yp = (e = [], t = []) => {
|
|
8455
8439
|
let n = /* @__PURE__ */ new Map();
|
|
8456
|
-
for (let e of t) n.set(
|
|
8457
|
-
let r = new Set(e.map(
|
|
8440
|
+
for (let e of t) n.set(Kp(e), e);
|
|
8441
|
+
let r = new Set(e.map(Kp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8458
8442
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8459
|
-
let n = t[e], c =
|
|
8443
|
+
let n = t[e], c = Kp(n);
|
|
8460
8444
|
if (r.has(c)) {
|
|
8461
8445
|
o = c;
|
|
8462
8446
|
continue;
|
|
@@ -8471,7 +8455,7 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8471
8455
|
a.reverse();
|
|
8472
8456
|
let c = [];
|
|
8473
8457
|
for (let t of e) {
|
|
8474
|
-
let e =
|
|
8458
|
+
let e = Kp(t), r = i.get(e);
|
|
8475
8459
|
if (r) for (let e of r) c.push({
|
|
8476
8460
|
status: "deleted",
|
|
8477
8461
|
row: e
|
|
@@ -8491,9 +8475,11 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8491
8475
|
row: e
|
|
8492
8476
|
});
|
|
8493
8477
|
return c;
|
|
8494
|
-
},
|
|
8495
|
-
let i = h(() =>
|
|
8496
|
-
|
|
8478
|
+
}, Xp = (e) => e.status === "deleted" ? qp(e.row, Hp) : e.status === "added" ? qp(e.row, Up) : Jp(e.row, e.compareRow), Zp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8479
|
+
let i = h(() => Yp(e.rows, t), [e.rows, t]), a = !!e.infiniteScroll, o = h(() => {
|
|
8480
|
+
if (!a) return i.map((e) => e.row);
|
|
8481
|
+
}, [a, i]), s = l(({ row: e, rowIndex: t }) => {
|
|
8482
|
+
let r = i[t], a = r ? Xp(r) : e;
|
|
8497
8483
|
return n ? n({
|
|
8498
8484
|
row: a,
|
|
8499
8485
|
rowIndex: t
|
|
@@ -8501,19 +8487,18 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8501
8487
|
}, [i, n]);
|
|
8502
8488
|
return /* @__PURE__ */ S(nu, {
|
|
8503
8489
|
...r,
|
|
8504
|
-
beforeRenderRow:
|
|
8490
|
+
beforeRenderRow: s,
|
|
8505
8491
|
table: {
|
|
8506
8492
|
...e,
|
|
8507
|
-
rows:
|
|
8508
|
-
rowCount: i.length,
|
|
8509
|
-
striped: !1
|
|
8510
|
-
infiniteScroll: !0
|
|
8493
|
+
rows: o,
|
|
8494
|
+
rowCount: a ? i.length : void 0,
|
|
8495
|
+
striped: !1
|
|
8511
8496
|
}
|
|
8512
8497
|
});
|
|
8513
8498
|
};
|
|
8514
8499
|
//#endregion
|
|
8515
8500
|
//#region src/helpers/date.ts
|
|
8516
|
-
function
|
|
8501
|
+
function Qp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8517
8502
|
return e ? new Date(e).toLocaleString(a, {
|
|
8518
8503
|
year: "numeric",
|
|
8519
8504
|
month: "short",
|
|
@@ -8527,28 +8512,28 @@ function Zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8527
8512
|
}
|
|
8528
8513
|
//#endregion
|
|
8529
8514
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8530
|
-
function
|
|
8515
|
+
function $p(e) {
|
|
8531
8516
|
var t;
|
|
8532
8517
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8533
8518
|
if (!n) throw Error("Invalid RegExp");
|
|
8534
8519
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8535
8520
|
}
|
|
8536
|
-
function
|
|
8521
|
+
function em(e) {
|
|
8537
8522
|
if (typeof e != "object") return e;
|
|
8538
8523
|
if (e === null) return null;
|
|
8539
|
-
if (Array.isArray(e)) return e.map(
|
|
8524
|
+
if (Array.isArray(e)) return e.map(em);
|
|
8540
8525
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8541
|
-
if (e instanceof RegExp) return
|
|
8526
|
+
if (e instanceof RegExp) return $p(e);
|
|
8542
8527
|
let t = {};
|
|
8543
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8528
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = em(e[n]));
|
|
8544
8529
|
return t;
|
|
8545
8530
|
}
|
|
8546
8531
|
//#endregion
|
|
8547
8532
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8548
|
-
function
|
|
8533
|
+
function tm(e, t) {
|
|
8549
8534
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8550
8535
|
}
|
|
8551
|
-
var
|
|
8536
|
+
var nm = (e) => e[e.length - 1], rm = class {
|
|
8552
8537
|
setResult(e) {
|
|
8553
8538
|
return this.result = e, this.hasResult = !0, this;
|
|
8554
8539
|
}
|
|
@@ -8556,16 +8541,16 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8556
8541
|
return this.exiting = !0, this;
|
|
8557
8542
|
}
|
|
8558
8543
|
push(e, t) {
|
|
8559
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8544
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (tm(this.children), nm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8560
8545
|
}
|
|
8561
|
-
},
|
|
8546
|
+
}, im = class extends rm {
|
|
8562
8547
|
constructor(e, t) {
|
|
8563
8548
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8564
8549
|
}
|
|
8565
8550
|
prepareDeltaResult(e) {
|
|
8566
8551
|
var t, n, r, i;
|
|
8567
8552
|
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)) {
|
|
8568
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8553
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : em;
|
|
8569
8554
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8570
8555
|
}
|
|
8571
8556
|
return e;
|
|
@@ -8573,15 +8558,15 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8573
8558
|
setResult(e) {
|
|
8574
8559
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8575
8560
|
}
|
|
8576
|
-
},
|
|
8561
|
+
}, am = class extends rm {
|
|
8577
8562
|
constructor(e, t) {
|
|
8578
8563
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8579
8564
|
}
|
|
8580
|
-
},
|
|
8565
|
+
}, om = class extends rm {
|
|
8581
8566
|
constructor(e) {
|
|
8582
8567
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8583
8568
|
}
|
|
8584
|
-
},
|
|
8569
|
+
}, sm = class {
|
|
8585
8570
|
constructor(e) {
|
|
8586
8571
|
this.name = e, this.filters = [];
|
|
8587
8572
|
}
|
|
@@ -8645,7 +8630,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8645
8630
|
}
|
|
8646
8631
|
}), this);
|
|
8647
8632
|
}
|
|
8648
|
-
},
|
|
8633
|
+
}, cm = class {
|
|
8649
8634
|
constructor(e) {
|
|
8650
8635
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8651
8636
|
}
|
|
@@ -8672,7 +8657,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8672
8657
|
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);
|
|
8673
8658
|
return n.hasResult ? n.result : void 0;
|
|
8674
8659
|
}
|
|
8675
|
-
},
|
|
8660
|
+
}, lm = (e, t, n, r) => e[n] === t[r], um = (e, t, n, r) => {
|
|
8676
8661
|
var i, a, o;
|
|
8677
8662
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8678
8663
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8688,7 +8673,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8688
8673
|
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);
|
|
8689
8674
|
}
|
|
8690
8675
|
return d;
|
|
8691
|
-
},
|
|
8676
|
+
}, dm = (e, t, n, r) => {
|
|
8692
8677
|
let i = t.length, a = n.length, o = {
|
|
8693
8678
|
sequence: [],
|
|
8694
8679
|
indices1: [],
|
|
@@ -8710,11 +8695,11 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8710
8695
|
}
|
|
8711
8696
|
}
|
|
8712
8697
|
return o;
|
|
8713
|
-
},
|
|
8698
|
+
}, fm = { get: (e, t, n, r) => {
|
|
8714
8699
|
let i = r || {};
|
|
8715
|
-
return um(
|
|
8716
|
-
} },
|
|
8717
|
-
function
|
|
8700
|
+
return dm(um(e, t, n || lm, i), e, t, i);
|
|
8701
|
+
} }, pm = 3;
|
|
8702
|
+
function mm(e, t, n, r) {
|
|
8718
8703
|
for (let i = 0; i < n; i++) {
|
|
8719
8704
|
let n = e[i];
|
|
8720
8705
|
for (let e = 0; e < r; e++) {
|
|
@@ -8724,7 +8709,7 @@ function pm(e, t, n, r) {
|
|
|
8724
8709
|
}
|
|
8725
8710
|
return !1;
|
|
8726
8711
|
}
|
|
8727
|
-
function
|
|
8712
|
+
function hm(e, t, n, r, i) {
|
|
8728
8713
|
let a = e[n], o = t[r];
|
|
8729
8714
|
if (a === o) return !0;
|
|
8730
8715
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8737,15 +8722,15 @@ function mm(e, t, n, r, i) {
|
|
|
8737
8722
|
let l = i.hashCache2[r];
|
|
8738
8723
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8739
8724
|
}
|
|
8740
|
-
var
|
|
8725
|
+
var gm = function(e) {
|
|
8741
8726
|
var t, n, r, i, a;
|
|
8742
8727
|
if (!e.leftIsArray) return;
|
|
8743
8728
|
let o = {
|
|
8744
8729
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8745
8730
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8746
8731
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8747
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8748
|
-
for (; c + s < m && c + s < h &&
|
|
8732
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !mm(f, p, m, h)); s < m && s < h && hm(f, p, s, s, o);) l = s, g = new im(f[l], p[l]), e.push(g, l), s++;
|
|
8733
|
+
for (; c + s < m && c + s < h && hm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new im(f[u], p[d]), e.push(g, d), c++;
|
|
8749
8734
|
let _;
|
|
8750
8735
|
if (s + c === m) {
|
|
8751
8736
|
if (m === h) {
|
|
@@ -8769,7 +8754,7 @@ var hm = function(e) {
|
|
|
8769
8754
|
return;
|
|
8770
8755
|
}
|
|
8771
8756
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8772
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8757
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = fm.get(v, y, hm, o), x = [];
|
|
8773
8758
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8774
8759
|
let t = `_${l}`;
|
|
8775
8760
|
_[t] = [
|
|
@@ -8790,8 +8775,8 @@ var hm = function(e) {
|
|
|
8790
8775
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8791
8776
|
u = x[n];
|
|
8792
8777
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8793
|
-
if (u !== void 0 && r &&
|
|
8794
|
-
r.splice(1, 2, l,
|
|
8778
|
+
if (u !== void 0 && r && hm(v, y, u - s, l - s, o)) {
|
|
8779
|
+
r.splice(1, 2, l, pm), r.splice(1, 2, l, pm), C || (r[0] = ""), d = l, g = new im(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8795
8780
|
break;
|
|
8796
8781
|
}
|
|
8797
8782
|
}
|
|
@@ -8799,20 +8784,20 @@ var hm = function(e) {
|
|
|
8799
8784
|
} else {
|
|
8800
8785
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8801
8786
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8802
|
-
d = b.indices2[t] + s, g = new
|
|
8787
|
+
d = b.indices2[t] + s, g = new im(f[u], p[d]), e.push(g, d);
|
|
8803
8788
|
}
|
|
8804
8789
|
}
|
|
8805
8790
|
e.setResult(_).exit();
|
|
8806
8791
|
};
|
|
8807
|
-
|
|
8808
|
-
var
|
|
8792
|
+
gm.filterName = "arrays";
|
|
8793
|
+
var _m = {
|
|
8809
8794
|
numerically(e, t) {
|
|
8810
8795
|
return e - t;
|
|
8811
8796
|
},
|
|
8812
8797
|
numericallyBy(e) {
|
|
8813
8798
|
return (t, n) => t[e] - n[e];
|
|
8814
8799
|
}
|
|
8815
|
-
},
|
|
8800
|
+
}, vm = function(e) {
|
|
8816
8801
|
var t;
|
|
8817
8802
|
if (!e.nested) return;
|
|
8818
8803
|
let n = e.delta;
|
|
@@ -8821,7 +8806,7 @@ var gm = {
|
|
|
8821
8806
|
for (r in a) if (r !== "_t") {
|
|
8822
8807
|
if (r[0] === "_") {
|
|
8823
8808
|
let e = r;
|
|
8824
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8809
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === pm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8825
8810
|
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]}`);
|
|
8826
8811
|
} else {
|
|
8827
8812
|
let e = r;
|
|
@@ -8834,15 +8819,15 @@ var gm = {
|
|
|
8834
8819
|
});
|
|
8835
8820
|
}
|
|
8836
8821
|
}
|
|
8837
|
-
for (s = s.sort(
|
|
8822
|
+
for (s = s.sort(_m.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8838
8823
|
if (i = s[r], i === void 0) continue;
|
|
8839
8824
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8840
|
-
(e == null ? void 0 : e[2]) ===
|
|
8825
|
+
(e == null ? void 0 : e[2]) === pm && c.push({
|
|
8841
8826
|
index: e[1],
|
|
8842
8827
|
value: t
|
|
8843
8828
|
});
|
|
8844
8829
|
}
|
|
8845
|
-
c = c.sort(
|
|
8830
|
+
c = c.sort(_m.numericallyBy("index"));
|
|
8846
8831
|
let u = c.length;
|
|
8847
8832
|
for (r = 0; r < u; r++) {
|
|
8848
8833
|
let e = c[r];
|
|
@@ -8852,7 +8837,7 @@ var gm = {
|
|
|
8852
8837
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8853
8838
|
let t = l[r];
|
|
8854
8839
|
if (t === void 0) continue;
|
|
8855
|
-
let n = new
|
|
8840
|
+
let n = new am(o[t.index], t.delta);
|
|
8856
8841
|
e.push(n, t.index);
|
|
8857
8842
|
}
|
|
8858
8843
|
if (!e.children) {
|
|
@@ -8861,8 +8846,8 @@ var gm = {
|
|
|
8861
8846
|
}
|
|
8862
8847
|
e.exit();
|
|
8863
8848
|
};
|
|
8864
|
-
|
|
8865
|
-
var
|
|
8849
|
+
vm.filterName = "arrays";
|
|
8850
|
+
var ym = function(e) {
|
|
8866
8851
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8867
8852
|
let t = e.left, n = e.children.length;
|
|
8868
8853
|
for (let r = 0; r < n; r++) {
|
|
@@ -8873,16 +8858,16 @@ var vm = function(e) {
|
|
|
8873
8858
|
}
|
|
8874
8859
|
e.setResult(t).exit();
|
|
8875
8860
|
};
|
|
8876
|
-
|
|
8877
|
-
var
|
|
8861
|
+
ym.filterName = "arraysCollectChildren";
|
|
8862
|
+
var bm = function(e) {
|
|
8878
8863
|
if (!e.nested) {
|
|
8879
8864
|
let t = e.delta;
|
|
8880
|
-
if (t[2] ===
|
|
8865
|
+
if (t[2] === pm) {
|
|
8881
8866
|
let n = t;
|
|
8882
8867
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8883
8868
|
n[0],
|
|
8884
8869
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8885
|
-
|
|
8870
|
+
pm
|
|
8886
8871
|
]).exit();
|
|
8887
8872
|
}
|
|
8888
8873
|
return;
|
|
@@ -8892,20 +8877,20 @@ var ym = function(e) {
|
|
|
8892
8877
|
let n = t;
|
|
8893
8878
|
for (let t in n) {
|
|
8894
8879
|
if (t === "_t") continue;
|
|
8895
|
-
let r = new
|
|
8880
|
+
let r = new om(n[t]);
|
|
8896
8881
|
e.push(r, t);
|
|
8897
8882
|
}
|
|
8898
8883
|
e.exit();
|
|
8899
8884
|
};
|
|
8900
|
-
|
|
8901
|
-
var
|
|
8885
|
+
bm.filterName = "arrays";
|
|
8886
|
+
var xm = (e, t, n) => {
|
|
8902
8887
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8903
8888
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8904
8889
|
let r = +t;
|
|
8905
8890
|
for (let n in e) {
|
|
8906
8891
|
let i = e[n];
|
|
8907
8892
|
if (Array.isArray(i)) {
|
|
8908
|
-
if (i[2] ===
|
|
8893
|
+
if (i[2] === pm) {
|
|
8909
8894
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8910
8895
|
if (a === +t) return e;
|
|
8911
8896
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8913,7 +8898,7 @@ var bm = (e, t, n) => {
|
|
|
8913
8898
|
}
|
|
8914
8899
|
}
|
|
8915
8900
|
return r;
|
|
8916
|
-
},
|
|
8901
|
+
}, Sm = (e) => {
|
|
8917
8902
|
if (!e || !e.children) return;
|
|
8918
8903
|
let t = e.delta;
|
|
8919
8904
|
if (t._t !== "a") return;
|
|
@@ -8924,22 +8909,22 @@ var bm = (e, t, n) => {
|
|
|
8924
8909
|
let a = r.newName;
|
|
8925
8910
|
if (a === void 0) {
|
|
8926
8911
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8927
|
-
a =
|
|
8912
|
+
a = xm(n, r.childName, r.result);
|
|
8928
8913
|
}
|
|
8929
8914
|
i[a] !== r.result && (i[a] = r.result);
|
|
8930
8915
|
}
|
|
8931
8916
|
e.setResult(i).exit();
|
|
8932
8917
|
};
|
|
8933
|
-
|
|
8918
|
+
Sm.filterName = "arraysCollectChildren";
|
|
8934
8919
|
//#endregion
|
|
8935
8920
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8936
|
-
var
|
|
8921
|
+
var Cm = function(e) {
|
|
8937
8922
|
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();
|
|
8938
8923
|
};
|
|
8939
|
-
|
|
8924
|
+
Cm.filterName = "dates";
|
|
8940
8925
|
//#endregion
|
|
8941
8926
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8942
|
-
var
|
|
8927
|
+
var wm = /* @__PURE__ */ new Set(["__proto__"]), Tm = (e) => {
|
|
8943
8928
|
if (!e || !e.children) return;
|
|
8944
8929
|
let t = e.children.length, n = e.result;
|
|
8945
8930
|
for (let r = 0; r < t; r++) {
|
|
@@ -8951,18 +8936,18 @@ var Cm = /* @__PURE__ */ new Set(["__proto__"]), wm = (e) => {
|
|
|
8951
8936
|
}
|
|
8952
8937
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8953
8938
|
};
|
|
8954
|
-
|
|
8955
|
-
var
|
|
8939
|
+
Tm.filterName = "collectChildren";
|
|
8940
|
+
var Em = (e) => {
|
|
8956
8941
|
var t;
|
|
8957
8942
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8958
8943
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8959
8944
|
for (let t in n) {
|
|
8960
8945
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8961
|
-
let a = new
|
|
8946
|
+
let a = new im(n[t], r[t]);
|
|
8962
8947
|
e.push(a, t);
|
|
8963
8948
|
}
|
|
8964
8949
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8965
|
-
let n = new
|
|
8950
|
+
let n = new im(void 0, r[t]);
|
|
8966
8951
|
e.push(n, t);
|
|
8967
8952
|
}
|
|
8968
8953
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8971,15 +8956,15 @@ var Tm = (e) => {
|
|
|
8971
8956
|
}
|
|
8972
8957
|
e.exit();
|
|
8973
8958
|
};
|
|
8974
|
-
|
|
8975
|
-
var
|
|
8959
|
+
Em.filterName = "objects";
|
|
8960
|
+
var Dm = function(e) {
|
|
8976
8961
|
if (!e.nested) return;
|
|
8977
8962
|
let t = e.delta;
|
|
8978
8963
|
if (t._t) return;
|
|
8979
8964
|
let n = t, r = !1;
|
|
8980
8965
|
for (let t in n) {
|
|
8981
|
-
if (
|
|
8982
|
-
let i = e.left, a = new
|
|
8966
|
+
if (wm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8967
|
+
let i = e.left, a = new am(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8983
8968
|
e.push(a, t), r = !0;
|
|
8984
8969
|
}
|
|
8985
8970
|
if (!r) {
|
|
@@ -8988,8 +8973,8 @@ var Em = function(e) {
|
|
|
8988
8973
|
}
|
|
8989
8974
|
e.exit();
|
|
8990
8975
|
};
|
|
8991
|
-
|
|
8992
|
-
var
|
|
8976
|
+
Dm.filterName = "objects";
|
|
8977
|
+
var Om = function(e) {
|
|
8993
8978
|
if (!e || !e.children || e.delta._t) return;
|
|
8994
8979
|
if (e.left === null || typeof e.left != "object") {
|
|
8995
8980
|
e.setResult(e.left).exit();
|
|
@@ -9000,17 +8985,17 @@ var Dm = function(e) {
|
|
|
9000
8985
|
let n = e.children[r];
|
|
9001
8986
|
if (n === void 0) continue;
|
|
9002
8987
|
let i = n.childName;
|
|
9003
|
-
|
|
8988
|
+
wm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
9004
8989
|
}
|
|
9005
8990
|
e.setResult(t).exit();
|
|
9006
8991
|
};
|
|
9007
|
-
|
|
9008
|
-
var
|
|
8992
|
+
Om.filterName = "collectChildren";
|
|
8993
|
+
var km = function(e) {
|
|
9009
8994
|
if (!e.nested || e.delta._t) return;
|
|
9010
8995
|
let t = e.delta, n = !1;
|
|
9011
8996
|
for (let r in t) {
|
|
9012
|
-
if (
|
|
9013
|
-
let i = new
|
|
8997
|
+
if (wm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8998
|
+
let i = new om(t[r]);
|
|
9014
8999
|
e.push(i, r), n = !0;
|
|
9015
9000
|
}
|
|
9016
9001
|
if (!n) {
|
|
@@ -9019,25 +9004,25 @@ var Om = function(e) {
|
|
|
9019
9004
|
}
|
|
9020
9005
|
e.exit();
|
|
9021
9006
|
};
|
|
9022
|
-
|
|
9023
|
-
var
|
|
9007
|
+
km.filterName = "objects";
|
|
9008
|
+
var Am = (e) => {
|
|
9024
9009
|
if (!e || !e.children || e.delta._t) return;
|
|
9025
9010
|
let t = e.children.length, n = {};
|
|
9026
9011
|
for (let r = 0; r < t; r++) {
|
|
9027
9012
|
let t = e.children[r];
|
|
9028
9013
|
if (t === void 0) continue;
|
|
9029
9014
|
let i = t.childName;
|
|
9030
|
-
|
|
9015
|
+
wm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
9031
9016
|
}
|
|
9032
9017
|
e.setResult(n).exit();
|
|
9033
9018
|
};
|
|
9034
|
-
|
|
9019
|
+
Am.filterName = "collectChildren";
|
|
9035
9020
|
//#endregion
|
|
9036
9021
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
9037
|
-
var
|
|
9038
|
-
function
|
|
9022
|
+
var jm = 2, Mm = 60, Nm = null;
|
|
9023
|
+
function Pm(e, t) {
|
|
9039
9024
|
var n;
|
|
9040
|
-
if (!
|
|
9025
|
+
if (!Nm) {
|
|
9041
9026
|
let r;
|
|
9042
9027
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
9043
9028
|
else {
|
|
@@ -9045,7 +9030,7 @@ function Nm(e, t) {
|
|
|
9045
9030
|
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.");
|
|
9046
9031
|
throw e.diff_match_patch_not_found = !0, e;
|
|
9047
9032
|
}
|
|
9048
|
-
|
|
9033
|
+
Nm = {
|
|
9049
9034
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
9050
9035
|
patch: (e, t) => {
|
|
9051
9036
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -9057,17 +9042,17 @@ function Nm(e, t) {
|
|
|
9057
9042
|
}
|
|
9058
9043
|
};
|
|
9059
9044
|
}
|
|
9060
|
-
return
|
|
9045
|
+
return Nm;
|
|
9061
9046
|
}
|
|
9062
|
-
var
|
|
9047
|
+
var Fm = function(e) {
|
|
9063
9048
|
var t, n;
|
|
9064
9049
|
if (e.leftType !== "string") return;
|
|
9065
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
9050
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Mm;
|
|
9066
9051
|
if (r.length < a || i.length < a) {
|
|
9067
9052
|
e.setResult([r, i]).exit();
|
|
9068
9053
|
return;
|
|
9069
9054
|
}
|
|
9070
|
-
let o =
|
|
9055
|
+
let o = Pm(e.options);
|
|
9071
9056
|
if (!o) {
|
|
9072
9057
|
e.setResult([r, i]).exit();
|
|
9073
9058
|
return;
|
|
@@ -9076,19 +9061,19 @@ var Pm = function(e) {
|
|
|
9076
9061
|
e.setResult([
|
|
9077
9062
|
s(r, i),
|
|
9078
9063
|
0,
|
|
9079
|
-
|
|
9064
|
+
jm
|
|
9080
9065
|
]).exit();
|
|
9081
9066
|
};
|
|
9082
|
-
|
|
9083
|
-
var
|
|
9067
|
+
Fm.filterName = "texts";
|
|
9068
|
+
var Im = function(e) {
|
|
9084
9069
|
if (e.nested) return;
|
|
9085
9070
|
let t = e.delta;
|
|
9086
|
-
if (t[2] !==
|
|
9087
|
-
let n = t, r =
|
|
9071
|
+
if (t[2] !== jm) return;
|
|
9072
|
+
let n = t, r = Pm(e.options, !0).patch;
|
|
9088
9073
|
e.setResult(r(e.left, n[0])).exit();
|
|
9089
9074
|
};
|
|
9090
|
-
|
|
9091
|
-
var
|
|
9075
|
+
Im.filterName = "texts";
|
|
9076
|
+
var Lm = (e) => {
|
|
9092
9077
|
var t, n, r;
|
|
9093
9078
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
9094
9079
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9109,21 +9094,21 @@ var Im = (e) => {
|
|
|
9109
9094
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9110
9095
|
}
|
|
9111
9096
|
return a.join("\n");
|
|
9112
|
-
},
|
|
9097
|
+
}, Rm = function(e) {
|
|
9113
9098
|
if (e.nested) return;
|
|
9114
9099
|
let t = e.delta;
|
|
9115
|
-
if (t[2] !==
|
|
9100
|
+
if (t[2] !== jm) return;
|
|
9116
9101
|
let n = t;
|
|
9117
9102
|
e.setResult([
|
|
9118
|
-
|
|
9103
|
+
Lm(n[0]),
|
|
9119
9104
|
0,
|
|
9120
|
-
|
|
9105
|
+
jm
|
|
9121
9106
|
]).exit();
|
|
9122
9107
|
};
|
|
9123
|
-
|
|
9108
|
+
Rm.filterName = "texts";
|
|
9124
9109
|
//#endregion
|
|
9125
9110
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9126
|
-
var
|
|
9111
|
+
var zm = function(e) {
|
|
9127
9112
|
if (e.left === e.right) {
|
|
9128
9113
|
e.setResult(void 0).exit();
|
|
9129
9114
|
return;
|
|
@@ -9156,8 +9141,8 @@ var Rm = function(e) {
|
|
|
9156
9141
|
}
|
|
9157
9142
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9158
9143
|
};
|
|
9159
|
-
|
|
9160
|
-
var
|
|
9144
|
+
zm.filterName = "trivial";
|
|
9145
|
+
var Bm = function(e) {
|
|
9161
9146
|
if (e.delta === void 0) {
|
|
9162
9147
|
e.setResult(e.left).exit();
|
|
9163
9148
|
return;
|
|
@@ -9181,8 +9166,8 @@ var zm = function(e) {
|
|
|
9181
9166
|
}
|
|
9182
9167
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9183
9168
|
};
|
|
9184
|
-
|
|
9185
|
-
var
|
|
9169
|
+
Bm.filterName = "trivial";
|
|
9170
|
+
var Vm = function(e) {
|
|
9186
9171
|
if (e.delta === void 0) {
|
|
9187
9172
|
e.setResult(e.delta).exit();
|
|
9188
9173
|
return;
|
|
@@ -9203,36 +9188,36 @@ var Bm = function(e) {
|
|
|
9203
9188
|
}
|
|
9204
9189
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9205
9190
|
};
|
|
9206
|
-
|
|
9191
|
+
Vm.filterName = "trivial";
|
|
9207
9192
|
//#endregion
|
|
9208
9193
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9209
|
-
var
|
|
9194
|
+
var Hm = class {
|
|
9210
9195
|
constructor(e) {
|
|
9211
|
-
this.processor = new
|
|
9196
|
+
this.processor = new cm(e), this.processor.pipe(new sm("diff").append(Tm, zm, Cm, Fm, Em, gm).shouldHaveResult()), this.processor.pipe(new sm("patch").append(Om, ym, Bm, Im, Dm, vm).shouldHaveResult()), this.processor.pipe(new sm("reverse").append(Am, Sm, Vm, Rm, km, bm).shouldHaveResult());
|
|
9212
9197
|
}
|
|
9213
9198
|
options(e) {
|
|
9214
9199
|
return this.processor.options(e);
|
|
9215
9200
|
}
|
|
9216
9201
|
diff(e, t) {
|
|
9217
|
-
return this.processor.process(new
|
|
9202
|
+
return this.processor.process(new im(e, t));
|
|
9218
9203
|
}
|
|
9219
9204
|
patch(e, t) {
|
|
9220
|
-
return this.processor.process(new
|
|
9205
|
+
return this.processor.process(new am(e, t));
|
|
9221
9206
|
}
|
|
9222
9207
|
reverse(e) {
|
|
9223
|
-
return this.processor.process(new
|
|
9208
|
+
return this.processor.process(new om(e));
|
|
9224
9209
|
}
|
|
9225
9210
|
unpatch(e, t) {
|
|
9226
9211
|
return this.patch(e, this.reverse(t));
|
|
9227
9212
|
}
|
|
9228
9213
|
clone(e) {
|
|
9229
|
-
return
|
|
9214
|
+
return em(e);
|
|
9230
9215
|
}
|
|
9231
9216
|
};
|
|
9232
9217
|
//#endregion
|
|
9233
9218
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9234
|
-
function
|
|
9235
|
-
return new
|
|
9219
|
+
function Um(e) {
|
|
9220
|
+
return new Hm(e);
|
|
9236
9221
|
}
|
|
9237
9222
|
//#endregion
|
|
9238
9223
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9794,46 +9779,46 @@ $.Diff = function(e, t) {
|
|
|
9794
9779
|
};
|
|
9795
9780
|
//#endregion
|
|
9796
9781
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9797
|
-
var
|
|
9782
|
+
var Wm = (e = {}) => Um({
|
|
9798
9783
|
...e,
|
|
9799
9784
|
textDiff: {
|
|
9800
9785
|
diffMatchPatch: $,
|
|
9801
9786
|
minLength: 120
|
|
9802
9787
|
},
|
|
9803
9788
|
cloneDiffValues: !0
|
|
9804
|
-
}),
|
|
9789
|
+
}), Gm = ["user", "unittemplate"], Km = Wm(), qm = (e, t, n) => {
|
|
9805
9790
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9806
9791
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9807
9792
|
let n = r[t[e]];
|
|
9808
9793
|
if (n) return n;
|
|
9809
9794
|
}
|
|
9810
9795
|
return n || "";
|
|
9811
|
-
},
|
|
9796
|
+
}, Jm = (e) => {
|
|
9812
9797
|
let t = (e) => vr(e) ? Ar(e) : String(e);
|
|
9813
9798
|
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);
|
|
9814
|
-
},
|
|
9799
|
+
}, Ym = (e) => {
|
|
9815
9800
|
switch (e.length) {
|
|
9816
9801
|
case 1: {
|
|
9817
9802
|
let [t] = e;
|
|
9818
9803
|
return {
|
|
9819
9804
|
type: "created",
|
|
9820
9805
|
before: "",
|
|
9821
|
-
after:
|
|
9806
|
+
after: Jm(t)
|
|
9822
9807
|
};
|
|
9823
9808
|
}
|
|
9824
9809
|
case 2: {
|
|
9825
9810
|
let [t, n] = e;
|
|
9826
9811
|
return {
|
|
9827
9812
|
type: "modified",
|
|
9828
|
-
before:
|
|
9829
|
-
after:
|
|
9813
|
+
before: Jm(t),
|
|
9814
|
+
after: Jm(n)
|
|
9830
9815
|
};
|
|
9831
9816
|
}
|
|
9832
9817
|
case 3: {
|
|
9833
9818
|
let [t] = e;
|
|
9834
9819
|
return {
|
|
9835
9820
|
type: "deleted",
|
|
9836
|
-
before:
|
|
9821
|
+
before: Jm(t),
|
|
9837
9822
|
after: ""
|
|
9838
9823
|
};
|
|
9839
9824
|
}
|
|
@@ -9843,15 +9828,15 @@ var Um = (e = {}) => Hm({
|
|
|
9843
9828
|
after: ""
|
|
9844
9829
|
};
|
|
9845
9830
|
}
|
|
9846
|
-
},
|
|
9847
|
-
let r =
|
|
9831
|
+
}, Xm = (e) => Array.isArray(e), Zm = (e, t) => t ? Xm(t) ? t.length === 0 ? e : t.reduce((e, t) => Km.unpatch(nn(e), nn(t)), nn(e)) : Km.unpatch(nn(e), nn(t)) : e, Qm = (e) => e.createdAt || e.date, $m = (e, t, n) => {
|
|
9832
|
+
let r = Qm(e);
|
|
9848
9833
|
if (!r) return {
|
|
9849
9834
|
oldJson: "",
|
|
9850
9835
|
newJson: "",
|
|
9851
9836
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9852
9837
|
};
|
|
9853
9838
|
let i = t.filter((e) => {
|
|
9854
|
-
let t =
|
|
9839
|
+
let t = Qm(e);
|
|
9855
9840
|
return !!(e.diffs && t && t >= r);
|
|
9856
9841
|
}), a = Array.from({ length: i.length + 1 });
|
|
9857
9842
|
a[0] = nn(n);
|
|
@@ -9864,7 +9849,7 @@ var Um = (e = {}) => Hm({
|
|
|
9864
9849
|
a[e + 1] = a[e];
|
|
9865
9850
|
continue;
|
|
9866
9851
|
}
|
|
9867
|
-
a[e + 1] =
|
|
9852
|
+
a[e + 1] = Zm(a[e], t);
|
|
9868
9853
|
}
|
|
9869
9854
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9870
9855
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9879,10 +9864,10 @@ var Um = (e = {}) => Hm({
|
|
|
9879
9864
|
oldJson: o,
|
|
9880
9865
|
newJson: s
|
|
9881
9866
|
};
|
|
9882
|
-
},
|
|
9867
|
+
}, eh = (e, t, n = {}, r = []) => {
|
|
9883
9868
|
var i;
|
|
9884
9869
|
if (!e) return;
|
|
9885
|
-
let a = [...
|
|
9870
|
+
let a = [...Gm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9886
9871
|
Object.keys(e).forEach((i) => {
|
|
9887
9872
|
var o;
|
|
9888
9873
|
let s = e[i];
|
|
@@ -9895,12 +9880,12 @@ var Um = (e = {}) => Hm({
|
|
|
9895
9880
|
cn(s) ? t.push({
|
|
9896
9881
|
deltaFormat: [...s],
|
|
9897
9882
|
path: c
|
|
9898
|
-
}) : gn(s) &&
|
|
9883
|
+
}) : gn(s) && eh(s, t, n, c);
|
|
9899
9884
|
});
|
|
9900
|
-
},
|
|
9885
|
+
}, th = (e, t = {}) => {
|
|
9901
9886
|
let n = [];
|
|
9902
|
-
return e ? (
|
|
9903
|
-
},
|
|
9887
|
+
return e ? (eh(e, n, t), n) : [];
|
|
9888
|
+
}, nh = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), rh = (e) => {
|
|
9904
9889
|
if (e == null || e === "") return "empty";
|
|
9905
9890
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9906
9891
|
if (typeof e == "string") return e;
|
|
@@ -9911,27 +9896,27 @@ var Um = (e = {}) => Hm({
|
|
|
9911
9896
|
} catch {
|
|
9912
9897
|
return String(e);
|
|
9913
9898
|
}
|
|
9914
|
-
},
|
|
9899
|
+
}, ih = (e, t = e.length - 1) => {
|
|
9915
9900
|
if (t >= e.length) return "Value";
|
|
9916
9901
|
let n = e[t];
|
|
9917
|
-
return !n || hr(n) ?
|
|
9918
|
-
},
|
|
9919
|
-
let o =
|
|
9902
|
+
return !n || hr(n) ? ih(e, t - 1) : nh(n);
|
|
9903
|
+
}, ah = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9904
|
+
let o = rh(r), s = rh(i), c = a ? ` in ${a}` : "";
|
|
9920
9905
|
switch (t) {
|
|
9921
9906
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9922
9907
|
case "created": return `${e} created ${s}${c}.`;
|
|
9923
9908
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9924
9909
|
default: return `${e} changed ${n}${c}.`;
|
|
9925
9910
|
}
|
|
9926
|
-
},
|
|
9911
|
+
}, oh = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9927
9912
|
let i = {
|
|
9928
9913
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9929
9914
|
rows: n.map((n) => {
|
|
9930
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9931
|
-
return { cells: [{ value:
|
|
9915
|
+
let { deltaFormat: i, path: a } = n, o = qm(e, a, r), { type: s, before: c, after: l } = Ym(i);
|
|
9916
|
+
return { cells: [{ value: ah({
|
|
9932
9917
|
userName: t,
|
|
9933
9918
|
type: s,
|
|
9934
|
-
property:
|
|
9919
|
+
property: ih(a),
|
|
9935
9920
|
before: c,
|
|
9936
9921
|
after: l,
|
|
9937
9922
|
sectionName: o
|
|
@@ -9939,7 +9924,7 @@ var Um = (e = {}) => Hm({
|
|
|
9939
9924
|
})
|
|
9940
9925
|
};
|
|
9941
9926
|
return /* @__PURE__ */ S(nu, { table: i });
|
|
9942
|
-
},
|
|
9927
|
+
}, sh = Object.freeze({
|
|
9943
9928
|
summary: {
|
|
9944
9929
|
label: "Summary",
|
|
9945
9930
|
value: "summary"
|
|
@@ -9948,13 +9933,13 @@ var Um = (e = {}) => Hm({
|
|
|
9948
9933
|
label: "Compare",
|
|
9949
9934
|
value: "compare"
|
|
9950
9935
|
}
|
|
9951
|
-
}),
|
|
9952
|
-
let c = [
|
|
9936
|
+
}), ch = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9937
|
+
let c = [sh.summary, sh.compare].map(({ label: e, value: t }) => ({
|
|
9953
9938
|
label: e,
|
|
9954
9939
|
value: t
|
|
9955
9940
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
9956
9941
|
if (!d) return null;
|
|
9957
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9942
|
+
let { oldJson: f, newJson: p, error: m } = $m(e, t, n);
|
|
9958
9943
|
return /* @__PURE__ */ S(Es, {
|
|
9959
9944
|
visible: r,
|
|
9960
9945
|
centered: !0,
|
|
@@ -9967,10 +9952,10 @@ var Um = (e = {}) => Hm({
|
|
|
9967
9952
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9968
9953
|
options: c,
|
|
9969
9954
|
value: l
|
|
9970
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
9955
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(oh, {
|
|
9971
9956
|
userName: e.userName,
|
|
9972
9957
|
sectionNames: a,
|
|
9973
|
-
diffs:
|
|
9958
|
+
diffs: th(d, i),
|
|
9974
9959
|
defaultSectionName: o
|
|
9975
9960
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
9976
9961
|
style: { padding: 16 },
|
|
@@ -9988,7 +9973,7 @@ var Um = (e = {}) => Hm({
|
|
|
9988
9973
|
height: "90vh"
|
|
9989
9974
|
} })
|
|
9990
9975
|
});
|
|
9991
|
-
},
|
|
9976
|
+
}, lh = [
|
|
9992
9977
|
{
|
|
9993
9978
|
label: "10 / page",
|
|
9994
9979
|
value: 10
|
|
@@ -10001,8 +9986,8 @@ var Um = (e = {}) => Hm({
|
|
|
10001
9986
|
label: "50 / page",
|
|
10002
9987
|
value: 50
|
|
10003
9988
|
}
|
|
10004
|
-
],
|
|
10005
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9989
|
+
], uh = (e, t = {}) => {
|
|
9990
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = th(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
10006
9991
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
10007
9992
|
switch (a) {
|
|
10008
9993
|
case "Created": return `Created by ${r}`;
|
|
@@ -10012,7 +9997,7 @@ var Um = (e = {}) => Hm({
|
|
|
10012
9997
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
10013
9998
|
default: return `Change by ${r}`;
|
|
10014
9999
|
}
|
|
10015
|
-
},
|
|
10000
|
+
}, dh = ({ 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 }) => {
|
|
10016
10001
|
let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
|
|
10017
10002
|
if (e.snapshot) {
|
|
10018
10003
|
f == null || f(e.snapshot, e);
|
|
@@ -10031,7 +10016,7 @@ var Um = (e = {}) => Hm({
|
|
|
10031
10016
|
return {
|
|
10032
10017
|
cells: [
|
|
10033
10018
|
{
|
|
10034
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
10019
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : uh(e, l),
|
|
10035
10020
|
type: "Link",
|
|
10036
10021
|
disabled: n,
|
|
10037
10022
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -10050,8 +10035,8 @@ var Um = (e = {}) => Hm({
|
|
|
10050
10035
|
type: "Static"
|
|
10051
10036
|
},
|
|
10052
10037
|
{
|
|
10053
|
-
value:
|
|
10054
|
-
date:
|
|
10038
|
+
value: Qp({
|
|
10039
|
+
date: Qm(e),
|
|
10055
10040
|
showTime: !0
|
|
10056
10041
|
}),
|
|
10057
10042
|
type: "Static"
|
|
@@ -10094,14 +10079,14 @@ var Um = (e = {}) => Hm({
|
|
|
10094
10079
|
onChange: (e) => {
|
|
10095
10080
|
u(Number(e.target.value));
|
|
10096
10081
|
},
|
|
10097
|
-
options:
|
|
10082
|
+
options: lh,
|
|
10098
10083
|
value: a
|
|
10099
10084
|
},
|
|
10100
10085
|
onSelectPage: (e) => d(e),
|
|
10101
10086
|
small: !0
|
|
10102
10087
|
} }
|
|
10103
10088
|
} })
|
|
10104
|
-
}), g && y && y.diffs && /* @__PURE__ */ S(
|
|
10089
|
+
}), g && y && y.diffs && /* @__PURE__ */ S(ch, {
|
|
10105
10090
|
sectionNames: o,
|
|
10106
10091
|
isOpen: g,
|
|
10107
10092
|
onClose: () => _(!1),
|
|
@@ -10111,7 +10096,7 @@ var Um = (e = {}) => Hm({
|
|
|
10111
10096
|
data: t,
|
|
10112
10097
|
transformDiffsConfig: l
|
|
10113
10098
|
})] });
|
|
10114
|
-
},
|
|
10099
|
+
}, fh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10115
10100
|
let i = window.location.href, a = _(i);
|
|
10116
10101
|
return d(() => {
|
|
10117
10102
|
a.current = i;
|
|
@@ -10134,20 +10119,20 @@ var Um = (e = {}) => Hm({
|
|
|
10134
10119
|
});
|
|
10135
10120
|
};
|
|
10136
10121
|
}, [e, t]), null;
|
|
10137
|
-
},
|
|
10122
|
+
}, ph = {
|
|
10138
10123
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10139
10124
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10140
10125
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10141
|
-
},
|
|
10126
|
+
}, mh = ({ options: e }) => {
|
|
10142
10127
|
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Ap();
|
|
10143
10128
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10144
10129
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10145
|
-
className: b(n ?
|
|
10130
|
+
className: b(n ? ph.sidebarErrorBoundary : "", r ? ph.rightSidebarErrorBoundary : ""),
|
|
10146
10131
|
style: a,
|
|
10147
10132
|
children: o == null ? void 0 : o.unexpectedError
|
|
10148
10133
|
});
|
|
10149
10134
|
let s = /* @__PURE__ */ S("div", {
|
|
10150
|
-
className:
|
|
10135
|
+
className: ph.errorBoundary,
|
|
10151
10136
|
style: a,
|
|
10152
10137
|
children: /* @__PURE__ */ S(Ks, { message: {
|
|
10153
10138
|
icon: !0,
|
|
@@ -10162,19 +10147,19 @@ var Um = (e = {}) => Hm({
|
|
|
10162
10147
|
padding: 0,
|
|
10163
10148
|
children: s
|
|
10164
10149
|
}) : s;
|
|
10165
|
-
},
|
|
10166
|
-
fallback: /* @__PURE__ */ S(
|
|
10150
|
+
}, hh = ({ children: e, options: t }) => /* @__PURE__ */ S(wi.ErrorBoundary, {
|
|
10151
|
+
fallback: /* @__PURE__ */ S(mh, { options: t }),
|
|
10167
10152
|
onError: (e, t) => {
|
|
10168
10153
|
console.error("Error caught by boundary:", e, t);
|
|
10169
10154
|
},
|
|
10170
10155
|
children: e
|
|
10171
|
-
}),
|
|
10156
|
+
}), gh = (e, t = {}) => (n) => /* @__PURE__ */ S(hh, {
|
|
10172
10157
|
options: t,
|
|
10173
10158
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10174
|
-
}),
|
|
10159
|
+
}), _h = (e = {}) => (t) => gh(t, e), vh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, yh = (e) => {
|
|
10175
10160
|
jp(Ep.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10176
|
-
e === Ep.Translations ? jp(e, Op(t)) : jp(e,
|
|
10161
|
+
e === Ep.Translations ? jp(e, Op(t)) : jp(e, vh(t) ? t : { ...t });
|
|
10177
10162
|
});
|
|
10178
10163
|
};
|
|
10179
10164
|
//#endregion
|
|
10180
|
-
export { Yi as Accordion, _a as AccordionWithDefaultToggle, po as Actions, Di as Align,
|
|
10165
|
+
export { Yi as Accordion, _a as AccordionWithDefaultToggle, po as Actions, Di as Align, dh as AuditLog, ro as Badge, _o as Breadcrumb, ho as BreadcrumbLinkType, q as Button, yo as ButtonGroup, Oi as ButtonPosition, xa as ButtonType, xo as Card, pa as CheckBox, Ui as Chevron, Ki as Collapse, Ei as Color, Ho as ColorInput, Vo as ColorInputPopover, qo as Column, is as Dialog, Zp as DiffTable, Vp as DiffViewer, W as DisabledContext, Qo as Divider, ds as Drawer, rp as ElementType, pu as Empty, hh as ErrorBoundary, yd as Field, hd as FileButton, xs as FileInput, bd as Flex, Sd as FormRow, Do as Grid, H as GroupOrder, ts as Heading, fa as HelpIcon, G as Icon, U as IconType, gs as Input, ms as InputGroup, cl as InputGroupAddon, vs as InputReaderMethods, ji as InputType, _d as Label, Fd as List, wd as ListHeading, Ad as ListSubheading, Ld as Loader, mf as Mention, uo as Menu, qa as MenuCarat, Ka as MenuType, Ks as Message, Bs as MessageType, Es as Modal, Qs as NativeSelect, xl as NumberInput, Wd as OptionDropdown, Kd as Page, ll as Pagination, lp as PopConfirm, Co as Popover, qd as Portal, Yd as PrintHeader, ks as ProgressBar, Xd as RadioButton, pf as RichTextInput, gf as Row, nl as Select, Lp as SettingField, xf as SideBar, Cf as Skeleton, jl as Slider, Ps as SmartUploadModal, Ss as Spacer, ba as Spinner, nu as Table, md as TableImportExport, Xf as Tabs, Xo as Text, $f as TextArea, Zf as TextLink, ki as TextTransform, Ai as Theme, ri as Toaster, Qu as Toggle, K as Tooltip, op as TopBar, pp as Tree, Tp as TreeTable, Ti as TriggerType, Uf as UnitInput, qf as UnitSlider, Fp as UnitTable, fh as UsageTracker, Yu as dismissToast, Bf as initializeContext, yh as initializeGuiLibrary, ys as readFile, Ju as toast, $s as useFocus, Cs as useKeyboardEvent, nc as useWindowWidth, _h as withChainableErrorBoundary, gh as withErrorBoundary };
|