@nylas/react 1.1.0-canary.18 → 1.1.0-canary.20

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 (133) hide show
  1. package/dist/{add-circle-icon_2.entry-3b13ee64.js → add-circle-icon_2.entry-5cefae99.js} +5 -5
  2. package/dist/{add-circle-icon_2.entry-3091976b.cjs → add-circle-icon_2.entry-85523420.cjs} +1 -1
  3. package/dist/{archive-icon_7.entry-8932618a.js → archive-icon_7.entry-2f418a3e.js} +13 -13
  4. package/dist/{archive-icon_7.entry-c2b6d860.cjs → archive-icon_7.entry-eb90a353.cjs} +1 -1
  5. package/dist/arrow-icon.entry-753eb942.js +15 -0
  6. package/dist/{arrow-icon.entry-a159bee8.cjs → arrow-icon.entry-ac5e1a47.cjs} +1 -1
  7. package/dist/{bold-icon_3.entry-447d0537.js → bold-icon_3.entry-18507c82.js} +4 -4
  8. package/dist/{bold-icon_3.entry-c51e1af3.cjs → bold-icon_3.entry-4fff7400.cjs} +1 -1
  9. package/dist/button-component_4.entry-3c508e3b.js +115 -0
  10. package/dist/button-component_4.entry-f8ab53dc.cjs +1 -0
  11. package/dist/calendar-agenda-fill-icon_35.entry-b56841a0.cjs +7 -0
  12. package/dist/calendar-agenda-fill-icon_35.entry-db989ce0.js +4182 -0
  13. package/dist/{calendar-cancel-icon.entry-a78f27bc.js → calendar-cancel-icon.entry-31caeae1.js} +1 -1
  14. package/dist/{calendar-cancel-icon.entry-805febcc.cjs → calendar-cancel-icon.entry-d2e10dfc.cjs} +1 -1
  15. package/dist/{calendar-check-icon_2.entry-7c8b6c92.js → calendar-check-icon_2.entry-7f67c003.js} +1 -1
  16. package/dist/{calendar-check-icon_2.entry-4a0fd7bd.cjs → calendar-check-icon_2.entry-d32551e9.cjs} +1 -1
  17. package/dist/{calendar-icon.entry-96f9727f.js → calendar-icon.entry-6e89816b.js} +1 -1
  18. package/dist/{calendar-icon.entry-1fc018b4.cjs → calendar-icon.entry-f3f1c623.cjs} +1 -1
  19. package/dist/{chevron-icon_3.entry-25d90239.js → chevron-icon_3.entry-2e20a83e.js} +37 -34
  20. package/dist/chevron-icon_3.entry-3be68846.cjs +1 -0
  21. package/dist/{clock-icon_2.entry-2406c3d0.cjs → clock-icon_2.entry-074eb053.cjs} +1 -1
  22. package/dist/{clock-icon_2.entry-c1b22ed4.js → clock-icon_2.entry-bc938936.js} +5 -5
  23. package/dist/{constants-f34b9c6e-f1c4dd0d.js → constants-7ce66b44-3952e81c.js} +484 -383
  24. package/dist/{constants-f34b9c6e-b774916c.cjs → constants-7ce66b44-a6b777d4.cjs} +5 -5
  25. package/dist/copy-icon_4.entry-187edab9.js +45 -0
  26. package/dist/copy-icon_4.entry-f704b2f1.cjs +1 -0
  27. package/dist/{document-refresh-icon.entry-570f9c9d.js → document-refresh-icon.entry-9d7900d7.js} +5 -5
  28. package/dist/document-refresh-icon.entry-ea0e1ab9.cjs +1 -0
  29. package/dist/elements/index.d.ts +14 -0
  30. package/dist/{elements-dc5b338e-cafa7a55.js → elements-dc5b338e-e6271e48.js} +1 -1
  31. package/dist/{elements-dc5b338e-550a6cb1.cjs → elements-dc5b338e-edf63aa6.cjs} +1 -1
  32. package/dist/{focus-visible-e8093c16-022799ce.js → focus-visible-e8093c16-4c45967c.js} +1 -1
  33. package/dist/{focus-visible-e8093c16-c14162e8.cjs → focus-visible-e8093c16-84e41b3b.cjs} +1 -1
  34. package/dist/{forward-icon_6.entry-55752b23.cjs → forward-icon_6.entry-4cb6eb63.cjs} +3 -3
  35. package/dist/{forward-icon_6.entry-9b832146.js → forward-icon_6.entry-949d0cfb.js} +9 -9
  36. package/dist/{globe-icon.entry-2b61820e.js → globe-icon.entry-04b35395.js} +2 -2
  37. package/dist/{globe-icon.entry-dabe7b8b.cjs → globe-icon.entry-741f8ad4.cjs} +1 -1
  38. package/dist/google-logo-icon_4.entry-8e87cf66.cjs +1 -0
  39. package/dist/google-logo-icon_4.entry-f50de25f.js +598 -0
  40. package/dist/index-53420959-507f0a27.js +5 -0
  41. package/dist/index-53420959-e6c2e510.cjs +1 -0
  42. package/dist/{index-6d9eeb53-3049fc04.cjs → index-6d9eeb53-8b16e3b5.cjs} +1 -1
  43. package/dist/{index-6d9eeb53-3edef246.js → index-6d9eeb53-b15263de.js} +2 -2
  44. package/dist/index-a4831dfe.cjs +42 -0
  45. package/dist/{index-812162da.js → index-a68236be.js} +874 -854
  46. package/dist/{index.es-9cc0eb3c-0c99c055.cjs → index.es-9cc0eb3c-2e0f7d11.cjs} +1 -1
  47. package/dist/{index.es-9cc0eb3c-52226859.js → index.es-9cc0eb3c-e6c5dd2d.js} +1 -1
  48. package/dist/{info-icon_2.entry-5f6b9af8.cjs → info-icon_2.entry-c3468951.cjs} +1 -1
  49. package/dist/{info-icon_2.entry-2fe6c16c.js → info-icon_2.entry-d0270899.js} +8 -8
  50. package/dist/{input-dropdown_2.entry-dbdb5aa3.cjs → input-dropdown_2.entry-2485dcc3.cjs} +1 -1
  51. package/dist/{input-dropdown_2.entry-dbd0d6f4.js → input-dropdown_2.entry-2cd6cfc7.js} +3 -3
  52. package/dist/{loading-icon.entry-e179f122.cjs → loading-icon.entry-5ed52afe.cjs} +1 -1
  53. package/dist/loading-icon.entry-96d9d1be.js +15 -0
  54. package/dist/{mailbox-store-64b4ef7c-22a6c565.js → mailbox-store-64b4ef7c-7c793d9a.js} +2 -2
  55. package/dist/{mailbox-store-64b4ef7c-0eac526c.cjs → mailbox-store-64b4ef7c-c609ac6d.cjs} +1 -1
  56. package/dist/multi-select-dropdown.entry-2ca73c71.js +91 -0
  57. package/dist/multi-select-dropdown.entry-f298ca2c.cjs +1 -0
  58. package/dist/{nylas-booked-event-card_10.entry-e0990f5b.js → nylas-booked-event-card_10.entry-2b01df7e.js} +267 -235
  59. package/dist/nylas-booked-event-card_10.entry-97977ac7.cjs +1 -0
  60. package/dist/{nylas-custom-booking-flow.entry-898c8cc9.cjs → nylas-custom-booking-flow.entry-05b9522a.cjs} +1 -1
  61. package/dist/{nylas-custom-booking-flow.entry-bc64af5f.js → nylas-custom-booking-flow.entry-66beff43.js} +3 -3
  62. package/dist/{nylas-form-card.entry-c564b52e.js → nylas-form-card.entry-3de9f477.js} +11 -11
  63. package/dist/{nylas-form-card.entry-0c71f4fc.cjs → nylas-form-card.entry-3e1331c9.cjs} +1 -1
  64. package/dist/{nylas-if-state.entry-e9486e12.js → nylas-if-state.entry-a0689083.js} +3 -3
  65. package/dist/{nylas-if-state.entry-ff6a2046.cjs → nylas-if-state.entry-a734df46.cjs} +1 -1
  66. package/dist/{nylas-list-folders.entry-0258af1e.js → nylas-list-folders.entry-4fb9d4c2.js} +7 -7
  67. package/dist/{nylas-list-folders.entry-90716d2b.cjs → nylas-list-folders.entry-74a56187.cjs} +1 -1
  68. package/dist/{nylas-list-threads.entry-21edf012.cjs → nylas-list-threads.entry-0addc621.cjs} +1 -1
  69. package/dist/{nylas-list-threads.entry-1abcdd30.js → nylas-list-threads.entry-9a6d4c33.js} +3 -3
  70. package/dist/{nylas-login.entry-2e0ce95e.cjs → nylas-login.entry-bdac29c0.cjs} +1 -1
  71. package/dist/{nylas-login.entry-ba7383ac.js → nylas-login.entry-beb6e0d9.js} +3 -3
  72. package/dist/{nylas-mailbox-pagination.entry-f6186560.js → nylas-mailbox-pagination.entry-1d71850a.js} +2 -2
  73. package/dist/{nylas-mailbox-pagination.entry-ba6beb08.cjs → nylas-mailbox-pagination.entry-c5d07bbe.cjs} +1 -1
  74. package/dist/{nylas-mailbox-toolbar-button.entry-0875aadb.cjs → nylas-mailbox-toolbar-button.entry-7d9d6293.cjs} +1 -1
  75. package/dist/{nylas-mailbox-toolbar-button.entry-e18059b0.js → nylas-mailbox-toolbar-button.entry-882c97a0.js} +10 -10
  76. package/dist/{nylas-mailbox.entry-bb2905bf.cjs → nylas-mailbox.entry-94eb97ec.cjs} +1 -1
  77. package/dist/{nylas-mailbox.entry-2e3815ed.js → nylas-mailbox.entry-d810adba.js} +4 -4
  78. package/dist/{nylas-provider.entry-51c5cdbf.cjs → nylas-provider.entry-5a4bb86e.cjs} +1 -1
  79. package/dist/{nylas-provider.entry-69ee5061.js → nylas-provider.entry-fcaf9e1c.js} +39 -39
  80. package/dist/{nylas-scheduler-editor.entry-d4a9afb1.js → nylas-scheduler-editor.entry-1ca566d3.js} +138 -119
  81. package/dist/nylas-scheduler-editor.entry-30597812.cjs +2 -0
  82. package/dist/nylas-scheduling.entry-00c418c8.cjs +1 -0
  83. package/dist/{nylas-scheduling.entry-f82a2822.js → nylas-scheduling.entry-aefefe3d.js} +52 -52
  84. package/dist/{nylas-threads-refresh.entry-72482d2f.js → nylas-threads-refresh.entry-a85222e2.js} +10 -10
  85. package/dist/{nylas-threads-refresh.entry-99001756.cjs → nylas-threads-refresh.entry-f3b9fdf2.cjs} +1 -1
  86. package/dist/nylas-threads-search.entry-2c8ac7dc.cjs +1 -0
  87. package/dist/{nylas-threads-search.entry-c5fe50e5.js → nylas-threads-search.entry-b1bf455b.js} +17 -17
  88. package/dist/{nylas-time-window-picker.entry-ccffcf2b.cjs → nylas-time-window-picker.entry-3a34b29b.cjs} +1 -1
  89. package/dist/{nylas-time-window-picker.entry-0d93e7cc.js → nylas-time-window-picker.entry-6d664a05.js} +2 -2
  90. package/dist/{nylas-view-thread.entry-58432a52.cjs → nylas-view-thread.entry-bf6cab2a.cjs} +1 -1
  91. package/dist/{nylas-view-thread.entry-2d34b41c.js → nylas-view-thread.entry-ddcb042f.js} +6 -6
  92. package/dist/play-icon_2.entry-4f316c3d.cjs +1 -0
  93. package/dist/play-icon_2.entry-d55a018a.js +25 -0
  94. package/dist/react.cjs +1 -1
  95. package/dist/react.js +115 -101
  96. package/dist/{refresh-icon.entry-a041136d.js → refresh-icon.entry-0fdcb7af.js} +4 -4
  97. package/dist/{refresh-icon.entry-1e670732.cjs → refresh-icon.entry-99761cb6.cjs} +1 -1
  98. package/dist/{register-component-a5a9ca5d-b68b6039.cjs → register-component-a5a9ca5d-4439e573.cjs} +1 -1
  99. package/dist/{register-component-a5a9ca5d-a5c01c35.js → register-component-a5a9ca5d-ddae10b3.js} +1 -1
  100. package/dist/{scheduler-config-store-4a50a03d-ee42ff96.js → scheduler-config-store-9ccfba4d-84025740.js} +8 -6
  101. package/dist/scheduler-config-store-9ccfba4d-b774bfee.cjs +1 -0
  102. package/dist/{scheduler-store-f02ce045-23a14e3f.js → scheduler-store-8a400448-8ab7b63e.js} +125 -96
  103. package/dist/scheduler-store-8a400448-eaa566fa.cjs +1 -0
  104. package/dist/{textarea-component.entry-1b4c771b.js → textarea-component.entry-193d29fd.js} +7 -6
  105. package/dist/{textarea-component.entry-24a830c1.cjs → textarea-component.entry-359e4665.cjs} +1 -1
  106. package/dist/{translate-icon.entry-44bde57b.js → translate-icon.entry-22a3e72e.js} +2 -2
  107. package/dist/{translate-icon.entry-0c0add25.cjs → translate-icon.entry-32ec36de.cjs} +1 -1
  108. package/dist/{warning-icon.entry-8956cba2.js → warning-icon.entry-8d9b59c0.js} +5 -5
  109. package/dist/{warning-icon.entry-9a77ab01.cjs → warning-icon.entry-b8d483e1.cjs} +1 -1
  110. package/package.json +3 -3
  111. package/dist/arrow-icon.entry-1f54c377.js +0 -15
  112. package/dist/button-component.entry-52ccb6d9.js +0 -16
  113. package/dist/button-component.entry-e79b2d08.cjs +0 -1
  114. package/dist/calendar-info-icon_28.entry-2054703c.cjs +0 -1
  115. package/dist/calendar-info-icon_28.entry-e7bebd13.js +0 -2083
  116. package/dist/chevron-icon_3.entry-7bd4a4b5.cjs +0 -1
  117. package/dist/document-refresh-icon.entry-a0293858.cjs +0 -1
  118. package/dist/google-logo-icon_4.entry-60c0d39a.cjs +0 -1
  119. package/dist/google-logo-icon_4.entry-a0dc33da.js +0 -467
  120. package/dist/index-53420959-67beefed.js +0 -5
  121. package/dist/index-53420959-d3254a34.cjs +0 -1
  122. package/dist/index-e3e9b594.cjs +0 -42
  123. package/dist/input-component.entry-1195d579.js +0 -45
  124. package/dist/input-component.entry-2b6e44c4.cjs +0 -1
  125. package/dist/loading-icon.entry-027a2ad1.js +0 -15
  126. package/dist/nylas-booked-event-card_10.entry-84f64ba5.cjs +0 -1
  127. package/dist/nylas-scheduler-editor.entry-923b8566.cjs +0 -2
  128. package/dist/nylas-scheduling.entry-54f1a5e9.cjs +0 -1
  129. package/dist/nylas-threads-search.entry-462527fd.cjs +0 -1
  130. package/dist/play-icon_2.entry-1ea3fd6b.cjs +0 -1
  131. package/dist/play-icon_2.entry-d08adf17.js +0 -25
  132. package/dist/scheduler-config-store-4a50a03d-884e6df8.cjs +0 -1
  133. package/dist/scheduler-store-f02ce045-42e3647c.cjs +0 -1
@@ -1,29 +1,29 @@
1
- import { r as m, c as d, d as c, h as n, H as h, g as ae, l as V, z as ne, A as ie, C as u, D as oe, E as S, F as se } from "./index-812162da.js";
2
- import { R as y } from "./register-component-a5a9ca5d-a5c01c35.js";
3
- import { T as _, g as re, L as q } from "./constants-f34b9c6e-f1c4dd0d.js";
4
- import { s as z } from "./index-6d9eeb53-3edef246.js";
5
- import "./index-53420959-67beefed.js";
1
+ import { r as g, c as h, d, h as a, H as u, g as ae, l as G, z as ne, A as ie, C as x, D as oe, E as S, F as se } from "./index-a68236be.js";
2
+ import { R as C } from "./register-component-a5a9ca5d-ddae10b3.js";
3
+ import { T as _, g as re, L as V } from "./constants-7ce66b44-3952e81c.js";
4
+ import { s as z } from "./index-6d9eeb53-b15263de.js";
5
+ import "./index-53420959-507f0a27.js";
6
6
  import "react";
7
7
  import "react-dom";
8
8
  const le = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;padding:8px;font-family:var(--nylas-font-family);font-weight:600;height:48px;line-height:24px}sp-button.cancel{color:var(--nylas-error)}sp-button.cancel:hover,sp-button.cancel:focus{border-color:var(--nylas-error)}sp-button.cancel:active{color:var(--nylas-error-pressed);border-color:var(--nylas-error-pressed)}sp-button.reschedule:hover,sp-button.reschedule:focus{border-color:var(--nylas-primary)}sp-button.reschedule:active{border-color:var(--nylas-base-600)}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ce = le;
9
- var de = function(e, t, i, o) {
10
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
9
+ var de = function(e, t, i, s) {
10
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
11
11
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
12
- a = Reflect.decorate(e, t, i, o);
12
+ n = Reflect.decorate(e, t, i, s);
13
13
  else
14
14
  for (var l = e.length - 1; l >= 0; l--)
15
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
16
- return s > 3 && a && Object.defineProperty(t, i, a), a;
15
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
16
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
17
17
  }, B = function(e, t) {
18
18
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
19
19
  return Reflect.metadata(e, t);
20
20
  };
21
21
  const W = class {
22
22
  constructor(e) {
23
- m(this, e), this.cancelBookingButtonClicked = d(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = d(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = d(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = d(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
24
- var s;
25
- const t = new Date(this.selectedTimeslot.start_time), i = (s = this.configSettings) == null ? void 0 : s.scheduler.min_cancellation_notice, o = t.getTime() - i * 60 * 1e3;
26
- t.getTime() < o ? this.cancelBookedEventValidationError.emit({
23
+ g(this, e), this.cancelBookingButtonClicked = h(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = h(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = h(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = h(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
24
+ var o, n;
25
+ const t = new Date(this.selectedTimeslot.start_time), i = (n = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : n.min_cancellation_notice;
26
+ t.getTime() - i * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime() ? this.cancelBookedEventValidationError.emit({
27
27
  error: {
28
28
  title: "Cancellation Error",
29
29
  message: `You cannot cancel the booking within ${i} minutes of the event.`
@@ -43,35 +43,36 @@ const W = class {
43
43
  default:
44
44
  return "";
45
45
  }
46
- }, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.configSettings = void 0;
46
+ }, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.configSettings = void 0, this.isLoading = void 0;
47
47
  }
48
48
  connectedCallback() {
49
49
  }
50
50
  disconnectedCallback() {
51
51
  }
52
52
  async componentWillLoad() {
53
- c("[nylas-booked-event-card] Component will load");
53
+ d("[nylas-booked-event-card] Component will load");
54
54
  }
55
55
  async componentDidLoad() {
56
- c("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.');
56
+ d("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.');
57
57
  }
58
58
  render() {
59
- var e, t, i, o, s, a, r, l, b, f, v, k, x, C, g, p, w, $, A, Z, G;
60
- return n(h, { key: "25f461e554d352c8b62341f77c84d61521a40472", part: "nbec" }, n("sp-theme", { key: "fa7ae9d97b3c334d71a64076bd6c5787b48b124b", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "731d9d89bfc2f63b8a1095ea671f39d1a99dc4a4", class: "booked-event-timezone" }, n("globe-icon", { key: "e7a7d73d7c9461f34145ddf3e99bf5640b39ab56" }), _[this.selectedTimezone]), n("div", { key: "dbb07cac45a1528a2633119af6050a630f8df173", class: "event-card-wrapper", part: "nbec__card" }, n("div", { key: "79b6b636707f8e867358da1b4340e6f0bfeb386e", class: "calendar-icon" }, n("calendar-check-icon", { key: "a268b01ecbf64976dc61c9e3c66a67cade9d2227" })), n("div", { key: "52c4c97407582b05bfb87e1379930f7cf149c013", class: "booked-event-header" }, n("h2", { key: "ed4631c601b4920b20c27d158063dcbef92084d4", slot: "card-title", part: "nbec__title" }, "Booking ", this.rescheduleBookingId ? "rescheduled" : "confirmed", "!"), n("div", { key: "f5e93f73c4828764cb7e27cc3d5ab2b761e66fdc", part: "nbec__description" }, ((e = this.getOrganizer(this.eventInfo)) == null ? void 0 : e.name) || ((t = this.getOrganizer(this.eventInfo)) == null ? void 0 : t.email), " & ", ((o = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : o.name) || ((a = (s = this.bookingInfo) == null ? void 0 : s.primaryParticipant) == null ? void 0 : a.email))), n("sp-divider", { key: "d9f14eeb24c4935f131edebb3102ffd69d2bde43" }), n("div", { key: "57f6f7877162eb8de8898d6523dac452b3c841e9", class: "booking-date-time" }, n("checkmark-circle-icon", { key: "5bd672ae7c70b0102d6a14e2761b8ecc222ce488" }), n("h3", { key: "5e8ca582a26a51f790ca111648381a10f8ef917c" }, "Booking date and time"), n("p", { key: "0b98f73c94add678003f63cd1e59352f7acd29b3" }, new Date((r = this.selectedTimeslot) == null ? void 0 : r.start_time).toLocaleDateString(void 0, { dateStyle: "full" }), " ", n("br", { key: "cc2a50917760651ca2e015fa22f264740b545a58" }), new Date((l = this.selectedTimeslot) == null ? void 0 : l.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((b = this.selectedTimeslot) == null ? void 0 : b.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), n("div", { key: "5ccf1dbc6002c9eaf60b3bd9211e590ab9135d68", class: "booking-participants" }), n("sp-divider", { key: "7ff9b9f4fa4bfc19da47d358ddda325b13b1a465" }), n("div", { key: "2c3d69854b255864cca3782a9ad87175a18d8cf9", class: {
59
+ var e, t, i, s, o, n, r, l, p, b, c, f, m, v, y, k, w, $, A, q, Z;
60
+ return a(u, { key: "64a71090c3bb639b725195733562ad0e25a10eba", part: "nbec" }, a("sp-theme", { key: "6c8b9a6502507836aba5d3a358681b4fb55178a5", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "f49b01cfe925800eafd90eb1d31f5585fc43b595", class: "booked-event-timezone" }, a("globe-icon", { key: "a222a15cfeaccfc969c51eecff485bfcce18f611" }), _[this.selectedTimezone]), a("div", { key: "490c2bdea9b10c878a1746ae47e444c5ef32e07e", class: "event-card-wrapper", part: "nbec__card" }, a("div", { key: "d6e61e4633441e3d13f9560afc43622322b79e9f", class: "calendar-icon" }, a("calendar-check-icon", { key: "e761a870d25ef7c965b9c4520c44c37f55111e5d" })), a("div", { key: "0dbed416d1fcd1678fa2935c25ed96cc2e1a1c26", class: "booked-event-header" }, a("h2", { key: "7c485fa82b8cd30f6e589783b03413785b9597dc", slot: "card-title", part: "nbec__title" }, "Booking ", this.rescheduleBookingId && !this.isLoading ? "rescheduled" : "confirmed", "!"), a("div", { key: "17c4d9ad8338947d9c3e30043f0882d141576e88", part: "nbec__description" }, ((e = this.getOrganizer(this.eventInfo)) == null ? void 0 : e.name) || ((t = this.getOrganizer(this.eventInfo)) == null ? void 0 : t.email), " & ", ((s = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : s.name) || ((n = (o = this.bookingInfo) == null ? void 0 : o.primaryParticipant) == null ? void 0 : n.email))), a("sp-divider", { key: "c6adc37a2d0b96a4ae5f6922aadcabaa67cc10b6" }), a("div", { key: "c453be3d82ddad511771d7fd6944f0f772b7993c", class: "booking-date-time" }, a("checkmark-circle-icon", { key: "2ce7f0be037e54193904ea02c839dce1690de8d3" }), a("h3", { key: "8dad8e71df17003b3989a77fee4b03d5d6c10a54" }, "Booking date and time"), a("p", { key: "8bca1fab69c83e87e22a683ee248c9dd8864efb5" }, new Date((r = this.selectedTimeslot) == null ? void 0 : r.start_time).toLocaleDateString(void 0, { dateStyle: "full" }), " ", a("br", { key: "56e5d95797fedd1169943b8af1c119290a90a75e" }), new Date((l = this.selectedTimeslot) == null ? void 0 : l.start_time).toLocaleTimeString(void 0, { timeStyle: "short" }), " -", " ", new Date((p = this.selectedTimeslot) == null ? void 0 : p.end_time).toLocaleTimeString(void 0, { timeStyle: "short" }))), a("div", { key: "58b916f387d02bb74a39ae6d9775ad2db131e9b7", class: "booking-participants" }), a("sp-divider", { key: "be8f4ca081787cd2856a92672668f4f80dd18a74" }), a("div", { key: "09d6315a3d1ff768f03f1dea70c7de630ce2e5f6", class: {
61
61
  footer: !0,
62
- "no-footer": ((v = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : v.hide_cancellation_options) && ((x = (k = this.configSettings) == null ? void 0 : k.scheduler) == null ? void 0 : x.hide_rescheduling_options),
63
- "no-template-cols": ((g = (C = this.configSettings) == null ? void 0 : C.scheduler) == null ? void 0 : g.hide_cancellation_options) || ((w = (p = this.configSettings) == null ? void 0 : p.scheduler) == null ? void 0 : w.hide_rescheduling_options)
64
- } }, !((A = ($ = this.configSettings) == null ? void 0 : $.scheduler) != null && A.hide_cancellation_options) && n("sp-button", { variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, "Cancel booking"), !((G = (Z = this.configSettings) == null ? void 0 : Z.scheduler) != null && G.hide_rescheduling_options) && n("sp-button", { variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, "Reschedule")))));
62
+ "no-footer": ((c = (b = this.configSettings) == null ? void 0 : b.scheduler) == null ? void 0 : c.hide_cancellation_options) && ((m = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : m.hide_rescheduling_options),
63
+ "no-template-cols": ((y = (v = this.configSettings) == null ? void 0 : v.scheduler) == null ? void 0 : y.hide_cancellation_options) || ((w = (k = this.configSettings) == null ? void 0 : k.scheduler) == null ? void 0 : w.hide_rescheduling_options)
64
+ } }, !((A = ($ = this.configSettings) == null ? void 0 : $.scheduler) != null && A.hide_cancellation_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "cancel", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, "Cancel booking"), !((Z = (q = this.configSettings) == null ? void 0 : q.scheduler) != null && Z.hide_rescheduling_options) && a("sp-button", { variant: "secondary", treatment: "outline", class: "reschedule", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, "Reschedule")))));
65
65
  }
66
66
  };
67
67
  de([
68
- y({
68
+ C({
69
69
  name: "nylas-booked-event-card",
70
70
  stateToProps: /* @__PURE__ */ new Map([
71
71
  ["scheduler.bookingInfo", "bookingInfo"],
72
72
  ["scheduler.rescheduleBookingId", "rescheduleBookingId"],
73
73
  ["scheduler.selectedTimezone", "selectedTimezone"],
74
74
  ["scheduler.selectedTimeslot", "selectedTimeslot"],
75
+ ["scheduler.isLoading", "isLoading"],
75
76
  ["scheduler.configSettings", "configSettings"]
76
77
  ]),
77
78
  eventToProps: {
@@ -79,8 +80,8 @@ de([
79
80
  t.scheduler.setCancel(e.detail.bookingId);
80
81
  },
81
82
  rescheduleButtonClicked: async (e, t) => {
82
- const i = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: o } = e.detail;
83
- o && (!i || "error" in i) && o(i);
83
+ const i = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
84
+ s && (!i || "error" in i) && s(i);
84
85
  }
85
86
  },
86
87
  fireRegisterEvent: !0
@@ -90,25 +91,25 @@ de([
90
91
  B("design:returntype", void 0)
91
92
  ], W.prototype, "render", null);
92
93
  W.style = ce;
93
- const be = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}.guest-email-input{position:relative;display:flex;width:100%}', fe = be;
94
- var he = function(e, t, i, o) {
95
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
94
+ const fe = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%;font-family:var(--nylas-font-family);font-size:16px;font-weight:600;border:none;height:48px;padding:14px}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover,sp-button:focus{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-700);outline:1px solid var(--nylas-base-300)}sp-button.back:hover,sp-button.back:focus{outline-color:var(--nylas-primary)}sp-button.back:active{outline:2px solid var(--nylas-base-600)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover,sp-button.book:focus{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}.guest-email-input{position:relative;display:flex;width:100%}', be = fe;
95
+ var he = function(e, t, i, s) {
96
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
96
97
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
97
- a = Reflect.decorate(e, t, i, o);
98
+ n = Reflect.decorate(e, t, i, s);
98
99
  else
99
100
  for (var l = e.length - 1; l >= 0; l--)
100
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
101
- return s > 3 && a && Object.defineProperty(t, i, a), a;
101
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
102
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
102
103
  }, L = function(e, t) {
103
104
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
104
105
  return Reflect.metadata(e, t);
105
106
  };
106
107
  const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, U = class {
107
108
  constructor(e) {
108
- m(this, e), this.nameChanged = d(this, "nameChanged", 7), this.emailChanged = d(this, "emailChanged", 7), this.backButtonClicked = d(this, "backButtonClicked", 7), this.detailsConfirmed = d(this, "detailsConfirmed", 7), this.bookingFormError = d(this, "bookingFormError", 7), this.bookingFormSubmitted = d(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, i) => {
109
+ g(this, e), this.nameChanged = h(this, "nameChanged", 7), this.emailChanged = h(this, "emailChanged", 7), this.backButtonClicked = h(this, "backButtonClicked", 7), this.detailsConfirmed = h(this, "detailsConfirmed", 7), this.bookingFormError = h(this, "bookingFormError", 7), this.bookingFormSubmitted = h(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, i) => {
109
110
  this.resetGuestEmailError(t);
110
- const o = [...this.guestEmails];
111
- o[t] = z(i), this.guestEmails = [...o];
111
+ const s = [...this.guestEmails];
112
+ s[t] = z(i), this.guestEmails = [...s];
112
113
  }, this.handleGuestBlur = (t, i) => {
113
114
  if (this.resetGuestEmailError(t), i === "") {
114
115
  this.guestEmailErrors[t] = "Email is required";
@@ -123,65 +124,64 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
123
124
  t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
124
125
  }, this.removeGuestButtonClickHandler = (t, i) => {
125
126
  t.preventDefault(), this.resetGuestEmailError(i);
126
- const o = [...this.guestEmails];
127
- o.splice(i, 1), this.guestEmails = [...o];
127
+ const s = [...this.guestEmails];
128
+ s.splice(i, 1), this.guestEmails = [...s];
128
129
  }, this.handleBackButtonClicked = () => {
129
130
  this.backButtonClicked.emit();
130
131
  }, this.bookButtonClickedHandler = async (t) => {
131
- var l, b, f, v, k, x, C;
132
+ var l, p, b, c, f, m, v;
132
133
  if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
133
134
  return;
134
- c("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
135
- const o = this.name || ((b = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : b.name), s = this.email || ((v = (f = this.bookingInfo) == null ? void 0 : f.primaryParticipant) == null ? void 0 : v.email);
136
- if (!o || o === "") {
135
+ d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
136
+ const s = this.name || ((p = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : p.name), o = this.email || ((c = (b = this.bookingInfo) == null ? void 0 : b.primaryParticipant) == null ? void 0 : c.email);
137
+ if (!s || s === "") {
137
138
  this.isNameValid = !1, this.validationError.name = "Name is required", this.bookingFormError.emit({
138
139
  title: "Booking form error",
139
140
  description: "Name is required"
140
141
  });
141
142
  return;
142
143
  }
143
- if (!s || s === "") {
144
+ if (!o || o === "") {
144
145
  this.isEmailValid = !1, this.validationError.email = "Email is required", this.bookingFormError.emit({
145
146
  title: "Booking form error",
146
147
  description: "Email is required"
147
148
  });
148
149
  return;
149
150
  }
150
- if (!E.test(s)) {
151
+ if (!E.test(o)) {
151
152
  this.isEmailValid = !1, this.validationError.email = "Enter a valid email address", this.bookingFormError.emit({
152
153
  title: "Booking form error",
153
154
  description: "Invalid email"
154
155
  });
155
156
  return;
156
157
  }
157
- let a = [];
158
+ let n = [];
158
159
  if (this.guestEmails.length > 0) {
159
- let g = !1;
160
- if (this.guestEmails.forEach((p, w) => {
161
- p === "" ? (g = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Email is required" }) : E.test(p) || (g = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Enter a valid email address" });
162
- }), g) {
160
+ let y = !1;
161
+ if (this.guestEmails.forEach((k, w) => {
162
+ k === "" ? (y = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Email is required" }) : E.test(k) || (y = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [w]: "Enter a valid email address" });
163
+ }), y) {
163
164
  this.bookingFormError.emit({
164
165
  title: "Booking form error",
165
166
  description: "Invalid guest email"
166
167
  });
167
168
  return;
168
169
  }
169
- a = this.guestEmails.map((p) => ({ name: p.trim(), email: p.trim() }));
170
+ n = this.guestEmails.map((k) => ({ name: k.trim(), email: k.trim() }));
170
171
  } else
171
- (k = this.bookingInfo) != null && k.guests && (a = (x = this.bookingInfo) == null ? void 0 : x.guests);
172
- const r = ((C = this.bookingInfo) == null ? void 0 : C.additionalFields) || [];
172
+ (f = this.bookingInfo) != null && f.guests && (n = (m = this.bookingInfo) == null ? void 0 : m.guests);
173
+ const r = ((v = this.bookingInfo) == null ? void 0 : v.additionalFields) || [];
173
174
  this.detailsConfirmed.emit({
174
175
  primaryParticipant: {
175
- name: o,
176
- email: s
176
+ name: s,
177
+ email: o
177
178
  },
178
- guests: a,
179
- additionalFields: [...r, ...this.additionalFields]
179
+ guests: n,
180
+ additionalFields: { ...r, ...this.additionalFields }
180
181
  });
181
- }, this.updateAdditionalFields = (t, i, o) => {
182
- const s = this.additionalFields.findIndex((a) => a.name === t);
183
- s > -1 ? this.additionalFields[s].value = i : this.additionalFields.push({ name: t, value: i, type: o || "text" });
184
- }, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.configSettings = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.additionalFields = [], this.validationError = { name: "", email: "" };
182
+ }, this.updateAdditionalFields = (t, i) => {
183
+ this.additionalFields && (this.additionalFields[t] = i);
184
+ }, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.configSettings = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.additionalFields = {}, this.validationError = { name: "", email: "" };
185
185
  }
186
186
  connectedCallback() {
187
187
  }
@@ -189,7 +189,7 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
189
189
  }
190
190
  componentWillLoad() {
191
191
  var e, t, i;
192
- c("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (i = this.bookingInfo.primaryParticipant) == null ? void 0 : i.email);
192
+ d("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (i = this.bookingInfo.primaryParticipant) == null ? void 0 : i.email);
193
193
  }
194
194
  bookingInfoChangedHandler(e) {
195
195
  e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
@@ -220,10 +220,9 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
220
220
  });
221
221
  return;
222
222
  }
223
- this.updateAdditionalFields(e.detail.label, e.detail.value, e.detail.type);
223
+ this.updateAdditionalFields(e.detail.label, e.detail.value);
224
224
  break;
225
225
  }
226
- e.detail.name === "name" ? this.changeName(e.detail.value) : e.detail.name === "email" && this.changeEmail(e.detail.value);
227
226
  }
228
227
  selectOptionChangedHandler(e) {
229
228
  if (e.detail.error) {
@@ -233,31 +232,49 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
233
232
  });
234
233
  return;
235
234
  }
236
- this.updateAdditionalFields(e.detail.label, e.detail.value, "dropdown");
235
+ this.updateAdditionalFields(e.detail.label, e.detail.value);
237
236
  }
238
237
  switchToggledHandler(e) {
239
- this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false", "checkbox");
238
+ this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false");
240
239
  }
241
240
  checkboxToggledHandler(e) {
242
- this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false", "checkbox");
241
+ this.updateAdditionalFields(e.detail.label, e.detail.checked ? "true" : "false");
242
+ }
243
+ radioChangedHandler(e) {
244
+ this.updateAdditionalFields(e.detail.label || e.detail.name, e.detail.value);
243
245
  }
244
246
  render() {
245
- var e, t, i, o, s, a;
246
- return n(h, { key: "1b81fd4591cd90c85a578a8d957ed561e457cba5" }, n("form", { key: "4a4fef983332d1752ccf44823620ec2b906bf71e", onSubmit: (r) => this.bookButtonClickedHandler(r), noValidate: !0 }, n("div", { key: "e55ebf5bb6fbb5175e6175d06ce0e0a5266962cf", class: "nylas-booking-form" }, n("div", { key: "d50d5fdbc7b68b3c54098a6dde600ed52c607eed", class: "input-wrapper" }, n("input-component", { key: "a299cb5d2043e5fedd6f5f66889d7640e74b8b55", label: "Name", name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: "Enter your name", type: "text", required: !0, part: "nbf__input-textfield" })), n("div", { key: "0d095468473009d67120d668f5e961ca4d90c16d", class: "input-wrapper" }, n("input-component", { key: "e81345e3aca7fa9cd0a90be50f81cfa544a23336", label: "Email", name: "email", id: "email", pattern: E, defaultValue: ((o = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : o.email) || this.email, placeholder: "Enter your email", type: "email", required: !0, part: "nbf__input-textfield" })), ((a = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : a.hide_additional_guests) !== !0 && n("div", { class: "input-wrapper" }, this.guestEmails.map((r, l) => n("div", { class: "input-wrapper button-wrapper" }, n("label", { class: {
247
- error: !!this.guestEmailErrors[l]
248
- } }, "Guest email"), n("div", { class: "guest-email-input" }, n("input", { type: "email", id: `guest-email-${l}`, maxLength: 100, class: {
247
+ var e, t, i, s, o, n, r, l, p;
248
+ return a(u, { key: "36976cb674781bce8d4ebf7448c6139e16871503" }, a("form", { key: "b680520fd0dd5fc680fb93c2665a0fc3128ef18c", onSubmit: (b) => this.bookButtonClickedHandler(b), noValidate: !0 }, a("div", { key: "d66af23e87ae82517d91802d7e1811888fe0460f", class: "nylas-booking-form" }, a("div", { key: "314fe1fabfbecfa4dc282724b2c50e37ea09ec97", class: "input-wrapper" }, a("input-component", { key: "2f789c887cd3b6f1f5fd325afbc1b507048501d7", label: "Name", name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: "Enter your name", type: "text", required: !0, part: "nbf__input-textfield" })), a("div", { key: "49e1cbcdf26466ac6b9634032b4e402850c8dae4", class: "input-wrapper" }, a("input-component", { key: "9248db828f4ccab15b66fd95e4baa4d76a2810df", label: "Email", name: "email", id: "email", pattern: E, defaultValue: ((s = (i = this.bookingInfo) == null ? void 0 : i.primaryParticipant) == null ? void 0 : s.email) || this.email, placeholder: "Enter your email", type: "email", required: !0, part: "nbf__input-textfield" })), ((n = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : n.hide_additional_guests) !== !0 && a("div", { class: "input-wrapper" }, this.guestEmails.map((b, c) => a("div", { class: "input-wrapper button-wrapper" }, a("label", { class: {
249
+ error: !!this.guestEmailErrors[c]
250
+ } }, "Guest email"), a("div", { class: "guest-email-input" }, a("input", { type: "email", id: `guest-email-${c}`, maxLength: 100, class: {
249
251
  "guest-email": !0,
250
- error: !!this.guestEmailErrors[l]
251
- }, placeholder: "Enter guest email", value: r, "data-index": l, part: "nbf__input-textfield", onBlur: (b) => {
252
- var f;
253
- return this.handleGuestBlur(l, (f = b.target) == null ? void 0 : f.value);
254
- }, onInput: (b) => {
255
- var f;
256
- return this.handleGuestChange(l, (f = b.target) == null ? void 0 : f.value);
257
- } }), n("button-component", { variant: "basic", onClick: (b) => this.removeGuestButtonClickHandler(b, l), class: {
252
+ error: !!this.guestEmailErrors[c]
253
+ }, placeholder: "Enter guest email", value: b, "data-index": c, part: "nbf__input-textfield", onBlur: (f) => {
254
+ var m;
255
+ return this.handleGuestBlur(c, (m = f.target) == null ? void 0 : m.value);
256
+ }, onInput: (f) => {
257
+ var m;
258
+ return this.handleGuestChange(c, (m = f.target) == null ? void 0 : m.value);
259
+ } }), a("button-component", { variant: "basic", onClick: (f) => this.removeGuestButtonClickHandler(f, c), class: {
258
260
  "remove-guest": !0,
259
- error: !!this.guestEmailErrors[l]
260
- } }, n("close-icon", null))), n("p", { class: "help-text" }, this.guestEmailErrors[l]))), n("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (r) => this.addGuestButtonClickedHandler(r) }, n("div", { class: "button-content" }, n("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? "another " : "", "guest"))), n("slot", { key: "f47bffdf6a15943c78d4bb75051d0f6704afd623", name: "custom-booking-form" })), n("div", { key: "12631d6648d7ebdc9e6714a54690486d53c8c623", class: "cta" }, n("sp-button", { key: "a72caa2eb6b5d95ee83600aa37e89730bfd68fdb", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, n("slot", { key: "be107ab400cb5802c6153217cde54b75ccede466", name: "booking-form-back-label" }, "Back")), n("sp-button", { key: "d6f322389050d4cbbb1aada135b27b6bc4d34d6d", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && n("loading-icon", { slot: "icon" }), n("slot", { key: "17ee459bee19ba620505e9931ccd4a485f530ecc", name: "booking-form-book-label" }, "Book now")))));
261
+ error: !!this.guestEmailErrors[c]
262
+ } }, a("close-icon", null))), a("p", { class: "help-text" }, this.guestEmailErrors[c]))), a("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (b) => this.addGuestButtonClickedHandler(b) }, a("div", { class: "button-content" }, a("add-circle-icon", { slot: "icon" }), "Add ", this.guestEmails.length > 0 ? "another " : "", "guest"))), (p = Object.entries(((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.additional_fields) || {})) == null ? void 0 : p.sort((b, c) => b[1].order - c[1].order).map((b) => {
263
+ var m, v;
264
+ const c = b[1], f = b[0];
265
+ switch (c.type) {
266
+ case "dropdown":
267
+ return a("div", { class: "input-wrapper" }, a("select-dropdown", { label: f, name: f, id: f, withSearch: !1, options: (m = c.options) == null ? void 0 : m.map((y) => ({ value: y, label: y })), required: c.required, part: "nbf__input-textfield" }));
268
+ case "checkbox":
269
+ return a("div", { class: "input-wrapper" }, a("checkbox-component", { label: f, name: f, id: f, required: c.required, part: "nbf__input-textfield" }));
270
+ case "radio_button":
271
+ return a("div", { class: "input-wrapper" }, a("radio-button-group", { label: f, name: f, id: f, options: (v = c.options) == null ? void 0 : v.map((y) => ({ value: y, label: y })), required: c.required, part: "nbf__input-textfield" }));
272
+ case "multi_line_text":
273
+ return a("div", { class: "input-wrapper" }, a("textarea-component", { label: f, name: f, id: f, required: c.required, part: "nbf__input-textfield" }));
274
+ default:
275
+ return a("div", { class: "input-wrapper" }, a("input-component", { label: f, name: f, id: f, type: c.type, required: c.required, part: "nbf__input-textfield" }));
276
+ }
277
+ }), a("slot", { key: "a3ed3aec89ed73ebac18ea67a81a26eafe2cdee1", name: "custom-booking-form" })), a("div", { key: "145d50be8074dacd8ec6e63a80d5ef06c7f01357", class: "cta" }, a("sp-button", { key: "e7cc2a09db2f2365030aa7013aa0a7be3b04915a", treatment: "outline", variant: "secondary", class: "back", part: "nbf__button-outline", onClick: this.handleBackButtonClicked }, a("slot", { key: "7c97f933480ec1fc279531dacebb4cf9458c35ff", name: "booking-form-back-label" }, "Back")), a("sp-button", { key: "368f5f5fc489d6fa06b818f2ad8dee46260fff1c", variant: "primary", class: "book", part: "nbf__button-primary", type: "submit" }, this.isLoading && a("loading-icon", { slot: "icon" }), a("slot", { key: "9dcca97d8629337121b691a649b4a0bd7cd91554", name: "booking-form-book-label" }, "Book now")))));
261
278
  }
262
279
  get host() {
263
280
  return ae(this);
@@ -269,7 +286,7 @@ const E = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-
269
286
  }
270
287
  };
271
288
  he([
272
- y({
289
+ C({
273
290
  name: "nylas-booking-form",
274
291
  stateToProps: /* @__PURE__ */ new Map([
275
292
  ["scheduler.isLoading", "isLoading"],
@@ -294,16 +311,16 @@ he([
294
311
  L("design:paramtypes", []),
295
312
  L("design:returntype", void 0)
296
313
  ], U.prototype, "render", null);
297
- U.style = fe;
298
- const me = ':host{display:block;width:400px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600)}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}', pe = me;
299
- var ue = function(e, t, i, o) {
300
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
314
+ U.style = be;
315
+ const pe = ':host{display:block;width:400px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600)}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;width:100%;height:48px;padding:8px;line-height:24px;font-family:var(--nylas-font-family)}sp-button.cancel{margin-top:1.25rem;background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.cancel:hover,sp-button.cancel:focus{background-color:var(--nylas-base-600)}sp-button.cancel:active{background-color:var(--nylas-base-800)}sp-button.back{margin-top:0.5rem}sp-button.back:hover,sp-button.back:focus{border-color:var(--nylas-primary)}sp-button.back:active{border-color:var(--nylas-base-600)}sp-field-label{margin-top:1rem;display:flex;color:var(--nylas-base-800);font-size:14px}sp-field-label.error{color:var(--nylas-error)}sp-field-label span.required{color:var(--nylas-error)}sp-textfield{--spectrum-textfield-border-color:var(--nylas-base-300);--spectrum-textfield-icon-color-invalid:var(--nylas-error);position:relative;width:100%;height:48px;margin-bottom:16px;background-color:var(--nylas-base-0);color:var(--nylas-base-500)}sp-textfield.error{--spectrum-textfield-border-color:var(--nylas-error)}sp-help-text{margin:0.25rem 0 1rem 0;color:var(--nylas-error)}', me = pe;
316
+ var ue = function(e, t, i, s) {
317
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
301
318
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
302
- a = Reflect.decorate(e, t, i, o);
319
+ n = Reflect.decorate(e, t, i, s);
303
320
  else
304
321
  for (var l = e.length - 1; l >= 0; l--)
305
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
306
- return s > 3 && a && Object.defineProperty(t, i, a), a;
322
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
323
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
307
324
  }, I = function(e, t) {
308
325
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
309
326
  return Reflect.metadata(e, t);
@@ -311,40 +328,51 @@ var ue = function(e, t, i, o) {
311
328
  const Y = class {
312
329
  constructor(e) {
313
330
  var t, i;
314
- m(this, e), this.goBackButtonClicked = d(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = d(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = d(this, "cancelBookedEventError", 7), this.cancelBookingFormError = d(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
331
+ g(this, e), this.goBackButtonClicked = h(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = h(this, "cancelBookingFormSubmitted", 7), this.cancelBookedEventError = h(this, "cancelBookedEventError", 7), this.cancelBookingFormError = h(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
315
332
  this.goBackButtonClicked.emit();
316
- }, this.handleSubmitCancelBooking = (o) => {
317
- if (o.preventDefault(), !this.cancellationReason) {
333
+ }, this.handleSubmitCancelBooking = (s) => {
334
+ var r, l, p;
335
+ if (s.preventDefault(), !this.cancellationReason) {
318
336
  this.cancellationError = "Please provide a reason for cancellation.", this.cancelBookingFormError.emit({ title: "Cancel booking form error", description: "Please provide a reason for cancellation." });
319
337
  return;
320
338
  }
321
- c(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
322
- const s = (a) => {
323
- this.cancelBookedEventError.emit(a);
339
+ const o = (l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.min_cancellation_notice;
340
+ if (this.selectedTimeslot && o && new Date((p = this.selectedTimeslot) == null ? void 0 : p.start_time).getTime() - o * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
341
+ this.cancelBookedEventError.emit({
342
+ error: {
343
+ title: "Cancellation Error",
344
+ message: `You cannot cancel the booking within ${o} minutes of the event.`
345
+ }
346
+ });
347
+ return;
348
+ }
349
+ d(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
350
+ const n = (b) => {
351
+ this.cancelBookedEventError.emit(b);
324
352
  };
325
- this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: s });
326
- }, this.handleOnChangeCancellationReason = (o) => {
327
- this.cancellationError = "", this.cancellationReason = o.target.value;
328
- }, this.cancelBookingId = void 0, this.configSettings = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((i = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : i.cancellation_policy) || "Your current timeslot will become available to others.";
353
+ this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, reason: this.cancellationReason, errorHandler: n });
354
+ }, this.handleOnChangeCancellationReason = (s) => {
355
+ this.cancellationError = "", this.cancellationReason = s.target.value;
356
+ }, this.cancelBookingId = void 0, this.configSettings = void 0, this.selectedTimeslot = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((i = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : i.cancellation_policy) || "Your current timeslot will become available to others.";
329
357
  }
330
358
  configSettingsChangedHandler(e) {
331
359
  var t;
332
360
  this.cancellationPolicy = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.cancellation_policy) || "Your current timeslot will become available to others.";
333
361
  }
334
362
  connectedCallback() {
335
- c("[nylas-cancel-booking-form] Component connected");
363
+ d("[nylas-cancel-booking-form] Component connected");
336
364
  }
337
365
  async componentWillLoad() {
338
- c("[nylas-cancel-booking-form] Component will load");
366
+ d("[nylas-cancel-booking-form] Component will load");
339
367
  }
340
368
  async componentDidLoad() {
341
- c("[nylas-cancel-booking-form] Component did load"), this.cancelBookingId || console.warn('[nylas-cancel-booking-form] No booking ID provided, "cancelBookingId" prop is required.');
369
+ d("[nylas-cancel-booking-form] Component did load"), this.cancelBookingId || console.warn('[nylas-cancel-booking-form] No booking ID provided, "cancelBookingId" prop is required.');
342
370
  }
343
371
  disconnectedCallback() {
344
- c("[nylas-cancel-booking-form] Component disconnected");
372
+ d("[nylas-cancel-booking-form] Component disconnected");
345
373
  }
346
374
  render() {
347
- return n(h, { key: "83015809da357a47d70c5bae845c8608924b6a31", part: "ncec" }, n("sp-theme", { key: "11d3b28a88081d5ecccfbb78ee6347a7856899e3", theme: "spectrum", scale: "medium" }, n("div", { key: "5d2750f253c1aff61c1d973529ce2f7fa65c4206", class: "nylas-cancel-booking-form", part: "ncec__card" }, n("div", { key: "36a8dd00a5eda62f2f8f9740bf447f0b50e81b9e", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "7bfaf1ffaa9a3bb288bc0e3f11c8c9ed7a4d2c9a" })), n("h3", { key: "74fff12d4aa0311d817348a4694042d2242f30cd", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), n("div", { key: "647a02657fe9570c87b14ef7de0cc0fc713efb21", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, this.cancellationPolicy), n("form", { key: "bb680b4a5a7203d44d08529b0d8b3224b51c2986", onSubmit: this.handleSubmitCancelBooking }, n("sp-field-label", { key: "401994e31c7f7bf65b8403a42b14a56e928d92f3", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, "Reason for cancellation ", n("span", { key: "361907af2362f4fd09af7638c82de7320efe0072", class: "required" }, "*")), n("sp-textfield", { key: "d7e672672f0a7250104080f69f4e96de9321c537", id: "cancel-reason", class: this.cancellationError ? "error" : "", part: "ncec__reason-textarea", multiline: !0, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, n("sp-help-text", { key: "d3bcfae8ae55ec910005c128f24d74ed34f1bf48", slot: "negative-help-text" }, this.cancellationError)), n("sp-button", { key: "23efceafbfcb073b0808f65ae110f31bcbfb7722", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), n("sp-button", { key: "7030276dae50deab5549a64a3def7b4cb783e8d5", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back")))));
375
+ return a(u, { key: "b9d70a4033b9e329c30791e348d05aafb22bc5a7", part: "ncec" }, a("sp-theme", { key: "218750e38e273ae65c7b5d9b954abcd087413af3", theme: "spectrum", scale: "medium" }, a("div", { key: "6a7b6cd1d9679c1f4ff9fc2c2968767a17523a47", class: "nylas-cancel-booking-form", part: "ncec__card" }, a("div", { key: "cc9838dea289f92caa24071e719c624047d33b8a", class: "nylas-cancel-booking-form__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "5d16b7a0a1b8e4e47398fe3b1854bac1364b12dd" })), a("h3", { key: "ab167468e9c518099ff332a57056753a88e88a20", class: "nylas-cancel-booking-form__title", part: "ncec__title" }, "Cancel booking?"), a("div", { key: "76f7aed68228904e5186b43b00ffe07e4f82a704", class: "nylas-cancel-booking-form__description", part: "ncec__description" }, this.cancellationPolicy), a("form", { key: "f544db26c2fd84db363fd7f80615c1c3c22e757e", onSubmit: this.handleSubmitCancelBooking }, a("sp-field-label", { key: "951a80c9f5aa350a093f8934332545a7e21d3949", for: "cancel-reason", class: this.cancellationError ? "error" : "" }, "Reason for cancellation ", a("span", { key: "2bd92cdf3882c1a6a3852f66a8627653f12662d1", class: "required" }, "*")), a("sp-textfield", { key: "223e1c8d2746acc3056c39670a67fe771822aea2", id: "cancel-reason", class: this.cancellationError ? "error" : "", part: "ncec__reason-textarea", multiline: !0, value: this.cancellationReason, onInput: this.handleOnChangeCancellationReason, onFocus: this.handleOnChangeCancellationReason, invalid: !!this.cancellationError }, a("sp-help-text", { key: "4340993d5147663ecaa19a1e7c5bc6c286882760", slot: "negative-help-text" }, this.cancellationError)), a("sp-button", { key: "1dbc5beae35e581d640045458bd305d7ac07968c", variant: "primary", class: "cancel", type: "submit", part: "ncec__button-cta" }, "Cancel booking"), a("sp-button", { key: "2ce80727166893cd38d33975d34fe5809f1d074d", variant: "secondary", class: "back", treatment: "outline", part: "ncec__button-outline", onClick: this.handleGoBackClicked }, "Go back")))));
348
376
  }
349
377
  static get watchers() {
350
378
  return {
@@ -353,13 +381,16 @@ const Y = class {
353
381
  }
354
382
  };
355
383
  ue([
356
- y({
384
+ C({
357
385
  name: "nylas-cancel-booking-form",
358
- stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
386
+ stateToProps: /* @__PURE__ */ new Map([
387
+ ["scheduler.configSettings", "configSettings"],
388
+ ["scheduler.selectedTimeslot", "selectedTimeslot"]
389
+ ]),
359
390
  eventToProps: {
360
391
  cancelBookingFormSubmitted: async (e, t) => {
361
- const i = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason), { errorHandler: o } = e.detail;
362
- o && (!i || "error" in i) && o(i);
392
+ const i = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason), { errorHandler: s } = e.detail;
393
+ s && (!i || "error" in i) && s(i);
363
394
  }
364
395
  },
365
396
  fireRegisterEvent: !0
@@ -368,23 +399,23 @@ ue([
368
399
  I("design:paramtypes", []),
369
400
  I("design:returntype", void 0)
370
401
  ], Y.prototype, "render", null);
371
- Y.style = pe;
402
+ Y.style = me;
372
403
  const ye = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}sp-theme{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.nylas-cancelled-event-card{display:flex;align-items:center;flex-direction:column;width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}sp-button{background-color:var(--nylas-base-0);color:var(--nylas-base-700);border:1px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);font-size:1rem;height:48px;padding:8px;line-height:24px;width:100%}sp-button:hover,sp-button:focus{border-color:var(--nylas-primary)}sp-button:active{border-color:var(--nylas-base-600)}', ge = ye;
373
- var ve = function(e, t, i, o) {
374
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
404
+ var ve = function(e, t, i, s) {
405
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
375
406
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
376
- a = Reflect.decorate(e, t, i, o);
407
+ n = Reflect.decorate(e, t, i, s);
377
408
  else
378
409
  for (var l = e.length - 1; l >= 0; l--)
379
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
380
- return s > 3 && a && Object.defineProperty(t, i, a), a;
410
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
411
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
381
412
  }, R = function(e, t) {
382
413
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
383
414
  return Reflect.metadata(e, t);
384
415
  };
385
416
  const X = class {
386
417
  constructor(e) {
387
- m(this, e), this.closeCancelEventCardClicked = d(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = d(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
418
+ g(this, e), this.closeCancelEventCardClicked = h(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = h(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
388
419
  this.isClosing = !0;
389
420
  const t = (i) => {
390
421
  this.cancelledEventCardError.emit(i), this.isClosing = !1;
@@ -393,30 +424,30 @@ const X = class {
393
424
  }, this.cancelledEventInfo = void 0, this.isClosing = !1, this.configSettings = void 0;
394
425
  }
395
426
  connectedCallback() {
396
- c("[nylas-cancelled-event-card] Component connected");
427
+ d("[nylas-cancelled-event-card] Component connected");
397
428
  }
398
429
  async componentWillLoad() {
399
- c("[nylas-cancelled-event-card] Component will load");
430
+ d("[nylas-cancelled-event-card] Component will load");
400
431
  }
401
432
  async componentDidLoad() {
402
- c("[nylas-cancelled-event-card] Component did load"), this.cancelledEventInfo || console.warn('[nylas-cancelled-event-card] No cancelled event info provided, "cancelledEventInfo" prop is required.');
433
+ d("[nylas-cancelled-event-card] Component did load"), this.cancelledEventInfo || console.warn('[nylas-cancelled-event-card] No cancelled event info provided, "cancelledEventInfo" prop is required.');
403
434
  }
404
435
  disconnectedCallback() {
405
- c("[nylas-cancelled-event-card] Component disconnected");
436
+ d("[nylas-cancelled-event-card] Component disconnected");
406
437
  }
407
438
  render() {
408
439
  var e, t;
409
- return n(h, { key: "89bfb6419aea7fffc32726e4db26642ca810b3a4", part: "ncec" }, n("sp-theme", { key: "265e08ab9c6d4c7c7071353a35e2a8e69bd3875e", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "bd23802e8cd5bf923ed43f223eac30041ead9a2e", class: "nylas-cancelled-event-card", part: "ncec__card" }, n("div", { key: "270d9e2a65ee1a3a7d34aaa99bf1059b891929ae", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "e04e9bf8f7278265160c3a58c0a37c880faed0cc" })), n("h3", { key: "046647bd93284e280d5fb62f9488b6ed5ed9dea2", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), n("div", { key: "f85c31f7718fe5266b2d175afff46c7b63495c11", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), n("div", { key: "aa36cf4bbcb432334903a0b9ba2782ecf6abbe4c", class: "nylas-cancelled-event-card__cta" }, n("sp-button", { key: "65009ac918324e109b0b5a52331bea5a9b8c1a14", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? "Closing..." : "Close")))));
440
+ return a(u, { key: "fe2ed7ce54027987ff6eacc29e4af427d1db3812", part: "ncec" }, a("sp-theme", { key: "9132889a3541fad4294b058769ed891bbc64b3fc", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "2a55f78a1f03dc101b16fd70d235ae507bbf3076", class: "nylas-cancelled-event-card", part: "ncec__card" }, a("div", { key: "6083acf124f5423e3c6f65f07bf6c980244672a6", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, a("calendar-cancel-icon", { key: "0132808a907473f233a58d79ba184997e5ffaf52" })), a("h3", { key: "ba6fcbb8579d5f7fe74910c7252ff555363f3b8e", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, "Your booking has been cancelled successfully!"), a("div", { key: "63863dfcb4f73f5cbcc3b40036bd046dc7bb262a", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, "A cancellation email has been sent to ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), a("div", { key: "d77cc91721cb5b86da50bd31decf015a0d6995a1", class: "nylas-cancelled-event-card__cta" }, a("sp-button", { key: "20685777e9c2674a8b92e7f47581bc6e9812f79d", variant: "secondary", treatment: "outline", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? "Closing..." : "Close")))));
410
441
  }
411
442
  };
412
443
  ve([
413
- y({
444
+ C({
414
445
  name: "nylas-cancelled-event-card",
415
446
  stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
416
447
  eventToProps: {
417
448
  closeCancelEventCardClicked: async (e, t) => {
418
- const i = await t.scheduler.resetCancel(), { errorHandler: o } = e.detail;
419
- o && (!i || "error" in i) && o(i);
449
+ const i = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
450
+ s && (!i || "error" in i) && s(i);
420
451
  }
421
452
  },
422
453
  fireRegisterEvent: !0
@@ -427,77 +458,77 @@ ve([
427
458
  ], X.prototype, "render", null);
428
459
  X.style = ge;
429
460
  const P = /* @__PURE__ */ new Date(), F = /* @__PURE__ */ new Date();
430
- function T(e, t, i, o) {
431
- function s(a) {
432
- return e(a = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+a)), a;
433
- }
434
- return s.floor = (a) => (e(a = /* @__PURE__ */ new Date(+a)), a), s.ceil = (a) => (e(a = new Date(a - 1)), t(a, 1), e(a), a), s.round = (a) => {
435
- const r = s(a), l = s.ceil(a);
436
- return a - r < l - a ? r : l;
437
- }, s.offset = (a, r) => (t(a = /* @__PURE__ */ new Date(+a), r == null ? 1 : Math.floor(r)), a), s.range = (a, r, l) => {
438
- const b = [];
439
- if (a = s.ceil(a), l = l == null ? 1 : Math.floor(l), !(a < r) || !(l > 0))
440
- return b;
441
- let f;
461
+ function D(e, t, i, s) {
462
+ function o(n) {
463
+ return e(n = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+n)), n;
464
+ }
465
+ return o.floor = (n) => (e(n = /* @__PURE__ */ new Date(+n)), n), o.ceil = (n) => (e(n = new Date(n - 1)), t(n, 1), e(n), n), o.round = (n) => {
466
+ const r = o(n), l = o.ceil(n);
467
+ return n - r < l - n ? r : l;
468
+ }, o.offset = (n, r) => (t(n = /* @__PURE__ */ new Date(+n), r == null ? 1 : Math.floor(r)), n), o.range = (n, r, l) => {
469
+ const p = [];
470
+ if (n = o.ceil(n), l = l == null ? 1 : Math.floor(l), !(n < r) || !(l > 0))
471
+ return p;
472
+ let b;
442
473
  do
443
- b.push(f = /* @__PURE__ */ new Date(+a)), t(a, l), e(a);
444
- while (f < a && a < r);
445
- return b;
446
- }, s.filter = (a) => T((r) => {
474
+ p.push(b = /* @__PURE__ */ new Date(+n)), t(n, l), e(n);
475
+ while (b < n && n < r);
476
+ return p;
477
+ }, o.filter = (n) => D((r) => {
447
478
  if (r >= r)
448
- for (; e(r), !a(r); )
479
+ for (; e(r), !n(r); )
449
480
  r.setTime(r - 1);
450
481
  }, (r, l) => {
451
482
  if (r >= r)
452
483
  if (l < 0)
453
484
  for (; ++l <= 0; )
454
- for (; t(r, -1), !a(r); )
485
+ for (; t(r, -1), !n(r); )
455
486
  ;
456
487
  else
457
488
  for (; --l >= 0; )
458
- for (; t(r, 1), !a(r); )
489
+ for (; t(r, 1), !n(r); )
459
490
  ;
460
- }), i && (s.count = (a, r) => (P.setTime(+a), F.setTime(+r), e(P), e(F), Math.floor(i(P, F))), s.every = (a) => (a = Math.floor(a), !isFinite(a) || !(a > 0) ? null : a > 1 ? s.filter(o ? (r) => o(r) % a === 0 : (r) => s.count(0, r) % a === 0) : s)), s;
491
+ }), i && (o.count = (n, r) => (P.setTime(+n), F.setTime(+r), e(P), e(F), Math.floor(i(P, F))), o.every = (n) => (n = Math.floor(n), !isFinite(n) || !(n > 0) ? null : n > 1 ? o.filter(s ? (r) => s(r) % n === 0 : (r) => o.count(0, r) % n === 0) : o)), o;
461
492
  }
462
- const ke = 1e3, J = ke * 60, xe = J * 60, D = xe * 24, j = T(
493
+ const ke = 1e3, J = ke * 60, xe = J * 60, T = xe * 24, j = D(
463
494
  (e) => e.setHours(0, 0, 0, 0),
464
495
  (e, t) => e.setDate(e.getDate() + t),
465
- (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * J) / D,
496
+ (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * J) / T,
466
497
  (e) => e.getDate() - 1
467
498
  );
468
- T((e) => {
499
+ D((e) => {
469
500
  e.setUTCHours(0, 0, 0, 0);
470
501
  }, (e, t) => {
471
502
  e.setUTCDate(e.getUTCDate() + t);
472
- }, (e, t) => (t - e) / D, (e) => e.getUTCDate() - 1);
473
- T((e) => {
503
+ }, (e, t) => (t - e) / T, (e) => e.getUTCDate() - 1);
504
+ D((e) => {
474
505
  e.setUTCHours(0, 0, 0, 0);
475
506
  }, (e, t) => {
476
507
  e.setUTCDate(e.getUTCDate() + t);
477
- }, (e, t) => (t - e) / D, (e) => Math.floor(e / D));
508
+ }, (e, t) => (t - e) / T, (e) => Math.floor(e / T));
478
509
  const Ce = ':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', we = Ce;
479
- var _e = function(e, t, i, o) {
480
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
510
+ var _e = function(e, t, i, s) {
511
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
481
512
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
482
- a = Reflect.decorate(e, t, i, o);
513
+ n = Reflect.decorate(e, t, i, s);
483
514
  else
484
515
  for (var l = e.length - 1; l >= 0; l--)
485
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
486
- return s > 3 && a && Object.defineProperty(t, i, a), a;
516
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
517
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
487
518
  }, M = function(e, t) {
488
519
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
489
520
  return Reflect.metadata(e, t);
490
521
  };
491
522
  const K = class {
492
523
  constructor(e) {
493
- m(this, e), this.dateSelected = d(this, "dateSelected", 7), this.monthChanged = d(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
524
+ g(this, e), this.dateSelected = h(this, "dateSelected", 7), this.monthChanged = h(this, "monthChanged", 7), this.selectableDates = void 0, this.selectedDate = void 0, this.configSettings = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
494
525
  }
495
526
  configSettingsChanged(e) {
496
- var s;
497
- const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (s = e == null ? void 0 : e.scheduler) == null ? void 0 : s.available_days_in_future;
527
+ var o;
528
+ const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.available_days_in_future;
498
529
  if (i === void 0)
499
530
  return;
500
- V(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
531
+ G(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
501
532
  }
502
533
  connectedCallback() {
503
534
  }
@@ -513,31 +544,31 @@ const K = class {
513
544
  this.dateSelected.emit(e);
514
545
  }
515
546
  changeMonth(e) {
516
- var s, a;
547
+ var o, n;
517
548
  this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
518
- const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (a = (s = this.configSettings) == null ? void 0 : s.scheduler) == null ? void 0 : a.available_days_in_future;
519
- V(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month), this.selectDate();
549
+ const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), i = (n = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : n.available_days_in_future;
550
+ G(/* @__PURE__ */ new Date(), i).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month), this.selectDate();
520
551
  }
521
552
  isSelected(e, t, i) {
522
- return e && t && u(e, t) && i && (i == null ? void 0 : i.length) > 0;
553
+ return e && t && x(e, t) && i && (i == null ? void 0 : i.length) > 0;
523
554
  }
524
555
  isDisabled(e, t) {
525
- return e && (t == null ? void 0 : t.find((i) => u(i, e))) === void 0;
556
+ return e && (t == null ? void 0 : t.find((i) => x(i, e))) === void 0;
526
557
  }
527
558
  render() {
528
- var e, t, i, o, s;
529
- return n(h, { key: "bc2d37f59dc4cc59c9659a15ce640d3f3c738239", part: "ndp" }, n("div", { key: "7b39c6ff3b5c820d6ee4cc3419a80f9803011deb", class: "nylas-date-picker" }, n("div", { key: "e7e08bbe189da82d187241b1025633f9ea690bbe", class: "title", part: "'ndp__title" }, ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) && n("h1", null, n("person-icon", null), ((o = (i = this.configSettings) == null ? void 0 : i.organizer) == null ? void 0 : o.name) || "Organizer"), n("p", { key: "7a952faa33c2421f9b6d25a4d56ec7a510d42ab5" }, n("clock-icon", { key: "35561bc9866d9c75e676b3ef589b1506a6d273c6" }), this.eventDuration ? oe(this.eventDuration) : "- minutes")), n("div", { key: "b3799870aa76c6e54b3ec5a32dda0b684a817e1d", class: "header flex-row" }, n("h2", { key: "bb00822464f175aa9b9c5f66f8fa79e95363b33d", part: "ndp__month-header" }, n("strong", { key: "3cdeb9340334fabb6ee1ef09ffb28a6e75177275" }, this.month.toLocaleDateString(void 0, { month: "long" })), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), n("div", { key: "ad6b090bdff3470d1f7381cce6d5734a698c7af9", class: "pagination" }, n("button", { key: "90621e82962b012b50dedb9ec4c49bc7cdff0936", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((s = this.selectableDates) != null && s.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, n("chevron-icon", { key: "7596ada39a388b9570a3a783ff5cdf7bb3f252c1" })), n("button", { key: "e7bbf331f680b0c6f2538639235a008e213b52ee", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, n("chevron-icon", { key: "898e3a4609bf204bdf4d375cd53c23d5ac52bc50" })))), n("div", { key: "e41bd3d09ef9c8bc48dd8aa5db6554af8b31faa8", class: "dates" }, ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((a) => n("div", { class: "day", part: "ndp__day" }, a)), this.dates.map((a, r) => {
530
- var b;
531
- const l = this.isDisabled(a, this.selectableDates);
532
- return this.isLoading ? n("button", { disabled: !0, class: {
559
+ var e, t, i, s, o;
560
+ return a(u, { key: "bc2d37f59dc4cc59c9659a15ce640d3f3c738239", part: "ndp" }, a("div", { key: "7b39c6ff3b5c820d6ee4cc3419a80f9803011deb", class: "nylas-date-picker" }, a("div", { key: "e7e08bbe189da82d187241b1025633f9ea690bbe", class: "title", part: "'ndp__title" }, ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) && a("h1", null, a("person-icon", null), ((s = (i = this.configSettings) == null ? void 0 : i.organizer) == null ? void 0 : s.name) || "Organizer"), a("p", { key: "7a952faa33c2421f9b6d25a4d56ec7a510d42ab5" }, a("clock-icon", { key: "35561bc9866d9c75e676b3ef589b1506a6d273c6" }), this.eventDuration ? oe(this.eventDuration) : "- minutes")), a("div", { key: "b3799870aa76c6e54b3ec5a32dda0b684a817e1d", class: "header flex-row" }, a("h2", { key: "bb00822464f175aa9b9c5f66f8fa79e95363b33d", part: "ndp__month-header" }, a("strong", { key: "3cdeb9340334fabb6ee1ef09ffb28a6e75177275" }, this.month.toLocaleDateString(void 0, { month: "long" })), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), a("div", { key: "ad6b090bdff3470d1f7381cce6d5734a698c7af9", class: "pagination" }, a("button", { key: "90621e82962b012b50dedb9ec4c49bc7cdff0936", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((o = this.selectableDates) != null && o.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, a("chevron-icon", { key: "7596ada39a388b9570a3a783ff5cdf7bb3f252c1" })), a("button", { key: "e7bbf331f680b0c6f2538639235a008e213b52ee", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, a("chevron-icon", { key: "898e3a4609bf204bdf4d375cd53c23d5ac52bc50" })))), a("div", { key: "e41bd3d09ef9c8bc48dd8aa5db6554af8b31faa8", class: "dates" }, ["SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT"].map((n) => a("div", { class: "day", part: "ndp__day" }, n)), this.dates.map((n, r) => {
561
+ var p;
562
+ const l = this.isDisabled(n, this.selectableDates);
563
+ return this.isLoading ? a("button", { disabled: !0, class: {
533
564
  "date day-skeleton": !0,
534
- "current-month": S(a, this.month)
535
- }, style: { animationDelay: `${r * 20}ms` }, part: "ndp__date" }, a.getDate()) : n("button", { class: {
565
+ "current-month": S(n, this.month)
566
+ }, style: { animationDelay: `${r * 20}ms` }, part: "ndp__date" }, n.getDate()) : a("button", { class: {
536
567
  date: !0,
537
- selected: !!(this.selectedDate && u(a, this.selectedDate) && this.selectableDates && ((b = this.selectableDates) == null ? void 0 : b.length) > 0),
538
- "current-day": u(a, /* @__PURE__ */ new Date()),
539
- "current-month": S(a, this.month)
540
- }, "aria-lang": a.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: l, onClick: () => this.selectDate(a), part: `ndp__date ${this.isSelected(a, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${u(a, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${S(a, this.month) ? "ndp__date--current-month" : ""}` }, a.getDate());
568
+ selected: !!(this.selectedDate && x(n, this.selectedDate) && this.selectableDates && ((p = this.selectableDates) == null ? void 0 : p.length) > 0),
569
+ "current-day": x(n, /* @__PURE__ */ new Date()),
570
+ "current-month": S(n, this.month)
571
+ }, "aria-lang": n.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: l, onClick: () => this.selectDate(n), part: `ndp__date ${this.isSelected(n, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${x(n, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${S(n, this.month) ? "ndp__date--current-month" : ""}` }, n.getDate());
541
572
  }))));
542
573
  }
543
574
  static get watchers() {
@@ -547,7 +578,7 @@ const K = class {
547
578
  }
548
579
  };
549
580
  _e([
550
- y({
581
+ C({
551
582
  name: "nylas-date-picker",
552
583
  stateToProps: /* @__PURE__ */ new Map([
553
584
  ["scheduler.selectableDates", "selectableDates"],
@@ -568,22 +599,22 @@ _e([
568
599
  M("design:returntype", void 0)
569
600
  ], K.prototype, "render", null);
570
601
  K.style = we;
571
- const Ee = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', De = Ee;
572
- var Te = function(e, t, i, o) {
573
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
602
+ const Ee = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', Te = Ee;
603
+ var De = function(e, t, i, s) {
604
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
574
605
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
575
- a = Reflect.decorate(e, t, i, o);
606
+ n = Reflect.decorate(e, t, i, s);
576
607
  else
577
608
  for (var l = e.length - 1; l >= 0; l--)
578
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
579
- return s > 3 && a && Object.defineProperty(t, i, a), a;
609
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
610
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
580
611
  }, N = function(e, t) {
581
612
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
582
613
  return Reflect.metadata(e, t);
583
614
  };
584
615
  const Q = class {
585
616
  constructor(e) {
586
- m(this, e), this.timezoneChanged = d(this, "timezoneChanged", 7), this.languageChanged = d(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
617
+ g(this, e), this.timezoneChanged = h(this, "timezoneChanged", 7), this.languageChanged = h(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
587
618
  }
588
619
  connectedCallback() {
589
620
  }
@@ -603,12 +634,12 @@ const Q = class {
603
634
  }
604
635
  getTimezoneLabelHTML(e) {
605
636
  const t = re(e);
606
- return n("span", { class: "timezone-label", style: {
637
+ return a("span", { class: "timezone-label", style: {
607
638
  display: "flex",
608
639
  alignItems: "center",
609
640
  justifyContent: "space-between",
610
641
  width: "-webkit-fill-available"
611
- } }, _[e], " ", n("span", { class: "timezone-offset", style: {
642
+ } }, _[e], " ", a("span", { class: "timezone-offset", style: {
612
643
  fontSize: "14px",
613
644
  fontWeight: "400",
614
645
  color: "var(--nylas-base-500)"
@@ -619,21 +650,21 @@ const Q = class {
619
650
  labelHTML: this.getTimezoneLabelHTML(i),
620
651
  label: _[i],
621
652
  value: i
622
- })), t = Object.keys(q).map((i) => ({
623
- label: q[i],
653
+ })), t = Object.keys(V).map((i) => ({
654
+ label: V[i],
624
655
  value: i
625
656
  }));
626
- return n(h, { key: "2d50a22ae8502ec3c6062da3cbbeb0bb6f0fcb8b" }, n("div", { key: "8725370edb7b3fb70264586c8d6bf4cc7c8f6220", class: "nylas-locale-switch" }, n("div", { key: "da5375359f87b3f1fc5c3ec9f094c76886a1a401", class: {
657
+ return a(u, { key: "2d50a22ae8502ec3c6062da3cbbeb0bb6f0fcb8b" }, a("div", { key: "8725370edb7b3fb70264586c8d6bf4cc7c8f6220", class: "nylas-locale-switch" }, a("div", { key: "da5375359f87b3f1fc5c3ec9f094c76886a1a401", class: {
627
658
  "select-wrapper": !0,
628
659
  timezone: !0
629
- } }, n("select-dropdown", { key: "3633e969f27a301b59ad64afb9f63a0bf19afcc6", name: "timezone", options: e, defaultSelectedOption: e.find((i) => i.value == this.selectedTimezone) }, n("span", { key: "97db913cf64de05eb986fdea378a17948ead2527", slot: "select-icon" }, n("globe-icon", { key: "ee73e4c113c23614a7084cb1f19e2d6149fd3185", width: "20", height: "20" })))), n("div", { key: "04245f7d6c51994197ff107f064632d5c8050e65", class: {
660
+ } }, a("select-dropdown", { key: "3633e969f27a301b59ad64afb9f63a0bf19afcc6", name: "timezone", options: e, defaultSelectedOption: e.find((i) => i.value == this.selectedTimezone) }, a("span", { key: "97db913cf64de05eb986fdea378a17948ead2527", slot: "select-icon" }, a("globe-icon", { key: "ee73e4c113c23614a7084cb1f19e2d6149fd3185", width: "20", height: "20" })))), a("div", { key: "04245f7d6c51994197ff107f064632d5c8050e65", class: {
630
661
  "select-wrapper": !0,
631
662
  language: !0
632
- } }, n("select-dropdown", { key: "55ed837e54b69f9db0548c9c4e4c6e5211ef577a", name: "language", options: t, defaultSelectedOption: t.find((i) => i.value == this.selectedLanguage) }, n("span", { key: "43b4d67e865a27842998a796f8d12e0d9b5171eb", slot: "select-icon" }, n("translate-icon", { key: "c393677712c3528f162bc5700368deb4dd6a197c", width: "20", height: "20" }))))));
663
+ } }, a("select-dropdown", { key: "55ed837e54b69f9db0548c9c4e4c6e5211ef577a", name: "language", options: t, defaultSelectedOption: t.find((i) => i.value == this.selectedLanguage) }, a("span", { key: "43b4d67e865a27842998a796f8d12e0d9b5171eb", slot: "select-icon" }, a("translate-icon", { key: "c393677712c3528f162bc5700368deb4dd6a197c", width: "20", height: "20" }))))));
633
664
  }
634
665
  };
635
- Te([
636
- y({
666
+ De([
667
+ C({
637
668
  name: "nylas-locale-switch",
638
669
  stateToProps: /* @__PURE__ */ new Map([
639
670
  ["scheduler.selectedLanguage", "selectedLanguage"],
@@ -650,43 +681,43 @@ Te([
650
681
  N("design:paramtypes", []),
651
682
  N("design:returntype", void 0)
652
683
  ], Q.prototype, "render", null);
653
- Q.style = De;
684
+ Q.style = Te;
654
685
  const Se = ".sc-nylas-logo-h{display:flex}", ze = Se, Be = class {
655
686
  constructor(e) {
656
- m(this, e), this.width = "69", this.height = "24";
687
+ g(this, e), this.width = "69", this.height = "24";
657
688
  }
658
689
  render() {
659
- return n("svg", { key: "6e6bbcafcedbb912945dd29a383b809dd1295683", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "361bd69757205d793a7619841a425fabbf075475", "clip-path": "url(#clip0_455_3543)" }, n("path", { key: "9f56ecacf7401c2f04a56dc4b0d201b008dc9c52", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), n("path", { key: "f3b85c6d9c447bf55c3299de0084894d6f4b405a", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), n("path", { key: "2d1f7045c261de3721c5b8b27403c8258310ae4c", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), n("path", { key: "a6a34de523ff685dd51372f44b4c47d038419ed4", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), n("path", { key: "127937c688ac0410b9b3a53ee76fd962a4f4b407", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), n("path", { key: "7336b38c7bcb388276b886e6792ad173327142d5", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), n("path", { key: "904bbd6f937f00c2ae6e2269235f2adc2afbc6e4", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), n("path", { key: "9425f2b121d23319942fa5d4daa9ce53173cbcf9", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), n("defs", { key: "7c41827bdfde9ce70fbcb353d98991e37e2a99fe" }, n("clipPath", { key: "5e29b38dc325426fdb3284275f74c1c46485eb1c", id: "clip0_455_3543" }, n("rect", { key: "c63515b41fb503c621fb26917befbcf503e26262", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
690
+ return a("svg", { key: "4e7a23dbd3500c29567a0b62738670d7ca7632f7", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, a("g", { key: "35212097631dc53e2c93992e6952725fe7edee06", "clip-path": "url(#clip0_455_3543)" }, a("path", { key: "ebb39ad3ce1eb1fa4829b4dfd9db45de76f00dcb", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), a("path", { key: "57f79f9bf217023c96670f32ca94870fbd207881", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), a("path", { key: "d8f631d5e68d94a0a296125726c1e91a63adfa67", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), a("path", { key: "bdc5e83bd088371aa905ca5a1f124b400f2676fe", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), a("path", { key: "8be64d768ae4ef9e1d1d99de000ebf54bab8dd73", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), a("path", { key: "cceee449f26a95ed82807e5c72b92fbd2c97d90f", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), a("path", { key: "d032672bdcbade080b8f3fedf82fa732d99a9c70", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), a("path", { key: "2a477ea45ae3dbf1ca80548231777d9978d8aa4d", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), a("defs", { key: "9b849e0fd48961476b7a78aaa6c2b09a13d3f915" }, a("clipPath", { key: "57e680efa1be5694782757b7dd8039d744e5c041", id: "clip0_455_3543" }, a("rect", { key: "dfa05f1f6aabb9e79b64e8ebfd5a372f14b0e890", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
660
691
  }
661
692
  };
662
693
  Be.style = ze;
663
694
  const Le = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}', Ie = Le, Re = class {
664
695
  constructor(e) {
665
- m(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
696
+ g(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
666
697
  }
667
698
  onError(e) {
668
- c(`[nylas-notification] Error: ${e.detail.title}`), this.handleNotification(e);
699
+ d(`[nylas-notification] Error: ${e.detail.title}`), this.handleNotification(e);
669
700
  }
670
701
  onWarning(e) {
671
- c(`[nylas-notification] Warning: ${e.detail.title}`), this.handleNotification(e);
702
+ d(`[nylas-notification] Warning: ${e.detail.title}`), this.handleNotification(e);
672
703
  }
673
704
  onInfo(e) {
674
- c(`[nylas-notification] Info: ${e.detail.title}`), this.handleNotification(e);
705
+ d(`[nylas-notification] Info: ${e.detail.title}`), this.handleNotification(e);
675
706
  }
676
707
  onSuccess(e) {
677
- c(`[nylas-notification] Success: ${e.detail.title}`), this.handleNotification(e);
708
+ d(`[nylas-notification] Success: ${e.detail.title}`), this.handleNotification(e);
678
709
  }
679
710
  handleNotification(e) {
680
711
  if (e.defaultPrevented) {
681
- c("[nylas-notification] Event default prevented");
712
+ d("[nylas-notification] Event default prevented");
682
713
  return;
683
714
  }
684
715
  if (this.ttl === 0) {
685
- c("[nylas-notification] TTL is 0");
716
+ d("[nylas-notification] TTL is 0");
686
717
  return;
687
718
  }
688
719
  if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(e.detail.category)) {
689
- c("[nylas-notification] Category not allowed");
720
+ d("[nylas-notification] Category not allowed");
690
721
  return;
691
722
  }
692
723
  if (this.notifications = [...this.notifications, { ...e.detail }], e.detail.ttl !== "none") {
@@ -700,43 +731,43 @@ const Le = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas
700
731
  this.notifications = this.notifications.filter((t) => t.id !== e);
701
732
  }
702
733
  render() {
703
- return n(h, { key: "b86593ead0279b9e2213c2554d1153379470880e" }, n(se, { key: "860f23f3c6a0636b408d56806b11129c0a697418" }, this.notifications.map((e) => n("div", { class: `notif ${e.type}`, key: e.id }, n("div", { class: "content" }, n("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && n("warning-icon", null)), n("span", { class: "message" }, n("span", { class: "title" }, e.title), e.description && n("span", { class: "description" }, e.description))), n("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, n("close-icon", null)))), n("slot", { key: "6125314e051684b396d99a3c8bb9ba99392f2729" })));
734
+ return a(u, { key: "8b65d6792e310fc31d9019fd87ec0bcff83369a1" }, a(se, { key: "03e4f247931a3a363a575c6fd5364d40d9616c52" }, this.notifications.map((e) => a("div", { class: `notif ${e.type}`, key: e.id }, a("div", { class: "content" }, a("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && a("warning-icon", null)), a("span", { class: "message" }, a("span", { class: "title" }, e.title), e.description && a("span", { class: "description" }, e.description))), a("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, a("close-icon", null)))), a("slot", { key: "8af04e4b9c1d6e143496a8bd9c757b059682de9a" })));
704
735
  }
705
736
  };
706
737
  Re.style = Ie;
707
738
  const Pe = ":host{display:block}sp-theme{position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}", Fe = Pe;
708
- var je = function(e, t, i, o) {
709
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
739
+ var je = function(e, t, i, s) {
740
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
710
741
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
711
- a = Reflect.decorate(e, t, i, o);
742
+ n = Reflect.decorate(e, t, i, s);
712
743
  else
713
744
  for (var l = e.length - 1; l >= 0; l--)
714
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
715
- return s > 3 && a && Object.defineProperty(t, i, a), a;
745
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
746
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
716
747
  }, O = function(e, t) {
717
748
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
718
749
  return Reflect.metadata(e, t);
719
750
  };
720
751
  const ee = class {
721
752
  constructor(e) {
722
- m(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.startTime = "", this.endTime = "";
753
+ g(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.startTime = "", this.endTime = "";
723
754
  }
724
755
  connectedCallback() {
725
756
  }
726
757
  disconnectedCallback() {
727
758
  }
728
759
  async componentWillLoad() {
729
- c("[nylas-selected-event-card] Component will load");
760
+ d("[nylas-selected-event-card] Component will load");
730
761
  }
731
762
  async componentDidLoad() {
732
- c("[nylas-selected-event-card] Component did load"), this.selectedDate || console.warn('[nylas-selected-event-card] "selectedDate" prop is not provided.'), this.selectedTimeslot || console.warn('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.');
763
+ d("[nylas-selected-event-card] Component did load"), this.selectedDate || console.warn('[nylas-selected-event-card] "selectedDate" prop is not provided.'), this.selectedTimeslot || console.warn('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.');
733
764
  }
734
765
  handleSelectedTimeslotChange(e) {
735
766
  this.startTime = new Date(e == null ? void 0 : e.start_time).toLocaleString(void 0, { timeStyle: "short" }), this.endTime = new Date(e == null ? void 0 : e.end_time).toLocaleString(void 0, { timeStyle: "short" });
736
767
  }
737
768
  render() {
738
769
  var e;
739
- return n(h, { key: "ae635bed01604ece8f012b82c00fa7d4b6bc4c3d", part: "nsec" }, n("sp-theme", { key: "edcbe79ce2a87e920bd88714b3a5a747d4a80747", theme: "spectrum", color: "dark", scale: "medium" }, n("div", { key: "8c736e8a7ea756b2ef8ba316e0f2c0f38f3821fd", class: "event-card", part: "nsec__card" }, n("div", { key: "06c33c0fc54e893cbeb8c685503f73a74109ab33", class: "calendar-icon", part: "nsec__icon" }, n("calendar-icon", { key: "69617d50f58122aea2dd92e7ea26d5b2a984c2bf" })), n("div", { key: "e4e53019bba6e23f2c5f0a5b8cde5336973d795d", class: "nylas-selected-event-card__date", part: "nsec__date" }, (e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(void 0, { dateStyle: "full" })), n("div", { key: "c838e6987d4c932471d27dca86c295f549f06a5d", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), n("div", { key: "3e0f9d170e593f39516d49e31fe0da1db49fe828", class: "event-timezone", part: "nsec__timezone" }, n("globe-icon", { key: "12f52fc23ec7d60d046078aceeb6fffba7283078" }), _[this.selectedTimezone])));
770
+ return a(u, { key: "ae635bed01604ece8f012b82c00fa7d4b6bc4c3d", part: "nsec" }, a("sp-theme", { key: "edcbe79ce2a87e920bd88714b3a5a747d4a80747", theme: "spectrum", color: "dark", scale: "medium" }, a("div", { key: "8c736e8a7ea756b2ef8ba316e0f2c0f38f3821fd", class: "event-card", part: "nsec__card" }, a("div", { key: "06c33c0fc54e893cbeb8c685503f73a74109ab33", class: "calendar-icon", part: "nsec__icon" }, a("calendar-icon", { key: "69617d50f58122aea2dd92e7ea26d5b2a984c2bf" })), a("div", { key: "e4e53019bba6e23f2c5f0a5b8cde5336973d795d", class: "nylas-selected-event-card__date", part: "nsec__date" }, (e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(void 0, { dateStyle: "full" })), a("div", { key: "c838e6987d4c932471d27dca86c295f549f06a5d", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), a("div", { key: "3e0f9d170e593f39516d49e31fe0da1db49fe828", class: "event-timezone", part: "nsec__timezone" }, a("globe-icon", { key: "12f52fc23ec7d60d046078aceeb6fffba7283078" }), _[this.selectedTimezone])));
740
771
  }
741
772
  static get watchers() {
742
773
  return {
@@ -745,7 +776,7 @@ const ee = class {
745
776
  }
746
777
  };
747
778
  je([
748
- y({
779
+ C({
749
780
  name: "nylas-selected-event-card",
750
781
  stateToProps: /* @__PURE__ */ new Map([
751
782
  ["scheduler.selectedDate", "selectedDate"],
@@ -760,23 +791,23 @@ je([
760
791
  O("design:returntype", void 0)
761
792
  ], ee.prototype, "render", null);
762
793
  ee.style = Fe;
763
- const Me = ":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.time-slots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .time-slot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}", Ne = Me;
764
- var Oe = function(e, t, i, o) {
765
- var s = arguments.length, a = s < 3 ? t : o === null ? o = Object.getOwnPropertyDescriptor(t, i) : o, r;
794
+ const Me = ":host{display:block;height:calc(100% - 48px)}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}.footer sp-button{padding:14px;color:var(--nylas-base-100);border-radius:var(--nylas-border-radius-2x);width:100%;height:48px;font-weight:600;font-size:16px;background-color:var(--nylas-primary);border:none}.footer sp-button:hover,.footer sp-button:focus{background-color:var(--nylas-base-600)}.footer sp-button:active{background-color:var(--nylas-base-800)}", Ne = Me;
795
+ var Oe = function(e, t, i, s) {
796
+ var o = arguments.length, n = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, i) : s, r;
766
797
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
767
- a = Reflect.decorate(e, t, i, o);
798
+ n = Reflect.decorate(e, t, i, s);
768
799
  else
769
800
  for (var l = e.length - 1; l >= 0; l--)
770
- (r = e[l]) && (a = (s < 3 ? r(a) : s > 3 ? r(t, i, a) : r(t, i)) || a);
771
- return s > 3 && a && Object.defineProperty(t, i, a), a;
801
+ (r = e[l]) && (n = (o < 3 ? r(n) : o > 3 ? r(t, i, n) : r(t, i)) || n);
802
+ return o > 3 && n && Object.defineProperty(t, i, n), n;
772
803
  }, H = function(e, t) {
773
804
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
774
805
  return Reflect.metadata(e, t);
775
806
  };
776
807
  const te = class {
777
808
  constructor(e) {
778
- m(this, e), this.timeslotSelected = d(this, "timeslotSelected", 7), this.timeslotConfirmed = d(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
779
- t.preventDefault(), c("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
809
+ g(this, e), this.timeslotSelected = h(this, "timeslotSelected", 7), this.timeslotConfirmed = h(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, i) => {
810
+ t.preventDefault(), d("[nylas-timeslot-picker] Confirm timeslot", i), this.timeslotConfirmed.emit(i);
780
811
  }, this.handleMouseEnter = (t) => {
781
812
  this.hoveredTimeslotIndex = t;
782
813
  }, this.handleMouseLeave = () => {
@@ -789,50 +820,51 @@ const te = class {
789
820
  }
790
821
  async componentWillLoad() {
791
822
  var t;
792
- const e = (t = this.availability) == null ? void 0 : t.filter((i) => this.selectedDate && u(i.start_time, this.selectedDate)).map((i) => i);
793
- this.times = e || [], c("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
823
+ const e = (t = this.availability) == null ? void 0 : t.filter((i) => this.selectedDate && x(i.start_time, this.selectedDate)).map((i) => i);
824
+ this.times = e || [], d("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
794
825
  }
795
826
  async componentDidLoad() {
796
- c("[nylas-timeslot-picker] Component did load");
827
+ d("[nylas-timeslot-picker] Component did load");
797
828
  }
798
829
  getTimeslotId(e, t) {
799
830
  return `${e.toLocaleDateString()}-${t}`;
800
831
  }
801
832
  onClickSelectTime(e, t) {
802
- c("[nylas-timeslot-picker] Time selected", e, t), this.selectedTimeslotIndex = this.getTimeslotId(e.start_time, t), this.timeslotSelected.emit({
833
+ d("[nylas-timeslot-picker] Time selected", e, t), this.selectedTimeslotIndex = this.getTimeslotId(e.start_time, t), this.timeslotSelected.emit({
803
834
  start_time: e.start_time,
804
- end_time: e.end_time
835
+ end_time: e.end_time,
836
+ emails: e.emails
805
837
  });
806
838
  }
807
839
  getTimeSlotLabel(e) {
808
840
  const t = new Intl.DateTimeFormat("en-US", {
809
- hour: "numeric",
810
- minute: "numeric",
841
+ hour: "2-digit",
842
+ minute: "2-digit",
811
843
  timeZone: this.selectedTimezone
812
844
  });
813
845
  return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
814
846
  }
815
847
  selectedDateChanged(e) {
816
848
  var t;
817
- if (c("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
818
- const i = (t = this.availability) == null ? void 0 : t.filter((o) => u(o.start_time, e)).map((o) => o);
849
+ if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
850
+ const i = (t = this.availability) == null ? void 0 : t.filter((s) => x(s.start_time, e)).map((s) => s);
819
851
  this.times = i || [];
820
852
  }
821
853
  }
822
854
  availabilityChanged(e) {
823
- if (c("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
824
- const t = e == null ? void 0 : e.filter((i) => this.selectedDate && u(i.start_time, this.selectedDate)).map((i) => i);
855
+ if (d("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
856
+ const t = e == null ? void 0 : e.filter((i) => this.selectedDate && x(i.start_time, this.selectedDate)).map((i) => i);
825
857
  this.times = t || [];
826
858
  }
827
859
  }
828
860
  render() {
829
- return this.isLoading ? n(h, null, n("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => n("div", { class: "time-slot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? n(h, null, n("div", { class: "empty" }, n("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? n(h, null, n("div", { class: "empty" }, n("span", null, "No time slots available for selected date"))) : this.selectedDate ? n(h, { part: "ntp" }, n("div", { class: "time-picker-wrapper" }, n("div", { class: "time-slots" }, this.times.map((e, t) => {
830
- var i, o, s, a;
831
- return n("button", { part: `ntp__timeslot ${((o = (i = this.selectedTimeslot) == null ? void 0 : i.start_time) == null ? void 0 : o.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
861
+ return this.isLoading ? a(u, null, a("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => a("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? a(u, null, a("div", { class: "empty" }, a("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? a(u, null, a("div", { class: "empty" }, a("span", null, "No time slots available for selected date"))) : this.selectedDate ? a(u, { part: "ntp" }, a("div", { class: "time-picker-wrapper" }, a("div", { class: "timeslots" }, this.times.map((e, t) => {
862
+ var i, s, o, n;
863
+ return a("button", { part: `ntp__timeslot ${((s = (i = this.selectedTimeslot) == null ? void 0 : i.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
832
864
  time: !0,
833
- selected: typeof this.selectedTimeslot < "u" && ((a = (s = this.selectedTimeslot) == null ? void 0 : s.start_time) == null ? void 0 : a.getTime()) === e.start_time.getTime()
865
+ selected: typeof this.selectedTimeslot < "u" && ((n = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : n.getTime()) === e.start_time.getTime()
834
866
  }, onClick: () => this.onClickSelectTime(e, t), onMouseEnter: () => this.handleMouseEnter(t), onMouseLeave: () => this.handleMouseLeave() }, this.hoveredTimeslotIndex == t || this.selectedTimeslotIndex == this.getTimeslotId(e.start_time, t) ? this.getTimeSlotLabel(e) : e.start_time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone }));
835
- })), this.selectedTimeslot && n("div", { class: "footer" }, n("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, n("slot", { name: "timeslot-picker-cta-label" }, "Next"))))) : n(h, null);
867
+ })), this.selectedTimeslot && a("div", { class: "footer" }, a("sp-button", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, a("slot", { name: "timeslot-picker-cta-label" }, "Next"))))) : a(u, null);
836
868
  }
837
869
  static get watchers() {
838
870
  return {
@@ -842,7 +874,7 @@ const te = class {
842
874
  }
843
875
  };
844
876
  Oe([
845
- y({
877
+ C({
846
878
  name: "nylas-timeslot-picker",
847
879
  stateToProps: /* @__PURE__ */ new Map([
848
880
  ["scheduler.selectedDate", "selectedDate"],