@mercoa/react 0.0.46-rc2 → 0.0.46-rc4
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/components/Counterparties.d.ts +2 -1
- package/dist/components/EntityDetails.d.ts +2 -1
- package/dist/components/Payables.d.ts +2 -1
- package/dist/index.es.js +401 -397
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +15 -15
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -4679,7 +4679,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
4679
4679
|
return x.length === 0 || z.copy(x, 0, 0, w), x;
|
|
4680
4680
|
}
|
|
4681
4681
|
if (z.length !== void 0)
|
|
4682
|
-
return typeof z.length != "number" ||
|
|
4682
|
+
return typeof z.length != "number" || te(z.length) ? i(0) : h(z);
|
|
4683
4683
|
if (z.type === "Buffer" && Array.isArray(z.data))
|
|
4684
4684
|
return h(z.data);
|
|
4685
4685
|
}
|
|
@@ -4781,7 +4781,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
4781
4781
|
case "hex":
|
|
4782
4782
|
return x >>> 1;
|
|
4783
4783
|
case "base64":
|
|
4784
|
-
return
|
|
4784
|
+
return oe(z).length;
|
|
4785
4785
|
default:
|
|
4786
4786
|
if (re)
|
|
4787
4787
|
return B ? -1 : Ae(z).length;
|
|
@@ -4882,7 +4882,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
4882
4882
|
function E(z, w, x, B, re) {
|
|
4883
4883
|
if (z.length === 0)
|
|
4884
4884
|
return -1;
|
|
4885
|
-
if (typeof x == "string" ? (B = x, x = 0) : x > 2147483647 ? x = 2147483647 : x < -2147483648 && (x = -2147483648), x = +x,
|
|
4885
|
+
if (typeof x == "string" ? (B = x, x = 0) : x > 2147483647 ? x = 2147483647 : x < -2147483648 && (x = -2147483648), x = +x, te(x) && (x = re ? 0 : z.length - 1), x < 0 && (x = z.length + x), x >= z.length) {
|
|
4886
4886
|
if (re)
|
|
4887
4887
|
return -1;
|
|
4888
4888
|
x = z.length - 1;
|
|
@@ -4945,7 +4945,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
4945
4945
|
let k;
|
|
4946
4946
|
for (k = 0; k < B; ++k) {
|
|
4947
4947
|
const Ue = parseInt(w.substr(k * 2, 2), 16);
|
|
4948
|
-
if (
|
|
4948
|
+
if (te(Ue))
|
|
4949
4949
|
return k;
|
|
4950
4950
|
z[x + k] = Ue;
|
|
4951
4951
|
}
|
|
@@ -4958,7 +4958,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
4958
4958
|
return de(H(w), z, x, B);
|
|
4959
4959
|
}
|
|
4960
4960
|
function T(z, w, x, B) {
|
|
4961
|
-
return de(
|
|
4961
|
+
return de(oe(w), z, x, B);
|
|
4962
4962
|
}
|
|
4963
4963
|
function C(z, w, x, B) {
|
|
4964
4964
|
return de(se(w, z.length - x), z, x, B);
|
|
@@ -5332,7 +5332,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
5332
5332
|
return this;
|
|
5333
5333
|
};
|
|
5334
5334
|
const ie = {};
|
|
5335
|
-
function
|
|
5335
|
+
function ne(z, w, x) {
|
|
5336
5336
|
ie[z] = class extends x {
|
|
5337
5337
|
constructor() {
|
|
5338
5338
|
super(), Object.defineProperty(this, "message", {
|
|
@@ -5357,19 +5357,19 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
5357
5357
|
}
|
|
5358
5358
|
};
|
|
5359
5359
|
}
|
|
5360
|
-
|
|
5360
|
+
ne(
|
|
5361
5361
|
"ERR_BUFFER_OUT_OF_BOUNDS",
|
|
5362
5362
|
function(z) {
|
|
5363
5363
|
return z ? `${z} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
5364
5364
|
},
|
|
5365
5365
|
RangeError
|
|
5366
|
-
),
|
|
5366
|
+
), ne(
|
|
5367
5367
|
"ERR_INVALID_ARG_TYPE",
|
|
5368
5368
|
function(z, w) {
|
|
5369
5369
|
return `The "${z}" argument must be of type number. Received type ${typeof w}`;
|
|
5370
5370
|
},
|
|
5371
5371
|
TypeError
|
|
5372
|
-
),
|
|
5372
|
+
), ne(
|
|
5373
5373
|
"ERR_OUT_OF_RANGE",
|
|
5374
5374
|
function(z, w, x) {
|
|
5375
5375
|
let B = `The value of "${z}" is out of range.`, re = x;
|
|
@@ -5486,7 +5486,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
5486
5486
|
x = z.charCodeAt(k), B = x >> 8, re = x % 256, fe.push(re), fe.push(B);
|
|
5487
5487
|
return fe;
|
|
5488
5488
|
}
|
|
5489
|
-
function
|
|
5489
|
+
function oe(z) {
|
|
5490
5490
|
return r.toByteArray(Oe(z));
|
|
5491
5491
|
}
|
|
5492
5492
|
function de(z, w, x, B) {
|
|
@@ -5498,7 +5498,7 @@ wj.write = function(e, r, t, n, o, a) {
|
|
|
5498
5498
|
function pe(z, w) {
|
|
5499
5499
|
return z instanceof w || z != null && z.constructor != null && z.constructor.name != null && z.constructor.name === w.name;
|
|
5500
5500
|
}
|
|
5501
|
-
function
|
|
5501
|
+
function te(z) {
|
|
5502
5502
|
return z !== z;
|
|
5503
5503
|
}
|
|
5504
5504
|
const Z = function() {
|
|
@@ -5951,12 +5951,12 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
5951
5951
|
})(typeof self < "u" ? self : typeof window < "u" ? window : c, function() {
|
|
5952
5952
|
var t = "3.7.2", n = t, o = typeof atob == "function", a = typeof btoa == "function", i = typeof vn.Buffer == "function", s = typeof TextDecoder == "function" ? new TextDecoder() : void 0, l = typeof TextEncoder == "function" ? new TextEncoder() : void 0, d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", f = Array.prototype.slice.call(d), m = function(ee) {
|
|
5953
5953
|
var ie = {};
|
|
5954
|
-
return ee.forEach(function(
|
|
5955
|
-
return ie[
|
|
5954
|
+
return ee.forEach(function(ne, me) {
|
|
5955
|
+
return ie[ne] = me;
|
|
5956
5956
|
}), ie;
|
|
5957
5957
|
}(f), p = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/, h = String.fromCharCode.bind(String), y = typeof Uint8Array.from == "function" ? Uint8Array.from.bind(Uint8Array) : function(ee, ie) {
|
|
5958
|
-
return ie === void 0 && (ie = function(
|
|
5959
|
-
return
|
|
5958
|
+
return ie === void 0 && (ie = function(ne) {
|
|
5959
|
+
return ne;
|
|
5960
5960
|
}), new Uint8Array(Array.prototype.slice.call(ee, 0).map(ie));
|
|
5961
5961
|
}, b = function(ee) {
|
|
5962
5962
|
return ee.replace(/=/g, "").replace(/[+\/]/g, function(ie) {
|
|
@@ -5965,10 +5965,10 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
5965
5965
|
}, v = function(ee) {
|
|
5966
5966
|
return ee.replace(/[^A-Za-z0-9\+\/]/g, "");
|
|
5967
5967
|
}, g = function(ee) {
|
|
5968
|
-
for (var ie,
|
|
5969
|
-
if ((
|
|
5968
|
+
for (var ie, ne, me, be, _e = "", xe = ee.length % 3, Ke = 0; Ke < ee.length; ) {
|
|
5969
|
+
if ((ne = ee.charCodeAt(Ke++)) > 255 || (me = ee.charCodeAt(Ke++)) > 255 || (be = ee.charCodeAt(Ke++)) > 255)
|
|
5970
5970
|
throw new TypeError("invalid character found");
|
|
5971
|
-
ie =
|
|
5971
|
+
ie = ne << 16 | me << 8 | be, _e += f[ie >> 18 & 63] + f[ie >> 12 & 63] + f[ie >> 6 & 63] + f[ie & 63];
|
|
5972
5972
|
}
|
|
5973
5973
|
return xe ? _e.slice(0, xe - 3) + "===".substring(xe) : _e;
|
|
5974
5974
|
}, _ = a ? function(ee) {
|
|
@@ -5978,9 +5978,9 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
5978
5978
|
} : g, O = i ? function(ee) {
|
|
5979
5979
|
return vn.Buffer.from(ee).toString("base64");
|
|
5980
5980
|
} : function(ee) {
|
|
5981
|
-
for (var ie = 4096,
|
|
5982
|
-
|
|
5983
|
-
return _(
|
|
5981
|
+
for (var ie = 4096, ne = [], me = 0, be = ee.length; me < be; me += ie)
|
|
5982
|
+
ne.push(h.apply(null, ee.subarray(me, me + ie)));
|
|
5983
|
+
return _(ne.join(""));
|
|
5984
5984
|
}, S = function(ee, ie) {
|
|
5985
5985
|
return ie === void 0 && (ie = !1), ie ? b(O(ee)) : O(ee);
|
|
5986
5986
|
}, j = function(ee) {
|
|
@@ -6006,8 +6006,8 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
6006
6006
|
}, T = /[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g, C = function(ee) {
|
|
6007
6007
|
switch (ee.length) {
|
|
6008
6008
|
case 4:
|
|
6009
|
-
var ie = (7 & ee.charCodeAt(0)) << 18 | (63 & ee.charCodeAt(1)) << 12 | (63 & ee.charCodeAt(2)) << 6 | 63 & ee.charCodeAt(3),
|
|
6010
|
-
return h((
|
|
6009
|
+
var ie = (7 & ee.charCodeAt(0)) << 18 | (63 & ee.charCodeAt(1)) << 12 | (63 & ee.charCodeAt(2)) << 6 | 63 & ee.charCodeAt(3), ne = ie - 65536;
|
|
6010
|
+
return h((ne >>> 10) + 55296) + h((ne & 1023) + 56320);
|
|
6011
6011
|
case 3:
|
|
6012
6012
|
return h((15 & ee.charCodeAt(0)) << 12 | (63 & ee.charCodeAt(1)) << 6 | 63 & ee.charCodeAt(2));
|
|
6013
6013
|
default:
|
|
@@ -6019,9 +6019,9 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
6019
6019
|
if (ee = ee.replace(/\s+/g, ""), !p.test(ee))
|
|
6020
6020
|
throw new TypeError("malformed base64.");
|
|
6021
6021
|
ee += "==".slice(2 - (ee.length & 3));
|
|
6022
|
-
for (var ie,
|
|
6023
|
-
ie = m[ee.charAt(_e++)] << 18 | m[ee.charAt(_e++)] << 12 | (me = m[ee.charAt(_e++)]) << 6 | (be = m[ee.charAt(_e++)]),
|
|
6024
|
-
return
|
|
6022
|
+
for (var ie, ne = "", me, be, _e = 0; _e < ee.length; )
|
|
6023
|
+
ie = m[ee.charAt(_e++)] << 18 | m[ee.charAt(_e++)] << 12 | (me = m[ee.charAt(_e++)]) << 6 | (be = m[ee.charAt(_e++)]), ne += me === 64 ? h(ie >> 16 & 255) : be === 64 ? h(ie >> 16 & 255, ie >> 8 & 255) : h(ie >> 16 & 255, ie >> 8 & 255, ie & 255);
|
|
6024
|
+
return ne;
|
|
6025
6025
|
}, $ = o ? function(ee) {
|
|
6026
6026
|
return atob(v(ee));
|
|
6027
6027
|
} : i ? function(ee) {
|
|
@@ -6059,8 +6059,8 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
6059
6059
|
configurable: !0
|
|
6060
6060
|
};
|
|
6061
6061
|
}, ve = function() {
|
|
6062
|
-
var ee = function(ie,
|
|
6063
|
-
return Object.defineProperty(String.prototype, ie, Q(
|
|
6062
|
+
var ee = function(ie, ne) {
|
|
6063
|
+
return Object.defineProperty(String.prototype, ie, Q(ne));
|
|
6064
6064
|
};
|
|
6065
6065
|
ee("fromBase64", function() {
|
|
6066
6066
|
return F(this);
|
|
@@ -6074,8 +6074,8 @@ var hN = {}, _b = {}, yN = { exports: {} };
|
|
|
6074
6074
|
return A(this);
|
|
6075
6075
|
});
|
|
6076
6076
|
}, le = function() {
|
|
6077
|
-
var ee = function(ie,
|
|
6078
|
-
return Object.defineProperty(Uint8Array.prototype, ie, Q(
|
|
6077
|
+
var ee = function(ie, ne) {
|
|
6078
|
+
return Object.defineProperty(Uint8Array.prototype, ie, Q(ne));
|
|
6079
6079
|
};
|
|
6080
6080
|
ee("toBase64", function(ie) {
|
|
6081
6081
|
return S(this, ie);
|
|
@@ -30537,24 +30537,24 @@ function Wie(e = {}) {
|
|
|
30537
30537
|
});
|
|
30538
30538
|
}
|
|
30539
30539
|
}, g = (H, se) => {
|
|
30540
|
-
(f.isValidating || f.validatingFields) && ((H || Array.from(s.mount)).forEach((
|
|
30541
|
-
|
|
30540
|
+
(f.isValidating || f.validatingFields) && ((H || Array.from(s.mount)).forEach((oe) => {
|
|
30541
|
+
oe && (se ? Gr(t.validatingFields, oe, se) : Yt(t.validatingFields, oe));
|
|
30542
30542
|
}), m.state.next({
|
|
30543
30543
|
validatingFields: t.validatingFields,
|
|
30544
30544
|
isValidating: !Jn(t.validatingFields)
|
|
30545
30545
|
}));
|
|
30546
|
-
}, _ = (H, se = [],
|
|
30547
|
-
if (de &&
|
|
30548
|
-
if (i.action = !0,
|
|
30549
|
-
const Z =
|
|
30546
|
+
}, _ = (H, se = [], oe, de, pe = !0, te = !0) => {
|
|
30547
|
+
if (de && oe) {
|
|
30548
|
+
if (i.action = !0, te && Array.isArray(Ee(n, H))) {
|
|
30549
|
+
const Z = oe(Ee(n, H), de.argA, de.argB);
|
|
30550
30550
|
pe && Gr(n, H, Z);
|
|
30551
30551
|
}
|
|
30552
|
-
if (
|
|
30553
|
-
const Z =
|
|
30552
|
+
if (te && Array.isArray(Ee(t.errors, H))) {
|
|
30553
|
+
const Z = oe(Ee(t.errors, H), de.argA, de.argB);
|
|
30554
30554
|
pe && Gr(t.errors, H, Z), Xie(t.errors, H);
|
|
30555
30555
|
}
|
|
30556
|
-
if (f.touchedFields &&
|
|
30557
|
-
const Z =
|
|
30556
|
+
if (f.touchedFields && te && Array.isArray(Ee(t.touchedFields, H))) {
|
|
30557
|
+
const Z = oe(Ee(t.touchedFields, H), de.argA, de.argB);
|
|
30558
30558
|
pe && Gr(t.touchedFields, H, Z);
|
|
30559
30559
|
}
|
|
30560
30560
|
f.dirtyFields && (t.dirtyFields = Qp(o, a)), m.state.next({
|
|
@@ -30575,33 +30575,33 @@ function Wie(e = {}) {
|
|
|
30575
30575
|
errors: t.errors,
|
|
30576
30576
|
isValid: !1
|
|
30577
30577
|
});
|
|
30578
|
-
}, j = (H, se,
|
|
30578
|
+
}, j = (H, se, oe, de) => {
|
|
30579
30579
|
const pe = Ee(n, H);
|
|
30580
30580
|
if (pe) {
|
|
30581
|
-
const
|
|
30582
|
-
nt(
|
|
30581
|
+
const te = Ee(a, H, nt(oe) ? Ee(o, H) : oe);
|
|
30582
|
+
nt(te) || de && de.defaultChecked || se ? Gr(a, H, se ? te : X0(pe._f)) : $(H, te), i.mount && v();
|
|
30583
30583
|
}
|
|
30584
|
-
}, E = (H, se,
|
|
30585
|
-
let
|
|
30584
|
+
}, E = (H, se, oe, de, pe) => {
|
|
30585
|
+
let te = !1, Z = !1;
|
|
30586
30586
|
const ue = {
|
|
30587
30587
|
name: H
|
|
30588
30588
|
}, ge = !!(Ee(n, H) && Ee(n, H)._f.disabled);
|
|
30589
|
-
if (!
|
|
30590
|
-
f.isDirty && (Z = t.isDirty, t.isDirty = ue.isDirty = C(),
|
|
30589
|
+
if (!oe || de) {
|
|
30590
|
+
f.isDirty && (Z = t.isDirty, t.isDirty = ue.isDirty = C(), te = Z !== ue.isDirty);
|
|
30591
30591
|
const z = ge || gs(Ee(o, H), se);
|
|
30592
|
-
Z = !!(!ge && Ee(t.dirtyFields, H)), z || ge ? Yt(t.dirtyFields, H) : Gr(t.dirtyFields, H, !0), ue.dirtyFields = t.dirtyFields,
|
|
30592
|
+
Z = !!(!ge && Ee(t.dirtyFields, H)), z || ge ? Yt(t.dirtyFields, H) : Gr(t.dirtyFields, H, !0), ue.dirtyFields = t.dirtyFields, te = te || f.dirtyFields && Z !== !z;
|
|
30593
30593
|
}
|
|
30594
|
-
if (
|
|
30594
|
+
if (oe) {
|
|
30595
30595
|
const z = Ee(t.touchedFields, H);
|
|
30596
|
-
z || (Gr(t.touchedFields, H,
|
|
30596
|
+
z || (Gr(t.touchedFields, H, oe), ue.touchedFields = t.touchedFields, te = te || f.touchedFields && z !== oe);
|
|
30597
30597
|
}
|
|
30598
|
-
return
|
|
30599
|
-
}, D = (H, se,
|
|
30600
|
-
const pe = Ee(t.errors, H),
|
|
30601
|
-
if (e.delayError &&
|
|
30598
|
+
return te && pe && m.state.next(ue), te ? ue : {};
|
|
30599
|
+
}, D = (H, se, oe, de) => {
|
|
30600
|
+
const pe = Ee(t.errors, H), te = f.isValid && ko(se) && t.isValid !== se;
|
|
30601
|
+
if (e.delayError && oe ? (l = b(() => O(H, oe)), l(e.delayError)) : (clearTimeout(d), l = null, oe ? Gr(t.errors, H, oe) : Yt(t.errors, H)), (oe ? !gs(pe, oe) : pe) || !Jn(de) || te) {
|
|
30602
30602
|
const Z = {
|
|
30603
30603
|
...de,
|
|
30604
|
-
...
|
|
30604
|
+
...te && ko(se) ? { isValid: se } : {},
|
|
30605
30605
|
errors: t.errors,
|
|
30606
30606
|
name: H
|
|
30607
30607
|
};
|
|
@@ -30617,121 +30617,121 @@ function Wie(e = {}) {
|
|
|
30617
30617
|
}, P = async (H) => {
|
|
30618
30618
|
const { errors: se } = await M(H);
|
|
30619
30619
|
if (H)
|
|
30620
|
-
for (const
|
|
30621
|
-
const de = Ee(se,
|
|
30622
|
-
de ? Gr(t.errors,
|
|
30620
|
+
for (const oe of H) {
|
|
30621
|
+
const de = Ee(se, oe);
|
|
30622
|
+
de ? Gr(t.errors, oe, de) : Yt(t.errors, oe);
|
|
30623
30623
|
}
|
|
30624
30624
|
else
|
|
30625
30625
|
t.errors = se;
|
|
30626
30626
|
return se;
|
|
30627
|
-
}, U = async (H, se,
|
|
30627
|
+
}, U = async (H, se, oe = {
|
|
30628
30628
|
valid: !0
|
|
30629
30629
|
}) => {
|
|
30630
30630
|
for (const de in H) {
|
|
30631
30631
|
const pe = H[de];
|
|
30632
30632
|
if (pe) {
|
|
30633
|
-
const { _f:
|
|
30634
|
-
if (
|
|
30635
|
-
const ue = s.array.has(
|
|
30633
|
+
const { _f: te, ...Z } = pe;
|
|
30634
|
+
if (te) {
|
|
30635
|
+
const ue = s.array.has(te.name);
|
|
30636
30636
|
g([de], !0);
|
|
30637
30637
|
const ge = await J_(pe, a, y, r.shouldUseNativeValidation && !se, ue);
|
|
30638
|
-
if (g([de]), ge[
|
|
30638
|
+
if (g([de]), ge[te.name] && (oe.valid = !1, se))
|
|
30639
30639
|
break;
|
|
30640
|
-
!se && (Ee(ge,
|
|
30640
|
+
!se && (Ee(ge, te.name) ? ue ? SI(t.errors, ge, te.name) : Gr(t.errors, te.name, ge[te.name]) : Yt(t.errors, te.name));
|
|
30641
30641
|
}
|
|
30642
|
-
Z && await U(Z, se,
|
|
30642
|
+
Z && await U(Z, se, oe);
|
|
30643
30643
|
}
|
|
30644
30644
|
}
|
|
30645
|
-
return
|
|
30645
|
+
return oe.valid;
|
|
30646
30646
|
}, T = () => {
|
|
30647
30647
|
for (const H of s.unMount) {
|
|
30648
30648
|
const se = Ee(n, H);
|
|
30649
|
-
se && (se._f.refs ? se._f.refs.every((
|
|
30649
|
+
se && (se._f.refs ? se._f.refs.every((oe) => !H0(oe)) : !H0(se._f.ref)) && he(H);
|
|
30650
30650
|
}
|
|
30651
30651
|
s.unMount = /* @__PURE__ */ new Set();
|
|
30652
|
-
}, C = (H, se) => (H && se && Gr(a, H, se), !gs(G(), o)), N = (H, se,
|
|
30652
|
+
}, C = (H, se) => (H && se && Gr(a, H, se), !gs(G(), o)), N = (H, se, oe) => MI(H, s, {
|
|
30653
30653
|
...i.mount ? a : nt(se) ? o : na(H) ? { [H]: se } : se
|
|
30654
|
-
},
|
|
30654
|
+
}, oe, se), V = (H) => Bu(Ee(i.mount ? a : o, H, e.shouldUnregister ? Ee(o, H, []) : [])), $ = (H, se, oe = {}) => {
|
|
30655
30655
|
const de = Ee(n, H);
|
|
30656
30656
|
let pe = se;
|
|
30657
30657
|
if (de) {
|
|
30658
|
-
const
|
|
30659
|
-
|
|
30658
|
+
const te = de._f;
|
|
30659
|
+
te && (!te.disabled && Gr(a, H, CI(se, te)), pe = Yh(te.ref) && Ln(se) ? "" : se, TI(te.ref) ? [...te.ref.options].forEach((Z) => Z.selected = pe.includes(Z.value)) : te.refs ? Vm(te.ref) ? te.refs.length > 1 ? te.refs.forEach((Z) => (!Z.defaultChecked || !Z.disabled) && (Z.checked = Array.isArray(pe) ? !!pe.find((ue) => ue === Z.value) : pe === Z.value)) : te.refs[0] && (te.refs[0].checked = !!pe) : te.refs.forEach((Z) => Z.checked = Z.value === pe) : Yj(te.ref) ? te.ref.value = "" : (te.ref.value = pe, te.ref.type || m.values.next({
|
|
30660
30660
|
name: H,
|
|
30661
30661
|
values: { ...a }
|
|
30662
30662
|
})));
|
|
30663
30663
|
}
|
|
30664
|
-
(
|
|
30665
|
-
}, I = (H, se,
|
|
30664
|
+
(oe.shouldDirty || oe.shouldTouch) && E(H, pe, oe.shouldTouch, oe.shouldDirty, !0), oe.shouldValidate && F(H);
|
|
30665
|
+
}, I = (H, se, oe) => {
|
|
30666
30666
|
for (const de in se) {
|
|
30667
|
-
const pe = se[de],
|
|
30668
|
-
(s.array.has(H) || !Gh(pe) || Z && !Z._f) && !Tc(pe) ? I(
|
|
30667
|
+
const pe = se[de], te = `${H}.${de}`, Z = Ee(n, te);
|
|
30668
|
+
(s.array.has(H) || !Gh(pe) || Z && !Z._f) && !Tc(pe) ? I(te, pe, oe) : $(te, pe, oe);
|
|
30669
30669
|
}
|
|
30670
|
-
}, A = (H, se,
|
|
30671
|
-
const de = Ee(n, H), pe = s.array.has(H),
|
|
30672
|
-
Gr(a, H,
|
|
30670
|
+
}, A = (H, se, oe = {}) => {
|
|
30671
|
+
const de = Ee(n, H), pe = s.array.has(H), te = qt(se);
|
|
30672
|
+
Gr(a, H, te), pe ? (m.array.next({
|
|
30673
30673
|
name: H,
|
|
30674
30674
|
values: { ...a }
|
|
30675
|
-
}), (f.isDirty || f.dirtyFields) &&
|
|
30675
|
+
}), (f.isDirty || f.dirtyFields) && oe.shouldDirty && m.state.next({
|
|
30676
30676
|
name: H,
|
|
30677
30677
|
dirtyFields: Qp(o, a),
|
|
30678
|
-
isDirty: C(H,
|
|
30679
|
-
})) : de && !de._f && !Ln(
|
|
30678
|
+
isDirty: C(H, te)
|
|
30679
|
+
})) : de && !de._f && !Ln(te) ? I(H, te, oe) : $(H, te, oe), q_(H, s) && m.state.next({ ...t }), m.values.next({
|
|
30680
30680
|
name: i.mount ? H : void 0,
|
|
30681
30681
|
values: { ...a }
|
|
30682
30682
|
});
|
|
30683
30683
|
}, X = async (H) => {
|
|
30684
30684
|
i.mount = !0;
|
|
30685
30685
|
const se = H.target;
|
|
30686
|
-
let
|
|
30687
|
-
const pe = Ee(n,
|
|
30688
|
-
de = Number.isNaN(ue) || ue === Ee(a,
|
|
30686
|
+
let oe = se.name, de = !0;
|
|
30687
|
+
const pe = Ee(n, oe), te = () => se.type ? X0(pe._f) : vI(H), Z = (ue) => {
|
|
30688
|
+
de = Number.isNaN(ue) || ue === Ee(a, oe, ue);
|
|
30689
30689
|
};
|
|
30690
30690
|
if (pe) {
|
|
30691
30691
|
let ue, ge;
|
|
30692
|
-
const z =
|
|
30693
|
-
Gr(a,
|
|
30694
|
-
const re = E(
|
|
30692
|
+
const z = te(), w = H.type === Xh.BLUR || H.type === Xh.FOCUS_OUT, x = !Kie(pe._f) && !r.resolver && !Ee(t.errors, oe) && !pe._f.deps || Hie(w, Ee(t.touchedFields, oe), t.isSubmitted, h, p), B = q_(oe, s, w);
|
|
30693
|
+
Gr(a, oe, z), w ? (pe._f.onBlur && pe._f.onBlur(H), l && l(0)) : pe._f.onChange && pe._f.onChange(H);
|
|
30694
|
+
const re = E(oe, z, w, !1), fe = !Jn(re) || B;
|
|
30695
30695
|
if (!w && m.values.next({
|
|
30696
|
-
name:
|
|
30696
|
+
name: oe,
|
|
30697
30697
|
type: H.type,
|
|
30698
30698
|
values: { ...a }
|
|
30699
30699
|
}), x)
|
|
30700
|
-
return f.isValid && v(), fe && m.state.next({ name:
|
|
30700
|
+
return f.isValid && v(), fe && m.state.next({ name: oe, ...B ? {} : re });
|
|
30701
30701
|
if (!w && B && m.state.next({ ...t }), r.resolver) {
|
|
30702
|
-
const { errors: k } = await M([
|
|
30702
|
+
const { errors: k } = await M([oe]);
|
|
30703
30703
|
if (Z(z), de) {
|
|
30704
|
-
const Ue = AS(t.errors, n,
|
|
30705
|
-
ue = Xe.error,
|
|
30704
|
+
const Ue = AS(t.errors, n, oe), Xe = AS(k, n, Ue.name || oe);
|
|
30705
|
+
ue = Xe.error, oe = Xe.name, ge = Jn(k);
|
|
30706
30706
|
}
|
|
30707
30707
|
} else
|
|
30708
|
-
g([
|
|
30709
|
-
de && (pe._f.deps && F(pe._f.deps), D(
|
|
30708
|
+
g([oe], !0), ue = (await J_(pe, a, y, r.shouldUseNativeValidation))[oe], g([oe]), Z(z), de && (ue ? ge = !1 : f.isValid && (ge = await U(n, !0)));
|
|
30709
|
+
de && (pe._f.deps && F(pe._f.deps), D(oe, ge, ue, re));
|
|
30710
30710
|
}
|
|
30711
30711
|
}, W = (H, se) => {
|
|
30712
30712
|
if (Ee(t.errors, se) && H.focus)
|
|
30713
30713
|
return H.focus(), 1;
|
|
30714
30714
|
}, F = async (H, se = {}) => {
|
|
30715
|
-
let
|
|
30715
|
+
let oe, de;
|
|
30716
30716
|
const pe = co(H);
|
|
30717
30717
|
if (r.resolver) {
|
|
30718
|
-
const
|
|
30719
|
-
|
|
30718
|
+
const te = await P(nt(H) ? H : pe);
|
|
30719
|
+
oe = Jn(te), de = H ? !pe.some((Z) => Ee(te, Z)) : oe;
|
|
30720
30720
|
} else
|
|
30721
|
-
H ? (de = (await Promise.all(pe.map(async (
|
|
30722
|
-
const Z = Ee(n,
|
|
30723
|
-
return await U(Z && Z._f ? { [
|
|
30724
|
-
}))).every(Boolean), !(!de && !t.isValid) && v()) : de =
|
|
30721
|
+
H ? (de = (await Promise.all(pe.map(async (te) => {
|
|
30722
|
+
const Z = Ee(n, te);
|
|
30723
|
+
return await U(Z && Z._f ? { [te]: Z } : Z);
|
|
30724
|
+
}))).every(Boolean), !(!de && !t.isValid) && v()) : de = oe = await U(n);
|
|
30725
30725
|
return m.state.next({
|
|
30726
|
-
...!na(H) || f.isValid &&
|
|
30727
|
-
...r.resolver || !H ? { isValid:
|
|
30726
|
+
...!na(H) || f.isValid && oe !== t.isValid ? {} : { name: H },
|
|
30727
|
+
...r.resolver || !H ? { isValid: oe } : {},
|
|
30728
30728
|
errors: t.errors
|
|
30729
30729
|
}), se.shouldFocus && !de && Fc(n, W, H ? pe : s.mount), de;
|
|
30730
30730
|
}, G = (H) => {
|
|
30731
30731
|
const se = {
|
|
30732
30732
|
...i.mount ? a : o
|
|
30733
30733
|
};
|
|
30734
|
-
return nt(H) ? se : na(H) ? Ee(se, H) : H.map((
|
|
30734
|
+
return nt(H) ? se : na(H) ? Ee(se, H) : H.map((oe) => Ee(se, oe));
|
|
30735
30735
|
}, Q = (H, se) => ({
|
|
30736
30736
|
invalid: !!Ee((se || t).errors, H),
|
|
30737
30737
|
isDirty: !!Ee((se || t).dirtyFields, H),
|
|
@@ -30742,8 +30742,8 @@ function Wie(e = {}) {
|
|
|
30742
30742
|
H && co(H).forEach((se) => Yt(t.errors, se)), m.state.next({
|
|
30743
30743
|
errors: H ? t.errors : {}
|
|
30744
30744
|
});
|
|
30745
|
-
}, le = (H, se,
|
|
30746
|
-
const de = (Ee(n, H, { _f: {} })._f || {}).ref, pe = Ee(t.errors, H) || {}, { ref:
|
|
30745
|
+
}, le = (H, se, oe) => {
|
|
30746
|
+
const de = (Ee(n, H, { _f: {} })._f || {}).ref, pe = Ee(t.errors, H) || {}, { ref: te, message: Z, type: ue, ...ge } = pe;
|
|
30747
30747
|
Gr(t.errors, H, {
|
|
30748
30748
|
...ge,
|
|
30749
30749
|
...se,
|
|
@@ -30752,36 +30752,36 @@ function Wie(e = {}) {
|
|
|
30752
30752
|
name: H,
|
|
30753
30753
|
errors: t.errors,
|
|
30754
30754
|
isValid: !1
|
|
30755
|
-
}),
|
|
30755
|
+
}), oe && oe.shouldFocus && de && de.focus && de.focus();
|
|
30756
30756
|
}, ce = (H, se) => wi(H) ? m.values.subscribe({
|
|
30757
|
-
next: (
|
|
30757
|
+
next: (oe) => H(N(void 0, se), oe)
|
|
30758
30758
|
}) : N(H, se, !0), he = (H, se = {}) => {
|
|
30759
|
-
for (const
|
|
30760
|
-
s.mount.delete(
|
|
30759
|
+
for (const oe of H ? co(H) : s.mount)
|
|
30760
|
+
s.mount.delete(oe), s.array.delete(oe), se.keepValue || (Yt(n, oe), Yt(a, oe)), !se.keepError && Yt(t.errors, oe), !se.keepDirty && Yt(t.dirtyFields, oe), !se.keepTouched && Yt(t.touchedFields, oe), !se.keepIsValidating && Yt(t.validatingFields, oe), !r.shouldUnregister && !se.keepDefaultValue && Yt(o, oe);
|
|
30761
30761
|
m.values.next({
|
|
30762
30762
|
values: { ...a }
|
|
30763
30763
|
}), m.state.next({
|
|
30764
30764
|
...t,
|
|
30765
30765
|
...se.keepDirty ? { isDirty: C() } : {}
|
|
30766
30766
|
}), !se.keepIsValid && v();
|
|
30767
|
-
}, ee = ({ disabled: H, name: se, field:
|
|
30767
|
+
}, ee = ({ disabled: H, name: se, field: oe, fields: de, value: pe }) => {
|
|
30768
30768
|
if (ko(H) && i.mount || H) {
|
|
30769
|
-
const
|
|
30770
|
-
Gr(a, se,
|
|
30769
|
+
const te = H ? void 0 : nt(pe) ? X0(oe ? oe._f : Ee(de, se)._f) : pe;
|
|
30770
|
+
Gr(a, se, te), E(se, te, !1, !1, !0);
|
|
30771
30771
|
}
|
|
30772
30772
|
}, ie = (H, se = {}) => {
|
|
30773
|
-
let
|
|
30773
|
+
let oe = Ee(n, H);
|
|
30774
30774
|
const de = ko(se.disabled);
|
|
30775
30775
|
return Gr(n, H, {
|
|
30776
|
-
...
|
|
30776
|
+
...oe || {},
|
|
30777
30777
|
_f: {
|
|
30778
|
-
...
|
|
30778
|
+
...oe && oe._f ? oe._f : { ref: { name: H } },
|
|
30779
30779
|
name: H,
|
|
30780
30780
|
mount: !0,
|
|
30781
30781
|
...se
|
|
30782
30782
|
}
|
|
30783
|
-
}), s.mount.add(H),
|
|
30784
|
-
field:
|
|
30783
|
+
}), s.mount.add(H), oe ? ee({
|
|
30784
|
+
field: oe,
|
|
30785
30785
|
disabled: se.disabled,
|
|
30786
30786
|
name: H,
|
|
30787
30787
|
value: se.value
|
|
@@ -30800,43 +30800,43 @@ function Wie(e = {}) {
|
|
|
30800
30800
|
onBlur: X,
|
|
30801
30801
|
ref: (pe) => {
|
|
30802
30802
|
if (pe) {
|
|
30803
|
-
ie(H, se),
|
|
30804
|
-
const
|
|
30805
|
-
if (Z ? ue.find((ge) => ge ===
|
|
30803
|
+
ie(H, se), oe = Ee(n, H);
|
|
30804
|
+
const te = nt(pe.value) && pe.querySelectorAll && pe.querySelectorAll("input,select,textarea")[0] || pe, Z = Vie(te), ue = oe._f.refs || [];
|
|
30805
|
+
if (Z ? ue.find((ge) => ge === te) : te === oe._f.ref)
|
|
30806
30806
|
return;
|
|
30807
30807
|
Gr(n, H, {
|
|
30808
30808
|
_f: {
|
|
30809
|
-
...
|
|
30809
|
+
...oe._f,
|
|
30810
30810
|
...Z ? {
|
|
30811
30811
|
refs: [
|
|
30812
30812
|
...ue.filter(H0),
|
|
30813
|
-
|
|
30813
|
+
te,
|
|
30814
30814
|
...Array.isArray(Ee(o, H)) ? [{}] : []
|
|
30815
30815
|
],
|
|
30816
|
-
ref: { type:
|
|
30817
|
-
} : { ref:
|
|
30816
|
+
ref: { type: te.type, name: H }
|
|
30817
|
+
} : { ref: te }
|
|
30818
30818
|
}
|
|
30819
|
-
}), j(H, !1, void 0,
|
|
30819
|
+
}), j(H, !1, void 0, te);
|
|
30820
30820
|
} else
|
|
30821
|
-
|
|
30821
|
+
oe = Ee(n, H, {}), oe._f && (oe._f.mount = !1), (r.shouldUnregister || se.shouldUnregister) && !(gI(s.array, H) && i.action) && s.unMount.add(H);
|
|
30822
30822
|
}
|
|
30823
30823
|
};
|
|
30824
|
-
},
|
|
30825
|
-
ko(H) && (m.state.next({ disabled: H }), Fc(n, (se,
|
|
30826
|
-
const de = Ee(n,
|
|
30824
|
+
}, ne = () => r.shouldFocusError && Fc(n, W, s.mount), me = (H) => {
|
|
30825
|
+
ko(H) && (m.state.next({ disabled: H }), Fc(n, (se, oe) => {
|
|
30826
|
+
const de = Ee(n, oe);
|
|
30827
30827
|
de && (se.disabled = de._f.disabled || H, Array.isArray(de._f.refs) && de._f.refs.forEach((pe) => {
|
|
30828
30828
|
pe.disabled = de._f.disabled || H;
|
|
30829
30829
|
}));
|
|
30830
30830
|
}, 0, !1));
|
|
30831
|
-
}, be = (H, se) => async (
|
|
30831
|
+
}, be = (H, se) => async (oe) => {
|
|
30832
30832
|
let de;
|
|
30833
|
-
|
|
30833
|
+
oe && (oe.preventDefault && oe.preventDefault(), oe.persist && oe.persist());
|
|
30834
30834
|
let pe = qt(a);
|
|
30835
30835
|
if (m.state.next({
|
|
30836
30836
|
isSubmitting: !0
|
|
30837
30837
|
}), r.resolver) {
|
|
30838
|
-
const { errors:
|
|
30839
|
-
t.errors =
|
|
30838
|
+
const { errors: te, values: Z } = await M();
|
|
30839
|
+
t.errors = te, pe = Z;
|
|
30840
30840
|
} else
|
|
30841
30841
|
await U(n);
|
|
30842
30842
|
if (Yt(t.errors, "root"), Jn(t.errors)) {
|
|
@@ -30844,12 +30844,12 @@ function Wie(e = {}) {
|
|
|
30844
30844
|
errors: {}
|
|
30845
30845
|
});
|
|
30846
30846
|
try {
|
|
30847
|
-
await H(pe,
|
|
30848
|
-
} catch (
|
|
30849
|
-
de =
|
|
30847
|
+
await H(pe, oe);
|
|
30848
|
+
} catch (te) {
|
|
30849
|
+
de = te;
|
|
30850
30850
|
}
|
|
30851
30851
|
} else
|
|
30852
|
-
se && await se({ ...t.errors },
|
|
30852
|
+
se && await se({ ...t.errors }, oe), ne(), setTimeout(ne);
|
|
30853
30853
|
if (m.state.next({
|
|
30854
30854
|
isSubmitted: !0,
|
|
30855
30855
|
isSubmitting: !1,
|
|
@@ -30861,11 +30861,11 @@ function Wie(e = {}) {
|
|
|
30861
30861
|
}, _e = (H, se = {}) => {
|
|
30862
30862
|
Ee(n, H) && (nt(se.defaultValue) ? A(H, qt(Ee(o, H))) : (A(H, se.defaultValue), Gr(o, H, qt(se.defaultValue))), se.keepTouched || Yt(t.touchedFields, H), se.keepDirty || (Yt(t.dirtyFields, H), t.isDirty = se.defaultValue ? C(H, qt(Ee(o, H))) : C()), se.keepError || (Yt(t.errors, H), f.isValid && v()), m.state.next({ ...t }));
|
|
30863
30863
|
}, xe = (H, se = {}) => {
|
|
30864
|
-
const
|
|
30865
|
-
if (se.keepDefaultValues || (o =
|
|
30864
|
+
const oe = H ? qt(H) : o, de = qt(oe), pe = Jn(H), te = pe ? o : de;
|
|
30865
|
+
if (se.keepDefaultValues || (o = oe), !se.keepValues) {
|
|
30866
30866
|
if (se.keepDirtyValues)
|
|
30867
30867
|
for (const Z of s.mount)
|
|
30868
|
-
Ee(t.dirtyFields, Z) ? Gr(
|
|
30868
|
+
Ee(t.dirtyFields, Z) ? Gr(te, Z, Ee(a, Z)) : A(Z, Ee(te, Z));
|
|
30869
30869
|
else {
|
|
30870
30870
|
if (Hj && nt(H))
|
|
30871
30871
|
for (const Z of s.mount) {
|
|
@@ -30883,10 +30883,10 @@ function Wie(e = {}) {
|
|
|
30883
30883
|
}
|
|
30884
30884
|
n = {};
|
|
30885
30885
|
}
|
|
30886
|
-
a = e.shouldUnregister ? se.keepDefaultValues ? qt(o) : {} : qt(
|
|
30887
|
-
values: { ...
|
|
30886
|
+
a = e.shouldUnregister ? se.keepDefaultValues ? qt(o) : {} : qt(te), m.array.next({
|
|
30887
|
+
values: { ...te }
|
|
30888
30888
|
}), m.values.next({
|
|
30889
|
-
values: { ...
|
|
30889
|
+
values: { ...te }
|
|
30890
30890
|
});
|
|
30891
30891
|
}
|
|
30892
30892
|
s = {
|
|
@@ -30987,7 +30987,7 @@ function Wie(e = {}) {
|
|
|
30987
30987
|
unregister: he,
|
|
30988
30988
|
setError: le,
|
|
30989
30989
|
setFocus: (H, se = {}) => {
|
|
30990
|
-
const
|
|
30990
|
+
const oe = Ee(n, H), de = oe && oe._f;
|
|
30991
30991
|
if (de) {
|
|
30992
30992
|
const pe = de.refs ? de.refs[0] : de.ref;
|
|
30993
30993
|
pe.focus && (pe.focus(), se.shouldSelect && pe.select());
|
|
@@ -33182,14 +33182,14 @@ function Lse(e, r) {
|
|
|
33182
33182
|
}
|
|
33183
33183
|
let Kse = fr;
|
|
33184
33184
|
function Hse(e, r) {
|
|
33185
|
-
let { value: t, defaultValue: n, onChange: o, form: a, name: i, by: s = null, disabled: l = !1, __demoMode: d = !1, nullable: f = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, ...y } = e, b = !1, v = null, [g = m ? [] : void 0, _] = FI(t, o, n), [O, S] = su(Lse, { dataRef: Vc(), comboboxState: d ? 0 : 1, options: [], virtual: null, activeOptionIndex: null, activationTrigger: 2, labelId: null }), j = Ce(!1), E = Ce({ static: !1, hold: !1 }), D = Ce(null), M = Ce(null), P = Ce(null), U = Ce(null), T = Se(typeof s == "string" ? (
|
|
33185
|
+
let { value: t, defaultValue: n, onChange: o, form: a, name: i, by: s = null, disabled: l = !1, __demoMode: d = !1, nullable: f = !1, multiple: m = !1, immediate: p = !1, virtual: h = null, ...y } = e, b = !1, v = null, [g = m ? [] : void 0, _] = FI(t, o, n), [O, S] = su(Lse, { dataRef: Vc(), comboboxState: d ? 0 : 1, options: [], virtual: null, activeOptionIndex: null, activationTrigger: 2, labelId: null }), j = Ce(!1), E = Ce({ static: !1, hold: !1 }), D = Ce(null), M = Ce(null), P = Ce(null), U = Ce(null), T = Se(typeof s == "string" ? (ne, me) => {
|
|
33186
33186
|
let be = s;
|
|
33187
|
-
return (
|
|
33188
|
-
} : s ?? ((
|
|
33187
|
+
return (ne == null ? void 0 : ne[be]) === (me == null ? void 0 : me[be]);
|
|
33188
|
+
} : s ?? ((ne, me) => ne === me)), C = Se((ne) => O.options.findIndex((me) => T(me.dataRef.current.value, ne))), N = It((ne) => $r($.mode, { 1: () => g.some((me) => T(me, ne)), 0: () => T(g, ne) }), [g]), V = Se((ne) => O.activeOptionIndex === C(ne)), $ = lr(() => ({ ...O, immediate: b, optionsPropsRef: E, labelRef: D, inputRef: M, buttonRef: P, optionsRef: U, value: g, defaultValue: n, disabled: l, mode: m ? 1 : 0, virtual: O.virtual, get activeOptionIndex() {
|
|
33189
33189
|
if (j.current && O.activeOptionIndex === null && O.options.length > 0) {
|
|
33190
|
-
let
|
|
33191
|
-
if (
|
|
33192
|
-
return
|
|
33190
|
+
let ne = O.options.findIndex((me) => !me.dataRef.current.disabled);
|
|
33191
|
+
if (ne !== -1)
|
|
33192
|
+
return ne;
|
|
33193
33193
|
}
|
|
33194
33194
|
return O.activeOptionIndex;
|
|
33195
33195
|
}, calculateIndex: C, compare: T, isSelected: N, isActive: V, nullable: f, __demoMode: d }), [g, n, l, m, f, d, O, v]);
|
|
@@ -33198,15 +33198,15 @@ function Hse(e, r) {
|
|
|
33198
33198
|
O.dataRef.current = $;
|
|
33199
33199
|
}, [$]), tw([$.buttonRef, $.inputRef, $.optionsRef], () => ce.closeCombobox(), $.comboboxState === 0);
|
|
33200
33200
|
let I = lr(() => {
|
|
33201
|
-
var
|
|
33202
|
-
return { open: $.comboboxState === 0, disabled: l, activeIndex: $.activeOptionIndex, activeOption: $.activeOptionIndex === null ? null : $.virtual ? $.virtual.options[(
|
|
33201
|
+
var ne, me, be;
|
|
33202
|
+
return { open: $.comboboxState === 0, disabled: l, activeIndex: $.activeOptionIndex, activeOption: $.activeOptionIndex === null ? null : $.virtual ? $.virtual.options[(ne = $.activeOptionIndex) != null ? ne : 0] : (be = (me = $.options[$.activeOptionIndex]) == null ? void 0 : me.dataRef.current.value) != null ? be : null, value: g };
|
|
33203
33203
|
}, [$, l, g]), A = Se(() => {
|
|
33204
33204
|
if ($.activeOptionIndex !== null) {
|
|
33205
33205
|
if ($.virtual)
|
|
33206
33206
|
ve($.virtual.options[$.activeOptionIndex]);
|
|
33207
33207
|
else {
|
|
33208
|
-
let { dataRef:
|
|
33209
|
-
ve(
|
|
33208
|
+
let { dataRef: ne } = $.options[$.activeOptionIndex];
|
|
33209
|
+
ve(ne.current.value);
|
|
33210
33210
|
}
|
|
33211
33211
|
ce.goToOption(ur.Specific, $.activeOptionIndex);
|
|
33212
33212
|
}
|
|
@@ -33214,24 +33214,24 @@ function Hse(e, r) {
|
|
|
33214
33214
|
S({ type: 0 }), j.current = !0;
|
|
33215
33215
|
}), W = Se(() => {
|
|
33216
33216
|
S({ type: 1 }), j.current = !1;
|
|
33217
|
-
}), F = Se((
|
|
33218
|
-
$.isActive(me.current.value) && (j.current = !0), S({ type: 4, id:
|
|
33219
|
-
})), Q = Se((
|
|
33220
|
-
return _ == null ? void 0 : _(
|
|
33217
|
+
}), F = Se((ne, me, be) => (j.current = !1, ne === ur.Specific ? S({ type: 2, focus: ur.Specific, idx: me, trigger: be }) : S({ type: 2, focus: ne, trigger: be }))), G = Se((ne, me) => (S({ type: 3, payload: { id: ne, dataRef: me } }), () => {
|
|
33218
|
+
$.isActive(me.current.value) && (j.current = !0), S({ type: 4, id: ne });
|
|
33219
|
+
})), Q = Se((ne) => (S({ type: 5, id: ne }), () => S({ type: 5, id: null }))), ve = Se((ne) => $r($.mode, { 0() {
|
|
33220
|
+
return _ == null ? void 0 : _(ne);
|
|
33221
33221
|
}, 1() {
|
|
33222
|
-
let me = $.value.slice(), be = me.findIndex((_e) => T(_e,
|
|
33223
|
-
return be === -1 ? me.push(
|
|
33224
|
-
} })), le = Se((
|
|
33225
|
-
S({ type: 6, trigger:
|
|
33222
|
+
let me = $.value.slice(), be = me.findIndex((_e) => T(_e, ne));
|
|
33223
|
+
return be === -1 ? me.push(ne) : me.splice(be, 1), _ == null ? void 0 : _(me);
|
|
33224
|
+
} })), le = Se((ne) => {
|
|
33225
|
+
S({ type: 6, trigger: ne });
|
|
33226
33226
|
}), ce = lr(() => ({ onChange: ve, registerOption: G, registerLabel: Q, goToOption: F, closeCombobox: W, openCombobox: X, setActivationTrigger: le, selectActiveOption: A }), []), he = r === null ? {} : { ref: r }, ee = Ce(null), ie = Po();
|
|
33227
33227
|
return ye(() => {
|
|
33228
33228
|
ee.current && n !== void 0 && ie.addEventListener(ee.current, "reset", () => {
|
|
33229
33229
|
_ == null || _(n);
|
|
33230
33230
|
});
|
|
33231
|
-
}, [ee, _]), L.createElement(Zj.Provider, { value: ce }, L.createElement(kj.Provider, { value: $ }, L.createElement(nw, { value: $r($.comboboxState, { 0: ut.Open, 1: ut.Closed }) }, i != null && g != null && Qj({ [i]: g }).map(([
|
|
33231
|
+
}, [ee, _]), L.createElement(Zj.Provider, { value: ce }, L.createElement(kj.Provider, { value: $ }, L.createElement(nw, { value: $r($.comboboxState, { 0: ut.Open, 1: ut.Closed }) }, i != null && g != null && Qj({ [i]: g }).map(([ne, me], be) => L.createElement(dd, { features: Jc.Hidden, ref: be === 0 ? (_e) => {
|
|
33232
33232
|
var xe;
|
|
33233
33233
|
ee.current = (xe = _e == null ? void 0 : _e.closest("form")) != null ? xe : null;
|
|
33234
|
-
} : void 0, ...Zh({ key:
|
|
33234
|
+
} : void 0, ...Zh({ key: ne, as: "input", type: "hidden", hidden: !0, readOnly: !0, form: a, disabled: l, name: ne, value: me }) })), rt({ ourProps: he, theirProps: y, slot: I, defaultTag: Kse, name: "Combobox" }))));
|
|
33235
33235
|
}
|
|
33236
33236
|
let Xse = "input";
|
|
33237
33237
|
function Yse(e, r) {
|
|
@@ -33935,10 +33935,10 @@ function aue(e, r) {
|
|
|
33935
33935
|
});
|
|
33936
33936
|
return be.observe(y.current), () => be.disconnect();
|
|
33937
33937
|
}, [O, y, E]);
|
|
33938
|
-
let [he, ee] = Wce(), ie = lr(() => [{ dialogState: O, close: E, setTitleId: D }, S], [O, S, E, D]),
|
|
33938
|
+
let [he, ee] = Wce(), ie = lr(() => [{ dialogState: O, close: E, setTitleId: D }, S], [O, S, E, D]), ne = lr(() => ({ open: O === 0 }), [O]), me = { ref: b, id: n, role: s, "aria-modal": O === 0 ? !0 : void 0, "aria-labelledby": S.titleId, "aria-describedby": he };
|
|
33939
33939
|
return L.createElement(Yce, { type: "Dialog", enabled: O === 0, element: y, onUpdate: Se((be, _e) => {
|
|
33940
33940
|
_e === "Dialog" && $r(be, { [tO.Add]: () => m((xe) => xe + 1), [tO.Remove]: () => m((xe) => xe - 1) });
|
|
33941
|
-
}) }, L.createElement(k_, { force: !0 }, L.createElement(rO, null, L.createElement(ey.Provider, { value: ie }, L.createElement(rO.Group, { target: y }, L.createElement(k_, { force: !1 }, L.createElement(ee, { slot:
|
|
33941
|
+
}) }, L.createElement(k_, { force: !0 }, L.createElement(rO, null, L.createElement(ey.Provider, { value: ie }, L.createElement(rO.Group, { target: y }, L.createElement(k_, { force: !1 }, L.createElement(ee, { slot: ne, name: "Dialog.Description" }, L.createElement(Nl, { initialFocus: i, containers: V, features: M ? $r(A, { parent: Nl.features.RestoreFocus, leaf: Nl.features.All & ~Nl.features.FocusLock }) : Nl.features.None }, L.createElement(C, null, rt({ ourProps: me, theirProps: d, slot: ne, defaultTag: nue, features: oue, visible: O === 0, name: "Dialog" }))))))))), L.createElement(I, null));
|
|
33942
33942
|
}
|
|
33943
33943
|
let iue = "div";
|
|
33944
33944
|
function sue(e, r) {
|
|
@@ -39512,7 +39512,7 @@ function Zfe({
|
|
|
39512
39512
|
}), () => {
|
|
39513
39513
|
T = !1;
|
|
39514
39514
|
};
|
|
39515
|
-
}, [o.client, o.entityId, o.refreshId, e, d, O]), n)
|
|
39515
|
+
}, [o.client, o.entityId, o.refreshId, e, d, O, b]), n)
|
|
39516
39516
|
return n({
|
|
39517
39517
|
setSearch: (T) => {
|
|
39518
39518
|
S(T), p(1), f([]);
|
|
@@ -39528,7 +39528,8 @@ function Zfe({
|
|
|
39528
39528
|
},
|
|
39529
39529
|
resultsPerPage: b,
|
|
39530
39530
|
setResultsPerPage: v,
|
|
39531
|
-
counterparties: a ?? []
|
|
39531
|
+
counterparties: a ?? [],
|
|
39532
|
+
count: g
|
|
39532
39533
|
});
|
|
39533
39534
|
function D({
|
|
39534
39535
|
entity: T,
|
|
@@ -39679,7 +39680,7 @@ function kfe({
|
|
|
39679
39680
|
type: n,
|
|
39680
39681
|
children: o
|
|
39681
39682
|
}) {
|
|
39682
|
-
var _, O, S, j, E, D, M, P, U, T, C, N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie,
|
|
39683
|
+
var _, O, S, j, E, D, M, P, U, T, C, N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie, ne, me, be, _e, xe, Ke, we, Oe, Ae, H, se, oe;
|
|
39683
39684
|
const a = $e(), [i, s] = ae(!1), [l, d] = ae(void 0), [f, m] = ae(e);
|
|
39684
39685
|
if (ye(() => {
|
|
39685
39686
|
if (!a.client || !a.entityId || !r || e || f)
|
|
@@ -39761,7 +39762,7 @@ function kfe({
|
|
|
39761
39762
|
}), /* @__PURE__ */ u.jsxs("div", {
|
|
39762
39763
|
children: [/* @__PURE__ */ u.jsxs("dd", {
|
|
39763
39764
|
className: "mercoa-text-2xl mercoa-font-semibold mercoa-leading-6 mercoa-text-gray-900 mercoa-inline",
|
|
39764
|
-
children: [((X = f.profile) == null ? void 0 : X.business) && ((W = e == null ? void 0 : e.profile.business) == null ? void 0 : W.legalBusinessName), ((F = f.profile) == null ? void 0 : F.individual) && `${RR((ve = (Q = (G = f.profile) == null ? void 0 : G.individual) == null ? void 0 : Q.name) == null ? void 0 : ve.firstName, (he = (ce = (le = f.profile) == null ? void 0 : le.individual) == null ? void 0 : ce.name) == null ? void 0 : he.lastName, (
|
|
39765
|
+
children: [((X = f.profile) == null ? void 0 : X.business) && ((W = e == null ? void 0 : e.profile.business) == null ? void 0 : W.legalBusinessName), ((F = f.profile) == null ? void 0 : F.individual) && `${RR((ve = (Q = (G = f.profile) == null ? void 0 : G.individual) == null ? void 0 : Q.name) == null ? void 0 : ve.firstName, (he = (ce = (le = f.profile) == null ? void 0 : le.individual) == null ? void 0 : ce.name) == null ? void 0 : he.lastName, (ne = (ie = (ee = f.profile) == null ? void 0 : ee.individual) == null ? void 0 : ie.name) == null ? void 0 : ne.middleName, (_e = (be = (me = f.profile) == null ? void 0 : me.individual) == null ? void 0 : be.name) == null ? void 0 : _e.suffix)}`]
|
|
39765
39766
|
}), t && /* @__PURE__ */ u.jsx("div", {
|
|
39766
39767
|
className: "mercoa-text-sm mercoa-leading-6 mercoa-text-gray-400 mercoa-select-all",
|
|
39767
39768
|
children: f.id
|
|
@@ -39775,14 +39776,14 @@ function kfe({
|
|
|
39775
39776
|
size: "sm",
|
|
39776
39777
|
className: "mercoa-ml-5",
|
|
39777
39778
|
onClick: async () => {
|
|
39778
|
-
var pe,
|
|
39779
|
+
var pe, te;
|
|
39779
39780
|
if (!a.entityId)
|
|
39780
39781
|
return;
|
|
39781
39782
|
let de;
|
|
39782
39783
|
n === "payor" ? de = await ((pe = a.client) == null ? void 0 : pe.entity.getOnboardingLink(f.id, {
|
|
39783
39784
|
expiresIn: "30d",
|
|
39784
39785
|
type: R.Mercoa.EntityOnboardingLinkType.Payor
|
|
39785
|
-
})) : de = await ((
|
|
39786
|
+
})) : de = await ((te = a.client) == null ? void 0 : te.entity.getOnboardingLink(f.id, {
|
|
39786
39787
|
expiresIn: "30d",
|
|
39787
39788
|
type: R.Mercoa.EntityOnboardingLinkType.Payee
|
|
39788
39789
|
})), de ? navigator.clipboard.writeText(de).then(function() {
|
|
@@ -39931,7 +39932,7 @@ function kfe({
|
|
|
39931
39932
|
className: "mercoa-flex mercoa-flex-auto mercoa-pl-6 mercoa-mt-2 mercoa-pt-2 mercoa-items-center mercoa-border-t mercoa-border-gray-900/5 "
|
|
39932
39933
|
}), /* @__PURE__ */ u.jsx("div", {
|
|
39933
39934
|
className: "mercoa-grid mercoa-grid-cols-3 mercoa-gap-2 mercoa-ml-4 mercoa-p-2",
|
|
39934
|
-
children: (
|
|
39935
|
+
children: (oe = (se = f == null ? void 0 : f.paymentMethods) == null ? void 0 : se.filter((de) => de.type === R.Mercoa.PaymentMethodType.Custom)) == null ? void 0 : oe.map((de) => /* @__PURE__ */ u.jsx(g, {
|
|
39935
39936
|
method: de
|
|
39936
39937
|
}, de.id))
|
|
39937
39938
|
})]
|
|
@@ -41045,11 +41046,11 @@ var o$ = { exports: {} };
|
|
|
41045
41046
|
}, $.valueOf = function() {
|
|
41046
41047
|
return this.$d.getTime();
|
|
41047
41048
|
}, $.startOf = function(I, A) {
|
|
41048
|
-
var X = this, W = !!T.u(A) || A, F = T.p(I), G = function(
|
|
41049
|
-
var be = T.w(X.$u ? Date.UTC(X.$y, me,
|
|
41049
|
+
var X = this, W = !!T.u(A) || A, F = T.p(I), G = function(ne, me) {
|
|
41050
|
+
var be = T.w(X.$u ? Date.UTC(X.$y, me, ne) : new Date(X.$y, me, ne), X);
|
|
41050
41051
|
return W ? be : be.endOf(d);
|
|
41051
|
-
}, Q = function(
|
|
41052
|
-
return T.w(X.toDate()[
|
|
41052
|
+
}, Q = function(ne, me) {
|
|
41053
|
+
return T.w(X.toDate()[ne].apply(X.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), X);
|
|
41053
41054
|
}, ve = this.$W, le = this.$M, ce = this.$D, he = "set" + (this.$u ? "UTC" : "");
|
|
41054
41055
|
switch (F) {
|
|
41055
41056
|
case h:
|
|
@@ -41112,7 +41113,7 @@ var o$ = { exports: {} };
|
|
|
41112
41113
|
return me && (me[be] || me(A, W)) || _e[be].slice(0, xe);
|
|
41113
41114
|
}, ie = function(me) {
|
|
41114
41115
|
return T.s(G % 12 || 12, me, "0");
|
|
41115
|
-
},
|
|
41116
|
+
}, ne = he || function(me, be, _e) {
|
|
41116
41117
|
var xe = me < 12 ? "AM" : "PM";
|
|
41117
41118
|
return _e ? xe.toLowerCase() : xe;
|
|
41118
41119
|
};
|
|
@@ -41152,9 +41153,9 @@ var o$ = { exports: {} };
|
|
|
41152
41153
|
case "hh":
|
|
41153
41154
|
return ie(2);
|
|
41154
41155
|
case "a":
|
|
41155
|
-
return
|
|
41156
|
+
return ne(G, Q, !0);
|
|
41156
41157
|
case "A":
|
|
41157
|
-
return
|
|
41158
|
+
return ne(G, Q, !1);
|
|
41158
41159
|
case "m":
|
|
41159
41160
|
return String(Q);
|
|
41160
41161
|
case "mm":
|
|
@@ -41332,7 +41333,7 @@ function gme({
|
|
|
41332
41333
|
}), () => {
|
|
41333
41334
|
g = !1;
|
|
41334
41335
|
};
|
|
41335
|
-
}, [n.client, o, n.refreshId, m]), t ? t({
|
|
41336
|
+
}, [n.client, o, n.refreshId, m, b]), t ? t({
|
|
41336
41337
|
dataLoaded: !!n.client && !!(o != null && o.id) && !!a,
|
|
41337
41338
|
emails: a ?? [],
|
|
41338
41339
|
hasNext: d,
|
|
@@ -41344,7 +41345,8 @@ function gme({
|
|
|
41344
41345
|
s > 1 && (l(s - 1), p(m.slice(0, m.length - 1)));
|
|
41345
41346
|
},
|
|
41346
41347
|
resultsPerPage: b,
|
|
41347
|
-
setResultsPerPage: v
|
|
41348
|
+
setResultsPerPage: v,
|
|
41349
|
+
count: h
|
|
41348
41350
|
}) : n.client ? /* @__PURE__ */ u.jsxs("div", {
|
|
41349
41351
|
children: [/* @__PURE__ */ u.jsxs("table", {
|
|
41350
41352
|
className: "mercoa-min-w-full mercoa-divide-y mercoa-divide-gray-300 mercoa-mt-5",
|
|
@@ -41679,12 +41681,12 @@ function p$(e) {
|
|
|
41679
41681
|
}, ve = function(we) {
|
|
41680
41682
|
var Oe = we.formattedValue;
|
|
41681
41683
|
Oe === void 0 && (Oe = "");
|
|
41682
|
-
var Ae = we.input, H = we.source, se = we.event,
|
|
41684
|
+
var Ae = we.input, H = we.source, se = we.event, oe = we.numAsString, de;
|
|
41683
41685
|
if (Ae) {
|
|
41684
|
-
var pe = we.inputValue || Ae.value,
|
|
41685
|
-
Ae.value = Oe, de = Q(pe, Oe,
|
|
41686
|
+
var pe = we.inputValue || Ae.value, te = f_(Ae);
|
|
41687
|
+
Ae.value = Oe, de = Q(pe, Oe, te), de !== void 0 && F(Ae, de, Oe);
|
|
41686
41688
|
}
|
|
41687
|
-
Oe !== M && C(W(Oe,
|
|
41689
|
+
Oe !== M && C(W(Oe, oe), { event: se, source: H });
|
|
41688
41690
|
};
|
|
41689
41691
|
ye(function() {
|
|
41690
41692
|
var we = T.current, Oe = we.formattedValue, Ae = we.numAsString;
|
|
@@ -41702,14 +41704,14 @@ function p$(e) {
|
|
|
41702
41704
|
}
|
|
41703
41705
|
}, [M]);
|
|
41704
41706
|
var he = function(we, Oe, Ae) {
|
|
41705
|
-
var H = l$(M, we), se = Object.assign(Object.assign({}, H), { lastValue: M }),
|
|
41706
|
-
if (
|
|
41707
|
-
var pe = Oe.target,
|
|
41707
|
+
var H = l$(M, we), se = Object.assign(Object.assign({}, H), { lastValue: M }), oe = s(we, se), de = X(oe);
|
|
41708
|
+
if (oe = s(de, void 0), m && !m(W(de, oe))) {
|
|
41709
|
+
var pe = Oe.target, te = f_(pe), Z = Q(we, M, te);
|
|
41708
41710
|
return pe.value = M, F(pe, Z, M), !1;
|
|
41709
41711
|
}
|
|
41710
41712
|
return ve({
|
|
41711
41713
|
formattedValue: de,
|
|
41712
|
-
numAsString:
|
|
41714
|
+
numAsString: oe,
|
|
41713
41715
|
inputValue: we,
|
|
41714
41716
|
event: Oe,
|
|
41715
41717
|
source: Ae,
|
|
@@ -41719,26 +41721,26 @@ function p$(e) {
|
|
|
41719
41721
|
var Oe = we.target, Ae = Oe.value, H = he(Ae, we, md.event);
|
|
41720
41722
|
H && p(we);
|
|
41721
41723
|
}, ie = function(we) {
|
|
41722
|
-
var Oe = we.target, Ae = we.key, H = Oe.selectionStart, se = Oe.selectionEnd,
|
|
41723
|
-
|
|
41724
|
+
var Oe = we.target, Ae = we.key, H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41725
|
+
oe === void 0 && (oe = "");
|
|
41724
41726
|
var de;
|
|
41725
|
-
if (Ae === "ArrowLeft" || Ae === "Backspace" ? de = Math.max(H - 1, 0) : Ae === "ArrowRight" ? de = Math.min(H + 1,
|
|
41727
|
+
if (Ae === "ArrowLeft" || Ae === "Backspace" ? de = Math.max(H - 1, 0) : Ae === "ArrowRight" ? de = Math.min(H + 1, oe.length) : Ae === "Delete" && (de = H), de === void 0 || H !== se) {
|
|
41726
41728
|
h(we);
|
|
41727
41729
|
return;
|
|
41728
41730
|
}
|
|
41729
41731
|
var pe = de;
|
|
41730
41732
|
if (Ae === "ArrowLeft" || Ae === "ArrowRight") {
|
|
41731
|
-
var
|
|
41732
|
-
pe = G(
|
|
41733
|
+
var te = Ae === "ArrowLeft" ? "left" : "right";
|
|
41734
|
+
pe = G(oe, de, te), pe !== de && we.preventDefault();
|
|
41733
41735
|
} else
|
|
41734
|
-
Ae === "Delete" && !O(
|
|
41735
|
-
pe !== de && F(Oe, pe,
|
|
41736
|
-
},
|
|
41736
|
+
Ae === "Delete" && !O(oe[de]) ? pe = G(oe, de, "right") : Ae === "Backspace" && !O(oe[de]) && (pe = G(oe, de, "left"));
|
|
41737
|
+
pe !== de && F(Oe, pe, oe), we.isUnitTestRun && F(Oe, pe, oe), h(we);
|
|
41738
|
+
}, ne = function(we) {
|
|
41737
41739
|
var Oe = we.target, Ae = function() {
|
|
41738
|
-
var H = Oe.selectionStart, se = Oe.selectionEnd,
|
|
41739
|
-
if (
|
|
41740
|
-
var de = G(
|
|
41741
|
-
de !== H && F(Oe, de,
|
|
41740
|
+
var H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41741
|
+
if (oe === void 0 && (oe = ""), H === se) {
|
|
41742
|
+
var de = G(oe, H);
|
|
41743
|
+
de !== H && F(Oe, de, oe);
|
|
41742
41744
|
}
|
|
41743
41745
|
};
|
|
41744
41746
|
Ae(), requestAnimationFrame(function() {
|
|
@@ -41748,10 +41750,10 @@ function p$(e) {
|
|
|
41748
41750
|
we.persist && we.persist();
|
|
41749
41751
|
var Oe = we.target, Ae = we.currentTarget;
|
|
41750
41752
|
I.current = Oe, A.current.focusTimeout = setTimeout(function() {
|
|
41751
|
-
var H = Oe.selectionStart, se = Oe.selectionEnd,
|
|
41752
|
-
|
|
41753
|
-
var de = G(
|
|
41754
|
-
de !== H && !(H === 0 && se ===
|
|
41753
|
+
var H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41754
|
+
oe === void 0 && (oe = "");
|
|
41755
|
+
var de = G(oe, H);
|
|
41756
|
+
de !== H && !(H === 0 && se === oe.length) && F(Oe, de, oe), b(Object.assign(Object.assign({}, we), { currentTarget: Ae }));
|
|
41755
41757
|
}, 0);
|
|
41756
41758
|
}, be = function(we) {
|
|
41757
41759
|
I.current = null, clearTimeout(A.current.focusTimeout), clearTimeout(A.current.setCaretTimeout), v(we);
|
|
@@ -41760,7 +41762,7 @@ function p$(e) {
|
|
|
41760
41762
|
value: M,
|
|
41761
41763
|
onChange: ee,
|
|
41762
41764
|
onKeyDown: ie,
|
|
41763
|
-
onMouseUp:
|
|
41765
|
+
onMouseUp: ne,
|
|
41764
41766
|
onFocus: me,
|
|
41765
41767
|
onBlur: be
|
|
41766
41768
|
});
|
|
@@ -43324,7 +43326,7 @@ function jx({
|
|
|
43324
43326
|
onCancel: n,
|
|
43325
43327
|
admin: o
|
|
43326
43328
|
}) {
|
|
43327
|
-
var b, v, g, _, O, S, j, E, D, M, P, U, T, C, N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie,
|
|
43329
|
+
var b, v, g, _, O, S, j, E, D, M, P, U, T, C, N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie, ne, me, be, _e, xe, Ke, we, Oe, Ae, H, se;
|
|
43328
43330
|
const a = $e(), {
|
|
43329
43331
|
register: i,
|
|
43330
43332
|
handleSubmit: s,
|
|
@@ -43349,7 +43351,7 @@ function jx({
|
|
|
43349
43351
|
city: ((I = ($ = e.profile.individual) == null ? void 0 : $.address) == null ? void 0 : I.city) ?? ((X = (A = e.profile.business) == null ? void 0 : A.address) == null ? void 0 : X.city),
|
|
43350
43352
|
stateOrProvince: ((F = (W = e.profile.individual) == null ? void 0 : W.address) == null ? void 0 : F.stateOrProvince) ?? ((Q = (G = e.profile.business) == null ? void 0 : G.address) == null ? void 0 : Q.stateOrProvince),
|
|
43351
43353
|
postalCode: ((le = (ve = e.profile.individual) == null ? void 0 : ve.address) == null ? void 0 : le.postalCode) ?? ((he = (ce = e.profile.business) == null ? void 0 : ce.address) == null ? void 0 : he.postalCode),
|
|
43352
|
-
country: ((ie = (ee = e.profile.individual) == null ? void 0 : ee.address) == null ? void 0 : ie.country) ?? ((me = (
|
|
43354
|
+
country: ((ie = (ee = e.profile.individual) == null ? void 0 : ee.address) == null ? void 0 : ie.country) ?? ((me = (ne = e.profile.business) == null ? void 0 : ne.address) == null ? void 0 : me.country) ?? "US",
|
|
43353
43355
|
taxID: (be = e.profile.individual) != null && be.governmentIdProvided ? "****" : (_e = e.profile.business) != null && _e.taxIdProvided ? "**-*******" : "",
|
|
43354
43356
|
dob: /* @__PURE__ */ new Date(),
|
|
43355
43357
|
legalBusinessName: ((xe = e.profile.business) == null ? void 0 : xe.legalBusinessName) ?? "",
|
|
@@ -43363,14 +43365,14 @@ function jx({
|
|
|
43363
43365
|
isPayor: e.isPayor,
|
|
43364
43366
|
isPayee: e.isPayee
|
|
43365
43367
|
},
|
|
43366
|
-
resolver: async (
|
|
43368
|
+
resolver: async (oe, de, pe) => oe.accountType === R.Mercoa.AccountType.Individual ? Fo(gn({
|
|
43367
43369
|
...(y == null ? void 0 : y.individual.name.required) && gx,
|
|
43368
43370
|
...(y == null ? void 0 : y.individual.email.required) && cy,
|
|
43369
43371
|
...(y == null ? void 0 : y.individual.phone.required) && mO,
|
|
43370
43372
|
...(y == null ? void 0 : y.individual.dateOfBirth.required) && h$,
|
|
43371
43373
|
...(y == null ? void 0 : y.individual.address.required) && dO,
|
|
43372
43374
|
...(y == null ? void 0 : y.individual.ssn.required) && b$
|
|
43373
|
-
}).required())(
|
|
43375
|
+
}).required())(oe, de, pe) : Fo(gn({
|
|
43374
43376
|
...(y == null ? void 0 : y.business.name.required) && g$,
|
|
43375
43377
|
...(y == null ? void 0 : y.business.email.required) && cy,
|
|
43376
43378
|
...(y == null ? void 0 : y.business.phone.required) && mO,
|
|
@@ -43379,7 +43381,7 @@ function jx({
|
|
|
43379
43381
|
...(y == null ? void 0 : y.business.ein.required) && Gme,
|
|
43380
43382
|
...(y == null ? void 0 : y.business.formationDate.required) && epe,
|
|
43381
43383
|
...(y == null ? void 0 : y.business.description.required) && Zme
|
|
43382
|
-
}).required())(
|
|
43384
|
+
}).required())(oe, de, pe)
|
|
43383
43385
|
}), h = m("accountType");
|
|
43384
43386
|
if (!a.client)
|
|
43385
43387
|
return /* @__PURE__ */ u.jsx(Qe, {
|
|
@@ -43388,19 +43390,19 @@ function jx({
|
|
|
43388
43390
|
if (!a.organization)
|
|
43389
43391
|
return /* @__PURE__ */ u.jsx(tp, {});
|
|
43390
43392
|
const y = r === "payee" ? (Ae = a.organization) == null ? void 0 : Ae.payeeOnboardingOptions : (H = a.organization) == null ? void 0 : H.payorOnboardingOptions;
|
|
43391
|
-
return o && y && (Object.keys(y.individual).forEach((
|
|
43392
|
-
y.individual[
|
|
43393
|
-
}), Object.keys(y.business).forEach((
|
|
43394
|
-
y.business[
|
|
43393
|
+
return o && y && (Object.keys(y.individual).forEach((oe) => {
|
|
43394
|
+
y.individual[oe].show = !0, y.individual[oe].edit = !0, y.individual[oe].required = !1;
|
|
43395
|
+
}), Object.keys(y.business).forEach((oe) => {
|
|
43396
|
+
y.business[oe].show = !0, y.business[oe].edit = !0, y.business[oe].required = !1;
|
|
43395
43397
|
}), y.paymentMethod = !1), /* @__PURE__ */ u.jsxs("form", {
|
|
43396
|
-
onSubmit: s(async (
|
|
43397
|
-
e &&
|
|
43398
|
-
data:
|
|
43398
|
+
onSubmit: s(async (oe) => {
|
|
43399
|
+
e && oe && a.client && (await Ox({
|
|
43400
|
+
data: oe,
|
|
43399
43401
|
entityId: e.id,
|
|
43400
43402
|
mercoaClient: a.client,
|
|
43401
|
-
isPayee: o ?
|
|
43402
|
-
isPayor: o ?
|
|
43403
|
-
}), o && je.success("Entity Updated"), t ? t(
|
|
43403
|
+
isPayee: o ? oe.isPayee : r === "payee",
|
|
43404
|
+
isPayor: o ? oe.isPayor : r === "payor"
|
|
43405
|
+
}), o && je.success("Entity Updated"), t ? t(oe) : a.refresh());
|
|
43404
43406
|
}),
|
|
43405
43407
|
children: [/* @__PURE__ */ u.jsxs("div", {
|
|
43406
43408
|
className: "sm:mercoa-grid sm:mercoa-grid-cols-2 mercoa-gap-3",
|
|
@@ -45283,9 +45285,9 @@ function jpe({
|
|
|
45283
45285
|
return ye(() => {
|
|
45284
45286
|
if (!(_ != null && _.colorScheme))
|
|
45285
45287
|
return;
|
|
45286
|
-
const Q = (
|
|
45287
|
-
|
|
45288
|
-
let [be, _e, xe] =
|
|
45288
|
+
const Q = (ne, me) => {
|
|
45289
|
+
ne = ne.replace(/^#/, ""), ne.length === 3 && (ne = ne[0] + ne[0] + ne[1] + ne[1] + ne[2] + ne[2]);
|
|
45290
|
+
let [be, _e, xe] = ne.match(/.{2}/g);
|
|
45289
45291
|
[be, _e, xe] = [parseInt(be, 16) + me, parseInt(_e, 16) + me, parseInt(xe, 16) + me], be = Math.max(Math.min(255, be), 0).toString(16), _e = Math.max(Math.min(255, _e), 0).toString(16), xe = Math.max(Math.min(255, xe), 0).toString(16);
|
|
45290
45292
|
const Ke = (be.length < 2 ? "0" : "") + be, we = (_e.length < 2 ? "0" : "") + _e, Oe = (xe.length < 2 ? "0" : "") + xe;
|
|
45291
45293
|
return `#${Ke}${we}${Oe}`;
|
|
@@ -48027,7 +48029,7 @@ function Xye() {
|
|
|
48027
48029
|
var he = It(function(Z) {
|
|
48028
48030
|
M ? M(Z) : console.error(Z);
|
|
48029
48031
|
}, [M]), ee = It(function(Z) {
|
|
48030
|
-
Z.preventDefault(), Z.persist(),
|
|
48032
|
+
Z.preventDefault(), Z.persist(), oe(Z), le.current = [].concat($ye(le.current), [Z.target]), dh(Z) && Promise.resolve(o(Z)).then(function(ue) {
|
|
48031
48033
|
if (!(dy(Z) && !D)) {
|
|
48032
48034
|
var ge = ue.length, z = ge > 0 && xye({
|
|
48033
48035
|
files: ue,
|
|
@@ -48049,7 +48051,7 @@ function Xye() {
|
|
|
48049
48051
|
return he(ue);
|
|
48050
48052
|
});
|
|
48051
48053
|
}, [o, d, he, D, U, i, a, s, l, P]), ie = It(function(Z) {
|
|
48052
|
-
Z.preventDefault(), Z.persist(),
|
|
48054
|
+
Z.preventDefault(), Z.persist(), oe(Z);
|
|
48053
48055
|
var ue = dh(Z);
|
|
48054
48056
|
if (ue && Z.dataTransfer)
|
|
48055
48057
|
try {
|
|
@@ -48057,8 +48059,8 @@ function Xye() {
|
|
|
48057
48059
|
} catch {
|
|
48058
48060
|
}
|
|
48059
48061
|
return ue && m && m(Z), !1;
|
|
48060
|
-
}, [m, D]),
|
|
48061
|
-
Z.preventDefault(), Z.persist(),
|
|
48062
|
+
}, [m, D]), ne = It(function(Z) {
|
|
48063
|
+
Z.preventDefault(), Z.persist(), oe(Z);
|
|
48062
48064
|
var ue = le.current.filter(function(z) {
|
|
48063
48065
|
return V.current && V.current.contains(z);
|
|
48064
48066
|
}), ge = ue.indexOf(Z.target);
|
|
@@ -48094,7 +48096,7 @@ function Xye() {
|
|
|
48094
48096
|
type: "setFiles"
|
|
48095
48097
|
}), p && p(ge, z, ue), z.length > 0 && y && y(z, ue), ge.length > 0 && h && h(ge, ue);
|
|
48096
48098
|
}, [W, s, U, i, a, l, p, h, y, P]), be = It(function(Z) {
|
|
48097
|
-
Z.preventDefault(), Z.persist(),
|
|
48099
|
+
Z.preventDefault(), Z.persist(), oe(Z), le.current = [], dh(Z) && Promise.resolve(o(Z)).then(function(ue) {
|
|
48098
48100
|
dy(Z) && !D || me(ue, Z);
|
|
48099
48101
|
}).catch(function(ue) {
|
|
48100
48102
|
return he(ue);
|
|
@@ -48144,7 +48146,7 @@ function Xye() {
|
|
|
48144
48146
|
return j ? null : Ae(ue);
|
|
48145
48147
|
}, se = function(ue) {
|
|
48146
48148
|
return E ? null : Ae(ue);
|
|
48147
|
-
},
|
|
48149
|
+
}, oe = function(ue) {
|
|
48148
48150
|
D && ue.stopPropagation();
|
|
48149
48151
|
}, de = lr(function() {
|
|
48150
48152
|
return function() {
|
|
@@ -48156,16 +48158,16 @@ function Xye() {
|
|
|
48156
48158
|
onClick: Ae(Yo(re, Oe)),
|
|
48157
48159
|
onDragEnter: se(Yo(fe, ee)),
|
|
48158
48160
|
onDragOver: se(Yo(k, ie)),
|
|
48159
|
-
onDragLeave: se(Yo(Ue,
|
|
48161
|
+
onDragLeave: se(Yo(Ue, ne)),
|
|
48160
48162
|
onDrop: se(Yo(Xe, be)),
|
|
48161
48163
|
role: typeof z == "string" && z !== "" ? z : "presentation"
|
|
48162
48164
|
}, ge, V), !n && !j ? {
|
|
48163
48165
|
tabIndex: 0
|
|
48164
48166
|
} : {}), Ye);
|
|
48165
48167
|
};
|
|
48166
|
-
}, [V, xe, Ke, we, Oe, ee, ie,
|
|
48168
|
+
}, [V, xe, Ke, we, Oe, ee, ie, ne, be, j, E, n]), pe = It(function(Z) {
|
|
48167
48169
|
Z.stopPropagation();
|
|
48168
|
-
}, []),
|
|
48170
|
+
}, []), te = lr(function() {
|
|
48169
48171
|
return function() {
|
|
48170
48172
|
var Z = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, ue = Z.refKey, ge = ue === void 0 ? "ref" : ue, z = Z.onChange, w = Z.onClick, x = fy(Z, Rye), B = xO({
|
|
48171
48173
|
accept: U,
|
|
@@ -48184,7 +48186,7 @@ function Xye() {
|
|
|
48184
48186
|
return vt(vt({}, X), {}, {
|
|
48185
48187
|
isFocused: F && !n,
|
|
48186
48188
|
getRootProps: de,
|
|
48187
|
-
getInputProps:
|
|
48189
|
+
getInputProps: te,
|
|
48188
48190
|
rootRef: V,
|
|
48189
48191
|
inputRef: $,
|
|
48190
48192
|
open: Ae(_e)
|
|
@@ -48429,7 +48431,7 @@ function nE({
|
|
|
48429
48431
|
invoicePreSubmit: l,
|
|
48430
48432
|
children: d
|
|
48431
48433
|
}) {
|
|
48432
|
-
var N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie,
|
|
48434
|
+
var N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie, ne, me, be, _e, xe, Ke, we, Oe, Ae, H, se, oe, de, pe, te, Z, ue, ge, z, w, x, B, re, fe;
|
|
48433
48435
|
const f = $e(), [m, p] = ae(e == null ? void 0 : e.vendor), [h, y] = ae(!1), b = gn({
|
|
48434
48436
|
id: Ie().nullable(),
|
|
48435
48437
|
status: Ie(),
|
|
@@ -48535,10 +48537,10 @@ function nE({
|
|
|
48535
48537
|
accountType: (Q = e == null ? void 0 : e.vendor) == null ? void 0 : Q.accountType,
|
|
48536
48538
|
name: (ve = e == null ? void 0 : e.vendor) == null ? void 0 : ve.name,
|
|
48537
48539
|
firstName: (ee = (he = (ce = (le = e == null ? void 0 : e.vendor) == null ? void 0 : le.profile) == null ? void 0 : ce.individual) == null ? void 0 : he.name) == null ? void 0 : ee.firstName,
|
|
48538
|
-
lastName: (be = (me = (
|
|
48540
|
+
lastName: (be = (me = (ne = (ie = e == null ? void 0 : e.vendor) == null ? void 0 : ie.profile) == null ? void 0 : ne.individual) == null ? void 0 : me.name) == null ? void 0 : be.lastName,
|
|
48539
48541
|
middleName: (we = (Ke = (xe = (_e = e == null ? void 0 : e.vendor) == null ? void 0 : _e.profile) == null ? void 0 : xe.individual) == null ? void 0 : Ke.name) == null ? void 0 : we.middleName,
|
|
48540
48542
|
suffix: (se = (H = (Ae = (Oe = e == null ? void 0 : e.vendor) == null ? void 0 : Oe.profile) == null ? void 0 : Ae.individual) == null ? void 0 : H.name) == null ? void 0 : se.suffix,
|
|
48541
|
-
email: ((
|
|
48543
|
+
email: ((oe = e == null ? void 0 : e.vendor) == null ? void 0 : oe.accountType) === "business" ? (te = (pe = (de = e == null ? void 0 : e.vendor) == null ? void 0 : de.profile) == null ? void 0 : pe.business) == null ? void 0 : te.email : (ge = (ue = (Z = e == null ? void 0 : e.vendor) == null ? void 0 : Z.profile) == null ? void 0 : ue.individual) == null ? void 0 : ge.email,
|
|
48542
48544
|
website: (x = (w = (z = e == null ? void 0 : e.vendor) == null ? void 0 : z.profile) == null ? void 0 : w.business) == null ? void 0 : x.website,
|
|
48543
48545
|
description: (fe = (re = (B = e == null ? void 0 : e.vendor) == null ? void 0 : B.profile) == null ? void 0 : re.business) == null ? void 0 : fe.description
|
|
48544
48546
|
}
|
|
@@ -51070,12 +51072,12 @@ License: MIT
|
|
|
51070
51072
|
0 < ie && (ce += C), ce += G(Q[ie], ie);
|
|
51071
51073
|
0 < ve.length && (ce += N);
|
|
51072
51074
|
}
|
|
51073
|
-
for (var
|
|
51074
|
-
var me = he ? Q.length : ve[
|
|
51075
|
-
if (le && !he && (be = le === "greedy" ? ve[
|
|
51075
|
+
for (var ne = 0; ne < ve.length; ne++) {
|
|
51076
|
+
var me = he ? Q.length : ve[ne].length, be = !1, _e = he ? Object.keys(ve[ne]).length === 0 : ve[ne].length === 0;
|
|
51077
|
+
if (le && !he && (be = le === "greedy" ? ve[ne].join("").trim() === "" : ve[ne].length === 1 && ve[ne][0].length === 0), le === "greedy" && he) {
|
|
51076
51078
|
for (var xe = [], Ke = 0; Ke < me; Ke++) {
|
|
51077
51079
|
var we = ee ? Q[Ke] : Ke;
|
|
51078
|
-
xe.push(ve[
|
|
51080
|
+
xe.push(ve[ne][we]);
|
|
51079
51081
|
}
|
|
51080
51082
|
be = xe.join("").trim() === "";
|
|
51081
51083
|
}
|
|
@@ -51083,9 +51085,9 @@ License: MIT
|
|
|
51083
51085
|
for (var Oe = 0; Oe < me; Oe++) {
|
|
51084
51086
|
0 < Oe && !_e && (ce += C);
|
|
51085
51087
|
var Ae = he && ee ? Q[Oe] : Oe;
|
|
51086
|
-
ce += G(ve[
|
|
51088
|
+
ce += G(ve[ne][Ae], Oe);
|
|
51087
51089
|
}
|
|
51088
|
-
|
|
51090
|
+
ne < ve.length - 1 && (!le || 0 < me && !_e) && (ce += N);
|
|
51089
51091
|
}
|
|
51090
51092
|
}
|
|
51091
51093
|
return ce;
|
|
@@ -51276,38 +51278,38 @@ License: MIT
|
|
|
51276
51278
|
var P, U, T, C = Math.pow(2, 53), N = -C, V = /^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/, $ = /^((\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z)))$/, I = this, A = 0, X = 0, W = !1, F = !1, G = [], Q = { data: [], errors: [], meta: {} };
|
|
51277
51279
|
if (D(M.step)) {
|
|
51278
51280
|
var ve = M.step;
|
|
51279
|
-
M.step = function(
|
|
51280
|
-
if (Q =
|
|
51281
|
+
M.step = function(ne) {
|
|
51282
|
+
if (Q = ne, he())
|
|
51281
51283
|
ce();
|
|
51282
51284
|
else {
|
|
51283
51285
|
if (ce(), Q.data.length === 0)
|
|
51284
51286
|
return;
|
|
51285
|
-
A +=
|
|
51287
|
+
A += ne.data.length, M.preview && A > M.preview ? U.abort() : (Q.data = Q.data[0], ve(Q, I));
|
|
51286
51288
|
}
|
|
51287
51289
|
};
|
|
51288
51290
|
}
|
|
51289
|
-
function le(
|
|
51290
|
-
return M.skipEmptyLines === "greedy" ?
|
|
51291
|
+
function le(ne) {
|
|
51292
|
+
return M.skipEmptyLines === "greedy" ? ne.join("").trim() === "" : ne.length === 1 && ne[0].length === 0;
|
|
51291
51293
|
}
|
|
51292
51294
|
function ce() {
|
|
51293
|
-
return Q && T && (ie("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + l.DefaultDelimiter + "'"), T = !1), M.skipEmptyLines && (Q.data = Q.data.filter(function(
|
|
51294
|
-
return !le(
|
|
51295
|
+
return Q && T && (ie("Delimiter", "UndetectableDelimiter", "Unable to auto-detect delimiting character; defaulted to '" + l.DefaultDelimiter + "'"), T = !1), M.skipEmptyLines && (Q.data = Q.data.filter(function(ne) {
|
|
51296
|
+
return !le(ne);
|
|
51295
51297
|
})), he() && function() {
|
|
51296
51298
|
if (!Q)
|
|
51297
51299
|
return;
|
|
51298
|
-
function
|
|
51300
|
+
function ne(be, _e) {
|
|
51299
51301
|
D(M.transformHeader) && (be = M.transformHeader(be, _e)), G.push(be);
|
|
51300
51302
|
}
|
|
51301
51303
|
if (Array.isArray(Q.data[0])) {
|
|
51302
51304
|
for (var me = 0; he() && me < Q.data.length; me++)
|
|
51303
|
-
Q.data[me].forEach(
|
|
51305
|
+
Q.data[me].forEach(ne);
|
|
51304
51306
|
Q.data.splice(0, 1);
|
|
51305
51307
|
} else
|
|
51306
|
-
Q.data.forEach(
|
|
51308
|
+
Q.data.forEach(ne);
|
|
51307
51309
|
}(), function() {
|
|
51308
51310
|
if (!Q || !M.header && !M.dynamicTyping && !M.transform)
|
|
51309
51311
|
return Q;
|
|
51310
|
-
function
|
|
51312
|
+
function ne(be, _e) {
|
|
51311
51313
|
var xe, Ke = M.header ? {} : [];
|
|
51312
51314
|
for (xe = 0; xe < be.length; xe++) {
|
|
51313
51315
|
var we = xe, Oe = be[xe];
|
|
@@ -51316,14 +51318,14 @@ License: MIT
|
|
|
51316
51318
|
return M.header && (xe > G.length ? ie("FieldMismatch", "TooManyFields", "Too many fields: expected " + G.length + " fields but parsed " + xe, X + _e) : xe < G.length && ie("FieldMismatch", "TooFewFields", "Too few fields: expected " + G.length + " fields but parsed " + xe, X + _e)), Ke;
|
|
51317
51319
|
}
|
|
51318
51320
|
var me = 1;
|
|
51319
|
-
return !Q.data.length || Array.isArray(Q.data[0]) ? (Q.data = Q.data.map(
|
|
51321
|
+
return !Q.data.length || Array.isArray(Q.data[0]) ? (Q.data = Q.data.map(ne), me = Q.data.length) : Q.data = ne(Q.data, 0), M.header && Q.meta && (Q.meta.fields = G), X += me, Q;
|
|
51320
51322
|
}();
|
|
51321
51323
|
}
|
|
51322
51324
|
function he() {
|
|
51323
51325
|
return M.header && G.length === 0;
|
|
51324
51326
|
}
|
|
51325
|
-
function ee(
|
|
51326
|
-
return be =
|
|
51327
|
+
function ee(ne, me) {
|
|
51328
|
+
return be = ne, M.dynamicTypingFunction && M.dynamicTyping[be] === void 0 && (M.dynamicTyping[be] = M.dynamicTypingFunction(be)), (M.dynamicTyping[be] || M.dynamicTyping) === !0 ? me === "true" || me === "TRUE" || me !== "false" && me !== "FALSE" && (function(_e) {
|
|
51327
51329
|
if (V.test(_e)) {
|
|
51328
51330
|
var xe = parseFloat(_e);
|
|
51329
51331
|
if (N < xe && xe < C)
|
|
@@ -51333,17 +51335,17 @@ License: MIT
|
|
|
51333
51335
|
}(me) ? parseFloat(me) : $.test(me) ? new Date(me) : me === "" ? null : me) : me;
|
|
51334
51336
|
var be;
|
|
51335
51337
|
}
|
|
51336
|
-
function ie(
|
|
51337
|
-
var xe = { type:
|
|
51338
|
+
function ie(ne, me, be, _e) {
|
|
51339
|
+
var xe = { type: ne, code: me, message: be };
|
|
51338
51340
|
_e !== void 0 && (xe.row = _e), Q.errors.push(xe);
|
|
51339
51341
|
}
|
|
51340
|
-
this.parse = function(
|
|
51342
|
+
this.parse = function(ne, me, be) {
|
|
51341
51343
|
var _e = M.quoteChar || '"';
|
|
51342
51344
|
if (M.newline || (M.newline = function(we, Oe) {
|
|
51343
51345
|
we = we.substring(0, 1048576);
|
|
51344
51346
|
var Ae = new RegExp(v(Oe) + "([^]*?)" + v(Oe), "gm"), H = (we = we.replace(Ae, "")).split("\r"), se = we.split(`
|
|
51345
|
-
`),
|
|
51346
|
-
if (H.length === 1 ||
|
|
51347
|
+
`), oe = 1 < se.length && se[0].length < H[0].length;
|
|
51348
|
+
if (H.length === 1 || oe)
|
|
51347
51349
|
return `
|
|
51348
51350
|
`;
|
|
51349
51351
|
for (var de = 0, pe = 0; pe < H.length; pe++)
|
|
@@ -51351,11 +51353,11 @@ License: MIT
|
|
|
51351
51353
|
` && de++;
|
|
51352
51354
|
return de >= H.length / 2 ? `\r
|
|
51353
51355
|
` : "\r";
|
|
51354
|
-
}(
|
|
51355
|
-
D(M.delimiter) && (M.delimiter = M.delimiter(
|
|
51356
|
+
}(ne, _e)), T = !1, M.delimiter)
|
|
51357
|
+
D(M.delimiter) && (M.delimiter = M.delimiter(ne), Q.meta.delimiter = M.delimiter);
|
|
51356
51358
|
else {
|
|
51357
51359
|
var xe = function(we, Oe, Ae, H, se) {
|
|
51358
|
-
var
|
|
51360
|
+
var oe, de, pe, te;
|
|
51359
51361
|
se = se || [",", " ", "|", ";", l.RECORD_SEP, l.UNIT_SEP];
|
|
51360
51362
|
for (var Z = 0; Z < se.length; Z++) {
|
|
51361
51363
|
var ue = se[Z], ge = 0, z = 0, w = 0;
|
|
@@ -51367,14 +51369,14 @@ License: MIT
|
|
|
51367
51369
|
var re = x.data[B].length;
|
|
51368
51370
|
z += re, pe !== void 0 ? 0 < re && (ge += Math.abs(re - pe), pe = re) : pe = re;
|
|
51369
51371
|
}
|
|
51370
|
-
0 < x.data.length && (z /= x.data.length - w), (de === void 0 || ge <= de) && (
|
|
51372
|
+
0 < x.data.length && (z /= x.data.length - w), (de === void 0 || ge <= de) && (te === void 0 || te < z) && 1.99 < z && (de = ge, oe = ue, te = z);
|
|
51371
51373
|
}
|
|
51372
|
-
return { successful: !!(M.delimiter =
|
|
51373
|
-
}(
|
|
51374
|
+
return { successful: !!(M.delimiter = oe), bestDelimiter: oe };
|
|
51375
|
+
}(ne, M.newline, M.skipEmptyLines, M.comments, M.delimitersToGuess);
|
|
51374
51376
|
xe.successful ? M.delimiter = xe.bestDelimiter : (T = !0, M.delimiter = l.DefaultDelimiter), Q.meta.delimiter = M.delimiter;
|
|
51375
51377
|
}
|
|
51376
51378
|
var Ke = j(M);
|
|
51377
|
-
return M.preview && M.header && Ke.preview++, P =
|
|
51379
|
+
return M.preview && M.header && Ke.preview++, P = ne, U = new g(Ke), Q = U.parse(P, me, be), ce(), W ? { meta: { paused: !0 } } : Q || { meta: { paused: !1 } };
|
|
51378
51380
|
}, this.paused = function() {
|
|
51379
51381
|
return W;
|
|
51380
51382
|
}, this.pause = function() {
|
|
@@ -51402,7 +51404,7 @@ License: MIT
|
|
|
51402
51404
|
this.parse = function(W, F, G) {
|
|
51403
51405
|
if (typeof W != "string")
|
|
51404
51406
|
throw new Error("Input must be a string");
|
|
51405
|
-
var Q = W.length, ve = U.length, le = T.length, ce = C.length, he = D(N), ee = [], ie = [],
|
|
51407
|
+
var Q = W.length, ve = U.length, le = T.length, ce = C.length, he = D(N), ee = [], ie = [], ne = [], me = A = 0;
|
|
51406
51408
|
if (!W)
|
|
51407
51409
|
return fe();
|
|
51408
51410
|
if (M.header && !F) {
|
|
@@ -51421,35 +51423,35 @@ License: MIT
|
|
|
51421
51423
|
}
|
|
51422
51424
|
}
|
|
51423
51425
|
if ($ || $ !== !1 && W.indexOf(P) === -1) {
|
|
51424
|
-
for (var
|
|
51425
|
-
if (
|
|
51426
|
+
for (var oe = W.split(T), de = 0; de < oe.length; de++) {
|
|
51427
|
+
if (ne = oe[de], A += ne.length, de !== oe.length - 1)
|
|
51426
51428
|
A += T.length;
|
|
51427
51429
|
else if (G)
|
|
51428
51430
|
return fe();
|
|
51429
|
-
if (!C ||
|
|
51431
|
+
if (!C || ne.substring(0, ce) !== C) {
|
|
51430
51432
|
if (he) {
|
|
51431
|
-
if (ee = [], w(
|
|
51433
|
+
if (ee = [], w(ne.split(U)), k(), X)
|
|
51432
51434
|
return fe();
|
|
51433
51435
|
} else
|
|
51434
|
-
w(
|
|
51436
|
+
w(ne.split(U));
|
|
51435
51437
|
if (V && V <= de)
|
|
51436
51438
|
return ee = ee.slice(0, V), fe(!0);
|
|
51437
51439
|
}
|
|
51438
51440
|
}
|
|
51439
51441
|
return fe();
|
|
51440
51442
|
}
|
|
51441
|
-
for (var pe = W.indexOf(U, A),
|
|
51443
|
+
for (var pe = W.indexOf(U, A), te = W.indexOf(T, A), Z = new RegExp(v(I) + v(P), "g"), ue = W.indexOf(P, A); ; )
|
|
51442
51444
|
if (W[A] !== P)
|
|
51443
|
-
if (C &&
|
|
51444
|
-
if (
|
|
51445
|
+
if (C && ne.length === 0 && W.substring(A, A + ce) === C) {
|
|
51446
|
+
if (te === -1)
|
|
51445
51447
|
return fe();
|
|
51446
|
-
A =
|
|
51447
|
-
} else if (pe !== -1 && (pe <
|
|
51448
|
-
|
|
51448
|
+
A = te + le, te = W.indexOf(T, A), pe = W.indexOf(U, A);
|
|
51449
|
+
} else if (pe !== -1 && (pe < te || te === -1))
|
|
51450
|
+
ne.push(W.substring(A, pe)), A = pe + ve, pe = W.indexOf(U, A);
|
|
51449
51451
|
else {
|
|
51450
|
-
if (
|
|
51452
|
+
if (te === -1)
|
|
51451
51453
|
break;
|
|
51452
|
-
if (
|
|
51454
|
+
if (ne.push(W.substring(A, te)), re(te + le), he && (k(), X))
|
|
51453
51455
|
return fe();
|
|
51454
51456
|
if (V && ee.length >= V)
|
|
51455
51457
|
return fe(!0);
|
|
@@ -51462,15 +51464,15 @@ License: MIT
|
|
|
51462
51464
|
return B(W.substring(A, ue).replace(Z, P));
|
|
51463
51465
|
if (P !== I || W[ue + 1] !== I) {
|
|
51464
51466
|
if (P === I || ue === 0 || W[ue - 1] !== I) {
|
|
51465
|
-
pe !== -1 && pe < ue + 1 && (pe = W.indexOf(U, ue + 1)),
|
|
51466
|
-
var ge = x(
|
|
51467
|
+
pe !== -1 && pe < ue + 1 && (pe = W.indexOf(U, ue + 1)), te !== -1 && te < ue + 1 && (te = W.indexOf(T, ue + 1));
|
|
51468
|
+
var ge = x(te === -1 ? pe : Math.min(pe, te));
|
|
51467
51469
|
if (W.substr(ue + 1 + ge, ve) === U) {
|
|
51468
|
-
|
|
51470
|
+
ne.push(W.substring(A, ue).replace(Z, P)), W[A = ue + 1 + ge + ve] !== P && (ue = W.indexOf(P, A)), pe = W.indexOf(U, A), te = W.indexOf(T, A);
|
|
51469
51471
|
break;
|
|
51470
51472
|
}
|
|
51471
|
-
var z = x(
|
|
51473
|
+
var z = x(te);
|
|
51472
51474
|
if (W.substring(ue + 1 + z, ue + 1 + z + le) === T) {
|
|
51473
|
-
if (
|
|
51475
|
+
if (ne.push(W.substring(A, ue).replace(Z, P)), re(ue + 1 + z + le), pe = W.indexOf(U, A), ue = W.indexOf(P, A), he && (k(), X))
|
|
51474
51476
|
return fe();
|
|
51475
51477
|
if (V && ee.length >= V)
|
|
51476
51478
|
return fe(!0);
|
|
@@ -51494,10 +51496,10 @@ License: MIT
|
|
|
51494
51496
|
return Xe;
|
|
51495
51497
|
}
|
|
51496
51498
|
function B(Ue) {
|
|
51497
|
-
return G || (Ue === void 0 && (Ue = W.substring(A)),
|
|
51499
|
+
return G || (Ue === void 0 && (Ue = W.substring(A)), ne.push(Ue), A = Q, w(ne), he && k()), fe();
|
|
51498
51500
|
}
|
|
51499
51501
|
function re(Ue) {
|
|
51500
|
-
A = Ue, w(
|
|
51502
|
+
A = Ue, w(ne), ne = [], te = W.indexOf(T, A);
|
|
51501
51503
|
}
|
|
51502
51504
|
function fe(Ue) {
|
|
51503
51505
|
return { data: ee, errors: ie, meta: { delimiter: U, linebreak: T, aborted: X, truncated: !!Ue, cursor: me + (F || 0) } };
|
|
@@ -54981,18 +54983,18 @@ function O_(e, r, t, n) {
|
|
|
54981
54983
|
weekStartsOn: T,
|
|
54982
54984
|
locale: P
|
|
54983
54985
|
}, N = [new Gve()], V = D.match(Nge).map(function(ie) {
|
|
54984
|
-
var
|
|
54985
|
-
if (
|
|
54986
|
-
var me = PO[
|
|
54986
|
+
var ne = ie[0];
|
|
54987
|
+
if (ne in PO) {
|
|
54988
|
+
var me = PO[ne];
|
|
54987
54989
|
return me(ie, P.formatLong);
|
|
54988
54990
|
}
|
|
54989
54991
|
return ie;
|
|
54990
54992
|
}).join("").match(Cge), $ = [], I = hE(V), A;
|
|
54991
54993
|
try {
|
|
54992
54994
|
var X = function() {
|
|
54993
|
-
var
|
|
54994
|
-
!(n != null && n.useAdditionalWeekYearTokens) && MA(
|
|
54995
|
-
var me =
|
|
54995
|
+
var ne = A.value;
|
|
54996
|
+
!(n != null && n.useAdditionalWeekYearTokens) && MA(ne) && hy(ne, D, e), !(n != null && n.useAdditionalDayOfYearTokens) && xA(ne) && hy(ne, D, e);
|
|
54997
|
+
var me = ne[0], be = Dge[me];
|
|
54996
54998
|
if (be) {
|
|
54997
54999
|
var _e = be.incompatibleTokens;
|
|
54998
55000
|
if (Array.isArray(_e)) {
|
|
@@ -55000,14 +55002,14 @@ function O_(e, r, t, n) {
|
|
|
55000
55002
|
return _e.includes(we.token) || we.token === me;
|
|
55001
55003
|
});
|
|
55002
55004
|
if (xe)
|
|
55003
|
-
throw new RangeError("The format string mustn't contain `".concat(xe.fullToken, "` and `").concat(
|
|
55005
|
+
throw new RangeError("The format string mustn't contain `".concat(xe.fullToken, "` and `").concat(ne, "` at the same time"));
|
|
55004
55006
|
} else if (be.incompatibleTokens === "*" && $.length > 0)
|
|
55005
|
-
throw new RangeError("The format string mustn't contain `".concat(
|
|
55007
|
+
throw new RangeError("The format string mustn't contain `".concat(ne, "` and any other token at the same time"));
|
|
55006
55008
|
$.push({
|
|
55007
55009
|
token: me,
|
|
55008
|
-
fullToken:
|
|
55010
|
+
fullToken: ne
|
|
55009
55011
|
});
|
|
55010
|
-
var Ke = be.run(E,
|
|
55012
|
+
var Ke = be.run(E, ne, P.match, C);
|
|
55011
55013
|
if (!Ke)
|
|
55012
55014
|
return {
|
|
55013
55015
|
v: /* @__PURE__ */ new Date(NaN)
|
|
@@ -55016,8 +55018,8 @@ function O_(e, r, t, n) {
|
|
|
55016
55018
|
} else {
|
|
55017
55019
|
if (me.match(Age))
|
|
55018
55020
|
throw new RangeError("Format string contains an unescaped latin alphabet character `" + me + "`");
|
|
55019
|
-
if (
|
|
55020
|
-
E = E.slice(
|
|
55021
|
+
if (ne === "''" ? ne = "'" : me === "'" && (ne = Fge(ne)), E.indexOf(ne) === 0)
|
|
55022
|
+
E = E.slice(ne.length);
|
|
55021
55023
|
else
|
|
55022
55024
|
return {
|
|
55023
55025
|
v: /* @__PURE__ */ new Date(NaN)
|
|
@@ -55038,15 +55040,15 @@ function O_(e, r, t, n) {
|
|
|
55038
55040
|
return /* @__PURE__ */ new Date(NaN);
|
|
55039
55041
|
var F = N.map(function(ie) {
|
|
55040
55042
|
return ie.priority;
|
|
55041
|
-
}).sort(function(ie,
|
|
55042
|
-
return
|
|
55043
|
-
}).filter(function(ie,
|
|
55044
|
-
return me.indexOf(ie) ===
|
|
55043
|
+
}).sort(function(ie, ne) {
|
|
55044
|
+
return ne - ie;
|
|
55045
|
+
}).filter(function(ie, ne, me) {
|
|
55046
|
+
return me.indexOf(ie) === ne;
|
|
55045
55047
|
}).map(function(ie) {
|
|
55046
|
-
return N.filter(function(
|
|
55047
|
-
return
|
|
55048
|
-
}).sort(function(
|
|
55049
|
-
return me.subPriority -
|
|
55048
|
+
return N.filter(function(ne) {
|
|
55049
|
+
return ne.priority === ie;
|
|
55050
|
+
}).sort(function(ne, me) {
|
|
55051
|
+
return me.subPriority - ne.subPriority;
|
|
55050
55052
|
});
|
|
55051
55053
|
}).map(function(ie) {
|
|
55052
55054
|
return ie[0];
|
|
@@ -55920,8 +55922,8 @@ function Jwe(e) {
|
|
|
55920
55922
|
var he = S.find(function(ee) {
|
|
55921
55923
|
var ie = D.get(ee);
|
|
55922
55924
|
if (ie)
|
|
55923
|
-
return ie.slice(0, ce).every(function(
|
|
55924
|
-
return
|
|
55925
|
+
return ie.slice(0, ce).every(function(ne) {
|
|
55926
|
+
return ne;
|
|
55925
55927
|
});
|
|
55926
55928
|
});
|
|
55927
55929
|
if (he)
|
|
@@ -56050,12 +56052,12 @@ function i0e(e) {
|
|
|
56050
56052
|
var N, V = S === "y" ? kn : eo, $ = S === "y" ? Eo : zo, I = S === "y" ? "height" : "width", A = E[S], X = A + v[V], W = A - v[$], F = h ? -M[I] / 2 : 0, G = _ === tu ? D[I] : M[I], Q = _ === tu ? -M[I] : -D[I], ve = r.elements.arrow, le = h && ve ? Fx(ve) : {
|
|
56051
56053
|
width: 0,
|
|
56052
56054
|
height: 0
|
|
56053
|
-
}, ce = r.modifiersData["arrow#persistent"] ? r.modifiersData["arrow#persistent"].padding : YA(), he = ce[V], ee = ce[$], ie = id(0, D[I], le[I]),
|
|
56055
|
+
}, ce = r.modifiersData["arrow#persistent"] ? r.modifiersData["arrow#persistent"].padding : YA(), he = ce[V], ee = ce[$], ie = id(0, D[I], le[I]), ne = O ? D[I] / 2 - F - ie - he - U.mainAxis : G - ie - he - U.mainAxis, me = O ? -D[I] / 2 + F + ie + ee + U.mainAxis : Q + ie + ee + U.mainAxis, be = r.elements.arrow && ep(r.elements.arrow), _e = be ? S === "y" ? be.clientTop || 0 : be.clientLeft || 0 : 0, xe = (N = T == null ? void 0 : T[S]) != null ? N : 0, Ke = A + ne - xe - _e, we = A + me - xe, Oe = id(h ? jy(X, Ke) : X, A, h ? Es(W, we) : W);
|
|
56054
56056
|
E[S] = Oe, C[S] = Oe - A;
|
|
56055
56057
|
}
|
|
56056
56058
|
if (s) {
|
|
56057
|
-
var Ae, H = S === "x" ? kn : eo, se = S === "x" ? Eo : zo,
|
|
56058
|
-
E[j] = w, C[j] = w -
|
|
56059
|
+
var Ae, H = S === "x" ? kn : eo, se = S === "x" ? Eo : zo, oe = E[j], de = j === "y" ? "height" : "width", pe = oe + v[H], te = oe - v[se], Z = [kn, eo].indexOf(g) !== -1, ue = (Ae = T == null ? void 0 : T[j]) != null ? Ae : 0, ge = Z ? pe : oe - D[de] - M[de] - ue + U.altAxis, z = Z ? oe + D[de] + M[de] - ue - U.altAxis : te, w = h && Z ? Twe(ge, oe, z) : id(h ? ge : pe, oe, h ? z : te);
|
|
56060
|
+
E[j] = w, C[j] = w - oe;
|
|
56059
56061
|
}
|
|
56060
56062
|
r.modifiersData[n] = C;
|
|
56061
56063
|
}
|
|
@@ -58430,13 +58432,13 @@ function m_e({
|
|
|
58430
58432
|
}) {
|
|
58431
58433
|
const l = $e(), [d, f] = ae(), [m, p] = ae(0), [h, y] = ae(R.Mercoa.InvoiceOrderByField.CreatedAt), [b, v] = ae(R.Mercoa.OrderDirection.Asc), [g, _] = ae(!0), [O, S] = ae(0), [j, E] = ae(!1), [D, M] = ae(e), [P, U] = ae([]), [T, C] = ae(20), [N, V] = ae(1), $ = Ce(null), [I, A] = ae(!1), [X, W] = ae(!1), [F, G] = ae([]), [Q, ve] = ae(!1), [le, ce] = ae(!1), [he, ee] = ae(!1);
|
|
58432
58434
|
cu(() => {
|
|
58433
|
-
const
|
|
58434
|
-
A(F.length === (d ? d.length : 0)), W(
|
|
58435
|
+
const te = F.length > 0 && F.length < (d ? d.length : 0);
|
|
58436
|
+
A(F.length === (d ? d.length : 0)), W(te), $.current && ($.current.indeterminate = te);
|
|
58435
58437
|
}, [F, d]);
|
|
58436
58438
|
function ie() {
|
|
58437
58439
|
G(I || X ? [] : d ?? []), A(!I && !X), W(!1);
|
|
58438
58440
|
}
|
|
58439
|
-
async function te
|
|
58441
|
+
async function ne(te) {
|
|
58440
58442
|
var ue;
|
|
58441
58443
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58442
58444
|
return;
|
|
@@ -58449,7 +58451,7 @@ function m_e({
|
|
|
58449
58451
|
...(ge.status === R.Mercoa.InvoiceStatus.Approved || ge.status === R.Mercoa.InvoiceStatus.Failed) && {
|
|
58450
58452
|
status: R.Mercoa.InvoiceStatus.Scheduled
|
|
58451
58453
|
},
|
|
58452
|
-
deductionDate:
|
|
58454
|
+
deductionDate: te
|
|
58453
58455
|
})), Z = !0;
|
|
58454
58456
|
} catch (w) {
|
|
58455
58457
|
console.error("Error updating invoice: ", w), console.log("Errored invoice: ", {
|
|
@@ -58458,7 +58460,7 @@ function m_e({
|
|
|
58458
58460
|
}
|
|
58459
58461
|
})), Z ? je.success("Payment Scheduled") : je.error("Error scheduling payment"), l.refresh();
|
|
58460
58462
|
}
|
|
58461
|
-
async function me(
|
|
58463
|
+
async function me(te) {
|
|
58462
58464
|
var ue;
|
|
58463
58465
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58464
58466
|
return;
|
|
@@ -58467,7 +58469,7 @@ function m_e({
|
|
|
58467
58469
|
var z;
|
|
58468
58470
|
try {
|
|
58469
58471
|
await ((z = l.client) == null ? void 0 : z.invoice.approval.addApprover(ge.id, {
|
|
58470
|
-
userId:
|
|
58472
|
+
userId: te
|
|
58471
58473
|
})), Z = !0;
|
|
58472
58474
|
} catch (w) {
|
|
58473
58475
|
console.error("Error adding approver to invoice ", w), console.log("Errored invoice: ", {
|
|
@@ -58476,132 +58478,132 @@ function m_e({
|
|
|
58476
58478
|
}
|
|
58477
58479
|
})), Z ? je.success("Approver Added") : je.error("Error adding approver"), l.refresh();
|
|
58478
58480
|
}
|
|
58479
|
-
function be(
|
|
58481
|
+
function be(te) {
|
|
58480
58482
|
let Z = R.Mercoa.InvoiceStatus.Approved;
|
|
58481
|
-
const ue =
|
|
58483
|
+
const ue = te.approvalPolicy;
|
|
58482
58484
|
return ue && ue.length > 0 && (Z = R.Mercoa.InvoiceStatus.New), Z;
|
|
58483
58485
|
}
|
|
58484
58486
|
async function _e() {
|
|
58485
58487
|
var Z;
|
|
58486
58488
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58487
58489
|
return;
|
|
58488
|
-
let
|
|
58490
|
+
let te = !1;
|
|
58489
58491
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58490
58492
|
var ge;
|
|
58491
58493
|
try {
|
|
58492
58494
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58493
58495
|
status: be(ue)
|
|
58494
|
-
})),
|
|
58496
|
+
})), te = !0;
|
|
58495
58497
|
} catch (z) {
|
|
58496
58498
|
console.error("Error submitting invoice: ", z), console.log("Errored invoice: ", {
|
|
58497
58499
|
invoice: ue
|
|
58498
58500
|
});
|
|
58499
58501
|
}
|
|
58500
|
-
})),
|
|
58502
|
+
})), te ? je.success("Invoice Submitted for Approval") : je.error("Error submitting invoice"), l.refresh();
|
|
58501
58503
|
}
|
|
58502
58504
|
async function xe() {
|
|
58503
58505
|
var Z;
|
|
58504
58506
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58505
58507
|
return;
|
|
58506
|
-
let
|
|
58508
|
+
let te = !1;
|
|
58507
58509
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58508
58510
|
var ge;
|
|
58509
58511
|
try {
|
|
58510
|
-
await ((ge = l.client) == null ? void 0 : ge.invoice.delete(ue.id)),
|
|
58512
|
+
await ((ge = l.client) == null ? void 0 : ge.invoice.delete(ue.id)), te = !0;
|
|
58511
58513
|
} catch (z) {
|
|
58512
58514
|
console.error("Error deleting invoice: ", z), console.log("Errored invoice: ", {
|
|
58513
58515
|
invoice: ue
|
|
58514
58516
|
});
|
|
58515
58517
|
}
|
|
58516
|
-
})),
|
|
58518
|
+
})), te ? je.success("Invoices Deleted") : je.error("Error deleting invoices"), l.refresh();
|
|
58517
58519
|
}
|
|
58518
58520
|
async function Ke() {
|
|
58519
58521
|
var Z;
|
|
58520
58522
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58521
58523
|
return;
|
|
58522
|
-
let
|
|
58524
|
+
let te = !1;
|
|
58523
58525
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58524
58526
|
var ge;
|
|
58525
58527
|
try {
|
|
58526
58528
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58527
58529
|
status: R.Mercoa.InvoiceStatus.Archived
|
|
58528
|
-
})),
|
|
58530
|
+
})), te = !0;
|
|
58529
58531
|
} catch (z) {
|
|
58530
58532
|
console.error("Error archiving invoice: ", z), console.log("Errored invoice: ", {
|
|
58531
58533
|
invoice: ue
|
|
58532
58534
|
});
|
|
58533
58535
|
}
|
|
58534
|
-
})),
|
|
58536
|
+
})), te ? je.success("Invoices Archived") : je.error("Error archiving invoices"), l.refresh();
|
|
58535
58537
|
}
|
|
58536
58538
|
async function we() {
|
|
58537
58539
|
var Z;
|
|
58538
58540
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58539
58541
|
return;
|
|
58540
|
-
let
|
|
58542
|
+
let te = !1;
|
|
58541
58543
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58542
58544
|
var ge;
|
|
58543
58545
|
try {
|
|
58544
58546
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58545
58547
|
status: R.Mercoa.InvoiceStatus.Canceled
|
|
58546
|
-
})),
|
|
58548
|
+
})), te = !0;
|
|
58547
58549
|
} catch (z) {
|
|
58548
58550
|
console.error("Error cancelling invoice: ", z), console.log("Errored invoice: ", {
|
|
58549
58551
|
invoice: ue
|
|
58550
58552
|
});
|
|
58551
58553
|
}
|
|
58552
|
-
})),
|
|
58554
|
+
})), te ? je.success("Payments Cancelled") : je.error("Error cancelling payments"), l.refresh();
|
|
58553
58555
|
}
|
|
58554
58556
|
async function Oe() {
|
|
58555
58557
|
var Z;
|
|
58556
58558
|
if (!l.token || !((Z = l.entity) != null && Z.id) || !l.user)
|
|
58557
58559
|
return;
|
|
58558
|
-
let
|
|
58560
|
+
let te = !1;
|
|
58559
58561
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58560
58562
|
var ge, z, w;
|
|
58561
58563
|
try {
|
|
58562
58564
|
const x = await ((ge = l.client) == null ? void 0 : ge.invoice.get(ue.id));
|
|
58563
58565
|
if ((x == null ? void 0 : x.status) != R.Mercoa.InvoiceStatus.New) {
|
|
58564
|
-
|
|
58566
|
+
te = !0;
|
|
58565
58567
|
return;
|
|
58566
58568
|
}
|
|
58567
58569
|
await ((w = l.client) == null ? void 0 : w.invoice.approval.approve(ue.id, {
|
|
58568
58570
|
userId: (z = l.user) == null ? void 0 : z.id
|
|
58569
|
-
})),
|
|
58571
|
+
})), te = !0;
|
|
58570
58572
|
} catch (x) {
|
|
58571
58573
|
console.error("Error approving invoice: ", x), console.log("Errored invoice: ", {
|
|
58572
58574
|
invoice: ue
|
|
58573
58575
|
});
|
|
58574
58576
|
}
|
|
58575
|
-
})),
|
|
58577
|
+
})), te && je.success("Approved"), l.refresh();
|
|
58576
58578
|
}
|
|
58577
58579
|
async function Ae() {
|
|
58578
58580
|
var Z;
|
|
58579
58581
|
if (!l.token || !((Z = l.entity) != null && Z.id) || !l.user)
|
|
58580
58582
|
return;
|
|
58581
|
-
let
|
|
58583
|
+
let te = !1;
|
|
58582
58584
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58583
58585
|
var ge, z, w;
|
|
58584
58586
|
try {
|
|
58585
58587
|
const x = await ((ge = l.client) == null ? void 0 : ge.invoice.get(ue.id));
|
|
58586
58588
|
if ((x == null ? void 0 : x.status) != R.Mercoa.InvoiceStatus.New) {
|
|
58587
|
-
|
|
58589
|
+
te = !0;
|
|
58588
58590
|
return;
|
|
58589
58591
|
}
|
|
58590
58592
|
await ((w = l.client) == null ? void 0 : w.invoice.approval.reject(ue.id, {
|
|
58591
58593
|
userId: (z = l.user) == null ? void 0 : z.id
|
|
58592
|
-
})),
|
|
58594
|
+
})), te = !0;
|
|
58593
58595
|
} catch (x) {
|
|
58594
58596
|
console.error("Error rejecting invoice: ", x), console.log("Errored invoice: ", {
|
|
58595
58597
|
invoice: ue
|
|
58596
58598
|
});
|
|
58597
58599
|
}
|
|
58598
|
-
})),
|
|
58600
|
+
})), te && je.success("Rejected"), l.refresh();
|
|
58599
58601
|
}
|
|
58600
58602
|
async function H() {
|
|
58601
58603
|
var ge;
|
|
58602
58604
|
if (!l.token || !((ge = l.entity) != null && ge.id))
|
|
58603
58605
|
return;
|
|
58604
|
-
let
|
|
58606
|
+
let te = "", Z = [];
|
|
58605
58607
|
ue();
|
|
58606
58608
|
async function ue() {
|
|
58607
58609
|
var x, B, re;
|
|
@@ -58619,13 +58621,13 @@ function m_e({
|
|
|
58619
58621
|
approverAction: R.Mercoa.ApproverAction.None
|
|
58620
58622
|
},
|
|
58621
58623
|
limit: 100,
|
|
58622
|
-
startingAfter:
|
|
58624
|
+
startingAfter: te,
|
|
58623
58625
|
excludeReceivables: !0,
|
|
58624
58626
|
metadata: t
|
|
58625
58627
|
}, w = await ((re = l.client) == null ? void 0 : re.entity.invoice.find(l.entity.id, z));
|
|
58626
58628
|
if (w)
|
|
58627
58629
|
if (w.data.length > 0)
|
|
58628
|
-
|
|
58630
|
+
te = w.data[w.data.length - 1].id, Z = [...Z, ...w.data], await ue();
|
|
58629
58631
|
else {
|
|
58630
58632
|
const fe = bA.unparse(Z.map((Ye) => {
|
|
58631
58633
|
var mr, ir, _t, Ka, Ha, Xa;
|
|
@@ -58662,7 +58664,7 @@ function m_e({
|
|
|
58662
58664
|
var ue, ge, z, w, x;
|
|
58663
58665
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58664
58666
|
return;
|
|
58665
|
-
let
|
|
58667
|
+
let te = !0;
|
|
58666
58668
|
G([]), E(!1);
|
|
58667
58669
|
const Z = {
|
|
58668
58670
|
status: D,
|
|
@@ -58681,20 +58683,20 @@ function m_e({
|
|
|
58681
58683
|
metadata: t
|
|
58682
58684
|
};
|
|
58683
58685
|
return (z = l.client) == null || z.entity.invoice.find(l.entity.id, Z).then((B) => {
|
|
58684
|
-
B &&
|
|
58686
|
+
B && te && (_(B.hasMore), S(B.count), f(B.data), E(!0));
|
|
58685
58687
|
}), D.includes(R.Mercoa.InvoiceStatus.New) && ((x = l.client) == null || x.entity.invoice.find(l.entity.id, {
|
|
58686
58688
|
...Z,
|
|
58687
58689
|
approverId: (w = l.user) == null ? void 0 : w.id,
|
|
58688
58690
|
approverAction: R.Mercoa.ApproverAction.None
|
|
58689
58691
|
}).then((B) => {
|
|
58690
|
-
B &&
|
|
58692
|
+
B && te && p(B.count);
|
|
58691
58693
|
})), () => {
|
|
58692
|
-
|
|
58694
|
+
te = !1;
|
|
58693
58695
|
};
|
|
58694
58696
|
}, [l.token, l.entity, l.refreshId, D, r, n, o, t, h, b, P, T, he]), ye(() => {
|
|
58695
58697
|
V(1), U([]);
|
|
58696
58698
|
}, [r]), ye(() => {
|
|
58697
|
-
e.some((
|
|
58699
|
+
e.some((te) => D.indexOf(te) < 0) && (M(e), ee(!1), E(!1), U([]), V(1), S(0));
|
|
58698
58700
|
}, [e, n, o]), s)
|
|
58699
58701
|
return s({
|
|
58700
58702
|
dataLoaded: j,
|
|
@@ -58711,7 +58713,8 @@ function m_e({
|
|
|
58711
58713
|
setResultsPerPage: C,
|
|
58712
58714
|
selectedInvoiceStatuses: D,
|
|
58713
58715
|
setSelectedInvoiceStatues: M,
|
|
58714
|
-
downloadCSV: H
|
|
58716
|
+
downloadCSV: H,
|
|
58717
|
+
count: O
|
|
58715
58718
|
});
|
|
58716
58719
|
if (!j || !l.entity || !d)
|
|
58717
58720
|
return /* @__PURE__ */ u.jsx("div", {
|
|
@@ -58739,7 +58742,7 @@ function m_e({
|
|
|
58739
58742
|
}, {
|
|
58740
58743
|
title: "Approvers",
|
|
58741
58744
|
field: "approvers",
|
|
58742
|
-
format: (
|
|
58745
|
+
format: (te, Z) => {
|
|
58743
58746
|
var ue;
|
|
58744
58747
|
return Z.approvers.every((ge) => !ge.assignedUserId) ? null : /* @__PURE__ */ u.jsx("div", {
|
|
58745
58748
|
className: "mercoa-gap-1 mercoa-grid",
|
|
@@ -58760,7 +58763,7 @@ function m_e({
|
|
|
58760
58763
|
}, {
|
|
58761
58764
|
title: "Status",
|
|
58762
58765
|
field: "status",
|
|
58763
|
-
format: (
|
|
58766
|
+
format: (te, Z) => /* @__PURE__ */ u.jsx(Yx, {
|
|
58764
58767
|
failureType: Z.failureType,
|
|
58765
58768
|
status: Z.status,
|
|
58766
58769
|
vendorId: Z.vendorId,
|
|
@@ -58775,8 +58778,8 @@ function m_e({
|
|
|
58775
58778
|
title: "Deduction Date",
|
|
58776
58779
|
field: "deductionDate"
|
|
58777
58780
|
}];
|
|
58778
|
-
function
|
|
58779
|
-
return d ? d.some((Z) =>
|
|
58781
|
+
function oe(te) {
|
|
58782
|
+
return d ? d.some((Z) => te.field.startsWith("metadata.") ? !0 : Z[`${te.field}`] && te.format ? te.format(Z[`${te.field}`], Z) : Z[`${te.field}`]) : !1;
|
|
58780
58783
|
}
|
|
58781
58784
|
const de = /* @__PURE__ */ u.jsx("thead", {
|
|
58782
58785
|
children: /* @__PURE__ */ u.jsxs("tr", {
|
|
@@ -58790,47 +58793,47 @@ function m_e({
|
|
|
58790
58793
|
checked: I,
|
|
58791
58794
|
onChange: ie
|
|
58792
58795
|
})
|
|
58793
|
-
}), (i ?? se).map((
|
|
58796
|
+
}), (i ?? se).map((te, Z) => !oe(te) && d.length > 0 ? null : /* @__PURE__ */ u.jsx("th", {
|
|
58794
58797
|
scope: "col",
|
|
58795
58798
|
className: `mercoa-min-w-[12rem] mercoa-py-3.5 mercoa-pl-4 mercoa-pr-3 mercoa-text-left mercoa-text-sm mercoa-font-semibold mercoa-text-gray-900 sm:mercoa-pl-3 ${F.length > 0 ? "mercoa-invisible" : ""}`,
|
|
58796
|
-
children:
|
|
58797
|
-
title:
|
|
58799
|
+
children: te.orderBy ? /* @__PURE__ */ u.jsx(ql, {
|
|
58800
|
+
title: te.title,
|
|
58798
58801
|
setOrder: (ue) => {
|
|
58799
|
-
|
|
58802
|
+
te.orderBy && (y(te.orderBy), v(ue));
|
|
58800
58803
|
},
|
|
58801
|
-
isSelected: h ===
|
|
58804
|
+
isSelected: h === te.orderBy,
|
|
58802
58805
|
orderDirection: b
|
|
58803
|
-
}) :
|
|
58806
|
+
}) : te.title
|
|
58804
58807
|
}, Z))]
|
|
58805
58808
|
})
|
|
58806
58809
|
}), pe = /* @__PURE__ */ u.jsx("tbody", {
|
|
58807
58810
|
className: "mercoa-divide-y mercoa-divide-gray-200 mercoa-bg-white",
|
|
58808
|
-
children: d.map((
|
|
58809
|
-
className: ds("mercoa-cursor-pointer hover:mercoa-bg-gray-100", F.includes(
|
|
58811
|
+
children: d.map((te) => /* @__PURE__ */ u.jsxs("tr", {
|
|
58812
|
+
className: ds("mercoa-cursor-pointer hover:mercoa-bg-gray-100", F.includes(te) ? "mercoa-bg-gray-50" : void 0),
|
|
58810
58813
|
children: [/* @__PURE__ */ u.jsxs("td", {
|
|
58811
58814
|
className: "mercoa-relative mercoa-px-7 sm:mercoa-w-12 sm:mercoa-px-6",
|
|
58812
|
-
children: [F.includes(
|
|
58815
|
+
children: [F.includes(te) && /* @__PURE__ */ u.jsx("div", {
|
|
58813
58816
|
className: "mercoa-absolute mercoa-inset-y-0 mercoa-left-0 mercoa-w-0.5 mercoa-bg-mercoa-primary"
|
|
58814
58817
|
}), /* @__PURE__ */ u.jsx("input", {
|
|
58815
58818
|
type: "checkbox",
|
|
58816
58819
|
className: "mercoa-absolute mercoa-left-4 mercoa-top-1/2 -mercoa-mt-2 mercoa-size-4 mercoa-rounded mercoa-border-gray-300 mercoa-text-mercoa-primary-text focus:mercoa-ring-mercoa-primary",
|
|
58817
|
-
value:
|
|
58818
|
-
checked: F.includes(
|
|
58819
|
-
onChange: (Z) => G(Z.target.checked ? [...F,
|
|
58820
|
+
value: te.id,
|
|
58821
|
+
checked: F.includes(te),
|
|
58822
|
+
onChange: (Z) => G(Z.target.checked ? [...F, te] : F.filter((ue) => ue !== te))
|
|
58820
58823
|
})]
|
|
58821
58824
|
}), (i ?? se).map((Z, ue) => {
|
|
58822
|
-
if (!
|
|
58825
|
+
if (!oe(Z))
|
|
58823
58826
|
return null;
|
|
58824
58827
|
let ge;
|
|
58825
|
-
return Z.field.startsWith("metadata.") ? ge = JSON.stringify(
|
|
58826
|
-
className: `mercoa-whitespace-nowrap mercoa-py-3 mercoa-pl-4 mercoa-pr-3 mercoa-text-sm mercoa-text-gray-900 sm:mercoa-pl-3 ${F.includes(
|
|
58828
|
+
return Z.field.startsWith("metadata.") ? ge = JSON.stringify(te.metadata[Z.field.split(".")[1]]) : ge = te[Z.field], Z.format ? ge = Z.format(ge, te) : Z.field === "amount" ? ge = Un.formatMoney(ge ?? "", bt(te.currency)) : ge instanceof Date ? ge = Te(ge).format("MMM DD, YYYY") : typeof ge == "object" ? ge.name ? ge = ge.name : ge = JSON.stringify(ge) : ge = (ge == null ? void 0 : ge.toString()) ?? "", /* @__PURE__ */ u.jsx("td", {
|
|
58829
|
+
className: `mercoa-whitespace-nowrap mercoa-py-3 mercoa-pl-4 mercoa-pr-3 mercoa-text-sm mercoa-text-gray-900 sm:mercoa-pl-3 ${F.includes(te) ? "mercoa-text-mercoa-primary-text" : "mercoa-text-gray-900"} ${ue === 0 ? "mercoa-font-medium" : ""}`,
|
|
58827
58830
|
onClick: () => {
|
|
58828
|
-
a && a(
|
|
58831
|
+
a && a(te);
|
|
58829
58832
|
},
|
|
58830
58833
|
children: ge
|
|
58831
58834
|
}, ue);
|
|
58832
58835
|
})]
|
|
58833
|
-
},
|
|
58836
|
+
}, te.id))
|
|
58834
58837
|
});
|
|
58835
58838
|
return l.client ? /* @__PURE__ */ u.jsxs("div", {
|
|
58836
58839
|
children: [/* @__PURE__ */ u.jsxs("div", {
|
|
@@ -58879,18 +58882,18 @@ function m_e({
|
|
|
58879
58882
|
onClose: () => ce(!1),
|
|
58880
58883
|
setApprover: me
|
|
58881
58884
|
})]
|
|
58882
|
-
}), D.some((
|
|
58885
|
+
}), D.some((te) => [R.Mercoa.InvoiceStatus.Draft, R.Mercoa.InvoiceStatus.New, R.Mercoa.InvoiceStatus.Approved, R.Mercoa.InvoiceStatus.Failed].includes(te)) && F.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, {
|
|
58883
58886
|
children: [/* @__PURE__ */ u.jsx("button", {
|
|
58884
58887
|
type: "button",
|
|
58885
58888
|
className: "mercoa-inline-flex mercoa-items-center mercoa-rounded mercoa-bg-white mercoa-px-2 mercoa-py-1 mercoa-text-sm mercoa-font-semibold mercoa-text-gray-900 mercoa-shadow-sm mercoa-ring-1 mercoa-ring-inset mercoa-ring-gray-300 hover:mercoa-bg-gray-50 disabled:mercoa-cursor-not-allowed disabled:mercoa-opacity-30 disabled:hover:mercoa-bg-white",
|
|
58886
58889
|
onClick: () => ve(!0),
|
|
58887
|
-
children: D.some((
|
|
58890
|
+
children: D.some((te) => [R.Mercoa.InvoiceStatus.Draft, R.Mercoa.InvoiceStatus.New].includes(te)) ? "Set Payment Date" : "Schedule Payment"
|
|
58888
58891
|
}), /* @__PURE__ */ u.jsx(d_e, {
|
|
58889
58892
|
open: Q,
|
|
58890
58893
|
onClose: () => ve(!1),
|
|
58891
|
-
setDate:
|
|
58894
|
+
setDate: ne
|
|
58892
58895
|
})]
|
|
58893
|
-
}), D.includes(R.Mercoa.InvoiceStatus.New) && F.length > 0 && F.some((
|
|
58896
|
+
}), D.includes(R.Mercoa.InvoiceStatus.New) && F.length > 0 && F.some((te) => te.approvers.some((Z) => {
|
|
58894
58897
|
var ue;
|
|
58895
58898
|
return Z.assignedUserId === ((ue = l.user) == null ? void 0 : ue.id);
|
|
58896
58899
|
})) && /* @__PURE__ */ u.jsxs(u.Fragment, {
|
|
@@ -58912,14 +58915,14 @@ function m_e({
|
|
|
58912
58915
|
confirm("Are you sure you want to delete these invoices? This action cannot be undone.") && xe();
|
|
58913
58916
|
},
|
|
58914
58917
|
children: "Delete"
|
|
58915
|
-
}), D.
|
|
58918
|
+
}), D.some((te) => [R.Mercoa.InvoiceStatus.New, R.Mercoa.InvoiceStatus.Approved, R.Mercoa.InvoiceStatus.Refused, R.Mercoa.InvoiceStatus.Scheduled, R.Mercoa.InvoiceStatus.Failed].includes(te)) && F.length > 0 && /* @__PURE__ */ u.jsx("button", {
|
|
58916
58919
|
type: "button",
|
|
58917
58920
|
className: "mercoa-inline-flex mercoa-items-center mercoa-rounded mercoa-bg-white mercoa-px-2 mercoa-py-1 mercoa-text-sm mercoa-font-semibold mercoa-text-gray-900 mercoa-shadow-sm mercoa-ring-1 mercoa-ring-inset mercoa-ring-gray-300 hover:mercoa-bg-gray-50 disabled:mercoa-cursor-not-allowed disabled:mercoa-opacity-30 disabled:hover:mercoa-bg-white",
|
|
58918
58921
|
onClick: () => {
|
|
58919
|
-
confirm("Are you sure you want to cancel these
|
|
58922
|
+
confirm("Are you sure you want to cancel these invoices? This action cannot be undone.") && we();
|
|
58920
58923
|
},
|
|
58921
|
-
children: "Cancel
|
|
58922
|
-
}), D.some((
|
|
58924
|
+
children: "Cancel"
|
|
58925
|
+
}), D.some((te) => [R.Mercoa.InvoiceStatus.Paid, R.Mercoa.InvoiceStatus.Canceled].includes(te)) && F.length > 0 && /* @__PURE__ */ u.jsx("button", {
|
|
58923
58926
|
type: "button",
|
|
58924
58927
|
className: "mercoa-inline-flex mercoa-items-center mercoa-rounded mercoa-bg-white mercoa-px-2 mercoa-py-1 mercoa-text-sm mercoa-font-semibold mercoa-text-gray-900 mercoa-shadow-sm mercoa-ring-1 mercoa-ring-inset mercoa-ring-gray-300 hover:mercoa-bg-gray-50 disabled:mercoa-cursor-not-allowed disabled:mercoa-opacity-30 disabled:hover:mercoa-bg-white",
|
|
58925
58928
|
onClick: () => {
|
|
@@ -59521,10 +59524,10 @@ function GE({
|
|
|
59521
59524
|
}
|
|
59522
59525
|
} = Nr();
|
|
59523
59526
|
ye(() => {
|
|
59524
|
-
var ce, he, ee, ie,
|
|
59525
|
-
e && (((ce = e.paymentDestination) == null ? void 0 : ce.type) === "custom" ? b("paymentDestinationType", ((he = e.paymentDestination) == null ? void 0 : he.schemaId) ?? "") : b("paymentDestinationType", ((ee = e.paymentDestination) == null ? void 0 : ee.type) ?? ""), ((ie = e.paymentSource) == null ? void 0 : ie.type) === "custom" ? b("paymentSourceType", ((
|
|
59527
|
+
var ce, he, ee, ie, ne, me, be, _e, xe, Ke, we, Oe;
|
|
59528
|
+
e && (((ce = e.paymentDestination) == null ? void 0 : ce.type) === "custom" ? b("paymentDestinationType", ((he = e.paymentDestination) == null ? void 0 : he.schemaId) ?? "") : b("paymentDestinationType", ((ee = e.paymentDestination) == null ? void 0 : ee.type) ?? ""), ((ie = e.paymentSource) == null ? void 0 : ie.type) === "custom" ? b("paymentSourceType", ((ne = e.paymentSource) == null ? void 0 : ne.schemaId) ?? "") : b("paymentSourceType", ((me = e.paymentSource) == null ? void 0 : me.type) ?? ""), b("id", e.id), b("status", e.status), b("invoiceNumber", e.invoiceNumber), b("amount", e.amount), b("currency", e.currency ?? "USD"), b("payerId", (be = e.payer) == null ? void 0 : be.id), b("payerName", (_e = e.payer) == null ? void 0 : _e.name), b("invoiceDate", e.invoiceDate ? Te(e.invoiceDate).toDate() : void 0), b("dueDate", e.dueDate ? Te(e.dueDate).toDate() : void 0), b("deductionDate", e.deductionDate ? Te(e.deductionDate).toDate() : void 0), b("lineItems", e.lineItems ?? []), b("paymentDestinationId", (xe = e.paymentDestination) == null ? void 0 : xe.id), b("paymentDestinationOptions", e.paymentDestinationOptions), b("paymentSourceId", (Ke = e.paymentSource) == null ? void 0 : Ke.id), b("paymentSourceCheckEnabled", ((Oe = (we = e.paymentSource) == null ? void 0 : we.checkOptions) == null ? void 0 : Oe.enabled) ?? !1), b("description", e.noteToSelf ?? ""), b("hasDocuments", e.hasDocuments ?? !1), b("saveAsStatus", ""), b("saveAsAdmin", !1), b("metadata", e.metadata ?? {}), b("creatorUser", e == null ? void 0 : e.creatorUser), b("comments", (e == null ? void 0 : e.comments) ?? []));
|
|
59526
59529
|
}, [e]), ye(() => {
|
|
59527
|
-
var ce, he, ee, ie,
|
|
59530
|
+
var ce, he, ee, ie, ne;
|
|
59528
59531
|
e != null && e.id && (b("status", e == null ? void 0 : e.status), b("invoiceNumber", e == null ? void 0 : e.invoiceNumber), e != null && e.amount && b("amount", e.amount), b("currency", (e == null ? void 0 : e.currency) ?? "USD"), b("payerId", (ce = e == null ? void 0 : e.payer) == null ? void 0 : ce.id), b("payerName", (he = e == null ? void 0 : e.payer) == null ? void 0 : he.name), e != null && e.invoiceDate && b("invoiceDate", Te(e.invoiceDate).toDate()), e != null && e.dueDate && b("dueDate", Te(e == null ? void 0 : e.dueDate).toDate()), b("deductionDate", e != null && e.deductionDate ? Te(e == null ? void 0 : e.deductionDate).toDate() : void 0), b("lineItems", ((ee = e == null ? void 0 : e.lineItems) == null ? void 0 : ee.map((me) => ({
|
|
59529
59532
|
description: me.description ?? "",
|
|
59530
59533
|
currency: me.currency ?? "USD",
|
|
@@ -59537,7 +59540,7 @@ function GE({
|
|
|
59537
59540
|
id: me.id ?? "",
|
|
59538
59541
|
createdAt: me.createdAt ?? /* @__PURE__ */ new Date(),
|
|
59539
59542
|
updatedAt: me.updatedAt ?? /* @__PURE__ */ new Date()
|
|
59540
|
-
}))) ?? []), b("paymentDestinationId", (ie = e == null ? void 0 : e.paymentDestination) == null ? void 0 : ie.id), b("paymentDestinationOptions", e == null ? void 0 : e.paymentDestinationOptions), b("paymentSourceId", (
|
|
59543
|
+
}))) ?? []), b("paymentDestinationId", (ie = e == null ? void 0 : e.paymentDestination) == null ? void 0 : ie.id), b("paymentDestinationOptions", e == null ? void 0 : e.paymentDestinationOptions), b("paymentSourceId", (ne = e == null ? void 0 : e.paymentSource) == null ? void 0 : ne.id), b("description", (e == null ? void 0 : e.noteToSelf) ?? ""));
|
|
59541
59544
|
}, [e, b]);
|
|
59542
59545
|
const {
|
|
59543
59546
|
fields: E,
|
|
@@ -59555,8 +59558,8 @@ function GE({
|
|
|
59555
59558
|
b(`lineItems.${_e}.currency`, ce.currency ?? "USD");
|
|
59556
59559
|
}), !(he != null && he.startsWith("lineItems")) || he.endsWith("amount"))
|
|
59557
59560
|
return;
|
|
59558
|
-
let
|
|
59559
|
-
|
|
59561
|
+
let ne = ce.lineItems.reduce((me, be, _e) => (be.amount = Math.floor((be.quantity ?? 1) * (be.unitPrice ?? 1) * 100) / 100, b(`lineItems.${_e}.amount`, be.amount), me + be.amount), 0);
|
|
59562
|
+
ne = Math.floor(ne * 100) / 100, b("amount", ne);
|
|
59560
59563
|
});
|
|
59561
59564
|
const P = _("payerId"), U = _("payerName"), T = _("currency");
|
|
59562
59565
|
function C() {
|
|
@@ -59579,11 +59582,11 @@ function GE({
|
|
|
59579
59582
|
}, [p.entityId]), ye(() => {
|
|
59580
59583
|
var ce, he;
|
|
59581
59584
|
!p.token || !((ce = p.entity) != null && ce.id) || !p.client || (N(), (he = p.client) == null || he.customPaymentMethodSchema.getAll().then((ee) => {
|
|
59582
|
-
var ie,
|
|
59585
|
+
var ie, ne;
|
|
59583
59586
|
if (ee) {
|
|
59584
59587
|
l(ee);
|
|
59585
59588
|
let me = [];
|
|
59586
|
-
((
|
|
59589
|
+
((ne = (ie = p.organization) == null ? void 0 : ie.paymentMethods) == null ? void 0 : ne.payerPayments.some((_e) => _e.active && (_e.type === "bankAccount" || _e.type === "card"))) && me.push("USD"), ee.forEach((_e) => {
|
|
59587
59590
|
_e.supportedCurrencies && (me = [.../* @__PURE__ */ new Set([...me, ..._e.supportedCurrencies])]);
|
|
59588
59591
|
}), a(me);
|
|
59589
59592
|
}
|
|
@@ -59619,7 +59622,7 @@ function GE({
|
|
|
59619
59622
|
const ie = await ((ee = p.client) == null ? void 0 : ee.invoice.paymentLinks.sendPayerEmail(e.id));
|
|
59620
59623
|
ie ? navigator.clipboard.writeText(ie).then(function() {
|
|
59621
59624
|
je.info("Email Sent");
|
|
59622
|
-
}, function(
|
|
59625
|
+
}, function(ne) {
|
|
59623
59626
|
je.error("There was an issue generating the email. Please refresh and try again.");
|
|
59624
59627
|
}) : je.error("There was an issue generating the email. Please refresh and try again.");
|
|
59625
59628
|
} catch (ie) {
|
|
@@ -59629,7 +59632,7 @@ function GE({
|
|
|
59629
59632
|
}
|
|
59630
59633
|
}
|
|
59631
59634
|
async function A(ce) {
|
|
59632
|
-
var ie,
|
|
59635
|
+
var ie, ne;
|
|
59633
59636
|
if (!p.entityId)
|
|
59634
59637
|
return;
|
|
59635
59638
|
const he = {
|
|
@@ -59656,7 +59659,7 @@ function GE({
|
|
|
59656
59659
|
he.payerId && p.entityId && await ((ie = p.client) == null ? void 0 : ie.entity.counterparty.addPayors(p.entityId, {
|
|
59657
59660
|
payors: [he.payerId]
|
|
59658
59661
|
}));
|
|
59659
|
-
const ee = await ((
|
|
59662
|
+
const ee = await ((ne = p.client) == null ? void 0 : ne.invoice.create(he));
|
|
59660
59663
|
p.debug(ee), ee != null && ee.id ? (je.success("Invoice created"), r && r(ee)) : je.error("Invoice failed to create");
|
|
59661
59664
|
}
|
|
59662
59665
|
const X = ["Description", "Quantity", "Unit Price", "Total Amount"];
|
|
@@ -60690,7 +60693,7 @@ function O_e({
|
|
|
60690
60693
|
I = G.data[G.data.length - 1].id, A = [...A, ...G.data], await X();
|
|
60691
60694
|
else {
|
|
60692
60695
|
const le = bA.unparse(A.map((ie) => {
|
|
60693
|
-
var
|
|
60696
|
+
var ne, me, be, _e, xe, Ke;
|
|
60694
60697
|
return {
|
|
60695
60698
|
"Invoice ID": ie.id,
|
|
60696
60699
|
"Invoice Number": ie.invoiceNumber,
|
|
@@ -60698,7 +60701,7 @@ function O_e({
|
|
|
60698
60701
|
Amount: ie.amount,
|
|
60699
60702
|
Currency: ie.currency,
|
|
60700
60703
|
Note: ie.noteToSelf,
|
|
60701
|
-
"Payer ID": (
|
|
60704
|
+
"Payer ID": (ne = ie.payer) == null ? void 0 : ne.id,
|
|
60702
60705
|
"Payer Email": (me = ie.payer) == null ? void 0 : me.email,
|
|
60703
60706
|
"Payer Name": (be = ie.payer) == null ? void 0 : be.name,
|
|
60704
60707
|
"Vendor ID": (_e = ie.vendor) == null ? void 0 : _e.id,
|
|
@@ -60762,7 +60765,8 @@ function O_e({
|
|
|
60762
60765
|
setResultsPerPage: C,
|
|
60763
60766
|
selectedInvoiceStatuses: j,
|
|
60764
60767
|
setSelectedInvoiceStatues: E,
|
|
60765
|
-
downloadCSV:
|
|
60768
|
+
downloadCSV: $,
|
|
60769
|
+
count: g
|
|
60766
60770
|
}) : O ? /* @__PURE__ */ u.jsx(u.Fragment, {
|
|
60767
60771
|
children: l.entity && d ? /* @__PURE__ */ u.jsxs(u.Fragment, {
|
|
60768
60772
|
children: [/* @__PURE__ */ u.jsx("div", {
|