@wix/form-elements 1.98.0 → 1.99.0

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.
Files changed (106) hide show
  1. package/dist/component/{appointment-rac-BKgRKq3j.js → appointment-rac-CP8gfFze.js} +382 -385
  2. package/dist/component/{bookings-address-rac-C87x19gw.js → bookings-address-rac-CWs0gEUJ.js} +1 -1
  3. package/dist/component/{bookings-email-rac-f4nuC_pb.js → bookings-email-rac-D-HYHHg-.js} +1 -1
  4. package/dist/component/{bookings-first-name-rac-BGmuAmbu.js → bookings-first-name-rac-Sk9e2_l9.js} +1 -1
  5. package/dist/component/{bookings-header-rac-CoyxHljp.js → bookings-header-rac-idz-09i9.js} +1 -1
  6. package/dist/component/{bookings-last-name-rac-D2mBYwcR.js → bookings-last-name-rac-C4cCmRVy.js} +1 -1
  7. package/dist/component/{bookings-login-bar-rac-BH2Mi6TR.js → bookings-login-bar-rac-BdVG5M2b.js} +1 -1
  8. package/dist/component/{bookings-phone-rac-Dz78ybFV.js → bookings-phone-rac-D09RuttH.js} +1 -1
  9. package/dist/component/{bookings-rich-text-rac-8_h0cOoy.js → bookings-rich-text-rac-Ci26IHTA.js} +1 -1
  10. package/dist/component/{checkbox-field-rac-CJnegjvL.js → checkbox-field-rac-Blko_wMR.js} +4 -4
  11. package/dist/component/{checkbox-group-field-headless-CrA7Gx2Y.js → checkbox-group-field-headless-DhV4VwZq.js} +3 -3
  12. package/dist/component/{checkbox-group-field-rac-DMg75l5Q.js → checkbox-group-field-rac-BtPnVYiW.js} +3 -3
  13. package/dist/component/{checkbox-group-rac-C9XWlO5D.js → checkbox-group-rac-eyClfhOO.js} +1 -1
  14. package/dist/component/{checkbox-rac-CrqhH4z9.js → checkbox-rac-I0i6q5tn.js} +1 -1
  15. package/dist/component/{contacts-address-rac-C2mqTiPg.js → contacts-address-rac-8UPBA_Nx.js} +1 -1
  16. package/dist/component/{contacts-birthdate-rac-i7_RMona.js → contacts-birthdate-rac-BuMsx4tn.js} +1 -1
  17. package/dist/component/{contacts-company-rac-7sdIosaG.js → contacts-company-rac-C4GszTsX.js} +1 -1
  18. package/dist/component/{contacts-email-rac-CrsksJ9G.js → contacts-email-rac-BdNzRUNL.js} +1 -1
  19. package/dist/component/{contacts-first-name-rac-I5xIYxgD.js → contacts-first-name-rac-D7otJsfF.js} +1 -1
  20. package/dist/component/{contacts-last-name-rac-DnzJYJh7.js → contacts-last-name-rac-DE2dfvRQ.js} +1 -1
  21. package/dist/component/{contacts-phone-rac-Cx1jpYmv.js → contacts-phone-rac-C-P4QUzI.js} +1 -1
  22. package/dist/component/{contacts-position-rac-CxddG_cE.js → contacts-position-rac-CD_mT8at.js} +1 -1
  23. package/dist/component/{contacts-subscribe-rac-C1nTAhnd.js → contacts-subscribe-rac-CyBwegiP.js} +1 -1
  24. package/dist/component/{contacts-tax-id-rac-B1lzfrj_.js → contacts-tax-id-rac-BVwa6_pq.js} +1 -1
  25. package/dist/component/{date-availability-LN33GU7O.js → date-availability-6u7UHGAa.js} +1 -1
  26. package/dist/component/{date-input-field-rac-zTcw6Mxx.js → date-input-field-rac-Dpb3imSq.js} +98 -101
  27. package/dist/component/{date-input-rac-NfVbrcoO.js → date-input-rac-CaRUO8qF.js} +1 -1
  28. package/dist/component/date-picker-field-rac-BuZ2Vdqw.js +311 -0
  29. package/dist/component/{date-picker-rac-C5iXyKdf.js → date-picker-rac-CQ0HLYC_.js} +1 -1
  30. package/dist/component/{date-time-input-field-rac-Cp34u7cC.js → date-time-input-field-rac-D-6fSa7K.js} +101 -104
  31. package/dist/component/{date-time-input-rac-CfFd56Xf.js → date-time-input-rac-DJvGnasb.js} +1 -1
  32. package/dist/component/{dext-checkbox-group-rac-BVx7XXwR.js → dext-checkbox-group-rac-4Xv2Yx1Q.js} +2 -2
  33. package/dist/component/{dext-checkbox-rac-CmUOLx_w.js → dext-checkbox-rac-MUiHjntT.js} +1 -1
  34. package/dist/component/{dext-date-picker-rac-XDrLGVTQ.js → dext-date-picker-rac-B7V77fPs.js} +1 -1
  35. package/dist/component/{dext-date-time-input-rac-ZLCq_taK.js → dext-date-time-input-rac-LDrnt4fH.js} +1 -1
  36. package/dist/component/{dext-dropdown-rac-C74zBq3M.js → dext-dropdown-rac-BP83OElK.js} +1 -1
  37. package/dist/component/{dext-email-rac-CqS9HcdY.js → dext-email-rac-Bi9qANCo.js} +1 -1
  38. package/dist/component/{dext-number-input-rac-DszjJDT-.js → dext-number-input-rac-BU4SEily.js} +1 -1
  39. package/dist/component/{dext-phone-rac-wt7T8hpM.js → dext-phone-rac-D5s8DrCc.js} +1 -1
  40. package/dist/component/{dext-radio-group-rac-BvRnaWP0.js → dext-radio-group-rac-DaTuyxUL.js} +2 -2
  41. package/dist/component/{dext-rating-input-rac-D1Lt9M3c.js → dext-rating-input-rac-CfMKqHHZ.js} +1 -1
  42. package/dist/component/{dext-tags-rac-70YO5CJH.js → dext-tags-rac-CyFzVZFw.js} +2 -2
  43. package/dist/component/{dext-text-area-rac-CC5RCvWh.js → dext-text-area-rac-D-kfFMUj.js} +1 -1
  44. package/dist/component/{dext-text-input-rac-s487DzPW.js → dext-text-input-rac-BOFj2FyN.js} +1 -1
  45. package/dist/component/{dext-url-input-rac-DEKwUh2a.js → dext-url-input-rac-BGPDEwNb.js} +1 -1
  46. package/dist/component/{donation-rac-C2bCFVHP.js → donation-rac-BMX9KxJP.js} +5 -5
  47. package/dist/component/{dropdown-field-headless-BMWwkydq.js → dropdown-field-headless-CIXH608w.js} +4 -4
  48. package/dist/component/{dropdown-field-rac-Cw5Cbpg0.js → dropdown-field-rac-daLrun-E.js} +2 -2
  49. package/dist/component/{dropdown-rac-CEmlDY3w.js → dropdown-rac-BTYSH3Zy.js} +1 -1
  50. package/dist/component/{ecom-address-rac-Dv6asnf_.js → ecom-address-rac-BDhiTREn.js} +1 -1
  51. package/dist/component/{ecom-subscription-checkbox-rac-DOwH-Ebd.js → ecom-subscription-checkbox-rac-Dbpa4fFi.js} +2 -2
  52. package/dist/component/{email-input-field-rac-CeFXPibq.js → email-input-field-rac-BJUszqvR.js} +3 -3
  53. package/dist/component/{events-repeater-rac-BUk5Qc8n.js → events-repeater-rac-DJrTlOGT.js} +4 -4
  54. package/dist/component/{events-rsvp-rac-CtFkVzUy.js → events-rsvp-rac-DDASk2XH.js} +2 -2
  55. package/dist/component/{field-error-headless-B6x_cVEi.js → field-error-headless-DJVkE5yv.js} +1 -1
  56. package/dist/component/{field-label-headless-BibCD8xx.js → field-label-headless-CyCHxPkd.js} +1 -1
  57. package/dist/component/{file-upload-rac-BUcktluW.js → file-upload-rac-BOpYihdw.js} +3 -3
  58. package/dist/component/{fixed-payment-rac-BMSBSo5c.js → fixed-payment-rac-DFi_YPyN.js} +3 -3
  59. package/dist/component/{form-9WmwgGNc.js → form-CVz1PefD.js} +69 -69
  60. package/dist/component/form.css +1 -1
  61. package/dist/component/form.js +1 -1
  62. package/dist/component/{header-field-rac-CxUuHOic.js → header-field-rac-C2PfSwil.js} +2 -2
  63. package/dist/component/{header-rac-DejI69X7.js → header-rac-D9YqB-O1.js} +1 -1
  64. package/dist/component/{image-choice-rac-BjI5a_co.js → image-choice-rac-t_I06vvU.js} +4 -4
  65. package/dist/component/{index-Dz2hV2_S.js → index-DLjekrTD.js} +4 -4
  66. package/dist/component/{index-Csso-2QH.js → index-yjAwk9mS.js} +2 -2
  67. package/dist/component/{isObjectLike-BN_BZMhy.js → isObjectLike-Cgzv4nCC.js} +1 -1
  68. package/dist/component/{multiline-address-field-rac-CYfphmfr.js → multiline-address-field-rac-Dnjmc0tO.js} +7 -7
  69. package/dist/component/{multiline-address-rac-Ccujt2bd.js → multiline-address-rac-ByL_NcH7.js} +1 -1
  70. package/dist/component/{number-input-field-rac-CfnRCRar.js → number-input-field-rac-BPTuhBlo.js} +4 -4
  71. package/dist/component/{number-input-rac-DnTO9d8P.js → number-input-rac-hLoHm0Ul.js} +1 -1
  72. package/dist/component/{password-rac-Be_YSb-Q.js → password-rac-DYqRtXl0.js} +4 -4
  73. package/dist/component/{payment-input-rac-DXUf5iYb.js → payment-input-rac-D9WtGI5n.js} +4 -4
  74. package/dist/component/{phone-input-field-rac-DYAwLuvJ.js → phone-input-field-rac-D2Emh-lo.js} +6 -6
  75. package/dist/component/{phone-rac-BlsvDmER.js → phone-rac-B8-6Mw36.js} +1 -1
  76. package/dist/component/{product-list-rac-DdXwRSc2.js → product-list-rac-B_wLuARQ.js} +4 -4
  77. package/dist/component/{quiz-radio-group-rac-B0yiKdbu.js → quiz-radio-group-rac-CcnfdObW.js} +1 -1
  78. package/dist/component/{radio-button-module-classes-t1jsWYpT.js → radio-button-module-classes-CyZYs0BH.js} +3 -3
  79. package/dist/component/{radio-group-field-rac-Cug1TtSq.js → radio-group-field-rac-BdNA6UOq.js} +3 -3
  80. package/dist/component/{radio-group-rac-_O5T0Pt8.js → radio-group-rac-CvhHM6v5.js} +1 -1
  81. package/dist/component/{rating-input-field-rac-BSKzQ3fq.js → rating-input-field-rac-wjWNPfRZ.js} +4 -4
  82. package/dist/component/{rating-input-rac-B71q44YO.js → rating-input-rac-qqUycDFh.js} +1 -1
  83. package/dist/component/{rich-content-rac.module-BJuoKIOt.js → rich-content-rac.module-BAMOVeFc.js} +1 -1
  84. package/dist/component/{rich-text-field-rac-CiSR82Fw.js → rich-text-field-rac-DRC3nap3.js} +2 -2
  85. package/dist/component/{rich-text-rac-Bo6UBwOg.js → rich-text-rac-DPgt6Zb4.js} +1 -1
  86. package/dist/component/{service-dropdown-rac-BJ7V-g8M.js → service-dropdown-rac-C79afx6z.js} +4 -4
  87. package/dist/component/{services-multi-choice-rac-CtBcc9WH.js → services-multi-choice-rac-Dv_3PkqW.js} +5 -5
  88. package/dist/component/{signature-rac-yvrHr1he.js → signature-rac-D2NLRFu0.js} +3 -3
  89. package/dist/component/{submit-button-rac-s-JdZgq7.js → submit-button-rac-CnmlHY57.js} +1 -1
  90. package/dist/component/{tags-field-rac-g_W0RMod.js → tags-field-rac-B5v917df.js} +5 -5
  91. package/dist/component/{tags-rac-DmvIH6HU.js → tags-rac-DCUcssn5.js} +1 -1
  92. package/dist/component/{text-area-field-rac-Duja5xOA.js → text-area-field-rac-7YmznS1S.js} +4 -4
  93. package/dist/component/{text-area-rac-DzRxgG6u.js → text-area-rac-C0Yuh6D2.js} +1 -1
  94. package/dist/component/{text-input-field-rac-C2eXeoBC.js → text-input-field-rac-Bpmukqyp.js} +2 -2
  95. package/dist/component/{text-input-headless-d1WK0nqR.js → text-input-headless-Cdpzu_eE.js} +3 -3
  96. package/dist/component/{text-input-rac-DM9MnoQs.js → text-input-rac-D7zsAary.js} +1 -1
  97. package/dist/component/{time-input-rac-CxVZ3USX.js → time-input-rac-CDiPbISF.js} +4 -4
  98. package/dist/component/{url-input-field-rac-4oVJMr1a.js → url-input-field-rac-oi5ViIKm.js} +4 -4
  99. package/dist/component/{url-input-rac--T-FnskQ.js → url-input-rac-Bs8MYm-g.js} +1 -1
  100. package/dist/component/{use-dropdown-option-class-name-BFHRYpVL.js → use-dropdown-option-class-name-BqtzLp8Y.js} +1 -1
  101. package/dist/component/{use-element-state-class-name-De5YnxMK.js → use-element-state-class-name-Cego6EXH.js} +1 -1
  102. package/dist/component/{use-is-forced-open-dropdown-CWvcd9Ex.js → use-is-forced-open-dropdown-Do-gps07.js} +1 -1
  103. package/dist/component/{use-service-options-base-CD1EVWRE.js → use-service-options-base-CoXyq3zH.js} +1 -1
  104. package/dist/component/{use-text-input-class-name-BYwXccvO.js → use-text-input-class-name-BUFPGIgC.js} +2 -2
  105. package/package.json +2 -2
  106. package/dist/component/date-picker-field-rac-Cc9hJloJ.js +0 -317
@@ -1,25 +1,25 @@
1
1
  import o, { useRef as J, useState as j, useEffect as H, createContext as Ge, useContext as Ze, useMemo as P, useCallback as ie } from "react";
2
2
  import { RicosViewer as lt } from "@wix/ricos/viewer";
3
- import M from "classnames";
4
- import { ac as ce, ab as ct, ag as we, af as mt, c as ut, au as dt, at as ft, ak as me, ah as Se, am as Dt, aj as Et, F as St } from "./form-9WmwgGNc.js";
3
+ import w from "classnames";
5
4
  import { C as Ce } from "./chevron-down-icon-CcpVm6B-.js";
6
- import { E as pt } from "./error-icon-hZxQ6DEy.js";
7
- import { g as _t, c as We } from "./calendar.module-DnhTT4QT.js";
8
- import { H as fe } from "./custom-focus-class-_483Pkwp.js";
9
- import { s as De } from "./field-rac.module-DobpyqOd.js";
10
- import { C as Lt, S as yt, a as At, z as Be, i as Nt, W as It, r as Ot, j as bt, a2 as gt } from "./form-element-classes-BtKlobUX.js";
11
- import { u as Tt } from "./use-element-state-class-name-De5YnxMK.js";
12
- import { ListBox as wt, Button as ve, ListBoxItem as vt, RadioGroup as kt, RadioField as Rt, RadioButton as Mt } from "react-aria-components";
5
+ import { E as ct } from "./error-icon-hZxQ6DEy.js";
6
+ import { g as ut, c as We } from "./calendar.module-DnhTT4QT.js";
7
+ import { H as de } from "./custom-focus-class-_483Pkwp.js";
8
+ import { s as fe } from "./field-rac.module-DobpyqOd.js";
9
+ import { C as mt, S as dt, a as ft, z as Be, i as Dt, W as Et, r as St, j as pt, a2 as _t } from "./form-element-classes-BtKlobUX.js";
10
+ import { u as Lt } from "./use-element-state-class-name-Cego6EXH.js";
11
+ import { ListBox as yt, Button as he, ListBoxItem as At, RadioGroup as Nt, RadioField as gt, RadioButton as It } from "react-aria-components";
12
+ import { ac as Ee, ab as Ot, ag as ve, af as bt, c as Tt, au as ht, at as vt, ak as ce, ah as Se, am as kt, aj as Rt, F as wt } from "./form-CVz1PefD.js";
13
13
  import { f as T, a as le } from "./find-child-C60k4CxG.js";
14
- import { D as Ft, E as ht } from "./field-error-headless-B6x_cVEi.js";
15
- import { L as Ct } from "./field-label-headless-BibCD8xx.js";
14
+ import { D as Ft, E as Mt } from "./field-error-headless-DJVkE5yv.js";
15
+ import { L as Ct } from "./field-label-headless-CyCHxPkd.js";
16
16
  import { F as Wt } from "./fieldset-headless-CD3fds9J.js";
17
17
  import "date-fns";
18
18
  import { V as Ve } from "./headless-styles-CmcyA_pi.js";
19
19
  function Bt(e) {
20
20
  return { evid: 40, src: 16, endpoint: "", params: e };
21
21
  }
22
- var be = /* @__PURE__ */ (function(e) {
22
+ var Oe = /* @__PURE__ */ (function(e) {
23
23
  return e.BOOKING_NOT_INSTALL = "BOOKING_NOT_INSTALL", e.NO_AVAILABILITY_DATES_FOUND = "NO_AVAILABILITY_DATES_FOUND", e.GENERAL = "GENERAL", e;
24
24
  })({}), z = /* @__PURE__ */ (function(e) {
25
25
  return e.LOADING = "LOADING", e.DONE = "DONE", e.ERROR = "ERROR", e;
@@ -31,25 +31,25 @@ var Q = /* @__PURE__ */ (function(e) {
31
31
  return e.LOAD = "load", e.CLICK = "click", e;
32
32
  })({});
33
33
  const Ut = (e) => {
34
- var n;
34
+ var t;
35
35
  return {
36
36
  bookingsServiceId: e == null ? void 0 : e.id,
37
- formGuid: (n = e == null ? void 0 : e.form) == null ? void 0 : n.id,
37
+ formGuid: (t = e == null ? void 0 : e.form) == null ? void 0 : t.id,
38
38
  serviceProperties: xt(e)
39
39
  };
40
40
  }, xt = (e) => {
41
- var n;
41
+ var t;
42
42
  return JSON.stringify({
43
43
  serviceId: e == null ? void 0 : e.id,
44
44
  serviceType: e == null ? void 0 : e.type,
45
- locationIds: (n = e == null ? void 0 : e.locations) == null ? void 0 : n.map((t) => t.id).filter((t) => t),
45
+ locationIds: (t = e == null ? void 0 : e.locations) == null ? void 0 : t.map((n) => n.id).filter((n) => n),
46
46
  staffMemberIds: e == null ? void 0 : e.staffMemberIds,
47
47
  isOfferedAsPricingPlan: !1
48
48
  });
49
49
  }, qe = (e) => {
50
- var u;
51
- const { appointmentFieldProps: n } = ke(), { isEditor: t, isComposer: a } = ce(), s = ct(), r = e || ((u = n == null ? void 0 : n.initialData) == null ? void 0 : u.service);
52
- if (!(t || a))
50
+ var m;
51
+ const { appointmentFieldProps: t } = ke(), { isEditor: n, isComposer: a } = Ee(), s = Ot(), r = e || ((m = t == null ? void 0 : t.initialData) == null ? void 0 : m.service);
52
+ if (!(n || a))
53
53
  return {
54
54
  ...s,
55
55
  report: (i) => s == null ? void 0 : s.report(Bt({
@@ -58,10 +58,10 @@ const Ut = (e) => {
58
58
  }))
59
59
  };
60
60
  };
61
- var ge;
61
+ var be;
62
62
  (function(e) {
63
63
  e.UNDEFINED = "UNDEFINED", e.OWNER_BUSINESS = "OWNER_BUSINESS", e.OWNER_CUSTOM = "OWNER_CUSTOM", e.CUSTOM = "CUSTOM";
64
- })(ge || (ge = {}));
64
+ })(be || (be = {}));
65
65
  var Ue;
66
66
  (function(e) {
67
67
  e.UNKNOWN_REQUESTED_GENDER = "UNKNOWN_REQUESTED_GENDER", e.ANY_MALE = "ANY_MALE", e.ANY_FEMALE = "ANY_FEMALE";
@@ -79,14 +79,14 @@ var ze;
79
79
  e.ASC = "ASC", e.DESC = "DESC";
80
80
  })(ze || (ze = {}));
81
81
  const Pt = (e) => {
82
- const { service: n } = e || {};
83
- return (n == null ? void 0 : n.id) ? null : {
84
- type: be.GENERAL,
82
+ const { service: t } = e || {};
83
+ return (t == null ? void 0 : t.id) ? null : {
84
+ type: Oe.GENERAL,
85
85
  message: "Service ID is missing"
86
86
  };
87
- }, zt = ({ appointmentFieldProps: e, isEditor: n, isComposer: t }) => {
87
+ }, zt = ({ appointmentFieldProps: e, isEditor: t, isComposer: n }) => {
88
88
  const { initialData: a } = e, s = Kt();
89
- if (n || t)
89
+ if (t || n)
90
90
  return {
91
91
  ...s,
92
92
  timezone: je(),
@@ -104,36 +104,36 @@ const Pt = (e) => {
104
104
  ...s,
105
105
  dataStatus: z.LOADING
106
106
  };
107
- }, Ht = (e, n) => {
108
- const t = /* @__PURE__ */ new Date(), a = new Date(t);
107
+ }, Ht = (e, t) => {
108
+ const n = /* @__PURE__ */ new Date(), a = new Date(n);
109
109
  a.setMonth(a.getMonth() + e);
110
- const s = new Date(t.toLocaleString("en-US", {
111
- timeZone: n
110
+ const s = new Date(n.toLocaleString("en-US", {
111
+ timeZone: t
112
112
  })), r = new Date(a.toLocaleString("en-US", {
113
- timeZone: n
113
+ timeZone: t
114
114
  }));
115
115
  return {
116
116
  startDate: s,
117
117
  endDate: r
118
118
  };
119
119
  }, je = () => Intl.DateTimeFormat().resolvedOptions().timeZone, Yt = (e) => {
120
- var n, t, a;
121
- if ((t = (n = e == null ? void 0 : e[0]) == null ? void 0 : n.slot) != null && t.startDate)
120
+ var t, n, a;
121
+ if ((n = (t = e == null ? void 0 : e[0]) == null ? void 0 : t.slot) != null && n.startDate)
122
122
  return new Date((a = e[0].slot) == null ? void 0 : a.startDate);
123
- }, Kt = ({ duration: e = 60, timezone: n = "UTC" } = {}) => {
123
+ }, Kt = ({ duration: e = 60, timezone: t = "UTC" } = {}) => {
124
124
  var E, f;
125
- const t = "267d1c11-8019-4e3d-b9c6-cd2b859c69e2", a = /* @__PURE__ */ new Date(), s = [], r = [], u = a.toISOString().split("T")[0], i = 10, l = 18;
126
- let c = /* @__PURE__ */ new Date(`${u}T${i}:00:00`), d = new Date(c);
125
+ const n = "267d1c11-8019-4e3d-b9c6-cd2b859c69e2", a = /* @__PURE__ */ new Date(), s = [], r = [], m = a.toISOString().split("T")[0], i = 10, l = 18;
126
+ let c = /* @__PURE__ */ new Date(`${m}T${i}:00:00`), d = new Date(c);
127
127
  d.setMinutes(d.getMinutes() + e);
128
128
  let S = !1;
129
129
  for (; d.getHours() < l || d.getHours() === l && d.getMinutes() === 0; ) {
130
- const g = {
130
+ const b = {
131
131
  slot: {
132
- serviceId: t,
132
+ serviceId: n,
133
133
  startDate: c.toISOString(),
134
134
  endDate: d.toISOString(),
135
135
  location: {
136
- locationType: ge.CUSTOM
136
+ locationType: be.CUSTOM
137
137
  }
138
138
  },
139
139
  bookable: !0,
@@ -146,69 +146,69 @@ const Pt = (e) => {
146
146
  },
147
147
  nestedSlots: []
148
148
  };
149
- r.push(g), S || (s.push(g), S = !0), c = new Date(d), d = new Date(c), d.setMinutes(d.getMinutes() + e);
149
+ r.push(b), S || (s.push(b), S = !0), c = new Date(d), d = new Date(c), d.setMinutes(d.getMinutes() + e);
150
150
  }
151
151
  return {
152
152
  availabilitySlots: r,
153
153
  availabilityDates: s,
154
- timezone: n,
154
+ timezone: t,
155
155
  currentSlotBulkSize: V,
156
156
  selectedDate: s.length > 0 && ((f = (E = s[0]) == null ? void 0 : E.slot) != null && f.startDate) ? new Date(s[0].slot.startDate) : void 0
157
157
  };
158
158
  };
159
159
  function $t(e) {
160
160
  var f;
161
- const { initialData: n, onChange: t, value: a } = e, { isEditor: s, isComposer: r } = ce(), u = (f = n == null ? void 0 : n.service) == null ? void 0 : f.id, { actions: i } = we(), l = J(i);
161
+ const { initialData: t, onChange: n, value: a } = e, { isEditor: s, isComposer: r } = Ee(), m = (f = t == null ? void 0 : t.service) == null ? void 0 : f.id, { actions: i } = ve(), l = J(i);
162
162
  l.current = i;
163
- const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = j(null), E = qe(n == null ? void 0 : n.service);
163
+ const c = !!(i != null && i.getAvailabilityDates && (i != null && i.getAvailabilitySlots)), [d, S] = j(null), E = qe(t == null ? void 0 : t.service);
164
164
  return H(() => {
165
- u && !s && !r && c && (async () => {
165
+ m && !s && !r && c && (async () => {
166
166
  var W, A, N, Y, B;
167
- const w = je(), b = {
167
+ const h = je(), O = {
168
168
  currentSlotBulkSize: V,
169
- timezone: w,
169
+ timezone: h,
170
170
  dataStatus: z.LOADING
171
171
  };
172
172
  try {
173
173
  const U = async (oe) => {
174
174
  var v, p;
175
- const { startDate: se, endDate: $ } = Ht(oe, w);
175
+ const { startDate: se, endDate: $ } = Ht(oe, h);
176
176
  return (p = (v = l.current) == null ? void 0 : v.getAvailabilityDates) == null ? void 0 : p.call(v, {
177
- serviceId: u,
177
+ serviceId: m,
178
178
  fromDate: se,
179
179
  toDate: $,
180
- timeZone: w
180
+ timeZone: h
181
181
  });
182
182
  };
183
- if (b.availabilityDates = await U(2), (W = b.availabilityDates) != null && W.length || (b.availabilityDates = await U(6)), !((A = b.availabilityDates) != null && A.length)) {
183
+ if (O.availabilityDates = await U(2), (W = O.availabilityDates) != null && W.length || (O.availabilityDates = await U(6)), !((A = O.availabilityDates) != null && A.length)) {
184
184
  E == null || E.report({
185
185
  action: te.LOAD,
186
186
  component: Q.NO_AVAILABILITY_AT_ALL
187
187
  }), S({
188
188
  dataStatus: z.ERROR,
189
189
  error: {
190
- type: be.NO_AVAILABILITY_DATES_FOUND,
190
+ type: Oe.NO_AVAILABILITY_DATES_FOUND,
191
191
  message: "No availability dates found"
192
192
  }
193
193
  });
194
194
  return;
195
195
  }
196
- b.selectedDate = Yt(b.availabilityDates), b.selectedDate && (b.availabilitySlots = await ((Y = (N = l.current) == null ? void 0 : N.getAvailabilitySlots) == null ? void 0 : Y.call(N, {
197
- serviceId: u,
198
- timeZone: w,
199
- selectedDate: b.selectedDate
196
+ O.selectedDate = Yt(O.availabilityDates), O.selectedDate && (O.availabilitySlots = await ((Y = (N = l.current) == null ? void 0 : N.getAvailabilitySlots) == null ? void 0 : Y.call(N, {
197
+ serviceId: m,
198
+ timeZone: h,
199
+ selectedDate: O.selectedDate
200
200
  }))), E == null || E.report({
201
201
  action: te.LOAD,
202
- component: (B = b.availabilityDates) != null && B.length ? Q.FORM : Q.NO_AVAILABILITY_FOR_DATE
203
- }), a != null && a.startDate || t(void 0), S({
204
- ...b,
202
+ component: (B = O.availabilityDates) != null && B.length ? Q.FORM : Q.NO_AVAILABILITY_FOR_DATE
203
+ }), a != null && a.startDate || n(void 0), S({
204
+ ...O,
205
205
  dataStatus: z.DONE
206
206
  });
207
207
  } catch (U) {
208
208
  console.error(U), S({
209
209
  dataStatus: z.ERROR,
210
210
  error: {
211
- type: be.GENERAL,
211
+ type: Oe.GENERAL,
212
212
  message: "An error occurred in initialAppointmentState"
213
213
  }
214
214
  });
@@ -217,7 +217,7 @@ function $t(e) {
217
217
  }, [
218
218
  s,
219
219
  r,
220
- u,
220
+ m,
221
221
  c
222
222
  ]), d;
223
223
  }
@@ -225,19 +225,19 @@ const Qe = /* @__PURE__ */ Ge({
225
225
  appointmentState: {},
226
226
  setAppointmentState: () => {
227
227
  }
228
- }), Gt = ({ appointmentFieldProps: e, children: n }) => {
229
- const { isEditor: t, isComposer: a } = ce(), [s, r] = j(() => zt({
228
+ }), Gt = ({ appointmentFieldProps: e, children: t }) => {
229
+ const { isEditor: n, isComposer: a } = Ee(), [s, r] = j(() => zt({
230
230
  appointmentFieldProps: e,
231
- isEditor: t,
231
+ isEditor: n,
232
232
  isComposer: a
233
- })), u = $t(e);
233
+ })), m = $t(e);
234
234
  return H(() => {
235
- u && r({
235
+ m && r({
236
236
  ...s,
237
- ...u
237
+ ...m
238
238
  });
239
239
  }, [
240
- u
240
+ m
241
241
  ]), /* @__PURE__ */ o.createElement(Qe.Provider, {
242
242
  value: {
243
243
  appointmentFieldProps: e,
@@ -247,115 +247,115 @@ const Qe = /* @__PURE__ */ Ge({
247
247
  ...i
248
248
  })
249
249
  }
250
- }, n);
251
- }, ke = () => Ze(Qe), Zt = (e, n) => {
250
+ }, t);
251
+ }, ke = () => Ze(Qe), Zt = (e, t) => {
252
252
  if (e.startOfWeek.getMonth() === e.endOfWeek.getMonth())
253
- return new Intl.DateTimeFormat(n, {
253
+ return new Intl.DateTimeFormat(t, {
254
254
  month: "long",
255
255
  year: "numeric"
256
256
  }).format(e.endOfWeek);
257
- const t = new Intl.DateTimeFormat(n, {
257
+ const n = new Intl.DateTimeFormat(t, {
258
258
  month: "short"
259
- }).format(e.startOfWeek), a = new Intl.DateTimeFormat(n, {
259
+ }).format(e.startOfWeek), a = new Intl.DateTimeFormat(t, {
260
260
  month: "short",
261
261
  year: "numeric"
262
262
  }).format(e.endOfWeek);
263
- return `${t} - ${a}`;
263
+ return `${n} - ${a}`;
264
264
  }, Vt = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) || !(e != null && e.timeZone) ? null : {
265
265
  startDate: e == null ? void 0 : e.startDate,
266
266
  endDate: e == null ? void 0 : e.endDate,
267
267
  timeZone: e == null ? void 0 : e.timeZone
268
- }, He = ({ timezone: e, language: n, formatType: t }) => {
268
+ }, He = ({ timezone: e, language: t, formatType: n }) => {
269
269
  var s;
270
- return (s = new Intl.DateTimeFormat(n, {
270
+ return (s = new Intl.DateTimeFormat(t, {
271
271
  timeZone: e,
272
- timeZoneName: t === "name" ? "long" : "short"
272
+ timeZoneName: n === "name" ? "long" : "short"
273
273
  }).formatToParts(/* @__PURE__ */ new Date()).find(({ type: r }) => r === "timeZoneName")) == null ? void 0 : s.value;
274
- }, qt = ({ timezone: e, language: n }) => {
275
- const t = He({
274
+ }, qt = ({ timezone: e, language: t }) => {
275
+ const n = He({
276
276
  timezone: e,
277
- language: n,
277
+ language: t,
278
278
  formatType: "name"
279
279
  }), a = He({
280
280
  timezone: e,
281
- language: n,
281
+ language: t,
282
282
  formatType: "offset"
283
283
  });
284
- return `${t} (${a})`;
285
- }, ne = (e, n) => e.getFullYear() === n.getFullYear() && e.getMonth() === n.getMonth() && e.getDate() === n.getDate(), jt = (e, n) => {
286
- const t = new Date(e);
287
- t.setDate(e.getDate() - n);
284
+ return `${n} (${a})`;
285
+ }, ne = (e, t) => e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate(), jt = (e, t) => {
286
+ const n = new Date(e);
287
+ n.setDate(e.getDate() - t);
288
288
  const a = new Date(e);
289
- return a.setDate(e.getDate() + n), {
290
- fromDate: t,
289
+ return a.setDate(e.getDate() + t), {
290
+ fromDate: n,
291
291
  toDate: a
292
292
  };
293
293
  }, Qt = ({ setIsReloadingSlots: e }) => {
294
- const { appointmentFieldProps: n, appointmentState: t, setAppointmentState: a } = ke(), { value: s } = n, { actions: r } = we();
294
+ const { appointmentFieldProps: t, appointmentState: n, setAppointmentState: a } = ke(), { value: s } = t, { actions: r } = ve();
295
295
  H(() => {
296
296
  (async () => {
297
297
  var i, l;
298
- if (s != null && s.startDate && (t != null && t.selectedDate) && (t == null ? void 0 : t.dataStatus) === z.DONE && !ne(new Date(s.startDate), t == null ? void 0 : t.selectedDate)) {
298
+ if (s != null && s.startDate && (n != null && n.selectedDate) && (n == null ? void 0 : n.dataStatus) === z.DONE && !ne(new Date(s.startDate), n == null ? void 0 : n.selectedDate)) {
299
299
  e(!0);
300
- const d = new Date(s.startDate), { fromDate: S, toDate: E } = jt(d, 8), [f, g] = await Promise.all([
300
+ const d = new Date(s.startDate), { fromDate: S, toDate: E } = jt(d, 8), [f, b] = await Promise.all([
301
301
  (i = r == null ? void 0 : r.getAvailabilityDates) == null ? void 0 : i.call(r, {
302
- serviceId: n == null ? void 0 : n.initialData.service.id,
303
- timeZone: (t == null ? void 0 : t.timezone) || "",
302
+ serviceId: t == null ? void 0 : t.initialData.service.id,
303
+ timeZone: (n == null ? void 0 : n.timezone) || "",
304
304
  fromDate: S,
305
305
  toDate: E
306
306
  }),
307
307
  (l = r == null ? void 0 : r.getAvailabilitySlots) == null ? void 0 : l.call(r, {
308
- serviceId: n == null ? void 0 : n.initialData.service.id,
309
- timeZone: (t == null ? void 0 : t.timezone) || "",
308
+ serviceId: t == null ? void 0 : t.initialData.service.id,
309
+ timeZone: (n == null ? void 0 : n.timezone) || "",
310
310
  selectedDate: d
311
311
  })
312
312
  ]);
313
313
  a({
314
314
  availabilityDates: f,
315
315
  selectedDate: d,
316
- availabilitySlots: g
316
+ availabilitySlots: b
317
317
  }), e(!1);
318
318
  }
319
319
  })();
320
320
  }, [
321
321
  s,
322
- t == null ? void 0 : t.dataStatus
322
+ n == null ? void 0 : n.dataStatus
323
323
  ]);
324
- }, Jt = (e, n) => !e || !n.length ? e : e.filter((t) => {
324
+ }, Jt = (e, t) => !e || !t.length ? e : e.filter((n) => {
325
325
  var a;
326
- return !n.includes(((a = t == null ? void 0 : t.slot) == null ? void 0 : a.startDate) ?? "");
327
- }), Ee = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`, Xt = ({ locale: e, endDate: n, startDate: t, timezone: a }) => {
326
+ return !t.includes(((a = n == null ? void 0 : n.slot) == null ? void 0 : a.startDate) ?? "");
327
+ }), De = (e) => !(e != null && e.startDate) || !(e != null && e.endDate) ? "" : `${e == null ? void 0 : e.startDate}_${e == null ? void 0 : e.endDate}`, Xt = ({ locale: e, endDate: t, startDate: n, timezone: a }) => {
328
328
  const s = {
329
329
  hour: "numeric",
330
330
  minute: "numeric",
331
331
  timeZone: a
332
- }, r = new Intl.DateTimeFormat(e, s).format(new Date(t)), u = new Intl.DateTimeFormat(e, s).format(new Date(n));
333
- return `${r} - ${u}`;
334
- }, en = ({ selectedDate: e, locale: n, timezone: t }) => e ? new Intl.DateTimeFormat(n, {
332
+ }, r = new Intl.DateTimeFormat(e, s).format(new Date(n)), m = new Intl.DateTimeFormat(e, s).format(new Date(t));
333
+ return `${r} - ${m}`;
334
+ }, en = ({ selectedDate: e, locale: t, timezone: n }) => e ? new Intl.DateTimeFormat(t, {
335
335
  weekday: "long",
336
336
  month: "short",
337
337
  day: "numeric",
338
- timeZone: t
339
- }).format(e) : "", tn = (e, n) => {
340
- let t;
341
- return n.forEach((a, s) => {
342
- var r, u;
343
- Ee({
338
+ timeZone: n
339
+ }).format(e) : "", tn = (e, t) => {
340
+ let n;
341
+ return t.forEach((a, s) => {
342
+ var r, m;
343
+ De({
344
344
  startDate: (r = a == null ? void 0 : a.slot) == null ? void 0 : r.startDate,
345
- endDate: (u = a == null ? void 0 : a.slot) == null ? void 0 : u.endDate
346
- }) === e && (t = s);
347
- }), t;
345
+ endDate: (m = a == null ? void 0 : a.slot) == null ? void 0 : m.endDate
346
+ }) === e && (n = s);
347
+ }), n;
348
348
  };
349
349
  var nn = /* @__PURE__ */ (function(e) {
350
350
  return e.OS_LOCATION = "OS_LOCATION", e.CUSTOM_LOCATION = "CUSTOM_LOCATION", e;
351
351
  })({});
352
352
  const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
353
- var n;
354
- return ((n = e == null ? void 0 : e.params) == null ? void 0 : n.reason) === an;
355
- }, sn = ({ error: e, selectedSlot: n }) => {
356
- const { isExperimentEnabled: t } = mt(), a = t(ut.BIF_SLOT_HOLD), [s, r] = j(Ye), u = a && on(e), i = n == null ? void 0 : n.startDate, l = J(!1);
353
+ var t;
354
+ return ((t = e == null ? void 0 : e.params) == null ? void 0 : t.reason) === an;
355
+ }, sn = ({ error: e, selectedSlot: t }) => {
356
+ const { isExperimentEnabled: n } = bt(), a = n(Tt.BIF_SLOT_HOLD), [s, r] = j(Ye), m = a && on(e), i = t == null ? void 0 : t.startDate, l = J(!1);
357
357
  return H(() => {
358
- if (!u) {
358
+ if (!m) {
359
359
  l.current = !1;
360
360
  return;
361
361
  }
@@ -364,42 +364,42 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
364
364
  i
365
365
  ]));
366
366
  }, [
367
- u,
367
+ m,
368
368
  i
369
369
  ]), a ? s : Ye;
370
370
  }, q = 7, Te = (e) => {
371
- const n = new Date(e);
372
- return n.setHours(0, 0, 0, 0), n;
371
+ const t = new Date(e);
372
+ return t.setHours(0, 0, 0, 0), t;
373
373
  }, rn = (e) => {
374
- const n = new Date(e);
375
- return n.setHours(23, 59, 59, 999), n;
376
- }, ee = (e, n) => {
377
374
  const t = new Date(e);
378
- return t.setDate(t.getDate() + n), t;
379
- }, Ke = (e, n) => {
380
- const t = Te(e), a = (t.getDay() - n + q) % q;
381
- return ee(t, -a);
382
- }, ln = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, cn = (e, n, t) => {
383
- const a = new Intl.DateTimeFormat(t, {
375
+ return t.setHours(23, 59, 59, 999), t;
376
+ }, ee = (e, t) => {
377
+ const n = new Date(e);
378
+ return n.setDate(n.getDate() + t), n;
379
+ }, Ke = (e, t) => {
380
+ const n = Te(e), a = (n.getDay() - t + q) % q;
381
+ return ee(n, -a);
382
+ }, ln = (e) => `${e.getFullYear()}-${String(e.getMonth() + 1).padStart(2, "0")}-${String(e.getDate()).padStart(2, "0")}`, cn = (e, t, n) => {
383
+ const a = new Intl.DateTimeFormat(n, {
384
384
  month: "short",
385
385
  day: "numeric"
386
386
  });
387
- return typeof a.formatRange == "function" ? a.formatRange(e, n) : `${a.format(e)} - ${a.format(n)}`;
388
- }, mn = (e, n = []) => n.some((t) => {
387
+ return typeof a.formatRange == "function" ? a.formatRange(e, t) : `${a.format(e)} - ${a.format(t)}`;
388
+ }, un = (e, t = []) => t.some((n) => {
389
389
  var a;
390
- return !!((a = t.slot) != null && a.startDate) && ne(new Date(t.slot.startDate), e);
391
- }), un = () => {
392
- var he;
393
- const { appointmentFieldProps: e, appointmentState: n, setAppointmentState: t } = ke(), { language: a, isEditor: s, isComposer: r, isMobile: u } = ce(), { t: i } = dt(), { actions: l } = we(), c = qe(), [d, S] = j(!1), [E, f] = j(!1), [g, w] = j(), [b, W] = j();
390
+ return !!((a = n.slot) != null && a.startDate) && ne(new Date(n.slot.startDate), e);
391
+ }), mn = () => {
392
+ var Me;
393
+ const { appointmentFieldProps: e, appointmentState: t, setAppointmentState: n } = ke(), { language: a, isEditor: s, isComposer: r, isMobile: m } = Ee(), { t: i } = ht(), { actions: l } = ve(), c = qe(), [d, S] = j(!1), [E, f] = j(!1), [b, h] = j(), [O, W] = j();
394
394
  Qt({
395
395
  setIsReloadingSlots: S
396
396
  });
397
- const { onChange: A, value: N, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: v, timezone: p = "", selectedDate: L, currentSlotBulkSize: k, dataStatus: G, error: ue } = n, K = (he = B == null ? void 0 : B.service) == null ? void 0 : he.id, Z = G === z.LOADING, X = d || E, pe = !!ue, Me = sn({
397
+ const { onChange: A, value: N, target: Y, initialData: B, formatDescription: U, locationType: oe, error: se } = e, { availabilityDates: $, availabilitySlots: v, timezone: p = "", selectedDate: _, currentSlotBulkSize: k, dataStatus: G, error: ue } = t, K = (Me = B == null ? void 0 : B.service) == null ? void 0 : Me.id, Z = G === z.LOADING, X = d || E, pe = !!ue, we = sn({
398
398
  error: se,
399
399
  selectedSlot: N
400
- }), y = P(() => Jt(v, Me), [
400
+ }), L = P(() => Jt(v, we), [
401
401
  v,
402
- Me
402
+ we
403
403
  ]);
404
404
  H(() => {
405
405
  A == null || A(Vt(N));
@@ -407,43 +407,43 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
407
407
  N == null ? void 0 : N.startDate,
408
408
  N == null ? void 0 : N.endDate,
409
409
  p
410
- ]), ft((D) => {
411
- const I = D == null ? void 0 : D[Y];
412
- v != null && v.length && t({
413
- availabilitySlots: v.filter((O) => {
410
+ ]), vt((D) => {
411
+ const g = D == null ? void 0 : D[Y];
412
+ v != null && v.length && n({
413
+ availabilitySlots: v.filter((I) => {
414
414
  var R;
415
- return ((R = O == null ? void 0 : O.slot) == null ? void 0 : R.startDate) !== (I == null ? void 0 : I.startDate);
415
+ return ((R = I == null ? void 0 : I.slot) == null ? void 0 : R.startDate) !== (g == null ? void 0 : g.startDate);
416
416
  })
417
417
  });
418
418
  }), H(() => {
419
- if (y != null && y.length && k) {
420
- const D = tn(Ee(N ?? void 0), y);
421
- D && D + 1 > k && t({
419
+ if (L != null && L.length && k) {
420
+ const D = tn(De(N ?? void 0), L);
421
+ D && D + 1 > k && n({
422
422
  currentSlotBulkSize: D + 1
423
423
  });
424
- } else !(y != null && y.length) && N && (A == null || A(void 0));
424
+ } else !(L != null && L.length) && N && (A == null || A(void 0));
425
425
  }, [
426
426
  N,
427
- y,
427
+ L,
428
428
  $
429
429
  ]);
430
- const _e = P(() => _t(a), [
430
+ const _e = P(() => ut(a), [
431
431
  a
432
- ]), Fe = J(L);
432
+ ]), Fe = J(_);
433
433
  H(() => {
434
434
  const D = Fe.current;
435
- Fe.current = L, !!L && (!D || !ne(D, L)) && w(void 0);
435
+ Fe.current = _, !!_ && (!D || !ne(D, _)) && h(void 0);
436
436
  }, [
437
- L
437
+ _
438
438
  ]);
439
- const h = P(() => g ?? Ke(L ?? /* @__PURE__ */ new Date(), _e), [
440
- g,
441
- L,
439
+ const M = P(() => b ?? Ke(_ ?? /* @__PURE__ */ new Date(), _e), [
440
+ b,
441
+ _,
442
442
  _e
443
443
  ]), et = P(() => {
444
- const D = Te(/* @__PURE__ */ new Date()), I = new Intl.DateTimeFormat(a, {
445
- weekday: u ? "narrow" : "short"
446
- }), O = new Intl.DateTimeFormat(a, {
444
+ const D = Te(/* @__PURE__ */ new Date()), g = new Intl.DateTimeFormat(a, {
445
+ weekday: m ? "narrow" : "short"
446
+ }), I = new Intl.DateTimeFormat(a, {
447
447
  day: "numeric"
448
448
  }), R = new Intl.DateTimeFormat(a, {
449
449
  weekday: "long",
@@ -452,46 +452,46 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
452
452
  });
453
453
  return Array.from({
454
454
  length: q
455
- }, (re, Ie) => {
456
- const x = ee(h, Ie), Oe = !!L && ne(x, L), it = Te(x) < D;
455
+ }, (re, ge) => {
456
+ const x = ee(M, ge), Ie = !!_ && ne(x, _), it = Te(x) < D;
457
457
  return {
458
458
  key: ln(x),
459
459
  date: x,
460
- isSelected: Oe,
461
- isAvailable: !Z && !X && !Oe && mn(x, $),
462
- isDisabled: it || X && !Oe,
460
+ isSelected: Ie,
461
+ isAvailable: !Z && !X && !Ie && un(x, $),
462
+ isDisabled: it || X && !Ie,
463
463
  isToday: ne(x, D),
464
- dayOfMonthLabel: O.format(x),
465
- weekdayLabel: I.format(x),
464
+ dayOfMonthLabel: I.format(x),
465
+ weekdayLabel: g.format(x),
466
466
  label: R.format(x),
467
467
  availabilityLabel: i("form.appointment.accessibility.calendar.has-availability.aria-label")
468
468
  };
469
469
  });
470
470
  }, [
471
- h,
472
- L,
471
+ M,
472
+ _,
473
473
  $,
474
474
  Z,
475
475
  X,
476
476
  a,
477
- u,
477
+ m,
478
478
  i
479
- ]), Le = Ee(N ?? void 0) || void 0, ye = P(() => Z || d ? [] : (y ?? []).slice(0, k).flatMap((D) => {
480
- const { startDate: I, endDate: O } = D.slot ?? {};
481
- if (!I || !O)
479
+ ]), Le = De(N ?? void 0) || void 0, ye = P(() => Z || d ? [] : (L ?? []).slice(0, k).flatMap((D) => {
480
+ const { startDate: g, endDate: I } = D.slot ?? {};
481
+ if (!g || !I)
482
482
  return [];
483
- const R = Ee({
484
- startDate: I,
485
- endDate: O
483
+ const R = De({
484
+ startDate: g,
485
+ endDate: I
486
486
  });
487
487
  return [
488
488
  {
489
489
  key: R,
490
- startDate: I,
491
- endDate: O,
490
+ startDate: g,
491
+ endDate: I,
492
492
  timeRange: Xt({
493
- startDate: I,
494
- endDate: O,
493
+ startDate: g,
494
+ endDate: I,
495
495
  locale: a,
496
496
  timezone: p
497
497
  }),
@@ -499,18 +499,18 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
499
499
  }
500
500
  ];
501
501
  }), [
502
- y,
502
+ L,
503
503
  k,
504
504
  Z,
505
505
  d,
506
506
  a,
507
507
  p,
508
508
  Le
509
- ]), Ae = !d && !!(y != null && y.length) && (k || V) < y.length, Ne = h > Ke(/* @__PURE__ */ new Date(), _e), tt = ie(
509
+ ]), Ae = !d && !!(L != null && L.length) && (k || V) < L.length, Ne = M > Ke(/* @__PURE__ */ new Date(), _e), tt = ie(
510
510
  async (D) => {
511
- var I;
512
- if (!(X || L && ne(D, L))) {
513
- S(!0), A == null || A(void 0), t({
511
+ var g;
512
+ if (!(X || _ && ne(D, _))) {
513
+ S(!0), A == null || A(void 0), n({
514
514
  currentSlotBulkSize: V,
515
515
  selectedDate: D,
516
516
  availabilitySlots: void 0
@@ -519,15 +519,15 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
519
519
  component: Q.DATE
520
520
  });
521
521
  try {
522
- const O = await ((I = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : I.call(l, {
522
+ const I = await ((g = l == null ? void 0 : l.getAvailabilitySlots) == null ? void 0 : g.call(l, {
523
523
  serviceId: K,
524
524
  timeZone: p,
525
525
  selectedDate: D
526
526
  }));
527
- t({
527
+ n({
528
528
  currentSlotBulkSize: V,
529
529
  selectedDate: D,
530
- availabilitySlots: O
530
+ availabilitySlots: I
531
531
  });
532
532
  } catch {
533
533
  } finally {
@@ -538,46 +538,46 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
538
538
  // eslint-disable-next-line react-hooks/exhaustive-deps
539
539
  [
540
540
  X,
541
- L,
541
+ _,
542
542
  K,
543
543
  p,
544
544
  l,
545
545
  A,
546
546
  c
547
547
  ]
548
- ), de = J(0), nt = ie(
548
+ ), me = J(0), nt = ie(
549
549
  async (D) => {
550
550
  var re;
551
551
  if (D < 0 && !Ne)
552
552
  return;
553
- const I = h, O = ee(h, D * q);
554
- if (w(O), s || r)
553
+ const g = M, I = ee(M, D * q);
554
+ if (h(I), s || r)
555
555
  return;
556
- const R = ++de.current;
556
+ const R = ++me.current;
557
557
  f(!0), c == null || c.report({
558
558
  action: te.CLICK,
559
559
  component: Q.PAGINATION
560
560
  });
561
561
  try {
562
- const Ie = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
562
+ const ge = await ((re = l == null ? void 0 : l.getAvailabilityDates) == null ? void 0 : re.call(l, {
563
563
  serviceId: K,
564
564
  timeZone: p,
565
- fromDate: O,
566
- toDate: rn(ee(O, q - 1))
565
+ fromDate: I,
566
+ toDate: rn(ee(I, q - 1))
567
567
  }));
568
- R === de.current && t({
569
- availabilityDates: Ie
568
+ R === me.current && n({
569
+ availabilityDates: ge
570
570
  });
571
571
  } catch {
572
- R === de.current && w(I);
572
+ R === me.current && h(g);
573
573
  } finally {
574
- R === de.current && f(!1);
574
+ R === me.current && f(!1);
575
575
  }
576
576
  },
577
577
  // eslint-disable-next-line react-hooks/exhaustive-deps
578
578
  [
579
579
  Ne,
580
- h,
580
+ M,
581
581
  s,
582
582
  r,
583
583
  K,
@@ -587,17 +587,17 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
587
587
  ]
588
588
  ), at = ie(
589
589
  (D) => {
590
- const I = ye.find((re) => re.key === D);
591
- if (!I)
590
+ const g = ye.find((re) => re.key === D);
591
+ if (!g)
592
592
  return;
593
- const { startDate: O, endDate: R } = I;
593
+ const { startDate: I, endDate: R } = g;
594
594
  c == null || c.report({
595
595
  action: te.CLICK,
596
596
  component: Q.SLOT,
597
- startTime: new Date(O).valueOf(),
597
+ startTime: new Date(I).valueOf(),
598
598
  endTime: new Date(R).valueOf()
599
599
  }), A == null || A({
600
- startDate: O,
600
+ startDate: I,
601
601
  endDate: R,
602
602
  timeZone: p
603
603
  });
@@ -616,7 +616,7 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
616
616
  c == null || c.report({
617
617
  action: te.CLICK,
618
618
  component: Q.SHOW_MORE
619
- }), W(D), t({
619
+ }), W(D), n({
620
620
  currentSlotBulkSize: D + V
621
621
  });
622
622
  }, [
@@ -626,13 +626,13 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
626
626
  ]), st = ie(() => W(void 0), []), rt = P(() => {
627
627
  if (pe)
628
628
  return i("form.appointment.empty-state.notification.text");
629
- if (!Z && !d && !(y != null && y.length))
629
+ if (!Z && !d && !(L != null && L.length))
630
630
  return i("form.appointment.slots-not-found.text");
631
631
  }, [
632
632
  pe,
633
633
  Z,
634
634
  d,
635
- y == null ? void 0 : y.length,
635
+ L == null ? void 0 : L.length,
636
636
  i
637
637
  ]);
638
638
  return {
@@ -649,13 +649,13 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
649
649
  isLoading: Z,
650
650
  isRefetching: X,
651
651
  isReloadingSlots: d,
652
- weekRangeLabel: cn(h, ee(h, q - 1), a),
652
+ weekRangeLabel: cn(M, ee(M, q - 1), a),
653
653
  weekCaptionLabel: Zt({
654
- startOfWeek: h,
655
- endOfWeek: ee(h, q - 1)
654
+ startOfWeek: M,
655
+ endOfWeek: ee(M, q - 1)
656
656
  }, a),
657
657
  selectedDateLabel: en({
658
- selectedDate: L,
658
+ selectedDate: _,
659
659
  locale: a,
660
660
  timezone: p
661
661
  }),
@@ -668,7 +668,7 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
668
668
  showMoreSlotsLabel: i("form.appointment.show-more-slots.text"),
669
669
  previousWeekLabel: i("form.appointment.accessibility.calendar.previous-week.aria-label"),
670
670
  nextWeekLabel: i("form.appointment.accessibility.calendar.next-week.aria-label"),
671
- pendingFocusIndex: b,
671
+ pendingFocusIndex: O,
672
672
  consumePendingFocusIndex: st
673
673
  };
674
674
  }, Je = Ge(void 0), Xe = (e) => `${e}-timezone-note`, F = () => {
@@ -677,37 +677,37 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
677
677
  throw new Error("Appointment parts must be used inside an <Appointment> component");
678
678
  return e;
679
679
  }, Re = () => {
680
- const { disabled: e, readOnly: n } = me();
681
- return !!e || !!n;
682
- }, C = ({ children: e, className: n }) => {
683
- const { days: t, selectDate: a, weekRangeLabel: s } = F(), r = T(e, C.PreviousWeek), u = T(e, C.Heading), i = T(e, C.NextWeek), l = T(e, C.Day) ?? /* @__PURE__ */ o.createElement(C.Day, null), c = P(() => t.filter((f) => f.isSelected).map((f) => f.key), [
684
- t
685
- ]), d = Re(), S = P(() => t.filter((f) => d || f.isDisabled).map((f) => f.key), [
686
- t,
680
+ const { disabled: e, readOnly: t } = ce();
681
+ return !!e || !!t;
682
+ }, C = ({ children: e, className: t }) => {
683
+ const { days: n, selectDate: a, weekRangeLabel: s } = F(), r = T(e, C.PreviousWeek), m = T(e, C.Heading), i = T(e, C.NextWeek), l = T(e, C.Day) ?? /* @__PURE__ */ o.createElement(C.Day, null), c = P(() => n.filter((f) => f.isSelected).map((f) => f.key), [
684
+ n
685
+ ]), d = Re(), S = P(() => n.filter((f) => d || f.isDisabled).map((f) => f.key), [
686
+ n,
687
687
  d
688
688
  ]), E = (f) => {
689
689
  if (f === "all")
690
690
  return;
691
- const [g] = [
691
+ const [b] = [
692
692
  ...f
693
- ], w = t.find(({ key: b }) => b === g);
694
- w && a(w.date);
693
+ ], h = n.find(({ key: O }) => O === b);
694
+ h && a(h.date);
695
695
  };
696
696
  return /* @__PURE__ */ o.createElement("div", {
697
- className: n
698
- }, r, u, i, /* @__PURE__ */ o.createElement(wt, {
697
+ className: t
698
+ }, r, m, i, /* @__PURE__ */ o.createElement(yt, {
699
699
  "aria-label": s,
700
700
  orientation: "horizontal",
701
701
  selectionMode: "single",
702
702
  selectedKeys: c,
703
703
  disabledKeys: S,
704
704
  onSelectionChange: E
705
- }, t.map((f) => le(l, {
705
+ }, n.map((f) => le(l, {
706
706
  key: f.key,
707
707
  day: f
708
708
  }))));
709
- }, dn = ({ children: e, className: n }) => {
710
- const { changeWeek: t, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), u = Re(), i = J(null), l = J(!1);
709
+ }, dn = ({ children: e, className: t }) => {
710
+ const { changeWeek: n, canGoToPreviousWeek: a, previousWeekLabel: s, nextWeekLabel: r } = F(), m = Re(), i = J(null), l = J(!1);
711
711
  return H(() => {
712
712
  var S, E, f;
713
713
  if (a || !l.current)
@@ -717,45 +717,45 @@ const an = "SLOT_UNAVAILABLE", Ye = [], on = (e) => {
717
717
  if (c !== document.body && c !== i.current)
718
718
  return;
719
719
  const d = ((E = (S = i.current) == null ? void 0 : S.closest("fieldset")) == null ? void 0 : E.querySelectorAll("button")) ?? [];
720
- (f = Array.from(d).find((g) => g.getAttribute("aria-label") === r)) == null || f.focus();
720
+ (f = Array.from(d).find((b) => b.getAttribute("aria-label") === r)) == null || f.focus();
721
721
  }, [
722
722
  a,
723
723
  r
724
- ]), /* @__PURE__ */ o.createElement(ve, {
724
+ ]), /* @__PURE__ */ o.createElement(he, {
725
725
  ref: i,
726
- className: n,
726
+ className: t,
727
727
  "aria-label": s,
728
- isDisabled: !a || u,
728
+ isDisabled: !a || m,
729
729
  onPress: () => {
730
- l.current = !0, t(-1);
730
+ l.current = !0, n(-1);
731
731
  }
732
732
  }, e ?? "‹");
733
- }, fn = ({ children: e, className: n }) => {
734
- const { changeWeek: t, nextWeekLabel: a } = F(), s = Re();
735
- return /* @__PURE__ */ o.createElement(ve, {
736
- className: n,
733
+ }, fn = ({ children: e, className: t }) => {
734
+ const { changeWeek: n, nextWeekLabel: a } = F(), s = Re();
735
+ return /* @__PURE__ */ o.createElement(he, {
736
+ className: t,
737
737
  "aria-label": a,
738
738
  isDisabled: s,
739
- onPress: () => t(1)
739
+ onPress: () => n(1)
740
740
  }, e ?? "›");
741
- }, Dn = ({ children: e, className: n }) => {
742
- const { weekCaptionLabel: t, weekRangeLabel: a } = F();
741
+ }, Dn = ({ children: e, className: t }) => {
742
+ const { weekCaptionLabel: n, weekRangeLabel: a } = F();
743
743
  return /* @__PURE__ */ o.createElement("span", {
744
- className: n,
744
+ className: t,
745
745
  "aria-live": "polite"
746
746
  }, e ? e({
747
- label: t,
747
+ label: n,
748
748
  weekRange: a
749
749
  }) : /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
750
750
  "aria-hidden": "true"
751
- }, t), /* @__PURE__ */ o.createElement("span", {
751
+ }, n), /* @__PURE__ */ o.createElement("span", {
752
752
  style: Ve
753
753
  }, a)));
754
- }, En = ({ children: e, className: n, ...t }) => {
755
- const { day: a } = t;
756
- return /* @__PURE__ */ o.createElement(vt, {
754
+ }, En = ({ children: e, className: t, ...n }) => {
755
+ const { day: a } = n;
756
+ return /* @__PURE__ */ o.createElement(At, {
757
757
  id: a.key,
758
- className: n,
758
+ className: t,
759
759
  textValue: a.label,
760
760
  "aria-label": a.isAvailable ? `${a.label}, ${a.availabilityLabel}` : a.label,
761
761
  "data-available": a.isAvailable || void 0,
@@ -769,21 +769,21 @@ C.PreviousWeek = dn;
769
769
  C.Heading = Dn;
770
770
  C.NextWeek = fn;
771
771
  C.Day = En;
772
- const $e = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) => {
773
- const { hasTimezoneNote: a } = t, { slots: s, selectedSlotKey: r, selectSlot: u, selectedDateLabel: i, isReloadingSlots: l, timezoneLabel: c, pendingFocusIndex: d, consumePendingFocusIndex: S } = F(), { id: E, disabled: f, readOnly: g, required: w, hasError: b } = me(), { inputId: W, labelId: A, ariaDescribedBy: N } = Se(), Y = J(null), B = `${W}-slots-label`, U = T(e, ae.Label), oe = T(e, ae.Slot) ?? /* @__PURE__ */ o.createElement(ae.Slot, null), se = !!U && !!i, $ = [
772
+ const $e = 'input[type="radio"]', ae = ({ children: e, className: t, ...n }) => {
773
+ const { hasTimezoneNote: a } = n, { slots: s, selectedSlotKey: r, selectSlot: m, selectedDateLabel: i, isReloadingSlots: l, timezoneLabel: c, pendingFocusIndex: d, consumePendingFocusIndex: S } = F(), { id: E, disabled: f, readOnly: b, required: h, hasError: O } = ce(), { inputId: W, labelId: A, ariaDescribedBy: N } = Se(), Y = J(null), B = `${W}-slots-label`, U = T(e, ae.Label), oe = T(e, ae.Slot) ?? /* @__PURE__ */ o.createElement(ae.Slot, null), se = !!U && !!i, $ = [
774
774
  N,
775
775
  a && c ? Xe(W) : void 0
776
776
  ].filter(Boolean).join(" ") || void 0, v = (p) => {
777
- var L, k, G;
778
- (G = (k = (L = Y.current) == null ? void 0 : L.querySelectorAll($e)) == null ? void 0 : k[p]) == null || G.focus();
777
+ var _, k, G;
778
+ (G = (k = (_ = Y.current) == null ? void 0 : _.querySelectorAll($e)) == null ? void 0 : k[p]) == null || G.focus();
779
779
  };
780
- return Dt(() => {
780
+ return kt(() => {
781
781
  var G, ue;
782
782
  if (!!((G = Y.current) != null && G.querySelector($e))) {
783
783
  v(0);
784
784
  return;
785
785
  }
786
- const L = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []), k = L.find((K) => K.getAttribute("aria-selected") === "true") ?? L.find((K) => K.getAttribute("aria-disabled") !== "true");
786
+ const _ = Array.from(((ue = document.getElementById(W)) == null ? void 0 : ue.querySelectorAll('[role="option"]')) ?? []), k = _.find((K) => K.getAttribute("aria-selected") === "true") ?? _.find((K) => K.getAttribute("aria-disabled") !== "true");
787
787
  k == null || k.focus();
788
788
  }, E), H(() => {
789
789
  d !== void 0 && (v(d), S());
@@ -793,15 +793,15 @@ const $e = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) =>
793
793
  ]), /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("div", {
794
794
  role: "status",
795
795
  style: Ve
796
- }, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(kt, {
796
+ }, s.length > 0 ? i : void 0), /* @__PURE__ */ o.createElement(Nt, {
797
797
  ref: Y,
798
- className: n,
798
+ className: t,
799
799
  value: r ?? null,
800
- onChange: u,
800
+ onChange: m,
801
801
  isDisabled: f,
802
- isReadOnly: g,
803
- isRequired: w,
804
- isInvalid: b,
802
+ isReadOnly: b,
803
+ isRequired: h,
804
+ isInvalid: O,
805
805
  "aria-labelledby": se ? B : A,
806
806
  "aria-describedby": $,
807
807
  "data-refetch": l || void 0
@@ -811,41 +811,41 @@ const $e = 'input[type="radio"]', ae = ({ children: e, className: n, ...t }) =>
811
811
  key: p.key,
812
812
  slot: p
813
813
  }))));
814
- }, Sn = ({ children: e, className: n, ...t }) => {
815
- const { selectedDateLabel: a } = F(), { labelId: s } = t;
814
+ }, Sn = ({ children: e, className: t, ...n }) => {
815
+ const { selectedDateLabel: a } = F(), { labelId: s } = n;
816
816
  return a ? /* @__PURE__ */ o.createElement("div", {
817
817
  id: s,
818
- className: n
818
+ className: t
819
819
  }, e ? e({
820
820
  label: a
821
821
  }) : a) : null;
822
- }, pn = ({ children: e, className: n, ...t }) => {
823
- const { slot: a } = t;
824
- return /* @__PURE__ */ o.createElement(Rt, {
822
+ }, pn = ({ children: e, className: t, ...n }) => {
823
+ const { slot: a } = n;
824
+ return /* @__PURE__ */ o.createElement(gt, {
825
825
  value: a.key,
826
826
  "aria-label": a.timeRange
827
- }, /* @__PURE__ */ o.createElement(Mt, {
828
- className: n
827
+ }, /* @__PURE__ */ o.createElement(It, {
828
+ className: t
829
829
  }, e ? e(a) : a.timeRange));
830
830
  };
831
831
  ae.Label = Sn;
832
832
  ae.Slot = pn;
833
- const m = ({ children: e, className: n }) => {
834
- const t = me(), { id: a, FieldLayout: s } = t, { labelId: r, inputId: u, ariaDescribedBy: i } = Se(), l = Et(St.APPOINTMENT), c = P(() => ({
835
- ...t,
833
+ const u = ({ children: e, className: t }) => {
834
+ const n = ce(), { id: a, FieldLayout: s } = n, { labelId: r, inputId: m, ariaDescribedBy: i } = Se(), l = Rt(wt.APPOINTMENT), c = P(() => ({
835
+ ...n,
836
836
  initialData: l,
837
- inputId: u,
837
+ inputId: m,
838
838
  ariaLabelledBy: r,
839
839
  ariaDescribedBy: i,
840
840
  fieldId: a
841
841
  }), [
842
- t,
842
+ n,
843
843
  l,
844
- u,
844
+ m,
845
845
  r,
846
846
  i,
847
847
  a
848
- ]), d = T(e, m.Label), S = T(e, m.Description), E = T(e, m.Error);
848
+ ]), d = T(e, u.Label), S = T(e, u.Description), E = T(e, u.Error);
849
849
  return /* @__PURE__ */ o.createElement(s, {
850
850
  fieldId: a,
851
851
  renderLabel: () => le(d, {
@@ -854,162 +854,159 @@ const m = ({ children: e, className: n }) => {
854
854
  renderInput: () => /* @__PURE__ */ o.createElement(Gt, {
855
855
  appointmentFieldProps: c
856
856
  }, /* @__PURE__ */ o.createElement(Ln, {
857
- className: n
857
+ className: t
858
858
  }, e)),
859
859
  renderDescription: () => /* @__PURE__ */ o.createElement(o.Fragment, null, E, S)
860
860
  });
861
861
  }, _n = {
862
862
  visibility: "hidden"
863
- }, Ln = ({ children: e, className: n }) => {
864
- const { required: t, onFocus: a, onBlur: s } = me(), { inputId: r, labelId: u, ariaDescribedBy: i } = Se(), l = un(), c = T(e, m.Loader), d = T(e, m.Notification), S = T(e, m.Dates), E = T(e, m.Timezone), f = T(e, m.Format), g = T(e, m.Slots), w = T(e, m.ShowMoreSlots);
863
+ }, Ln = ({ children: e, className: t }) => {
864
+ const { required: n, onFocus: a, onBlur: s } = ce(), { inputId: r, labelId: m, ariaDescribedBy: i } = Se(), l = mn(), c = T(e, u.Loader), d = T(e, u.Notification), S = T(e, u.Dates), E = T(e, u.Timezone), f = T(e, u.Format), b = T(e, u.Slots), h = T(e, u.ShowMoreSlots);
865
865
  return /* @__PURE__ */ o.createElement(Je.Provider, {
866
866
  value: l
867
867
  }, /* @__PURE__ */ o.createElement(Wt, {
868
868
  id: r,
869
- className: n,
870
- ariaLabelledBy: u,
869
+ className: t,
870
+ ariaLabelledBy: m,
871
871
  ariaDescribedBy: i,
872
- required: t,
872
+ required: n,
873
873
  onFocus: a,
874
874
  onBlur: s
875
875
  }, c, l.hasError ? d : /* @__PURE__ */ o.createElement("div", {
876
876
  style: l.isLoading ? _n : void 0
877
- }, S, E, f, le(g, {
877
+ }, S, E, f, le(b, {
878
878
  hasTimezoneNote: !!E
879
- }), d, w)));
880
- }, yn = ({ children: e, className: n }) => {
881
- const { isLoading: t, isRefetching: a } = F();
882
- return !t && !a ? null : /* @__PURE__ */ o.createElement("div", {
883
- className: n,
879
+ }), d, h)));
880
+ }, yn = ({ children: e, className: t }) => {
881
+ const { isLoading: n, isRefetching: a } = F();
882
+ return !n && !a ? null : /* @__PURE__ */ o.createElement("div", {
883
+ className: t,
884
884
  role: "status",
885
885
  "aria-live": "polite",
886
- "data-initial": t || void 0,
887
- "data-refetch": !t && a || void 0
886
+ "data-initial": n || void 0,
887
+ "data-refetch": !n && a || void 0
888
888
  }, e);
889
- }, An = ({ children: e, className: n }) => {
890
- const { notificationMessage: t } = F();
891
- return t ? /* @__PURE__ */ o.createElement("div", {
892
- className: n,
889
+ }, An = ({ children: e, className: t }) => {
890
+ const { notificationMessage: n } = F();
891
+ return n ? /* @__PURE__ */ o.createElement("div", {
892
+ className: t,
893
893
  role: "status"
894
894
  }, e ? e({
895
- message: t
896
- }) : t) : null;
897
- }, Nn = ({ children: e, className: n }) => {
898
- const { timezoneLabel: t } = F(), { inputId: a } = Se();
899
- return t ? /* @__PURE__ */ o.createElement("span", {
895
+ message: n
896
+ }) : n) : null;
897
+ }, Nn = ({ children: e, className: t }) => {
898
+ const { timezoneLabel: n } = F(), { inputId: a } = Se();
899
+ return n ? /* @__PURE__ */ o.createElement("span", {
900
900
  id: Xe(a),
901
- className: n
901
+ className: t
902
902
  }, e ? e({
903
- label: t
904
- }) : t) : null;
905
- }, In = ({ children: e, className: n }) => {
906
- const { formatLabel: t } = F();
907
- return t ? /* @__PURE__ */ o.createElement("span", {
908
- className: n
903
+ label: n
904
+ }) : n) : null;
905
+ }, gn = ({ children: e, className: t }) => {
906
+ const { formatLabel: n } = F();
907
+ return n ? /* @__PURE__ */ o.createElement("span", {
908
+ className: t
909
909
  }, e ? e({
910
- label: t
911
- }) : t) : null;
912
- }, On = ({ children: e, className: n }) => {
913
- const { hasMoreSlots: t, showMoreSlots: a, showMoreSlotsLabel: s } = F(), { disabled: r, readOnly: u } = me();
914
- return t ? /* @__PURE__ */ o.createElement(ve, {
915
- className: n,
916
- isDisabled: !!r || !!u,
910
+ label: n
911
+ }) : n) : null;
912
+ }, In = ({ children: e, className: t }) => {
913
+ const { hasMoreSlots: n, showMoreSlots: a, showMoreSlotsLabel: s } = F(), { disabled: r, readOnly: m } = ce();
914
+ return n ? /* @__PURE__ */ o.createElement(he, {
915
+ className: t,
916
+ isDisabled: !!r || !!m,
917
917
  onPress: a
918
918
  }, e ? e({
919
919
  label: s
920
920
  }) : s) : null;
921
921
  };
922
- m.Label = Ct;
923
- m.Loader = yn;
924
- m.Notification = An;
925
- m.Dates = C;
926
- m.Timezone = Nn;
927
- m.Format = In;
928
- m.Slots = ae;
929
- m.ShowMoreSlots = On;
930
- m.Description = Ft;
931
- m.Error = ht;
932
- const bn = "_appointment_1ndw3_1", gn = "_dates_1ndw3_5", Tn = "_weekHeading_1ndw3_26", wn = "_weekButton_1ndw3_35", vn = "_previousWeek_1ndw3_67", kn = "_nextWeek_1ndw3_71", Rn = "_day_1ndw3_83", Mn = "_weekdayLabel_1ndw3_95", Fn = "_indicator_1ndw3_107", hn = "_hint_1ndw3_130", Cn = "_slots_1ndw3_143", Wn = "_slotsMobile_1ndw3_152", Bn = "_slotsLabel_1ndw3_156", Un = "_slot_1ndw3_143", xn = "_slotHover_1ndw3_195", Pn = "_slotSelected_1ndw3_203", zn = "_showMoreSlots_1ndw3_257", Hn = "_loader_1ndw3_287", Yn = "_notification_1ndw3_323", _ = {
933
- appointment: bn,
934
- dates: gn,
922
+ u.Label = Ct;
923
+ u.Loader = yn;
924
+ u.Notification = An;
925
+ u.Dates = C;
926
+ u.Timezone = Nn;
927
+ u.Format = gn;
928
+ u.Slots = ae;
929
+ u.ShowMoreSlots = In;
930
+ u.Description = Ft;
931
+ u.Error = Mt;
932
+ const On = "_appointment_14hug_1", bn = "_dates_14hug_6", Tn = "_weekHeading_14hug_27", hn = "_weekButton_14hug_36", vn = "_previousWeek_14hug_68", kn = "_nextWeek_14hug_72", Rn = "_day_14hug_84", wn = "_weekdayLabel_14hug_96", Fn = "_indicator_14hug_108", Mn = "_hint_14hug_131", Cn = "_slots_14hug_144", Wn = "_slotsLabel_14hug_159", Bn = "_slot_14hug_144", Un = "_slotHover_14hug_198", xn = "_slotSelected_14hug_206", Pn = "_showMoreSlots_14hug_260", zn = "_loader_14hug_290", Hn = "_notification_14hug_326", y = {
933
+ appointment: On,
934
+ dates: bn,
935
935
  weekHeading: Tn,
936
- weekButton: wn,
936
+ weekButton: hn,
937
937
  previousWeek: vn,
938
938
  nextWeek: kn,
939
939
  day: Rn,
940
- weekdayLabel: Mn,
940
+ weekdayLabel: wn,
941
941
  indicator: Fn,
942
- hint: hn,
942
+ hint: Mn,
943
943
  slots: Cn,
944
- slotsMobile: Wn,
945
- slotsLabel: Bn,
946
- slot: Un,
947
- slotHover: xn,
948
- slotSelected: Pn,
949
- showMoreSlots: zn,
950
- loader: Hn,
951
- notification: Yn
952
- }, Kn = ({ content: e, locale: n }) => /* @__PURE__ */ o.createElement(lt, {
944
+ slotsLabel: Wn,
945
+ slot: Bn,
946
+ slotHover: Un,
947
+ slotSelected: xn,
948
+ showMoreSlots: Pn,
949
+ loader: zn,
950
+ notification: Hn
951
+ }, Yn = ({ content: e, locale: t }) => /* @__PURE__ */ o.createElement(lt, {
953
952
  content: e,
954
- locale: n
955
- }), $n = {
956
- base: _.slot,
957
- selected: _.slotSelected,
958
- hover: _.slotHover
959
- }, Gn = () => {
960
- const { isMobile: e } = ce(), n = Tt({
961
- globalClasses: gt,
962
- moduleClasses: $n
953
+ locale: t
954
+ }), Kn = {
955
+ base: y.slot,
956
+ selected: y.slotSelected,
957
+ hover: y.slotHover
958
+ }, $n = () => {
959
+ const e = Lt({
960
+ globalClasses: _t,
961
+ moduleClasses: Kn
963
962
  });
964
- return /* @__PURE__ */ o.createElement(m, {
965
- className: _.appointment
966
- }, /* @__PURE__ */ o.createElement(m.Label, {
967
- className: M(Lt, De.label)
968
- }, /* @__PURE__ */ o.createElement(m.Label.Required, {
969
- className: M(yt, De.requiredMark)
970
- })), /* @__PURE__ */ o.createElement(m.Loader, {
971
- className: _.loader
972
- }), /* @__PURE__ */ o.createElement(m.Dates, {
973
- className: M(At, _.dates)
974
- }, /* @__PURE__ */ o.createElement(m.Dates.PreviousWeek, {
975
- className: M(fe, _.weekButton, _.previousWeek)
976
- }, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Heading, {
977
- className: _.weekHeading
978
- }), /* @__PURE__ */ o.createElement(m.Dates.NextWeek, {
979
- className: M(fe, _.weekButton, _.nextWeek)
980
- }, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(m.Dates.Day, {
981
- className: M(fe, We.day, _.day)
963
+ return /* @__PURE__ */ o.createElement(u, {
964
+ className: y.appointment
965
+ }, /* @__PURE__ */ o.createElement(u.Label, {
966
+ className: w(mt, fe.label)
967
+ }, /* @__PURE__ */ o.createElement(u.Label.Required, {
968
+ className: w(dt, fe.requiredMark)
969
+ })), /* @__PURE__ */ o.createElement(u.Loader, {
970
+ className: y.loader
971
+ }), /* @__PURE__ */ o.createElement(u.Dates, {
972
+ className: w(ft, y.dates)
973
+ }, /* @__PURE__ */ o.createElement(u.Dates.PreviousWeek, {
974
+ className: w(de, y.weekButton, y.previousWeek)
975
+ }, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(u.Dates.Heading, {
976
+ className: y.weekHeading
977
+ }), /* @__PURE__ */ o.createElement(u.Dates.NextWeek, {
978
+ className: w(de, y.weekButton, y.nextWeek)
979
+ }, /* @__PURE__ */ o.createElement(Ce, null)), /* @__PURE__ */ o.createElement(u.Dates.Day, {
980
+ className: w(de, We.day, y.day)
982
981
  }, (t) => /* @__PURE__ */ o.createElement(o.Fragment, null, /* @__PURE__ */ o.createElement("span", {
983
- className: _.weekdayLabel
982
+ className: y.weekdayLabel
984
983
  }, t.weekdayLabel), /* @__PURE__ */ o.createElement("span", {
985
984
  className: We.dayNumber
986
985
  }, t.dayOfMonthLabel, /* @__PURE__ */ o.createElement("span", {
987
- className: _.indicator
988
- }))))), /* @__PURE__ */ o.createElement(m.Timezone, {
989
- className: M(Be, _.hint)
990
- }), /* @__PURE__ */ o.createElement(m.Format, {
991
- className: M(Be, _.hint)
992
- }), /* @__PURE__ */ o.createElement(m.Slots, {
993
- className: M(_.slots, {
994
- [_.slotsMobile]: e
995
- })
996
- }, /* @__PURE__ */ o.createElement(m.Slots.Label, {
997
- className: M(Nt, _.slotsLabel)
998
- }), /* @__PURE__ */ o.createElement(m.Slots.Slot, {
999
- className: ({ isSelected: t, isHovered: a, isDisabled: s, isReadOnly: r }) => n({
986
+ className: y.indicator
987
+ }))))), /* @__PURE__ */ o.createElement(u.Timezone, {
988
+ className: w(Be, y.hint)
989
+ }), /* @__PURE__ */ o.createElement(u.Format, {
990
+ className: w(Be, y.hint)
991
+ }), /* @__PURE__ */ o.createElement(u.Slots, {
992
+ className: y.slots
993
+ }, /* @__PURE__ */ o.createElement(u.Slots.Label, {
994
+ className: w(Dt, y.slotsLabel)
995
+ }), /* @__PURE__ */ o.createElement(u.Slots.Slot, {
996
+ className: ({ isSelected: t, isHovered: n, isDisabled: a, isReadOnly: s }) => e({
1000
997
  isSelected: t,
1001
- isHovered: a && !t && !s && !r
998
+ isHovered: n && !t && !a && !s
1002
999
  })
1003
- }, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(m.Notification, {
1004
- className: _.notification
1005
- }), /* @__PURE__ */ o.createElement(m.ShowMoreSlots, {
1006
- className: M(It, fe, _.showMoreSlots)
1007
- }), /* @__PURE__ */ o.createElement(m.Error, {
1008
- className: M(Ot, De.error)
1009
- }, /* @__PURE__ */ o.createElement(pt, null), /* @__PURE__ */ o.createElement(m.Error.Text, null)), /* @__PURE__ */ o.createElement(m.Description, {
1010
- className: M(bt, De.description)
1011
- }, Kn));
1012
- }, ua = () => /* @__PURE__ */ o.createElement(Gn, null);
1000
+ }, (t) => t.timeRange)), /* @__PURE__ */ o.createElement(u.Notification, {
1001
+ className: y.notification
1002
+ }), /* @__PURE__ */ o.createElement(u.ShowMoreSlots, {
1003
+ className: w(Et, de, y.showMoreSlots)
1004
+ }), /* @__PURE__ */ o.createElement(u.Error, {
1005
+ className: w(St, fe.error)
1006
+ }, /* @__PURE__ */ o.createElement(ct, null), /* @__PURE__ */ o.createElement(u.Error.Text, null)), /* @__PURE__ */ o.createElement(u.Description, {
1007
+ className: w(pt, fe.description)
1008
+ }, Yn));
1009
+ }, ua = () => /* @__PURE__ */ o.createElement($n, null);
1013
1010
  export {
1014
1011
  ua as AppointmentRAC
1015
1012
  };