@nylas/web-elements 2.5.18 → 2.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/input-color-picker/input-color-picker.es.js +3 -3
- package/dist/cdn/nylas-scheduler-editor/nylas-scheduler-editor.es.js +129 -114
- package/dist/cdn/nylas-scheduling/nylas-scheduling.es.js +2504 -2478
- package/dist/cjs/add-circle-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/archive-icon.cjs.entry.js +1 -1
- package/dist/cjs/arrow-icon.cjs.entry.js +1 -1
- package/dist/cjs/bold-icon.cjs.entry.js +1 -1
- package/dist/cjs/button-component_2.cjs.entry.js +2 -2
- package/dist/cjs/calendar-agenda-fill-icon_39.cjs.entry.js +47 -47
- package/dist/cjs/calendar-cancel-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-check-icon.cjs.entry.js +1 -1
- package/dist/cjs/calendar-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-component.cjs.entry.js +1 -1
- package/dist/cjs/checkbox-group_4.cjs.entry.js +5 -5
- package/dist/cjs/checkmark-circle-icon.cjs.entry.js +1 -1
- package/dist/cjs/checkmark-icon_14.cjs.entry.js +16 -16
- package/dist/cjs/chevron-icon_3.cjs.entry.js +4 -4
- package/dist/cjs/clock-icon_2.cjs.entry.js +2 -2
- package/dist/cjs/delete-icon.cjs.entry.js +1 -1
- package/dist/cjs/document-refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/folder-icon.cjs.entry.js +1 -1
- package/dist/cjs/forward-icon.cjs.entry.js +1 -1
- package/dist/cjs/globe-icon_3.cjs.entry.js +5 -5
- package/dist/cjs/google-logo-icon_6.cjs.entry.js +13 -13
- package/dist/cjs/google-meet-icon_5.cjs.entry.js +5 -5
- package/dist/cjs/inbox-icon.cjs.entry.js +1 -1
- package/dist/cjs/info-icon_2.cjs.entry.js +3 -3
- package/dist/cjs/input-component.cjs.entry.js +1 -1
- package/dist/cjs/input-dropdown_2.cjs.entry.js +2 -2
- package/dist/cjs/input-image-url_2.cjs.entry.js +2 -2
- package/dist/cjs/italic-icon.cjs.entry.js +1 -1
- package/dist/cjs/multi-select-dropdown.cjs.entry.js +2 -2
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js +46 -18
- package/dist/cjs/nylas-booked-event-card_11.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-form-card.cjs.entry.js +1 -1
- package/dist/cjs/nylas-notification_2.cjs.entry.js +2 -2
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js +29 -4
- package/dist/cjs/nylas-scheduler-editor.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduler-editor.entry.cjs.js.map +1 -1
- package/dist/cjs/nylas-scheduling.cjs.entry.js +9 -6
- package/dist/cjs/nylas-scheduling.cjs.entry.js.map +1 -1
- package/dist/cjs/nylas-scheduling.entry.cjs.js.map +1 -1
- package/dist/cjs/person-icon.cjs.entry.js +1 -1
- package/dist/cjs/play-icon.cjs.entry.js +1 -1
- package/dist/cjs/plus-icon.cjs.entry.js +1 -1
- package/dist/cjs/radio-button-group.cjs.entry.js +1 -1
- package/dist/cjs/refresh-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-all-icon.cjs.entry.js +1 -1
- package/dist/cjs/reply-icon.cjs.entry.js +1 -1
- package/dist/cjs/sent-icon.cjs.entry.js +1 -1
- package/dist/cjs/spam-icon.cjs.entry.js +1 -1
- package/dist/cjs/star-icon.cjs.entry.js +1 -1
- package/dist/cjs/stop-icon.cjs.entry.js +1 -1
- package/dist/cjs/textarea-component.cjs.entry.js +1 -1
- package/dist/cjs/toggle-switch.cjs.entry.js +1 -1
- package/dist/cjs/translate-icon.cjs.entry.js +1 -1
- package/dist/cjs/trash-fill-icon.cjs.entry.js +1 -1
- package/dist/cjs/underline-icon.cjs.entry.js +1 -1
- package/dist/cjs/{version-Xu0ORQw8.js → version-Ep_WAjs1.js} +3 -3
- package/dist/cjs/version-Ep_WAjs1.js.map +1 -0
- package/dist/collection/common/icons/add-circle.js +1 -1
- package/dist/collection/common/icons/archive.js +1 -1
- package/dist/collection/common/icons/arrow.js +1 -1
- package/dist/collection/common/icons/bold.js +1 -1
- package/dist/collection/common/icons/calendar-agenda-fill.js +1 -1
- package/dist/collection/common/icons/calendar-agenda.js +1 -1
- package/dist/collection/common/icons/calendar-cancel.js +1 -1
- package/dist/collection/common/icons/calendar-check.js +1 -1
- package/dist/collection/common/icons/calendar-info.js +1 -1
- package/dist/collection/common/icons/calendar-patterns.js +1 -1
- package/dist/collection/common/icons/calendar.js +1 -1
- package/dist/collection/common/icons/checkmark-circle.js +1 -1
- package/dist/collection/common/icons/checkmark.js +1 -1
- package/dist/collection/common/icons/chevron.js +1 -1
- package/dist/collection/common/icons/clock.js +1 -1
- package/dist/collection/common/icons/close.js +1 -1
- package/dist/collection/common/icons/copy.js +1 -1
- package/dist/collection/common/icons/delete.js +1 -1
- package/dist/collection/common/icons/document-refresh.js +1 -1
- package/dist/collection/common/icons/dragable.js +1 -1
- package/dist/collection/common/icons/edit.js +1 -1
- package/dist/collection/common/icons/envelope-fill.js +1 -1
- package/dist/collection/common/icons/envelope.js +1 -1
- package/dist/collection/common/icons/eye.js +1 -1
- package/dist/collection/common/icons/feedback-icon.js +1 -1
- package/dist/collection/common/icons/flow.js +1 -1
- package/dist/collection/common/icons/folder.js +1 -1
- package/dist/collection/common/icons/forward.js +1 -1
- package/dist/collection/common/icons/globe.js +1 -1
- package/dist/collection/common/icons/google-logo.js +1 -1
- package/dist/collection/common/icons/google-meet.js +1 -1
- package/dist/collection/common/icons/inbox.js +1 -1
- package/dist/collection/common/icons/info.js +1 -1
- package/dist/collection/common/icons/italic.js +1 -1
- package/dist/collection/common/icons/loading.js +1 -1
- package/dist/collection/common/icons/location-off.js +1 -1
- package/dist/collection/common/icons/location.js +1 -1
- package/dist/collection/common/icons/microsof-teams.js +1 -1
- package/dist/collection/common/icons/microsoft-logo.js +1 -1
- package/dist/collection/common/icons/nylas-logo.js +1 -1
- package/dist/collection/common/icons/paintbrush-fill.js +1 -1
- package/dist/collection/common/icons/paintbrush.js +1 -1
- package/dist/collection/common/icons/people.js +1 -1
- package/dist/collection/common/icons/person-clipboard.js +1 -1
- package/dist/collection/common/icons/person.js +1 -1
- package/dist/collection/common/icons/play.js +1 -1
- package/dist/collection/common/icons/plus.js +1 -1
- package/dist/collection/common/icons/refresh.js +1 -1
- package/dist/collection/common/icons/reply-all.js +1 -1
- package/dist/collection/common/icons/reply.js +1 -1
- package/dist/collection/common/icons/search.js +1 -1
- package/dist/collection/common/icons/sent.js +1 -1
- package/dist/collection/common/icons/spam.js +1 -1
- package/dist/collection/common/icons/star.js +1 -1
- package/dist/collection/common/icons/stop.js +1 -1
- package/dist/collection/common/icons/translate.js +1 -1
- package/dist/collection/common/icons/trash-fill.js +1 -1
- package/dist/collection/common/icons/trash.js +1 -1
- package/dist/collection/common/icons/underline.js +1 -1
- package/dist/collection/common/icons/warning.js +1 -1
- package/dist/collection/common/icons/zoom.js +1 -1
- package/dist/collection/common/types.js.map +1 -1
- package/dist/collection/components/design-system/button-component/button-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-component/checkbox-component.js +1 -1
- package/dist/collection/components/design-system/checkbox-group/checkbox-group.js +1 -1
- package/dist/collection/components/design-system/input-color-picker/input-color-picker.js +2 -2
- package/dist/collection/components/design-system/input-component/input-component.js +1 -1
- package/dist/collection/components/design-system/input-dropdown/input-dropdown.js +1 -1
- package/dist/collection/components/design-system/input-image-url/input-image-url.js +1 -1
- package/dist/collection/components/design-system/multi-select-dropdown/multi-select-dropdown.js +2 -2
- package/dist/collection/components/design-system/nylas-date-component/nylas-date-component.js +1 -1
- package/dist/collection/components/design-system/radio-button-group/radio-button-group.js +1 -1
- package/dist/collection/components/design-system/select-dropdown/select-dropdown.js +2 -2
- package/dist/collection/components/design-system/textarea-component/textarea-component.js +1 -1
- package/dist/collection/components/design-system/time-period-selector/time-period-selector.js +1 -1
- package/dist/collection/components/design-system/toggle-switch/toggle-switch.js +1 -1
- package/dist/collection/components/design-system/tooltip-component/toolitp-component.js +2 -2
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js +40 -12
- package/dist/collection/components/scheduler/nylas-booking-form/nylas-booking-form.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-cancel-booking-form/nylas-cancel-booking-form.js +1 -1
- package/dist/collection/components/scheduler/nylas-cancelled-event-card/nylas-cancelled-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-confirmed-event-card/nylas-confirmed-event-card.js +1 -1
- package/dist/collection/components/scheduler/nylas-feedback-form/nylas-feedback-form.js +2 -2
- package/dist/collection/components/scheduler/nylas-notification/nylas-notification.js +1 -1
- package/dist/collection/components/scheduler/nylas-organizer-confirmation-card/nylas-organizer-confirmation-card.js +2 -2
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js +1 -1
- package/dist/collection/components/scheduler/nylas-scheduling/nylas-scheduling.js.map +1 -1
- package/dist/collection/components/scheduler/nylas-selected-event-card/nylas-selected-event-card.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-availability-picker/nylas-availability-picker.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-redirect/nylas-booking-confirmation-redirect.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-confirmation-type/nylas-booking-confirmation-type.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-booking-form-config/nylas-booking-form-config.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-cancellation-policy/nylas-cancellation-policy.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-confirmation-email/nylas-confirmation-email.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-connected-calendars/nylas-connected-calendars.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-custom-booking-flow/nylas-custom-booking-flow.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-customize-booking-settings/nylas-customize-booking-settings.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-disable-emails/nylas-disable-emails.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs/nylas-editor-tabs.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-editor-tabs-group/nylas-editor-tabs-group.js +5 -5
- package/dist/collection/components/scheduler-editor/nylas-event-capacity/nylas-event-capacity.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-description/nylas-event-description.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-duration/nylas-event-duration.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-event-info/nylas-event-info.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-limits/nylas-event-limits.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-location/nylas-event-location.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-event-timeslot/nylas-event-timeslot.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-event-title/nylas-event-title.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-form-card/nylas-form-card.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-limit-future-bookings/nylas-limit-future-bookings.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-booking-notice/nylas-min-booking-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-min-cancellation-notice/nylas-min-cancellation-notice.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-notetaker-config/nylas-notetaker-config.js +8 -8
- package/dist/collection/components/scheduler-editor/nylas-only-specific-time-availability/nylas-only-specific-time-availability.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-name/nylas-page-name.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-page-styling/nylas-page-styling.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participant-booking-calendars/nylas-participant-booking-calendars.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-participants-custom-availability/nylas-participants-custom-availability.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-reminder-emails/nylas-reminder-emails.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-reminder-time/nylas-reminder-time.js +1 -1
- package/dist/collection/components/scheduler-editor/nylas-scheduler-editor/nylas-scheduler-editor.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-specific-time-availability-picker/nylas-specific-time-availability-picker.js +2 -2
- package/dist/collection/components/scheduler-editor/nylas-time-window-picker/nylas-time-window-picker.js +3 -3
- package/dist/collection/components/scheduler-editor/nylas-timeslot-interval/nylas-timeslot-interval.js +1 -1
- package/dist/collection/connector/shared/api/scheduler.js +8 -5
- package/dist/collection/connector/shared/api/scheduler.js.map +1 -1
- package/dist/collection/types/index.js.map +1 -1
- package/dist/collection/version.js +1 -1
- package/dist/collection/version.js.map +1 -1
- package/dist/components/add-circle-icon.js +1 -1
- package/dist/components/archive-icon.js +1 -1
- package/dist/components/arrow-icon.js +1 -1
- package/dist/components/bold-icon.js +1 -1
- package/dist/components/button-component.js +1 -1
- package/dist/components/calendar-agenda-fill-icon.js +1 -1
- package/dist/components/calendar-agenda-icon.js +1 -1
- package/dist/components/calendar-cancel-icon.js +1 -1
- package/dist/components/calendar-check-icon.js +1 -1
- package/dist/components/calendar-icon.js +1 -1
- package/dist/components/calendar-info-icon.js +1 -1
- package/dist/components/calendar-patterns-icon.js +1 -1
- package/dist/components/checkbox-component.js +1 -1
- package/dist/components/checkbox-group.js +1 -1
- package/dist/components/checkmark-circle-icon.js +1 -1
- package/dist/components/checkmark-icon.js +1 -1
- package/dist/components/chevron-icon.js +1 -1
- package/dist/components/clock-icon.js +1 -1
- package/dist/components/close-icon.js +1 -1
- package/dist/components/copy-icon.js +1 -1
- package/dist/components/delete-icon.js +1 -1
- package/dist/components/document-refresh-icon.js +1 -1
- package/dist/components/dragable-icon.js +1 -1
- package/dist/components/edit-icon.js +1 -1
- package/dist/components/envelope-fill-icon.js +1 -1
- package/dist/components/envelope-icon.js +1 -1
- package/dist/components/eye-icon.js +1 -1
- package/dist/components/feedback-icon.js +1 -1
- package/dist/components/flow-icon.js +1 -1
- package/dist/components/folder-icon.js +1 -1
- package/dist/components/forward-icon.js +1 -1
- package/dist/components/globe-icon.js +1 -1
- package/dist/components/google-logo-icon.js +1 -1
- package/dist/components/google-meet-icon.js +1 -1
- package/dist/components/inbox-icon.js +1 -1
- package/dist/components/info-icon.js +1 -1
- package/dist/components/input-color-picker.js +1 -1
- package/dist/components/input-component.js +1 -1
- package/dist/components/input-dropdown.js +1 -1
- package/dist/components/input-image-url.js +1 -1
- package/dist/components/italic-icon.js +1 -1
- package/dist/components/loading-icon.js +1 -1
- package/dist/components/location-icon.js +1 -1
- package/dist/components/location-off-icon.js +1 -1
- package/dist/components/microsoft-logo-icon.js +1 -1
- package/dist/components/microsoft-teams-icon.js +1 -1
- package/dist/components/multi-select-dropdown.js +1 -1
- package/dist/components/nylas-additional-participants.js +1 -1
- package/dist/components/nylas-availability-picker.js +1 -1
- package/dist/components/nylas-booked-event-card.js +1 -1
- package/dist/components/nylas-booking-calendar-picker.js +1 -1
- package/dist/components/nylas-booking-confirmation-redirect.js +1 -1
- package/dist/components/nylas-booking-confirmation-type.js +1 -1
- package/dist/components/nylas-booking-form-config.js +1 -1
- package/dist/components/nylas-booking-form.js +1 -1
- package/dist/components/nylas-buffer-time.js +1 -1
- package/dist/components/nylas-calendar-picker.js +1 -1
- package/dist/components/nylas-cancel-booking-form.js +1 -1
- package/dist/components/nylas-cancellation-policy.js +1 -1
- package/dist/components/nylas-cancelled-event-card.js +1 -1
- package/dist/components/nylas-confirmation-email.js +1 -1
- package/dist/components/nylas-confirmed-event-card.js +1 -1
- package/dist/components/nylas-connected-calendars.js +1 -1
- package/dist/components/nylas-custom-booking-flow.js +1 -1
- package/dist/components/nylas-custom-event-slug.js +1 -1
- package/dist/components/nylas-customize-booking-settings.js +1 -1
- package/dist/components/nylas-date-component.js +1 -1
- package/dist/components/nylas-date-picker.js +1 -1
- package/dist/components/nylas-disable-emails.js +1 -1
- package/dist/components/nylas-editor-tabs-group.js +1 -1
- package/dist/components/nylas-editor-tabs.js +1 -1
- package/dist/components/nylas-event-calendar.js +1 -1
- package/dist/components/nylas-event-capacity.js +1 -1
- package/dist/components/nylas-event-description.js +1 -1
- package/dist/components/nylas-event-duration.js +1 -1
- package/dist/components/nylas-event-info.js +1 -1
- package/dist/components/nylas-event-limits.js +1 -1
- package/dist/components/nylas-event-location.js +1 -1
- package/dist/components/nylas-event-timeslot.js +1 -1
- package/dist/components/nylas-event-title.js +1 -1
- package/dist/components/nylas-feedback-form.js +1 -1
- package/dist/components/nylas-form-card.js +1 -1
- package/dist/components/nylas-limit-future-bookings.js +1 -1
- package/dist/components/nylas-list-configurations.js +1 -1
- package/dist/components/nylas-locale-switch.js +1 -1
- package/dist/components/nylas-logo.js +1 -1
- package/dist/components/nylas-min-booking-notice.js +1 -1
- package/dist/components/nylas-min-cancellation-notice.js +1 -1
- package/dist/components/nylas-notetaker-config.js +1 -1
- package/dist/components/nylas-notification.js +1 -1
- package/dist/components/nylas-only-specific-time-availability.js +1 -1
- package/dist/components/nylas-organizer-confirmation-card.js +1 -1
- package/dist/components/nylas-page-name.js +1 -1
- package/dist/components/nylas-page-styling.js +1 -1
- package/dist/components/nylas-participant-booking-calendars.js +1 -1
- package/dist/components/nylas-participants-custom-availability.js +1 -1
- package/dist/components/nylas-reminder-emails.js +1 -1
- package/dist/components/nylas-reminder-time.js +1 -1
- package/dist/components/nylas-scheduler-editor.js +128 -103
- package/dist/components/nylas-scheduler-editor.js.map +1 -1
- package/dist/components/nylas-scheduling-method.js +1 -1
- package/dist/components/nylas-scheduling.js +47 -44
- package/dist/components/nylas-scheduling.js.map +1 -1
- package/dist/components/nylas-select-event-type.js +1 -1
- package/dist/components/nylas-selected-event-card.js +1 -1
- package/dist/components/nylas-specific-time-availability-picker.js +1 -1
- package/dist/components/nylas-time-window-picker.js +1 -1
- package/dist/components/nylas-timeslot-interval.js +1 -1
- package/dist/components/nylas-timeslot-picker.js +1 -1
- package/dist/components/{p-DjJOgfxK.js → p-1jCDFlwx.js} +9 -9
- package/dist/components/{p-DjJOgfxK.js.map → p-1jCDFlwx.js.map} +1 -1
- package/dist/components/{p-q7g_LEwC.js → p-36H4hxVv.js} +3 -3
- package/dist/components/{p-q7g_LEwC.js.map → p-36H4hxVv.js.map} +1 -1
- package/dist/components/{p-B2LU95MT.js → p-3FIo8Hrp.js} +3 -3
- package/dist/components/{p-B2LU95MT.js.map → p-3FIo8Hrp.js.map} +1 -1
- package/dist/components/{p-g9YD1HRv.js → p-4McmpmAg.js} +4 -4
- package/dist/components/{p-g9YD1HRv.js.map → p-4McmpmAg.js.map} +1 -1
- package/dist/components/{p-BTwTmU9e.js → p-6Seqe489.js} +21 -21
- package/dist/components/{p-BTwTmU9e.js.map → p-6Seqe489.js.map} +1 -1
- package/dist/components/{p-CL8ugNmu.js → p-8-JIv49C.js} +4 -4
- package/dist/components/{p-CL8ugNmu.js.map → p-8-JIv49C.js.map} +1 -1
- package/dist/components/{p-C4RTQIyO.js → p-9KfwmETj.js} +3 -3
- package/dist/components/{p-C4RTQIyO.js.map → p-9KfwmETj.js.map} +1 -1
- package/dist/components/{p-DGDbXfHm.js → p-B3irHRxH.js} +14 -14
- package/dist/components/{p-DGDbXfHm.js.map → p-B3irHRxH.js.map} +1 -1
- package/dist/components/{p-DZwGCUUK.js → p-B57gyFFu.js} +9 -9
- package/dist/components/{p-DZwGCUUK.js.map → p-B57gyFFu.js.map} +1 -1
- package/dist/components/{p-RPocf_FZ.js → p-BAi0-0s9.js} +19 -19
- package/dist/components/{p-RPocf_FZ.js.map → p-BAi0-0s9.js.map} +1 -1
- package/dist/components/{p-DcjGlnBR.js → p-BBWnrSjc.js} +3 -3
- package/dist/components/{p-DcjGlnBR.js.map → p-BBWnrSjc.js.map} +1 -1
- package/dist/components/{p-DBHtQK2b.js → p-BEvwJe37.js} +3 -3
- package/dist/components/{p-DBHtQK2b.js.map → p-BEvwJe37.js.map} +1 -1
- package/dist/components/{p-BuJdnN6-.js → p-BG5y4pBL.js} +4 -4
- package/dist/components/{p-BuJdnN6-.js.map → p-BG5y4pBL.js.map} +1 -1
- package/dist/components/{p-CRIlyxX5.js → p-BGcFPLlm.js} +10 -10
- package/dist/components/{p-CRIlyxX5.js.map → p-BGcFPLlm.js.map} +1 -1
- package/dist/components/{p-BoUo2hc7.js → p-BJbmwaXD.js} +3 -3
- package/dist/components/{p-BoUo2hc7.js.map → p-BJbmwaXD.js.map} +1 -1
- package/dist/components/{p-BzLxndYA.js → p-BMLPTwTQ.js} +7 -7
- package/dist/components/{p-BzLxndYA.js.map → p-BMLPTwTQ.js.map} +1 -1
- package/dist/components/{p-BrOgWk7y.js → p-BMv8LXnI.js} +3 -3
- package/dist/components/{p-BrOgWk7y.js.map → p-BMv8LXnI.js.map} +1 -1
- package/dist/components/{p-BWbQSVNH.js → p-BOYZzt-4.js} +7 -7
- package/dist/components/{p-BWbQSVNH.js.map → p-BOYZzt-4.js.map} +1 -1
- package/dist/components/{p-CdPtFwy6.js → p-BQ5o0vvR.js} +5 -5
- package/dist/components/{p-CdPtFwy6.js.map → p-BQ5o0vvR.js.map} +1 -1
- package/dist/components/{p-DPwhlVlN.js → p-BTqJQKYU.js} +3 -3
- package/dist/components/{p-DPwhlVlN.js.map → p-BTqJQKYU.js.map} +1 -1
- package/dist/components/{p-DUVwWh7e.js → p-BU16FiC8.js} +13 -13
- package/dist/components/{p-DUVwWh7e.js.map → p-BU16FiC8.js.map} +1 -1
- package/dist/components/{p-CpGRDWt9.js → p-BVIbhcW2.js} +4 -4
- package/dist/components/{p-CpGRDWt9.js.map → p-BVIbhcW2.js.map} +1 -1
- package/dist/components/{p-B2cPNmM_.js → p-BVZnq2zV.js} +9 -9
- package/dist/components/{p-B2cPNmM_.js.map → p-BVZnq2zV.js.map} +1 -1
- package/dist/components/{p-WABPA0YV.js → p-BVq4mTYg.js} +56 -28
- package/dist/components/p-BVq4mTYg.js.map +1 -0
- package/dist/components/{p-CuaQW941.js → p-BaX-h68d.js} +6 -6
- package/dist/components/{p-CuaQW941.js.map → p-BaX-h68d.js.map} +1 -1
- package/dist/components/{p-hipsVOV5.js → p-Baw3jP2X.js} +3 -3
- package/dist/components/{p-hipsVOV5.js.map → p-Baw3jP2X.js.map} +1 -1
- package/dist/components/{p-BnEkgCIs.js → p-Bbt9980R.js} +3 -3
- package/dist/components/{p-BnEkgCIs.js.map → p-Bbt9980R.js.map} +1 -1
- package/dist/components/{p-BAKh5tMf.js → p-BcHelLHv.js} +3 -3
- package/dist/components/{p-BAKh5tMf.js.map → p-BcHelLHv.js.map} +1 -1
- package/dist/components/{p-ChXM0wCn.js → p-BgzT-67i.js} +3 -3
- package/dist/components/{p-ChXM0wCn.js.map → p-BgzT-67i.js.map} +1 -1
- package/dist/components/{p-BqD6DKLT.js → p-BnLt26W8.js} +7 -7
- package/dist/components/{p-BqD6DKLT.js.map → p-BnLt26W8.js.map} +1 -1
- package/dist/components/{p-xMlGGw2N.js → p-BuYNWtp6.js} +3 -3
- package/dist/components/{p-xMlGGw2N.js.map → p-BuYNWtp6.js.map} +1 -1
- package/dist/components/{p-CyzGRI94.js → p-BvqNXgYj.js} +3 -3
- package/dist/components/{p-CyzGRI94.js.map → p-BvqNXgYj.js.map} +1 -1
- package/dist/components/{p-DDd7Mjvz.js → p-ByoRiTiK.js} +7 -7
- package/dist/components/{p-DDd7Mjvz.js.map → p-ByoRiTiK.js.map} +1 -1
- package/dist/components/{p-Ch_HOS-9.js → p-BzjixeLc.js} +7 -7
- package/dist/components/{p-Ch_HOS-9.js.map → p-BzjixeLc.js.map} +1 -1
- package/dist/components/{p-DfxhC7Fd.js → p-C1JOYWhj.js} +12 -12
- package/dist/components/{p-DfxhC7Fd.js.map → p-C1JOYWhj.js.map} +1 -1
- package/dist/components/{p-CzSowwcD.js → p-C2bWg9rc.js} +7 -7
- package/dist/components/{p-CzSowwcD.js.map → p-C2bWg9rc.js.map} +1 -1
- package/dist/components/{p-C4BZ4XFc.js → p-C35dU4J2.js} +3 -3
- package/dist/components/{p-C4BZ4XFc.js.map → p-C35dU4J2.js.map} +1 -1
- package/dist/components/{p-CvLWbTI_.js → p-C4QSwxPr.js} +3 -3
- package/dist/components/{p-CvLWbTI_.js.map → p-C4QSwxPr.js.map} +1 -1
- package/dist/components/{p-DEbbVkgj.js → p-C6ARzQ6M.js} +3 -3
- package/dist/components/{p-DEbbVkgj.js.map → p-C6ARzQ6M.js.map} +1 -1
- package/dist/components/{p-BYzkNeMW.js → p-CBjtU882.js} +5 -5
- package/dist/components/{p-BYzkNeMW.js.map → p-CBjtU882.js.map} +1 -1
- package/dist/components/{p-oRjUujH5.js → p-CDME1l9h.js} +8 -8
- package/dist/components/{p-oRjUujH5.js.map → p-CDME1l9h.js.map} +1 -1
- package/dist/components/{p-Dl0Yur5r.js → p-CGkcVt8h.js} +3 -3
- package/dist/components/{p-Dl0Yur5r.js.map → p-CGkcVt8h.js.map} +1 -1
- package/dist/components/{p-D0137Jos.js → p-CI1nvbUl.js} +10 -10
- package/dist/components/{p-D0137Jos.js.map → p-CI1nvbUl.js.map} +1 -1
- package/dist/components/{p-CUe11ohy.js → p-CKiOTF7Z.js} +7 -7
- package/dist/components/{p-CUe11ohy.js.map → p-CKiOTF7Z.js.map} +1 -1
- package/dist/components/{p-fwU4mtR0.js → p-COaWG_Zh.js} +5 -5
- package/dist/components/{p-fwU4mtR0.js.map → p-COaWG_Zh.js.map} +1 -1
- package/dist/components/{p-D5Swz0J4.js → p-CQvNQk_r.js} +10 -10
- package/dist/components/{p-D5Swz0J4.js.map → p-CQvNQk_r.js.map} +1 -1
- package/dist/components/{p-BBxu-pwN.js → p-CRWfdwTk.js} +14 -14
- package/dist/components/{p-BBxu-pwN.js.map → p-CRWfdwTk.js.map} +1 -1
- package/dist/components/{p-CahZPm95.js → p-CWNABkMS.js} +4 -4
- package/dist/components/{p-CahZPm95.js.map → p-CWNABkMS.js.map} +1 -1
- package/dist/components/p-CWplx7sA.js.map +1 -1
- package/dist/components/{p-CyWE9dXK.js → p-C_MBjjfN.js} +3 -3
- package/dist/components/{p-CyWE9dXK.js.map → p-C_MBjjfN.js.map} +1 -1
- package/dist/components/{p-DxDoo-4C.js → p-C_a8Brku.js} +4 -4
- package/dist/components/{p-DxDoo-4C.js.map → p-C_a8Brku.js.map} +1 -1
- package/dist/components/{p-D_daFt1t.js → p-CbIFnpIT.js} +10 -10
- package/dist/components/{p-D_daFt1t.js.map → p-CbIFnpIT.js.map} +1 -1
- package/dist/components/{p-CJvmK-NM.js → p-Cf47JDzZ.js} +3 -3
- package/dist/components/{p-CJvmK-NM.js.map → p-Cf47JDzZ.js.map} +1 -1
- package/dist/components/{p-CeKOSPvz.js → p-ChvVcov-.js} +8 -8
- package/dist/components/{p-CeKOSPvz.js.map → p-ChvVcov-.js.map} +1 -1
- package/dist/components/{p-D7z2dNXN.js → p-CixxWdv6.js} +3 -3
- package/dist/components/{p-D7z2dNXN.js.map → p-CixxWdv6.js.map} +1 -1
- package/dist/components/{p-BF0muZ9G.js → p-CkIBsfNB.js} +3 -3
- package/dist/components/{p-BF0muZ9G.js.map → p-CkIBsfNB.js.map} +1 -1
- package/dist/components/{p-BGbMXlLy.js → p-CneutSrB.js} +6 -6
- package/dist/components/{p-BGbMXlLy.js.map → p-CneutSrB.js.map} +1 -1
- package/dist/components/{p-D9mHh12b.js → p-Coy-5_RU.js} +8 -8
- package/dist/components/{p-D9mHh12b.js.map → p-Coy-5_RU.js.map} +1 -1
- package/dist/components/{p-CDDw-hf8.js → p-Cr0OL9Ww.js} +3 -3
- package/dist/components/{p-CDDw-hf8.js.map → p-Cr0OL9Ww.js.map} +1 -1
- package/dist/components/{p-CXkCnHr5.js → p-CrAcXVaG.js} +5 -5
- package/dist/components/{p-CXkCnHr5.js.map → p-CrAcXVaG.js.map} +1 -1
- package/dist/components/{p-BNuHkEZZ.js → p-CsyulOVn.js} +3 -3
- package/dist/components/{p-BNuHkEZZ.js.map → p-CsyulOVn.js.map} +1 -1
- package/dist/components/{p-DMwaGWVu.js → p-D-DEVTDE.js} +6 -6
- package/dist/components/{p-DMwaGWVu.js.map → p-D-DEVTDE.js.map} +1 -1
- package/dist/components/{p-BVH0Klhu.js → p-D0NY8UNC.js} +4 -4
- package/dist/components/{p-BVH0Klhu.js.map → p-D0NY8UNC.js.map} +1 -1
- package/dist/components/{p-BD4aqMeC.js → p-D1XyN1j_.js} +3 -3
- package/dist/components/{p-BD4aqMeC.js.map → p-D1XyN1j_.js.map} +1 -1
- package/dist/components/{p-D0qMgeBc.js → p-D30JsuKI.js} +6 -6
- package/dist/components/{p-D0qMgeBc.js.map → p-D30JsuKI.js.map} +1 -1
- package/dist/components/{p-BT5kT23k.js → p-D5y9oXD0.js} +3 -3
- package/dist/components/{p-BT5kT23k.js.map → p-D5y9oXD0.js.map} +1 -1
- package/dist/components/{p-3FTb1-in.js → p-D9XKQ809.js} +33 -33
- package/dist/components/{p-3FTb1-in.js.map → p-D9XKQ809.js.map} +1 -1
- package/dist/components/{p-BSfQxQEN.js → p-DA5RYBjv.js} +3 -3
- package/dist/components/{p-BSfQxQEN.js.map → p-DA5RYBjv.js.map} +1 -1
- package/dist/components/{p-Cyk3GcD_.js → p-DEI76q16.js} +3 -3
- package/dist/components/{p-Cyk3GcD_.js.map → p-DEI76q16.js.map} +1 -1
- package/dist/components/{p-UTn_XnKO.js → p-DEJGXMSG.js} +8 -8
- package/dist/components/{p-UTn_XnKO.js.map → p-DEJGXMSG.js.map} +1 -1
- package/dist/components/{p-DcXycU5_.js → p-DEggxpVo.js} +6 -6
- package/dist/components/{p-DcXycU5_.js.map → p-DEggxpVo.js.map} +1 -1
- package/dist/components/{p-eV80kRKP.js → p-DGEm3ZTt.js} +3 -3
- package/dist/components/{p-eV80kRKP.js.map → p-DGEm3ZTt.js.map} +1 -1
- package/dist/components/{p-Ce8gcoEa.js → p-DHb99Cgm.js} +3 -3
- package/dist/components/{p-Ce8gcoEa.js.map → p-DHb99Cgm.js.map} +1 -1
- package/dist/components/{p-CzVZs3uZ.js → p-DK6-bZYK.js} +3 -3
- package/dist/components/{p-CzVZs3uZ.js.map → p-DK6-bZYK.js.map} +1 -1
- package/dist/components/{p-CT64yPEO.js → p-DP99QPpi.js} +3 -3
- package/dist/components/{p-CT64yPEO.js.map → p-DP99QPpi.js.map} +1 -1
- package/dist/components/{p-DRXHxMKj.js → p-DRo0peiI.js} +82 -82
- package/dist/components/{p-DRXHxMKj.js.map → p-DRo0peiI.js.map} +1 -1
- package/dist/components/{p-kbilJltW.js → p-DTtKd-E-.js} +3 -3
- package/dist/components/{p-kbilJltW.js.map → p-DTtKd-E-.js.map} +1 -1
- package/dist/components/{p-Cs_iJUbv.js → p-DVNLlxnG.js} +3 -3
- package/dist/components/{p-Cs_iJUbv.js.map → p-DVNLlxnG.js.map} +1 -1
- package/dist/components/{p-Bsd63RFi.js → p-DXQVWZkn.js} +3 -3
- package/dist/components/{p-Bsd63RFi.js.map → p-DXQVWZkn.js.map} +1 -1
- package/dist/components/{p-ao6VxuAL.js → p-DY3hmp0T.js} +3 -3
- package/dist/components/{p-ao6VxuAL.js.map → p-DY3hmp0T.js.map} +1 -1
- package/dist/components/{p-CFeDwD40.js → p-DZJQ_Wck.js} +3 -3
- package/dist/components/{p-CFeDwD40.js.map → p-DZJQ_Wck.js.map} +1 -1
- package/dist/components/{p-UNYO4Uen.js → p-DZLca44K.js} +3 -3
- package/dist/components/{p-UNYO4Uen.js.map → p-DZLca44K.js.map} +1 -1
- package/dist/components/{p-Ci-pKDnr.js → p-DdUGpBp4.js} +6 -6
- package/dist/components/{p-Ci-pKDnr.js.map → p-DdUGpBp4.js.map} +1 -1
- package/dist/components/{p-O9btdnkK.js → p-DgN2U3G8.js} +15 -15
- package/dist/components/{p-O9btdnkK.js.map → p-DgN2U3G8.js.map} +1 -1
- package/dist/components/{p-Bvnci8k8.js → p-DhC3_luJ.js} +8 -8
- package/dist/components/{p-Bvnci8k8.js.map → p-DhC3_luJ.js.map} +1 -1
- package/dist/components/{p-uxA_4Zq1.js → p-Di9JUVGX.js} +9 -9
- package/dist/components/{p-uxA_4Zq1.js.map → p-Di9JUVGX.js.map} +1 -1
- package/dist/components/{p-BkqJQBCp.js → p-DjZdyHmc.js} +3 -3
- package/dist/components/{p-BkqJQBCp.js.map → p-DjZdyHmc.js.map} +1 -1
- package/dist/components/{p-CBBEkysd.js → p-DjtrM_3t.js} +3 -3
- package/dist/components/{p-CBBEkysd.js.map → p-DjtrM_3t.js.map} +1 -1
- package/dist/components/{p-C9Mlv9rC.js → p-DoA5ft2W.js} +3 -3
- package/dist/components/{p-C9Mlv9rC.js.map → p-DoA5ft2W.js.map} +1 -1
- package/dist/components/{p-Begx19Z9.js → p-DpipCjQf.js} +5 -5
- package/dist/components/{p-Begx19Z9.js.map → p-DpipCjQf.js.map} +1 -1
- package/dist/components/{p-C7ZpwRD0.js → p-DprQSn90.js} +3 -3
- package/dist/components/{p-C7ZpwRD0.js.map → p-DprQSn90.js.map} +1 -1
- package/dist/components/{p-d3kelm3z.js → p-DsvNvqOg.js} +3 -3
- package/dist/components/{p-d3kelm3z.js.map → p-DsvNvqOg.js.map} +1 -1
- package/dist/components/{p-wphqTozF.js → p-DtEl3UXW.js} +6 -6
- package/dist/components/{p-wphqTozF.js.map → p-DtEl3UXW.js.map} +1 -1
- package/dist/components/{p-BJ5a9k3B.js → p-GiOcqWdY.js} +7 -7
- package/dist/components/{p-BJ5a9k3B.js.map → p-GiOcqWdY.js.map} +1 -1
- package/dist/components/{p-C7J83Us-.js → p-IJzc7eB1.js} +3 -3
- package/dist/components/{p-C7J83Us-.js.map → p-IJzc7eB1.js.map} +1 -1
- package/dist/components/{p-jBYg7WMS.js → p-LgZAWXty.js} +3 -3
- package/dist/components/{p-jBYg7WMS.js.map → p-LgZAWXty.js.map} +1 -1
- package/dist/components/{p-NA5f_7b7.js → p-LopVARiX.js} +5 -5
- package/dist/components/{p-NA5f_7b7.js.map → p-LopVARiX.js.map} +1 -1
- package/dist/components/{p-D42UGkjM.js → p-UIE8SSzy.js} +3 -3
- package/dist/components/{p-D42UGkjM.js.map → p-UIE8SSzy.js.map} +1 -1
- package/dist/components/{p-Dj1TLa3T.js → p-VZFbCMYS.js} +3 -3
- package/dist/components/{p-Dj1TLa3T.js.map → p-VZFbCMYS.js.map} +1 -1
- package/dist/components/{p-BMmtU0fv.js → p-ViLIEy7H.js} +6 -6
- package/dist/components/{p-BMmtU0fv.js.map → p-ViLIEy7H.js.map} +1 -1
- package/dist/components/{p-qo42Sy8T.js → p-Yo5k5FWd.js} +15 -15
- package/dist/components/{p-qo42Sy8T.js.map → p-Yo5k5FWd.js.map} +1 -1
- package/dist/components/{p-nhhVpJed.js → p-cJqQhTj-.js} +10 -10
- package/dist/components/{p-nhhVpJed.js.map → p-cJqQhTj-.js.map} +1 -1
- package/dist/components/{p-LOCJMijY.js → p-cf3Hv5c6.js} +6 -6
- package/dist/components/{p-LOCJMijY.js.map → p-cf3Hv5c6.js.map} +1 -1
- package/dist/components/{p-BGCZ4yg1.js → p-erV6iEKy.js} +96 -96
- package/dist/components/{p-BGCZ4yg1.js.map → p-erV6iEKy.js.map} +1 -1
- package/dist/components/{p-DPPqmJvY.js → p-h9VWezZP.js} +4 -4
- package/dist/components/{p-DPPqmJvY.js.map → p-h9VWezZP.js.map} +1 -1
- package/dist/components/{p-37a4h3J_.js → p-kIZ75-15.js} +10 -10
- package/dist/components/{p-37a4h3J_.js.map → p-kIZ75-15.js.map} +1 -1
- package/dist/components/{p-DPL6BIu2.js → p-lDYP9du3.js} +9 -9
- package/dist/components/{p-DPL6BIu2.js.map → p-lDYP9du3.js.map} +1 -1
- package/dist/components/{p-D4gKLnje.js → p-mIi7Upj2.js} +16 -16
- package/dist/components/{p-D4gKLnje.js.map → p-mIi7Upj2.js.map} +1 -1
- package/dist/components/{p-CdBb4zI5.js → p-mkkcd81V.js} +17 -17
- package/dist/components/{p-CdBb4zI5.js.map → p-mkkcd81V.js.map} +1 -1
- package/dist/components/{p-DOryfnIf.js → p-mw0JEKw8.js} +5 -5
- package/dist/components/{p-DOryfnIf.js.map → p-mw0JEKw8.js.map} +1 -1
- package/dist/components/{p-DS6Ijr4M.js → p-n1qnMrWE.js} +3 -3
- package/dist/components/{p-DS6Ijr4M.js.map → p-n1qnMrWE.js.map} +1 -1
- package/dist/components/{p-wJgbEd5m.js → p-n4JDuNbH.js} +9 -9
- package/dist/components/{p-wJgbEd5m.js.map → p-n4JDuNbH.js.map} +1 -1
- package/dist/components/{p-DQNm7dzQ.js → p-oiP2Tfx1.js} +3 -3
- package/dist/components/{p-DQNm7dzQ.js.map → p-oiP2Tfx1.js.map} +1 -1
- package/dist/components/{p-96zW11tR.js → p-r182lPIw.js} +6 -6
- package/dist/components/{p-96zW11tR.js.map → p-r182lPIw.js.map} +1 -1
- package/dist/components/{p-ByDfkWkX.js → p-xXZAaFtS.js} +3 -3
- package/dist/components/{p-ByDfkWkX.js.map → p-xXZAaFtS.js.map} +1 -1
- package/dist/components/{p-OhUC7F_g.js → p-zT4P9vUn.js} +3 -3
- package/dist/components/{p-OhUC7F_g.js.map → p-zT4P9vUn.js.map} +1 -1
- package/dist/components/paintbrush-fill-icon.js +1 -1
- package/dist/components/paintbrush-icon.js +1 -1
- package/dist/components/people-icon.js +1 -1
- package/dist/components/person-clipboard-icon.js +1 -1
- package/dist/components/person-icon.js +1 -1
- package/dist/components/play-icon.js +1 -1
- package/dist/components/plus-icon.js +1 -1
- package/dist/components/radio-button-group.js +1 -1
- package/dist/components/refresh-icon.js +1 -1
- package/dist/components/reply-all-icon.js +1 -1
- package/dist/components/reply-icon.js +1 -1
- package/dist/components/search-icon.js +1 -1
- package/dist/components/select-dropdown.js +1 -1
- package/dist/components/sent-icon.js +1 -1
- package/dist/components/spam-icon.js +1 -1
- package/dist/components/star-icon.js +1 -1
- package/dist/components/stop-icon.js +1 -1
- package/dist/components/textarea-component.js +1 -1
- package/dist/components/time-period-selector.js +1 -1
- package/dist/components/toggle-switch.js +1 -1
- package/dist/components/tooltip-component.js +1 -1
- package/dist/components/translate-icon.js +1 -1
- package/dist/components/trash-fill-icon.js +1 -1
- package/dist/components/trash-icon.js +1 -1
- package/dist/components/underline-icon.js +1 -1
- package/dist/components/warning-icon.js +1 -1
- package/dist/components/zoom-icon.js +1 -1
- package/dist/esm/add-circle-icon_2.entry.js +2 -2
- package/dist/esm/archive-icon.entry.js +1 -1
- package/dist/esm/arrow-icon.entry.js +1 -1
- package/dist/esm/bold-icon.entry.js +1 -1
- package/dist/esm/button-component_2.entry.js +2 -2
- package/dist/esm/calendar-agenda-fill-icon_39.entry.js +47 -47
- package/dist/esm/calendar-cancel-icon.entry.js +1 -1
- package/dist/esm/calendar-check-icon.entry.js +1 -1
- package/dist/esm/calendar-icon.entry.js +1 -1
- package/dist/esm/checkbox-component.entry.js +1 -1
- package/dist/esm/checkbox-group_4.entry.js +5 -5
- package/dist/esm/checkmark-circle-icon.entry.js +1 -1
- package/dist/esm/checkmark-icon_14.entry.js +16 -16
- package/dist/esm/chevron-icon_3.entry.js +4 -4
- package/dist/esm/clock-icon_2.entry.js +2 -2
- package/dist/esm/delete-icon.entry.js +1 -1
- package/dist/esm/document-refresh-icon.entry.js +1 -1
- package/dist/esm/folder-icon.entry.js +1 -1
- package/dist/esm/forward-icon.entry.js +1 -1
- package/dist/esm/globe-icon_3.entry.js +5 -5
- package/dist/esm/google-logo-icon_6.entry.js +13 -13
- package/dist/esm/google-meet-icon_5.entry.js +5 -5
- package/dist/esm/inbox-icon.entry.js +1 -1
- package/dist/esm/info-icon_2.entry.js +3 -3
- package/dist/esm/input-component.entry.js +1 -1
- package/dist/esm/input-dropdown_2.entry.js +2 -2
- package/dist/esm/input-image-url_2.entry.js +2 -2
- package/dist/esm/italic-icon.entry.js +1 -1
- package/dist/esm/multi-select-dropdown.entry.js +2 -2
- package/dist/esm/nylas-booked-event-card_11.entry.js +47 -19
- package/dist/esm/nylas-booked-event-card_11.entry.js.map +1 -1
- package/dist/esm/nylas-form-card.entry.js +1 -1
- package/dist/esm/nylas-notification_2.entry.js +2 -2
- package/dist/esm/nylas-scheduler-editor.entry.js +29 -4
- package/dist/esm/nylas-scheduler-editor.entry.js.map +1 -1
- package/dist/esm/nylas-scheduling.entry.js +9 -6
- package/dist/esm/nylas-scheduling.entry.js.map +1 -1
- package/dist/esm/person-icon.entry.js +1 -1
- package/dist/esm/play-icon.entry.js +1 -1
- package/dist/esm/plus-icon.entry.js +1 -1
- package/dist/esm/radio-button-group.entry.js +1 -1
- package/dist/esm/refresh-icon.entry.js +1 -1
- package/dist/esm/reply-all-icon.entry.js +1 -1
- package/dist/esm/reply-icon.entry.js +1 -1
- package/dist/esm/sent-icon.entry.js +1 -1
- package/dist/esm/spam-icon.entry.js +1 -1
- package/dist/esm/star-icon.entry.js +1 -1
- package/dist/esm/stop-icon.entry.js +1 -1
- package/dist/esm/textarea-component.entry.js +1 -1
- package/dist/esm/toggle-switch.entry.js +1 -1
- package/dist/esm/translate-icon.entry.js +1 -1
- package/dist/esm/trash-fill-icon.entry.js +1 -1
- package/dist/esm/underline-icon.entry.js +1 -1
- package/dist/esm/{version-iQhY7wWk.js → version-JnnkbSna.js} +3 -3
- package/dist/esm/version-JnnkbSna.js.map +1 -0
- package/dist/nylas-web-elements/nylas-scheduler-editor.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-scheduling.entry.esm.js.map +1 -1
- package/dist/nylas-web-elements/nylas-web-elements.esm.js +1 -1
- package/dist/nylas-web-elements/{p-219fd6f9.entry.js → p-00183807.entry.js} +2 -2
- package/dist/nylas-web-elements/p-080096b9.entry.js +2 -0
- package/dist/nylas-web-elements/p-204ef0b9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-37c5834c.entry.js → p-20b88057.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-87f52db7.entry.js → p-22a55c18.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-11f478bd.entry.js → p-38c87a6e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-991b94bd.entry.js → p-3b627f4c.entry.js} +2 -2
- package/dist/nylas-web-elements/p-48188b92.entry.js +2 -0
- package/dist/nylas-web-elements/p-48188b92.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-932456ba.entry.js → p-4d170fc4.entry.js} +2 -2
- package/dist/nylas-web-elements/p-4dac5ab9.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7fe0b3bb.entry.js.map → p-4dac5ab9.entry.js.map} +1 -1
- package/dist/nylas-web-elements/p-4f601ebb.entry.js +2 -0
- package/dist/nylas-web-elements/{p-3d1fd865.entry.js → p-50ffbf25.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-81af9950.entry.js → p-54437b43.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f4516330.entry.js → p-55ce6edc.entry.js} +2 -2
- package/dist/nylas-web-elements/p-59d181d5.entry.js +2 -0
- package/dist/nylas-web-elements/p-6e8fdf58.entry.js +2 -0
- package/dist/nylas-web-elements/p-722e1419.entry.js +2 -0
- package/dist/nylas-web-elements/p-72662447.entry.js +2 -0
- package/dist/nylas-web-elements/{p-7b8b7718.entry.js → p-731891a8.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-f45da541.entry.js → p-75647771.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-eb5b77ab.entry.js → p-759d71a9.entry.js} +2 -2
- package/dist/nylas-web-elements/p-7928b915.entry.js +2 -0
- package/dist/nylas-web-elements/{p-0745cbcc.entry.js → p-7a877959.entry.js} +2 -2
- package/dist/nylas-web-elements/p-7d28bcb7.entry.js +2 -0
- package/dist/nylas-web-elements/{p-af340293.entry.js → p-81eaa606.entry.js} +2 -2
- package/dist/nylas-web-elements/p-828469d5.entry.js +2 -0
- package/dist/nylas-web-elements/{p-c96b6f73.entry.js → p-829e73ef.entry.js} +2 -2
- package/dist/nylas-web-elements/p-86d19f93.entry.js +2 -0
- package/dist/nylas-web-elements/p-86d19f93.entry.js.map +1 -0
- package/dist/nylas-web-elements/{p-1401a68f.entry.js → p-8c77020a.entry.js} +3 -3
- package/dist/nylas-web-elements/p-8c77020a.entry.js.map +1 -0
- package/dist/nylas-web-elements/p-9676f7ac.entry.js +2 -0
- package/dist/nylas-web-elements/{p-95c4f538.entry.js → p-9c0129c6.entry.js} +2 -2
- package/dist/nylas-web-elements/p-9cbcc79c.entry.js +2 -0
- package/dist/nylas-web-elements/{p-iQhY7wWk.js → p-JnnkbSna.js} +2 -2
- package/dist/nylas-web-elements/p-JnnkbSna.js.map +1 -0
- package/dist/nylas-web-elements/{p-7930474b.entry.js → p-a03ea995.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-84c3921f.entry.js → p-a6c1f77e.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-974fce52.entry.js → p-af92dd91.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-9dd10333.entry.js → p-b180424a.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1741705d.entry.js → p-bade8744.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-fed4cb19.entry.js → p-bd7a8916.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-02343d66.entry.js → p-be15cad1.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-0c276fdb.entry.js → p-c107eaf2.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-7876f3e5.entry.js → p-c273be7d.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-a5bb5b9d.entry.js → p-c93b620f.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-c0f88f23.entry.js → p-cd97fc2f.entry.js} +2 -2
- package/dist/nylas-web-elements/p-dca1f249.entry.js +2 -0
- package/dist/nylas-web-elements/{p-2491c840.entry.js → p-e4353ee3.entry.js} +2 -2
- package/dist/nylas-web-elements/{p-1618c8ac.entry.js → p-eac0a540.entry.js} +3 -3
- package/dist/nylas-web-elements/p-edb44a77.entry.js +2 -0
- package/dist/nylas-web-elements/{p-d48d8562.entry.js → p-f4449902.entry.js} +2 -2
- package/dist/nylas-web-elements/p-fdf56450.entry.js +2 -0
- package/dist/nylas-web-elements/p-ff27e57b.entry.js +2 -0
- package/dist/types/common/types.d.ts +2 -0
- package/dist/types/components/scheduler/nylas-booking-form/nylas-booking-form.d.ts +4 -0
- package/dist/types/components.d.ts +4 -4
- package/dist/types/connector/shared/api/scheduler.d.ts +1 -0
- package/dist/types/types/index.d.ts +2 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cjs/version-Xu0ORQw8.js.map +0 -1
- package/dist/components/p-WABPA0YV.js.map +0 -1
- package/dist/esm/version-iQhY7wWk.js.map +0 -1
- package/dist/nylas-web-elements/p-1401a68f.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-16db18a3.entry.js +0 -2
- package/dist/nylas-web-elements/p-37eedc9d.entry.js +0 -2
- package/dist/nylas-web-elements/p-43c3f331.entry.js +0 -2
- package/dist/nylas-web-elements/p-4a2bcec0.entry.js +0 -2
- package/dist/nylas-web-elements/p-4d04cfe9.entry.js +0 -2
- package/dist/nylas-web-elements/p-4d04cfe9.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-55b2df61.entry.js +0 -2
- package/dist/nylas-web-elements/p-68195a72.entry.js +0 -2
- package/dist/nylas-web-elements/p-7fe0b3bb.entry.js +0 -2
- package/dist/nylas-web-elements/p-88e89256.entry.js +0 -2
- package/dist/nylas-web-elements/p-a3baa9bf.entry.js +0 -2
- package/dist/nylas-web-elements/p-a94cbeb7.entry.js +0 -2
- package/dist/nylas-web-elements/p-bca85255.entry.js +0 -2
- package/dist/nylas-web-elements/p-cb33346f.entry.js +0 -2
- package/dist/nylas-web-elements/p-cb33346f.entry.js.map +0 -1
- package/dist/nylas-web-elements/p-de990849.entry.js +0 -2
- package/dist/nylas-web-elements/p-e2dd457a.entry.js +0 -2
- package/dist/nylas-web-elements/p-e734cde9.entry.js +0 -2
- package/dist/nylas-web-elements/p-ed89219a.entry.js +0 -2
- package/dist/nylas-web-elements/p-f0406089.entry.js +0 -2
- package/dist/nylas-web-elements/p-f7f2c232.entry.js +0 -2
- package/dist/nylas-web-elements/p-iQhY7wWk.js.map +0 -1
- /package/dist/nylas-web-elements/{p-219fd6f9.entry.js.map → p-00183807.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-68195a72.entry.js.map → p-080096b9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a3baa9bf.entry.js.map → p-204ef0b9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-37c5834c.entry.js.map → p-20b88057.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-87f52db7.entry.js.map → p-22a55c18.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-11f478bd.entry.js.map → p-38c87a6e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-991b94bd.entry.js.map → p-3b627f4c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-932456ba.entry.js.map → p-4d170fc4.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f7f2c232.entry.js.map → p-4f601ebb.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-3d1fd865.entry.js.map → p-50ffbf25.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-81af9950.entry.js.map → p-54437b43.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f4516330.entry.js.map → p-55ce6edc.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-55b2df61.entry.js.map → p-59d181d5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-37eedc9d.entry.js.map → p-6e8fdf58.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-88e89256.entry.js.map → p-722e1419.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-43c3f331.entry.js.map → p-72662447.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7b8b7718.entry.js.map → p-731891a8.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f45da541.entry.js.map → p-75647771.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-eb5b77ab.entry.js.map → p-759d71a9.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-de990849.entry.js.map → p-7928b915.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0745cbcc.entry.js.map → p-7a877959.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-16db18a3.entry.js.map → p-7d28bcb7.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-af340293.entry.js.map → p-81eaa606.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-bca85255.entry.js.map → p-828469d5.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c96b6f73.entry.js.map → p-829e73ef.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e734cde9.entry.js.map → p-9676f7ac.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-95c4f538.entry.js.map → p-9c0129c6.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-f0406089.entry.js.map → p-9cbcc79c.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7930474b.entry.js.map → p-a03ea995.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-84c3921f.entry.js.map → p-a6c1f77e.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-974fce52.entry.js.map → p-af92dd91.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-9dd10333.entry.js.map → p-b180424a.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1741705d.entry.js.map → p-bade8744.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-fed4cb19.entry.js.map → p-bd7a8916.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-02343d66.entry.js.map → p-be15cad1.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-0c276fdb.entry.js.map → p-c107eaf2.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-7876f3e5.entry.js.map → p-c273be7d.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a5bb5b9d.entry.js.map → p-c93b620f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-c0f88f23.entry.js.map → p-cd97fc2f.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-4a2bcec0.entry.js.map → p-dca1f249.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-2491c840.entry.js.map → p-e4353ee3.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-1618c8ac.entry.js.map → p-eac0a540.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-ed89219a.entry.js.map → p-edb44a77.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-d48d8562.entry.js.map → p-f4449902.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-a94cbeb7.entry.js.map → p-fdf56450.entry.js.map} +0 -0
- /package/dist/nylas-web-elements/{p-e2dd457a.entry.js.map → p-ff27e57b.entry.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as e,F as t,r as n,c as i,H as r,a as s}from"./p-0EQQA0nE.js";import{N as o}from"./p-gXPNb-6F.js";import{N as a}from"./p-Dgl7p7tZ.js";import{d as c,u as l,t as d,a as u,b as h,g as f,e as p,C as g,L as y,i as w,c as b}from"./p-DfIu4gMZ.js";import{o as m,v,E as _,N as E}from"./p-iQhY7wWk.js";import{c as k}from"./p-_i6H-yQH.js";c.extend(l);c.extend(d);class x{constructor({nylasApiRequest:e,nylasSchedulerConfigStore:t}){this.groupEventsCache=new Map;this.CACHE_DURATION=1*60*1e3;this.nylasApiRequest=e;this.nylasSchedulerConfigStore=t}async currentUser(){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return null}return this.nylasApiRequest.currentUser()}async getCalendars(){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching calendars: Nylas API Request is not initialized"})}const e=[];let t=null;const n=50;do{const[i,r]=await this.nylasApiRequest.request({method:"GET",path:`calendars?limit=${n}${t?`&page_token=${t}`:""}`});if(r){return h(null,{message:"Error fetching calendars: "+r.message})}if(m(i)){return h(null,{message:"Error fetching calendars: "+i.error?.message})}e.push(...i.data);t=i.next_cursor||null}while(t);this.nylasSchedulerConfigStore.state.calendars=e;return h(e)}async getConfigurationById(e,t=false){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching configuration: Nylas API Request is not initialized"})}if(!t){const t=this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e));if(t){this.nylasSchedulerConfigStore.state.selectedConfiguration=t;return h(t)}}const[n,i]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${e}`});if(i){return h(null,{message:"Error fetching configuration: "+i.message})}if(m(n)){return h(null,{message:"Error fetching configuration: "+n.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=n.data;if(this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((t=>t.id===e?n.data:t))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,n.data]}return h(n.data)}async getConfigurations(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching configurations: Nylas API Request is not initialized"})}const t=50;const[n,i]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations?limit=${t}${e?`&page_token=${e}`:""}`});if(i){return h(null,{message:"Error fetching configurations: "+i.message})}if(m(n)){return h(null,{message:"Error fetching configurations: "+n.error?.message})}this.nylasSchedulerConfigStore.state.configurations=n.data;this.nylasSchedulerConfigStore.state.listConfigurationsNextCursor=n.next_cursor||null;return h(n.data)}async getMasterEventById(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching master event: Nylas API Request is not initialized"})}const t=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const n=t?.event?.calendar_id;if(!n){u("Calendar ID is not present");return h(null,{message:"Error fetching master event: Calendar ID is not present"})}const i=new URLSearchParams;i.append("calendar_id",n);const[r,s]=await this.nylasApiRequest.request({method:"GET",path:`events/${e}?${i.toString()}`});if(s){return h(null,{message:"Error fetching master event: "+s.message})}if(m(r)){return h(null,{message:"Error fetching master event: "+r.error?.message})}const o=this.nylasSchedulerConfigStore.state.masterGroupEvents;if(o[e]){this.nylasSchedulerConfigStore.state.masterGroupEvents[e]=r.data}else{this.nylasSchedulerConfigStore.state.masterGroupEvents={...o,[e]:r.data}}return h(r.data)}async createConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error creating configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations`,body:e});if(n){return h(null,{message:"Error creating configuration: "+n.message})}if(m(t)){return h(null,{message:"Error creating configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=t.data;this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,t.data];return h(t.data)}async updateConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error updating configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"PUT",path:`scheduling/configurations/${e.id}`,body:e});if(n){return h(null,{message:"Error updating configuration: "+n.message})}if(m(t)){return h(null,{message:"Error updating configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=t.data;if(this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e.id))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((n=>n.id===e.id?t.data:n))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,t.data]}return h(t.data)}async deleteConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error deleting configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${e}`});if(n){return h(null,{message:"Error deleting configuration: "+n.message})}if(m(t)){return h(null,{message:"Error deleting configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.filter((t=>t.id!==e));if(this.nylasSchedulerConfigStore.state.selectedConfiguration?.id===e){this.nylasSchedulerConfigStore.resetSelectedConfiguration()}return h(t.data)}async createGroupEvent(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error creating group event: Nylas API Request is not initialized"})}const[n,i]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${t}/group-events`,body:e});if(i){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error creating group event: "+i.message})}if(m(n)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error creating group event: "+n.error?.message})}this.nylasSchedulerConfigStore.state.selectedGroupEvent=n.data;this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(n.data)}async getGroupEvents(e,t){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching group events: Nylas API Request is not initialized"})}const n=new URLSearchParams;n.append("show_all","true");const i=this.nylasSchedulerConfigStore.state.calendarViewDateRange;let r;let s;if(i){r=i.start_time;s=i.end_time}else{const e=f((new Date).toISOString(),"week");r=e.startTime.toString();s=e.endTime.toString()}const o=`${e}-${r}-${s}`;const a=this.groupEventsCache.get(o);if(a&&Date.now()-a.timestamp<this.CACHE_DURATION){this.nylasSchedulerConfigStore.state.groupEvents=a.data;return h(a.data)}n.append("start_time",r);n.append("end_time",s);const c=t?.group_booking?.calendar_id;if(c){n.append("calendar_id",c)}const[l,d]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${e}/group-events?${n.toString()}`});if(d){return h(null,{message:"Error fetching group events: "+d.message})}if(m(l)){return h(null,{message:"Error fetching group events: "+l.error?.message})}this.groupEventsCache.set(o,{data:l.data,timestamp:Date.now()});this.cleanupExpiredCache();this.nylasSchedulerConfigStore.state.groupEvents=l.data;return h(l.data)}invalidateGroupEventsCache(){this.groupEventsCache.clear()}cleanupExpiredCache(){const e=Date.now();for(const[t,n]of this.groupEventsCache.entries()){if(e-n.timestamp>this.CACHE_DURATION){this.groupEventsCache.delete(t)}}}async updateGroupEventById(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error updating group event: Nylas API Request is not initialized"})}const n=e.id;delete e.id;const[i,r]=await this.nylasApiRequest.request({method:"PATCH",path:`scheduling/configurations/${t}/group-events/${n}`,body:e});if(r){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error updating group event: "+r.message})}if(m(i)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error updating group event: "+i.error?.message})}this.nylasSchedulerConfigStore.state.selectedGroupEvent=i.data;this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(i.data)}async updateGroupEvent(e,t,n){this.nylasSchedulerConfigStore.state.isLoading=true;const i=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const r=i?.event?.master_event_id;const s=i?.event?.id;const o=i?.event?.when?.start_time;const a=i?.group_event_info?.rrule?.[0];const l=a?a.split(";").filter((e=>!e.startsWith("UNTIL"))).join(";"):"";const d=o?c(o*1e3).subtract(1,"minute").format("YYYYMMDDTHHmmss[Z]"):"";if(t==="this"){return this.updateGroupEventById({...e,id:s,recurrence:r?undefined:e.recurrence},n)}else if(t==="future"&&r){const t=await this.createGroupEvent(e,n);const s={location:i?.event?.location,conferencing:i?.event?.conferencing,title:i?.event?.title,description:i?.event?.description,capacity:i?.group_event_info?.capacity,calendar_id:i?.event?.calendar_id,recurrence:l?[l+";UNTIL="+d]:[`RRULE:FREQ=DAILY;UNTIL=${d}`]};await this.updateGroupEventById({...s,id:r},n);return[s,t]}else if(t==="all"){const t=e?.when;const s=i?.event?.when;const o=this.nylasSchedulerConfigStore.state.masterGroupEvents?.[r];let a=o?.when;if(t?.start_time!==s?.start_time){a={...a,start_time:t?.start_time||a?.start_time}}if(t?.end_time!==s?.end_time){a={...a,end_time:t?.end_time||a?.end_time}}if(t?.start_timezone!==s?.start_timezone){a={...a,start_timezone:t?.start_timezone||a?.start_timezone}}if(t?.end_timezone!==s?.end_timezone){a={...a,end_timezone:t?.end_timezone||a?.end_timezone}}return this.updateGroupEventById({...e,when:a,id:r},n)}this.nylasSchedulerConfigStore.state.isLoading=false;throw new Error("Invalid option")}async deleteGroupEvent(e,t,n){this.nylasSchedulerConfigStore.state.isLoading=true;const i=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const r=i?.event?.master_event_id;const s=i?.event?.id;const o=i?.event?.when?.start_time;const a=i?.group_event_info?.rrule?.[0];const l=a?a.split(";").filter((e=>!e.startsWith("UNTIL"))).join(";"):"";const d=o?c(o*1e3).format("YYYYMMDDTHHmmss[Z]"):"";const u={location:i?.event?.location,conferencing:i?.event?.conferencing,title:i?.event?.title,description:i?.event?.description,capacity:i?.group_event_info?.capacity,calendar_id:i?.event?.calendar_id,recurrence:l?[l+";UNTIL="+d]:[`RRULE:UNTIL=${d}`]};if(t==="this"&&s){return this.deleteGroupEventById(s,n)}else if(t==="future"&&r&&s){await this.deleteGroupEventById(s,n);return await this.updateGroupEventById({...u,id:r},n)}else if(t==="all"&&r){return this.deleteGroupEventById(r,n)}this.nylasSchedulerConfigStore.state.isLoading=false;throw new Error("Invalid option")}async deleteGroupEventById(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error deleting group event: Nylas API Request is not initialized"})}const n=new URLSearchParams;const i=this.nylasSchedulerConfigStore.state.selectedConfiguration?.group_booking?.calendar_id;if(i){n.append("calendar_id",i)}const[r,s]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${t}/group-events/${e}?calendar_id=${i}`});if(s){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error deleting group event: "+s.message})}if(m(r)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error deleting group event: "+r.error?.message})}this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(r.data)}async importGroupEvent(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error importing group event: Nylas API Request is not initialized"})}const n=new URLSearchParams;const i=this.nylasSchedulerConfigStore.state.selectedConfiguration?.group_booking?.calendar_id;if(i){n.append("calendar_id",i)}const[r,s]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${t}/import-group-events?${n.toString()}`,body:e});if(s){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error importing group event: "+s.message})}if(m(r)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error importing group event: "+r.error?.message})}if(r.data?.imported_events?.length>0){this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration)}this.nylasSchedulerConfigStore.state.isLoading=false;return h(r.data)}}class C{constructor({nylasApiRequest:e,nylasSchedulerConfigStore:t}){this.nylasApiRequest=e;this.nylasSchedulerConfigStore=t}init(){u("NylasSchedulerConfigConnector init")}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get schedulerConfig(){if(this._schedulerConfigConnector){return this._schedulerConfigConnector}this._schedulerConfigConnector=new x({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:this.nylasSchedulerConfigStore});return this._schedulerConfigConnector}resetStores(){u("NylasSchedulerConfigConnector resetStores");this.nylasSchedulerConfigStore.reset()}async logout(){u("NylasSchedulerConfigConnector logout");this.resetStores()}}function $(e={}){const t={selectedConfiguration:{},configurations:[],groupEvents:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:false,masterGroupEvents:{},isLoading:false,...e};const n=k(t);function i(){n.set("selectedConfiguration",{...e["selectedConfiguration"]})}n.onChange("action",(async e=>{if(!e){i()}}));n.onChange("selectedConfiguration",(async e=>{const t=n.state.participantFetch;const i=e?.participants;if(!t||!i?.length)return;const r=i.filter((e=>!e.is_organizer&&!!e.email)).map((e=>e.email));if(r.length===0)return;try{const e=n.state.participantFetchGrantId;const i=await t({emails:r,grantId:e});if(!i?.length)return;const s=n.state.additionalParticipants||[];const o=new Set(s.map((e=>e.email)));const a=i.filter((e=>!o.has(e.email)));if(a.length>0){n.set("additionalParticipants",[...s,...a])}}catch(e){u("[scheduler-config-store] participantFetch failed",e)}}));return{...n,resetSelectedConfiguration:i}}class S{get(e){return new Promise((t=>{const n=globalThis.window?.localStorage.getItem(e);if(!n){t(null)}else{t(JSON.parse(n))}}))}async remove(e){globalThis.window?.localStorage.removeItem(e);return new Promise((e=>{e(null)}))}set(e,t){globalThis.window?.localStorage.setItem(e,JSON.stringify(t));return new Promise((e=>{e(null)}))}}const T="pkce";const P="grant";const I="user";const R=e=>{if(typeof globalThis.btoa==="function"&&typeof TextEncoder!=="undefined"){const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++){n+=String.fromCharCode(t[e])}return globalThis.btoa(n)}if(typeof globalThis.Buffer!=="undefined"){return globalThis.Buffer.from(e,"utf8").toString("base64")}throw new Error("Base64 encoding is not supported in this environment")};const A=e=>{if(typeof globalThis.atob==="function"&&typeof TextDecoder!=="undefined"){const t=globalThis.atob(e);const n=new Uint8Array(t.length);for(let e=0;e<t.length;e++){n[e]=t.charCodeAt(e)}return(new TextDecoder).decode(n)}if(typeof globalThis.Buffer!=="undefined"){return globalThis.Buffer.from(e,"base64").toString("utf8")}throw new Error("Base64 decoding is not supported in this environment")};class q{Storage=new S;constructor(e){if(e){this.Storage=e;return}}setPKCE(e){const t=R(e);this.Storage.set(T,t)}async getPKCE(){try{const e=await this.Storage.get(T);if(e){return A(e)}}catch(e){return null}return null}removePKCE(){this.Storage.remove(T)}setGrant(e,t=false){const{grant_id:n}=e;this.Storage.set(`${P}${t?"-"+n:""}`,e)}removeGrant(e,t=false){this.Storage.remove(`${P}${t?"-"+e:""}`)}async getGrant(e,t=false){const n=await this.Storage.get(`${P}${t?"-"+e:""}`);if(n){return n}return null}async setUserToken(e){const t=await this.getUserTokens();if(t){const n=t.find((t=>t.sub===e.sub));if(!n){const n=[...t,e];this.Storage.set(I,n)}else{const n=t.map((t=>{if(t.sub===e.sub){t=e}return t}));this.Storage.set(I,n)}}else{this.Storage.set(I,[e])}}async getUserToken(e=""){const t=await this.Storage.get(I);if(t){if(e===""){return t[0]}const n=t.find((t=>t.sub===e));return n}return null}async getUserTokens(){const e=await this.Storage.get(I);if(e){return e}return null}removeUserTokens(){this.Storage.remove(I)}async removeUserToken(e){const t=await this.getUserTokens();const n=t?.filter((t=>t.sub!==e));this.Storage.set(I,n)}async clearSession(){const e=await this.getUserTokens();e?.forEach((e=>{this.removeGrant(e.sub)}));this.removePKCE();this.removeUserTokens()}}class N{databaseName="identity-db";storeName="identity";get(e){const t=this;return new Promise(((n,i)=>{t.openDatabase().then((function(r){const s=r.transaction(t.storeName,"readwrite");const o=s.objectStore(t.storeName);const a=o.get(e);a.onsuccess=()=>{n(a.result)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}))}))}async remove(e){const t=this;return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onupgradeneeded=function(e){const n=e.target.result;n.createObjectStore(t.storeName)};r.onerror=()=>{i(r.error)};r.onsuccess=t=>{const r=t.target.result;const s=r.transaction(this.storeName,"readwrite");const o=s.objectStore(this.storeName);const a=o.delete(e);a.onsuccess=()=>{n(null)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}}))}set(e,t){return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onerror=()=>{i(r.error)};r.onupgradeneeded=e=>{const t=e.target.result;t.createObjectStore(this.storeName)};r.onsuccess=r=>{const s=r.target.result;const o=s.transaction(this.storeName,"readwrite");const a=o.objectStore(this.storeName);const c=a.put(t,e);c.onsuccess=()=>{n(t)};c.onerror=()=>{i(c.error)};o.oncomplete=()=>{s.close()}}}))}openDatabase(){const e=this;return new Promise((function(t,n){const i=indexedDB.open(e.databaseName,2);i.onupgradeneeded=function(t){const n=t.target.result;n.createObjectStore(e.storeName)};i.onsuccess=function(e){t(e.target.result)};i.onerror=function(e){n(e.error)}}))}}var U;var L=new Uint8Array(16);function z(){if(!U){U=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!U){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return U(L)}var j=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function O(e){return typeof e==="string"&&j.test(e)}var D=[];for(var F=0;F<256;++F){D.push((F+256).toString(16).substr(1))}function G(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=(D[e[t+0]]+D[e[t+1]]+D[e[t+2]]+D[e[t+3]]+"-"+D[e[t+4]]+D[e[t+5]]+"-"+D[e[t+6]]+D[e[t+7]]+"-"+D[e[t+8]]+D[e[t+9]]+"-"+D[e[t+10]]+D[e[t+11]]+D[e[t+12]]+D[e[t+13]]+D[e[t+14]]+D[e[t+15]]).toLowerCase();if(!O(n)){throw TypeError("Stringified UUID is invalid")}return n}function H(e,t,n){e=e||{};var i=e.random||(e.rng||z)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;return G(i)}async function B(e,t){const n=e.getReader();let i;while(!(i=await n.read()).done){t(i.value)}}function M(e){let t;let n;let i;let r=false;return function s(o){if(t===undefined){t=o;n=0;i=-1}else{t=J(t,o)}const a=t.length;let c=0;while(n<a){if(r){if(t[n]===10){c=++n}r=false}let s=-1;for(;n<a&&s===-1;++n){switch(t[n]){case 58:if(i===-1){i=n-c}break;case 13:r=true;case 10:s=n;break}}if(s===-1){break}e(t.subarray(c,s),i);c=n;i=-1}if(c===a){t=undefined}else if(c!==0){t=t.subarray(c);n-=c}}}function Y(e,t,n){let i=W();const r=new TextDecoder;return function s(o,a){if(o.length===0){n===null||n===void 0?void 0:n(i);i=W()}else if(a>0){const n=r.decode(o.subarray(0,a));const s=a+(o[a+1]===32?2:1);const c=r.decode(o.subarray(s));switch(n){case"data":i.data=i.data?i.data+"\n"+c:c;break;case"event":i.event=c;break;case"id":e(i.id=c);break;case"retry":const n=parseInt(c,10);if(!isNaN(n)){t(i.retry=n)}break}}}}function J(e,t){const n=new Uint8Array(e.length+t.length);n.set(e);n.set(t,e.length);return n}function W(){return{data:"",event:"",id:"",retry:undefined}}var Q=undefined&&undefined.__rest||function(e,t){var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0)n[i]=e[i];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++){if(t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r]))n[i[r]]=e[i[r]]}return n};const V="text/event-stream";const K=1e3;const Z="last-event-id";function X(e,t){var{signal:n,headers:i,onopen:r,onmessage:s,onclose:o,onerror:a,openWhenHidden:c,fetch:l}=t,d=Q(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,u)=>{const h=Object.assign({},i);if(!h.accept){h.accept=V}let f;function p(){f.abort();if(!document.hidden){v()}}if(!c){document.addEventListener("visibilitychange",p)}let g=K;let y=0;function w(){document.removeEventListener("visibilitychange",p);window.clearTimeout(y);f.abort()}n===null||n===void 0?void 0:n.addEventListener("abort",(()=>{w();t()}));const b=l!==null&&l!==void 0?l:window.fetch;const m=r!==null&&r!==void 0?r:ee;async function v(){var n;f=new AbortController;try{const n=await b(e,Object.assign(Object.assign({},d),{headers:h,signal:f.signal}));await m(n);await B(n.body,M(Y((e=>{if(e){h[Z]=e}else{delete h[Z]}}),(e=>{g=e}),s)));o===null||o===void 0?void 0:o();w();t()}catch(e){if(!f.signal.aborted){try{const t=(n=a===null||a===void 0?void 0:a(e))!==null&&n!==void 0?n:g;window.clearTimeout(y);y=window.setTimeout(v,t)}catch(e){w();u(e)}}}}v()}))}function ee(e){const t=e.headers.get("content-type");if(!(t===null||t===void 0?void 0:t.startsWith(V))){throw new Error(`Expected content-type to be ${V}, Actual: ${t}`)}}function te(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function ne(){return Math.floor(Date.now()/1e3)}async function ie(e){const t=(new TextEncoder).encode(e);const n=await crypto.subtle.digest("SHA-256",t);const i=Array.from(new Uint8Array(n));const r=i.map((e=>e.toString(16).padStart(2,"0"))).join("");return r}function re(e){this.message=e}re.prototype=new Error,re.prototype.name="InvalidCharacterError";var se="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new re("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,s=0,o="";i=t.charAt(s++);~i&&(n=r%4?64*n+i:i,r++%4)?o+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function oe(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(se(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return se(t)}}function ae(e){this.message=e}function ce(e,t){if("string"!=typeof e)throw new ae("Invalid token specified");var n=true===(t=t||{}).header?0:1;try{return JSON.parse(oe(e.split(".")[n]))}catch(e){throw new ae("Invalid token specified: "+e.message)}}ae.prototype=new Error,ae.prototype.name="InvalidTokenError";class le{clientId;redirectUri;accessType="online";domain="http://api.nylas.com";versioned=false;Storage;hosted=false;multiAccount=false;loginId="";constructor(e){this.clientId=e.clientId;this.redirectUri=e.redirectUri;if(e.domain){this.domain=e.domain;const t=this.domain.substring(this.domain.length-3);if(t.includes("/v")){this.versioned=true}}if(e.multiAccount){this.multiAccount=e.multiAccount}if(e.sw){const e=new N;this.Storage=new q(e)}else{this.Storage=new q}if(e.accessType){this.accessType=e.accessType}if(e.loginId){this.loginId=e.loginId}if(e.hosted){this.hosted=e.hosted}if(e.disableInitCodeExchange!==true){this.codeExchange(null)}}async validateAccessToken(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const{access_token:n}=t;try{const e=await fetch(`${this.domain}/connect/tokeninfo?access_token=${n}`,{method:"GET"});const t=await e.json();if(!t.data){return false}return true}catch(e){return false}}async validateIDToken(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const{id_token:n}=t;try{const e=await fetch(`${this.domain}/connect/tokeninfo?id_token=${n}`,{method:"GET"});if(e.status!==200){return false}const t=await e.json();if(!t.data){return false}return true}catch(e){return false}}getDomain(){return this.domain}async auth(e){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){await this.hostedSetCodeChallenge()}const t=await this.generateAuthURL(e);if(e.popup){this.popUp(t);return}return t}async generateAuthURL(e){const t=await this.getCodeChallege();let n=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(t){n+=`&code_challenge=${t}&code_challenge_method=S256&options=rotate_refresh_token`}if(e.provider){n+=`&provider=${e.provider}`}if(e.loginHint){n+=`&login_hint=${e.loginHint}`;if(e.includeGrantScopes){n+=`&include_grant_scopes=${e.includeGrantScopes}`}}if(e.scope){n+=`&scope=${e.scope.join(" ")}`}if(e.prompt){n+=`&prompt=${e.prompt}`}if(e.metadata){n+=`&metadata=${e.metadata}`}if(e.state||this.loginId){n+=`&state=${this.loginId?this.loginId:e.state}`}return n}async generateReauthURL(e,t){if(!e){throw new Error("Grant ID is required")}const n=await this.Storage.getUserToken(e);const i=await this.getCodeChallege();let r=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(i){r+=`&code_challenge=${i}&code_challenge_method=S256&options=rotate_refresh_token`}if(n?.provider){r+=`&provider=${n.provider}`}if(n?.email){r+=`&login_hint=${n.email}`}if(t){r+=`&scope=${t.join(" ")}`}return r}async generateCodeChallenge(){const e=await this.Storage.getPKCE();if(e){return}const t=H();this.Storage.setPKCE(t);return}async hostedSetCodeChallenge(){if(!this.hosted){throw console.error("Method only used with hosted flag enabled")}const e=new URLSearchParams(globalThis.window?.location.search);const t=e.get("code_challenge");if(!t){const e=await this.Storage.getPKCE();if(e){return}console.warn("Code challenge is recomended");return}this.Storage.setPKCE(t)}async getCodeChallege(){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){const e=new URLSearchParams(globalThis.window?.location.search);const t=e.get("code_challenge");if(!t){console.warn("Code challenge is recomended");return""}return t}const e=await this.Storage.getPKCE();if(e){const t=await ie(e);let n=btoa(unescape(encodeURIComponent(t)));n=te(n);return n}return""}async isLoggedIn(){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){return false}const e=await this.Storage.getUserTokens();if(e&&e.length>0){if(this.multiAccount){await this.generateCodeChallenge()}return true}await this.generateCodeChallenge();return false}isMultiAccount(){return this.multiAccount}async logout(){const e=await this.getProfile();await this.Storage.clearSession();const t={detail:e};window.dispatchEvent(new CustomEvent("onLogoutSuccess",t))}async getProfile(e=""){let t;if(e){t=await this.Storage.getUserToken(e)}else{t=await this.Storage.getUserToken()}if(t){return t}return null}async getProfiles(){const e=await this.Storage.getUserTokens();if(e){return e}return null}async removeProfile(e){await this.Storage.removeUserToken(e);await this.Storage.removeGrant(e);return null}async authIMAP(e){const t=await this.getCodeChallege();const n={imap_username:e.imap_username,imap_password:e.imap_password,imap_host:e.imap_host,imap_port:e.imap_port,type:e.type,smtp_host:e.smtp_host,smtp_port:e.smtp_port,provider:e.provider,redirect_uri:this.redirectUri,state:e.state,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(e.smtp_username&&e.smtp_password){n.smtp_username=e.smtp_username;n.smtp_password=e.smtp_password}if(t!=""){n.code_challenge=t;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/imap`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async authEWS(e){const t=await this.getCodeChallege();const n={...e,provider:"ews",redirect_uri:this.redirectUri,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(t!=""){n.code_challenge=t;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/ews`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async detectEmail(e){const t=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/providers/detect?client_id=${this.clientId}&email=${e}`,{method:"POST",headers:new Headers({"content-type":"application/json"})});const n=await t.json();return n}async applicationInfo(){const e=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/applications?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});const t=await e.json();return t.data}async getAvailableProviders(){const e=await fetch(`${this.domain}/connect/providers/find?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});if(e){const t=await e.json();const n=t.data;return n}return null}onLoginSuccess(e){window.addEventListener("onLoginSuccess",(t=>e(t)))}onLogoutSuccess(e){window.addEventListener("onLogoutSuccess",(t=>e(t)))}onLoginFail(e){window.addEventListener("onLoginFail",(t=>e(t)))}onTokenRefreshSuccess(e){window.addEventListener("onTokenRefreshSuccess",(t=>e(t)))}onTokenRefreshFail(e){window.addEventListener("onTokenRefreshFail",(t=>e(t)))}onSessionExpired(e){window.addEventListener("onSessionExpired",(t=>e(t)))}async codeExchange(e){let t=new URLSearchParams(globalThis.window?.location.search);if(e){t=new URLSearchParams(e)}const n=t.get("code");const i=t.get("state");const r=t.get("error");const s=t.get("error_description");const o=t.get("error_code");if(r&&s&&o){const e={detail:{error:r,error_description:s,error_code:o}};window.dispatchEvent(new CustomEvent("onLoginFail",e));window.history.pushState({},document.title,globalThis.window?.location.pathname);return false}if(!n){console.warn("No code found");return false}if(window.opener&&window.name==="uas-popup"){console.warn("Popup window detected");return false}const a=await this.Storage.getPKCE();if(!a){console.warn("No code verifier found");return false}try{const e={client_id:this.clientId,redirect_uri:this.redirectUri,code:n,grant_type:"authorization_code",code_verifier:a};const t=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(e)});const r=await t.json();if(r){if(r.error){const e={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",e));return true}const e=await this.handleCodeExchangeResponse(r);if(!e.valid){const t={detail:e.data};window.dispatchEvent(new CustomEvent("onLoginFail",t));return true}else{if(i){e.data.state=i}const t={detail:e.data};window.dispatchEvent(new CustomEvent("onLoginSuccess",t));window.history.pushState({},document.title,window.location.pathname)}}this.Storage.removePKCE();return true}catch(r){const e={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",e));window.history.pushState({},document.title,globalThis.window?.location.pathname);return false}}async tokenExchange(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const n=t.refresh_token;try{const t={client_id:this.clientId,redirect_uri:this.redirectUri,refresh_token:n,grant_type:"refresh_token"};const i=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(t)});const r=await i.json();if(r){if(r.error){const e={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",e));return true}const t=ne();r.expires_in=t+r.expires_in;this.Storage.setGrant(r,this.multiAccount);const n=await this.validateIDToken(e);if(!n){const e={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",e));return true}const i={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshSuccess",i));return true}this.Storage.removePKCE()}catch(e){const t={detail:e};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",t));return false}}async handleCodeExchangeResponse(e){const t=true;if(e.error){return{data:e,valid:false}}const n=ne();e.expires_in=n+e.expires_in;this.Storage.setGrant(e,this.multiAccount);const i=ce(e.id_token);i.status="authenticated";this.Storage.setUserToken(i);const r=await this.validateIDToken(i.sub);if(!r){return{data:e,valid:false}}return{data:e,valid:t}}async popUp(e){const t=500;const n=600;const i=window.screenX+(window.outerWidth-t)/2;const r=window.screenY+(window.outerHeight-n)/2.5;const s=`uas-popup`;const o=e;const a=window.open(o,s,`width=${t},height=${n},left=${i},top=${r}`);if(!a){return}const c=setInterval((async()=>{if(a.closed){const e={detail:{error_description:"OAuth provider window closed"}};window.dispatchEvent(new CustomEvent("onLoginFail",e));c&&clearInterval(c);return}try{const e=a.location.href.split("?");if(!e[0]){return}const t=a.location.search;a.history.pushState({},document.title,window.location.pathname);if(e[0]===this.redirectUri&&e.length>1){const e=await this.codeExchange(t);a.close();if(e){location.reload()}c&&clearInterval(c);return}}catch(e){return}}),1e3)}async getAccessToken(e=""){const t=ne();const n=await this.Storage.getGrant(e,this.multiAccount);if(!n){return null}const{access_token:i,expires_in:r}=n;const s=i;if(s){if(r&&r>ne()){const e=r-t;if(e>30){return s}}}await this.tokenExchange(e);const o=await this.Storage.getGrant(e,this.multiAccount);return o.access_token}async sse(e,t){const n=t.headers||{};const i=n["Grant-ID"];let r="";if(this.multiAccount){if(!i){this.logout();throw new Error("Grant ID is required for multi account calls")}r=await this.getAccessToken(i)}else{r=await this.getAccessToken()}delete n["Grant-ID"];n["Authorization"]=`Bearer ${r}`;if(!n["content-type"]){n["content-type"]="application/json"}return X(`${this.domain}/${e}`,{...t,headers:n})}async fetch(e,t,n=true,i){let r="";let s=1;if(this.multiAccount){if(!t.grant_id){this.logout();throw new Error("Grant ID is required for multi account calls")}const e=await this.getProfiles();s=e?e.length:1;r=await this.getAccessToken(t.grant_id)}else{r=await this.getAccessToken()}if(!r){throw new Error("Access token not found")}let o=t.headers;if(!Headers.prototype.isPrototypeOf(o)){o=new Headers({Authorization:`Bearer ${r}`,"content-type":"application/json"})}else{o.append("Authorization",`Bearer ${r}`);if(!o.has("content-type")){o.append("content-type","application/json")}}try{if(t?.body){t.body=JSON.stringify(t?.body)}const r=await fetch(`${i||this.domain}/${e}`,{...t,headers:o});if(!n){return r}const a=await(r?.json());const c=await this.isAuthenticatedResponse(r.status,a);if(!c){if(s>1){const e=await this.getProfile(t.grant_id);if(e){e.status="unauthorized";await this.Storage.setUserToken(e);const t={detail:{user:e}};window.dispatchEvent(new CustomEvent("onSessionExpired",t))}}else{const e=await this.Storage.getUserToken();const t={detail:{user:e}};window.dispatchEvent(new CustomEvent("onSessionExpired",t))}this.logout();return}return a}catch(e){throw e}}async fetchRequest(e,t,n,i=true,r,s){const o=await this.isLoggedIn();const a=new URL(e,r??this.domain);const c=new Headers;c.append("Accept","application/json");c.append("Content-Type","application/json");c.append("User-Agent","nylas-identity");if(o){const e=await this.getAccessToken();c.append("Authorization",`Bearer ${e}`)}const l=await fetch(a.toString(),{method:t||"GET",headers:c,mode:"cors",referrer:globalThis.window?.location.origin,body:n?JSON.stringify(n):undefined,...s||{}});if(!i){return l.body}const d=await l.json();return d}async isAuthenticatedResponse(e,t){if(e==401&&t?.error?.type=="token.unauthorized_access"){return false}return true}addAPIKey(e,t,n){this.Storage.setUserToken({aud:"https://api-staging.us.nylas.com/",exp:2e9,email_verified:true,iat:ne(),iss:"",email:t,provider:"virtual-calendar",status:"authenticated",name:t,sub:e});this.Storage.setGrant({grant_id:e,access_token:n,expires_in:2e9},this.multiAccount)}}var de={exports:{}};var ue={};
|
|
1
|
+
import{h as e,F as t,r as n,c as i,H as r,a as s}from"./p-0EQQA0nE.js";import{N as o}from"./p-gXPNb-6F.js";import{N as a}from"./p-Dgl7p7tZ.js";import{d as c,u as l,t as d,a as u,b as h,g as f,e as p,C as g,L as y,i as w,c as b}from"./p-DfIu4gMZ.js";import{o as m,v,E as _,N as E}from"./p-JnnkbSna.js";import{c as k}from"./p-_i6H-yQH.js";c.extend(l);c.extend(d);class x{constructor({nylasApiRequest:e,nylasSchedulerConfigStore:t}){this.groupEventsCache=new Map;this.CACHE_DURATION=1*60*1e3;this.nylasApiRequest=e;this.nylasSchedulerConfigStore=t}async currentUser(){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return null}return this.nylasApiRequest.currentUser()}async getCalendars(){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching calendars: Nylas API Request is not initialized"})}const e=[];let t=null;const n=50;do{const[i,r]=await this.nylasApiRequest.request({method:"GET",path:`calendars?limit=${n}${t?`&page_token=${t}`:""}`});if(r){return h(null,{message:"Error fetching calendars: "+r.message})}if(m(i)){return h(null,{message:"Error fetching calendars: "+i.error?.message})}e.push(...i.data);t=i.next_cursor||null}while(t);this.nylasSchedulerConfigStore.state.calendars=e;return h(e)}async getConfigurationById(e,t=false){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching configuration: Nylas API Request is not initialized"})}if(!t){const t=this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e));if(t){this.nylasSchedulerConfigStore.state.selectedConfiguration=t;return h(t)}}const[n,i]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${e}`});if(i){return h(null,{message:"Error fetching configuration: "+i.message})}if(m(n)){return h(null,{message:"Error fetching configuration: "+n.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=n.data;if(this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((t=>t.id===e?n.data:t))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,n.data]}return h(n.data)}async getConfigurations(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching configurations: Nylas API Request is not initialized"})}const t=50;const[n,i]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations?limit=${t}${e?`&page_token=${e}`:""}`});if(i){return h(null,{message:"Error fetching configurations: "+i.message})}if(m(n)){return h(null,{message:"Error fetching configurations: "+n.error?.message})}this.nylasSchedulerConfigStore.state.configurations=n.data;this.nylasSchedulerConfigStore.state.listConfigurationsNextCursor=n.next_cursor||null;return h(n.data)}async getMasterEventById(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching master event: Nylas API Request is not initialized"})}const t=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const n=t?.event?.calendar_id;if(!n){u("Calendar ID is not present");return h(null,{message:"Error fetching master event: Calendar ID is not present"})}const i=new URLSearchParams;i.append("calendar_id",n);const[r,s]=await this.nylasApiRequest.request({method:"GET",path:`events/${e}?${i.toString()}`});if(s){return h(null,{message:"Error fetching master event: "+s.message})}if(m(r)){return h(null,{message:"Error fetching master event: "+r.error?.message})}const o=this.nylasSchedulerConfigStore.state.masterGroupEvents;if(o[e]){this.nylasSchedulerConfigStore.state.masterGroupEvents[e]=r.data}else{this.nylasSchedulerConfigStore.state.masterGroupEvents={...o,[e]:r.data}}return h(r.data)}async createConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error creating configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations`,body:e});if(n){return h(null,{message:"Error creating configuration: "+n.message})}if(m(t)){return h(null,{message:"Error creating configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=t.data;this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,t.data];return h(t.data)}async updateConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error updating configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"PUT",path:`scheduling/configurations/${e.id}`,body:e});if(n){return h(null,{message:"Error updating configuration: "+n.message})}if(m(t)){return h(null,{message:"Error updating configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.selectedConfiguration=t.data;if(this.nylasSchedulerConfigStore.state.configurations.find((t=>t.id===e.id))){this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.map((n=>n.id===e.id?t.data:n))}else{this.nylasSchedulerConfigStore.state.configurations=[...this.nylasSchedulerConfigStore.state.configurations,t.data]}return h(t.data)}async deleteConfiguration(e){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error deleting configuration: Nylas API Request is not initialized"})}const[t,n]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${e}`});if(n){return h(null,{message:"Error deleting configuration: "+n.message})}if(m(t)){return h(null,{message:"Error deleting configuration: "+t.error?.message})}this.nylasSchedulerConfigStore.state.configurations=this.nylasSchedulerConfigStore.state.configurations.filter((t=>t.id!==e));if(this.nylasSchedulerConfigStore.state.selectedConfiguration?.id===e){this.nylasSchedulerConfigStore.resetSelectedConfiguration()}return h(t.data)}async createGroupEvent(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error creating group event: Nylas API Request is not initialized"})}const[n,i]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${t}/group-events`,body:e});if(i){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error creating group event: "+i.message})}if(m(n)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error creating group event: "+n.error?.message})}this.nylasSchedulerConfigStore.state.selectedGroupEvent=n.data;this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(n.data)}async getGroupEvents(e,t){if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error fetching group events: Nylas API Request is not initialized"})}const n=new URLSearchParams;n.append("show_all","true");const i=this.nylasSchedulerConfigStore.state.calendarViewDateRange;let r;let s;if(i){r=i.start_time;s=i.end_time}else{const e=f((new Date).toISOString(),"week");r=e.startTime.toString();s=e.endTime.toString()}const o=`${e}-${r}-${s}`;const a=this.groupEventsCache.get(o);if(a&&Date.now()-a.timestamp<this.CACHE_DURATION){this.nylasSchedulerConfigStore.state.groupEvents=a.data;return h(a.data)}n.append("start_time",r);n.append("end_time",s);const c=t?.group_booking?.calendar_id;if(c){n.append("calendar_id",c)}const[l,d]=await this.nylasApiRequest.request({method:"GET",path:`scheduling/configurations/${e}/group-events?${n.toString()}`});if(d){return h(null,{message:"Error fetching group events: "+d.message})}if(m(l)){return h(null,{message:"Error fetching group events: "+l.error?.message})}this.groupEventsCache.set(o,{data:l.data,timestamp:Date.now()});this.cleanupExpiredCache();this.nylasSchedulerConfigStore.state.groupEvents=l.data;return h(l.data)}invalidateGroupEventsCache(){this.groupEventsCache.clear()}cleanupExpiredCache(){const e=Date.now();for(const[t,n]of this.groupEventsCache.entries()){if(e-n.timestamp>this.CACHE_DURATION){this.groupEventsCache.delete(t)}}}async updateGroupEventById(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error updating group event: Nylas API Request is not initialized"})}const n=e.id;delete e.id;const[i,r]=await this.nylasApiRequest.request({method:"PATCH",path:`scheduling/configurations/${t}/group-events/${n}`,body:e});if(r){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error updating group event: "+r.message})}if(m(i)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error updating group event: "+i.error?.message})}this.nylasSchedulerConfigStore.state.selectedGroupEvent=i.data;this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(i.data)}async updateGroupEvent(e,t,n){this.nylasSchedulerConfigStore.state.isLoading=true;const i=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const r=i?.event?.master_event_id;const s=i?.event?.id;const o=i?.event?.when?.start_time;const a=i?.group_event_info?.rrule?.[0];const l=a?a.split(";").filter((e=>!e.startsWith("UNTIL"))).join(";"):"";const d=o?c(o*1e3).subtract(1,"minute").format("YYYYMMDDTHHmmss[Z]"):"";if(t==="this"){return this.updateGroupEventById({...e,id:s,recurrence:r?undefined:e.recurrence},n)}else if(t==="future"&&r){const t=await this.createGroupEvent(e,n);const s={location:i?.event?.location,conferencing:i?.event?.conferencing,title:i?.event?.title,description:i?.event?.description,capacity:i?.group_event_info?.capacity,calendar_id:i?.event?.calendar_id,recurrence:l?[l+";UNTIL="+d]:[`RRULE:FREQ=DAILY;UNTIL=${d}`]};await this.updateGroupEventById({...s,id:r},n);return[s,t]}else if(t==="all"){const t=e?.when;const s=i?.event?.when;const o=this.nylasSchedulerConfigStore.state.masterGroupEvents?.[r];let a=o?.when;if(t?.start_time!==s?.start_time){a={...a,start_time:t?.start_time||a?.start_time}}if(t?.end_time!==s?.end_time){a={...a,end_time:t?.end_time||a?.end_time}}if(t?.start_timezone!==s?.start_timezone){a={...a,start_timezone:t?.start_timezone||a?.start_timezone}}if(t?.end_timezone!==s?.end_timezone){a={...a,end_timezone:t?.end_timezone||a?.end_timezone}}return this.updateGroupEventById({...e,when:a,id:r},n)}this.nylasSchedulerConfigStore.state.isLoading=false;throw new Error("Invalid option")}async deleteGroupEvent(e,t,n){this.nylasSchedulerConfigStore.state.isLoading=true;const i=this.nylasSchedulerConfigStore.state.selectedGroupEvent;const r=i?.event?.master_event_id;const s=i?.event?.id;const o=i?.event?.when?.start_time;const a=i?.group_event_info?.rrule?.[0];const l=a?a.split(";").filter((e=>!e.startsWith("UNTIL"))).join(";"):"";const d=o?c(o*1e3).format("YYYYMMDDTHHmmss[Z]"):"";const u={location:i?.event?.location,conferencing:i?.event?.conferencing,title:i?.event?.title,description:i?.event?.description,capacity:i?.group_event_info?.capacity,calendar_id:i?.event?.calendar_id,recurrence:l?[l+";UNTIL="+d]:[`RRULE:UNTIL=${d}`]};if(t==="this"&&s){return this.deleteGroupEventById(s,n)}else if(t==="future"&&r&&s){await this.deleteGroupEventById(s,n);return await this.updateGroupEventById({...u,id:r},n)}else if(t==="all"&&r){return this.deleteGroupEventById(r,n)}this.nylasSchedulerConfigStore.state.isLoading=false;throw new Error("Invalid option")}async deleteGroupEventById(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error deleting group event: Nylas API Request is not initialized"})}const n=new URLSearchParams;const i=this.nylasSchedulerConfigStore.state.selectedConfiguration?.group_booking?.calendar_id;if(i){n.append("calendar_id",i)}const[r,s]=await this.nylasApiRequest.request({method:"DELETE",path:`scheduling/configurations/${t}/group-events/${e}?calendar_id=${i}`});if(s){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error deleting group event: "+s.message})}if(m(r)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error deleting group event: "+r.error?.message})}this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration);this.nylasSchedulerConfigStore.state.isLoading=false;return h(r.data)}async importGroupEvent(e,t){this.nylasSchedulerConfigStore.state.isLoading=true;if(!this.nylasApiRequest){u("Nylas API Request is not initialized");return h(null,{message:"Error importing group event: Nylas API Request is not initialized"})}const n=new URLSearchParams;const i=this.nylasSchedulerConfigStore.state.selectedConfiguration?.group_booking?.calendar_id;if(i){n.append("calendar_id",i)}const[r,s]=await this.nylasApiRequest.request({method:"POST",path:`scheduling/configurations/${t}/import-group-events?${n.toString()}`,body:e});if(s){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error importing group event: "+s.message})}if(m(r)){this.nylasSchedulerConfigStore.state.isLoading=false;return h(null,{message:"Error importing group event: "+r.error?.message})}if(r.data?.imported_events?.length>0){this.invalidateGroupEventsCache();await this.getGroupEvents(t,this.nylasSchedulerConfigStore.state.selectedConfiguration)}this.nylasSchedulerConfigStore.state.isLoading=false;return h(r.data)}}class C{constructor({nylasApiRequest:e,nylasSchedulerConfigStore:t}){this.nylasApiRequest=e;this.nylasSchedulerConfigStore=t}init(){u("NylasSchedulerConfigConnector init")}get schedulerConfigStore(){return this.nylasSchedulerConfigStore}get schedulerConfig(){if(this._schedulerConfigConnector){return this._schedulerConfigConnector}this._schedulerConfigConnector=new x({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:this.nylasSchedulerConfigStore});return this._schedulerConfigConnector}resetStores(){u("NylasSchedulerConfigConnector resetStores");this.nylasSchedulerConfigStore.reset()}async logout(){u("NylasSchedulerConfigConnector logout");this.resetStores()}}function $(e={}){const t={selectedConfiguration:{},configurations:[],groupEvents:[],listConfigurationsNextCursor:null,calendars:[],currentUser:null,action:null,additionalParticipants:[],requiresSlug:false,masterGroupEvents:{},isLoading:false,...e};const n=k(t);function i(){n.set("selectedConfiguration",{...e["selectedConfiguration"]})}n.onChange("action",(async e=>{if(!e){i()}}));n.onChange("selectedConfiguration",(async e=>{const t=n.state.participantFetch;const i=e?.participants;if(!t||!i?.length)return;const r=i.filter((e=>!e.is_organizer&&!!e.email)).map((e=>e.email));if(r.length===0)return;try{const e=n.state.participantFetchGrantId;const i=await t({emails:r,grantId:e});if(!i?.length)return;const s=n.state.additionalParticipants||[];const o=new Set(s.map((e=>e.email)));const a=i.filter((e=>!o.has(e.email)));if(a.length>0){n.set("additionalParticipants",[...s,...a])}}catch(e){u("[scheduler-config-store] participantFetch failed",e)}}));return{...n,resetSelectedConfiguration:i}}class S{get(e){return new Promise((t=>{const n=globalThis.window?.localStorage.getItem(e);if(!n){t(null)}else{t(JSON.parse(n))}}))}async remove(e){globalThis.window?.localStorage.removeItem(e);return new Promise((e=>{e(null)}))}set(e,t){globalThis.window?.localStorage.setItem(e,JSON.stringify(t));return new Promise((e=>{e(null)}))}}const T="pkce";const P="grant";const I="user";const R=e=>{if(typeof globalThis.btoa==="function"&&typeof TextEncoder!=="undefined"){const t=(new TextEncoder).encode(e);let n="";for(let e=0;e<t.length;e++){n+=String.fromCharCode(t[e])}return globalThis.btoa(n)}if(typeof globalThis.Buffer!=="undefined"){return globalThis.Buffer.from(e,"utf8").toString("base64")}throw new Error("Base64 encoding is not supported in this environment")};const A=e=>{if(typeof globalThis.atob==="function"&&typeof TextDecoder!=="undefined"){const t=globalThis.atob(e);const n=new Uint8Array(t.length);for(let e=0;e<t.length;e++){n[e]=t.charCodeAt(e)}return(new TextDecoder).decode(n)}if(typeof globalThis.Buffer!=="undefined"){return globalThis.Buffer.from(e,"base64").toString("utf8")}throw new Error("Base64 decoding is not supported in this environment")};class q{Storage=new S;constructor(e){if(e){this.Storage=e;return}}setPKCE(e){const t=R(e);this.Storage.set(T,t)}async getPKCE(){try{const e=await this.Storage.get(T);if(e){return A(e)}}catch(e){return null}return null}removePKCE(){this.Storage.remove(T)}setGrant(e,t=false){const{grant_id:n}=e;this.Storage.set(`${P}${t?"-"+n:""}`,e)}removeGrant(e,t=false){this.Storage.remove(`${P}${t?"-"+e:""}`)}async getGrant(e,t=false){const n=await this.Storage.get(`${P}${t?"-"+e:""}`);if(n){return n}return null}async setUserToken(e){const t=await this.getUserTokens();if(t){const n=t.find((t=>t.sub===e.sub));if(!n){const n=[...t,e];this.Storage.set(I,n)}else{const n=t.map((t=>{if(t.sub===e.sub){t=e}return t}));this.Storage.set(I,n)}}else{this.Storage.set(I,[e])}}async getUserToken(e=""){const t=await this.Storage.get(I);if(t){if(e===""){return t[0]}const n=t.find((t=>t.sub===e));return n}return null}async getUserTokens(){const e=await this.Storage.get(I);if(e){return e}return null}removeUserTokens(){this.Storage.remove(I)}async removeUserToken(e){const t=await this.getUserTokens();const n=t?.filter((t=>t.sub!==e));this.Storage.set(I,n)}async clearSession(){const e=await this.getUserTokens();e?.forEach((e=>{this.removeGrant(e.sub)}));this.removePKCE();this.removeUserTokens()}}class N{databaseName="identity-db";storeName="identity";get(e){const t=this;return new Promise(((n,i)=>{t.openDatabase().then((function(r){const s=r.transaction(t.storeName,"readwrite");const o=s.objectStore(t.storeName);const a=o.get(e);a.onsuccess=()=>{n(a.result)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}))}))}async remove(e){const t=this;return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onupgradeneeded=function(e){const n=e.target.result;n.createObjectStore(t.storeName)};r.onerror=()=>{i(r.error)};r.onsuccess=t=>{const r=t.target.result;const s=r.transaction(this.storeName,"readwrite");const o=s.objectStore(this.storeName);const a=o.delete(e);a.onsuccess=()=>{n(null)};a.onerror=()=>{i(a.error)};s.oncomplete=()=>{r.close()}}}))}set(e,t){return new Promise(((n,i)=>{const r=indexedDB.open(this.databaseName);r.onerror=()=>{i(r.error)};r.onupgradeneeded=e=>{const t=e.target.result;t.createObjectStore(this.storeName)};r.onsuccess=r=>{const s=r.target.result;const o=s.transaction(this.storeName,"readwrite");const a=o.objectStore(this.storeName);const c=a.put(t,e);c.onsuccess=()=>{n(t)};c.onerror=()=>{i(c.error)};o.oncomplete=()=>{s.close()}}}))}openDatabase(){const e=this;return new Promise((function(t,n){const i=indexedDB.open(e.databaseName,2);i.onupgradeneeded=function(t){const n=t.target.result;n.createObjectStore(e.storeName)};i.onsuccess=function(e){t(e.target.result)};i.onerror=function(e){n(e.error)}}))}}var U;var L=new Uint8Array(16);function j(){if(!U){U=typeof crypto!=="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!=="undefined"&&typeof msCrypto.getRandomValues==="function"&&msCrypto.getRandomValues.bind(msCrypto);if(!U){throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported")}}return U(L)}var z=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function O(e){return typeof e==="string"&&z.test(e)}var D=[];for(var F=0;F<256;++F){D.push((F+256).toString(16).substr(1))}function G(e){var t=arguments.length>1&&arguments[1]!==undefined?arguments[1]:0;var n=(D[e[t+0]]+D[e[t+1]]+D[e[t+2]]+D[e[t+3]]+"-"+D[e[t+4]]+D[e[t+5]]+"-"+D[e[t+6]]+D[e[t+7]]+"-"+D[e[t+8]]+D[e[t+9]]+"-"+D[e[t+10]]+D[e[t+11]]+D[e[t+12]]+D[e[t+13]]+D[e[t+14]]+D[e[t+15]]).toLowerCase();if(!O(n)){throw TypeError("Stringified UUID is invalid")}return n}function H(e,t,n){e=e||{};var i=e.random||(e.rng||j)();i[6]=i[6]&15|64;i[8]=i[8]&63|128;return G(i)}async function B(e,t){const n=e.getReader();let i;while(!(i=await n.read()).done){t(i.value)}}function M(e){let t;let n;let i;let r=false;return function s(o){if(t===undefined){t=o;n=0;i=-1}else{t=Y(t,o)}const a=t.length;let c=0;while(n<a){if(r){if(t[n]===10){c=++n}r=false}let s=-1;for(;n<a&&s===-1;++n){switch(t[n]){case 58:if(i===-1){i=n-c}break;case 13:r=true;case 10:s=n;break}}if(s===-1){break}e(t.subarray(c,s),i);c=n;i=-1}if(c===a){t=undefined}else if(c!==0){t=t.subarray(c);n-=c}}}function J(e,t,n){let i=V();const r=new TextDecoder;return function s(o,a){if(o.length===0){n===null||n===void 0?void 0:n(i);i=V()}else if(a>0){const n=r.decode(o.subarray(0,a));const s=a+(o[a+1]===32?2:1);const c=r.decode(o.subarray(s));switch(n){case"data":i.data=i.data?i.data+"\n"+c:c;break;case"event":i.event=c;break;case"id":e(i.id=c);break;case"retry":const n=parseInt(c,10);if(!isNaN(n)){t(i.retry=n)}break}}}}function Y(e,t){const n=new Uint8Array(e.length+t.length);n.set(e);n.set(t,e.length);return n}function V(){return{data:"",event:"",id:"",retry:undefined}}var W=undefined&&undefined.__rest||function(e,t){var n={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0)n[i]=e[i];if(e!=null&&typeof Object.getOwnPropertySymbols==="function")for(var r=0,i=Object.getOwnPropertySymbols(e);r<i.length;r++){if(t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r]))n[i[r]]=e[i[r]]}return n};const K="text/event-stream";const Q=1e3;const Z="last-event-id";function X(e,t){var{signal:n,headers:i,onopen:r,onmessage:s,onclose:o,onerror:a,openWhenHidden:c,fetch:l}=t,d=W(t,["signal","headers","onopen","onmessage","onclose","onerror","openWhenHidden","fetch"]);return new Promise(((t,u)=>{const h=Object.assign({},i);if(!h.accept){h.accept=K}let f;function p(){f.abort();if(!document.hidden){v()}}if(!c){document.addEventListener("visibilitychange",p)}let g=Q;let y=0;function w(){document.removeEventListener("visibilitychange",p);window.clearTimeout(y);f.abort()}n===null||n===void 0?void 0:n.addEventListener("abort",(()=>{w();t()}));const b=l!==null&&l!==void 0?l:window.fetch;const m=r!==null&&r!==void 0?r:ee;async function v(){var n;f=new AbortController;try{const n=await b(e,Object.assign(Object.assign({},d),{headers:h,signal:f.signal}));await m(n);await B(n.body,M(J((e=>{if(e){h[Z]=e}else{delete h[Z]}}),(e=>{g=e}),s)));o===null||o===void 0?void 0:o();w();t()}catch(e){if(!f.signal.aborted){try{const t=(n=a===null||a===void 0?void 0:a(e))!==null&&n!==void 0?n:g;window.clearTimeout(y);y=window.setTimeout(v,t)}catch(e){w();u(e)}}}}v()}))}function ee(e){const t=e.headers.get("content-type");if(!(t===null||t===void 0?void 0:t.startsWith(K))){throw new Error(`Expected content-type to be ${K}, Actual: ${t}`)}}function te(e){return e.replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}function ne(){return Math.floor(Date.now()/1e3)}async function ie(e){const t=(new TextEncoder).encode(e);const n=await crypto.subtle.digest("SHA-256",t);const i=Array.from(new Uint8Array(n));const r=i.map((e=>e.toString(16).padStart(2,"0"))).join("");return r}function re(e){this.message=e}re.prototype=new Error,re.prototype.name="InvalidCharacterError";var se="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(e){var t=String(e).replace(/=+$/,"");if(t.length%4==1)throw new re("'atob' failed: The string to be decoded is not correctly encoded.");for(var n,i,r=0,s=0,o="";i=t.charAt(s++);~i&&(n=r%4?64*n+i:i,r++%4)?o+=String.fromCharCode(255&n>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return o};function oe(e){var t=e.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(e){return decodeURIComponent(se(e).replace(/(.)/g,(function(e,t){var n=t.charCodeAt(0).toString(16).toUpperCase();return n.length<2&&(n="0"+n),"%"+n})))}(t)}catch(e){return se(t)}}function ae(e){this.message=e}function ce(e,t){if("string"!=typeof e)throw new ae("Invalid token specified");var n=true===(t=t||{}).header?0:1;try{return JSON.parse(oe(e.split(".")[n]))}catch(e){throw new ae("Invalid token specified: "+e.message)}}ae.prototype=new Error,ae.prototype.name="InvalidTokenError";class le{clientId;redirectUri;accessType="online";domain="http://api.nylas.com";versioned=false;Storage;hosted=false;multiAccount=false;loginId="";constructor(e){this.clientId=e.clientId;this.redirectUri=e.redirectUri;if(e.domain){this.domain=e.domain;const t=this.domain.substring(this.domain.length-3);if(t.includes("/v")){this.versioned=true}}if(e.multiAccount){this.multiAccount=e.multiAccount}if(e.sw){const e=new N;this.Storage=new q(e)}else{this.Storage=new q}if(e.accessType){this.accessType=e.accessType}if(e.loginId){this.loginId=e.loginId}if(e.hosted){this.hosted=e.hosted}if(e.disableInitCodeExchange!==true){this.codeExchange(null)}}async validateAccessToken(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const{access_token:n}=t;try{const e=await fetch(`${this.domain}/connect/tokeninfo?access_token=${n}`,{method:"GET"});const t=await e.json();if(!t.data){return false}return true}catch(e){return false}}async validateIDToken(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const{id_token:n}=t;try{const e=await fetch(`${this.domain}/connect/tokeninfo?id_token=${n}`,{method:"GET"});if(e.status!==200){return false}const t=await e.json();if(!t.data){return false}return true}catch(e){return false}}getDomain(){return this.domain}async auth(e){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){await this.hostedSetCodeChallenge()}const t=await this.generateAuthURL(e);if(e.popup){this.popUp(t);return}return t}async generateAuthURL(e){const t=await this.getCodeChallege();let n=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(t){n+=`&code_challenge=${t}&code_challenge_method=S256&options=rotate_refresh_token`}if(e.provider){n+=`&provider=${e.provider}`}if(e.loginHint){n+=`&login_hint=${e.loginHint}`;if(e.includeGrantScopes){n+=`&include_grant_scopes=${e.includeGrantScopes}`}}if(e.scope){n+=`&scope=${e.scope.join(" ")}`}if(e.prompt){n+=`&prompt=${e.prompt}`}if(e.metadata){n+=`&metadata=${e.metadata}`}if(e.state||this.loginId){n+=`&state=${this.loginId?this.loginId:e.state}`}return n}async generateReauthURL(e,t){if(!e){throw new Error("Grant ID is required")}const n=await this.Storage.getUserToken(e);const i=await this.getCodeChallege();let r=`${this.domain}/connect/auth?client_id=${this.clientId}&redirect_uri=${this.redirectUri}&access_type=${this.accessType}&response_type=code`;if(i){r+=`&code_challenge=${i}&code_challenge_method=S256&options=rotate_refresh_token`}if(n?.provider){r+=`&provider=${n.provider}`}if(n?.email){r+=`&login_hint=${n.email}`}if(t){r+=`&scope=${t.join(" ")}`}return r}async generateCodeChallenge(){const e=await this.Storage.getPKCE();if(e){return}const t=H();this.Storage.setPKCE(t);return}async hostedSetCodeChallenge(){if(!this.hosted){throw console.error("Method only used with hosted flag enabled")}const e=new URLSearchParams(globalThis.window?.location.search);const t=e.get("code_challenge");if(!t){const e=await this.Storage.getPKCE();if(e){return}console.warn("Code challenge is recomended");return}this.Storage.setPKCE(t)}async getCodeChallege(){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){const e=new URLSearchParams(globalThis.window?.location.search);const t=e.get("code_challenge");if(!t){console.warn("Code challenge is recomended");return""}return t}const e=await this.Storage.getPKCE();if(e){const t=await ie(e);let n=btoa(unescape(encodeURIComponent(t)));n=te(n);return n}return""}async isLoggedIn(){if(this.hosted&&(this.domain===globalThis.window?.location.origin||this.versioned&&this.domain.includes(globalThis.window?.location.origin))){return false}const e=await this.Storage.getUserTokens();if(e&&e.length>0){if(this.multiAccount){await this.generateCodeChallenge()}return true}await this.generateCodeChallenge();return false}isMultiAccount(){return this.multiAccount}async logout(){const e=await this.getProfile();await this.Storage.clearSession();const t={detail:e};window.dispatchEvent(new CustomEvent("onLogoutSuccess",t))}async getProfile(e=""){let t;if(e){t=await this.Storage.getUserToken(e)}else{t=await this.Storage.getUserToken()}if(t){return t}return null}async getProfiles(){const e=await this.Storage.getUserTokens();if(e){return e}return null}async removeProfile(e){await this.Storage.removeUserToken(e);await this.Storage.removeGrant(e);return null}async authIMAP(e){const t=await this.getCodeChallege();const n={imap_username:e.imap_username,imap_password:e.imap_password,imap_host:e.imap_host,imap_port:e.imap_port,type:e.type,smtp_host:e.smtp_host,smtp_port:e.smtp_port,provider:e.provider,redirect_uri:this.redirectUri,state:e.state,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(e.smtp_username&&e.smtp_password){n.smtp_username=e.smtp_username;n.smtp_password=e.smtp_password}if(t!=""){n.code_challenge=t;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/imap`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async authEWS(e){const t=await this.getCodeChallege();const n={...e,provider:"ews",redirect_uri:this.redirectUri,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(t!=""){n.code_challenge=t;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/ews`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async authNylas(e){const t=await this.getCodeChallege();const n={...e,provider:"nylas",redirect_uri:this.redirectUri,public_application_id:this.clientId,access_type:this.accessType};if(this.loginId){n.id=this.loginId}if(t!=""){n.code_challenge=t;n.code_challenge_method="S256"}const i=await fetch(`${this.domain}/connect/login/nylas`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(n)});const r=await i.json();return r}async detectEmail(e){const t=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/providers/detect?client_id=${this.clientId}&email=${e}`,{method:"POST",headers:new Headers({"content-type":"application/json"})});const n=await t.json();return n}async applicationInfo(){const e=await fetch(`${this.versioned?this.domain:this.domain+"/connect"}/applications?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});const t=await e.json();return t.data}async getAvailableProviders(){const e=await fetch(`${this.domain}/connect/providers/find?client_id=${this.clientId}`,{method:"GET",headers:new Headers({"content-type":"application/json"})});if(e){const t=await e.json();const n=t.data;return n}return null}onLoginSuccess(e){window.addEventListener("onLoginSuccess",(t=>e(t)))}onLogoutSuccess(e){window.addEventListener("onLogoutSuccess",(t=>e(t)))}onLoginFail(e){window.addEventListener("onLoginFail",(t=>e(t)))}onTokenRefreshSuccess(e){window.addEventListener("onTokenRefreshSuccess",(t=>e(t)))}onTokenRefreshFail(e){window.addEventListener("onTokenRefreshFail",(t=>e(t)))}onSessionExpired(e){window.addEventListener("onSessionExpired",(t=>e(t)))}async codeExchange(e){let t=new URLSearchParams(globalThis.window?.location.search);if(e){t=new URLSearchParams(e)}const n=t.get("code");const i=t.get("state");const r=t.get("error");const s=t.get("error_description");const o=t.get("error_code");if(r&&s&&o){const e={detail:{error:r,error_description:s,error_code:o}};window.dispatchEvent(new CustomEvent("onLoginFail",e));window.history.pushState({},document.title,globalThis.window?.location.pathname);return false}if(!n){console.warn("No code found");return false}if(window.opener&&window.name==="uas-popup"){console.warn("Popup window detected");return false}const a=await this.Storage.getPKCE();if(!a){console.warn("No code verifier found");return false}try{const e={client_id:this.clientId,redirect_uri:this.redirectUri,code:n,grant_type:"authorization_code",code_verifier:a};const t=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(e)});const r=await t.json();if(r){if(r.error){const e={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",e));return true}const e=await this.handleCodeExchangeResponse(r);if(!e.valid){const t={detail:e.data};window.dispatchEvent(new CustomEvent("onLoginFail",t));return true}else{if(i){e.data.state=i}const t={detail:e.data};window.dispatchEvent(new CustomEvent("onLoginSuccess",t));window.history.pushState({},document.title,window.location.pathname)}}this.Storage.removePKCE();return true}catch(r){const e={detail:r};window.dispatchEvent(new CustomEvent("onLoginFail",e));window.history.pushState({},document.title,globalThis.window?.location.pathname);return false}}async tokenExchange(e=""){const t=await this.Storage.getGrant(e,this.multiAccount);if(!t){return false}const n=t.refresh_token;try{const t={client_id:this.clientId,redirect_uri:this.redirectUri,refresh_token:n,grant_type:"refresh_token"};const i=await fetch(`${this.domain}/connect/token`,{method:"POST",headers:new Headers({"content-type":"application/json"}),body:JSON.stringify(t)});const r=await i.json();if(r){if(r.error){const e={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",e));return true}const t=ne();r.expires_in=t+r.expires_in;this.Storage.setGrant(r,this.multiAccount);const n=await this.validateIDToken(e);if(!n){const e={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",e));return true}const i={detail:r};window.dispatchEvent(new CustomEvent("onTokenRefreshSuccess",i));return true}this.Storage.removePKCE()}catch(e){const t={detail:e};window.dispatchEvent(new CustomEvent("onTokenRefreshFail",t));return false}}async handleCodeExchangeResponse(e){const t=true;if(e.error){return{data:e,valid:false}}const n=ne();e.expires_in=n+e.expires_in;this.Storage.setGrant(e,this.multiAccount);const i=ce(e.id_token);i.status="authenticated";this.Storage.setUserToken(i);const r=await this.validateIDToken(i.sub);if(!r){return{data:e,valid:false}}return{data:e,valid:t}}async popUp(e){const t=500;const n=600;const i=window.screenX+(window.outerWidth-t)/2;const r=window.screenY+(window.outerHeight-n)/2.5;const s=`uas-popup`;const o=e;const a=window.open(o,s,`width=${t},height=${n},left=${i},top=${r}`);if(!a){return}const c=setInterval((async()=>{if(a.closed){const e={detail:{error_description:"OAuth provider window closed"}};window.dispatchEvent(new CustomEvent("onLoginFail",e));c&&clearInterval(c);return}try{const e=a.location.href.split("?");if(!e[0]){return}const t=a.location.search;a.history.pushState({},document.title,window.location.pathname);if(e[0]===this.redirectUri&&e.length>1){const e=await this.codeExchange(t);a.close();if(e){location.reload()}c&&clearInterval(c);return}}catch(e){return}}),1e3)}async getAccessToken(e=""){const t=ne();const n=await this.Storage.getGrant(e,this.multiAccount);if(!n){return null}const{access_token:i,expires_in:r}=n;const s=i;if(s){if(r&&r>ne()){const e=r-t;if(e>30){return s}}}await this.tokenExchange(e);const o=await this.Storage.getGrant(e,this.multiAccount);return o.access_token}async sse(e,t){const n=t.headers||{};const i=n["Grant-ID"];let r="";if(this.multiAccount){if(!i){this.logout();throw new Error("Grant ID is required for multi account calls")}r=await this.getAccessToken(i)}else{r=await this.getAccessToken()}delete n["Grant-ID"];n["Authorization"]=`Bearer ${r}`;if(!n["content-type"]){n["content-type"]="application/json"}return X(`${this.domain}/${e}`,{...t,headers:n})}async fetch(e,t,n=true,i){let r="";let s=1;if(this.multiAccount){if(!t.grant_id){this.logout();throw new Error("Grant ID is required for multi account calls")}const e=await this.getProfiles();s=e?e.length:1;r=await this.getAccessToken(t.grant_id)}else{r=await this.getAccessToken()}if(!r){throw new Error("Access token not found")}let o=t.headers;if(!Headers.prototype.isPrototypeOf(o)){o=new Headers({Authorization:`Bearer ${r}`,"content-type":"application/json"})}else{o.append("Authorization",`Bearer ${r}`);if(!o.has("content-type")){o.append("content-type","application/json")}}try{if(t?.body){t.body=JSON.stringify(t?.body)}const r=await fetch(`${i||this.domain}/${e}`,{...t,headers:o});if(!n){return r}const a=await(r?.json());const c=await this.isAuthenticatedResponse(r.status,a);if(!c){if(s>1){const e=await this.getProfile(t.grant_id);if(e){e.status="unauthorized";await this.Storage.setUserToken(e);const t={detail:{user:e}};window.dispatchEvent(new CustomEvent("onSessionExpired",t))}}else{const e=await this.Storage.getUserToken();const t={detail:{user:e}};window.dispatchEvent(new CustomEvent("onSessionExpired",t))}this.logout();return}return a}catch(e){throw e}}async fetchRequest(e,t,n,i=true,r,s){const o=await this.isLoggedIn();const a=new URL(e,r??this.domain);const c=new Headers;c.append("Accept","application/json");c.append("Content-Type","application/json");c.append("User-Agent","nylas-identity");if(o){const e=await this.getAccessToken();c.append("Authorization",`Bearer ${e}`)}const l=await fetch(a.toString(),{method:t||"GET",headers:c,mode:"cors",referrer:globalThis.window?.location.origin,body:n?JSON.stringify(n):undefined,...s||{}});if(!i){return l.body}const d=await l.json();return d}async isAuthenticatedResponse(e,t){if(e==401&&t?.error?.type=="token.unauthorized_access"){return false}return true}addAPIKey(e,t,n){this.Storage.setUserToken({aud:"https://api-staging.us.nylas.com/",exp:2e9,email_verified:true,iat:ne(),iss:"",email:t,provider:"virtual-calendar",status:"authenticated",name:t,sub:e});this.Storage.setGrant({grant_id:e,access_token:n,expires_in:2e9},this.multiAccount)}}var de={exports:{}};var ue={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react.production.min.js
|
|
@@ -7,5 +7,5 @@ import{h as e,F as t,r as n,c as i,H as r,a as s}from"./p-0EQQA0nE.js";import{N
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var he;function fe(){if(he)return ue;he=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.iterator;function h(e){if(null===e||"object"!==typeof e)return null;e=u&&e[u]||e["@@iterator"];return"function"===typeof e?e:null}var f={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function y(e,t,n){this.props=e;this.context=t;this.refs=g;this.updater=n||f}y.prototype.isReactComponent={};y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function w(){}w.prototype=y.prototype;function b(e,t,n){this.props=e;this.context=t;this.refs=g;this.updater=n||f}var m=b.prototype=new w;m.constructor=b;p(m,y.prototype);m.isPureReactComponent=true;var v=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},k={key:true,ref:true,__self:true,__source:true};function x(t,n,i){var r,s={},o=null,a=null;if(null!=n)for(r in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(o=""+n.key),n)_.call(n,r)&&!k.hasOwnProperty(r)&&(s[r]=n[r]);var c=arguments.length-2;if(1===c)s.children=i;else if(1<c){for(var l=Array(c),d=0;d<c;d++)l[d]=arguments[d+2];s.children=l}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)void 0===s[r]&&(s[r]=c[r]);return{$$typeof:e,type:t,key:o,ref:a,props:s,_owner:E.current}}function C(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}function $(t){return"object"===typeof t&&null!==t&&t.$$typeof===e}function S(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}var T=/\/+/g;function P(e,t){return"object"===typeof e&&null!==e&&null!=e.key?S(""+e.key):t.toString(36)}function I(n,i,r,s,o){var a=typeof n;if("undefined"===a||"boolean"===a)n=null;var c=false;if(null===n)c=true;else switch(a){case"string":case"number":c=true;break;case"object":switch(n.$$typeof){case e:case t:c=true}}if(c)return c=n,o=o(c),n=""===s?"."+P(c,0):s,v(o)?(r="",null!=n&&(r=n.replace(T,"$&/")+"/"),I(o,i,r,"",(function(e){return e}))):null!=o&&($(o)&&(o=C(o,r+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+n)),i.push(o)),1;c=0;s=""===s?".":s+":";if(v(n))for(var l=0;l<n.length;l++){a=n[l];var d=s+P(a,l);c+=I(a,i,r,d,o)}else if(d=h(n),"function"===typeof d)for(n=d.call(n),l=0;!(a=n.next()).done;)a=a.value,d=s+P(a,l++),c+=I(a,i,r,d,o);else if("object"===a)throw i=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return c}function R(e,t,n){if(null==e)return e;var i=[],r=0;I(e,i,"","",(function(e){return t.call(n,e,r++)}));return i}function A(e){if(-1===e._status){var t=e._result;t=t();t.then((function(t){if(0===e._status||-1===e._status)e._status=1,e._result=t}),(function(t){if(0===e._status||-1===e._status)e._status=2,e._result=t}));-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var q={current:null},N={transition:null},U={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:N,ReactCurrentOwner:E};ue.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;R(e,(function(){t++}));return t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!$(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Component=y;ue.Fragment=n;ue.Profiler=r;ue.PureComponent=b;ue.StrictMode=i;ue.Suspense=c;ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U;ue.cloneElement=function(t,n,i){if(null===t||void 0===t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=p({},t.props),s=t.key,o=t.ref,a=t._owner;if(null!=n){void 0!==n.ref&&(o=n.ref,a=E.current);void 0!==n.key&&(s=""+n.key);if(t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in n)_.call(n,l)&&!k.hasOwnProperty(l)&&(r[l]=void 0===n[l]&&void 0!==c?c[l]:n[l])}var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){c=Array(l);for(var d=0;d<l;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:e,type:t.type,key:s,ref:o,props:r,_owner:a}};ue.createContext=function(e){e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};e.Provider={$$typeof:s,_context:e};return e.Consumer=e};ue.createElement=x;ue.createFactory=function(e){var t=x.bind(null,e);t.type=e;return t};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:a,render:e}};ue.isValidElement=$;ue.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}};ue.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}};ue.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}};ue.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ue.useCallback=function(e,t){return q.current.useCallback(e,t)};ue.useContext=function(e){return q.current.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e){return q.current.useDeferredValue(e)};ue.useEffect=function(e,t){return q.current.useEffect(e,t)};ue.useId=function(){return q.current.useId()};ue.useImperativeHandle=function(e,t,n){return q.current.useImperativeHandle(e,t,n)};ue.useInsertionEffect=function(e,t){return q.current.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return q.current.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return q.current.useMemo(e,t)};ue.useReducer=function(e,t,n){return q.current.useReducer(e,t,n)};ue.useRef=function(e){return q.current.useRef(e)};ue.useState=function(e){return q.current.useState(e)};ue.useSyncExternalStore=function(e,t,n){return q.current.useSyncExternalStore(e,t,n)};ue.useTransition=function(){return q.current.useTransition()};ue.version="18.2.0";return ue}var pe;function ge(){if(pe)return de.exports;pe=1;{de.exports=fe()}return de.exports}ge();const ye=({authenticationUrl:t,authError:n})=>e("div",{class:"login-required",part:"nse__login-required login-component"},e("div",{class:"card",part:"nse__login-required-card"},n&&e("div",{class:"login-error-banner",part:"nse__login-required-error",role:"alert"},e("warning-icon",{width:"16",height:"16"}),e("span",null,n)),e("p",{part:"nse__login-required-text"},"Log into your account to use the Scheduler Editor."),e("button",{class:"google-button",part:"nse__login-required-google-button",onClick:async e=>{e.preventDefault();const n=await t("google");if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},e("span",{class:"icon"},e("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),e("button",{class:"microsoft-button",part:"nse__login-required-microsoft-button",onClick:async e=>{e.preventDefault();const n=await t("microsoft");if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},e("span",{class:"icon"},e("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),e("button",{class:"other-provider-button",part:"nse__login-required-other-provider-button",onClick:async e=>{e.preventDefault();const n=await t();if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},"View all providers ",e("chevron-icon",{width:"17",height:"17"})),e("small",{class:"disclaimer-text",part:"nse__login-required-disclaimer-text"},"* You will be redirected to authenticate your account.")));function we({currentUser:n,calendars:i,selectedEventType:r}){const s=i?.find((e=>e.is_primary))||i?.[0];switch(r){case g.one_on_one:case g.max_availability:case g.max_fairness:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",null),e("nylas-event-duration",null),e("nylas-event-location",{userProvider:n.provider}))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}case g.collective:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",null),e("nylas-event-duration",null),e("nylas-event-location",{userProvider:n.provider}))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),e("nylas-additional-participants",{name:"participants",eventParticipants:[{name:n?.name||n?.email,email:n?.email||"",is_organizer:true}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}))}case g.group:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",{noTemplates:true}),e("nylas-event-description",{noTemplates:true,hideAutoPopulateButton:true}),e("nylas-event-location",{userProvider:n.provider}),e("nylas-event-timeslot",{name:"event-timeslot"}),e("nylas-event-capacity",null))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-additional-participants",{name:"participants",eventParticipants:[{name:n?.name||n?.email,email:n?.email||"",is_organizer:true}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),e("nylas-page-name",{requirePageName:true,pageName:"Group events page"}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}}}const be=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}:host nylas-notification{position:absolute;top:0;right:0}@media screen and (max-width: 768px){:host{width:-moz-available;width:-webkit-fill-available;width:fill-available;min-width:325px}}div.scheduler-editor-content{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content{height:auto}}div.scheduler-editor-content slot[name=login-required]{height:inherit}div.scheduler-editor-content--group{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content--group{height:auto}}div.scheduler-editor-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900);min-width:924px}@media screen and (max-width: 768px){div.scheduler-editor-header{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;margin:0;font-size:18px;line-height:24px;font-weight:600}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer;color:var(--nylas-base-900)}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary);background-color:transparent}div.scheduler-editor-header button:disabled{cursor:not-allowed}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button){border:none;padding:4px;margin-right:8px}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button):hover{outline:none;color:var(--nylas-primary)}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){min-width:132px}@media screen and (max-width: 768px){div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){width:-webkit-fill-available;width:fill-available;width:-moz-available}}nylas-select-event-type{height:inherit;width:calc(924px + 2rem)}@media screen and (max-width: 768px){nylas-select-event-type{width:auto}}nylas-editor-tabs,nylas-editor-tabs-group{width:auto;height:inherit}nylas-editor-tabs .row,nylas-editor-tabs-group .row{display:flex;gap:1rem}nylas-editor-tabs .composable,nylas-editor-tabs-group .composable{height:inherit;overflow:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs],nylas-editor-tabs-group nylas-event-info div[slot=inputs],nylas-editor-tabs-group nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;color:var(--nylas-base-900);max-width:fit-content;align-self:center}.login-required{height:inherit;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.login-required .login-error-banner{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;margin-bottom:1rem;background-color:var(--nylas-error-50, #fef2f2);border:1px solid var(--nylas-error-200, #fecaca);border-radius:5px;color:var(--nylas-error-700, #b91c1c);font-size:0.875rem;line-height:1.25rem}.login-required .login-error-banner svg{flex-shrink:0;color:var(--nylas-error-500, #ef4444)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center;color:var(--nylas-base-900)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}@media screen and (max-width: 768px){.login-required{height:auto}}.list-configurations{padding:2rem;height:inherit;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}@media screen and (max-width: 768px){.list-configurations{height:auto;padding:2rem 1rem}}';const me=class{constructor(e){n(this,e);this.init=i(this,"init",7);this.loggedIn=i(this,"loggedIn",7);this.loggedOut=i(this,"loggedOut",7);this.schedulerConfigCloseClicked=i(this,"schedulerConfigCloseClicked",7);this.nylasSchedulerEditorError=i(this,"nylasSchedulerEditorError",6);this.eventOverrides={};this.schedulerPreviewLink="";this.mode="app";this.hideEditorTabs=[];this.requiresSlug=false;this.enableUserFeedback=true;this.nylasBranding=true;this.enableNotetaker=false;this.enableEventTypes={one_on_one:true,collective:true,max_fairness:true,max_availability:true,group:true};this.automaticComponentRegistration=true;this.selectedLanguage=this.defaultLanguage||y.en;this.langVersion=0;this.version=v;this.handleSchedulerConfigCloseClicked=e=>{const t=this.schedulerConfigCloseClicked.emit(this.host);if("schedulerConfigCloseClicked"in this.eventOverrides){this.eventOverrides.schedulerConfigCloseClicked(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){localStorage.removeItem("grant");localStorage.removeItem("user");window.location.reload()}};this.authenticationUrl=async e=>{if(!this.nylasApiRequest){const e="Unable to authenticate. API request handler is not initialized.";p(`[nylas-scheduler-editor] ${e}`);this.authError=e;this.nylasSchedulerEditorError.emit({notification:{id:"auth-not-initialized",type:E.Error,title:"Authentication Error",category:_.Auth,description:e,ttl:"none"},host:this.host});return""}try{const t=await this.nylasApiRequest.authenticationUrl({provider:e});if(!t){const e="Unable to get authentication URL. Please check your configuration and try again.";this.authError=e;this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-failed",type:E.Error,title:"Authentication Error",category:_.Auth,description:e,ttl:"none"},host:this.host})}return t||""}catch(e){const t=`Authentication failed: ${e instanceof Error?e.message:"Unknown error"}`;p(`[nylas-scheduler-editor] ${t}`);this.authError=t;this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-exception",type:E.Error,title:"Authentication Error",category:_.Auth,description:t,ttl:"none"},host:this.host});return""}}}connectedCallback(){u(`[nylas-scheduler-editor] connectedCallback`);queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}async componentWillLoad(){u(`[nylas-scheduler-editor] componentWillLoad`);await Promise.resolve();const e=this.additionalParticipants?.filter((e=>{const t=e.calendars?.length>0?e.calendars.filter((e=>e.id&&e.name)):[];if(e.name&&e.email&&t.length>0){return{name:e.name,email:e.email,calendars:t}}}));this.stores={schedulerConfig:$({...this.defaultSchedulerConfigState,additionalParticipants:e||[],participantFetch:this.participantFetch,participantFetchGrantId:this.participantFetchGrantId,participantSearch:this.participantSearch,conferenceProviders:this.conferenceProviders,requiresSlug:this.requiresSlug,selectedLanguage:this.defaultLanguage||y.en,nylasBranding:this.nylasBranding,experimentalFeatures:this.experimentalFeatures,enableEventTypes:this.enableEventTypes,themeConfig:this.themeConfig})};if(!this.nylasApiRequest&&this.nylasSessionsConfig){const e=new le(this.nylasSessionsConfig);await e.isLoggedIn();e.onLoginSuccess((async()=>{const e=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(e){const t=this.loggedIn.emit(this.host);if("loggedIn"in this.eventOverrides){await this.eventOverrides.loggedIn(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){await this.loggedInHandler(e)}}}));e.onLoginFail((async()=>{this.stores?.schedulerConfig?.set("currentUser",null);this.authError="Authentication failed. Please try again.";this.nylasSchedulerEditorError.emit({notification:{id:"auth-login-failed",type:E.Error,title:"Authentication Error",category:_.Auth,description:"Authentication failed. Please try again.",ttl:"none"},host:this.host});const e=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides){await this.eventOverrides.loggedOut(e,this.nylasSchedulerConfigConnector);if(e.defaultPrevented){return}}}));this.nylasApiRequest=new a(e)}if(this.nylasApiRequest&&this.defaultAuthArgs){this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs)}this.baseProvider=new o(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new C({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const n=this.init.emit(this.host);if("init"in this.eventOverrides){await this.eventOverrides.init(n,this.nylasSchedulerConfigConnector)}if(!n.defaultPrevented){const e=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(e){const t=this.loggedIn.emit(this.host);if("loggedIn"in this.eventOverrides){await this.eventOverrides.loggedIn(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){await this.loggedInHandler(e)}}else{this.stores?.schedulerConfig?.set("currentUser",null);const e=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides){await this.eventOverrides.loggedOut(e,this.nylasSchedulerConfigConnector);if(e.defaultPrevented){return}}}}this.stores?.schedulerConfig?.onChange("selectedConfiguration",(async e=>{if(e&&e.id){this.configurationId=e.id}}));this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);this.applyThemeConfig(this.themeConfig)}async componentDidLoad(){u(`[nylas-scheduler-editor] componentDidLoad`);await(this.baseProvider?.componentDidLoad());this.updateLocalization(this.localization);this.version=v}async componentDisconnected(){await(this.baseProvider?.componentDisconnected())}async configurationIdChanged(e){if(e){await(this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(e));this.stores?.schedulerConfig?.set("action","edit")}else{this.stores?.schedulerConfig?.set("selectedConfiguration",{});this.stores?.schedulerConfig?.set("action",null)}}participantPropsChanged(){this.stores?.schedulerConfig?.set("participantFetch",this.participantFetch);this.stores?.schedulerConfig?.set("participantFetchGrantId",this.participantFetchGrantId);this.stores?.schedulerConfig?.set("participantSearch",this.participantSearch)}updateLocalization(e){if(!e){return}Object.keys(e).forEach((t=>{if(!(t in y)){return}w.addResourceBundle(t,"translation",e[t],false,true)}));this.langVersion++}updateNylasBranding(e){this.stores?.schedulerConfig?.set("nylasBranding",e)}updateExperimentalFeatures(e){this.stores?.schedulerConfig?.set("experimentalFeatures",e)}updateEnableEventTypes(e){this.stores?.schedulerConfig?.set("enableEventTypes",e)}themeConfigChanged(e){this.baseProvider?.getStore("schedulerConfig")?.set("themeConfig",e);this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async store(){return this.stores?.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}handleChildSchedulerError(e){this.nylasSchedulerEditorError.emit({notification:e.detail.notification,host:this.host})}nylasFormDropdownChangedHandler(e){const{name:t,value:n}=e.detail;if(t==="language"){this.selectedLanguage=y[n];w.changeLanguage(this.selectedLanguage);this.stores?.schedulerConfig?.set("selectedLanguage",this.selectedLanguage)}}async loggedInHandler(e){this.stores?.schedulerConfig?.set("currentUser",e);if(!this.nylasSchedulerConfigConnector){return}await(this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars());if(this.configurationId){const e=await(this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId));if(e&&e[0]?.id){this.stores?.schedulerConfig?.set("action","edit")}}}render(){const t=this.host.querySelector('[slot="custom-page-style-inputs"]');const n=this.stores?.schedulerConfig?.state.selectedConfiguration?.id;const i=Object.keys(b).map((e=>({label:b[e],value:e})));const s=this.stores?.schedulerConfig?.state.selectedEventType===g.group||this.stores?.schedulerConfig?.state.selectedConfiguration?.type===g.group;u(`[nylas-scheduler-editor] render mode: ${this.mode}`);return e(r,{key:"bd34e24975197c26bf6e08430c8434c40441c367"},e("div",{key:"5c1bb57eb7dbd13f879dcbe7de251e6d8687c470",class:"scheduler-editor-header",part:"nse__header"},e("h1",{key:"ecf284b9c4c39129233c977b978d8069e448367e",class:"scheduler-editor-title",part:"nse__title"},e("calendar-icon",{key:"44b73dbff4441d72ceda5281f6bf07bfb2134dae",width:"18",height:"18"}),w.t("schedulerEditorTitle"),e("tooltip-component",{key:"bc20294846164811db22d185e52f50f848d59bd5"},e("info-icon",{key:"22955828856eae5f4f7e5d7d51e8e73f11f9805d",slot:"tooltip-icon"}),e("span",{key:"9178f588fa8ffe60865b8c6c632ec4dafd91a00d",slot:"tooltip-content"},this.version))),e("div",{key:"a67874094ff69226349d1ee0274e27da0da38ad6",class:{language:true},part:"nse__language"},e("select-dropdown",{key:"e47566a2f832d90baa93701afe8efea71476ecec",name:"language",searchPlaceholder:w.t("search"),options:i,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:i.find((e=>e.value==this.selectedLanguage)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{key:"1c7c9d93808786f7e4a1b5ecee414e289074366f",slot:"select-icon"},e("translate-icon",{key:"c9b8adee3195f4a50f0ed7c4929b972e59236558",width:"20",height:"20"})))),e("button",{key:"fe8c5481fbd2ac6da51fe1420caf973d79d01857",class:"scheduler-editor-close",title:"logout",onClick:e=>this.handleSchedulerConfigCloseClicked(e),part:"nse__close-button"},e("close-icon",{key:"ead618a2acc222ff1ec4ca9c552cd81a8c86a57f",width:"18",height:"18"}))),e("div",{key:"dffa964669c0b5ca0155ddd3b351a6bb164f7463",class:{"scheduler-editor-content":true,"scheduler-editor-content--group":s},part:"nse__content"},this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode==="composable"&&e("slot",{key:"bf58230869a3326fa9cf6ee8b7c18586cc41a074"}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode!=="composable"&&e("div",{key:"edb06ecb33d8f3713da228d70fa72d3db2183235",class:"list-configurations",part:"nse__list-configurations"},e("nylas-list-configurations",{key:"ffdcd2304ce49e29aa74da69bad90af9d237a6e8",themeConfig:this.themeConfig,exportparts:"nlc__create-new-cta, actions__dropdown, actions__dropdown-button, actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create-select"&&e("nylas-select-event-type",{key:"a5bff89ece1dd30afea1c014d162797bfa7d1df5",themeConfig:this.themeConfig}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&s&&e("nylas-editor-tabs-group",{key:"08241ae21a7df72079cc49312b4272d2a8cd0b2a",mode:"composable",themeConfig:this.themeConfig},e(we,{key:"86d73811907bfe16c255642fb0755baa9766cf00",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||g.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&!s&&e("nylas-editor-tabs",{key:"5b85bf26f6243f723a1f0cad821d719cff3f776b",mode:"composable",enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},e(we,{key:"5afa9f82b0cb0b495d26b134688c49d82743d7cf",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||g.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&s&&e("nylas-editor-tabs-group",{key:n,mode:this.mode,themeConfig:this.themeConfig},this.mode==="composable"&&e("slot",{key:"6ec0c1b4daad2d875f8f3cdbb465eb0721133947"}),this.mode==="app"&&t&&e("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:n},e("slot",{key:"b3c580772253a6a7d5dc3e7f8fd2be2f9a23f247",name:"custom-page-style-inputs"}))),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&!s&&e("nylas-editor-tabs",{key:n,mode:this.mode,enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},this.mode==="composable"&&e("slot",{key:"48a71a45b5271485a4f136cb4afa52df94ee469b"}),this.mode==="app"&&t&&e("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:n},e("slot",{key:"f81fede8cc3d3686056e5222798494fdc76d419f",name:"custom-page-style-inputs"}))),!this.stores?.schedulerConfig?.state.currentUser&&e("slot",{key:"968207fdadd383d6da1e8188d0960901e38e949d",name:"login-required"},e(ye,{key:"e0c275ef713bd4040c07083898918d1b8e39e171",authenticationUrl:this.authenticationUrl,authError:this.authError}))))}get host(){return s(this)}static get watchers(){return{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}}};me.style=be;export{me as nylas_scheduler_editor};
|
|
11
|
-
//# sourceMappingURL=p-
|
|
10
|
+
*/var he;function fe(){if(he)return ue;he=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),o=Symbol.for("react.context"),a=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),u=Symbol.iterator;function h(e){if(null===e||"object"!==typeof e)return null;e=u&&e[u]||e["@@iterator"];return"function"===typeof e?e:null}var f={isMounted:function(){return false},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},p=Object.assign,g={};function y(e,t,n){this.props=e;this.context=t;this.refs=g;this.updater=n||f}y.prototype.isReactComponent={};y.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function w(){}w.prototype=y.prototype;function b(e,t,n){this.props=e;this.context=t;this.refs=g;this.updater=n||f}var m=b.prototype=new w;m.constructor=b;p(m,y.prototype);m.isPureReactComponent=true;var v=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},k={key:true,ref:true,__self:true,__source:true};function x(t,n,i){var r,s={},o=null,a=null;if(null!=n)for(r in void 0!==n.ref&&(a=n.ref),void 0!==n.key&&(o=""+n.key),n)_.call(n,r)&&!k.hasOwnProperty(r)&&(s[r]=n[r]);var c=arguments.length-2;if(1===c)s.children=i;else if(1<c){for(var l=Array(c),d=0;d<c;d++)l[d]=arguments[d+2];s.children=l}if(t&&t.defaultProps)for(r in c=t.defaultProps,c)void 0===s[r]&&(s[r]=c[r]);return{$$typeof:e,type:t,key:o,ref:a,props:s,_owner:E.current}}function C(t,n){return{$$typeof:e,type:t.type,key:n,ref:t.ref,props:t.props,_owner:t._owner}}function $(t){return"object"===typeof t&&null!==t&&t.$$typeof===e}function S(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}var T=/\/+/g;function P(e,t){return"object"===typeof e&&null!==e&&null!=e.key?S(""+e.key):t.toString(36)}function I(n,i,r,s,o){var a=typeof n;if("undefined"===a||"boolean"===a)n=null;var c=false;if(null===n)c=true;else switch(a){case"string":case"number":c=true;break;case"object":switch(n.$$typeof){case e:case t:c=true}}if(c)return c=n,o=o(c),n=""===s?"."+P(c,0):s,v(o)?(r="",null!=n&&(r=n.replace(T,"$&/")+"/"),I(o,i,r,"",(function(e){return e}))):null!=o&&($(o)&&(o=C(o,r+(!o.key||c&&c.key===o.key?"":(""+o.key).replace(T,"$&/")+"/")+n)),i.push(o)),1;c=0;s=""===s?".":s+":";if(v(n))for(var l=0;l<n.length;l++){a=n[l];var d=s+P(a,l);c+=I(a,i,r,d,o)}else if(d=h(n),"function"===typeof d)for(n=d.call(n),l=0;!(a=n.next()).done;)a=a.value,d=s+P(a,l++),c+=I(a,i,r,d,o);else if("object"===a)throw i=String(n),Error("Objects are not valid as a React child (found: "+("[object Object]"===i?"object with keys {"+Object.keys(n).join(", ")+"}":i)+"). If you meant to render a collection of children, use an array instead.");return c}function R(e,t,n){if(null==e)return e;var i=[],r=0;I(e,i,"","",(function(e){return t.call(n,e,r++)}));return i}function A(e){if(-1===e._status){var t=e._result;t=t();t.then((function(t){if(0===e._status||-1===e._status)e._status=1,e._result=t}),(function(t){if(0===e._status||-1===e._status)e._status=2,e._result=t}));-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var q={current:null},N={transition:null},U={ReactCurrentDispatcher:q,ReactCurrentBatchConfig:N,ReactCurrentOwner:E};ue.Children={map:R,forEach:function(e,t,n){R(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;R(e,(function(){t++}));return t},toArray:function(e){return R(e,(function(e){return e}))||[]},only:function(e){if(!$(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ue.Component=y;ue.Fragment=n;ue.Profiler=r;ue.PureComponent=b;ue.StrictMode=i;ue.Suspense=c;ue.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=U;ue.cloneElement=function(t,n,i){if(null===t||void 0===t)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+t+".");var r=p({},t.props),s=t.key,o=t.ref,a=t._owner;if(null!=n){void 0!==n.ref&&(o=n.ref,a=E.current);void 0!==n.key&&(s=""+n.key);if(t.type&&t.type.defaultProps)var c=t.type.defaultProps;for(l in n)_.call(n,l)&&!k.hasOwnProperty(l)&&(r[l]=void 0===n[l]&&void 0!==c?c[l]:n[l])}var l=arguments.length-2;if(1===l)r.children=i;else if(1<l){c=Array(l);for(var d=0;d<l;d++)c[d]=arguments[d+2];r.children=c}return{$$typeof:e,type:t.type,key:s,ref:o,props:r,_owner:a}};ue.createContext=function(e){e={$$typeof:o,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};e.Provider={$$typeof:s,_context:e};return e.Consumer=e};ue.createElement=x;ue.createFactory=function(e){var t=x.bind(null,e);t.type=e;return t};ue.createRef=function(){return{current:null}};ue.forwardRef=function(e){return{$$typeof:a,render:e}};ue.isValidElement=$;ue.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:A}};ue.memo=function(e,t){return{$$typeof:l,type:e,compare:void 0===t?null:t}};ue.startTransition=function(e){var t=N.transition;N.transition={};try{e()}finally{N.transition=t}};ue.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")};ue.useCallback=function(e,t){return q.current.useCallback(e,t)};ue.useContext=function(e){return q.current.useContext(e)};ue.useDebugValue=function(){};ue.useDeferredValue=function(e){return q.current.useDeferredValue(e)};ue.useEffect=function(e,t){return q.current.useEffect(e,t)};ue.useId=function(){return q.current.useId()};ue.useImperativeHandle=function(e,t,n){return q.current.useImperativeHandle(e,t,n)};ue.useInsertionEffect=function(e,t){return q.current.useInsertionEffect(e,t)};ue.useLayoutEffect=function(e,t){return q.current.useLayoutEffect(e,t)};ue.useMemo=function(e,t){return q.current.useMemo(e,t)};ue.useReducer=function(e,t,n){return q.current.useReducer(e,t,n)};ue.useRef=function(e){return q.current.useRef(e)};ue.useState=function(e){return q.current.useState(e)};ue.useSyncExternalStore=function(e,t,n){return q.current.useSyncExternalStore(e,t,n)};ue.useTransition=function(){return q.current.useTransition()};ue.version="18.2.0";return ue}var pe;function ge(){if(pe)return de.exports;pe=1;{de.exports=fe()}return de.exports}ge();const ye=({authenticationUrl:t,authError:n})=>e("div",{class:"login-required",part:"nse__login-required login-component"},e("div",{class:"card",part:"nse__login-required-card"},n&&e("div",{class:"login-error-banner",part:"nse__login-required-error",role:"alert"},e("warning-icon",{width:"16",height:"16"}),e("span",null,n)),e("p",{part:"nse__login-required-text"},"Log into your account to use the Scheduler Editor."),e("button",{class:"google-button",part:"nse__login-required-google-button",onClick:async e=>{e.preventDefault();const n=await t("google");if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},e("span",{class:"icon"},e("google-logo-icon",{width:"15",height:"15"})),"Continue with Google"),e("button",{class:"microsoft-button",part:"nse__login-required-microsoft-button",onClick:async e=>{e.preventDefault();const n=await t("microsoft");if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},e("span",{class:"icon"},e("microsoft-logo-icon",{width:"15",height:"15"})),"Continue with Microsoft"),e("button",{class:"other-provider-button",part:"nse__login-required-other-provider-button",onClick:async e=>{e.preventDefault();const n=await t();if(n){window.location.href=n}else{p(`[nylas-scheduler-editor] Unable to get authentication URL.`)}}},"View all providers ",e("chevron-icon",{width:"17",height:"17"})),e("small",{class:"disclaimer-text",part:"nse__login-required-disclaimer-text"},"* You will be redirected to authenticate your account.")));function we({currentUser:n,calendars:i,selectedEventType:r}){const s=i?.find((e=>e.is_primary))||i?.[0];switch(r){case g.one_on_one:case g.max_availability:case g.max_fairness:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",null),e("nylas-event-duration",null),e("nylas-event-location",{userProvider:n.provider}))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}case g.collective:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",null),e("nylas-event-duration",null),e("nylas-event-location",{userProvider:n.provider}))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}),e("nylas-additional-participants",{name:"participants",eventParticipants:[{name:n?.name||n?.email,email:n?.email||"",is_organizer:true}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}))}case g.group:{return e(t,null,e("nylas-event-info",null,e("div",{slot:"inputs"},e("nylas-event-title",{noTemplates:true}),e("nylas-event-description",{noTemplates:true,hideAutoPopulateButton:true}),e("nylas-event-location",{userProvider:n.provider}),e("nylas-event-timeslot",{name:"event-timeslot"}),e("nylas-event-capacity",null))),e("nylas-booking-calendar-picker",{exportparts:"nbcp, nbcp__header, nbcp__dropdown, nbcp__dropdown-button, nbcp__dropdown-content",expressFlow:true,calendars:i,currentUser:n,defaultBookingCalendar:s?.id}),e("nylas-additional-participants",{name:"participants",eventParticipants:[{name:n?.name||n?.email,email:n?.email||"",is_organizer:true}],exportparts:"nadtnlpart, nadtnlpart__title, nadtnlpart__subtitle, nadtnlpart__content, nadtnlpart__input_group, nadtnlpart__input_wrapper, nadtnlpart__input, nadtnlpart__remove-participant"}),e("nylas-page-name",{requirePageName:true,pageName:"Group events page"}),e("nylas-custom-event-slug",{name:"custom-event-slug",exportparts:"nces, nces__body, nces__header, nces__drawer-toggle--container, nces__input-textfield"}))}}}const be=':host{display:flex;flex-direction:column;overflow:visible;border-radius:var(--nylas-border-radius-2x);width:fit-content;background:var(--nylas-base-0);position:relative;box-shadow:0px 0px 6px -2px rgba(0, 0, 0, 0.05), 0px 5px 15px -3px rgba(0, 0, 0, 0.1);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-50:#ffeae8;--nylas-error-100:#ffc5bf;--nylas-error-200:#fecaca;--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-color-blue-100:#e0e6f9;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;--nylas-color-black:#000000;--nylas-color-grey-900:#2c2c2c;--nylas-color-grey-800:#4b4b4b;--nylas-color-grey-700:#6e6e6e;--nylas-color-grey-600:#8e8e8e;--nylas-color-grey-500:#b3b3b3;--nylas-color-grey-400:#cacaca;--nylas-color-grey-300:#e1e1e1;--nylas-color-grey-200:#eaeaea;--nylas-color-grey-100:#f5f5f5;--nylas-color-grey-50:#fbfcfe;--nylas-color-white:#ffffff;--nylas-color-red-900:#992222;--nylas-color-red-700:#cc4841;--nylas-color-red-500:#ff786a;--nylas-color-red-300:#ffa79e;--nylas-color-red-100:#ffc5bf;--nylas-color-red-50:#ffeae8;--nylas-color-blue-900:#213571;--nylas-color-blue-700:#314fa9;--nylas-color-blue-500:#4169e1;--nylas-color-blue-300:#bdccf9;--nylas-color-blue-100:#e0e6f9;--nylas-color-blue-50:#f6f8fd;--nylas-color-yellow-900:#7c6506;--nylas-color-yellow-700:#c29f09;--nylas-color-yellow-500:#f7c90b;--nylas-color-yellow-300:#f9de70;--nylas-color-yellow-100:#fceba9;--nylas-color-yellow-50:#fdf4ce;--nylas-color-green-900:#0e6b60;--nylas-color-green-700:#16a392;--nylas-color-green-500:#17c3b2;--nylas-color-green-300:#74dbd1;--nylas-color-green-100:#a2e7e0;--nylas-color-green-50:#d1f3f0;--nylas-color-purple-900:#643554;--nylas-color-purple-700:#954f7d;--nylas-color-purple-500:#c769a7;--nylas-color-purple-300:#dda5ca;--nylas-color-purple-100:#e0bdd6;--nylas-color-purple-50:#e9dde5;--nylas-color-sky-900:#20698f;--nylas-color-sky-700:#2b8fc2;--nylas-color-sky-500:#6dceff;--nylas-color-sky-300:#8fdaff;--nylas-color-sky-100:#b8e7ff;--nylas-color-sky-50:#d9f2ff}:host nylas-notification{position:absolute;top:0;right:0}@media screen and (max-width: 768px){:host{width:-moz-available;width:-webkit-fill-available;width:fill-available;min-width:325px}}div.scheduler-editor-content{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content{height:auto}}div.scheduler-editor-content slot[name=login-required]{height:inherit}div.scheduler-editor-content--group{height:800px}@media screen and (max-width: 768px){div.scheduler-editor-content--group{height:auto}}div.scheduler-editor-header{display:grid;grid-template-columns:1fr auto auto;align-items:center;justify-content:space-between;padding:1rem;border-bottom:1px solid var(--nylas-base-200);color:var(--nylas-base-900);min-width:924px}@media screen and (max-width: 768px){div.scheduler-editor-header{width:auto;min-width:calc(325px - 1rem)}}div.scheduler-editor-header h1.scheduler-editor-title{display:flex;align-items:center;gap:0.5rem;margin:0;font-size:18px;line-height:24px;font-weight:600}div.scheduler-editor-header button{background:transparent;border:none;cursor:pointer;color:var(--nylas-base-900)}div.scheduler-editor-header button:hover,div.scheduler-editor-header button:active{color:var(--nylas-primary);background-color:transparent}div.scheduler-editor-header button:disabled{cursor:not-allowed}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button){border:none;padding:4px;margin-right:8px}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-button):hover{outline:none;color:var(--nylas-primary)}div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){min-width:132px}@media screen and (max-width: 768px){div.scheduler-editor-header div.language select-dropdown::part(sd_dropdown-content){width:-webkit-fill-available;width:fill-available;width:-moz-available}}nylas-select-event-type{height:inherit;width:calc(924px + 2rem)}@media screen and (max-width: 768px){nylas-select-event-type{width:auto}}nylas-editor-tabs,nylas-editor-tabs-group{width:auto;height:inherit}nylas-editor-tabs .row,nylas-editor-tabs-group .row{display:flex;gap:1rem}nylas-editor-tabs .composable,nylas-editor-tabs-group .composable{height:inherit;overflow:auto}nylas-editor-tabs nylas-event-info div[slot=inputs],nylas-editor-tabs nylas-event-limits div[slot=inputs],nylas-editor-tabs-group nylas-event-info div[slot=inputs],nylas-editor-tabs-group nylas-event-limits div[slot=inputs]{display:flex;flex-direction:column;gap:1rem}.card{display:flex;flex-direction:column;padding:2rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;color:var(--nylas-base-900);max-width:fit-content;align-self:center}.login-required{height:inherit;overflow-y:auto;display:flex;flex-direction:column;justify-content:center;padding:2rem 1rem;background-color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.login-required .login-error-banner{display:flex;align-items:center;gap:0.5rem;padding:0.75rem 1rem;margin-bottom:1rem;background-color:var(--nylas-error-50, #fef2f2);border:1px solid var(--nylas-error-200, #fecaca);border-radius:5px;color:var(--nylas-error-700, #b91c1c);font-size:0.875rem;line-height:1.25rem}.login-required .login-error-banner svg{flex-shrink:0;color:var(--nylas-error-500, #ef4444)}.login-required p{margin:0 0 1rem}.login-required .microsoft-button,.login-required .google-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;margin-bottom:1rem;background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);border-radius:5px;justify-content:center;gap:0.5rem;align-items:center;color:var(--nylas-base-900)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .microsoft-button:hover,.login-required .google-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button{height:48px;border:1px solid var(--nylas-base-300);border-radius:var(--nylas-border-radius-2x);font-size:16px;line-height:24px;padding:0 1rem;background-color:var(--nylas-base-0);font-weight:600;cursor:pointer;display:flex;border:0;background-color:var(--nylas-base-0);height:48px;margin-bottom:1rem;font-size:0.95rem;justify-content:center;gap:0.25rem;align-items:center;color:var(--nylas-base-900)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .other-provider-button svg{transform:rotate(180deg)}.login-required .other-provider-button:hover{background-color:var(--nylas-base-25)}.login-required .disclaimer-text{font-size:0.75rem;color:var(--nylas-base-600);align-self:center}@media screen and (max-width: 768px){.login-required{height:auto}}.list-configurations{padding:2rem;height:inherit;background:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x)}.list-configurations nylas-list-configurations{height:inherit;display:flex;flex-direction:column}@media screen and (max-width: 768px){.list-configurations{height:auto;padding:2rem 1rem}}';const me=class{constructor(e){n(this,e);this.init=i(this,"init",7);this.loggedIn=i(this,"loggedIn",7);this.loggedOut=i(this,"loggedOut",7);this.schedulerConfigCloseClicked=i(this,"schedulerConfigCloseClicked",7);this.nylasSchedulerEditorError=i(this,"nylasSchedulerEditorError",6);this.eventOverrides={};this.schedulerPreviewLink="";this.mode="app";this.hideEditorTabs=[];this.requiresSlug=false;this.enableUserFeedback=true;this.nylasBranding=true;this.enableNotetaker=false;this.enableEventTypes={one_on_one:true,collective:true,max_fairness:true,max_availability:true,group:true};this.automaticComponentRegistration=true;this.selectedLanguage=this.defaultLanguage||y.en;this.langVersion=0;this.version=v;this.handleSchedulerConfigCloseClicked=e=>{const t=this.schedulerConfigCloseClicked.emit(this.host);if("schedulerConfigCloseClicked"in this.eventOverrides){this.eventOverrides.schedulerConfigCloseClicked(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){localStorage.removeItem("grant");localStorage.removeItem("user");window.location.reload()}};this.authenticationUrl=async e=>{if(!this.nylasApiRequest){const e="Unable to authenticate. API request handler is not initialized.";p(`[nylas-scheduler-editor] ${e}`);this.authError=e;this.nylasSchedulerEditorError.emit({notification:{id:"auth-not-initialized",type:E.Error,title:"Authentication Error",category:_.Auth,description:e,ttl:"none"},host:this.host});return""}try{const t=await this.nylasApiRequest.authenticationUrl({provider:e});if(!t){const e="Unable to get authentication URL. Please check your configuration and try again.";this.authError=e;this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-failed",type:E.Error,title:"Authentication Error",category:_.Auth,description:e,ttl:"none"},host:this.host})}return t||""}catch(e){const t=`Authentication failed: ${e instanceof Error?e.message:"Unknown error"}`;p(`[nylas-scheduler-editor] ${t}`);this.authError=t;this.nylasSchedulerEditorError.emit({notification:{id:"auth-url-exception",type:E.Error,title:"Authentication Error",category:_.Auth,description:t,ttl:"none"},host:this.host});return""}}}connectedCallback(){u(`[nylas-scheduler-editor] connectedCallback`);queueMicrotask((()=>{if(this.themeConfig){this.applyThemeConfig(this.themeConfig);this.host.setAttribute("data-themed","")}}))}async componentWillLoad(){u(`[nylas-scheduler-editor] componentWillLoad`);await Promise.resolve();const e=this.additionalParticipants?.filter((e=>{const t=e.calendars?.length>0?e.calendars.filter((e=>e.id&&e.name)):[];if(e.name&&e.email&&t.length>0){return{name:e.name,email:e.email,calendars:t}}}));this.stores={schedulerConfig:$({...this.defaultSchedulerConfigState,additionalParticipants:e||[],participantFetch:this.participantFetch,participantFetchGrantId:this.participantFetchGrantId,participantSearch:this.participantSearch,conferenceProviders:this.conferenceProviders,requiresSlug:this.requiresSlug,selectedLanguage:this.defaultLanguage||y.en,nylasBranding:this.nylasBranding,experimentalFeatures:this.experimentalFeatures,enableEventTypes:this.enableEventTypes,themeConfig:this.themeConfig})};if(!this.nylasApiRequest&&this.nylasSessionsConfig){const e=new le(this.nylasSessionsConfig);await e.isLoggedIn();e.onLoginSuccess((async()=>{const e=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(e){const t=this.loggedIn.emit(this.host);if("loggedIn"in this.eventOverrides){await this.eventOverrides.loggedIn(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){await this.loggedInHandler(e)}}}));e.onLoginFail((async()=>{this.stores?.schedulerConfig?.set("currentUser",null);this.authError="Authentication failed. Please try again.";this.nylasSchedulerEditorError.emit({notification:{id:"auth-login-failed",type:E.Error,title:"Authentication Error",category:_.Auth,description:"Authentication failed. Please try again.",ttl:"none"},host:this.host});const e=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides){await this.eventOverrides.loggedOut(e,this.nylasSchedulerConfigConnector);if(e.defaultPrevented){return}}}));this.nylasApiRequest=new a(e)}if(this.nylasApiRequest&&this.defaultAuthArgs){this.nylasApiRequest.setDefaultAuthArgs(this.defaultAuthArgs)}this.baseProvider=new o(this.host,this.stores,this.automaticComponentRegistration,this.eventOverrides);const t=this.baseProvider.getStore("schedulerConfig");this.nylasSchedulerConfigConnector=new C({nylasApiRequest:this.nylasApiRequest,nylasSchedulerConfigStore:t});const n=this.init.emit(this.host);if("init"in this.eventOverrides){await this.eventOverrides.init(n,this.nylasSchedulerConfigConnector)}if(!n.defaultPrevented){const e=await(this.nylasSchedulerConfigConnector?.schedulerConfig?.currentUser());if(e){const t=this.loggedIn.emit(this.host);if("loggedIn"in this.eventOverrides){await this.eventOverrides.loggedIn(t,this.nylasSchedulerConfigConnector)}if(!t.defaultPrevented){await this.loggedInHandler(e)}}else{this.stores?.schedulerConfig?.set("currentUser",null);const e=this.loggedOut.emit(this.host);if("loggedOut"in this.eventOverrides){await this.eventOverrides.loggedOut(e,this.nylasSchedulerConfigConnector);if(e.defaultPrevented){return}}}}this.stores?.schedulerConfig?.onChange("selectedConfiguration",(async e=>{if(e&&e.id){this.configurationId=e.id}}));this.baseProvider?.componentWillLoad(this.nylasSchedulerConfigConnector);this.applyThemeConfig(this.themeConfig)}async componentDidLoad(){u(`[nylas-scheduler-editor] componentDidLoad`);await(this.baseProvider?.componentDidLoad());this.updateLocalization(this.localization);this.version=v}async componentDisconnected(){await(this.baseProvider?.componentDisconnected())}async configurationIdChanged(e){if(e){await(this.nylasSchedulerConfigConnector?.schedulerConfig?.getConfigurationById(e));this.stores?.schedulerConfig?.set("action","edit")}else{this.stores?.schedulerConfig?.set("selectedConfiguration",{});this.stores?.schedulerConfig?.set("action",null)}}participantPropsChanged(){this.stores?.schedulerConfig?.set("participantFetch",this.participantFetch);this.stores?.schedulerConfig?.set("participantFetchGrantId",this.participantFetchGrantId);this.stores?.schedulerConfig?.set("participantSearch",this.participantSearch)}updateLocalization(e){if(!e){return}Object.keys(e).forEach((t=>{if(!(t in y)){return}w.addResourceBundle(t,"translation",e[t],false,true)}));this.langVersion++}updateNylasBranding(e){this.stores?.schedulerConfig?.set("nylasBranding",e)}updateExperimentalFeatures(e){this.stores?.schedulerConfig?.set("experimentalFeatures",e)}updateEnableEventTypes(e){this.stores?.schedulerConfig?.set("enableEventTypes",e)}themeConfigChanged(e){this.baseProvider?.getStore("schedulerConfig")?.set("themeConfig",e);this.applyThemeConfig(e)}applyThemeConfig(e){if(e){for(const[t,n]of Object.entries(e)){this.host.style.setProperty(`${t}`,n)}}}async store(){return this.stores?.schedulerConfig}async schedulerConnector(){return this.nylasSchedulerConfigConnector}async registerComponentHandler(e){this.baseProvider?.registerComponent(e.detail)}async unregisterComponentHandler(e){this.baseProvider?.unregisterComponent(e.detail)}handleChildSchedulerError(e){this.nylasSchedulerEditorError.emit({notification:e.detail.notification,host:this.host})}nylasFormDropdownChangedHandler(e){const{name:t,value:n}=e.detail;if(t==="language"){this.selectedLanguage=y[n];w.changeLanguage(this.selectedLanguage);this.stores?.schedulerConfig?.set("selectedLanguage",this.selectedLanguage)}}async loggedInHandler(e){this.stores?.schedulerConfig?.set("currentUser",e);if(!this.nylasSchedulerConfigConnector){return}await(this.nylasSchedulerConfigConnector.schedulerConfig?.getCalendars());if(this.configurationId){const e=await(this.nylasSchedulerConfigConnector.schedulerConfig?.getConfigurationById(this.configurationId));if(e&&e[0]?.id){this.stores?.schedulerConfig?.set("action","edit")}}}render(){const t=this.host.querySelector('[slot="custom-page-style-inputs"]');const n=this.stores?.schedulerConfig?.state.selectedConfiguration?.id;const i=Object.keys(b).map((e=>({label:b[e],value:e})));const s=this.stores?.schedulerConfig?.state.selectedEventType===g.group||this.stores?.schedulerConfig?.state.selectedConfiguration?.type===g.group;u(`[nylas-scheduler-editor] render mode: ${this.mode}`);return e(r,{key:"2c6498718197e5bed3c8fc64e71327b8fb039c9e"},e("div",{key:"59256def9c1c88552df6aa5dead69f0e34d6aa18",class:"scheduler-editor-header",part:"nse__header"},e("h1",{key:"df48eb38ae71b9cdae4cbf373819fdcb1a6bda02",class:"scheduler-editor-title",part:"nse__title"},e("calendar-icon",{key:"3e722c9f5eecd5dd0abf8156a75bea65924e84a7",width:"18",height:"18"}),w.t("schedulerEditorTitle"),e("tooltip-component",{key:"34c06bf5fa3e68addad9f24340edae9774e15df1"},e("info-icon",{key:"31a6121777c08a2438d36de6443efca378cae117",slot:"tooltip-icon"}),e("span",{key:"49d04571e1822d77c8aa628f6d421fdd69c4f224",slot:"tooltip-content"},this.version))),e("div",{key:"816bff2ab4a32423abd7e81d066aee67f1029e80",class:{language:true},part:"nse__language"},e("select-dropdown",{key:"1d76ba50c3cd24f80a375c155bf3a9451fea9be0",name:"language",searchPlaceholder:w.t("search"),options:i,withChevron:false,themeConfig:this.themeConfig,defaultSelectedOption:i.find((e=>e.value==this.selectedLanguage)),exportparts:"sd_dropdown: nse__language-dropdown, sd_dropdown-button: nse__language-drop-button, sd_dropdown-content: nse__language-drop-content, sd_dropdown_label: nse__language-drop-label"},e("span",{key:"79e87ee2ee64b911e0a0c89114ce1d4ed79e1f30",slot:"select-icon"},e("translate-icon",{key:"4862c868ac7def07bbb1c7630b44966cf2059390",width:"20",height:"20"})))),e("button",{key:"2520b3e4d0ca6e8e400f2571baca516be2ad1575",class:"scheduler-editor-close",title:"logout",onClick:e=>this.handleSchedulerConfigCloseClicked(e),part:"nse__close-button"},e("close-icon",{key:"cf2f11767dd889c0e2ff90d033cfd746e2ce9c09",width:"18",height:"18"}))),e("div",{key:"6bee52d80a85a6749833a57929189e0073753764",class:{"scheduler-editor-content":true,"scheduler-editor-content--group":s},part:"nse__content"},this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode==="composable"&&e("slot",{key:"34e6ef637c1d68d17a6df16dea47f028cd7f0bce"}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action===null&&this.mode!=="composable"&&e("div",{key:"ab9bfd2b74251fdabe198e1b5047740d1dd57917",class:"list-configurations",part:"nse__list-configurations"},e("nylas-list-configurations",{key:"38ccbe0223c88d74443077e7491b3272903fd611",themeConfig:this.themeConfig,exportparts:"nlc__create-new-cta, actions__dropdown, actions__dropdown-button, actions__dropdown-content, actions-Copy, actions-Preview, actions-Delete"})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create-select"&&e("nylas-select-event-type",{key:"dd368e1afc384bcde8624fe89c36a61ac622bcf2",themeConfig:this.themeConfig}),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&s&&e("nylas-editor-tabs-group",{key:"45a30a61567e83e823531831c3b0eb6c9ca0a0b6",mode:"composable",themeConfig:this.themeConfig},e(we,{key:"023d8e5f57eda1eefd8ae16b40c3e87f25230439",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||g.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="create"&&!s&&e("nylas-editor-tabs",{key:"6d186d353cfac520215313d503948f6a30aadd74",mode:"composable",enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},e(we,{key:"26cc9dab185f1299dfa80f1aa9228bef12d9d877",selectedEventType:this.stores?.schedulerConfig?.state?.selectedEventType||g.one_on_one,currentUser:this.stores?.schedulerConfig?.state.currentUser,calendars:this.stores?.schedulerConfig?.state?.calendars,selectedConfiguration:this.stores?.schedulerConfig?.state?.selectedConfiguration})),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&s&&e("nylas-editor-tabs-group",{key:n,mode:this.mode,themeConfig:this.themeConfig},this.mode==="composable"&&e("slot",{key:"f4c5a6f45db223d643af25ea26865e7ca498cd4f"}),this.mode==="app"&&t&&e("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:n},e("slot",{key:"7304e92b3e2cb44a77e4ece1f97fa99f152aba70",name:"custom-page-style-inputs"}))),this.stores?.schedulerConfig?.state.currentUser&&this.stores.schedulerConfig.state.action==="edit"&&!s&&e("nylas-editor-tabs",{key:n,mode:this.mode,enableNotetaker:this.enableNotetaker,themeConfig:this.themeConfig},this.mode==="composable"&&e("slot",{key:"19879c8ee1d759de55a51d2a171556f7f406f7b8"}),this.mode==="app"&&t&&e("div",{style:{display:"none"},slot:"custom-page-style-inputs",key:n},e("slot",{key:"b1ed734113b344cf3200fa6151e1572033a7504d",name:"custom-page-style-inputs"}))),!this.stores?.schedulerConfig?.state.currentUser&&e("slot",{key:"8e033aef682b9f14e6beb5236504d001de967e88",name:"login-required"},e(ye,{key:"12c12f9373794e897f2e568b9f3262e043a3eadf",authenticationUrl:this.authenticationUrl,authError:this.authError}))))}get host(){return s(this)}static get watchers(){return{configurationId:["configurationIdChanged"],participantFetch:["participantPropsChanged"],participantFetchGrantId:["participantPropsChanged"],participantSearch:["participantPropsChanged"],localization:["updateLocalization"],nylasBranding:["updateNylasBranding"],experimentalFeatures:["updateExperimentalFeatures"],enableEventTypes:["updateEnableEventTypes"],themeConfig:["themeConfigChanged"]}}};me.style=be;export{me as nylas_scheduler_editor};
|
|
11
|
+
//# sourceMappingURL=p-8c77020a.entry.js.map
|