@mercoa/react 0.0.46-rc2 → 0.0.46-rc3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +392 -392
- 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([]);
|
|
@@ -39679,7 +39679,7 @@ function kfe({
|
|
|
39679
39679
|
type: n,
|
|
39680
39680
|
children: o
|
|
39681
39681
|
}) {
|
|
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,
|
|
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, ne, me, be, _e, xe, Ke, we, Oe, Ae, H, se, oe;
|
|
39683
39683
|
const a = $e(), [i, s] = ae(!1), [l, d] = ae(void 0), [f, m] = ae(e);
|
|
39684
39684
|
if (ye(() => {
|
|
39685
39685
|
if (!a.client || !a.entityId || !r || e || f)
|
|
@@ -39761,7 +39761,7 @@ function kfe({
|
|
|
39761
39761
|
}), /* @__PURE__ */ u.jsxs("div", {
|
|
39762
39762
|
children: [/* @__PURE__ */ u.jsxs("dd", {
|
|
39763
39763
|
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, (
|
|
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, (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
39765
|
}), t && /* @__PURE__ */ u.jsx("div", {
|
|
39766
39766
|
className: "mercoa-text-sm mercoa-leading-6 mercoa-text-gray-400 mercoa-select-all",
|
|
39767
39767
|
children: f.id
|
|
@@ -39775,14 +39775,14 @@ function kfe({
|
|
|
39775
39775
|
size: "sm",
|
|
39776
39776
|
className: "mercoa-ml-5",
|
|
39777
39777
|
onClick: async () => {
|
|
39778
|
-
var pe,
|
|
39778
|
+
var pe, te;
|
|
39779
39779
|
if (!a.entityId)
|
|
39780
39780
|
return;
|
|
39781
39781
|
let de;
|
|
39782
39782
|
n === "payor" ? de = await ((pe = a.client) == null ? void 0 : pe.entity.getOnboardingLink(f.id, {
|
|
39783
39783
|
expiresIn: "30d",
|
|
39784
39784
|
type: R.Mercoa.EntityOnboardingLinkType.Payor
|
|
39785
|
-
})) : de = await ((
|
|
39785
|
+
})) : de = await ((te = a.client) == null ? void 0 : te.entity.getOnboardingLink(f.id, {
|
|
39786
39786
|
expiresIn: "30d",
|
|
39787
39787
|
type: R.Mercoa.EntityOnboardingLinkType.Payee
|
|
39788
39788
|
})), de ? navigator.clipboard.writeText(de).then(function() {
|
|
@@ -39931,7 +39931,7 @@ function kfe({
|
|
|
39931
39931
|
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
39932
|
}), /* @__PURE__ */ u.jsx("div", {
|
|
39933
39933
|
className: "mercoa-grid mercoa-grid-cols-3 mercoa-gap-2 mercoa-ml-4 mercoa-p-2",
|
|
39934
|
-
children: (
|
|
39934
|
+
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
39935
|
method: de
|
|
39936
39936
|
}, de.id))
|
|
39937
39937
|
})]
|
|
@@ -41045,11 +41045,11 @@ var o$ = { exports: {} };
|
|
|
41045
41045
|
}, $.valueOf = function() {
|
|
41046
41046
|
return this.$d.getTime();
|
|
41047
41047
|
}, $.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,
|
|
41048
|
+
var X = this, W = !!T.u(A) || A, F = T.p(I), G = function(ne, me) {
|
|
41049
|
+
var be = T.w(X.$u ? Date.UTC(X.$y, me, ne) : new Date(X.$y, me, ne), X);
|
|
41050
41050
|
return W ? be : be.endOf(d);
|
|
41051
|
-
}, Q = function(
|
|
41052
|
-
return T.w(X.toDate()[
|
|
41051
|
+
}, Q = function(ne, me) {
|
|
41052
|
+
return T.w(X.toDate()[ne].apply(X.toDate("s"), (W ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(me)), X);
|
|
41053
41053
|
}, ve = this.$W, le = this.$M, ce = this.$D, he = "set" + (this.$u ? "UTC" : "");
|
|
41054
41054
|
switch (F) {
|
|
41055
41055
|
case h:
|
|
@@ -41112,7 +41112,7 @@ var o$ = { exports: {} };
|
|
|
41112
41112
|
return me && (me[be] || me(A, W)) || _e[be].slice(0, xe);
|
|
41113
41113
|
}, ie = function(me) {
|
|
41114
41114
|
return T.s(G % 12 || 12, me, "0");
|
|
41115
|
-
},
|
|
41115
|
+
}, ne = he || function(me, be, _e) {
|
|
41116
41116
|
var xe = me < 12 ? "AM" : "PM";
|
|
41117
41117
|
return _e ? xe.toLowerCase() : xe;
|
|
41118
41118
|
};
|
|
@@ -41152,9 +41152,9 @@ var o$ = { exports: {} };
|
|
|
41152
41152
|
case "hh":
|
|
41153
41153
|
return ie(2);
|
|
41154
41154
|
case "a":
|
|
41155
|
-
return
|
|
41155
|
+
return ne(G, Q, !0);
|
|
41156
41156
|
case "A":
|
|
41157
|
-
return
|
|
41157
|
+
return ne(G, Q, !1);
|
|
41158
41158
|
case "m":
|
|
41159
41159
|
return String(Q);
|
|
41160
41160
|
case "mm":
|
|
@@ -41679,12 +41679,12 @@ function p$(e) {
|
|
|
41679
41679
|
}, ve = function(we) {
|
|
41680
41680
|
var Oe = we.formattedValue;
|
|
41681
41681
|
Oe === void 0 && (Oe = "");
|
|
41682
|
-
var Ae = we.input, H = we.source, se = we.event,
|
|
41682
|
+
var Ae = we.input, H = we.source, se = we.event, oe = we.numAsString, de;
|
|
41683
41683
|
if (Ae) {
|
|
41684
|
-
var pe = we.inputValue || Ae.value,
|
|
41685
|
-
Ae.value = Oe, de = Q(pe, Oe,
|
|
41684
|
+
var pe = we.inputValue || Ae.value, te = f_(Ae);
|
|
41685
|
+
Ae.value = Oe, de = Q(pe, Oe, te), de !== void 0 && F(Ae, de, Oe);
|
|
41686
41686
|
}
|
|
41687
|
-
Oe !== M && C(W(Oe,
|
|
41687
|
+
Oe !== M && C(W(Oe, oe), { event: se, source: H });
|
|
41688
41688
|
};
|
|
41689
41689
|
ye(function() {
|
|
41690
41690
|
var we = T.current, Oe = we.formattedValue, Ae = we.numAsString;
|
|
@@ -41702,14 +41702,14 @@ function p$(e) {
|
|
|
41702
41702
|
}
|
|
41703
41703
|
}, [M]);
|
|
41704
41704
|
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,
|
|
41705
|
+
var H = l$(M, we), se = Object.assign(Object.assign({}, H), { lastValue: M }), oe = s(we, se), de = X(oe);
|
|
41706
|
+
if (oe = s(de, void 0), m && !m(W(de, oe))) {
|
|
41707
|
+
var pe = Oe.target, te = f_(pe), Z = Q(we, M, te);
|
|
41708
41708
|
return pe.value = M, F(pe, Z, M), !1;
|
|
41709
41709
|
}
|
|
41710
41710
|
return ve({
|
|
41711
41711
|
formattedValue: de,
|
|
41712
|
-
numAsString:
|
|
41712
|
+
numAsString: oe,
|
|
41713
41713
|
inputValue: we,
|
|
41714
41714
|
event: Oe,
|
|
41715
41715
|
source: Ae,
|
|
@@ -41719,26 +41719,26 @@ function p$(e) {
|
|
|
41719
41719
|
var Oe = we.target, Ae = Oe.value, H = he(Ae, we, md.event);
|
|
41720
41720
|
H && p(we);
|
|
41721
41721
|
}, ie = function(we) {
|
|
41722
|
-
var Oe = we.target, Ae = we.key, H = Oe.selectionStart, se = Oe.selectionEnd,
|
|
41723
|
-
|
|
41722
|
+
var Oe = we.target, Ae = we.key, H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41723
|
+
oe === void 0 && (oe = "");
|
|
41724
41724
|
var de;
|
|
41725
|
-
if (Ae === "ArrowLeft" || Ae === "Backspace" ? de = Math.max(H - 1, 0) : Ae === "ArrowRight" ? de = Math.min(H + 1,
|
|
41725
|
+
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
41726
|
h(we);
|
|
41727
41727
|
return;
|
|
41728
41728
|
}
|
|
41729
41729
|
var pe = de;
|
|
41730
41730
|
if (Ae === "ArrowLeft" || Ae === "ArrowRight") {
|
|
41731
|
-
var
|
|
41732
|
-
pe = G(
|
|
41731
|
+
var te = Ae === "ArrowLeft" ? "left" : "right";
|
|
41732
|
+
pe = G(oe, de, te), pe !== de && we.preventDefault();
|
|
41733
41733
|
} else
|
|
41734
|
-
Ae === "Delete" && !O(
|
|
41735
|
-
pe !== de && F(Oe, pe,
|
|
41736
|
-
},
|
|
41734
|
+
Ae === "Delete" && !O(oe[de]) ? pe = G(oe, de, "right") : Ae === "Backspace" && !O(oe[de]) && (pe = G(oe, de, "left"));
|
|
41735
|
+
pe !== de && F(Oe, pe, oe), we.isUnitTestRun && F(Oe, pe, oe), h(we);
|
|
41736
|
+
}, ne = function(we) {
|
|
41737
41737
|
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,
|
|
41738
|
+
var H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41739
|
+
if (oe === void 0 && (oe = ""), H === se) {
|
|
41740
|
+
var de = G(oe, H);
|
|
41741
|
+
de !== H && F(Oe, de, oe);
|
|
41742
41742
|
}
|
|
41743
41743
|
};
|
|
41744
41744
|
Ae(), requestAnimationFrame(function() {
|
|
@@ -41748,10 +41748,10 @@ function p$(e) {
|
|
|
41748
41748
|
we.persist && we.persist();
|
|
41749
41749
|
var Oe = we.target, Ae = we.currentTarget;
|
|
41750
41750
|
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 ===
|
|
41751
|
+
var H = Oe.selectionStart, se = Oe.selectionEnd, oe = Oe.value;
|
|
41752
|
+
oe === void 0 && (oe = "");
|
|
41753
|
+
var de = G(oe, H);
|
|
41754
|
+
de !== H && !(H === 0 && se === oe.length) && F(Oe, de, oe), b(Object.assign(Object.assign({}, we), { currentTarget: Ae }));
|
|
41755
41755
|
}, 0);
|
|
41756
41756
|
}, be = function(we) {
|
|
41757
41757
|
I.current = null, clearTimeout(A.current.focusTimeout), clearTimeout(A.current.setCaretTimeout), v(we);
|
|
@@ -41760,7 +41760,7 @@ function p$(e) {
|
|
|
41760
41760
|
value: M,
|
|
41761
41761
|
onChange: ee,
|
|
41762
41762
|
onKeyDown: ie,
|
|
41763
|
-
onMouseUp:
|
|
41763
|
+
onMouseUp: ne,
|
|
41764
41764
|
onFocus: me,
|
|
41765
41765
|
onBlur: be
|
|
41766
41766
|
});
|
|
@@ -43324,7 +43324,7 @@ function jx({
|
|
|
43324
43324
|
onCancel: n,
|
|
43325
43325
|
admin: o
|
|
43326
43326
|
}) {
|
|
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,
|
|
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, ne, me, be, _e, xe, Ke, we, Oe, Ae, H, se;
|
|
43328
43328
|
const a = $e(), {
|
|
43329
43329
|
register: i,
|
|
43330
43330
|
handleSubmit: s,
|
|
@@ -43349,7 +43349,7 @@ function jx({
|
|
|
43349
43349
|
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
43350
|
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
43351
|
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 = (
|
|
43352
|
+
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
43353
|
taxID: (be = e.profile.individual) != null && be.governmentIdProvided ? "****" : (_e = e.profile.business) != null && _e.taxIdProvided ? "**-*******" : "",
|
|
43354
43354
|
dob: /* @__PURE__ */ new Date(),
|
|
43355
43355
|
legalBusinessName: ((xe = e.profile.business) == null ? void 0 : xe.legalBusinessName) ?? "",
|
|
@@ -43363,14 +43363,14 @@ function jx({
|
|
|
43363
43363
|
isPayor: e.isPayor,
|
|
43364
43364
|
isPayee: e.isPayee
|
|
43365
43365
|
},
|
|
43366
|
-
resolver: async (
|
|
43366
|
+
resolver: async (oe, de, pe) => oe.accountType === R.Mercoa.AccountType.Individual ? Fo(gn({
|
|
43367
43367
|
...(y == null ? void 0 : y.individual.name.required) && gx,
|
|
43368
43368
|
...(y == null ? void 0 : y.individual.email.required) && cy,
|
|
43369
43369
|
...(y == null ? void 0 : y.individual.phone.required) && mO,
|
|
43370
43370
|
...(y == null ? void 0 : y.individual.dateOfBirth.required) && h$,
|
|
43371
43371
|
...(y == null ? void 0 : y.individual.address.required) && dO,
|
|
43372
43372
|
...(y == null ? void 0 : y.individual.ssn.required) && b$
|
|
43373
|
-
}).required())(
|
|
43373
|
+
}).required())(oe, de, pe) : Fo(gn({
|
|
43374
43374
|
...(y == null ? void 0 : y.business.name.required) && g$,
|
|
43375
43375
|
...(y == null ? void 0 : y.business.email.required) && cy,
|
|
43376
43376
|
...(y == null ? void 0 : y.business.phone.required) && mO,
|
|
@@ -43379,7 +43379,7 @@ function jx({
|
|
|
43379
43379
|
...(y == null ? void 0 : y.business.ein.required) && Gme,
|
|
43380
43380
|
...(y == null ? void 0 : y.business.formationDate.required) && epe,
|
|
43381
43381
|
...(y == null ? void 0 : y.business.description.required) && Zme
|
|
43382
|
-
}).required())(
|
|
43382
|
+
}).required())(oe, de, pe)
|
|
43383
43383
|
}), h = m("accountType");
|
|
43384
43384
|
if (!a.client)
|
|
43385
43385
|
return /* @__PURE__ */ u.jsx(Qe, {
|
|
@@ -43388,19 +43388,19 @@ function jx({
|
|
|
43388
43388
|
if (!a.organization)
|
|
43389
43389
|
return /* @__PURE__ */ u.jsx(tp, {});
|
|
43390
43390
|
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[
|
|
43391
|
+
return o && y && (Object.keys(y.individual).forEach((oe) => {
|
|
43392
|
+
y.individual[oe].show = !0, y.individual[oe].edit = !0, y.individual[oe].required = !1;
|
|
43393
|
+
}), Object.keys(y.business).forEach((oe) => {
|
|
43394
|
+
y.business[oe].show = !0, y.business[oe].edit = !0, y.business[oe].required = !1;
|
|
43395
43395
|
}), y.paymentMethod = !1), /* @__PURE__ */ u.jsxs("form", {
|
|
43396
|
-
onSubmit: s(async (
|
|
43397
|
-
e &&
|
|
43398
|
-
data:
|
|
43396
|
+
onSubmit: s(async (oe) => {
|
|
43397
|
+
e && oe && a.client && (await Ox({
|
|
43398
|
+
data: oe,
|
|
43399
43399
|
entityId: e.id,
|
|
43400
43400
|
mercoaClient: a.client,
|
|
43401
|
-
isPayee: o ?
|
|
43402
|
-
isPayor: o ?
|
|
43403
|
-
}), o && je.success("Entity Updated"), t ? t(
|
|
43401
|
+
isPayee: o ? oe.isPayee : r === "payee",
|
|
43402
|
+
isPayor: o ? oe.isPayor : r === "payor"
|
|
43403
|
+
}), o && je.success("Entity Updated"), t ? t(oe) : a.refresh());
|
|
43404
43404
|
}),
|
|
43405
43405
|
children: [/* @__PURE__ */ u.jsxs("div", {
|
|
43406
43406
|
className: "sm:mercoa-grid sm:mercoa-grid-cols-2 mercoa-gap-3",
|
|
@@ -45283,9 +45283,9 @@ function jpe({
|
|
|
45283
45283
|
return ye(() => {
|
|
45284
45284
|
if (!(_ != null && _.colorScheme))
|
|
45285
45285
|
return;
|
|
45286
|
-
const Q = (
|
|
45287
|
-
|
|
45288
|
-
let [be, _e, xe] =
|
|
45286
|
+
const Q = (ne, me) => {
|
|
45287
|
+
ne = ne.replace(/^#/, ""), ne.length === 3 && (ne = ne[0] + ne[0] + ne[1] + ne[1] + ne[2] + ne[2]);
|
|
45288
|
+
let [be, _e, xe] = ne.match(/.{2}/g);
|
|
45289
45289
|
[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
45290
|
const Ke = (be.length < 2 ? "0" : "") + be, we = (_e.length < 2 ? "0" : "") + _e, Oe = (xe.length < 2 ? "0" : "") + xe;
|
|
45291
45291
|
return `#${Ke}${we}${Oe}`;
|
|
@@ -48027,7 +48027,7 @@ function Xye() {
|
|
|
48027
48027
|
var he = It(function(Z) {
|
|
48028
48028
|
M ? M(Z) : console.error(Z);
|
|
48029
48029
|
}, [M]), ee = It(function(Z) {
|
|
48030
|
-
Z.preventDefault(), Z.persist(),
|
|
48030
|
+
Z.preventDefault(), Z.persist(), oe(Z), le.current = [].concat($ye(le.current), [Z.target]), dh(Z) && Promise.resolve(o(Z)).then(function(ue) {
|
|
48031
48031
|
if (!(dy(Z) && !D)) {
|
|
48032
48032
|
var ge = ue.length, z = ge > 0 && xye({
|
|
48033
48033
|
files: ue,
|
|
@@ -48049,7 +48049,7 @@ function Xye() {
|
|
|
48049
48049
|
return he(ue);
|
|
48050
48050
|
});
|
|
48051
48051
|
}, [o, d, he, D, U, i, a, s, l, P]), ie = It(function(Z) {
|
|
48052
|
-
Z.preventDefault(), Z.persist(),
|
|
48052
|
+
Z.preventDefault(), Z.persist(), oe(Z);
|
|
48053
48053
|
var ue = dh(Z);
|
|
48054
48054
|
if (ue && Z.dataTransfer)
|
|
48055
48055
|
try {
|
|
@@ -48057,8 +48057,8 @@ function Xye() {
|
|
|
48057
48057
|
} catch {
|
|
48058
48058
|
}
|
|
48059
48059
|
return ue && m && m(Z), !1;
|
|
48060
|
-
}, [m, D]),
|
|
48061
|
-
Z.preventDefault(), Z.persist(),
|
|
48060
|
+
}, [m, D]), ne = It(function(Z) {
|
|
48061
|
+
Z.preventDefault(), Z.persist(), oe(Z);
|
|
48062
48062
|
var ue = le.current.filter(function(z) {
|
|
48063
48063
|
return V.current && V.current.contains(z);
|
|
48064
48064
|
}), ge = ue.indexOf(Z.target);
|
|
@@ -48094,7 +48094,7 @@ function Xye() {
|
|
|
48094
48094
|
type: "setFiles"
|
|
48095
48095
|
}), p && p(ge, z, ue), z.length > 0 && y && y(z, ue), ge.length > 0 && h && h(ge, ue);
|
|
48096
48096
|
}, [W, s, U, i, a, l, p, h, y, P]), be = It(function(Z) {
|
|
48097
|
-
Z.preventDefault(), Z.persist(),
|
|
48097
|
+
Z.preventDefault(), Z.persist(), oe(Z), le.current = [], dh(Z) && Promise.resolve(o(Z)).then(function(ue) {
|
|
48098
48098
|
dy(Z) && !D || me(ue, Z);
|
|
48099
48099
|
}).catch(function(ue) {
|
|
48100
48100
|
return he(ue);
|
|
@@ -48144,7 +48144,7 @@ function Xye() {
|
|
|
48144
48144
|
return j ? null : Ae(ue);
|
|
48145
48145
|
}, se = function(ue) {
|
|
48146
48146
|
return E ? null : Ae(ue);
|
|
48147
|
-
},
|
|
48147
|
+
}, oe = function(ue) {
|
|
48148
48148
|
D && ue.stopPropagation();
|
|
48149
48149
|
}, de = lr(function() {
|
|
48150
48150
|
return function() {
|
|
@@ -48156,16 +48156,16 @@ function Xye() {
|
|
|
48156
48156
|
onClick: Ae(Yo(re, Oe)),
|
|
48157
48157
|
onDragEnter: se(Yo(fe, ee)),
|
|
48158
48158
|
onDragOver: se(Yo(k, ie)),
|
|
48159
|
-
onDragLeave: se(Yo(Ue,
|
|
48159
|
+
onDragLeave: se(Yo(Ue, ne)),
|
|
48160
48160
|
onDrop: se(Yo(Xe, be)),
|
|
48161
48161
|
role: typeof z == "string" && z !== "" ? z : "presentation"
|
|
48162
48162
|
}, ge, V), !n && !j ? {
|
|
48163
48163
|
tabIndex: 0
|
|
48164
48164
|
} : {}), Ye);
|
|
48165
48165
|
};
|
|
48166
|
-
}, [V, xe, Ke, we, Oe, ee, ie,
|
|
48166
|
+
}, [V, xe, Ke, we, Oe, ee, ie, ne, be, j, E, n]), pe = It(function(Z) {
|
|
48167
48167
|
Z.stopPropagation();
|
|
48168
|
-
}, []),
|
|
48168
|
+
}, []), te = lr(function() {
|
|
48169
48169
|
return function() {
|
|
48170
48170
|
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
48171
|
accept: U,
|
|
@@ -48184,7 +48184,7 @@ function Xye() {
|
|
|
48184
48184
|
return vt(vt({}, X), {}, {
|
|
48185
48185
|
isFocused: F && !n,
|
|
48186
48186
|
getRootProps: de,
|
|
48187
|
-
getInputProps:
|
|
48187
|
+
getInputProps: te,
|
|
48188
48188
|
rootRef: V,
|
|
48189
48189
|
inputRef: $,
|
|
48190
48190
|
open: Ae(_e)
|
|
@@ -48429,7 +48429,7 @@ function nE({
|
|
|
48429
48429
|
invoicePreSubmit: l,
|
|
48430
48430
|
children: d
|
|
48431
48431
|
}) {
|
|
48432
|
-
var N, V, $, I, A, X, W, F, G, Q, ve, le, ce, he, ee, ie,
|
|
48432
|
+
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
48433
|
const f = $e(), [m, p] = ae(e == null ? void 0 : e.vendor), [h, y] = ae(!1), b = gn({
|
|
48434
48434
|
id: Ie().nullable(),
|
|
48435
48435
|
status: Ie(),
|
|
@@ -48535,10 +48535,10 @@ function nE({
|
|
|
48535
48535
|
accountType: (Q = e == null ? void 0 : e.vendor) == null ? void 0 : Q.accountType,
|
|
48536
48536
|
name: (ve = e == null ? void 0 : e.vendor) == null ? void 0 : ve.name,
|
|
48537
48537
|
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 = (
|
|
48538
|
+
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
48539
|
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
48540
|
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: ((
|
|
48541
|
+
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
48542
|
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
48543
|
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
48544
|
}
|
|
@@ -51070,12 +51070,12 @@ License: MIT
|
|
|
51070
51070
|
0 < ie && (ce += C), ce += G(Q[ie], ie);
|
|
51071
51071
|
0 < ve.length && (ce += N);
|
|
51072
51072
|
}
|
|
51073
|
-
for (var
|
|
51074
|
-
var me = he ? Q.length : ve[
|
|
51075
|
-
if (le && !he && (be = le === "greedy" ? ve[
|
|
51073
|
+
for (var ne = 0; ne < ve.length; ne++) {
|
|
51074
|
+
var me = he ? Q.length : ve[ne].length, be = !1, _e = he ? Object.keys(ve[ne]).length === 0 : ve[ne].length === 0;
|
|
51075
|
+
if (le && !he && (be = le === "greedy" ? ve[ne].join("").trim() === "" : ve[ne].length === 1 && ve[ne][0].length === 0), le === "greedy" && he) {
|
|
51076
51076
|
for (var xe = [], Ke = 0; Ke < me; Ke++) {
|
|
51077
51077
|
var we = ee ? Q[Ke] : Ke;
|
|
51078
|
-
xe.push(ve[
|
|
51078
|
+
xe.push(ve[ne][we]);
|
|
51079
51079
|
}
|
|
51080
51080
|
be = xe.join("").trim() === "";
|
|
51081
51081
|
}
|
|
@@ -51083,9 +51083,9 @@ License: MIT
|
|
|
51083
51083
|
for (var Oe = 0; Oe < me; Oe++) {
|
|
51084
51084
|
0 < Oe && !_e && (ce += C);
|
|
51085
51085
|
var Ae = he && ee ? Q[Oe] : Oe;
|
|
51086
|
-
ce += G(ve[
|
|
51086
|
+
ce += G(ve[ne][Ae], Oe);
|
|
51087
51087
|
}
|
|
51088
|
-
|
|
51088
|
+
ne < ve.length - 1 && (!le || 0 < me && !_e) && (ce += N);
|
|
51089
51089
|
}
|
|
51090
51090
|
}
|
|
51091
51091
|
return ce;
|
|
@@ -51276,38 +51276,38 @@ License: MIT
|
|
|
51276
51276
|
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
51277
|
if (D(M.step)) {
|
|
51278
51278
|
var ve = M.step;
|
|
51279
|
-
M.step = function(
|
|
51280
|
-
if (Q =
|
|
51279
|
+
M.step = function(ne) {
|
|
51280
|
+
if (Q = ne, he())
|
|
51281
51281
|
ce();
|
|
51282
51282
|
else {
|
|
51283
51283
|
if (ce(), Q.data.length === 0)
|
|
51284
51284
|
return;
|
|
51285
|
-
A +=
|
|
51285
|
+
A += ne.data.length, M.preview && A > M.preview ? U.abort() : (Q.data = Q.data[0], ve(Q, I));
|
|
51286
51286
|
}
|
|
51287
51287
|
};
|
|
51288
51288
|
}
|
|
51289
|
-
function le(
|
|
51290
|
-
return M.skipEmptyLines === "greedy" ?
|
|
51289
|
+
function le(ne) {
|
|
51290
|
+
return M.skipEmptyLines === "greedy" ? ne.join("").trim() === "" : ne.length === 1 && ne[0].length === 0;
|
|
51291
51291
|
}
|
|
51292
51292
|
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(
|
|
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(ne) {
|
|
51294
|
+
return !le(ne);
|
|
51295
51295
|
})), he() && function() {
|
|
51296
51296
|
if (!Q)
|
|
51297
51297
|
return;
|
|
51298
|
-
function
|
|
51298
|
+
function ne(be, _e) {
|
|
51299
51299
|
D(M.transformHeader) && (be = M.transformHeader(be, _e)), G.push(be);
|
|
51300
51300
|
}
|
|
51301
51301
|
if (Array.isArray(Q.data[0])) {
|
|
51302
51302
|
for (var me = 0; he() && me < Q.data.length; me++)
|
|
51303
|
-
Q.data[me].forEach(
|
|
51303
|
+
Q.data[me].forEach(ne);
|
|
51304
51304
|
Q.data.splice(0, 1);
|
|
51305
51305
|
} else
|
|
51306
|
-
Q.data.forEach(
|
|
51306
|
+
Q.data.forEach(ne);
|
|
51307
51307
|
}(), function() {
|
|
51308
51308
|
if (!Q || !M.header && !M.dynamicTyping && !M.transform)
|
|
51309
51309
|
return Q;
|
|
51310
|
-
function
|
|
51310
|
+
function ne(be, _e) {
|
|
51311
51311
|
var xe, Ke = M.header ? {} : [];
|
|
51312
51312
|
for (xe = 0; xe < be.length; xe++) {
|
|
51313
51313
|
var we = xe, Oe = be[xe];
|
|
@@ -51316,14 +51316,14 @@ License: MIT
|
|
|
51316
51316
|
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
51317
|
}
|
|
51318
51318
|
var me = 1;
|
|
51319
|
-
return !Q.data.length || Array.isArray(Q.data[0]) ? (Q.data = Q.data.map(
|
|
51319
|
+
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
51320
|
}();
|
|
51321
51321
|
}
|
|
51322
51322
|
function he() {
|
|
51323
51323
|
return M.header && G.length === 0;
|
|
51324
51324
|
}
|
|
51325
|
-
function ee(
|
|
51326
|
-
return be =
|
|
51325
|
+
function ee(ne, me) {
|
|
51326
|
+
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
51327
|
if (V.test(_e)) {
|
|
51328
51328
|
var xe = parseFloat(_e);
|
|
51329
51329
|
if (N < xe && xe < C)
|
|
@@ -51333,17 +51333,17 @@ License: MIT
|
|
|
51333
51333
|
}(me) ? parseFloat(me) : $.test(me) ? new Date(me) : me === "" ? null : me) : me;
|
|
51334
51334
|
var be;
|
|
51335
51335
|
}
|
|
51336
|
-
function ie(
|
|
51337
|
-
var xe = { type:
|
|
51336
|
+
function ie(ne, me, be, _e) {
|
|
51337
|
+
var xe = { type: ne, code: me, message: be };
|
|
51338
51338
|
_e !== void 0 && (xe.row = _e), Q.errors.push(xe);
|
|
51339
51339
|
}
|
|
51340
|
-
this.parse = function(
|
|
51340
|
+
this.parse = function(ne, me, be) {
|
|
51341
51341
|
var _e = M.quoteChar || '"';
|
|
51342
51342
|
if (M.newline || (M.newline = function(we, Oe) {
|
|
51343
51343
|
we = we.substring(0, 1048576);
|
|
51344
51344
|
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 ||
|
|
51345
|
+
`), oe = 1 < se.length && se[0].length < H[0].length;
|
|
51346
|
+
if (H.length === 1 || oe)
|
|
51347
51347
|
return `
|
|
51348
51348
|
`;
|
|
51349
51349
|
for (var de = 0, pe = 0; pe < H.length; pe++)
|
|
@@ -51351,11 +51351,11 @@ License: MIT
|
|
|
51351
51351
|
` && de++;
|
|
51352
51352
|
return de >= H.length / 2 ? `\r
|
|
51353
51353
|
` : "\r";
|
|
51354
|
-
}(
|
|
51355
|
-
D(M.delimiter) && (M.delimiter = M.delimiter(
|
|
51354
|
+
}(ne, _e)), T = !1, M.delimiter)
|
|
51355
|
+
D(M.delimiter) && (M.delimiter = M.delimiter(ne), Q.meta.delimiter = M.delimiter);
|
|
51356
51356
|
else {
|
|
51357
51357
|
var xe = function(we, Oe, Ae, H, se) {
|
|
51358
|
-
var
|
|
51358
|
+
var oe, de, pe, te;
|
|
51359
51359
|
se = se || [",", " ", "|", ";", l.RECORD_SEP, l.UNIT_SEP];
|
|
51360
51360
|
for (var Z = 0; Z < se.length; Z++) {
|
|
51361
51361
|
var ue = se[Z], ge = 0, z = 0, w = 0;
|
|
@@ -51367,14 +51367,14 @@ License: MIT
|
|
|
51367
51367
|
var re = x.data[B].length;
|
|
51368
51368
|
z += re, pe !== void 0 ? 0 < re && (ge += Math.abs(re - pe), pe = re) : pe = re;
|
|
51369
51369
|
}
|
|
51370
|
-
0 < x.data.length && (z /= x.data.length - w), (de === void 0 || ge <= de) && (
|
|
51370
|
+
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
51371
|
}
|
|
51372
|
-
return { successful: !!(M.delimiter =
|
|
51373
|
-
}(
|
|
51372
|
+
return { successful: !!(M.delimiter = oe), bestDelimiter: oe };
|
|
51373
|
+
}(ne, M.newline, M.skipEmptyLines, M.comments, M.delimitersToGuess);
|
|
51374
51374
|
xe.successful ? M.delimiter = xe.bestDelimiter : (T = !0, M.delimiter = l.DefaultDelimiter), Q.meta.delimiter = M.delimiter;
|
|
51375
51375
|
}
|
|
51376
51376
|
var Ke = j(M);
|
|
51377
|
-
return M.preview && M.header && Ke.preview++, P =
|
|
51377
|
+
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
51378
|
}, this.paused = function() {
|
|
51379
51379
|
return W;
|
|
51380
51380
|
}, this.pause = function() {
|
|
@@ -51402,7 +51402,7 @@ License: MIT
|
|
|
51402
51402
|
this.parse = function(W, F, G) {
|
|
51403
51403
|
if (typeof W != "string")
|
|
51404
51404
|
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 = [],
|
|
51405
|
+
var Q = W.length, ve = U.length, le = T.length, ce = C.length, he = D(N), ee = [], ie = [], ne = [], me = A = 0;
|
|
51406
51406
|
if (!W)
|
|
51407
51407
|
return fe();
|
|
51408
51408
|
if (M.header && !F) {
|
|
@@ -51421,35 +51421,35 @@ License: MIT
|
|
|
51421
51421
|
}
|
|
51422
51422
|
}
|
|
51423
51423
|
if ($ || $ !== !1 && W.indexOf(P) === -1) {
|
|
51424
|
-
for (var
|
|
51425
|
-
if (
|
|
51424
|
+
for (var oe = W.split(T), de = 0; de < oe.length; de++) {
|
|
51425
|
+
if (ne = oe[de], A += ne.length, de !== oe.length - 1)
|
|
51426
51426
|
A += T.length;
|
|
51427
51427
|
else if (G)
|
|
51428
51428
|
return fe();
|
|
51429
|
-
if (!C ||
|
|
51429
|
+
if (!C || ne.substring(0, ce) !== C) {
|
|
51430
51430
|
if (he) {
|
|
51431
|
-
if (ee = [], w(
|
|
51431
|
+
if (ee = [], w(ne.split(U)), k(), X)
|
|
51432
51432
|
return fe();
|
|
51433
51433
|
} else
|
|
51434
|
-
w(
|
|
51434
|
+
w(ne.split(U));
|
|
51435
51435
|
if (V && V <= de)
|
|
51436
51436
|
return ee = ee.slice(0, V), fe(!0);
|
|
51437
51437
|
}
|
|
51438
51438
|
}
|
|
51439
51439
|
return fe();
|
|
51440
51440
|
}
|
|
51441
|
-
for (var pe = W.indexOf(U, A),
|
|
51441
|
+
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
51442
|
if (W[A] !== P)
|
|
51443
|
-
if (C &&
|
|
51444
|
-
if (
|
|
51443
|
+
if (C && ne.length === 0 && W.substring(A, A + ce) === C) {
|
|
51444
|
+
if (te === -1)
|
|
51445
51445
|
return fe();
|
|
51446
|
-
A =
|
|
51447
|
-
} else if (pe !== -1 && (pe <
|
|
51448
|
-
|
|
51446
|
+
A = te + le, te = W.indexOf(T, A), pe = W.indexOf(U, A);
|
|
51447
|
+
} else if (pe !== -1 && (pe < te || te === -1))
|
|
51448
|
+
ne.push(W.substring(A, pe)), A = pe + ve, pe = W.indexOf(U, A);
|
|
51449
51449
|
else {
|
|
51450
|
-
if (
|
|
51450
|
+
if (te === -1)
|
|
51451
51451
|
break;
|
|
51452
|
-
if (
|
|
51452
|
+
if (ne.push(W.substring(A, te)), re(te + le), he && (k(), X))
|
|
51453
51453
|
return fe();
|
|
51454
51454
|
if (V && ee.length >= V)
|
|
51455
51455
|
return fe(!0);
|
|
@@ -51462,15 +51462,15 @@ License: MIT
|
|
|
51462
51462
|
return B(W.substring(A, ue).replace(Z, P));
|
|
51463
51463
|
if (P !== I || W[ue + 1] !== I) {
|
|
51464
51464
|
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(
|
|
51465
|
+
pe !== -1 && pe < ue + 1 && (pe = W.indexOf(U, ue + 1)), te !== -1 && te < ue + 1 && (te = W.indexOf(T, ue + 1));
|
|
51466
|
+
var ge = x(te === -1 ? pe : Math.min(pe, te));
|
|
51467
51467
|
if (W.substr(ue + 1 + ge, ve) === U) {
|
|
51468
|
-
|
|
51468
|
+
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
51469
|
break;
|
|
51470
51470
|
}
|
|
51471
|
-
var z = x(
|
|
51471
|
+
var z = x(te);
|
|
51472
51472
|
if (W.substring(ue + 1 + z, ue + 1 + z + le) === T) {
|
|
51473
|
-
if (
|
|
51473
|
+
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
51474
|
return fe();
|
|
51475
51475
|
if (V && ee.length >= V)
|
|
51476
51476
|
return fe(!0);
|
|
@@ -51494,10 +51494,10 @@ License: MIT
|
|
|
51494
51494
|
return Xe;
|
|
51495
51495
|
}
|
|
51496
51496
|
function B(Ue) {
|
|
51497
|
-
return G || (Ue === void 0 && (Ue = W.substring(A)),
|
|
51497
|
+
return G || (Ue === void 0 && (Ue = W.substring(A)), ne.push(Ue), A = Q, w(ne), he && k()), fe();
|
|
51498
51498
|
}
|
|
51499
51499
|
function re(Ue) {
|
|
51500
|
-
A = Ue, w(
|
|
51500
|
+
A = Ue, w(ne), ne = [], te = W.indexOf(T, A);
|
|
51501
51501
|
}
|
|
51502
51502
|
function fe(Ue) {
|
|
51503
51503
|
return { data: ee, errors: ie, meta: { delimiter: U, linebreak: T, aborted: X, truncated: !!Ue, cursor: me + (F || 0) } };
|
|
@@ -54981,18 +54981,18 @@ function O_(e, r, t, n) {
|
|
|
54981
54981
|
weekStartsOn: T,
|
|
54982
54982
|
locale: P
|
|
54983
54983
|
}, N = [new Gve()], V = D.match(Nge).map(function(ie) {
|
|
54984
|
-
var
|
|
54985
|
-
if (
|
|
54986
|
-
var me = PO[
|
|
54984
|
+
var ne = ie[0];
|
|
54985
|
+
if (ne in PO) {
|
|
54986
|
+
var me = PO[ne];
|
|
54987
54987
|
return me(ie, P.formatLong);
|
|
54988
54988
|
}
|
|
54989
54989
|
return ie;
|
|
54990
54990
|
}).join("").match(Cge), $ = [], I = hE(V), A;
|
|
54991
54991
|
try {
|
|
54992
54992
|
var X = function() {
|
|
54993
|
-
var
|
|
54994
|
-
!(n != null && n.useAdditionalWeekYearTokens) && MA(
|
|
54995
|
-
var me =
|
|
54993
|
+
var ne = A.value;
|
|
54994
|
+
!(n != null && n.useAdditionalWeekYearTokens) && MA(ne) && hy(ne, D, e), !(n != null && n.useAdditionalDayOfYearTokens) && xA(ne) && hy(ne, D, e);
|
|
54995
|
+
var me = ne[0], be = Dge[me];
|
|
54996
54996
|
if (be) {
|
|
54997
54997
|
var _e = be.incompatibleTokens;
|
|
54998
54998
|
if (Array.isArray(_e)) {
|
|
@@ -55000,14 +55000,14 @@ function O_(e, r, t, n) {
|
|
|
55000
55000
|
return _e.includes(we.token) || we.token === me;
|
|
55001
55001
|
});
|
|
55002
55002
|
if (xe)
|
|
55003
|
-
throw new RangeError("The format string mustn't contain `".concat(xe.fullToken, "` and `").concat(
|
|
55003
|
+
throw new RangeError("The format string mustn't contain `".concat(xe.fullToken, "` and `").concat(ne, "` at the same time"));
|
|
55004
55004
|
} else if (be.incompatibleTokens === "*" && $.length > 0)
|
|
55005
|
-
throw new RangeError("The format string mustn't contain `".concat(
|
|
55005
|
+
throw new RangeError("The format string mustn't contain `".concat(ne, "` and any other token at the same time"));
|
|
55006
55006
|
$.push({
|
|
55007
55007
|
token: me,
|
|
55008
|
-
fullToken:
|
|
55008
|
+
fullToken: ne
|
|
55009
55009
|
});
|
|
55010
|
-
var Ke = be.run(E,
|
|
55010
|
+
var Ke = be.run(E, ne, P.match, C);
|
|
55011
55011
|
if (!Ke)
|
|
55012
55012
|
return {
|
|
55013
55013
|
v: /* @__PURE__ */ new Date(NaN)
|
|
@@ -55016,8 +55016,8 @@ function O_(e, r, t, n) {
|
|
|
55016
55016
|
} else {
|
|
55017
55017
|
if (me.match(Age))
|
|
55018
55018
|
throw new RangeError("Format string contains an unescaped latin alphabet character `" + me + "`");
|
|
55019
|
-
if (
|
|
55020
|
-
E = E.slice(
|
|
55019
|
+
if (ne === "''" ? ne = "'" : me === "'" && (ne = Fge(ne)), E.indexOf(ne) === 0)
|
|
55020
|
+
E = E.slice(ne.length);
|
|
55021
55021
|
else
|
|
55022
55022
|
return {
|
|
55023
55023
|
v: /* @__PURE__ */ new Date(NaN)
|
|
@@ -55038,15 +55038,15 @@ function O_(e, r, t, n) {
|
|
|
55038
55038
|
return /* @__PURE__ */ new Date(NaN);
|
|
55039
55039
|
var F = N.map(function(ie) {
|
|
55040
55040
|
return ie.priority;
|
|
55041
|
-
}).sort(function(ie,
|
|
55042
|
-
return
|
|
55043
|
-
}).filter(function(ie,
|
|
55044
|
-
return me.indexOf(ie) ===
|
|
55041
|
+
}).sort(function(ie, ne) {
|
|
55042
|
+
return ne - ie;
|
|
55043
|
+
}).filter(function(ie, ne, me) {
|
|
55044
|
+
return me.indexOf(ie) === ne;
|
|
55045
55045
|
}).map(function(ie) {
|
|
55046
|
-
return N.filter(function(
|
|
55047
|
-
return
|
|
55048
|
-
}).sort(function(
|
|
55049
|
-
return me.subPriority -
|
|
55046
|
+
return N.filter(function(ne) {
|
|
55047
|
+
return ne.priority === ie;
|
|
55048
|
+
}).sort(function(ne, me) {
|
|
55049
|
+
return me.subPriority - ne.subPriority;
|
|
55050
55050
|
});
|
|
55051
55051
|
}).map(function(ie) {
|
|
55052
55052
|
return ie[0];
|
|
@@ -55920,8 +55920,8 @@ function Jwe(e) {
|
|
|
55920
55920
|
var he = S.find(function(ee) {
|
|
55921
55921
|
var ie = D.get(ee);
|
|
55922
55922
|
if (ie)
|
|
55923
|
-
return ie.slice(0, ce).every(function(
|
|
55924
|
-
return
|
|
55923
|
+
return ie.slice(0, ce).every(function(ne) {
|
|
55924
|
+
return ne;
|
|
55925
55925
|
});
|
|
55926
55926
|
});
|
|
55927
55927
|
if (he)
|
|
@@ -56050,12 +56050,12 @@ function i0e(e) {
|
|
|
56050
56050
|
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
56051
|
width: 0,
|
|
56052
56052
|
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]),
|
|
56053
|
+
}, 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
56054
|
E[S] = Oe, C[S] = Oe - A;
|
|
56055
56055
|
}
|
|
56056
56056
|
if (s) {
|
|
56057
|
-
var Ae, H = S === "x" ? kn : eo, se = S === "x" ? Eo : zo,
|
|
56058
|
-
E[j] = w, C[j] = w -
|
|
56057
|
+
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);
|
|
56058
|
+
E[j] = w, C[j] = w - oe;
|
|
56059
56059
|
}
|
|
56060
56060
|
r.modifiersData[n] = C;
|
|
56061
56061
|
}
|
|
@@ -58430,13 +58430,13 @@ function m_e({
|
|
|
58430
58430
|
}) {
|
|
58431
58431
|
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
58432
|
cu(() => {
|
|
58433
|
-
const
|
|
58434
|
-
A(F.length === (d ? d.length : 0)), W(
|
|
58433
|
+
const te = F.length > 0 && F.length < (d ? d.length : 0);
|
|
58434
|
+
A(F.length === (d ? d.length : 0)), W(te), $.current && ($.current.indeterminate = te);
|
|
58435
58435
|
}, [F, d]);
|
|
58436
58436
|
function ie() {
|
|
58437
58437
|
G(I || X ? [] : d ?? []), A(!I && !X), W(!1);
|
|
58438
58438
|
}
|
|
58439
|
-
async function te
|
|
58439
|
+
async function ne(te) {
|
|
58440
58440
|
var ue;
|
|
58441
58441
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58442
58442
|
return;
|
|
@@ -58449,7 +58449,7 @@ function m_e({
|
|
|
58449
58449
|
...(ge.status === R.Mercoa.InvoiceStatus.Approved || ge.status === R.Mercoa.InvoiceStatus.Failed) && {
|
|
58450
58450
|
status: R.Mercoa.InvoiceStatus.Scheduled
|
|
58451
58451
|
},
|
|
58452
|
-
deductionDate:
|
|
58452
|
+
deductionDate: te
|
|
58453
58453
|
})), Z = !0;
|
|
58454
58454
|
} catch (w) {
|
|
58455
58455
|
console.error("Error updating invoice: ", w), console.log("Errored invoice: ", {
|
|
@@ -58458,7 +58458,7 @@ function m_e({
|
|
|
58458
58458
|
}
|
|
58459
58459
|
})), Z ? je.success("Payment Scheduled") : je.error("Error scheduling payment"), l.refresh();
|
|
58460
58460
|
}
|
|
58461
|
-
async function me(
|
|
58461
|
+
async function me(te) {
|
|
58462
58462
|
var ue;
|
|
58463
58463
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58464
58464
|
return;
|
|
@@ -58467,7 +58467,7 @@ function m_e({
|
|
|
58467
58467
|
var z;
|
|
58468
58468
|
try {
|
|
58469
58469
|
await ((z = l.client) == null ? void 0 : z.invoice.approval.addApprover(ge.id, {
|
|
58470
|
-
userId:
|
|
58470
|
+
userId: te
|
|
58471
58471
|
})), Z = !0;
|
|
58472
58472
|
} catch (w) {
|
|
58473
58473
|
console.error("Error adding approver to invoice ", w), console.log("Errored invoice: ", {
|
|
@@ -58476,132 +58476,132 @@ function m_e({
|
|
|
58476
58476
|
}
|
|
58477
58477
|
})), Z ? je.success("Approver Added") : je.error("Error adding approver"), l.refresh();
|
|
58478
58478
|
}
|
|
58479
|
-
function be(
|
|
58479
|
+
function be(te) {
|
|
58480
58480
|
let Z = R.Mercoa.InvoiceStatus.Approved;
|
|
58481
|
-
const ue =
|
|
58481
|
+
const ue = te.approvalPolicy;
|
|
58482
58482
|
return ue && ue.length > 0 && (Z = R.Mercoa.InvoiceStatus.New), Z;
|
|
58483
58483
|
}
|
|
58484
58484
|
async function _e() {
|
|
58485
58485
|
var Z;
|
|
58486
58486
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58487
58487
|
return;
|
|
58488
|
-
let
|
|
58488
|
+
let te = !1;
|
|
58489
58489
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58490
58490
|
var ge;
|
|
58491
58491
|
try {
|
|
58492
58492
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58493
58493
|
status: be(ue)
|
|
58494
|
-
})),
|
|
58494
|
+
})), te = !0;
|
|
58495
58495
|
} catch (z) {
|
|
58496
58496
|
console.error("Error submitting invoice: ", z), console.log("Errored invoice: ", {
|
|
58497
58497
|
invoice: ue
|
|
58498
58498
|
});
|
|
58499
58499
|
}
|
|
58500
|
-
})),
|
|
58500
|
+
})), te ? je.success("Invoice Submitted for Approval") : je.error("Error submitting invoice"), l.refresh();
|
|
58501
58501
|
}
|
|
58502
58502
|
async function xe() {
|
|
58503
58503
|
var Z;
|
|
58504
58504
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58505
58505
|
return;
|
|
58506
|
-
let
|
|
58506
|
+
let te = !1;
|
|
58507
58507
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58508
58508
|
var ge;
|
|
58509
58509
|
try {
|
|
58510
|
-
await ((ge = l.client) == null ? void 0 : ge.invoice.delete(ue.id)),
|
|
58510
|
+
await ((ge = l.client) == null ? void 0 : ge.invoice.delete(ue.id)), te = !0;
|
|
58511
58511
|
} catch (z) {
|
|
58512
58512
|
console.error("Error deleting invoice: ", z), console.log("Errored invoice: ", {
|
|
58513
58513
|
invoice: ue
|
|
58514
58514
|
});
|
|
58515
58515
|
}
|
|
58516
|
-
})),
|
|
58516
|
+
})), te ? je.success("Invoices Deleted") : je.error("Error deleting invoices"), l.refresh();
|
|
58517
58517
|
}
|
|
58518
58518
|
async function Ke() {
|
|
58519
58519
|
var Z;
|
|
58520
58520
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58521
58521
|
return;
|
|
58522
|
-
let
|
|
58522
|
+
let te = !1;
|
|
58523
58523
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58524
58524
|
var ge;
|
|
58525
58525
|
try {
|
|
58526
58526
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58527
58527
|
status: R.Mercoa.InvoiceStatus.Archived
|
|
58528
|
-
})),
|
|
58528
|
+
})), te = !0;
|
|
58529
58529
|
} catch (z) {
|
|
58530
58530
|
console.error("Error archiving invoice: ", z), console.log("Errored invoice: ", {
|
|
58531
58531
|
invoice: ue
|
|
58532
58532
|
});
|
|
58533
58533
|
}
|
|
58534
|
-
})),
|
|
58534
|
+
})), te ? je.success("Invoices Archived") : je.error("Error archiving invoices"), l.refresh();
|
|
58535
58535
|
}
|
|
58536
58536
|
async function we() {
|
|
58537
58537
|
var Z;
|
|
58538
58538
|
if (!l.token || !((Z = l.entity) != null && Z.id))
|
|
58539
58539
|
return;
|
|
58540
|
-
let
|
|
58540
|
+
let te = !1;
|
|
58541
58541
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58542
58542
|
var ge;
|
|
58543
58543
|
try {
|
|
58544
58544
|
await ((ge = l.client) == null ? void 0 : ge.invoice.update(ue.id, {
|
|
58545
58545
|
status: R.Mercoa.InvoiceStatus.Canceled
|
|
58546
|
-
})),
|
|
58546
|
+
})), te = !0;
|
|
58547
58547
|
} catch (z) {
|
|
58548
58548
|
console.error("Error cancelling invoice: ", z), console.log("Errored invoice: ", {
|
|
58549
58549
|
invoice: ue
|
|
58550
58550
|
});
|
|
58551
58551
|
}
|
|
58552
|
-
})),
|
|
58552
|
+
})), te ? je.success("Payments Cancelled") : je.error("Error cancelling payments"), l.refresh();
|
|
58553
58553
|
}
|
|
58554
58554
|
async function Oe() {
|
|
58555
58555
|
var Z;
|
|
58556
58556
|
if (!l.token || !((Z = l.entity) != null && Z.id) || !l.user)
|
|
58557
58557
|
return;
|
|
58558
|
-
let
|
|
58558
|
+
let te = !1;
|
|
58559
58559
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58560
58560
|
var ge, z, w;
|
|
58561
58561
|
try {
|
|
58562
58562
|
const x = await ((ge = l.client) == null ? void 0 : ge.invoice.get(ue.id));
|
|
58563
58563
|
if ((x == null ? void 0 : x.status) != R.Mercoa.InvoiceStatus.New) {
|
|
58564
|
-
|
|
58564
|
+
te = !0;
|
|
58565
58565
|
return;
|
|
58566
58566
|
}
|
|
58567
58567
|
await ((w = l.client) == null ? void 0 : w.invoice.approval.approve(ue.id, {
|
|
58568
58568
|
userId: (z = l.user) == null ? void 0 : z.id
|
|
58569
|
-
})),
|
|
58569
|
+
})), te = !0;
|
|
58570
58570
|
} catch (x) {
|
|
58571
58571
|
console.error("Error approving invoice: ", x), console.log("Errored invoice: ", {
|
|
58572
58572
|
invoice: ue
|
|
58573
58573
|
});
|
|
58574
58574
|
}
|
|
58575
|
-
})),
|
|
58575
|
+
})), te && je.success("Approved"), l.refresh();
|
|
58576
58576
|
}
|
|
58577
58577
|
async function Ae() {
|
|
58578
58578
|
var Z;
|
|
58579
58579
|
if (!l.token || !((Z = l.entity) != null && Z.id) || !l.user)
|
|
58580
58580
|
return;
|
|
58581
|
-
let
|
|
58581
|
+
let te = !1;
|
|
58582
58582
|
E(!1), await Promise.all(F.map(async (ue) => {
|
|
58583
58583
|
var ge, z, w;
|
|
58584
58584
|
try {
|
|
58585
58585
|
const x = await ((ge = l.client) == null ? void 0 : ge.invoice.get(ue.id));
|
|
58586
58586
|
if ((x == null ? void 0 : x.status) != R.Mercoa.InvoiceStatus.New) {
|
|
58587
|
-
|
|
58587
|
+
te = !0;
|
|
58588
58588
|
return;
|
|
58589
58589
|
}
|
|
58590
58590
|
await ((w = l.client) == null ? void 0 : w.invoice.approval.reject(ue.id, {
|
|
58591
58591
|
userId: (z = l.user) == null ? void 0 : z.id
|
|
58592
|
-
})),
|
|
58592
|
+
})), te = !0;
|
|
58593
58593
|
} catch (x) {
|
|
58594
58594
|
console.error("Error rejecting invoice: ", x), console.log("Errored invoice: ", {
|
|
58595
58595
|
invoice: ue
|
|
58596
58596
|
});
|
|
58597
58597
|
}
|
|
58598
|
-
})),
|
|
58598
|
+
})), te && je.success("Rejected"), l.refresh();
|
|
58599
58599
|
}
|
|
58600
58600
|
async function H() {
|
|
58601
58601
|
var ge;
|
|
58602
58602
|
if (!l.token || !((ge = l.entity) != null && ge.id))
|
|
58603
58603
|
return;
|
|
58604
|
-
let
|
|
58604
|
+
let te = "", Z = [];
|
|
58605
58605
|
ue();
|
|
58606
58606
|
async function ue() {
|
|
58607
58607
|
var x, B, re;
|
|
@@ -58619,13 +58619,13 @@ function m_e({
|
|
|
58619
58619
|
approverAction: R.Mercoa.ApproverAction.None
|
|
58620
58620
|
},
|
|
58621
58621
|
limit: 100,
|
|
58622
|
-
startingAfter:
|
|
58622
|
+
startingAfter: te,
|
|
58623
58623
|
excludeReceivables: !0,
|
|
58624
58624
|
metadata: t
|
|
58625
58625
|
}, w = await ((re = l.client) == null ? void 0 : re.entity.invoice.find(l.entity.id, z));
|
|
58626
58626
|
if (w)
|
|
58627
58627
|
if (w.data.length > 0)
|
|
58628
|
-
|
|
58628
|
+
te = w.data[w.data.length - 1].id, Z = [...Z, ...w.data], await ue();
|
|
58629
58629
|
else {
|
|
58630
58630
|
const fe = bA.unparse(Z.map((Ye) => {
|
|
58631
58631
|
var mr, ir, _t, Ka, Ha, Xa;
|
|
@@ -58662,7 +58662,7 @@ function m_e({
|
|
|
58662
58662
|
var ue, ge, z, w, x;
|
|
58663
58663
|
if (!l.token || !((ue = l.entity) != null && ue.id))
|
|
58664
58664
|
return;
|
|
58665
|
-
let
|
|
58665
|
+
let te = !0;
|
|
58666
58666
|
G([]), E(!1);
|
|
58667
58667
|
const Z = {
|
|
58668
58668
|
status: D,
|
|
@@ -58681,20 +58681,20 @@ function m_e({
|
|
|
58681
58681
|
metadata: t
|
|
58682
58682
|
};
|
|
58683
58683
|
return (z = l.client) == null || z.entity.invoice.find(l.entity.id, Z).then((B) => {
|
|
58684
|
-
B &&
|
|
58684
|
+
B && te && (_(B.hasMore), S(B.count), f(B.data), E(!0));
|
|
58685
58685
|
}), D.includes(R.Mercoa.InvoiceStatus.New) && ((x = l.client) == null || x.entity.invoice.find(l.entity.id, {
|
|
58686
58686
|
...Z,
|
|
58687
58687
|
approverId: (w = l.user) == null ? void 0 : w.id,
|
|
58688
58688
|
approverAction: R.Mercoa.ApproverAction.None
|
|
58689
58689
|
}).then((B) => {
|
|
58690
|
-
B &&
|
|
58690
|
+
B && te && p(B.count);
|
|
58691
58691
|
})), () => {
|
|
58692
|
-
|
|
58692
|
+
te = !1;
|
|
58693
58693
|
};
|
|
58694
58694
|
}, [l.token, l.entity, l.refreshId, D, r, n, o, t, h, b, P, T, he]), ye(() => {
|
|
58695
58695
|
V(1), U([]);
|
|
58696
58696
|
}, [r]), ye(() => {
|
|
58697
|
-
e.some((
|
|
58697
|
+
e.some((te) => D.indexOf(te) < 0) && (M(e), ee(!1), E(!1), U([]), V(1), S(0));
|
|
58698
58698
|
}, [e, n, o]), s)
|
|
58699
58699
|
return s({
|
|
58700
58700
|
dataLoaded: j,
|
|
@@ -58739,7 +58739,7 @@ function m_e({
|
|
|
58739
58739
|
}, {
|
|
58740
58740
|
title: "Approvers",
|
|
58741
58741
|
field: "approvers",
|
|
58742
|
-
format: (
|
|
58742
|
+
format: (te, Z) => {
|
|
58743
58743
|
var ue;
|
|
58744
58744
|
return Z.approvers.every((ge) => !ge.assignedUserId) ? null : /* @__PURE__ */ u.jsx("div", {
|
|
58745
58745
|
className: "mercoa-gap-1 mercoa-grid",
|
|
@@ -58760,7 +58760,7 @@ function m_e({
|
|
|
58760
58760
|
}, {
|
|
58761
58761
|
title: "Status",
|
|
58762
58762
|
field: "status",
|
|
58763
|
-
format: (
|
|
58763
|
+
format: (te, Z) => /* @__PURE__ */ u.jsx(Yx, {
|
|
58764
58764
|
failureType: Z.failureType,
|
|
58765
58765
|
status: Z.status,
|
|
58766
58766
|
vendorId: Z.vendorId,
|
|
@@ -58775,8 +58775,8 @@ function m_e({
|
|
|
58775
58775
|
title: "Deduction Date",
|
|
58776
58776
|
field: "deductionDate"
|
|
58777
58777
|
}];
|
|
58778
|
-
function
|
|
58779
|
-
return d ? d.some((Z) =>
|
|
58778
|
+
function oe(te) {
|
|
58779
|
+
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
58780
|
}
|
|
58781
58781
|
const de = /* @__PURE__ */ u.jsx("thead", {
|
|
58782
58782
|
children: /* @__PURE__ */ u.jsxs("tr", {
|
|
@@ -58790,47 +58790,47 @@ function m_e({
|
|
|
58790
58790
|
checked: I,
|
|
58791
58791
|
onChange: ie
|
|
58792
58792
|
})
|
|
58793
|
-
}), (i ?? se).map((
|
|
58793
|
+
}), (i ?? se).map((te, Z) => !oe(te) && d.length > 0 ? null : /* @__PURE__ */ u.jsx("th", {
|
|
58794
58794
|
scope: "col",
|
|
58795
58795
|
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:
|
|
58796
|
+
children: te.orderBy ? /* @__PURE__ */ u.jsx(ql, {
|
|
58797
|
+
title: te.title,
|
|
58798
58798
|
setOrder: (ue) => {
|
|
58799
|
-
|
|
58799
|
+
te.orderBy && (y(te.orderBy), v(ue));
|
|
58800
58800
|
},
|
|
58801
|
-
isSelected: h ===
|
|
58801
|
+
isSelected: h === te.orderBy,
|
|
58802
58802
|
orderDirection: b
|
|
58803
|
-
}) :
|
|
58803
|
+
}) : te.title
|
|
58804
58804
|
}, Z))]
|
|
58805
58805
|
})
|
|
58806
58806
|
}), pe = /* @__PURE__ */ u.jsx("tbody", {
|
|
58807
58807
|
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(
|
|
58808
|
+
children: d.map((te) => /* @__PURE__ */ u.jsxs("tr", {
|
|
58809
|
+
className: ds("mercoa-cursor-pointer hover:mercoa-bg-gray-100", F.includes(te) ? "mercoa-bg-gray-50" : void 0),
|
|
58810
58810
|
children: [/* @__PURE__ */ u.jsxs("td", {
|
|
58811
58811
|
className: "mercoa-relative mercoa-px-7 sm:mercoa-w-12 sm:mercoa-px-6",
|
|
58812
|
-
children: [F.includes(
|
|
58812
|
+
children: [F.includes(te) && /* @__PURE__ */ u.jsx("div", {
|
|
58813
58813
|
className: "mercoa-absolute mercoa-inset-y-0 mercoa-left-0 mercoa-w-0.5 mercoa-bg-mercoa-primary"
|
|
58814
58814
|
}), /* @__PURE__ */ u.jsx("input", {
|
|
58815
58815
|
type: "checkbox",
|
|
58816
58816
|
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,
|
|
58817
|
+
value: te.id,
|
|
58818
|
+
checked: F.includes(te),
|
|
58819
|
+
onChange: (Z) => G(Z.target.checked ? [...F, te] : F.filter((ue) => ue !== te))
|
|
58820
58820
|
})]
|
|
58821
58821
|
}), (i ?? se).map((Z, ue) => {
|
|
58822
|
-
if (!
|
|
58822
|
+
if (!oe(Z))
|
|
58823
58823
|
return null;
|
|
58824
58824
|
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(
|
|
58825
|
+
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", {
|
|
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(te) ? "mercoa-text-mercoa-primary-text" : "mercoa-text-gray-900"} ${ue === 0 ? "mercoa-font-medium" : ""}`,
|
|
58827
58827
|
onClick: () => {
|
|
58828
|
-
a && a(
|
|
58828
|
+
a && a(te);
|
|
58829
58829
|
},
|
|
58830
58830
|
children: ge
|
|
58831
58831
|
}, ue);
|
|
58832
58832
|
})]
|
|
58833
|
-
},
|
|
58833
|
+
}, te.id))
|
|
58834
58834
|
});
|
|
58835
58835
|
return l.client ? /* @__PURE__ */ u.jsxs("div", {
|
|
58836
58836
|
children: [/* @__PURE__ */ u.jsxs("div", {
|
|
@@ -58879,18 +58879,18 @@ function m_e({
|
|
|
58879
58879
|
onClose: () => ce(!1),
|
|
58880
58880
|
setApprover: me
|
|
58881
58881
|
})]
|
|
58882
|
-
}), D.some((
|
|
58882
|
+
}), 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
58883
|
children: [/* @__PURE__ */ u.jsx("button", {
|
|
58884
58884
|
type: "button",
|
|
58885
58885
|
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
58886
|
onClick: () => ve(!0),
|
|
58887
|
-
children: D.some((
|
|
58887
|
+
children: D.some((te) => [R.Mercoa.InvoiceStatus.Draft, R.Mercoa.InvoiceStatus.New].includes(te)) ? "Set Payment Date" : "Schedule Payment"
|
|
58888
58888
|
}), /* @__PURE__ */ u.jsx(d_e, {
|
|
58889
58889
|
open: Q,
|
|
58890
58890
|
onClose: () => ve(!1),
|
|
58891
|
-
setDate:
|
|
58891
|
+
setDate: ne
|
|
58892
58892
|
})]
|
|
58893
|
-
}), D.includes(R.Mercoa.InvoiceStatus.New) && F.length > 0 && F.some((
|
|
58893
|
+
}), D.includes(R.Mercoa.InvoiceStatus.New) && F.length > 0 && F.some((te) => te.approvers.some((Z) => {
|
|
58894
58894
|
var ue;
|
|
58895
58895
|
return Z.assignedUserId === ((ue = l.user) == null ? void 0 : ue.id);
|
|
58896
58896
|
})) && /* @__PURE__ */ u.jsxs(u.Fragment, {
|
|
@@ -58912,14 +58912,14 @@ function m_e({
|
|
|
58912
58912
|
confirm("Are you sure you want to delete these invoices? This action cannot be undone.") && xe();
|
|
58913
58913
|
},
|
|
58914
58914
|
children: "Delete"
|
|
58915
|
-
}), D.
|
|
58915
|
+
}), 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
58916
|
type: "button",
|
|
58917
58917
|
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
58918
|
onClick: () => {
|
|
58919
|
-
confirm("Are you sure you want to cancel these
|
|
58919
|
+
confirm("Are you sure you want to cancel these invoices? This action cannot be undone.") && we();
|
|
58920
58920
|
},
|
|
58921
|
-
children: "Cancel
|
|
58922
|
-
}), D.some((
|
|
58921
|
+
children: "Cancel"
|
|
58922
|
+
}), D.some((te) => [R.Mercoa.InvoiceStatus.Paid, R.Mercoa.InvoiceStatus.Canceled].includes(te)) && F.length > 0 && /* @__PURE__ */ u.jsx("button", {
|
|
58923
58923
|
type: "button",
|
|
58924
58924
|
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
58925
|
onClick: () => {
|
|
@@ -59521,10 +59521,10 @@ function GE({
|
|
|
59521
59521
|
}
|
|
59522
59522
|
} = Nr();
|
|
59523
59523
|
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", ((
|
|
59524
|
+
var ce, he, ee, ie, ne, me, be, _e, xe, Ke, we, Oe;
|
|
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", ((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
59526
|
}, [e]), ye(() => {
|
|
59527
|
-
var ce, he, ee, ie,
|
|
59527
|
+
var ce, he, ee, ie, ne;
|
|
59528
59528
|
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
59529
|
description: me.description ?? "",
|
|
59530
59530
|
currency: me.currency ?? "USD",
|
|
@@ -59537,7 +59537,7 @@ function GE({
|
|
|
59537
59537
|
id: me.id ?? "",
|
|
59538
59538
|
createdAt: me.createdAt ?? /* @__PURE__ */ new Date(),
|
|
59539
59539
|
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", (
|
|
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", (ne = e == null ? void 0 : e.paymentSource) == null ? void 0 : ne.id), b("description", (e == null ? void 0 : e.noteToSelf) ?? ""));
|
|
59541
59541
|
}, [e, b]);
|
|
59542
59542
|
const {
|
|
59543
59543
|
fields: E,
|
|
@@ -59555,8 +59555,8 @@ function GE({
|
|
|
59555
59555
|
b(`lineItems.${_e}.currency`, ce.currency ?? "USD");
|
|
59556
59556
|
}), !(he != null && he.startsWith("lineItems")) || he.endsWith("amount"))
|
|
59557
59557
|
return;
|
|
59558
|
-
let
|
|
59559
|
-
|
|
59558
|
+
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);
|
|
59559
|
+
ne = Math.floor(ne * 100) / 100, b("amount", ne);
|
|
59560
59560
|
});
|
|
59561
59561
|
const P = _("payerId"), U = _("payerName"), T = _("currency");
|
|
59562
59562
|
function C() {
|
|
@@ -59579,11 +59579,11 @@ function GE({
|
|
|
59579
59579
|
}, [p.entityId]), ye(() => {
|
|
59580
59580
|
var ce, he;
|
|
59581
59581
|
!p.token || !((ce = p.entity) != null && ce.id) || !p.client || (N(), (he = p.client) == null || he.customPaymentMethodSchema.getAll().then((ee) => {
|
|
59582
|
-
var ie,
|
|
59582
|
+
var ie, ne;
|
|
59583
59583
|
if (ee) {
|
|
59584
59584
|
l(ee);
|
|
59585
59585
|
let me = [];
|
|
59586
|
-
((
|
|
59586
|
+
((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
59587
|
_e.supportedCurrencies && (me = [.../* @__PURE__ */ new Set([...me, ..._e.supportedCurrencies])]);
|
|
59588
59588
|
}), a(me);
|
|
59589
59589
|
}
|
|
@@ -59619,7 +59619,7 @@ function GE({
|
|
|
59619
59619
|
const ie = await ((ee = p.client) == null ? void 0 : ee.invoice.paymentLinks.sendPayerEmail(e.id));
|
|
59620
59620
|
ie ? navigator.clipboard.writeText(ie).then(function() {
|
|
59621
59621
|
je.info("Email Sent");
|
|
59622
|
-
}, function(
|
|
59622
|
+
}, function(ne) {
|
|
59623
59623
|
je.error("There was an issue generating the email. Please refresh and try again.");
|
|
59624
59624
|
}) : je.error("There was an issue generating the email. Please refresh and try again.");
|
|
59625
59625
|
} catch (ie) {
|
|
@@ -59629,7 +59629,7 @@ function GE({
|
|
|
59629
59629
|
}
|
|
59630
59630
|
}
|
|
59631
59631
|
async function A(ce) {
|
|
59632
|
-
var ie,
|
|
59632
|
+
var ie, ne;
|
|
59633
59633
|
if (!p.entityId)
|
|
59634
59634
|
return;
|
|
59635
59635
|
const he = {
|
|
@@ -59656,7 +59656,7 @@ function GE({
|
|
|
59656
59656
|
he.payerId && p.entityId && await ((ie = p.client) == null ? void 0 : ie.entity.counterparty.addPayors(p.entityId, {
|
|
59657
59657
|
payors: [he.payerId]
|
|
59658
59658
|
}));
|
|
59659
|
-
const ee = await ((
|
|
59659
|
+
const ee = await ((ne = p.client) == null ? void 0 : ne.invoice.create(he));
|
|
59660
59660
|
p.debug(ee), ee != null && ee.id ? (je.success("Invoice created"), r && r(ee)) : je.error("Invoice failed to create");
|
|
59661
59661
|
}
|
|
59662
59662
|
const X = ["Description", "Quantity", "Unit Price", "Total Amount"];
|
|
@@ -60690,7 +60690,7 @@ function O_e({
|
|
|
60690
60690
|
I = G.data[G.data.length - 1].id, A = [...A, ...G.data], await X();
|
|
60691
60691
|
else {
|
|
60692
60692
|
const le = bA.unparse(A.map((ie) => {
|
|
60693
|
-
var
|
|
60693
|
+
var ne, me, be, _e, xe, Ke;
|
|
60694
60694
|
return {
|
|
60695
60695
|
"Invoice ID": ie.id,
|
|
60696
60696
|
"Invoice Number": ie.invoiceNumber,
|
|
@@ -60698,7 +60698,7 @@ function O_e({
|
|
|
60698
60698
|
Amount: ie.amount,
|
|
60699
60699
|
Currency: ie.currency,
|
|
60700
60700
|
Note: ie.noteToSelf,
|
|
60701
|
-
"Payer ID": (
|
|
60701
|
+
"Payer ID": (ne = ie.payer) == null ? void 0 : ne.id,
|
|
60702
60702
|
"Payer Email": (me = ie.payer) == null ? void 0 : me.email,
|
|
60703
60703
|
"Payer Name": (be = ie.payer) == null ? void 0 : be.name,
|
|
60704
60704
|
"Vendor ID": (_e = ie.vendor) == null ? void 0 : _e.id,
|