@aaravpos/appointment-barber-booking 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import R, { 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";
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";
@@ -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((U) => U.barber.outletDetails), { selectedSlotIndexes: P, slots: b, selectedDate: S } = X((U) => U.barber.slots), { staff: O, selectedServices: N, selectedProfessional: T } = X((U) => U.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 = [
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 U = O?.find((H) => H.id === T.id);
3279
- return U ? N.map((H) => {
3280
- const Oe = U.assignments?.find((Qe) => Qe.id === H.id), ye = {
3278
+ const V = O?.find((H) => H.id === T.id);
3279
+ return V ? N.map((H) => {
3280
+ const Oe = V.assignments?.find((Qe) => Qe.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((U, H) => U + Number(H.price || H.min_price || 0) * (H.qty || 1), 0), C = le.reduce((U, H) => U + Number(H.duration || H.min_time || H.estimated_time || 0) * (H.qty || 1), 0), E = Math.ceil(C / ie), M = (U) => {
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[U]?.start_time, Oe = ae[U + E - 1];
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
- }, j = S || {
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, L = j.month ?? 0, B = G ? `${p1[L - 1]} ${j.day} at ${G}` : null, z = le.reduce((U, H) => U + H.tax, 0), W = Number(i) || 0, K = a ? x * W / 100 : 0, A = x + z + K;
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 U = () => {
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
- U();
3324
+ V();
3325
3325
  const H = new ResizeObserver(() => {
3326
- U();
3326
+ V();
3327
3327
  });
3328
- return pe.current && H.observe(pe.current), fe.current && H.observe(fe.current), window.addEventListener("resize", U), () => {
3329
- H.disconnect(), window.removeEventListener("resize", U);
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
- }), B ? /* @__PURE__ */ u("span", {
3382
+ }), U ? /* @__PURE__ */ u("span", {
3383
3383
  className: "aaravpos-barber-date-time-value",
3384
- children: B
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((U) => /* @__PURE__ */ g("li", {
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: U.name
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: U.qty })]
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: [U.min_time || U.estimated_time, " min"] })]
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 }), U.price || U.min_price]
3416
+ children: [/* @__PURE__ */ u(we, { size: 12 }), V.price || V.min_price]
3417
3417
  })
3418
3418
  ]
3419
3419
  })]
3420
- }, U.id))
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((U, H) => {
3455
- const Oe = U === "custom", ye = Oe ? ne : W === U, Qe = H === 0, Zt = H === [...me, "custom"].length - 1;
3454
+ children: [...me, "custom"].map((V, H) => {
3455
+ const Oe = V === "custom", ye = Oe ? ne : W === V, Qe = 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(U)));
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
  ${Qe || Zt ? "aaravpos-barber-tip-btn-fixed" : "aaravpos-barber-tip-btn-flex"}
3462
3462
  ${ye ? "aaravpos-barber-tip-btn-active" : ""}`,
3463
- children: Oe ? "Custom" : U === 0 ? "No tip" : `${U}%`
3464
- }, U);
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: (U) => {
3476
- const H = U.target.value;
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, j) => {
3975
- const D = x.plus({ days: j });
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, j) => x + j);
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"), j = C.hasSame(M, "day"), D = l?.day === x.day && l?.month === x.month && l?.year === x.year, G = C.startOf("day"), L = G < b, B = G > S, z = L || B || kr({
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", L || B || z ? "aaravpos-barber-date-card-disabled" : D ? "aaravpos-barber-date-card-active" : "aaravpos-barber-date-card-default"].filter(Boolean).join(" "),
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
- j && !D && !z && /* @__PURE__ */ u("span", {
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 U = $e && $e.$$typeof;
4729
- switch (U) {
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 U;
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 j(A) {
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 L(A) {
4770
+ function B(A) {
4771
4771
  return O(A) === p;
4772
4772
  }
4773
- function B(A) {
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 = j, e.isFragment = D, e.isLazy = G, e.isMemo = L, e.isPortal = B, e.isProfiler = z, e.isStrictMode = W, e.isSuspense = K, e.isValidElementType = S, e.typeOf = O;
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 j(G, L, B, z, W, K, A) {
4918
- if (z = z || p, K = K || B, A !== a) {
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 + ":" + B;
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 L[B] == null ? G ? L[B] === 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(L, B, z, W, K);
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 = j.bind(null, !1);
4930
- return D.isRequired = j.bind(null, !0), D;
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, j, D, G, L, B) {
4934
- var z = M[j];
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 + " `" + L + "` of type " + ("`" + W + "` supplied to `" + D + "`, expected ") + ("`" + C + "`."), { expectedType: C });
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, j, D, G, L) {
4948
- if (typeof C != "function") return new $("Property `" + L + "` of component `" + D + "` has invalid PropType notation inside arrayOf.");
4949
- var B = M[j];
4950
- if (!Array.isArray(B)) {
4951
- var z = ae(B);
4952
- return new $("Invalid " + G + " `" + L + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected an array."));
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 < B.length; W++) {
4955
- var K = C(B, W, D, G, L + "[" + W + "]", a);
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, j, D, G) {
4964
- var L = E[M];
4965
- if (!l(L)) {
4966
- var B = ae(L);
4967
- return new $("Invalid " + D + " `" + G + "` of type " + ("`" + B + "` supplied to `" + j + "`, expected a single ReactElement."));
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, j, D, G) {
4975
- var L = E[M];
4976
- if (!r.isValidElementType(L)) {
4977
- var B = ae(L);
4978
- return new $("Invalid " + D + " `" + G + "` of type " + ("`" + B + "` supplied to `" + j + "`, expected a single ReactElement 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, j, D, G, L) {
4986
- if (!(M[j] instanceof C)) {
4987
- var B = C.name || p, z = x(M[j]);
4988
- return new $("Invalid " + G + " `" + L + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected ") + ("instance of `" + B + "`."));
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, j, D, G, L) {
4998
- for (var B = M[j], z = 0; z < C.length; z++) if (y(B, C[z])) return null;
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 + " `" + L + "` of value `" + String(B) + "` " + ("supplied to `" + D + "`, expected one of " + W + "."));
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, j, D, G, L) {
5008
- if (typeof C != "function") return new $("Property `" + L + "` of component `" + D + "` has invalid PropType notation inside objectOf.");
5009
- var B = M[j], z = ae(B);
5010
- if (z !== "object") return new $("Invalid " + G + " `" + L + "` of type " + ("`" + z + "` supplied to `" + D + "`, expected an object."));
5011
- for (var W in B) if (i(B, W)) {
5012
- var K = C(B, W, D, G, L + "." + W, a);
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 j(D, G, L, B, z) {
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, L, B, z, a);
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 " + B + " `" + z + "` supplied to " + ("`" + L + "`" + $e + "."));
5034
+ return new $("Invalid " + U + " `" + z + "` supplied to " + ("`" + B + "`" + $e + "."));
5035
5035
  }
5036
- return P(j);
5036
+ return P(L);
5037
5037
  }
5038
5038
  function he() {
5039
- function C(E, M, j, D, G) {
5040
- return ve(E[M]) ? null : new $("Invalid " + D + " `" + G + "` supplied to " + ("`" + j + "`, expected a ReactNode."));
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, j, D) {
5045
- return new $((C || "React class") + ": " + E + " type `" + M + "." + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + D + "`.");
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, j, D, G, L) {
5049
- var B = M[j], z = ae(B);
5050
- if (z !== "object") return new $("Invalid " + G + " `" + L + "` of type `" + z + "` " + ("supplied to `" + D + "`, expected `object`."));
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, L, W, ie(K));
5054
- var A = K(B, W, D, G, L + "." + W, a);
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, j, D, G, L) {
5063
- var B = M[j], z = ae(B);
5064
- if (z !== "object") return new $("Invalid " + G + " `" + L + "` of type `" + z + "` " + ("supplied to `" + D + "`, expected `object`."));
5065
- for (var W in n({}, M[j], C)) {
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, L, W, ie(K));
5068
- if (!K) return new $("Invalid " + G + " `" + L + "` key `" + W + "` supplied to `" + D + "`.\nBad object: " + JSON.stringify(M[j], null, " ") + `
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(B, W, D, G, L + "." + W, a);
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), j;
5090
+ var M = E.call(C), L;
5091
5091
  if (E !== C.entries) {
5092
- for (; !(j = M.next()).done; ) if (!ve(j.value)) return !1;
5093
- } else for (; !(j = M.next()).done; ) {
5094
- var D = j.value;
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
  }
@@ -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__ */ R.createElement("canvas", Zn({ ref: n.setRef }, s));
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__ */ R.createElement(n, p);
13548
+ return /* @__PURE__ */ F.createElement(n, p);
13549
13549
  }
13550
- Rr = /* @__PURE__ */ R.forwardRef(Rr);
13550
+ Rr = /* @__PURE__ */ F.forwardRef(Rr);
13551
13551
  Rr.propTypes = {
13552
13552
  parse: _.default.func.isRequired,
13553
13553
  format: _.default.func.isRequired,
@@ -16645,14 +16645,14 @@ function Wm(e) {
16645
16645
  onKeyDown: a,
16646
16646
  inputFormat: o
16647
16647
  });
16648
- return /* @__PURE__ */ R.createElement(C0, la({}, l, {
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__ */ R.forwardRef(t), t.propTypes = {
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__ */ R.createElement(h, ca({}, m, {
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__ */ R.forwardRef(t), t.propTypes = {
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__ */ R.createElement("select", Ur({}, o, {
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__ */ R.createElement("option", {
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__ */ R.createElement("div", { className: "PhoneInputCountry" }, /* @__PURE__ */ R.createElement(Dd, Ur({}, d, {
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__ */ R.createElement("div", { className: "PhoneInputCountryIconUnicode" }, Jm(t)) : /* @__PURE__ */ R.createElement(a, {
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__ */ R.createElement(o, null));
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__ */ R.createElement("div", { className: "PhoneInputCountrySelectArrow" });
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__ */ R.createElement("img", ua({}, i, {
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__ */ R.createElement(Ld, r) : /* @__PURE__ */ R.createElement(jd, r);
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__ */ R.createElement("svg", Vr({}, r, {
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__ */ R.createElement("title", null, t), /* @__PURE__ */ R.createElement("g", {
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__ */ R.createElement("path", {
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__ */ R.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__ */ R.createElement("line", {
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__ */ R.createElement("line", {
17002
+ }), /* @__PURE__ */ F.createElement("line", {
17003
17003
  x1: "50",
17004
17004
  y1: "1",
17005
17005
  x2: "50",
17006
17006
  y2: "49"
17007
- }), /* @__PURE__ */ R.createElement("path", {
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__ */ R.createElement("path", {
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__ */ R.createElement("path", {
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__ */ R.createElement("svg", Vr({}, r, {
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__ */ R.createElement("title", null, t), /* @__PURE__ */ R.createElement("g", {
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__ */ R.createElement("path", { d: "M8.45,13A21.44,21.44,0,1,1,37.08,41.56" }), /* @__PURE__ */ R.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__ */ R.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__ */ R.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__ */ R.createElement("line", {
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__ */ R.createElement("line", {
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__ */ R.createElement("path", {
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__ */ R.createElement("div", fa({}, c, { className: (0, Br.default)("PhoneInputCountryIcon", {
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__ */ R.createElement(n, {
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__ */ R.createElement(a, {
17175
+ }) : /* @__PURE__ */ F.createElement(a, {
17176
17176
  title: d,
17177
17177
  aspectRatio: f,
17178
17178
  className: "PhoneInputCountryIconImg"
@@ -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__ */ R.createRef();
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__ */ R.createElement(v, ht({
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__ */ R.createElement(m, ht({
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__ */ R.createElement(J, ht({
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
- })(R.PureComponent), Jd = /* @__PURE__ */ R.forwardRef(function(e, t) {
17882
- return /* @__PURE__ */ R.createElement(Zh, ht({}, Xh(e), { inputRef: t }));
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__ */ R.forwardRef(function(r, n) {
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__ */ R.createElement(Jd, ma({}, d, {
18236
+ return /* @__PURE__ */ F.createElement(Jd, ma({}, d, {
18237
18237
  ref: n,
18238
18238
  metadata: i,
18239
18239
  labels: s
@@ -18279,7 +18279,7 @@ 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({}), [j, D] = Z(!1), G = je(!1), L = je(""), B = be.now().setZone(n ?? "UTC"), [z, W] = Z(null), [K, A] = Z(!1), oe = je(""), $e = je(null), { register: U, handleSubmit: H, control: Oe, watch: ye, reset: Qe, trigger: Zt, setValue: St, formState: { errors: ot, isSubmitted: Ua } } = ha({
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: Qe, trigger: Zt, setValue: St, formState: { errors: ot, isSubmitted: Ua } } = ha({
18283
18283
  defaultValues: {
18284
18284
  firstName: m?.firstName || "",
18285
18285
  lastName: m?.lastName || "",
@@ -18288,16 +18288,16 @@ function lv() {
18288
18288
  },
18289
18289
  mode: "onSubmit"
18290
18290
  }), 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((V) => V.id === l?.id)?.assignments?.find((V) => V.id === w.id), F = {
18291
+ const I = s?.find((j) => j.id === l?.id)?.assignments?.find((j) => j.id === w.id), R = {
18292
18292
  ...w,
18293
18293
  price: I?.price ?? w.price ?? w.min_price ?? 0,
18294
18294
  duration: I?.duration ?? w.estimated_time ?? w.min_time ?? 0
18295
18295
  };
18296
18296
  return {
18297
- ...F,
18297
+ ...R,
18298
18298
  duration: I?.duration ?? w.estimated_time ?? w.min_time ?? 0,
18299
- tax: Di(F),
18300
- unitTax: Di(F, { perUnit: !0 })
18299
+ tax: Di(R),
18300
+ unitTax: Di(R, { perUnit: !0 })
18301
18301
  };
18302
18302
  }), yn = [
18303
18303
  ...P?.morning ?? [],
@@ -18305,12 +18305,12 @@ function lv() {
18305
18305
  ...P?.evening ?? []
18306
18306
  ], el = vn.reduce((w, I) => w + Number(I.duration ?? 0), 0), tl = Math.ceil(el / ov), rl = (w) => {
18307
18307
  if (!yn.length) return "";
18308
- const I = yn[w]?.start_time, F = yn[w + tl - 1];
18309
- return !I || !F ? "" : `${I} - ${F.end_time ?? F.start_time}`;
18308
+ const I = yn[w]?.start_time, R = yn[w + tl - 1];
18309
+ return !I || !R ? "" : `${I} - ${R.end_time ?? R.start_time}`;
18310
18310
  }, Ga = {
18311
- day: Number(f?.day ?? B.day),
18312
- month: Number(f?.month ?? B.month),
18313
- year: Number(f?.year ?? B.year)
18311
+ day: Number(f?.day ?? U.day),
18312
+ month: Number(f?.month ?? U.month),
18313
+ year: Number(f?.year ?? U.year)
18314
18314
  }, 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
18315
  const I = w?.consent_template ?? w?.consentTemplate ?? null;
18316
18316
  return {
@@ -18343,30 +18343,30 @@ function lv() {
18343
18343
  ]);
18344
18344
  const Ya = ze(async ({ value: w, type: I }) => {
18345
18345
  if (!w) return;
18346
- let F = "";
18346
+ let R = "";
18347
18347
  if (I === "phone") {
18348
18348
  if (!or(w)) return;
18349
- F = Xt(w);
18349
+ R = Xt(w);
18350
18350
  }
18351
18351
  if (I === "email") {
18352
18352
  if (!Va(w)) return;
18353
- F = w.trim();
18353
+ R = w.trim();
18354
18354
  }
18355
- if (F && !(oe.current === F && K)) {
18356
- oe.current = F, S(!0), W(I);
18355
+ if (R && !(oe.current === R && K)) {
18356
+ oe.current = R, S(!0), W(I);
18357
18357
  try {
18358
- const V = (await Gu({
18359
- search: F,
18358
+ const j = (await Gu({
18359
+ search: R,
18360
18360
  tenantId: t
18361
18361
  }))?.data?.[0];
18362
- V ? (St("firstName", V.first_name || "", { shouldValidate: !0 }), St("lastName", V.last_name || ""), V.phone && or(V.phone) && St("phone", V.phone), V.email && St("email", V.email), e(xi({
18363
- email: V.email,
18364
- firstName: V.first_name,
18365
- lastName: V.last_name,
18366
- phone: V.phone
18362
+ 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({
18363
+ email: j.email,
18364
+ firstName: j.first_name,
18365
+ lastName: j.last_name,
18366
+ phone: j.phone
18367
18367
  })), A(!0)) : A(!1);
18368
- } catch (V) {
18369
- console.error(V);
18368
+ } catch (j) {
18369
+ console.error(j);
18370
18370
  } finally {
18371
18371
  S(!1), W(null);
18372
18372
  }
@@ -18380,14 +18380,14 @@ function lv() {
18380
18380
  ce(() => ($e.current = Fl(Ya, 800), () => {
18381
18381
  $e.current?.cancel?.();
18382
18382
  }), [Ya]);
18383
- const Za = (w, I, F) => {
18383
+ const Za = (w, I, R) => {
18384
18384
  if (I && I(w), !w) {
18385
18385
  $e.current?.cancel?.(), oe.current = "", A(!1), W(null);
18386
18386
  return;
18387
18387
  }
18388
- W(F), $e.current?.({
18388
+ W(R), $e.current?.({
18389
18389
  value: w,
18390
- type: F
18390
+ type: R
18391
18391
  });
18392
18392
  }, dl = () => {
18393
18393
  Qe({
@@ -18402,22 +18402,22 @@ function lv() {
18402
18402
  D(!0);
18403
18403
  try {
18404
18404
  const I = {};
18405
- for (const F of xe) {
18406
- const V = String(F.id), se = String(F.consent_form_id ?? "");
18407
- if (!V || !se) continue;
18408
- const te = Ei(F);
18405
+ for (const R of xe) {
18406
+ const j = String(R.id), se = String(R.consent_form_id ?? "");
18407
+ if (!j || !se) continue;
18408
+ const te = Ei(R);
18409
18409
  if (!(te === "EVERY_X_DAYS" || te === "ONCE_PER_CUSTOMER")) {
18410
- I[V] = { data: {
18410
+ I[j] = { data: {
18411
18411
  checked: !0,
18412
18412
  needsSignature: !0
18413
18413
  } };
18414
18414
  continue;
18415
18415
  }
18416
- const Te = !!(await Ti(w, se, V))?.data?.needsSignature;
18417
- I[V] = { data: {
18416
+ const Te = !!(await Ti(w, se, j))?.data?.needsSignature;
18417
+ I[j] = { data: {
18418
18418
  checked: !0,
18419
18419
  needsSignature: Te
18420
- } }, Te || $n(V);
18420
+ } }, Te || $n(j);
18421
18421
  }
18422
18422
  M(I);
18423
18423
  } catch (I) {
@@ -18429,8 +18429,8 @@ function lv() {
18429
18429
  }, gn = Ce(() => xe.filter((w) => {
18430
18430
  const I = String(w.id);
18431
18431
  if (x[I]) return !1;
18432
- const F = E[I];
18433
- return !(F?.data?.checked && F?.data?.needsSignature === !1);
18432
+ const R = E[I];
18433
+ return !(R?.data?.checked && R?.data?.needsSignature === !1);
18434
18434
  }), [
18435
18435
  xe,
18436
18436
  x,
@@ -18453,21 +18453,21 @@ function lv() {
18453
18453
  return;
18454
18454
  }
18455
18455
  const I = String(w.id);
18456
- if (L.current === I && ne) return;
18457
- L.current = I;
18458
- const F = String(w.consent_form_id ?? "");
18459
- if (!F) {
18456
+ if (B.current === I && ne) return;
18457
+ B.current = I;
18458
+ const R = String(w.consent_form_id ?? "");
18459
+ if (!R) {
18460
18460
  re.error("Consent form missing.");
18461
18461
  return;
18462
18462
  }
18463
- const V = Ii(w);
18464
- if (!V) {
18463
+ const j = Ii(w);
18464
+ if (!j) {
18465
18465
  re.error("Consent enforcement method not found.");
18466
18466
  return;
18467
18467
  }
18468
18468
  const se = m?.id;
18469
18469
  if (Ei(w) !== "EVERY_VISIT" && se) {
18470
- const Le = !!(await Ti(se, F, I))?.data?.needsSignature;
18470
+ const Le = !!(await Ti(se, R, I))?.data?.needsSignature;
18471
18471
  if (M((Jt) => ({
18472
18472
  ...Jt,
18473
18473
  [I]: { data: {
@@ -18490,7 +18490,7 @@ function lv() {
18490
18490
  re.error("Consent template missing.");
18491
18491
  return;
18492
18492
  }
18493
- pe(te), ve(ge), ae(V), le(I), he(!0);
18493
+ pe(te), ve(ge), ae(j), le(I), he(!0);
18494
18494
  } catch (w) {
18495
18495
  console.error(w), re.error(w?.message ?? "Consent check failed");
18496
18496
  } finally {
@@ -18499,10 +18499,10 @@ function lv() {
18499
18499
  }
18500
18500
  }, cl = (w, I) => {
18501
18501
  try {
18502
- const F = localStorage.getItem(sr), V = F ? JSON.parse(F) : {};
18503
- V[String(w)] = I, localStorage.setItem(sr, JSON.stringify(V));
18504
- } catch (F) {
18505
- console.error("Failed to save consent draft", F);
18502
+ const R = localStorage.getItem(sr), j = R ? JSON.parse(R) : {};
18503
+ j[String(w)] = I, localStorage.setItem(sr, JSON.stringify(j));
18504
+ } catch (R) {
18505
+ console.error("Failed to save consent draft", R);
18506
18506
  }
18507
18507
  }, ul = () => {
18508
18508
  try {
@@ -18513,27 +18513,27 @@ function lv() {
18513
18513
  }, fl = (w) => {
18514
18514
  const I = String(ie);
18515
18515
  if (!I) return;
18516
- const F = xe.find((ge) => String(ge.id) === I);
18517
- if (!F) return;
18518
- const V = String(F.consent_form_id ?? ""), se = Ii(F);
18519
- if (!V || !se) {
18516
+ const R = xe.find((ge) => String(ge.id) === I);
18517
+ if (!R) return;
18518
+ const j = String(R.consent_form_id ?? ""), se = Ii(R);
18519
+ if (!j || !se) {
18520
18520
  re.error("Consent form/method missing.");
18521
18521
  return;
18522
18522
  }
18523
18523
  let te = "CHECKBOX_ONLY";
18524
18524
  se === "TYPED_NAME" ? te = "TYPED_NAME" : se === "DRAW_SIGNATURE" && (te = "SIGNATURE_IMAGE"), cl(I, {
18525
18525
  serviceId: I,
18526
- concentFormId: V,
18526
+ concentFormId: j,
18527
18527
  signatureType: te,
18528
18528
  typedName: w?.typedName,
18529
18529
  isChecked: w?.accepted,
18530
18530
  signatureDataUrl: w?.signatureDataUrl,
18531
18531
  emailMe: w?.emailMe
18532
- }), $n(I), he(!1), L.current = "", re.success("Consent captured.");
18532
+ }), $n(I), he(!1), B.current = "", re.success("Consent captured.");
18533
18533
  }, pl = () => {
18534
18534
  he(!1), le(null);
18535
- }, ml = async (w, I, F) => {
18536
- const V = ul(), se = Object.entries(V).map(([te, ge]) => ({
18535
+ }, ml = async (w, I, R) => {
18536
+ const j = ul(), se = Object.entries(j).map(([te, ge]) => ({
18537
18537
  serviceId: te,
18538
18538
  concentFormId: ge.concentFormId,
18539
18539
  captured: ge
@@ -18546,7 +18546,7 @@ function lv() {
18546
18546
  customerId: I,
18547
18547
  serviceId: ge,
18548
18548
  formId: Te,
18549
- staffId: F,
18549
+ staffId: R,
18550
18550
  signatureType: Jt,
18551
18551
  typedName: Le.typedName,
18552
18552
  imageUrl: Le.signatureDataUrl
@@ -18567,13 +18567,13 @@ function lv() {
18567
18567
  lastName: ye("lastName"),
18568
18568
  email: ye("email"),
18569
18569
  phone: ye("phone")
18570
- }, F = {
18570
+ }, R = {
18571
18571
  tenantId: t,
18572
18572
  outletId: r,
18573
18573
  staffId: l?.id,
18574
18574
  date: ti,
18575
18575
  startTime: h,
18576
- serviceIds: y.map((V) => V.id),
18576
+ serviceIds: y.map((j) => j.id),
18577
18577
  slotIds: c,
18578
18578
  isWalkIn: !1,
18579
18579
  requiresConsent: xe.length > 0,
@@ -18586,13 +18586,13 @@ function lv() {
18586
18586
  };
18587
18587
  try {
18588
18588
  S(!0);
18589
- const V = await e(hr(F)).unwrap(), se = V?.data ?? V, te = se.id || "", ge = se.customerId || se.customer?.id || "", Te = se.staffId || l?.id || "";
18589
+ 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
18590
  p === "booking" && Ja > 0 && await ml(te, ge, Te), q === "card" ? (k({
18591
18591
  appointmentId: te,
18592
18592
  customerId: ge
18593
18593
  }), N(!0)) : (e(nr(String(te))), e(Ge()));
18594
- } catch (V) {
18595
- const se = V?.payload?.message || V?.data?.message || V?.message || "Staff not working on this day";
18594
+ } catch (j) {
18595
+ const se = j?.payload?.message || j?.data?.message || j?.message || "Staff not working on this day";
18596
18596
  re.error(se);
18597
18597
  } finally {
18598
18598
  S(!1);
@@ -18631,12 +18631,12 @@ function lv() {
18631
18631
  }, yl = async (w) => {
18632
18632
  try {
18633
18633
  S(!0);
18634
- const I = T?.appointmentId, F = String(T?.customerId);
18634
+ const I = T?.appointmentId, R = String(T?.customerId);
18635
18635
  if (!I || !r)
18636
18636
  return re.error("Something went wrong."), !1;
18637
- const V = vl(w.number), se = await zu({
18637
+ const j = vl(w.number), se = await zu({
18638
18638
  appointmentId: I,
18639
- customerId: F,
18639
+ customerId: R,
18640
18640
  outletId: r,
18641
18641
  referenceNo: I,
18642
18642
  currency: "USD",
@@ -18652,7 +18652,7 @@ function lv() {
18652
18652
  tenderInfo: {
18653
18653
  cardHolderName: w.name,
18654
18654
  cardNumber: w.number.replace(/\s/g, ""),
18655
- cardType: V,
18655
+ cardType: j,
18656
18656
  cardExpiry: dv(w.expiry),
18657
18657
  cvData: w.cvv
18658
18658
  },
@@ -18681,8 +18681,8 @@ function lv() {
18681
18681
  }, bl = () => {
18682
18682
  N(!1), re.warning("Appointment booked. Payment was cancelled."), e(nr(String(T?.appointmentId))), e(Ge());
18683
18683
  }, $l = () => {
18684
- const w = !!Xt(Pt), I = !!wt?.trim(), F = !!ye("firstName")?.trim();
18685
- return !!(!h || !F || !w && !I || w && !or(Pt) || I && !Va(wt));
18684
+ const w = !!Xt(Pt), I = !!wt?.trim(), R = !!ye("firstName")?.trim();
18685
+ return !!(!h || !R || !w && !I || w && !or(Pt) || I && !Va(wt));
18686
18686
  }, gl = async (w) => {
18687
18687
  ri(w), e(Yt(!0));
18688
18688
  };
@@ -18698,7 +18698,7 @@ function lv() {
18698
18698
  consentRequired: xe?.length > 0,
18699
18699
  consentCompleted: Ja,
18700
18700
  totalConsents: Xa,
18701
- checkingConsent: j,
18701
+ checkingConsent: L,
18702
18702
  loading: b,
18703
18703
  isBookingDisabled: $l()
18704
18704
  })
@@ -18803,8 +18803,8 @@ function lv() {
18803
18803
  control: Oe,
18804
18804
  name: "phone",
18805
18805
  rules: { validate: (w) => {
18806
- const I = !!Xt(w), F = !!wt?.trim();
18807
- return !I && !F ? "Enter phone or email" : I && !or(w) ? "Enter valid phone number" : !0;
18806
+ const I = Xt(w), R = !!I, j = !!wt?.trim();
18807
+ 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
18808
  } },
18809
18809
  render: ({ field: w }) => /* @__PURE__ */ g("div", {
18810
18810
  className: "aaravpos-barber-input-wrapper",
@@ -18855,10 +18855,20 @@ function lv() {
18855
18855
  }),
18856
18856
  /* @__PURE__ */ u("input", {
18857
18857
  id: "email",
18858
- ...U("email", {
18858
+ minLength: 10,
18859
+ maxLength: 50,
18860
+ ...V("email", {
18861
+ minLength: {
18862
+ value: 10,
18863
+ message: "Minimum 2 characters required"
18864
+ },
18865
+ maxLength: {
18866
+ value: 50,
18867
+ message: "Email must be maximum 50 characters"
18868
+ },
18859
18869
  validate: (w) => {
18860
- const I = !!w?.trim(), F = !!Xt(Pt);
18861
- return !I && !F ? "Enter phone or email" : I && !/^\S+@\S+\.\S+$/.test(w) ? "Invalid email" : !0;
18870
+ const I = !!w?.trim(), R = !!Xt(Pt);
18871
+ return !I && !R ? "Enter phone or email" : I && !/^\S+@\S+\.\S+$/.test(w) ? "Invalid email" : !0;
18862
18872
  },
18863
18873
  onChange: (w) => {
18864
18874
  Za(w.target.value, null, "email");
@@ -18891,11 +18901,21 @@ function lv() {
18891
18901
  }),
18892
18902
  /* @__PURE__ */ u("input", {
18893
18903
  id: "first_name",
18894
- ...U("firstName", {
18904
+ minLength: 2,
18905
+ maxLength: 30,
18906
+ ...V("firstName", {
18895
18907
  required: "First name required",
18896
18908
  pattern: {
18897
18909
  value: /^[A-Za-z\s]+$/,
18898
18910
  message: "Only letters are allowed"
18911
+ },
18912
+ minLength: {
18913
+ value: 2,
18914
+ message: "Minimum 2 characters required"
18915
+ },
18916
+ maxLength: {
18917
+ value: 30,
18918
+ message: "Maximum 30 characters allowed"
18899
18919
  }
18900
18920
  }),
18901
18921
  autoComplete: "given-name",
@@ -18916,8 +18936,23 @@ function lv() {
18916
18936
  children: "Last Name"
18917
18937
  }), /* @__PURE__ */ u("input", {
18918
18938
  id: "last_name",
18939
+ minLength: 2,
18940
+ maxLength: 20,
18919
18941
  autoComplete: "family-name",
18920
- ...U("lastName"),
18942
+ ...V("lastName", {
18943
+ minLength: {
18944
+ value: 2,
18945
+ message: "Last name must be at least 2 characters"
18946
+ },
18947
+ maxLength: {
18948
+ value: 30,
18949
+ message: "Last name cannot exceed 30 characters"
18950
+ },
18951
+ pattern: {
18952
+ value: /^[A-Za-z\s]+$/,
18953
+ message: "Only letters are allowed"
18954
+ }
18955
+ }),
18921
18956
  placeholder: "Last Name",
18922
18957
  className: "aaravpos-barber-custom-input"
18923
18958
  })]