@aaravpos/appointment-barber-booking 2.0.5 → 2.0.7
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.cjs +27 -27
- package/dist/index.js +362 -319
- package/dist/styles.css +9 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import F, { Component as Nl, PureComponent as Cl, createContext as Sl, createElement as Dn, forwardRef as Yo, useCallback as ze, useContext as Pl, useEffect as ce, useMemo as Ce, useRef as je, useState as Z } from "react";
|
|
2
2
|
import { Provider as wl, useDispatch as qe, useSelector as X } from "react-redux";
|
|
3
3
|
import { applyMiddleware as _l, combineReducers as Zo, compose as br, createStore as Ol, isAction as zr, isPlainObject as Xo } from "redux";
|
|
4
4
|
import { FLUSH as El, PAUSE as Il, PERSIST as Tl, PURGE as Al, REGISTER as xl, REHYDRATE as Ml, persistReducer as kl, persistStore as Dl } from "redux-persist";
|
|
@@ -147,7 +147,7 @@ var Qo = /* @__PURE__ */ Symbol.for("immer-nothing"), ii = /* @__PURE__ */ Symbo
|
|
|
147
147
|
] : [];
|
|
148
148
|
function Ee(e, ...t) {
|
|
149
149
|
if (process.env.NODE_ENV !== "production") {
|
|
150
|
-
const r = Yl[e], n =
|
|
150
|
+
const r = Yl[e], n = tt(r) ? r.apply(null, t) : r;
|
|
151
151
|
throw new Error(`[Immer] ${n}`);
|
|
152
152
|
}
|
|
153
153
|
throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`);
|
|
@@ -163,7 +163,7 @@ function es(e) {
|
|
|
163
163
|
if (t === null || t === Ae[Wr]) return !0;
|
|
164
164
|
const r = Ae.hasOwnProperty.call(t, gr) && t[gr];
|
|
165
165
|
if (r === Object) return !0;
|
|
166
|
-
if (!
|
|
166
|
+
if (!tt(r)) return !1;
|
|
167
167
|
let n = oi.get(r);
|
|
168
168
|
return n === void 0 && (n = Function.toString.call(r), oi.set(r, n)), n === Zl;
|
|
169
169
|
}
|
|
@@ -185,7 +185,7 @@ var si = (e, t, r = zt(e)) => r === 2 ? e.has(t) : Ae[Wr].hasOwnProperty.call(e,
|
|
|
185
185
|
function Jl(e, t) {
|
|
186
186
|
return e === t ? e !== 0 || 1 / e === 1 / t : e !== e && t !== t;
|
|
187
187
|
}
|
|
188
|
-
var qr = Array.isArray, Kr = (e) => e instanceof Map, Yr = (e) => e instanceof Set, ya = (e) => typeof e == "object",
|
|
188
|
+
var qr = Array.isArray, Kr = (e) => e instanceof Map, Yr = (e) => e instanceof Set, ya = (e) => typeof e == "object", tt = (e) => typeof e == "function", Cn = (e) => typeof e == "boolean";
|
|
189
189
|
function Ql(e) {
|
|
190
190
|
const t = +e;
|
|
191
191
|
return Number.isInteger(t) && String(t) === e;
|
|
@@ -235,7 +235,7 @@ function Xr(e) {
|
|
|
235
235
|
return e === null || !ya(e) ? !0 : Ae.isFrozen(e);
|
|
236
236
|
}
|
|
237
237
|
var Sr = "MapSet", Vn = "Patches", di = "ArrayMethods", ts = {};
|
|
238
|
-
function
|
|
238
|
+
function it(e) {
|
|
239
239
|
const t = ts[e];
|
|
240
240
|
return t || Ee(0, e), t;
|
|
241
241
|
}
|
|
@@ -247,11 +247,11 @@ var li = (e) => !!ts[e], Et, rs = () => Et, tc = (e, t) => ({
|
|
|
247
247
|
unfinalizedDrafts_: 0,
|
|
248
248
|
handledSet_: /* @__PURE__ */ new Set(),
|
|
249
249
|
processedForPatches_: /* @__PURE__ */ new Set(),
|
|
250
|
-
mapSetPlugin_: li(Sr) ?
|
|
251
|
-
arrayMethodsPlugin_: li(di) ?
|
|
250
|
+
mapSetPlugin_: li(Sr) ? it(Sr) : void 0,
|
|
251
|
+
arrayMethodsPlugin_: li(di) ? it(di) : void 0
|
|
252
252
|
});
|
|
253
253
|
function ci(e, t) {
|
|
254
|
-
t && (e.patchPlugin_ =
|
|
254
|
+
t && (e.patchPlugin_ = it(Vn), e.patches_ = [], e.inversePatches_ = [], e.patchListener_ = t);
|
|
255
255
|
}
|
|
256
256
|
function Gn(e) {
|
|
257
257
|
zn(e), e.drafts_.forEach(rc), e.drafts_ = null;
|
|
@@ -469,7 +469,7 @@ function fr(e) {
|
|
|
469
469
|
var lc = class {
|
|
470
470
|
constructor(e) {
|
|
471
471
|
this.autoFreeze_ = !0, this.useStrictShallowCopy_ = !1, this.useStrictIteration_ = !1, this.produce = (t, r, n) => {
|
|
472
|
-
if (
|
|
472
|
+
if (tt(t) && !tt(r)) {
|
|
473
473
|
const i = r;
|
|
474
474
|
r = t;
|
|
475
475
|
const o = this;
|
|
@@ -477,7 +477,7 @@ var lc = class {
|
|
|
477
477
|
return o.produce(d, (c) => r.call(this, c, ...l));
|
|
478
478
|
};
|
|
479
479
|
}
|
|
480
|
-
|
|
480
|
+
tt(r) || Ee(6), n !== void 0 && !tt(n) && Ee(7);
|
|
481
481
|
let a;
|
|
482
482
|
if (Fe(t)) {
|
|
483
483
|
const i = ui(this), o = Hn(i, t, void 0);
|
|
@@ -491,7 +491,7 @@ var lc = class {
|
|
|
491
491
|
} else if (!t || !ya(t)) {
|
|
492
492
|
if (a = r(t), a === void 0 && (a = t), a === Qo && (a = void 0), this.autoFreeze_ && Zr(a, !0), n) {
|
|
493
493
|
const i = [], o = [];
|
|
494
|
-
|
|
494
|
+
it(Vn).generateReplacementPatches_(t, a, {
|
|
495
495
|
patches_: i,
|
|
496
496
|
inversePatches_: o
|
|
497
497
|
}), n(i, o);
|
|
@@ -499,7 +499,7 @@ var lc = class {
|
|
|
499
499
|
return a;
|
|
500
500
|
} else Ee(1, t);
|
|
501
501
|
}, this.produceWithPatches = (t, r) => {
|
|
502
|
-
if (
|
|
502
|
+
if (tt(t)) return (i, ...o) => this.produceWithPatches(i, (s) => t(s, ...o));
|
|
503
503
|
let n, a;
|
|
504
504
|
return [
|
|
505
505
|
this.produce(t, r, (i, o) => {
|
|
@@ -543,12 +543,12 @@ var lc = class {
|
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
545
|
r > -1 && (t = t.slice(r + 1));
|
|
546
|
-
const n =
|
|
546
|
+
const n = it(Vn).applyPatches_;
|
|
547
547
|
return Ie(e) ? n(e, t) : this.produce(e, (a) => n(a, t));
|
|
548
548
|
}
|
|
549
549
|
};
|
|
550
550
|
function Hn(e, t, r, n) {
|
|
551
|
-
const [a, i] = Kr(t) ?
|
|
551
|
+
const [a, i] = Kr(t) ? it(Sr).proxyMap_(t, r) : Yr(t) ? it(Sr).proxySet_(t, r) : sc(t, r);
|
|
552
552
|
return (r?.scope_ ?? rs()).drafts_.push(a), i.callbacks_ = r?.callbacks_ ?? [], i.key_ = n, r && n !== void 0 ? ic(r, i, n) : i.callbacks_.push(function(s) {
|
|
553
553
|
s.mapSetPlugin_?.fixSetContents(i);
|
|
554
554
|
const { patchPlugin_: d } = s;
|
|
@@ -865,7 +865,7 @@ var Ec = ls(), Ic = ls, qn = /* @__PURE__ */ Gl({
|
|
|
865
865
|
createSelector: () => Oc,
|
|
866
866
|
createSelectorCreator: () => $a,
|
|
867
867
|
createSerializableStateInvariantMiddleware: () => Cs,
|
|
868
|
-
createSlice: () =>
|
|
868
|
+
createSlice: () => Xe,
|
|
869
869
|
current: () => Qr,
|
|
870
870
|
findNonSerializableValue: () => Or,
|
|
871
871
|
formatProdErrorMessage: () => Y,
|
|
@@ -983,7 +983,7 @@ function yi(e) {
|
|
|
983
983
|
return Fe(e) ? en(e, () => {
|
|
984
984
|
}) : e;
|
|
985
985
|
}
|
|
986
|
-
function
|
|
986
|
+
function rt(e, t, r) {
|
|
987
987
|
return e.has(t) ? e.get(t) : e.set(t, r(t)).get(t);
|
|
988
988
|
}
|
|
989
989
|
function ys(e) {
|
|
@@ -1528,15 +1528,15 @@ function Rs({ creators: e } = {}) {
|
|
|
1528
1528
|
function O(T) {
|
|
1529
1529
|
let k = T[b];
|
|
1530
1530
|
if (typeof k > "u") {
|
|
1531
|
-
if (S) k =
|
|
1531
|
+
if (S) k = rt(m, O, y);
|
|
1532
1532
|
else if (process.env.NODE_ENV !== "production") throw new Error(process.env.NODE_ENV === "production" ? Y(15) : "selectSlice returned undefined for an uninjected slice reducer");
|
|
1533
1533
|
}
|
|
1534
1534
|
return k;
|
|
1535
1535
|
}
|
|
1536
1536
|
function N(T = f) {
|
|
1537
|
-
return
|
|
1537
|
+
return rt(rt(h, S, () => /* @__PURE__ */ new WeakMap()), T, () => {
|
|
1538
1538
|
const k = {};
|
|
1539
|
-
for (const [q, J] of Object.entries(n.selectors ?? {})) k[q] = zc(J, T, () =>
|
|
1539
|
+
for (const [q, J] of Object.entries(n.selectors ?? {})) k[q] = zc(J, T, () => rt(m, T, y), S);
|
|
1540
1540
|
return k;
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
@@ -1581,7 +1581,7 @@ function zc(e, t, r, n) {
|
|
|
1581
1581
|
}
|
|
1582
1582
|
return a.unwrapped = e, a;
|
|
1583
1583
|
}
|
|
1584
|
-
var
|
|
1584
|
+
var Xe = /* @__PURE__ */ Rs();
|
|
1585
1585
|
function Wc() {
|
|
1586
1586
|
function e(t, r) {
|
|
1587
1587
|
return {
|
|
@@ -1688,14 +1688,14 @@ function ut(e, t) {
|
|
|
1688
1688
|
const r = t(e);
|
|
1689
1689
|
return process.env.NODE_ENV !== "production" && r === void 0 && console.warn("The entity passed to the `selectId` implementation returned undefined.", "You should probably provide your own `selectId` implementation.", "The entity that was passed:", e, "The `selectId` implementation:", t.toString()), r;
|
|
1690
1690
|
}
|
|
1691
|
-
function
|
|
1691
|
+
function Ze(e) {
|
|
1692
1692
|
return Array.isArray(e) || (e = Object.values(e)), e;
|
|
1693
1693
|
}
|
|
1694
1694
|
function pr(e) {
|
|
1695
1695
|
return Ie(e) ? Qr(e) : e;
|
|
1696
1696
|
}
|
|
1697
1697
|
function Fs(e, t, r) {
|
|
1698
|
-
e =
|
|
1698
|
+
e = Ze(e);
|
|
1699
1699
|
const n = pr(r.ids), a = new Set(n), i = [], o = /* @__PURE__ */ new Set([]), s = [];
|
|
1700
1700
|
for (const d of e) {
|
|
1701
1701
|
const l = ut(d, t);
|
|
@@ -1716,7 +1716,7 @@ function js(e) {
|
|
|
1716
1716
|
y in v.entities || (v.ids.push(y), v.entities[y] = p);
|
|
1717
1717
|
}
|
|
1718
1718
|
function r(p, v) {
|
|
1719
|
-
p =
|
|
1719
|
+
p = Ze(p);
|
|
1720
1720
|
for (const y of p) t(y, v);
|
|
1721
1721
|
}
|
|
1722
1722
|
function n(p, v) {
|
|
@@ -1724,11 +1724,11 @@ function js(e) {
|
|
|
1724
1724
|
y in v.entities || v.ids.push(y), v.entities[y] = p;
|
|
1725
1725
|
}
|
|
1726
1726
|
function a(p, v) {
|
|
1727
|
-
p =
|
|
1727
|
+
p = Ze(p);
|
|
1728
1728
|
for (const y of p) n(y, v);
|
|
1729
1729
|
}
|
|
1730
1730
|
function i(p, v) {
|
|
1731
|
-
p =
|
|
1731
|
+
p = Ze(p), v.ids = [], v.entities = {}, r(p, v);
|
|
1732
1732
|
}
|
|
1733
1733
|
function o(p, v) {
|
|
1734
1734
|
return s([p], v);
|
|
@@ -1807,7 +1807,7 @@ function nu(e, t) {
|
|
|
1807
1807
|
return o([y], $);
|
|
1808
1808
|
}
|
|
1809
1809
|
function o(y, $, P) {
|
|
1810
|
-
y =
|
|
1810
|
+
y = Ze(y);
|
|
1811
1811
|
const b = new Set(P ?? pr($.ids)), S = /* @__PURE__ */ new Set(), O = y.filter((N) => {
|
|
1812
1812
|
const T = ut(N, e), k = !S.has(T);
|
|
1813
1813
|
return k && S.add(T), !b.has(T) && k;
|
|
@@ -1819,16 +1819,16 @@ function nu(e, t) {
|
|
|
1819
1819
|
}
|
|
1820
1820
|
function d(y, $) {
|
|
1821
1821
|
let P = {};
|
|
1822
|
-
if (y =
|
|
1822
|
+
if (y = Ze(y), y.length !== 0) {
|
|
1823
1823
|
for (const b of y) {
|
|
1824
1824
|
const S = e(b);
|
|
1825
1825
|
P[S] = b, delete $.entities[S];
|
|
1826
1826
|
}
|
|
1827
|
-
y =
|
|
1827
|
+
y = Ze(P), v($, y);
|
|
1828
1828
|
}
|
|
1829
1829
|
}
|
|
1830
1830
|
function l(y, $) {
|
|
1831
|
-
y =
|
|
1831
|
+
y = Ze(y), $.entities = {}, $.ids = [], o(y, $, []);
|
|
1832
1832
|
}
|
|
1833
1833
|
function c(y, $) {
|
|
1834
1834
|
return f([y], $);
|
|
@@ -1916,7 +1916,7 @@ var iu = "task", Ls = "listener", Bs = "completed", Sa = "cancelled", ou = `task
|
|
|
1916
1916
|
}, Pa = (e, t) => {
|
|
1917
1917
|
if (typeof e != "function") throw new TypeError(process.env.NODE_ENV === "production" ? Y(32) : `${t} is not a function`);
|
|
1918
1918
|
}, Tr = () => {
|
|
1919
|
-
}, Us = (e, t = Tr) => (e.catch(t), e), Vs = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)),
|
|
1919
|
+
}, Us = (e, t = Tr) => (e.catch(t), e), Vs = (e, t) => (e.addEventListener("abort", t, { once: !0 }), () => e.removeEventListener("abort", t)), nt = (e) => {
|
|
1920
1920
|
if (e.aborted) throw new qt(e.reason);
|
|
1921
1921
|
};
|
|
1922
1922
|
function Gs(e, t) {
|
|
@@ -1946,7 +1946,7 @@ var lu = async (e, t) => {
|
|
|
1946
1946
|
} finally {
|
|
1947
1947
|
t?.();
|
|
1948
1948
|
}
|
|
1949
|
-
}, Ar = (e) => (t) => Us(Gs(e, t).then((r) => (
|
|
1949
|
+
}, Ar = (e) => (t) => Us(Gs(e, t).then((r) => (nt(e), r))), zs = (e) => {
|
|
1950
1950
|
const t = Ar(e);
|
|
1951
1951
|
return (r) => t(new Promise((n) => setTimeout(n, r)));
|
|
1952
1952
|
}, { assign: pt } = Object, Ni = {}, Kt = "listenerMiddleware", cu = (e, t) => {
|
|
@@ -1956,13 +1956,13 @@ var lu = async (e, t) => {
|
|
|
1956
1956
|
const i = new AbortController();
|
|
1957
1957
|
r(i);
|
|
1958
1958
|
const o = lu(async () => {
|
|
1959
|
-
|
|
1959
|
+
nt(e), nt(i.signal);
|
|
1960
1960
|
const s = await n({
|
|
1961
1961
|
pause: Ar(i.signal),
|
|
1962
1962
|
delay: zs(i.signal),
|
|
1963
1963
|
signal: i.signal
|
|
1964
1964
|
});
|
|
1965
|
-
return
|
|
1965
|
+
return nt(i.signal), s;
|
|
1966
1966
|
}, () => i.abort(su));
|
|
1967
1967
|
return a?.autoJoin && t.push(o.catch(Tr)), {
|
|
1968
1968
|
result: Ar(e)(o),
|
|
@@ -1973,7 +1973,7 @@ var lu = async (e, t) => {
|
|
|
1973
1973
|
};
|
|
1974
1974
|
}, uu = (e, t) => {
|
|
1975
1975
|
const r = async (n, a) => {
|
|
1976
|
-
|
|
1976
|
+
nt(t);
|
|
1977
1977
|
let i = () => {
|
|
1978
1978
|
};
|
|
1979
1979
|
const o = [new Promise((s, d) => {
|
|
@@ -1994,7 +1994,7 @@ var lu = async (e, t) => {
|
|
|
1994
1994
|
a != null && o.push(new Promise((s) => setTimeout(s, a, null)));
|
|
1995
1995
|
try {
|
|
1996
1996
|
const s = await Gs(t, Promise.race(o));
|
|
1997
|
-
return
|
|
1997
|
+
return nt(t), s;
|
|
1998
1998
|
} finally {
|
|
1999
1999
|
i();
|
|
2000
2000
|
}
|
|
@@ -2088,7 +2088,7 @@ var lu = async (e, t) => {
|
|
|
2088
2088
|
$.abort(Kn), m.pending.delete($);
|
|
2089
2089
|
},
|
|
2090
2090
|
throwIfCancelled: () => {
|
|
2091
|
-
|
|
2091
|
+
nt($.signal);
|
|
2092
2092
|
}
|
|
2093
2093
|
})));
|
|
2094
2094
|
} catch (S) {
|
|
@@ -2143,16 +2143,16 @@ var lu = async (e, t) => {
|
|
|
2143
2143
|
meta: { instanceId: e }
|
|
2144
2144
|
})), { withTypes: () => r }), n = Object.assign(function(...d) {
|
|
2145
2145
|
d.forEach((l) => {
|
|
2146
|
-
|
|
2146
|
+
rt(t, l, hu);
|
|
2147
2147
|
});
|
|
2148
|
-
}, { withTypes: () => n }), a = (s) => br(...Array.from(t.values()).map((d) =>
|
|
2148
|
+
}, { withTypes: () => n }), a = (s) => br(...Array.from(t.values()).map((d) => rt(d.applied, s, d.middleware))), i = Er(r, vu(e));
|
|
2149
2149
|
return {
|
|
2150
2150
|
middleware: (s) => (d) => (l) => i(l) ? (n(...l.payload), s.dispatch) : a(s)(d)(l),
|
|
2151
2151
|
addMiddleware: n,
|
|
2152
2152
|
withMiddleware: r,
|
|
2153
2153
|
instanceId: e
|
|
2154
2154
|
};
|
|
2155
|
-
}, bu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", $u = (e) => e.flatMap((t) => bu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)), Oa = /* @__PURE__ */ Symbol.for("rtk-state-proxy-original"), gu = (e) => !!e && !!e[Oa], Nu = /* @__PURE__ */ new WeakMap(), Cu = (e, t, r) =>
|
|
2155
|
+
}, bu = (e) => "reducerPath" in e && typeof e.reducerPath == "string", $u = (e) => e.flatMap((t) => bu(t) ? [[t.reducerPath, t.reducer]] : Object.entries(t)), Oa = /* @__PURE__ */ Symbol.for("rtk-state-proxy-original"), gu = (e) => !!e && !!e[Oa], Nu = /* @__PURE__ */ new WeakMap(), Cu = (e, t, r) => rt(Nu, e, () => new Proxy(e, { get: (n, a, i) => {
|
|
2156
2156
|
if (a === Oa) return n;
|
|
2157
2157
|
const o = Reflect.get(n, a, i);
|
|
2158
2158
|
if (typeof o > "u") {
|
|
@@ -2202,7 +2202,7 @@ var Be = [
|
|
|
2202
2202
|
], Ou = {
|
|
2203
2203
|
currentStep: "professionals",
|
|
2204
2204
|
completedSteps: ["professionals"]
|
|
2205
|
-
}, Ks =
|
|
2205
|
+
}, Ks = Xe({
|
|
2206
2206
|
name: "breadcrumbs",
|
|
2207
2207
|
initialState: Ou,
|
|
2208
2208
|
reducers: {
|
|
@@ -2249,7 +2249,7 @@ var Be = [
|
|
|
2249
2249
|
isService: !0,
|
|
2250
2250
|
currency: "",
|
|
2251
2251
|
token: ""
|
|
2252
|
-
}, Ys =
|
|
2252
|
+
}, Ys = Xe({
|
|
2253
2253
|
name: "outletDetails",
|
|
2254
2254
|
initialState: Pi,
|
|
2255
2255
|
reducers: {
|
|
@@ -2268,7 +2268,7 @@ var Be = [
|
|
|
2268
2268
|
selectedCategory: null,
|
|
2269
2269
|
selectedServices: [],
|
|
2270
2270
|
selectedProfessional: null
|
|
2271
|
-
}, Zs =
|
|
2271
|
+
}, Zs = Xe({
|
|
2272
2272
|
name: "service",
|
|
2273
2273
|
initialState: wi,
|
|
2274
2274
|
reducers: {
|
|
@@ -2298,7 +2298,7 @@ var Be = [
|
|
|
2298
2298
|
},
|
|
2299
2299
|
clearServices: () => wi
|
|
2300
2300
|
}
|
|
2301
|
-
}), { setServicePayload: Du, setCategory: Av, toggleService: _i, clearServices: xv, incrementService: Ru, decrementService: Oi, toggleProfessional: Fu } = Zs.actions, ju = Zs.reducer, Ke = "https://prod.aaravpos.com/api/v1",
|
|
2301
|
+
}), { setServicePayload: Du, setCategory: Av, toggleService: _i, clearServices: xv, incrementService: Ru, decrementService: Oi, toggleProfessional: Fu } = Zs.actions, ju = Zs.reducer, Ke = "https://prod.aaravpos.com/api/v1", Je = () => ({
|
|
2302
2302
|
"Content-Type": "application/json",
|
|
2303
2303
|
Authorization: `Bearer ${an.getState()?.barber?.outletDetails?.token}`
|
|
2304
2304
|
}), Lu = async (e, t, r) => {
|
|
@@ -2316,14 +2316,14 @@ var Be = [
|
|
|
2316
2316
|
}, Bu = async (e, t, r) => {
|
|
2317
2317
|
const n = await fetch(`${Ke}/integration/slot/tenant/${e}/staff/${t}/online?date=${r}`, {
|
|
2318
2318
|
method: "GET",
|
|
2319
|
-
headers:
|
|
2319
|
+
headers: Je()
|
|
2320
2320
|
});
|
|
2321
2321
|
if (!n.ok) throw new Error("Failed to fetch services");
|
|
2322
2322
|
return await n.json();
|
|
2323
2323
|
}, Uu = async (e) => {
|
|
2324
2324
|
const t = await fetch(`${Ke}/integration/appointment/create`, {
|
|
2325
2325
|
method: "POST",
|
|
2326
|
-
headers:
|
|
2326
|
+
headers: Je(),
|
|
2327
2327
|
body: JSON.stringify(e)
|
|
2328
2328
|
});
|
|
2329
2329
|
if (!t.ok) throw new Error("Failed to fetch services");
|
|
@@ -2331,14 +2331,14 @@ var Be = [
|
|
|
2331
2331
|
}, Vu = async (e, t) => {
|
|
2332
2332
|
const r = await fetch(`${Ke}/integration/appointment/details?tenantId=${t}&appointmentId=${e}`, {
|
|
2333
2333
|
method: "GET",
|
|
2334
|
-
headers:
|
|
2334
|
+
headers: Je()
|
|
2335
2335
|
});
|
|
2336
2336
|
if (!r.ok) throw new Error("Failed to fetch appointment details");
|
|
2337
2337
|
return await r.json();
|
|
2338
2338
|
}, Gu = async ({ search: e, tenantId: t }) => {
|
|
2339
2339
|
const r = await fetch(`${Ke}/integration/customer/drop-down/list?tenantId=${t}&search=${encodeURIComponent(e || "")}`, {
|
|
2340
2340
|
method: "GET",
|
|
2341
|
-
headers:
|
|
2341
|
+
headers: Je()
|
|
2342
2342
|
});
|
|
2343
2343
|
if (!r.ok) throw new Error("Failed to fetch customers");
|
|
2344
2344
|
return await r.json();
|
|
@@ -2346,7 +2346,7 @@ var Be = [
|
|
|
2346
2346
|
try {
|
|
2347
2347
|
const t = await fetch(`${Ke}/payment/pay/customer/direct`, {
|
|
2348
2348
|
method: "POST",
|
|
2349
|
-
headers:
|
|
2349
|
+
headers: Je(),
|
|
2350
2350
|
body: JSON.stringify(e)
|
|
2351
2351
|
}), r = await t.json();
|
|
2352
2352
|
if (!t.ok) throw r;
|
|
@@ -2358,7 +2358,7 @@ var Be = [
|
|
|
2358
2358
|
try {
|
|
2359
2359
|
const t = await fetch(`${Ke}/payment/orders/${e}/invoicing/finalize`, {
|
|
2360
2360
|
method: "POST",
|
|
2361
|
-
headers:
|
|
2361
|
+
headers: Je()
|
|
2362
2362
|
}), r = await t.json();
|
|
2363
2363
|
if (!t.ok) throw r;
|
|
2364
2364
|
return r;
|
|
@@ -2377,7 +2377,7 @@ var Be = [
|
|
|
2377
2377
|
}, Ti = async (e, t, r) => {
|
|
2378
2378
|
const n = await fetch(`${Ke}/concent/check/${e}/${t}?serviceId=${r}`, {
|
|
2379
2379
|
method: "GET",
|
|
2380
|
-
headers:
|
|
2380
|
+
headers: Je()
|
|
2381
2381
|
});
|
|
2382
2382
|
if (!n.ok) throw new Error("Failed to check consent requirement");
|
|
2383
2383
|
return n.json();
|
|
@@ -2396,12 +2396,12 @@ var Be = [
|
|
|
2396
2396
|
d === "CHECKBOX_ONLY" && (h.isChecked = l ?? !0), c && (h.typedName = c), f && (h.imageUrl = f);
|
|
2397
2397
|
const m = await fetch(`${Ke}/concent/customer-sign`, {
|
|
2398
2398
|
method: "POST",
|
|
2399
|
-
headers:
|
|
2399
|
+
headers: Je(),
|
|
2400
2400
|
body: JSON.stringify(h)
|
|
2401
2401
|
}), p = await m.json();
|
|
2402
2402
|
if (!m.ok) throw p;
|
|
2403
2403
|
return p;
|
|
2404
|
-
}, mr = nn("slots/getStaffSlots", async ({ tenantId: e, staffId: t, date: r }) => await Bu(e, t, r)), Js =
|
|
2404
|
+
}, mr = nn("slots/getStaffSlots", async ({ tenantId: e, staffId: t, date: r }) => await Bu(e, t, r)), Js = Xe({
|
|
2405
2405
|
name: "slots",
|
|
2406
2406
|
initialState: {
|
|
2407
2407
|
selectedSlotIndexes: [],
|
|
@@ -2462,7 +2462,7 @@ var Be = [
|
|
|
2462
2462
|
userDetails: null,
|
|
2463
2463
|
tipPct: 0,
|
|
2464
2464
|
bookingMode: "booking"
|
|
2465
|
-
}, Qs =
|
|
2465
|
+
}, Qs = Xe({
|
|
2466
2466
|
name: "appointment",
|
|
2467
2467
|
initialState: Ai,
|
|
2468
2468
|
reducers: {
|
|
@@ -2494,7 +2494,7 @@ var Be = [
|
|
|
2494
2494
|
t.loading = !1, t.error = r.payload || "Appointment failed";
|
|
2495
2495
|
});
|
|
2496
2496
|
}
|
|
2497
|
-
}), { resetAppointment: Mv, setBookingMode: kv, setUserDetails: xi, setTips: Yu, setAppointmentId: nr, clearUserDetails: ed } = Qs.actions, Zu = Qs.reducer, td =
|
|
2497
|
+
}), { resetAppointment: Mv, setBookingMode: kv, setUserDetails: xi, setTips: Yu, setAppointmentId: nr, clearUserDetails: ed } = Qs.actions, Zu = Qs.reducer, td = Xe({
|
|
2498
2498
|
name: "outletList",
|
|
2499
2499
|
initialState: { outlets: [] },
|
|
2500
2500
|
reducers: {
|
|
@@ -2505,7 +2505,7 @@ var Be = [
|
|
|
2505
2505
|
e.outlets = [];
|
|
2506
2506
|
}
|
|
2507
2507
|
}
|
|
2508
|
-
}), { setOutletList: Xu, clearOutletList: Dv } = td.actions, Ju = td.reducer, rd =
|
|
2508
|
+
}), { setOutletList: Xu, clearOutletList: Dv } = td.actions, Ju = td.reducer, rd = Xe({
|
|
2509
2509
|
name: "theme",
|
|
2510
2510
|
initialState: {
|
|
2511
2511
|
button: {
|
|
@@ -3259,7 +3259,7 @@ var f1 = (e) => Number(e.price || e.min_price || 0), ar = (e, { perUnit: t = !1
|
|
|
3259
3259
|
"Dec"
|
|
3260
3260
|
];
|
|
3261
3261
|
function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime: n = !1, showTip: a = !1, tipPct: i = 0, onTipChange: o, consentRequired: s = !1, consentCompleted: d = 0, totalConsents: l = 0, checkingConsent: c = !1, loading: f = !1, isBookingDisabled: h = !1, showFooterButton: m = !1, showBookingSection: p = !0 }) {
|
|
3262
|
-
const v = qe(), { outletName: y, timeZone: $ } = X((
|
|
3262
|
+
const v = qe(), { outletName: y, timeZone: $ } = X((V) => V.barber.outletDetails), { selectedSlotIndexes: P, slots: b, selectedDate: S } = X((V) => V.barber.slots), { staff: O, selectedServices: N, selectedProfessional: T } = X((V) => V.barber.service), k = be.now().setZone($ ?? "UTC"), [q, J] = Z(""), [ne, he] = Z(!1), fe = je(null), pe = je(null), [Pe, ve] = Z(0), me = [
|
|
3263
3263
|
0,
|
|
3264
3264
|
5,
|
|
3265
3265
|
10,
|
|
@@ -3275,9 +3275,9 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3275
3275
|
tax: ar(H),
|
|
3276
3276
|
unitTax: ar(H, { perUnit: !0 })
|
|
3277
3277
|
}));
|
|
3278
|
-
const
|
|
3279
|
-
return
|
|
3280
|
-
const Oe =
|
|
3278
|
+
const V = O?.find((H) => H.id === T.id);
|
|
3279
|
+
return V ? N.map((H) => {
|
|
3280
|
+
const Oe = V.assignments?.find((et) => et.id === H.id), ye = {
|
|
3281
3281
|
...H,
|
|
3282
3282
|
price: Oe?.price || H.price || H.min_price || 0,
|
|
3283
3283
|
duration: Oe?.duration || H.estimated_time || H.min_time || 0
|
|
@@ -3292,15 +3292,15 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3292
3292
|
T,
|
|
3293
3293
|
O,
|
|
3294
3294
|
N
|
|
3295
|
-
]), x = le.reduce((
|
|
3295
|
+
]), x = le.reduce((V, H) => V + Number(H.price || H.min_price || 0) * (H.qty || 1), 0), C = le.reduce((V, H) => V + Number(H.duration || H.min_time || H.estimated_time || 0) * (H.qty || 1), 0), E = Math.ceil(C / ie), M = (V) => {
|
|
3296
3296
|
if (!ae.length) return "";
|
|
3297
|
-
const H = ae[
|
|
3297
|
+
const H = ae[V]?.start_time, Oe = ae[V + E - 1];
|
|
3298
3298
|
return !H || !Oe ? "" : `${H} - ${Oe.end_time || Oe.start_time}`;
|
|
3299
|
-
},
|
|
3299
|
+
}, L = S || {
|
|
3300
3300
|
day: k.day,
|
|
3301
3301
|
month: k.month,
|
|
3302
3302
|
year: k.year
|
|
3303
|
-
}, D = P?.[0], G = D !== void 0 ? M(D) : null,
|
|
3303
|
+
}, D = P?.[0], G = D !== void 0 ? M(D) : null, B = L.month ?? 0, U = G ? `${p1[B - 1]} ${L.day} at ${G}` : null, z = le.reduce((V, H) => V + H.tax, 0), W = Number(i) || 0, K = a ? x * W / 100 : 0, A = x + z + K;
|
|
3304
3304
|
ce(() => {
|
|
3305
3305
|
a && i == null && o?.(0);
|
|
3306
3306
|
}, [
|
|
@@ -3317,16 +3317,16 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3317
3317
|
t
|
|
3318
3318
|
]), $e = h || f || c || !G;
|
|
3319
3319
|
return ce(() => {
|
|
3320
|
-
const
|
|
3320
|
+
const V = () => {
|
|
3321
3321
|
const Oe = (fe.current?.offsetHeight || 0) + (pe.current?.offsetHeight || 0) + (window.innerWidth <= 991 ? 195 : 70);
|
|
3322
3322
|
ve(window.innerHeight - Oe);
|
|
3323
3323
|
};
|
|
3324
|
-
|
|
3324
|
+
V();
|
|
3325
3325
|
const H = new ResizeObserver(() => {
|
|
3326
|
-
|
|
3326
|
+
V();
|
|
3327
3327
|
});
|
|
3328
|
-
return pe.current && H.observe(pe.current), fe.current && H.observe(fe.current), window.addEventListener("resize",
|
|
3329
|
-
H.disconnect(), window.removeEventListener("resize",
|
|
3328
|
+
return pe.current && H.observe(pe.current), fe.current && H.observe(fe.current), window.addEventListener("resize", V), () => {
|
|
3329
|
+
H.disconnect(), window.removeEventListener("resize", V);
|
|
3330
3330
|
};
|
|
3331
3331
|
}, [
|
|
3332
3332
|
le,
|
|
@@ -3379,9 +3379,9 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3379
3379
|
children: [/* @__PURE__ */ u("span", {
|
|
3380
3380
|
className: "aaravpos-barber-date-time-label",
|
|
3381
3381
|
children: "Date & Time:"
|
|
3382
|
-
}),
|
|
3382
|
+
}), U ? /* @__PURE__ */ u("span", {
|
|
3383
3383
|
className: "aaravpos-barber-date-time-value",
|
|
3384
|
-
children:
|
|
3384
|
+
children: U
|
|
3385
3385
|
}) : /* @__PURE__ */ u("span", {
|
|
3386
3386
|
className: "aaravpos-barber-date-time-empty",
|
|
3387
3387
|
children: "No time selected"
|
|
@@ -3392,32 +3392,32 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3392
3392
|
/* @__PURE__ */ u("ul", {
|
|
3393
3393
|
className: "aaravpos-barber-order-list",
|
|
3394
3394
|
style: { height: `${Pe}px` },
|
|
3395
|
-
children: le?.length > 0 && le.map((
|
|
3395
|
+
children: le?.length > 0 && le.map((V) => /* @__PURE__ */ g("li", {
|
|
3396
3396
|
className: "aaravpos-barber-order-item",
|
|
3397
3397
|
children: [/* @__PURE__ */ u("div", {
|
|
3398
3398
|
className: "aaravpos-barber-main-text",
|
|
3399
3399
|
children: /* @__PURE__ */ u("p", {
|
|
3400
3400
|
className: "aaravpos-barber-order-service-name",
|
|
3401
|
-
children:
|
|
3401
|
+
children: V.name
|
|
3402
3402
|
})
|
|
3403
3403
|
}), /* @__PURE__ */ g("div", {
|
|
3404
3404
|
className: "aaravpos-barber-order-details",
|
|
3405
3405
|
children: [
|
|
3406
3406
|
/* @__PURE__ */ g("div", {
|
|
3407
3407
|
className: "aaravpos-barber-order-detail",
|
|
3408
|
-
children: [/* @__PURE__ */ u(Vf, { size: 13 }), /* @__PURE__ */ u("span", { children:
|
|
3408
|
+
children: [/* @__PURE__ */ u(Vf, { size: 13 }), /* @__PURE__ */ u("span", { children: V.qty })]
|
|
3409
3409
|
}),
|
|
3410
3410
|
/* @__PURE__ */ g("div", {
|
|
3411
3411
|
className: "aaravpos-barber-order-detail center",
|
|
3412
|
-
children: [/* @__PURE__ */ u(id, { size: 13 }), /* @__PURE__ */ g("span", { children: [
|
|
3412
|
+
children: [/* @__PURE__ */ u(id, { size: 13 }), /* @__PURE__ */ g("span", { children: [V.min_time || V.estimated_time, " min"] })]
|
|
3413
3413
|
}),
|
|
3414
3414
|
/* @__PURE__ */ g("p", {
|
|
3415
3415
|
className: "aaravpos-barber-order-detail right",
|
|
3416
|
-
children: [/* @__PURE__ */ u(we, { size: 12 }),
|
|
3416
|
+
children: [/* @__PURE__ */ u(we, { size: 12 }), V.price || V.min_price]
|
|
3417
3417
|
})
|
|
3418
3418
|
]
|
|
3419
3419
|
})]
|
|
3420
|
-
},
|
|
3420
|
+
}, V.id))
|
|
3421
3421
|
}),
|
|
3422
3422
|
/* @__PURE__ */ g("div", {
|
|
3423
3423
|
className: "third",
|
|
@@ -3451,17 +3451,17 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3451
3451
|
}),
|
|
3452
3452
|
/* @__PURE__ */ u("div", {
|
|
3453
3453
|
className: "aaravpos-barber-tip-options",
|
|
3454
|
-
children: [...me, "custom"].map((
|
|
3455
|
-
const Oe =
|
|
3454
|
+
children: [...me, "custom"].map((V, H) => {
|
|
3455
|
+
const Oe = V === "custom", ye = Oe ? ne : W === V, et = H === 0, Zt = H === [...me, "custom"].length - 1;
|
|
3456
3456
|
return /* @__PURE__ */ u("button", {
|
|
3457
3457
|
onClick: () => {
|
|
3458
|
-
Oe ? (he(!0), o?.(Number(q) || 0)) : (he(!1), J(""), o?.(Number(
|
|
3458
|
+
Oe ? (he(!0), o?.(Number(q) || 0)) : (he(!1), J(""), o?.(Number(V)));
|
|
3459
3459
|
},
|
|
3460
3460
|
className: `aaravpos-barber-tip-btn
|
|
3461
|
-
${
|
|
3461
|
+
${et || Zt ? "aaravpos-barber-tip-btn-fixed" : "aaravpos-barber-tip-btn-flex"}
|
|
3462
3462
|
${ye ? "aaravpos-barber-tip-btn-active" : ""}`,
|
|
3463
|
-
children: Oe ? "Custom" :
|
|
3464
|
-
},
|
|
3463
|
+
children: Oe ? "Custom" : V === 0 ? "No tip" : `${V}%`
|
|
3464
|
+
}, V);
|
|
3465
3465
|
})
|
|
3466
3466
|
}),
|
|
3467
3467
|
ne && /* @__PURE__ */ u("div", {
|
|
@@ -3472,8 +3472,8 @@ function xa({ goToStep: e, buttonText: t, onButtonClick: r, showTaxesOnlyIfTime:
|
|
|
3472
3472
|
type: "number",
|
|
3473
3473
|
placeholder: "Enter %",
|
|
3474
3474
|
value: q,
|
|
3475
|
-
onChange: (
|
|
3476
|
-
const H =
|
|
3475
|
+
onChange: (V) => {
|
|
3476
|
+
const H = V.target.value;
|
|
3477
3477
|
(H === "" || Number(H) >= 0 && Number(H) <= 100) && (J(H), o?.(Number(H) || 0));
|
|
3478
3478
|
},
|
|
3479
3479
|
className: "aaravpos-barber-tip-input"
|
|
@@ -3971,8 +3971,8 @@ function g1() {
|
|
|
3971
3971
|
try {
|
|
3972
3972
|
if (!x.isValid || !C.isValid) throw new Error("Invalid timezone or date range");
|
|
3973
3973
|
const E = Math.floor(C.diff(x, "days").days) + 1;
|
|
3974
|
-
return Array.from({ length: E }, (M,
|
|
3975
|
-
const D = x.plus({ days:
|
|
3974
|
+
return Array.from({ length: E }, (M, L) => {
|
|
3975
|
+
const D = x.plus({ days: L });
|
|
3976
3976
|
return {
|
|
3977
3977
|
day: D.day,
|
|
3978
3978
|
month: D.month,
|
|
@@ -4061,7 +4061,7 @@ function g1() {
|
|
|
4061
4061
|
return;
|
|
4062
4062
|
}
|
|
4063
4063
|
e(_n(P[x].start_time));
|
|
4064
|
-
const E = Array.from({ length: q }, (M,
|
|
4064
|
+
const E = Array.from({ length: q }, (M, L) => x + L);
|
|
4065
4065
|
e(wn({
|
|
4066
4066
|
indexes: E,
|
|
4067
4067
|
ids: E.map((M) => P[M]?.id)
|
|
@@ -4144,7 +4144,7 @@ function g1() {
|
|
|
4144
4144
|
children: /* @__PURE__ */ u(Mr, { size: 20 })
|
|
4145
4145
|
}),
|
|
4146
4146
|
N.slice(v, v + t).map((x) => {
|
|
4147
|
-
const C = be.fromISO(x.fullDate || ""), E = C.weekday % 7, M = be.now().setZone(s).startOf("day"),
|
|
4147
|
+
const C = be.fromISO(x.fullDate || ""), E = C.weekday % 7, M = be.now().setZone(s).startOf("day"), L = C.hasSame(M, "day"), D = l?.day === x.day && l?.month === x.month && l?.year === x.year, G = C.startOf("day"), B = G < b, U = G > S, z = B || U || kr({
|
|
4148
4148
|
dateObj: x,
|
|
4149
4149
|
selectedProfessional: i,
|
|
4150
4150
|
outletTimeZone: s || "UTC"
|
|
@@ -4153,7 +4153,7 @@ function g1() {
|
|
|
4153
4153
|
onClick: () => {
|
|
4154
4154
|
z || he(x);
|
|
4155
4155
|
},
|
|
4156
|
-
className: ["aaravpos-barber-date-card",
|
|
4156
|
+
className: ["aaravpos-barber-date-card", B || U || z ? "aaravpos-barber-date-card-disabled" : D ? "aaravpos-barber-date-card-active" : "aaravpos-barber-date-card-default"].filter(Boolean).join(" "),
|
|
4157
4157
|
children: [
|
|
4158
4158
|
z && /* @__PURE__ */ u("div", { className: "aaravpos-barber-date-disabled-slash" }),
|
|
4159
4159
|
/* @__PURE__ */ u("span", {
|
|
@@ -4164,7 +4164,7 @@ function g1() {
|
|
|
4164
4164
|
className: "aaravpos-barber-date-day",
|
|
4165
4165
|
children: x.day
|
|
4166
4166
|
}),
|
|
4167
|
-
|
|
4167
|
+
L && !D && !z && /* @__PURE__ */ u("span", {
|
|
4168
4168
|
className: "aaravpos-barber-date-today",
|
|
4169
4169
|
children: "TODAY"
|
|
4170
4170
|
}),
|
|
@@ -4725,14 +4725,14 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4725
4725
|
case h:
|
|
4726
4726
|
return $e;
|
|
4727
4727
|
default:
|
|
4728
|
-
var
|
|
4729
|
-
switch (
|
|
4728
|
+
var V = $e && $e.$$typeof;
|
|
4729
|
+
switch (V) {
|
|
4730
4730
|
case d:
|
|
4731
4731
|
case f:
|
|
4732
4732
|
case v:
|
|
4733
4733
|
case p:
|
|
4734
4734
|
case s:
|
|
4735
|
-
return
|
|
4735
|
+
return V;
|
|
4736
4736
|
default:
|
|
4737
4737
|
return oe;
|
|
4738
4738
|
}
|
|
@@ -4758,7 +4758,7 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4758
4758
|
function M(A) {
|
|
4759
4759
|
return typeof A == "object" && A !== null && A.$$typeof === r;
|
|
4760
4760
|
}
|
|
4761
|
-
function
|
|
4761
|
+
function L(A) {
|
|
4762
4762
|
return O(A) === f;
|
|
4763
4763
|
}
|
|
4764
4764
|
function D(A) {
|
|
@@ -4767,10 +4767,10 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4767
4767
|
function G(A) {
|
|
4768
4768
|
return O(A) === v;
|
|
4769
4769
|
}
|
|
4770
|
-
function
|
|
4770
|
+
function B(A) {
|
|
4771
4771
|
return O(A) === p;
|
|
4772
4772
|
}
|
|
4773
|
-
function
|
|
4773
|
+
function U(A) {
|
|
4774
4774
|
return O(A) === n;
|
|
4775
4775
|
}
|
|
4776
4776
|
function z(A) {
|
|
@@ -4782,7 +4782,7 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4782
4782
|
function K(A) {
|
|
4783
4783
|
return O(A) === h;
|
|
4784
4784
|
}
|
|
4785
|
-
e.AsyncMode = N, e.ConcurrentMode = T, e.ContextConsumer = k, e.ContextProvider = q, e.Element = J, e.ForwardRef = ne, e.Fragment = he, e.Lazy = fe, e.Memo = pe, e.Portal = Pe, e.Profiler = ve, e.StrictMode = me, e.Suspense = ae, e.isAsyncMode = le, e.isConcurrentMode = x, e.isContextConsumer = C, e.isContextProvider = E, e.isElement = M, e.isForwardRef =
|
|
4785
|
+
e.AsyncMode = N, e.ConcurrentMode = T, e.ContextConsumer = k, e.ContextProvider = q, e.Element = J, e.ForwardRef = ne, e.Fragment = he, e.Lazy = fe, e.Memo = pe, e.Portal = Pe, e.Profiler = ve, e.StrictMode = me, e.Suspense = ae, e.isAsyncMode = le, e.isConcurrentMode = x, e.isContextConsumer = C, e.isContextProvider = E, e.isElement = M, e.isForwardRef = L, e.isFragment = D, e.isLazy = G, e.isMemo = B, e.isPortal = U, e.isProfiler = z, e.isStrictMode = W, e.isSuspense = K, e.isValidElementType = S, e.typeOf = O;
|
|
4786
4786
|
})();
|
|
4787
4787
|
})), ld = /* @__PURE__ */ Me(((e, t) => {
|
|
4788
4788
|
process.env.NODE_ENV === "production" ? t.exports = D1() : t.exports = R1();
|
|
@@ -4914,27 +4914,27 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4914
4914
|
function P(C) {
|
|
4915
4915
|
if (process.env.NODE_ENV !== "production")
|
|
4916
4916
|
var E = {}, M = 0;
|
|
4917
|
-
function
|
|
4918
|
-
if (z = z || p, K = K ||
|
|
4917
|
+
function L(G, B, U, z, W, K, A) {
|
|
4918
|
+
if (z = z || p, K = K || U, A !== a) {
|
|
4919
4919
|
if (c) {
|
|
4920
4920
|
var oe = /* @__PURE__ */ new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");
|
|
4921
4921
|
throw oe.name = "Invariant Violation", oe;
|
|
4922
4922
|
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
4923
|
-
var $e = z + ":" +
|
|
4923
|
+
var $e = z + ":" + U;
|
|
4924
4924
|
!E[$e] && M < 3 && (s("You are manually calling a React.PropTypes validation function for the `" + K + "` prop on `" + z + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."), E[$e] = !0, M++);
|
|
4925
4925
|
}
|
|
4926
4926
|
}
|
|
4927
|
-
return
|
|
4927
|
+
return B[U] == null ? G ? B[U] === null ? new $("The " + W + " `" + K + "` is marked as required " + ("in `" + z + "`, but its value is `null`.")) : new $("The " + W + " `" + K + "` is marked as required in " + ("`" + z + "`, but its value is `undefined`.")) : null : C(B, U, z, W, K);
|
|
4928
4928
|
}
|
|
4929
|
-
var D =
|
|
4930
|
-
return D.isRequired =
|
|
4929
|
+
var D = L.bind(null, !1);
|
|
4930
|
+
return D.isRequired = L.bind(null, !0), D;
|
|
4931
4931
|
}
|
|
4932
4932
|
function b(C) {
|
|
4933
|
-
function E(M,
|
|
4934
|
-
var z = M[
|
|
4933
|
+
function E(M, L, D, G, B, U) {
|
|
4934
|
+
var z = M[L];
|
|
4935
4935
|
if (ae(z) !== C) {
|
|
4936
4936
|
var W = ie(z);
|
|
4937
|
-
return new $("Invalid " + G + " `" +
|
|
4937
|
+
return new $("Invalid " + G + " `" + B + "` of type " + ("`" + W + "` supplied to `" + D + "`, expected ") + ("`" + C + "`."), { expectedType: C });
|
|
4938
4938
|
}
|
|
4939
4939
|
return null;
|
|
4940
4940
|
}
|
|
@@ -4944,15 +4944,15 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4944
4944
|
return P(d);
|
|
4945
4945
|
}
|
|
4946
4946
|
function O(C) {
|
|
4947
|
-
function E(M,
|
|
4948
|
-
if (typeof C != "function") return new $("Property `" +
|
|
4949
|
-
var
|
|
4950
|
-
if (!Array.isArray(
|
|
4951
|
-
var z = ae(
|
|
4952
|
-
return new $("Invalid " + G + " `" +
|
|
4947
|
+
function E(M, L, D, G, B) {
|
|
4948
|
+
if (typeof C != "function") return new $("Property `" + B + "` of component `" + D + "` has invalid PropType notation inside arrayOf.");
|
|
4949
|
+
var U = M[L];
|
|
4950
|
+
if (!Array.isArray(U)) {
|
|
4951
|
+
var z = ae(U);
|
|
4952
|
+
return new $("Invalid " + G + " `" + B + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected an array."));
|
|
4953
4953
|
}
|
|
4954
|
-
for (var W = 0; W <
|
|
4955
|
-
var K = C(
|
|
4954
|
+
for (var W = 0; W < U.length; W++) {
|
|
4955
|
+
var K = C(U, W, D, G, B + "[" + W + "]", a);
|
|
4956
4956
|
if (K instanceof Error) return K;
|
|
4957
4957
|
}
|
|
4958
4958
|
return null;
|
|
@@ -4960,32 +4960,32 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4960
4960
|
return P(E);
|
|
4961
4961
|
}
|
|
4962
4962
|
function N() {
|
|
4963
|
-
function C(E, M,
|
|
4964
|
-
var
|
|
4965
|
-
if (!l(
|
|
4966
|
-
var
|
|
4967
|
-
return new $("Invalid " + D + " `" + G + "` of type " + ("`" +
|
|
4963
|
+
function C(E, M, L, D, G) {
|
|
4964
|
+
var B = E[M];
|
|
4965
|
+
if (!l(B)) {
|
|
4966
|
+
var U = ae(B);
|
|
4967
|
+
return new $("Invalid " + D + " `" + G + "` of type " + ("`" + U + "` supplied to `" + L + "`, expected a single ReactElement."));
|
|
4968
4968
|
}
|
|
4969
4969
|
return null;
|
|
4970
4970
|
}
|
|
4971
4971
|
return P(C);
|
|
4972
4972
|
}
|
|
4973
4973
|
function T() {
|
|
4974
|
-
function C(E, M,
|
|
4975
|
-
var
|
|
4976
|
-
if (!r.isValidElementType(
|
|
4977
|
-
var
|
|
4978
|
-
return new $("Invalid " + D + " `" + G + "` of type " + ("`" +
|
|
4974
|
+
function C(E, M, L, D, G) {
|
|
4975
|
+
var B = E[M];
|
|
4976
|
+
if (!r.isValidElementType(B)) {
|
|
4977
|
+
var U = ae(B);
|
|
4978
|
+
return new $("Invalid " + D + " `" + G + "` of type " + ("`" + U + "` supplied to `" + L + "`, expected a single ReactElement type."));
|
|
4979
4979
|
}
|
|
4980
4980
|
return null;
|
|
4981
4981
|
}
|
|
4982
4982
|
return P(C);
|
|
4983
4983
|
}
|
|
4984
4984
|
function k(C) {
|
|
4985
|
-
function E(M,
|
|
4986
|
-
if (!(M[
|
|
4987
|
-
var
|
|
4988
|
-
return new $("Invalid " + G + " `" +
|
|
4985
|
+
function E(M, L, D, G, B) {
|
|
4986
|
+
if (!(M[L] instanceof C)) {
|
|
4987
|
+
var U = C.name || p, z = x(M[L]);
|
|
4988
|
+
return new $("Invalid " + G + " `" + B + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected ") + ("instance of `" + U + "`."));
|
|
4989
4989
|
}
|
|
4990
4990
|
return null;
|
|
4991
4991
|
}
|
|
@@ -4994,22 +4994,22 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
4994
4994
|
function q(C) {
|
|
4995
4995
|
if (!Array.isArray(C))
|
|
4996
4996
|
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? s("Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).") : s("Invalid argument supplied to oneOf, expected an array.")), d;
|
|
4997
|
-
function E(M,
|
|
4998
|
-
for (var
|
|
4997
|
+
function E(M, L, D, G, B) {
|
|
4998
|
+
for (var U = M[L], z = 0; z < C.length; z++) if (y(U, C[z])) return null;
|
|
4999
4999
|
var W = JSON.stringify(C, function(A, oe) {
|
|
5000
5000
|
return ie(oe) === "symbol" ? String(oe) : oe;
|
|
5001
5001
|
});
|
|
5002
|
-
return new $("Invalid " + G + " `" +
|
|
5002
|
+
return new $("Invalid " + G + " `" + B + "` of value `" + String(U) + "` " + ("supplied to `" + D + "`, expected one of " + W + "."));
|
|
5003
5003
|
}
|
|
5004
5004
|
return P(E);
|
|
5005
5005
|
}
|
|
5006
5006
|
function J(C) {
|
|
5007
|
-
function E(M,
|
|
5008
|
-
if (typeof C != "function") return new $("Property `" +
|
|
5009
|
-
var
|
|
5010
|
-
if (z !== "object") return new $("Invalid " + G + " `" +
|
|
5011
|
-
for (var W in
|
|
5012
|
-
var K = C(
|
|
5007
|
+
function E(M, L, D, G, B) {
|
|
5008
|
+
if (typeof C != "function") return new $("Property `" + B + "` of component `" + D + "` has invalid PropType notation inside objectOf.");
|
|
5009
|
+
var U = M[L], z = ae(U);
|
|
5010
|
+
if (z !== "object") return new $("Invalid " + G + " `" + B + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected an object."));
|
|
5011
|
+
for (var W in U) if (i(U, W)) {
|
|
5012
|
+
var K = C(U, W, D, G, B + "." + W, a);
|
|
5013
5013
|
if (K instanceof Error) return K;
|
|
5014
5014
|
}
|
|
5015
5015
|
return null;
|
|
@@ -5024,34 +5024,34 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
5024
5024
|
if (typeof M != "function")
|
|
5025
5025
|
return s("Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + le(M) + " at index " + E + "."), d;
|
|
5026
5026
|
}
|
|
5027
|
-
function
|
|
5027
|
+
function L(D, G, B, U, z) {
|
|
5028
5028
|
for (var W = [], K = 0; K < C.length; K++) {
|
|
5029
|
-
var A = C[K], oe = A(D, G,
|
|
5029
|
+
var A = C[K], oe = A(D, G, B, U, z, a);
|
|
5030
5030
|
if (oe == null) return null;
|
|
5031
5031
|
oe.data && i(oe.data, "expectedType") && W.push(oe.data.expectedType);
|
|
5032
5032
|
}
|
|
5033
5033
|
var $e = W.length > 0 ? ", expected one of type [" + W.join(", ") + "]" : "";
|
|
5034
|
-
return new $("Invalid " +
|
|
5034
|
+
return new $("Invalid " + U + " `" + z + "` supplied to " + ("`" + B + "`" + $e + "."));
|
|
5035
5035
|
}
|
|
5036
|
-
return P(
|
|
5036
|
+
return P(L);
|
|
5037
5037
|
}
|
|
5038
5038
|
function he() {
|
|
5039
|
-
function C(E, M,
|
|
5040
|
-
return ve(E[M]) ? null : new $("Invalid " + D + " `" + G + "` supplied to " + ("`" +
|
|
5039
|
+
function C(E, M, L, D, G) {
|
|
5040
|
+
return ve(E[M]) ? null : new $("Invalid " + D + " `" + G + "` supplied to " + ("`" + L + "`, expected a ReactNode."));
|
|
5041
5041
|
}
|
|
5042
5042
|
return P(C);
|
|
5043
5043
|
}
|
|
5044
|
-
function fe(C, E, M,
|
|
5045
|
-
return new $((C || "React class") + ": " + E + " type `" + M + "." +
|
|
5044
|
+
function fe(C, E, M, L, D) {
|
|
5045
|
+
return new $((C || "React class") + ": " + E + " type `" + M + "." + L + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + D + "`.");
|
|
5046
5046
|
}
|
|
5047
5047
|
function pe(C) {
|
|
5048
|
-
function E(M,
|
|
5049
|
-
var
|
|
5050
|
-
if (z !== "object") return new $("Invalid " + G + " `" +
|
|
5048
|
+
function E(M, L, D, G, B) {
|
|
5049
|
+
var U = M[L], z = ae(U);
|
|
5050
|
+
if (z !== "object") return new $("Invalid " + G + " `" + B + "` of type `" + z + "` " + ("supplied to `" + D + "`, expected `object`."));
|
|
5051
5051
|
for (var W in C) {
|
|
5052
5052
|
var K = C[W];
|
|
5053
|
-
if (typeof K != "function") return fe(D, G,
|
|
5054
|
-
var A = K(
|
|
5053
|
+
if (typeof K != "function") return fe(D, G, B, W, ie(K));
|
|
5054
|
+
var A = K(U, W, D, G, B + "." + W, a);
|
|
5055
5055
|
if (A) return A;
|
|
5056
5056
|
}
|
|
5057
5057
|
return null;
|
|
@@ -5059,15 +5059,15 @@ var D1 = /* @__PURE__ */ Me(((e) => {
|
|
|
5059
5059
|
return P(E);
|
|
5060
5060
|
}
|
|
5061
5061
|
function Pe(C) {
|
|
5062
|
-
function E(M,
|
|
5063
|
-
var
|
|
5064
|
-
if (z !== "object") return new $("Invalid " + G + " `" +
|
|
5065
|
-
for (var W in n({}, M[
|
|
5062
|
+
function E(M, L, D, G, B) {
|
|
5063
|
+
var U = M[L], z = ae(U);
|
|
5064
|
+
if (z !== "object") return new $("Invalid " + G + " `" + B + "` of type `" + z + "` " + ("supplied to `" + D + "`, expected `object`."));
|
|
5065
|
+
for (var W in n({}, M[L], C)) {
|
|
5066
5066
|
var K = C[W];
|
|
5067
|
-
if (i(C, W) && typeof K != "function") return fe(D, G,
|
|
5068
|
-
if (!K) return new $("Invalid " + G + " `" +
|
|
5067
|
+
if (i(C, W) && typeof K != "function") return fe(D, G, B, W, ie(K));
|
|
5068
|
+
if (!K) return new $("Invalid " + G + " `" + B + "` key `" + W + "` supplied to `" + D + "`.\nBad object: " + JSON.stringify(M[L], null, " ") + `
|
|
5069
5069
|
Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
5070
|
-
var A = K(
|
|
5070
|
+
var A = K(U, W, D, G, B + "." + W, a);
|
|
5071
5071
|
if (A) return A;
|
|
5072
5072
|
}
|
|
5073
5073
|
return null;
|
|
@@ -5087,11 +5087,11 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
|
5087
5087
|
if (C === null || l(C)) return !0;
|
|
5088
5088
|
var E = m(C);
|
|
5089
5089
|
if (E) {
|
|
5090
|
-
var M = E.call(C),
|
|
5090
|
+
var M = E.call(C), L;
|
|
5091
5091
|
if (E !== C.entries) {
|
|
5092
|
-
for (; !(
|
|
5093
|
-
} else for (; !(
|
|
5094
|
-
var D =
|
|
5092
|
+
for (; !(L = M.next()).done; ) if (!ve(L.value)) return !1;
|
|
5093
|
+
} else for (; !(L = M.next()).done; ) {
|
|
5094
|
+
var D = L.value;
|
|
5095
5095
|
if (D && !ve(D[1]))
|
|
5096
5096
|
return !1;
|
|
5097
5097
|
}
|
|
@@ -5184,16 +5184,16 @@ Valid keys: ` + JSON.stringify(Object.keys(C), null, " "));
|
|
|
5184
5184
|
t.exports = L1()(r.isElement, n);
|
|
5185
5185
|
} else t.exports = B1()();
|
|
5186
5186
|
})), _ = /* @__PURE__ */ va(U1(), 1);
|
|
5187
|
-
function
|
|
5187
|
+
function ot(e, t, r) {
|
|
5188
5188
|
this.x = e, this.y = t, this.time = r || (/* @__PURE__ */ new Date()).getTime();
|
|
5189
5189
|
}
|
|
5190
|
-
|
|
5190
|
+
ot.prototype.velocityFrom = function(e) {
|
|
5191
5191
|
return this.time !== e.time ? this.distanceTo(e) / (this.time - e.time) : 1;
|
|
5192
5192
|
};
|
|
5193
|
-
|
|
5193
|
+
ot.prototype.distanceTo = function(e) {
|
|
5194
5194
|
return Math.sqrt(Math.pow(this.x - e.x, 2) + Math.pow(this.y - e.y, 2));
|
|
5195
5195
|
};
|
|
5196
|
-
|
|
5196
|
+
ot.prototype.equals = function(e) {
|
|
5197
5197
|
return this.x === e.x && this.y === e.y && this.time === e.time;
|
|
5198
5198
|
};
|
|
5199
5199
|
function ka(e, t, r, n) {
|
|
@@ -5317,7 +5317,7 @@ Q.prototype._reset = function() {
|
|
|
5317
5317
|
};
|
|
5318
5318
|
Q.prototype._createPoint = function(e, t, r) {
|
|
5319
5319
|
var n = this._canvas.getBoundingClientRect();
|
|
5320
|
-
return new
|
|
5320
|
+
return new ot(e - n.left, t - n.top, r || (/* @__PURE__ */ new Date()).getTime());
|
|
5321
5321
|
};
|
|
5322
5322
|
Q.prototype._addPoint = function(e) {
|
|
5323
5323
|
var t = this.points, r = void 0;
|
|
@@ -5345,8 +5345,8 @@ Q.prototype._calculateCurveControlPoints = function(e, t, r) {
|
|
|
5345
5345
|
y: d.y + h * m
|
|
5346
5346
|
}, v = t.x - p.x, y = t.y - p.y;
|
|
5347
5347
|
return {
|
|
5348
|
-
c1: new
|
|
5349
|
-
c2: new
|
|
5348
|
+
c1: new ot(s.x + v, s.y + y),
|
|
5349
|
+
c2: new ot(d.x + v, d.y + y)
|
|
5350
5350
|
};
|
|
5351
5351
|
};
|
|
5352
5352
|
Q.prototype._calculateCurveWidths = function(e) {
|
|
@@ -5384,7 +5384,7 @@ Q.prototype._fromData = function(e, t, r) {
|
|
|
5384
5384
|
for (var n = 0; n < e.length; n += 1) {
|
|
5385
5385
|
var a = e[n];
|
|
5386
5386
|
if (a.length > 1) for (var i = 0; i < a.length; i += 1) {
|
|
5387
|
-
var o = a[i], s = new
|
|
5387
|
+
var o = a[i], s = new ot(o.x, o.y, o.time), d = o.color;
|
|
5388
5388
|
if (i === 0)
|
|
5389
5389
|
this.penColor = d, this._reset(), this._addPoint(s);
|
|
5390
5390
|
else if (i !== a.length - 1) {
|
|
@@ -5514,7 +5514,7 @@ var G1 = /* @__PURE__ */ Me(((e, t) => {
|
|
|
5514
5514
|
}
|
|
5515
5515
|
}, n.render = function() {
|
|
5516
5516
|
var s = n.props.canvasProps;
|
|
5517
|
-
return /* @__PURE__ */
|
|
5517
|
+
return /* @__PURE__ */ F.createElement("canvas", Zn({ ref: n.setRef }, s));
|
|
5518
5518
|
}, n.on = function() {
|
|
5519
5519
|
return window.addEventListener("resize", n._checkClearOnResize), n.getSignaturePad().on();
|
|
5520
5520
|
}, n.off = function() {
|
|
@@ -13545,9 +13545,9 @@ function Rr(e, t) {
|
|
|
13545
13545
|
onKeyDown: c,
|
|
13546
13546
|
type: h
|
|
13547
13547
|
}, m));
|
|
13548
|
-
return /* @__PURE__ */
|
|
13548
|
+
return /* @__PURE__ */ F.createElement(n, p);
|
|
13549
13549
|
}
|
|
13550
|
-
Rr = /* @__PURE__ */
|
|
13550
|
+
Rr = /* @__PURE__ */ F.forwardRef(Rr);
|
|
13551
13551
|
Rr.propTypes = {
|
|
13552
13552
|
parse: _.default.func.isRequired,
|
|
13553
13553
|
format: _.default.func.isRequired,
|
|
@@ -13574,7 +13574,7 @@ function Hi(e, t) {
|
|
|
13574
13574
|
return e[1] && t[1] ? e[1] > t[1] ? 1 : e[1] < t[1] ? -1 : 0 : !e[1] && t[1] ? 1 : e[1] && !t[1] ? -1 : 0;
|
|
13575
13575
|
}
|
|
13576
13576
|
var S0 = {}.constructor;
|
|
13577
|
-
function
|
|
13577
|
+
function at(e) {
|
|
13578
13578
|
return e != null && e.constructor === S0;
|
|
13579
13579
|
}
|
|
13580
13580
|
function bt(e) {
|
|
@@ -14035,12 +14035,12 @@ function Zi(e, t) {
|
|
|
14035
14035
|
}
|
|
14036
14036
|
function pd(e) {
|
|
14037
14037
|
if (!e) throw new Error("[libphonenumber-js] `metadata` argument not passed. Check your arguments.");
|
|
14038
|
-
if (!
|
|
14038
|
+
if (!at(e) || !at(e.countries)) throw new Error("[libphonenumber-js] `metadata` argument was passed but it's not a valid metadata. Must be an object having `.countries` child object property. Got ".concat(at(e) ? "an object of shape: { " + Object.keys(e).join(", ") + " }" : "a " + x0(e) + ": " + e, "."));
|
|
14039
14039
|
}
|
|
14040
14040
|
var x0 = function(t) {
|
|
14041
14041
|
return bt(t);
|
|
14042
14042
|
};
|
|
14043
|
-
function
|
|
14043
|
+
function Qe(e, t) {
|
|
14044
14044
|
if (t = new ue(t), t.hasCountry(e)) return t.selectNumberingPlan(e).countryCallingCode();
|
|
14045
14045
|
throw new Error("Unknown country: ".concat(e));
|
|
14046
14046
|
}
|
|
@@ -14317,7 +14317,7 @@ function ep(e, t, r) {
|
|
|
14317
14317
|
}
|
|
14318
14318
|
}
|
|
14319
14319
|
function gd(e, t, r, n, a) {
|
|
14320
|
-
var i = t || r ?
|
|
14320
|
+
var i = t || r ? Qe(t || r, a) : n;
|
|
14321
14321
|
if (e.indexOf(i) === 0) {
|
|
14322
14322
|
a = new ue(a), a.selectNumberingPlan(t || r, i);
|
|
14323
14323
|
var o = e.slice(i.length), s = ta(o, t, a).nationalNumber, d = ta(e, t, a).nationalNumber;
|
|
@@ -14449,7 +14449,7 @@ function xn(e, t, r, n) {
|
|
|
14449
14449
|
return t ? n(e, t, r) : e;
|
|
14450
14450
|
}
|
|
14451
14451
|
function mp(e, t, r, n, a) {
|
|
14452
|
-
if (
|
|
14452
|
+
if (Qe(n, a.metadata) === r) {
|
|
14453
14453
|
var i = Fr(e, t, "NATIONAL", a);
|
|
14454
14454
|
return r === "1" ? r + " " + i : i;
|
|
14455
14455
|
}
|
|
@@ -14538,7 +14538,7 @@ var Np = !1, _d = /* @__PURE__ */ (function() {
|
|
|
14538
14538
|
if (bp(this, e), !t) throw new TypeError("First argument is required");
|
|
14539
14539
|
if (typeof t != "string") throw new TypeError("First argument must be a string");
|
|
14540
14540
|
if (t[0] === "+" && !r) throw new TypeError("`metadata` argument not passed");
|
|
14541
|
-
if (
|
|
14541
|
+
if (at(r) && at(r.countries)) {
|
|
14542
14542
|
n = r;
|
|
14543
14543
|
var a = t;
|
|
14544
14544
|
if (!Pp.test(a)) throw new Error('Invalid `number` argument passed: must consist of a "+" followed by digits');
|
|
@@ -14981,7 +14981,7 @@ function i2(e, t, r, n) {
|
|
|
14981
14981
|
var a = Fa(na(e), void 0, t, r, n.metadata), i = a.countryCallingCodeSource, o = a.countryCallingCode, s = a.number, d;
|
|
14982
14982
|
if (o) n.selectNumberingPlan(o);
|
|
14983
14983
|
else if (s && (t || r))
|
|
14984
|
-
n.selectNumberingPlan(t, r), t ? d = t : e2 && n.isNonGeographicCallingCode(r) && (d = "001"), o = r ||
|
|
14984
|
+
n.selectNumberingPlan(t, r), t ? d = t : e2 && n.isNonGeographicCallingCode(r) && (d = "001"), o = r || Qe(t, n.metadata);
|
|
14985
14985
|
else return {};
|
|
14986
14986
|
if (!s) return {
|
|
14987
14987
|
countryCallingCodeSource: i,
|
|
@@ -15153,7 +15153,7 @@ function Id(e) {
|
|
|
15153
15153
|
else throw new TypeError("A text for parsing must be a string.");
|
|
15154
15154
|
if (!n || typeof n == "string")
|
|
15155
15155
|
i ? (s = a, d = i) : (s = void 0, d = a), n && (s = c2({ defaultCountry: n }, s));
|
|
15156
|
-
else if (
|
|
15156
|
+
else if (at(n)) a ? (s = n, d = a) : d = n;
|
|
15157
15157
|
else throw new Error("Invalid second argument: ".concat(n));
|
|
15158
15158
|
return {
|
|
15159
15159
|
text: o,
|
|
@@ -16357,7 +16357,7 @@ var Do = !1, Ct = /* @__PURE__ */ (function() {
|
|
|
16357
16357
|
key: "getCountryAndCallingCode",
|
|
16358
16358
|
value: function(r) {
|
|
16359
16359
|
var n, a;
|
|
16360
|
-
return r && (
|
|
16360
|
+
return r && (at(r) ? (n = r.defaultCountry, a = r.defaultCallingCode) : n = r), n && !this.metadata.hasCountry(n) && (n = void 0), a && Do && this.metadata.isNonGeographicCallingCode(a) && (n = "001"), [n, a];
|
|
16361
16361
|
}
|
|
16362
16362
|
},
|
|
16363
16363
|
{
|
|
@@ -16569,7 +16569,7 @@ function Fm(e, t, r) {
|
|
|
16569
16569
|
var Br = /* @__PURE__ */ va(q1(), 1);
|
|
16570
16570
|
function xd(e) {
|
|
16571
16571
|
var t = e.inputFormat, r = e.country, n = e.metadata;
|
|
16572
|
-
return t === "NATIONAL_PART_OF_INTERNATIONAL" ? "+".concat(
|
|
16572
|
+
return t === "NATIONAL_PART_OF_INTERNATIONAL" ? "+".concat(Qe(r, n)) : "";
|
|
16573
16573
|
}
|
|
16574
16574
|
function da(e, t) {
|
|
16575
16575
|
return t && (e = e.slice(t.length), e[0] === " " && (e = e.slice(1))), e;
|
|
@@ -16645,14 +16645,14 @@ function Wm(e) {
|
|
|
16645
16645
|
onKeyDown: a,
|
|
16646
16646
|
inputFormat: o
|
|
16647
16647
|
});
|
|
16648
|
-
return /* @__PURE__ */
|
|
16648
|
+
return /* @__PURE__ */ F.createElement(C0, la({}, l, {
|
|
16649
16649
|
ref: n,
|
|
16650
16650
|
parse: jm,
|
|
16651
16651
|
format: c,
|
|
16652
16652
|
onKeyDown: f
|
|
16653
16653
|
}));
|
|
16654
16654
|
}
|
|
16655
|
-
return t = /* @__PURE__ */
|
|
16655
|
+
return t = /* @__PURE__ */ F.forwardRef(t), t.propTypes = {
|
|
16656
16656
|
value: _.default.string.isRequired,
|
|
16657
16657
|
onChange: _.default.func.isRequired,
|
|
16658
16658
|
onKeyDown: _.default.func,
|
|
@@ -16724,14 +16724,14 @@ function Zm(e) {
|
|
|
16724
16724
|
onKeyDown: o,
|
|
16725
16725
|
inputFormat: d
|
|
16726
16726
|
});
|
|
16727
|
-
return /* @__PURE__ */
|
|
16727
|
+
return /* @__PURE__ */ F.createElement(h, ca({}, m, {
|
|
16728
16728
|
ref: n,
|
|
16729
16729
|
value: Fo(p, a, s, c),
|
|
16730
16730
|
onChange: v,
|
|
16731
16731
|
onKeyDown: y
|
|
16732
16732
|
}));
|
|
16733
16733
|
}
|
|
16734
|
-
return t = /* @__PURE__ */
|
|
16734
|
+
return t = /* @__PURE__ */ F.forwardRef(t), t.propTypes = {
|
|
16735
16735
|
value: _.default.string.isRequired,
|
|
16736
16736
|
onChange: _.default.func.isRequired,
|
|
16737
16737
|
onKeyDown: _.default.func,
|
|
@@ -16833,14 +16833,14 @@ function Dd(e) {
|
|
|
16833
16833
|
}, [r]);
|
|
16834
16834
|
return Ce(function() {
|
|
16835
16835
|
return Fd(n, t);
|
|
16836
|
-
}, [n, t]), /* @__PURE__ */
|
|
16836
|
+
}, [n, t]), /* @__PURE__ */ F.createElement("select", Ur({}, o, {
|
|
16837
16837
|
disabled: a || i,
|
|
16838
16838
|
readOnly: i,
|
|
16839
16839
|
value: t || "ZZ",
|
|
16840
16840
|
onChange: s
|
|
16841
16841
|
}), n.map(function(d) {
|
|
16842
16842
|
var l = d.value, c = d.label, f = d.divider;
|
|
16843
|
-
return /* @__PURE__ */
|
|
16843
|
+
return /* @__PURE__ */ F.createElement("option", {
|
|
16844
16844
|
key: f ? "|" : l || "ZZ",
|
|
16845
16845
|
value: f ? "|" : l || "ZZ",
|
|
16846
16846
|
disabled: !!f,
|
|
@@ -16870,16 +16870,16 @@ function Rd(e) {
|
|
|
16870
16870
|
var i = e.arrowComponent, o = i === void 0 ? ih : i, s = e.unicodeFlags, d = kd(e, eh), l = Ce(function() {
|
|
16871
16871
|
return Fd(r, t);
|
|
16872
16872
|
}, [r, t]);
|
|
16873
|
-
return /* @__PURE__ */
|
|
16873
|
+
return /* @__PURE__ */ F.createElement("div", { className: "PhoneInputCountry" }, /* @__PURE__ */ F.createElement(Dd, Ur({}, d, {
|
|
16874
16874
|
value: t,
|
|
16875
16875
|
options: r,
|
|
16876
16876
|
className: (0, Br.default)("PhoneInputCountrySelect", n)
|
|
16877
|
-
})), l && (s && t ? /* @__PURE__ */
|
|
16877
|
+
})), l && (s && t ? /* @__PURE__ */ F.createElement("div", { className: "PhoneInputCountryIconUnicode" }, Jm(t)) : /* @__PURE__ */ F.createElement(a, {
|
|
16878
16878
|
"aria-hidden": !0,
|
|
16879
16879
|
country: t,
|
|
16880
16880
|
label: l.label,
|
|
16881
16881
|
aspectRatio: s ? 1 : void 0
|
|
16882
|
-
})), /* @__PURE__ */
|
|
16882
|
+
})), /* @__PURE__ */ F.createElement(o, null));
|
|
16883
16883
|
}
|
|
16884
16884
|
Rd.propTypes = {
|
|
16885
16885
|
iconComponent: _.default.elementType,
|
|
@@ -16887,7 +16887,7 @@ Rd.propTypes = {
|
|
|
16887
16887
|
unicodeFlags: _.default.bool
|
|
16888
16888
|
};
|
|
16889
16889
|
function ih() {
|
|
16890
|
-
return /* @__PURE__ */
|
|
16890
|
+
return /* @__PURE__ */ F.createElement("div", { className: "PhoneInputCountrySelectArrow" });
|
|
16891
16891
|
}
|
|
16892
16892
|
function Fd(e, t) {
|
|
16893
16893
|
for (var r = th(e), n; !(n = r()).done; ) {
|
|
@@ -16933,7 +16933,7 @@ function lh(e, t) {
|
|
|
16933
16933
|
}
|
|
16934
16934
|
function La(e) {
|
|
16935
16935
|
var t = e.country, r = e.countryName, n = e.flags, a = e.flagUrl, i = dh(e, sh);
|
|
16936
|
-
return n && n[t] ? n[t]({ title: r }) : /* @__PURE__ */
|
|
16936
|
+
return n && n[t] ? n[t]({ title: r }) : /* @__PURE__ */ F.createElement("img", ua({}, i, {
|
|
16937
16937
|
alt: r,
|
|
16938
16938
|
role: r ? void 0 : "presentation",
|
|
16939
16939
|
src: a.replace("{XX}", t).replace("{xx}", t.toLowerCase())
|
|
@@ -16974,7 +16974,7 @@ function ph(e, t) {
|
|
|
16974
16974
|
}
|
|
16975
16975
|
function mn(e) {
|
|
16976
16976
|
var t = e.aspectRatio, r = Ba(e, ch);
|
|
16977
|
-
return t === 1 ? /* @__PURE__ */
|
|
16977
|
+
return t === 1 ? /* @__PURE__ */ F.createElement(Ld, r) : /* @__PURE__ */ F.createElement(jd, r);
|
|
16978
16978
|
}
|
|
16979
16979
|
mn.propTypes = {
|
|
16980
16980
|
title: _.default.string.isRequired,
|
|
@@ -16982,35 +16982,35 @@ mn.propTypes = {
|
|
|
16982
16982
|
};
|
|
16983
16983
|
function jd(e) {
|
|
16984
16984
|
var t = e.title, r = Ba(e, uh);
|
|
16985
|
-
return /* @__PURE__ */
|
|
16985
|
+
return /* @__PURE__ */ F.createElement("svg", Vr({}, r, {
|
|
16986
16986
|
xmlns: "http://www.w3.org/2000/svg",
|
|
16987
16987
|
viewBox: "0 0 75 50"
|
|
16988
|
-
}), /* @__PURE__ */
|
|
16988
|
+
}), /* @__PURE__ */ F.createElement("title", null, t), /* @__PURE__ */ F.createElement("g", {
|
|
16989
16989
|
className: "PhoneInputInternationalIconGlobe",
|
|
16990
16990
|
stroke: "currentColor",
|
|
16991
16991
|
fill: "none",
|
|
16992
16992
|
strokeWidth: "2",
|
|
16993
16993
|
strokeMiterlimit: "10"
|
|
16994
|
-
}, /* @__PURE__ */
|
|
16994
|
+
}, /* @__PURE__ */ F.createElement("path", {
|
|
16995
16995
|
strokeLinecap: "round",
|
|
16996
16996
|
d: "M47.2,36.1C48.1,36,49,36,50,36c7.4,0,14,1.7,18.5,4.3"
|
|
16997
|
-
}), /* @__PURE__ */
|
|
16997
|
+
}), /* @__PURE__ */ F.createElement("path", { d: "M68.6,9.6C64.2,12.3,57.5,14,50,14c-7.4,0-14-1.7-18.5-4.3" }), /* @__PURE__ */ F.createElement("line", {
|
|
16998
16998
|
x1: "26",
|
|
16999
16999
|
y1: "25",
|
|
17000
17000
|
x2: "74",
|
|
17001
17001
|
y2: "25"
|
|
17002
|
-
}), /* @__PURE__ */
|
|
17002
|
+
}), /* @__PURE__ */ F.createElement("line", {
|
|
17003
17003
|
x1: "50",
|
|
17004
17004
|
y1: "1",
|
|
17005
17005
|
x2: "50",
|
|
17006
17006
|
y2: "49"
|
|
17007
|
-
}), /* @__PURE__ */
|
|
17007
|
+
}), /* @__PURE__ */ F.createElement("path", {
|
|
17008
17008
|
strokeLinecap: "round",
|
|
17009
17009
|
d: "M46.3,48.7c1.2,0.2,2.5,0.3,3.7,0.3c13.3,0,24-10.7,24-24S63.3,1,50,1S26,11.7,26,25c0,2,0.3,3.9,0.7,5.8"
|
|
17010
|
-
}), /* @__PURE__ */
|
|
17010
|
+
}), /* @__PURE__ */ F.createElement("path", {
|
|
17011
17011
|
strokeLinecap: "round",
|
|
17012
17012
|
d: "M46.8,48.2c1,0.6,2.1,0.8,3.2,0.8c6.6,0,12-10.7,12-24S56.6,1,50,1S38,11.7,38,25c0,1.4,0.1,2.7,0.2,4c0,0.1,0,0.2,0,0.2"
|
|
17013
|
-
})), /* @__PURE__ */
|
|
17013
|
+
})), /* @__PURE__ */ F.createElement("path", {
|
|
17014
17014
|
className: "PhoneInputInternationalIconPhone",
|
|
17015
17015
|
stroke: "none",
|
|
17016
17016
|
fill: "currentColor",
|
|
@@ -17020,26 +17020,26 @@ function jd(e) {
|
|
|
17020
17020
|
jd.propTypes = { title: _.default.string.isRequired };
|
|
17021
17021
|
function Ld(e) {
|
|
17022
17022
|
var t = e.title, r = Ba(e, fh);
|
|
17023
|
-
return /* @__PURE__ */
|
|
17023
|
+
return /* @__PURE__ */ F.createElement("svg", Vr({}, r, {
|
|
17024
17024
|
xmlns: "http://www.w3.org/2000/svg",
|
|
17025
17025
|
viewBox: "0 0 50 50"
|
|
17026
|
-
}), /* @__PURE__ */
|
|
17026
|
+
}), /* @__PURE__ */ F.createElement("title", null, t), /* @__PURE__ */ F.createElement("g", {
|
|
17027
17027
|
className: "PhoneInputInternationalIconGlobe",
|
|
17028
17028
|
stroke: "currentColor",
|
|
17029
17029
|
fill: "none",
|
|
17030
17030
|
strokeWidth: "2",
|
|
17031
17031
|
strokeLinecap: "round"
|
|
17032
|
-
}, /* @__PURE__ */
|
|
17032
|
+
}, /* @__PURE__ */ F.createElement("path", { d: "M8.45,13A21.44,21.44,0,1,1,37.08,41.56" }), /* @__PURE__ */ F.createElement("path", { d: "M19.36,35.47a36.9,36.9,0,0,1-2.28-13.24C17.08,10.39,21.88.85,27.8.85s10.72,9.54,10.72,21.38c0,6.48-1.44,12.28-3.71,16.21" }), /* @__PURE__ */ F.createElement("path", { d: "M17.41,33.4A39,39,0,0,1,27.8,32.06c6.62,0,12.55,1.5,16.48,3.86" }), /* @__PURE__ */ F.createElement("path", { d: "M44.29,8.53c-3.93,2.37-9.86,3.88-16.49,3.88S15.25,10.9,11.31,8.54" }), /* @__PURE__ */ F.createElement("line", {
|
|
17033
17033
|
x1: "27.8",
|
|
17034
17034
|
y1: "0.85",
|
|
17035
17035
|
x2: "27.8",
|
|
17036
17036
|
y2: "34.61"
|
|
17037
|
-
}), /* @__PURE__ */
|
|
17037
|
+
}), /* @__PURE__ */ F.createElement("line", {
|
|
17038
17038
|
x1: "15.2",
|
|
17039
17039
|
y1: "22.23",
|
|
17040
17040
|
x2: "49.15",
|
|
17041
17041
|
y2: "22.23"
|
|
17042
|
-
})), /* @__PURE__ */
|
|
17042
|
+
})), /* @__PURE__ */ F.createElement("path", {
|
|
17043
17043
|
className: "PhoneInputInternationalIconPhone",
|
|
17044
17044
|
stroke: "transparent",
|
|
17045
17045
|
fill: "currentColor",
|
|
@@ -17163,16 +17163,16 @@ function Vd(e) {
|
|
|
17163
17163
|
var t = e.flags, r = e.flagUrl, n = e.flagComponent, a = e.internationalIcon;
|
|
17164
17164
|
function i(o) {
|
|
17165
17165
|
var s = o.country, d = o.label, l = o.aspectRatio, c = gh(o, $h), f = a === mn ? l : void 0;
|
|
17166
|
-
return /* @__PURE__ */
|
|
17166
|
+
return /* @__PURE__ */ F.createElement("div", fa({}, c, { className: (0, Br.default)("PhoneInputCountryIcon", {
|
|
17167
17167
|
"PhoneInputCountryIcon--square": f === 1,
|
|
17168
17168
|
"PhoneInputCountryIcon--border": s
|
|
17169
|
-
}) }), s ? /* @__PURE__ */
|
|
17169
|
+
}) }), s ? /* @__PURE__ */ F.createElement(n, {
|
|
17170
17170
|
country: s,
|
|
17171
17171
|
countryName: d,
|
|
17172
17172
|
flags: t,
|
|
17173
17173
|
flagUrl: r,
|
|
17174
17174
|
className: "PhoneInputCountryIconImg"
|
|
17175
|
-
}) : /* @__PURE__ */
|
|
17175
|
+
}) : /* @__PURE__ */ F.createElement(a, {
|
|
17176
17176
|
title: d,
|
|
17177
17177
|
aspectRatio: f,
|
|
17178
17178
|
className: "PhoneInputCountryIconImg"
|
|
@@ -17232,7 +17232,7 @@ var Gd = _.default.shape({
|
|
|
17232
17232
|
countries: _.default.object.isRequired
|
|
17233
17233
|
}), zd = _.default.objectOf(_.default.string);
|
|
17234
17234
|
function We(e, t) {
|
|
17235
|
-
return "+" +
|
|
17235
|
+
return "+" + Qe(e, t);
|
|
17236
17236
|
}
|
|
17237
17237
|
function _h(e) {
|
|
17238
17238
|
var t = e.value, r = e.phoneNumber, n = e.defaultCountry, a = e.getAnyCountry, i = e.countries, o = e.required, s = e.metadata, d;
|
|
@@ -17264,7 +17264,7 @@ function Ih(e, t) {
|
|
|
17264
17264
|
if (n) {
|
|
17265
17265
|
if (e[0] === "+") {
|
|
17266
17266
|
if (i)
|
|
17267
|
-
return e.indexOf("+" +
|
|
17267
|
+
return e.indexOf("+" + Qe(n, a)) === 0 ? Dh(e, n, a) : "";
|
|
17268
17268
|
if (r) {
|
|
17269
17269
|
var o = We(n, a);
|
|
17270
17270
|
return e.indexOf(o) === 0 ? e : o;
|
|
@@ -17286,7 +17286,7 @@ function ft(e, t, r) {
|
|
|
17286
17286
|
}
|
|
17287
17287
|
if (t) {
|
|
17288
17288
|
var a = qd(e, t, r);
|
|
17289
|
-
return "+".concat(
|
|
17289
|
+
return "+".concat(Qe(t, r)).concat(a || "");
|
|
17290
17290
|
}
|
|
17291
17291
|
}
|
|
17292
17292
|
}
|
|
@@ -17360,7 +17360,7 @@ function kh(e, t, r) {
|
|
|
17360
17360
|
}
|
|
17361
17361
|
function Dh(e, t, r) {
|
|
17362
17362
|
if (t) {
|
|
17363
|
-
var n = "+" +
|
|
17363
|
+
var n = "+" + Qe(t, r);
|
|
17364
17364
|
if (e.length < n.length) {
|
|
17365
17365
|
if (n.indexOf(e) === 0) return "";
|
|
17366
17366
|
} else if (e.indexOf(n) === 0) return e.slice(n.length);
|
|
@@ -17738,7 +17738,7 @@ var Zh = /* @__PURE__ */ (function(e) {
|
|
|
17738
17738
|
var P = $.onBlur;
|
|
17739
17739
|
P && P(y);
|
|
17740
17740
|
}
|
|
17741
|
-
}), n.inputRef = /* @__PURE__ */
|
|
17741
|
+
}), n.inputRef = /* @__PURE__ */ F.createRef();
|
|
17742
17742
|
var a = n.props, i = a.value;
|
|
17743
17743
|
a.labels;
|
|
17744
17744
|
var o = a.international, s = a.addInternationalOption, d = a.displayInitialValueAsLocalNumber, l = a.initialValueFormat, c = a.metadata, f = n.props, h = f.defaultCountry, m = f.countries;
|
|
@@ -17831,14 +17831,14 @@ var Zh = /* @__PURE__ */ (function(e) {
|
|
|
17831
17831
|
var P = n.metadata, b = n.international;
|
|
17832
17832
|
n.locales;
|
|
17833
17833
|
var S = Uh(n, Bh), O = this.state, N = O.country, T = O.countries, k = O.phoneDigits, q = O.isFocused, J = h ? Hm : Xm, ne = this.getCountrySelectOptions({ countries: T });
|
|
17834
|
-
return /* @__PURE__ */
|
|
17834
|
+
return /* @__PURE__ */ F.createElement(v, ht({
|
|
17835
17835
|
style: d,
|
|
17836
17836
|
className: (0, Br.default)(l, "PhoneInput", {
|
|
17837
17837
|
"PhoneInput--focus": q,
|
|
17838
17838
|
"PhoneInput--disabled": i,
|
|
17839
17839
|
"PhoneInput--readOnly": o
|
|
17840
17840
|
})
|
|
17841
|
-
}, y), /* @__PURE__ */
|
|
17841
|
+
}, y), /* @__PURE__ */ F.createElement(m, ht({
|
|
17842
17842
|
name: a ? "".concat(a, "Country") : void 0,
|
|
17843
17843
|
"aria-label": $.country
|
|
17844
17844
|
}, p, {
|
|
@@ -17850,7 +17850,7 @@ var Zh = /* @__PURE__ */ (function(e) {
|
|
|
17850
17850
|
disabled: i || p && p.disabled,
|
|
17851
17851
|
readOnly: o || p && p.readOnly,
|
|
17852
17852
|
iconComponent: this.CountryIcon
|
|
17853
|
-
})), /* @__PURE__ */
|
|
17853
|
+
})), /* @__PURE__ */ F.createElement(J, ht({
|
|
17854
17854
|
ref: this.setInputRef,
|
|
17855
17855
|
type: "tel",
|
|
17856
17856
|
autoComplete: s
|
|
@@ -17878,8 +17878,8 @@ var Zh = /* @__PURE__ */ (function(e) {
|
|
|
17878
17878
|
return Yd({ props: n }, Lh(n, a.props, a));
|
|
17879
17879
|
}
|
|
17880
17880
|
}]);
|
|
17881
|
-
})(
|
|
17882
|
-
return /* @__PURE__ */
|
|
17881
|
+
})(F.PureComponent), Jd = /* @__PURE__ */ F.forwardRef(function(e, t) {
|
|
17882
|
+
return /* @__PURE__ */ F.createElement(Zh, ht({}, Xh(e), { inputRef: t }));
|
|
17883
17883
|
});
|
|
17884
17884
|
Jd.propTypes = {
|
|
17885
17885
|
value: _.default.string,
|
|
@@ -18231,9 +18231,9 @@ function rv(e, t) {
|
|
|
18231
18231
|
return r;
|
|
18232
18232
|
}
|
|
18233
18233
|
function Qd(e) {
|
|
18234
|
-
var t = /* @__PURE__ */
|
|
18234
|
+
var t = /* @__PURE__ */ F.forwardRef(function(r, n) {
|
|
18235
18235
|
var a = r.metadata, i = a === void 0 ? e : a, o = r.labels, s = o === void 0 ? Qh : o, d = tv(r, ev);
|
|
18236
|
-
return /* @__PURE__ */
|
|
18236
|
+
return /* @__PURE__ */ F.createElement(Jd, ma({}, d, {
|
|
18237
18237
|
ref: n,
|
|
18238
18238
|
metadata: i,
|
|
18239
18239
|
labels: s
|
|
@@ -18279,25 +18279,26 @@ var iv = [
|
|
|
18279
18279
|
return +`${t}${r}`;
|
|
18280
18280
|
};
|
|
18281
18281
|
function lv() {
|
|
18282
|
-
const e = qe(), { tenantId: t, id: r } = X((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = X((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = X((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = X((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = X((w) => w.barber.appointment), y = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: P } = X((w) => w.barber.slots), [b, S] = Z(!1), [O, N] = Z(!1), [T, k] = Z(null), [q, J] = Z("person"), [ne, he] = Z(!1), [fe, pe] = Z(""), [Pe, ve] = Z(""), [me, ae] = Z(null), [ie, le] = Z(null), [x, C] = Z({}), [E, M] = Z({}), [
|
|
18282
|
+
const e = qe(), { tenantId: t, id: r } = X((w) => w.barber.outletDetails), { timeZone: n, image: a, outletName: i, address: o } = X((w) => w.barber.outletDetails), { staff: s, selectedServices: d, selectedProfessional: l } = X((w) => w.barber.service), { selectedSlotIds: c, selectedDate: f, selectedTime: h } = X((w) => w.barber.slots), { userDetails: m, bookingMode: p, tipPct: v } = X((w) => w.barber.appointment), y = Array.isArray(d) ? d : [d], { selectedSlotIndexes: $, slots: P } = X((w) => w.barber.slots), [b, S] = Z(!1), [O, N] = Z(!1), [T, k] = Z(null), [q, J] = Z("person"), [ne, he] = Z(!1), [fe, pe] = Z(""), [Pe, ve] = Z(""), [me, ae] = Z(null), [ie, le] = Z(null), [x, C] = Z({}), [E, M] = Z({}), [L, D] = Z(!1), G = je(!1), B = je(""), U = be.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), oe = je(""), $e = je(null), { register: V, handleSubmit: H, control: Oe, watch: ye, reset: et, trigger: Zt, setValue: St, formState: { errors: Ye, isSubmitted: Ua } } = ha({
|
|
18283
18283
|
defaultValues: {
|
|
18284
18284
|
firstName: m?.firstName || "",
|
|
18285
18285
|
lastName: m?.lastName || "",
|
|
18286
18286
|
phone: m?.phone || "",
|
|
18287
18287
|
email: m?.email || ""
|
|
18288
18288
|
},
|
|
18289
|
-
mode: "
|
|
18289
|
+
mode: "onChange",
|
|
18290
|
+
reValidateMode: "onChange"
|
|
18290
18291
|
}), Pt = ye("phone"), wt = ye("email"), Xt = (w) => w?.replace(/\s+/g, "") || "", Va = (w) => /^\S+@\S+\.\S+$/.test(w), vn = y.map((w) => {
|
|
18291
|
-
const I = s?.find((
|
|
18292
|
+
const I = s?.find((j) => j.id === l?.id)?.assignments?.find((j) => j.id === w.id), R = {
|
|
18292
18293
|
...w,
|
|
18293
18294
|
price: I?.price ?? w.price ?? w.min_price ?? 0,
|
|
18294
18295
|
duration: I?.duration ?? w.estimated_time ?? w.min_time ?? 0
|
|
18295
18296
|
};
|
|
18296
18297
|
return {
|
|
18297
|
-
...
|
|
18298
|
+
...R,
|
|
18298
18299
|
duration: I?.duration ?? w.estimated_time ?? w.min_time ?? 0,
|
|
18299
|
-
tax: Di(
|
|
18300
|
-
unitTax: Di(
|
|
18300
|
+
tax: Di(R),
|
|
18301
|
+
unitTax: Di(R, { perUnit: !0 })
|
|
18301
18302
|
};
|
|
18302
18303
|
}), yn = [
|
|
18303
18304
|
...P?.morning ?? [],
|
|
@@ -18305,12 +18306,12 @@ function lv() {
|
|
|
18305
18306
|
...P?.evening ?? []
|
|
18306
18307
|
], el = vn.reduce((w, I) => w + Number(I.duration ?? 0), 0), tl = Math.ceil(el / ov), rl = (w) => {
|
|
18307
18308
|
if (!yn.length) return "";
|
|
18308
|
-
const I = yn[w]?.start_time,
|
|
18309
|
-
return !I || !
|
|
18309
|
+
const I = yn[w]?.start_time, R = yn[w + tl - 1];
|
|
18310
|
+
return !I || !R ? "" : `${I} - ${R.end_time ?? R.start_time}`;
|
|
18310
18311
|
}, Ga = {
|
|
18311
|
-
day: Number(f?.day ??
|
|
18312
|
-
month: Number(f?.month ??
|
|
18313
|
-
year: Number(f?.year ??
|
|
18312
|
+
day: Number(f?.day ?? U.day),
|
|
18313
|
+
month: Number(f?.month ?? U.month),
|
|
18314
|
+
year: Number(f?.year ?? U.year)
|
|
18314
18315
|
}, za = $?.[0], Wa = za !== void 0 ? rl(za) : null, nl = Wa ? `${iv[Ga.month - 1]} ${Ga.day} at ${Wa}` : null, bn = vn.reduce((w, I) => w + Number(I.price) * (I.qty ?? 1), 0), Ha = vn.reduce((w, I) => w + I.tax, 0), al = Math.round(Ha * 100), qa = bn * v / 100, il = Math.round(qa * 100), Ka = bn + qa + Ha, xe = Ce(() => y.filter((w) => !(!Xs(w) || (w?.consent_rule?.enforcementMode ?? w?.enforcementMode) === "FIXED")), [y]), ol = Ce(() => xe.map((w) => String(w.id)).filter(Boolean), [xe]), sl = (w) => {
|
|
18315
18316
|
const I = w?.consent_template ?? w?.consentTemplate ?? null;
|
|
18316
18317
|
return {
|
|
@@ -18326,14 +18327,14 @@ function lv() {
|
|
|
18326
18327
|
ce(() => {
|
|
18327
18328
|
m && xe?.length > 0 && ll();
|
|
18328
18329
|
}, [m, xe?.length]), ce(() => {
|
|
18329
|
-
|
|
18330
|
+
et({
|
|
18330
18331
|
...m,
|
|
18331
18332
|
phone: m?.phone || ""
|
|
18332
18333
|
}, {
|
|
18333
18334
|
keepErrors: !0,
|
|
18334
18335
|
keepDirty: !1
|
|
18335
18336
|
});
|
|
18336
|
-
}, [m,
|
|
18337
|
+
}, [m, et]), ce(() => {
|
|
18337
18338
|
Ua && Zt(["phone", "email"]);
|
|
18338
18339
|
}, [
|
|
18339
18340
|
Pt,
|
|
@@ -18343,30 +18344,30 @@ function lv() {
|
|
|
18343
18344
|
]);
|
|
18344
18345
|
const Ya = ze(async ({ value: w, type: I }) => {
|
|
18345
18346
|
if (!w) return;
|
|
18346
|
-
let
|
|
18347
|
+
let R = "";
|
|
18347
18348
|
if (I === "phone") {
|
|
18348
18349
|
if (!or(w)) return;
|
|
18349
|
-
|
|
18350
|
+
R = Xt(w);
|
|
18350
18351
|
}
|
|
18351
18352
|
if (I === "email") {
|
|
18352
18353
|
if (!Va(w)) return;
|
|
18353
|
-
|
|
18354
|
+
R = w.trim();
|
|
18354
18355
|
}
|
|
18355
|
-
if (
|
|
18356
|
-
oe.current =
|
|
18356
|
+
if (R && !(oe.current === R && K)) {
|
|
18357
|
+
oe.current = R, S(!0), W(I);
|
|
18357
18358
|
try {
|
|
18358
|
-
const
|
|
18359
|
-
search:
|
|
18359
|
+
const j = (await Gu({
|
|
18360
|
+
search: R,
|
|
18360
18361
|
tenantId: t
|
|
18361
18362
|
}))?.data?.[0];
|
|
18362
|
-
|
|
18363
|
-
email:
|
|
18364
|
-
firstName:
|
|
18365
|
-
lastName:
|
|
18366
|
-
phone:
|
|
18363
|
+
j ? (St("firstName", j.first_name || "", { shouldValidate: !0 }), St("lastName", j.last_name || ""), j.phone && or(j.phone) && St("phone", j.phone), j.email && St("email", j.email), e(xi({
|
|
18364
|
+
email: j.email,
|
|
18365
|
+
firstName: j.first_name,
|
|
18366
|
+
lastName: j.last_name,
|
|
18367
|
+
phone: j.phone
|
|
18367
18368
|
})), A(!0)) : A(!1);
|
|
18368
|
-
} catch (
|
|
18369
|
-
console.error(
|
|
18369
|
+
} catch (j) {
|
|
18370
|
+
console.error(j);
|
|
18370
18371
|
} finally {
|
|
18371
18372
|
S(!1), W(null);
|
|
18372
18373
|
}
|
|
@@ -18380,17 +18381,17 @@ function lv() {
|
|
|
18380
18381
|
ce(() => ($e.current = Fl(Ya, 800), () => {
|
|
18381
18382
|
$e.current?.cancel?.();
|
|
18382
18383
|
}), [Ya]);
|
|
18383
|
-
const Za = (w, I,
|
|
18384
|
+
const Za = (w, I, R) => {
|
|
18384
18385
|
if (I && I(w), !w) {
|
|
18385
18386
|
$e.current?.cancel?.(), oe.current = "", A(!1), W(null);
|
|
18386
18387
|
return;
|
|
18387
18388
|
}
|
|
18388
|
-
W(
|
|
18389
|
+
W(R), $e.current?.({
|
|
18389
18390
|
value: w,
|
|
18390
|
-
type:
|
|
18391
|
+
type: R
|
|
18391
18392
|
});
|
|
18392
18393
|
}, dl = () => {
|
|
18393
|
-
|
|
18394
|
+
et({
|
|
18394
18395
|
firstName: "",
|
|
18395
18396
|
lastName: "",
|
|
18396
18397
|
email: "",
|
|
@@ -18402,22 +18403,22 @@ function lv() {
|
|
|
18402
18403
|
D(!0);
|
|
18403
18404
|
try {
|
|
18404
18405
|
const I = {};
|
|
18405
|
-
for (const
|
|
18406
|
-
const
|
|
18407
|
-
if (!
|
|
18408
|
-
const te = Ei(
|
|
18406
|
+
for (const R of xe) {
|
|
18407
|
+
const j = String(R.id), se = String(R.consent_form_id ?? "");
|
|
18408
|
+
if (!j || !se) continue;
|
|
18409
|
+
const te = Ei(R);
|
|
18409
18410
|
if (!(te === "EVERY_X_DAYS" || te === "ONCE_PER_CUSTOMER")) {
|
|
18410
|
-
I[
|
|
18411
|
+
I[j] = { data: {
|
|
18411
18412
|
checked: !0,
|
|
18412
18413
|
needsSignature: !0
|
|
18413
18414
|
} };
|
|
18414
18415
|
continue;
|
|
18415
18416
|
}
|
|
18416
|
-
const Te = !!(await Ti(w, se,
|
|
18417
|
-
I[
|
|
18417
|
+
const Te = !!(await Ti(w, se, j))?.data?.needsSignature;
|
|
18418
|
+
I[j] = { data: {
|
|
18418
18419
|
checked: !0,
|
|
18419
18420
|
needsSignature: Te
|
|
18420
|
-
} }, Te || $n(
|
|
18421
|
+
} }, Te || $n(j);
|
|
18421
18422
|
}
|
|
18422
18423
|
M(I);
|
|
18423
18424
|
} catch (I) {
|
|
@@ -18429,8 +18430,8 @@ function lv() {
|
|
|
18429
18430
|
}, gn = Ce(() => xe.filter((w) => {
|
|
18430
18431
|
const I = String(w.id);
|
|
18431
18432
|
if (x[I]) return !1;
|
|
18432
|
-
const
|
|
18433
|
-
return !(
|
|
18433
|
+
const R = E[I];
|
|
18434
|
+
return !(R?.data?.checked && R?.data?.needsSignature === !1);
|
|
18434
18435
|
}), [
|
|
18435
18436
|
xe,
|
|
18436
18437
|
x,
|
|
@@ -18453,21 +18454,21 @@ function lv() {
|
|
|
18453
18454
|
return;
|
|
18454
18455
|
}
|
|
18455
18456
|
const I = String(w.id);
|
|
18456
|
-
if (
|
|
18457
|
-
|
|
18458
|
-
const
|
|
18459
|
-
if (!
|
|
18457
|
+
if (B.current === I && ne) return;
|
|
18458
|
+
B.current = I;
|
|
18459
|
+
const R = String(w.consent_form_id ?? "");
|
|
18460
|
+
if (!R) {
|
|
18460
18461
|
re.error("Consent form missing.");
|
|
18461
18462
|
return;
|
|
18462
18463
|
}
|
|
18463
|
-
const
|
|
18464
|
-
if (!
|
|
18464
|
+
const j = Ii(w);
|
|
18465
|
+
if (!j) {
|
|
18465
18466
|
re.error("Consent enforcement method not found.");
|
|
18466
18467
|
return;
|
|
18467
18468
|
}
|
|
18468
18469
|
const se = m?.id;
|
|
18469
18470
|
if (Ei(w) !== "EVERY_VISIT" && se) {
|
|
18470
|
-
const Le = !!(await Ti(se,
|
|
18471
|
+
const Le = !!(await Ti(se, R, I))?.data?.needsSignature;
|
|
18471
18472
|
if (M((Jt) => ({
|
|
18472
18473
|
...Jt,
|
|
18473
18474
|
[I]: { data: {
|
|
@@ -18490,7 +18491,7 @@ function lv() {
|
|
|
18490
18491
|
re.error("Consent template missing.");
|
|
18491
18492
|
return;
|
|
18492
18493
|
}
|
|
18493
|
-
pe(te), ve(ge), ae(
|
|
18494
|
+
pe(te), ve(ge), ae(j), le(I), he(!0);
|
|
18494
18495
|
} catch (w) {
|
|
18495
18496
|
console.error(w), re.error(w?.message ?? "Consent check failed");
|
|
18496
18497
|
} finally {
|
|
@@ -18499,10 +18500,10 @@ function lv() {
|
|
|
18499
18500
|
}
|
|
18500
18501
|
}, cl = (w, I) => {
|
|
18501
18502
|
try {
|
|
18502
|
-
const
|
|
18503
|
-
|
|
18504
|
-
} catch (
|
|
18505
|
-
console.error("Failed to save consent draft",
|
|
18503
|
+
const R = localStorage.getItem(sr), j = R ? JSON.parse(R) : {};
|
|
18504
|
+
j[String(w)] = I, localStorage.setItem(sr, JSON.stringify(j));
|
|
18505
|
+
} catch (R) {
|
|
18506
|
+
console.error("Failed to save consent draft", R);
|
|
18506
18507
|
}
|
|
18507
18508
|
}, ul = () => {
|
|
18508
18509
|
try {
|
|
@@ -18513,27 +18514,27 @@ function lv() {
|
|
|
18513
18514
|
}, fl = (w) => {
|
|
18514
18515
|
const I = String(ie);
|
|
18515
18516
|
if (!I) return;
|
|
18516
|
-
const
|
|
18517
|
-
if (!
|
|
18518
|
-
const
|
|
18519
|
-
if (!
|
|
18517
|
+
const R = xe.find((ge) => String(ge.id) === I);
|
|
18518
|
+
if (!R) return;
|
|
18519
|
+
const j = String(R.consent_form_id ?? ""), se = Ii(R);
|
|
18520
|
+
if (!j || !se) {
|
|
18520
18521
|
re.error("Consent form/method missing.");
|
|
18521
18522
|
return;
|
|
18522
18523
|
}
|
|
18523
18524
|
let te = "CHECKBOX_ONLY";
|
|
18524
18525
|
se === "TYPED_NAME" ? te = "TYPED_NAME" : se === "DRAW_SIGNATURE" && (te = "SIGNATURE_IMAGE"), cl(I, {
|
|
18525
18526
|
serviceId: I,
|
|
18526
|
-
concentFormId:
|
|
18527
|
+
concentFormId: j,
|
|
18527
18528
|
signatureType: te,
|
|
18528
18529
|
typedName: w?.typedName,
|
|
18529
18530
|
isChecked: w?.accepted,
|
|
18530
18531
|
signatureDataUrl: w?.signatureDataUrl,
|
|
18531
18532
|
emailMe: w?.emailMe
|
|
18532
|
-
}), $n(I), he(!1),
|
|
18533
|
+
}), $n(I), he(!1), B.current = "", re.success("Consent captured.");
|
|
18533
18534
|
}, pl = () => {
|
|
18534
18535
|
he(!1), le(null);
|
|
18535
|
-
}, ml = async (w, I,
|
|
18536
|
-
const
|
|
18536
|
+
}, ml = async (w, I, R) => {
|
|
18537
|
+
const j = ul(), se = Object.entries(j).map(([te, ge]) => ({
|
|
18537
18538
|
serviceId: te,
|
|
18538
18539
|
concentFormId: ge.concentFormId,
|
|
18539
18540
|
captured: ge
|
|
@@ -18546,7 +18547,7 @@ function lv() {
|
|
|
18546
18547
|
customerId: I,
|
|
18547
18548
|
serviceId: ge,
|
|
18548
18549
|
formId: Te,
|
|
18549
|
-
staffId:
|
|
18550
|
+
staffId: R,
|
|
18550
18551
|
signatureType: Jt,
|
|
18551
18552
|
typedName: Le.typedName,
|
|
18552
18553
|
imageUrl: Le.signatureDataUrl
|
|
@@ -18567,13 +18568,13 @@ function lv() {
|
|
|
18567
18568
|
lastName: ye("lastName"),
|
|
18568
18569
|
email: ye("email"),
|
|
18569
18570
|
phone: ye("phone")
|
|
18570
|
-
},
|
|
18571
|
+
}, R = {
|
|
18571
18572
|
tenantId: t,
|
|
18572
18573
|
outletId: r,
|
|
18573
18574
|
staffId: l?.id,
|
|
18574
18575
|
date: ti,
|
|
18575
18576
|
startTime: h,
|
|
18576
|
-
serviceIds: y.map((
|
|
18577
|
+
serviceIds: y.map((j) => j.id),
|
|
18577
18578
|
slotIds: c,
|
|
18578
18579
|
isWalkIn: !1,
|
|
18579
18580
|
requiresConsent: xe.length > 0,
|
|
@@ -18586,13 +18587,13 @@ function lv() {
|
|
|
18586
18587
|
};
|
|
18587
18588
|
try {
|
|
18588
18589
|
S(!0);
|
|
18589
|
-
const
|
|
18590
|
+
const j = await e(hr(R)).unwrap(), se = j?.data ?? j, te = se.id || "", ge = se.customerId || se.customer?.id || "", Te = se.staffId || l?.id || "";
|
|
18590
18591
|
p === "booking" && Ja > 0 && await ml(te, ge, Te), q === "card" ? (k({
|
|
18591
18592
|
appointmentId: te,
|
|
18592
18593
|
customerId: ge
|
|
18593
18594
|
}), N(!0)) : (e(nr(String(te))), e(Ge()));
|
|
18594
|
-
} catch (
|
|
18595
|
-
const se =
|
|
18595
|
+
} catch (j) {
|
|
18596
|
+
const se = j?.payload?.message || j?.data?.message || j?.message || "Staff not working on this day";
|
|
18596
18597
|
re.error(se);
|
|
18597
18598
|
} finally {
|
|
18598
18599
|
S(!1);
|
|
@@ -18631,12 +18632,12 @@ function lv() {
|
|
|
18631
18632
|
}, yl = async (w) => {
|
|
18632
18633
|
try {
|
|
18633
18634
|
S(!0);
|
|
18634
|
-
const I = T?.appointmentId,
|
|
18635
|
+
const I = T?.appointmentId, R = String(T?.customerId);
|
|
18635
18636
|
if (!I || !r)
|
|
18636
18637
|
return re.error("Something went wrong."), !1;
|
|
18637
|
-
const
|
|
18638
|
+
const j = vl(w.number), se = await zu({
|
|
18638
18639
|
appointmentId: I,
|
|
18639
|
-
customerId:
|
|
18640
|
+
customerId: R,
|
|
18640
18641
|
outletId: r,
|
|
18641
18642
|
referenceNo: I,
|
|
18642
18643
|
currency: "USD",
|
|
@@ -18652,7 +18653,7 @@ function lv() {
|
|
|
18652
18653
|
tenderInfo: {
|
|
18653
18654
|
cardHolderName: w.name,
|
|
18654
18655
|
cardNumber: w.number.replace(/\s/g, ""),
|
|
18655
|
-
cardType:
|
|
18656
|
+
cardType: j,
|
|
18656
18657
|
cardExpiry: dv(w.expiry),
|
|
18657
18658
|
cvData: w.cvv
|
|
18658
18659
|
},
|
|
@@ -18681,8 +18682,8 @@ function lv() {
|
|
|
18681
18682
|
}, bl = () => {
|
|
18682
18683
|
N(!1), re.warning("Appointment booked. Payment was cancelled."), e(nr(String(T?.appointmentId))), e(Ge());
|
|
18683
18684
|
}, $l = () => {
|
|
18684
|
-
const w = !!Xt(Pt), I = !!wt?.trim(),
|
|
18685
|
-
return !!(!h || !
|
|
18685
|
+
const w = !!Xt(Pt), I = !!wt?.trim(), R = !!ye("firstName")?.trim();
|
|
18686
|
+
return !!(!h || !R || !w && !I || w && !or(Pt) || I && !Va(wt));
|
|
18686
18687
|
}, gl = async (w) => {
|
|
18687
18688
|
ri(w), e(Yt(!0));
|
|
18688
18689
|
};
|
|
@@ -18698,7 +18699,7 @@ function lv() {
|
|
|
18698
18699
|
consentRequired: xe?.length > 0,
|
|
18699
18700
|
consentCompleted: Ja,
|
|
18700
18701
|
totalConsents: Xa,
|
|
18701
|
-
checkingConsent:
|
|
18702
|
+
checkingConsent: L,
|
|
18702
18703
|
loading: b,
|
|
18703
18704
|
isBookingDisabled: $l()
|
|
18704
18705
|
})
|
|
@@ -18803,8 +18804,8 @@ function lv() {
|
|
|
18803
18804
|
control: Oe,
|
|
18804
18805
|
name: "phone",
|
|
18805
18806
|
rules: { validate: (w) => {
|
|
18806
|
-
const I =
|
|
18807
|
-
return !
|
|
18807
|
+
const I = Xt(w), R = !!I, j = !!wt?.trim();
|
|
18808
|
+
return !R && !j ? "Enter phone or email" : R && I.length < 8 ? "Phone number must be minimum 8 digits" : R && I.length > 16 ? "Phone number must be maximum 16 digits" : R && !or(w) ? "Enter valid phone number" : !0;
|
|
18808
18809
|
} },
|
|
18809
18810
|
render: ({ field: w }) => /* @__PURE__ */ g("div", {
|
|
18810
18811
|
className: "aaravpos-barber-input-wrapper",
|
|
@@ -18824,9 +18825,9 @@ function lv() {
|
|
|
18824
18825
|
})]
|
|
18825
18826
|
})
|
|
18826
18827
|
}),
|
|
18827
|
-
|
|
18828
|
+
Ye.phone && /* @__PURE__ */ u("p", {
|
|
18828
18829
|
className: "aaravpos-barber-error-text",
|
|
18829
|
-
children:
|
|
18830
|
+
children: Ye.phone.message
|
|
18830
18831
|
}),
|
|
18831
18832
|
K && /* @__PURE__ */ g("div", {
|
|
18832
18833
|
className: "aaravpos-barber-autofill-text",
|
|
@@ -18855,10 +18856,20 @@ function lv() {
|
|
|
18855
18856
|
}),
|
|
18856
18857
|
/* @__PURE__ */ u("input", {
|
|
18857
18858
|
id: "email",
|
|
18858
|
-
|
|
18859
|
+
minLength: 10,
|
|
18860
|
+
maxLength: 50,
|
|
18861
|
+
...V("email", {
|
|
18862
|
+
minLength: {
|
|
18863
|
+
value: 10,
|
|
18864
|
+
message: "Minimum 2 characters required"
|
|
18865
|
+
},
|
|
18866
|
+
maxLength: {
|
|
18867
|
+
value: 50,
|
|
18868
|
+
message: "Email must be maximum 50 characters"
|
|
18869
|
+
},
|
|
18859
18870
|
validate: (w) => {
|
|
18860
|
-
const I = !!w?.trim(),
|
|
18861
|
-
return !I && !
|
|
18871
|
+
const I = !!w?.trim(), R = !!Xt(Pt);
|
|
18872
|
+
return !I && !R ? "Enter phone or email" : I && !/^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}$/.test(w) ? "Invalid email" : !0;
|
|
18862
18873
|
},
|
|
18863
18874
|
onChange: (w) => {
|
|
18864
18875
|
Za(w.target.value, null, "email");
|
|
@@ -18868,9 +18879,9 @@ function lv() {
|
|
|
18868
18879
|
placeholder: "Email address",
|
|
18869
18880
|
className: "aaravpos-barber-custom-input"
|
|
18870
18881
|
}),
|
|
18871
|
-
|
|
18882
|
+
Ye.email && /* @__PURE__ */ u("p", {
|
|
18872
18883
|
className: "aaravpos-barber-error-text",
|
|
18873
|
-
children:
|
|
18884
|
+
children: Ye.email.message
|
|
18874
18885
|
})
|
|
18875
18886
|
]
|
|
18876
18887
|
}),
|
|
@@ -18891,36 +18902,68 @@ function lv() {
|
|
|
18891
18902
|
}),
|
|
18892
18903
|
/* @__PURE__ */ u("input", {
|
|
18893
18904
|
id: "first_name",
|
|
18894
|
-
|
|
18905
|
+
minLength: 2,
|
|
18906
|
+
maxLength: 30,
|
|
18907
|
+
...V("firstName", {
|
|
18895
18908
|
required: "First name required",
|
|
18896
18909
|
pattern: {
|
|
18897
18910
|
value: /^[A-Za-z\s]+$/,
|
|
18898
18911
|
message: "Only letters are allowed"
|
|
18912
|
+
},
|
|
18913
|
+
minLength: {
|
|
18914
|
+
value: 2,
|
|
18915
|
+
message: "Minimum 2 characters required"
|
|
18916
|
+
},
|
|
18917
|
+
maxLength: {
|
|
18918
|
+
value: 30,
|
|
18919
|
+
message: "Maximum 30 characters allowed"
|
|
18899
18920
|
}
|
|
18900
18921
|
}),
|
|
18901
18922
|
autoComplete: "given-name",
|
|
18902
18923
|
placeholder: "First Name",
|
|
18903
18924
|
className: "aaravpos-barber-custom-input"
|
|
18904
18925
|
}),
|
|
18905
|
-
|
|
18926
|
+
Ye.firstName && /* @__PURE__ */ u("p", {
|
|
18906
18927
|
className: "aaravpos-barber-error-text",
|
|
18907
|
-
children:
|
|
18928
|
+
children: Ye.firstName.message
|
|
18908
18929
|
})
|
|
18909
18930
|
]
|
|
18910
18931
|
}),
|
|
18911
18932
|
/* @__PURE__ */ g("div", {
|
|
18912
18933
|
className: "aaravpos-barber-form-group",
|
|
18913
|
-
children: [
|
|
18914
|
-
|
|
18915
|
-
|
|
18916
|
-
|
|
18917
|
-
|
|
18918
|
-
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18934
|
+
children: [
|
|
18935
|
+
/* @__PURE__ */ u("label", {
|
|
18936
|
+
htmlFor: "last_name",
|
|
18937
|
+
className: "aaravpos-barber-form-label",
|
|
18938
|
+
children: "Last Name"
|
|
18939
|
+
}),
|
|
18940
|
+
/* @__PURE__ */ u("input", {
|
|
18941
|
+
id: "last_name",
|
|
18942
|
+
minLength: 2,
|
|
18943
|
+
maxLength: 20,
|
|
18944
|
+
autoComplete: "family-name",
|
|
18945
|
+
...V("lastName", {
|
|
18946
|
+
minLength: {
|
|
18947
|
+
value: 2,
|
|
18948
|
+
message: "Last name must be at least 2 characters"
|
|
18949
|
+
},
|
|
18950
|
+
maxLength: {
|
|
18951
|
+
value: 30,
|
|
18952
|
+
message: "Last name cannot exceed 30 characters"
|
|
18953
|
+
},
|
|
18954
|
+
pattern: {
|
|
18955
|
+
value: /^[A-Za-z\s]+$/,
|
|
18956
|
+
message: "Only letters are allowed"
|
|
18957
|
+
}
|
|
18958
|
+
}),
|
|
18959
|
+
placeholder: "Last Name",
|
|
18960
|
+
className: "aaravpos-barber-custom-input"
|
|
18961
|
+
}),
|
|
18962
|
+
Ye.lastName && /* @__PURE__ */ u("p", {
|
|
18963
|
+
className: "text-red-500 text-sm mt-1",
|
|
18964
|
+
children: Ye.lastName.message
|
|
18965
|
+
})
|
|
18966
|
+
]
|
|
18924
18967
|
})
|
|
18925
18968
|
]
|
|
18926
18969
|
}), /* @__PURE__ */ u("button", {
|