@nylas/react 1.1.5 → 1.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (227) hide show
  1. package/dist/{add-circle-icon_2.entry-31acee1d.cjs → add-circle-icon_2.entry-5814b516.cjs} +1 -1
  2. package/dist/{add-circle-icon_2.entry-1e899552.js → add-circle-icon_2.entry-5db67b5b.js} +1 -1
  3. package/dist/add-circle-icon_2.entry-95b23b9d.js +25 -0
  4. package/dist/add-circle-icon_2.entry-ae11c837.cjs +1 -0
  5. package/dist/{archive-icon.entry-e932c9e6.cjs → archive-icon.entry-10ebbf9a.cjs} +1 -1
  6. package/dist/archive-icon.entry-2ead8ef0.cjs +1 -0
  7. package/dist/{archive-icon.entry-b5f307e8.js → archive-icon.entry-769e863b.js} +1 -1
  8. package/dist/archive-icon.entry-b28d195c.js +15 -0
  9. package/dist/{arrow-icon.entry-e35a6cad.cjs → arrow-icon.entry-024d613a.cjs} +1 -1
  10. package/dist/{arrow-icon.entry-aae2e22d.js → arrow-icon.entry-1ebd553a.js} +1 -1
  11. package/dist/arrow-icon.entry-8de38831.cjs +1 -0
  12. package/dist/arrow-icon.entry-e29d7a6c.js +15 -0
  13. package/dist/{bold-icon.entry-d5d86b3f.js → bold-icon.entry-17c78a12.js} +1 -1
  14. package/dist/bold-icon.entry-316f5e61.js +15 -0
  15. package/dist/{bold-icon.entry-1e3c9b1f.cjs → bold-icon.entry-8bc27b72.cjs} +1 -1
  16. package/dist/bold-icon.entry-caf96585.cjs +1 -0
  17. package/dist/{button-component_2.entry-5284316e.js → button-component_2.entry-1095ad9f.js} +1 -1
  18. package/dist/button-component_2.entry-531a725d.js +26 -0
  19. package/dist/{button-component_2.entry-a86f8dca.cjs → button-component_2.entry-5cd0adf0.cjs} +1 -1
  20. package/dist/button-component_2.entry-64a41161.cjs +1 -0
  21. package/dist/{calendar-agenda-fill-icon_54.entry-5672c589.js → calendar-agenda-fill-icon_54.entry-6b2114d5.js} +309 -294
  22. package/dist/calendar-agenda-fill-icon_54.entry-84e72636.js +5656 -0
  23. package/dist/calendar-agenda-fill-icon_54.entry-abb96e20.cjs +10 -0
  24. package/dist/calendar-agenda-fill-icon_54.entry-f5577fdb.cjs +10 -0
  25. package/dist/{calendar-cancel-icon.entry-e9792eaa.cjs → calendar-cancel-icon.entry-4c58ea10.cjs} +1 -1
  26. package/dist/{calendar-cancel-icon.entry-7f81de9d.js → calendar-cancel-icon.entry-d27593a5.js} +1 -1
  27. package/dist/calendar-cancel-icon.entry-f11e5aaa.cjs +1 -0
  28. package/dist/calendar-cancel-icon.entry-f1a6f9bc.js +15 -0
  29. package/dist/{calendar-check-icon_2.entry-84db1700.js → calendar-check-icon_2.entry-38e1140b.js} +1 -1
  30. package/dist/{calendar-check-icon_2.entry-ad055b37.cjs → calendar-check-icon_2.entry-4a35f416.cjs} +1 -1
  31. package/dist/calendar-check-icon_2.entry-52187599.cjs +1 -0
  32. package/dist/calendar-check-icon_2.entry-7f17a3a6.js +25 -0
  33. package/dist/{calendar-icon.entry-019f7feb.cjs → calendar-icon.entry-002ee369.cjs} +1 -1
  34. package/dist/calendar-icon.entry-3c5c97d4.cjs +1 -0
  35. package/dist/{calendar-icon.entry-45db1630.js → calendar-icon.entry-4543de86.js} +1 -1
  36. package/dist/calendar-icon.entry-b76e26e6.js +15 -0
  37. package/dist/{checkbox-component_2.entry-8325ff88.cjs → checkbox-component_2.entry-ad4ab088.cjs} +1 -1
  38. package/dist/checkbox-component_2.entry-b24885e9.cjs +1 -0
  39. package/dist/{checkbox-component_2.entry-84a053ff.js → checkbox-component_2.entry-cf15106d.js} +1 -1
  40. package/dist/checkbox-component_2.entry-e4a3dd2d.js +79 -0
  41. package/dist/{chevron-icon_3.entry-0edde2a6.cjs → chevron-icon_3.entry-582df6f7.cjs} +1 -1
  42. package/dist/chevron-icon_3.entry-59d8b408.cjs +1 -0
  43. package/dist/{chevron-icon_3.entry-ec894a13.js → chevron-icon_3.entry-5e60a853.js} +1 -1
  44. package/dist/chevron-icon_3.entry-cab72db3.js +143 -0
  45. package/dist/{clock-icon_4.entry-935fe48d.cjs → clock-icon_4.entry-8348282a.cjs} +1 -1
  46. package/dist/{clock-icon_4.entry-8ec9c29b.js → clock-icon_4.entry-d03310ae.js} +1 -1
  47. package/dist/clock-icon_4.entry-f6b9f85d.js +45 -0
  48. package/dist/clock-icon_4.entry-fcbc39b0.cjs +1 -0
  49. package/dist/{copy-icon.entry-d9405510.js → copy-icon.entry-3ea78e28.js} +1 -1
  50. package/dist/copy-icon.entry-430beab4.js +15 -0
  51. package/dist/{copy-icon.entry-5a2030da.cjs → copy-icon.entry-5337f980.cjs} +1 -1
  52. package/dist/copy-icon.entry-74a59fc5.cjs +1 -0
  53. package/dist/{delete-icon.entry-1b0a3ba4.js → delete-icon.entry-480ac215.js} +1 -1
  54. package/dist/{delete-icon.entry-3f3d1ffb.cjs → delete-icon.entry-87b2daaa.cjs} +1 -1
  55. package/dist/delete-icon.entry-9c1af040.js +15 -0
  56. package/dist/delete-icon.entry-e320cde1.cjs +1 -0
  57. package/dist/{document-refresh-icon.entry-fab58d33.js → document-refresh-icon.entry-665a7947.js} +1 -1
  58. package/dist/{document-refresh-icon.entry-59a18097.cjs → document-refresh-icon.entry-6be2b468.cjs} +1 -1
  59. package/dist/document-refresh-icon.entry-930ee2b7.js +15 -0
  60. package/dist/document-refresh-icon.entry-fcde4ff6.cjs +1 -0
  61. package/dist/{feedbackSync-b56b29ed-7a1f1f75.js → feedbackSync-b56b29ed-36483932.js} +1 -1
  62. package/dist/{feedbackSync-b56b29ed-b6f352f3.cjs → feedbackSync-b56b29ed-599103b9.cjs} +1 -1
  63. package/dist/feedbackSync-b56b29ed-7a7c650e.cjs +448 -0
  64. package/dist/feedbackSync-b56b29ed-9e38fdb6.js +6035 -0
  65. package/dist/{folder-icon.entry-e85383b6.cjs → folder-icon.entry-89f0974f.cjs} +1 -1
  66. package/dist/folder-icon.entry-977e50eb.cjs +1 -0
  67. package/dist/{folder-icon.entry-b5a123d0.js → folder-icon.entry-9bf864d7.js} +1 -1
  68. package/dist/folder-icon.entry-b80d8fd7.js +15 -0
  69. package/dist/{forward-icon.entry-88ab1a85.js → forward-icon.entry-2b0167a7.js} +1 -1
  70. package/dist/{forward-icon.entry-7c8ed4c3.cjs → forward-icon.entry-699c55d9.cjs} +1 -1
  71. package/dist/forward-icon.entry-c4c20f31.cjs +1 -0
  72. package/dist/forward-icon.entry-eb64aa16.js +15 -0
  73. package/dist/{globe-icon.entry-b1253516.cjs → globe-icon.entry-3d08a9c4.cjs} +1 -1
  74. package/dist/{globe-icon.entry-6fb414ca.js → globe-icon.entry-5d962e7a.js} +1 -1
  75. package/dist/globe-icon.entry-5ef1dc42.cjs +1 -0
  76. package/dist/globe-icon.entry-667987bd.js +15 -0
  77. package/dist/{google-logo-icon_4.entry-ae09d065.cjs → google-logo-icon_4.entry-12f1492f.cjs} +1 -1
  78. package/dist/google-logo-icon_4.entry-bd4d2237.cjs +1 -0
  79. package/dist/{google-logo-icon_4.entry-fe627741.js → google-logo-icon_4.entry-ec724f2e.js} +101 -101
  80. package/dist/google-logo-icon_4.entry-fc38681e.js +729 -0
  81. package/dist/{inbox-icon.entry-cec35da1.js → inbox-icon.entry-2020fa96.js} +1 -1
  82. package/dist/{inbox-icon.entry-7dce836e.cjs → inbox-icon.entry-45414f66.cjs} +1 -1
  83. package/dist/inbox-icon.entry-49353988.js +15 -0
  84. package/dist/inbox-icon.entry-b556231f.cjs +1 -0
  85. package/dist/index-290b2932.cjs +81 -0
  86. package/dist/{index-3fd31877.js → index-2b208d5d.js} +50 -50
  87. package/dist/{index-bd6fdc8c.cjs → index-bf124f70.cjs} +2 -2
  88. package/dist/index-fb096a02.js +13011 -0
  89. package/dist/{index.es-c7ca1bad-0a324dca.cjs → index.es-c7ca1bad-67a99f41.cjs} +1 -1
  90. package/dist/{index.es-c7ca1bad-b895d84b.js → index.es-c7ca1bad-70899f2a.js} +1 -1
  91. package/dist/index.es-c7ca1bad-b7a3e6bd.cjs +7 -0
  92. package/dist/index.es-c7ca1bad-cb3a99a7.js +3129 -0
  93. package/dist/{info-icon_2.entry-1dab6311.cjs → info-icon_2.entry-237205a0.cjs} +1 -1
  94. package/dist/{info-icon_2.entry-f7e6b4aa.js → info-icon_2.entry-b98a2882.js} +1 -1
  95. package/dist/info-icon_2.entry-caf64c28.cjs +1 -0
  96. package/dist/info-icon_2.entry-d935e5c2.js +34 -0
  97. package/dist/{input-color-picker.entry-30cda4e2.js → input-color-picker.entry-684413c1.js} +1 -1
  98. package/dist/input-color-picker.entry-752534de.js +48 -0
  99. package/dist/{input-color-picker.entry-b6e53c29.cjs → input-color-picker.entry-8fe3482d.cjs} +1 -1
  100. package/dist/input-color-picker.entry-f856fce3.cjs +1 -0
  101. package/dist/{input-component.entry-7a04bc8b.js → input-component.entry-00b97287.js} +1 -1
  102. package/dist/input-component.entry-4400f98e.js +70 -0
  103. package/dist/{input-component.entry-1f1f8e00.cjs → input-component.entry-bcd13373.cjs} +1 -1
  104. package/dist/input-component.entry-d486907a.cjs +1 -0
  105. package/dist/{input-dropdown.entry-abf134a8.js → input-dropdown.entry-3c39e23a.js} +1 -1
  106. package/dist/{input-dropdown.entry-5e5b67be.cjs → input-dropdown.entry-b26475c4.cjs} +1 -1
  107. package/dist/input-dropdown.entry-bea3c690.js +134 -0
  108. package/dist/input-dropdown.entry-d3d4e50e.cjs +1 -0
  109. package/dist/{italic-icon.entry-c793243b.cjs → italic-icon.entry-14081a02.cjs} +1 -1
  110. package/dist/{italic-icon.entry-4631c594.js → italic-icon.entry-2199bb17.js} +1 -1
  111. package/dist/italic-icon.entry-63726952.cjs +1 -0
  112. package/dist/italic-icon.entry-a3c87e5e.js +15 -0
  113. package/dist/{multi-select-dropdown.entry-9a93da56.js → multi-select-dropdown.entry-2141b848.js} +1 -1
  114. package/dist/{multi-select-dropdown.entry-2b8728d5.cjs → multi-select-dropdown.entry-7b66d2ae.cjs} +1 -1
  115. package/dist/multi-select-dropdown.entry-8a2c4b42.cjs +1 -0
  116. package/dist/multi-select-dropdown.entry-cdd97d65.js +95 -0
  117. package/dist/nylas-booked-event-card_12.entry-20c254bb.cjs +1 -0
  118. package/dist/nylas-booked-event-card_12.entry-2d88375a.js +1237 -0
  119. package/dist/nylas-booked-event-card_12.entry-90a0b6c7.cjs +1 -0
  120. package/dist/nylas-booked-event-card_12.entry-bbd7cfb0.js +1237 -0
  121. package/dist/{nylas-form-card.entry-af179b96.cjs → nylas-form-card.entry-1e9225b0.cjs} +1 -1
  122. package/dist/{nylas-form-card.entry-862519b4.js → nylas-form-card.entry-a8a44a3b.js} +2 -2
  123. package/dist/nylas-form-card.entry-d6287d76.cjs +1 -0
  124. package/dist/nylas-form-card.entry-fadd7718.js +57 -0
  125. package/dist/{nylas-if-state.entry-8803a762.js → nylas-if-state.entry-32b11afa.js} +2 -2
  126. package/dist/{nylas-if-state.entry-c1c1282d.cjs → nylas-if-state.entry-473230a6.cjs} +1 -1
  127. package/dist/nylas-if-state.entry-8be8107e.js +94 -0
  128. package/dist/nylas-if-state.entry-9c341f13.cjs +1 -0
  129. package/dist/{nylas-login.entry-65f8f046.cjs → nylas-login.entry-995b6f99.cjs} +1 -1
  130. package/dist/nylas-login.entry-b9c2fb27.cjs +1 -0
  131. package/dist/{nylas-login.entry-3e12f747.js → nylas-login.entry-d663205c.js} +2 -2
  132. package/dist/nylas-login.entry-e3a9c5c1.js +73 -0
  133. package/dist/{nylas-provider.entry-9626b113.cjs → nylas-provider.entry-050f20bd.cjs} +1 -1
  134. package/dist/nylas-provider.entry-5b54f2cc.cjs +1 -0
  135. package/dist/{nylas-provider.entry-e3501bd1.js → nylas-provider.entry-c24474c3.js} +4 -4
  136. package/dist/nylas-provider.entry-ca3e06ce.js +264 -0
  137. package/dist/{nylas-scheduler-editor.entry-17cd1514.cjs → nylas-scheduler-editor.entry-3b834bb1.cjs} +1 -1
  138. package/dist/{nylas-scheduler-editor.entry-6df45b05.js → nylas-scheduler-editor.entry-5c0a5fb4.js} +3 -3
  139. package/dist/nylas-scheduler-editor.entry-b86f49a1.js +1447 -0
  140. package/dist/nylas-scheduler-editor.entry-d52db29e.cjs +2 -0
  141. package/dist/{nylas-scheduling.entry-08051ba3.js → nylas-scheduling.entry-04c3951e.js} +73 -73
  142. package/dist/nylas-scheduling.entry-a5c4b050.js +412 -0
  143. package/dist/{nylas-scheduling.entry-b1fafd91.cjs → nylas-scheduling.entry-d549c5c3.cjs} +1 -1
  144. package/dist/nylas-scheduling.entry-ed12a4f6.cjs +1 -0
  145. package/dist/{nylas-time-window-picker.entry-4989d421.cjs → nylas-time-window-picker.entry-337d03c1.cjs} +1 -1
  146. package/dist/nylas-time-window-picker.entry-4aefade8.cjs +1 -0
  147. package/dist/{nylas-time-window-picker.entry-bdc8c6ea.js → nylas-time-window-picker.entry-678a7dbf.js} +1 -1
  148. package/dist/nylas-time-window-picker.entry-ecc3ee10.js +316 -0
  149. package/dist/{person-icon.entry-fb7efa8f.cjs → person-icon.entry-3fee5bc4.cjs} +1 -1
  150. package/dist/{person-icon.entry-d62a16b4.js → person-icon.entry-902b2c0d.js} +1 -1
  151. package/dist/person-icon.entry-9680bc2b.js +15 -0
  152. package/dist/person-icon.entry-dede7140.cjs +1 -0
  153. package/dist/{play-icon.entry-01b95392.js → play-icon.entry-1078da37.js} +1 -1
  154. package/dist/{play-icon.entry-f485a2c8.cjs → play-icon.entry-a7f648f7.cjs} +1 -1
  155. package/dist/play-icon.entry-c8f3a5d8.cjs +1 -0
  156. package/dist/play-icon.entry-dacc3aa6.js +15 -0
  157. package/dist/react.cjs +1 -1
  158. package/dist/react.js +1 -1
  159. package/dist/{refresh-icon.entry-5f997e86.cjs → refresh-icon.entry-06f9d181.cjs} +1 -1
  160. package/dist/{refresh-icon.entry-1ff4b39f.js → refresh-icon.entry-5399f64b.js} +1 -1
  161. package/dist/refresh-icon.entry-555a38ec.cjs +1 -0
  162. package/dist/refresh-icon.entry-d4dcfc3a.js +15 -0
  163. package/dist/{register-component-3444af44-854971ad.js → register-component-3444af44-3d6e535a.js} +1 -1
  164. package/dist/register-component-3444af44-4a273c0a.js +109 -0
  165. package/dist/{register-component-3444af44-9053e8c3.cjs → register-component-3444af44-6d269634.cjs} +1 -1
  166. package/dist/register-component-3444af44-d3e7252a.cjs +1 -0
  167. package/dist/{reply-all-icon.entry-1dad6514.cjs → reply-all-icon.entry-70ffe5be.cjs} +1 -1
  168. package/dist/{reply-all-icon.entry-cbafb8a0.js → reply-all-icon.entry-a3a20f76.js} +1 -1
  169. package/dist/reply-all-icon.entry-bb2a88ad.js +15 -0
  170. package/dist/reply-all-icon.entry-f8a32be1.cjs +1 -0
  171. package/dist/{reply-icon.entry-a43bc252.js → reply-icon.entry-302ed745.js} +1 -1
  172. package/dist/reply-icon.entry-423fb307.js +15 -0
  173. package/dist/{reply-icon.entry-162d9945.cjs → reply-icon.entry-a08c0e57.cjs} +1 -1
  174. package/dist/reply-icon.entry-d2da8972.cjs +1 -0
  175. package/dist/{scheduler-config-store-ed4a8dfd-eeaeaa50.cjs → scheduler-config-store-ed4a8dfd-34c4c119.cjs} +1 -1
  176. package/dist/scheduler-config-store-ed4a8dfd-474f6252.cjs +1 -0
  177. package/dist/{scheduler-config-store-ed4a8dfd-22db9285.js → scheduler-config-store-ed4a8dfd-81687f55.js} +1 -1
  178. package/dist/scheduler-config-store-ed4a8dfd-fe2b9d18.js +26 -0
  179. package/dist/{scheduler-store-d4784b24-9a5f5734.js → scheduler-store-2e7db190-c648278f.js} +27 -25
  180. package/dist/scheduler-store-2e7db190-fb6a20a1.cjs +1 -0
  181. package/dist/scheduler-store-5fbba021-09da63cf.cjs +1 -0
  182. package/dist/scheduler-store-5fbba021-6298edf3.js +484 -0
  183. package/dist/{sent-icon.entry-a05486d5.js → sent-icon.entry-4d7b65ba.js} +1 -1
  184. package/dist/{sent-icon.entry-a1aec7e9.cjs → sent-icon.entry-6396b793.cjs} +1 -1
  185. package/dist/sent-icon.entry-6ed4170a.js +15 -0
  186. package/dist/sent-icon.entry-db89fd38.cjs +1 -0
  187. package/dist/{spam-icon.entry-473f11af.js → spam-icon.entry-45e7b83b.js} +1 -1
  188. package/dist/spam-icon.entry-81073952.js +15 -0
  189. package/dist/{spam-icon.entry-b481a04b.cjs → spam-icon.entry-8648a315.cjs} +1 -1
  190. package/dist/spam-icon.entry-cf05a2a7.cjs +1 -0
  191. package/dist/{star-icon.entry-6b1fe3cf.cjs → star-icon.entry-1c416cef.cjs} +1 -1
  192. package/dist/{star-icon.entry-12fdc345.js → star-icon.entry-61c36332.js} +1 -1
  193. package/dist/star-icon.entry-8279e6a9.cjs +1 -0
  194. package/dist/star-icon.entry-bb26cc4e.js +15 -0
  195. package/dist/{stop-icon.entry-4bd609f7.js → stop-icon.entry-089ac3ba.js} +1 -1
  196. package/dist/{stop-icon.entry-72481153.cjs → stop-icon.entry-d68aa652.cjs} +1 -1
  197. package/dist/stop-icon.entry-f62d063b.js +15 -0
  198. package/dist/stop-icon.entry-f88a5a2a.cjs +1 -0
  199. package/dist/{textarea-component.entry-f330a755.cjs → textarea-component.entry-502c8659.cjs} +1 -1
  200. package/dist/{textarea-component.entry-47e1b2e6.js → textarea-component.entry-8f5d835f.js} +1 -1
  201. package/dist/textarea-component.entry-d4a682fa.js +37 -0
  202. package/dist/textarea-component.entry-e06ee834.cjs +1 -0
  203. package/dist/{time-period-selector.entry-c7611563.cjs → time-period-selector.entry-001a1c59.cjs} +1 -1
  204. package/dist/{time-period-selector.entry-a4899368.js → time-period-selector.entry-7da7d316.js} +1 -1
  205. package/dist/time-period-selector.entry-837b9be3.js +80 -0
  206. package/dist/time-period-selector.entry-c5b6d0c9.cjs +1 -0
  207. package/dist/{translate-icon.entry-40dfa8c9.cjs → translate-icon.entry-4ee80d22.cjs} +1 -1
  208. package/dist/{translate-icon.entry-4517838d.js → translate-icon.entry-5166d376.js} +1 -1
  209. package/dist/translate-icon.entry-c1a623d8.cjs +1 -0
  210. package/dist/translate-icon.entry-e5cfae44.js +15 -0
  211. package/dist/{trash-fill-icon.entry-86ca3055.cjs → trash-fill-icon.entry-2f814465.cjs} +1 -1
  212. package/dist/{trash-fill-icon.entry-d7e960eb.js → trash-fill-icon.entry-49844a82.js} +1 -1
  213. package/dist/trash-fill-icon.entry-85e0e841.js +15 -0
  214. package/dist/trash-fill-icon.entry-def90241.cjs +1 -0
  215. package/dist/{underline-icon.entry-352970f5.js → underline-icon.entry-181f1d7e.js} +1 -1
  216. package/dist/{underline-icon.entry-f16d4943.cjs → underline-icon.entry-4ba93e7b.cjs} +1 -1
  217. package/dist/underline-icon.entry-72dadbdf.cjs +1 -0
  218. package/dist/underline-icon.entry-f7a75755.js +15 -0
  219. package/dist/{warning-icon.entry-63987dad.js → warning-icon.entry-2406b765.js} +1 -1
  220. package/dist/{warning-icon.entry-79ef75b2.cjs → warning-icon.entry-44ac5566.cjs} +1 -1
  221. package/dist/warning-icon.entry-5b6aeb2b.cjs +1 -0
  222. package/dist/warning-icon.entry-ef601856.js +15 -0
  223. package/package.json +2 -2
  224. package/dist/calendar-agenda-fill-icon_54.entry-702b29cc.cjs +0 -10
  225. package/dist/nylas-booked-event-card_12.entry-8d502a3c.cjs +0 -1
  226. package/dist/nylas-booked-event-card_12.entry-f13f3f54.js +0 -1144
  227. package/dist/scheduler-store-d4784b24-aed474e8.cjs +0 -1
@@ -1,1144 +0,0 @@
1
- import { r as k, c as b, d, q as U, h as n, i as c, k as K, H as g, s as X, t as fe, g as G, j as Y, v as be, w as me, x as E, y as he, z as ue, A as z, C as pe, F as ge } from "./index-3fd31877.js";
2
- import { R as _ } from "./register-component-3444af44-854971ad.js";
3
- import { T as D, a as Q, b as J } from "./constants-c549b12b-7ea4c7f5.js";
4
- import "react";
5
- import "react-dom";
6
- const ye = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booked-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family)}.event-card-wrapper{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;margin-bottom:2rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 0;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400;border-bottom:1px solid var(--nylas-base-200);width:inherit;padding:0 0 1.5rem}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.booked-event-header .card-description{text-align:center}.booking-date-time,.booking-participants{padding:0 1rem;margin-top:1.5rem;margin-left:3rem;display:flex;flex-direction:column;justify-content:space-between;align-self:flex-start;position:relative}.booking-date-time svg,.booking-participants svg{color:var(--nylas-base-700);position:absolute;left:-10px}.booking-date-time .block,.booking-participants .block{display:block}.booking-date-time h3,.booking-participants h3{color:var(--nylas-base-600);margin:0;font-size:16px;font-weight:600;line-height:1.25rem;text-align:justify;margin-bottom:4px}.booking-date-time p,.booking-participants p{font-size:16px;margin:0;font-weight:400;text-align:justify;color:var(--nylas-base-800)}.booking-participants{margin-bottom:1.5rem}.booked-event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:1.5rem;gap:4px;margin:2rem;align-items:center;align-self:flex-end}.button-container{width:inherit}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);border-top:1px solid var(--nylas-base-200);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}', ve = ye;
7
- var ke = function(e, t, a, s) {
8
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
9
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
10
- i = Reflect.decorate(e, t, a, s);
11
- else
12
- for (var l = e.length - 1; l >= 0; l--)
13
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
14
- return o > 3 && i && Object.defineProperty(t, a, i), i;
15
- }, R = function(e, t) {
16
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
17
- return Reflect.metadata(e, t);
18
- };
19
- const ee = class {
20
- constructor(e) {
21
- k(this, e), this.cancelBookingButtonClicked = b(this, "cancelBookingButtonClicked", 7), this.rescheduleButtonClicked = b(this, "rescheduleButtonClicked", 7), this.rescheduleBookedEventError = b(this, "rescheduleBookedEventError", 7), this.cancelBookedEventValidationError = b(this, "cancelBookedEventValidationError", 7), this.handleCancelBookingButtonClicked = () => {
22
- var o, i;
23
- const t = new Date(this.selectedTimeslot.start_time), a = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.min_cancellation_notice;
24
- t.getTime() - a * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime() ? this.cancelBookedEventValidationError.emit({
25
- error: {
26
- title: "Cancellation Error",
27
- message: `You cannot cancel the booking within ${a} minutes of the event.`
28
- }
29
- }) : this.cancelBookingButtonClicked.emit({ bookingId: this.eventInfo.booking_id });
30
- }, this.handleRescheduleButtonClicked = () => {
31
- const t = (a) => {
32
- this.rescheduleBookedEventError.emit(a);
33
- };
34
- this.rescheduleButtonClicked.emit({ bookingId: this.eventInfo.booking_id, errorHandler: t });
35
- }, this.getPaticipantType = (t) => {
36
- switch (t) {
37
- case "host":
38
- return "Host";
39
- case "you":
40
- return "You";
41
- default:
42
- return "";
43
- }
44
- }, this.eventInfo = void 0, this.rescheduleBookingId = void 0, this.bookingInfo = void 0, this.configSettings = void 0, this.isLoading = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedTimeslot = void 0, this.selectedLanguage = navigator.language, this.startTime = "", this.endTime = "";
45
- }
46
- connectedCallback() {
47
- }
48
- disconnectedCallback() {
49
- }
50
- async componentWillLoad() {
51
- d("[nylas-booked-event-card] Component will load");
52
- }
53
- async componentDidLoad() {
54
- var e, t;
55
- d("[nylas-booked-event-card] Component did load"), this.eventInfo || console.warn('[nylas-booked-event-card] "eventInfo" prop missing. Please provide the event info to display the event details in the booked event card component.'), this.bookingInfo || console.warn('[nylas-booked-event-card] "bookingInfo" prop missing. Please provide the booking info to display the guest details in the booked event card component.'), this.startTime = U((e = this.selectedTimeslot) == null ? void 0 : e.start_time, this.selectedTimezone), this.endTime = U((t = this.selectedTimeslot) == null ? void 0 : t.end_time, this.selectedTimezone);
56
- }
57
- render() {
58
- var a, s, o, i, r, l, p, m, f, u, h, v, x, w, C, y;
59
- const e = (a = this.configSettings) == null ? void 0 : a.booking_type, t = e && e !== "booking";
60
- return n(g, { key: "4c047c53d7532b60d6d28be607b3e926e07f2e50", part: "nbec" }, n("div", { key: "154180aa38c82fc2e28d8b9ad753804fdfb837d7", class: "nylas-booked-event-card" }, n("div", { key: "a6d046deffb82706bd609a2ac7f33f462578326a", class: "booked-event-timezone" }, n("globe-icon", { key: "22418924800ed88cdf685441561728ecac4594cd" }), D[this.selectedTimezone]), n("div", { key: "f4f4ffb1ff084cba9f1032c1d5e394a9b65286e2", class: "event-card-wrapper", part: "nbec__card" }, n("div", { key: "7440e6baed4f509594acf69166566a6546d9b2ae", class: "calendar-icon" }, n("calendar-check-icon", { key: "6a82cfb9ac8d89bb8151e86dcbb9d49422513b89" })), n("div", { key: "c913c479384ecd4e5df96dea05a1305a12df76c8", class: "booked-event-header" }, n("h2", { key: "c818d579e73751d6e83bf50f9dc34a3523e2b0f1", slot: "card-title", part: "nbec__title" }, this.rescheduleBookingId && !this.isLoading ? `${c.t("bookingRescheduled")}` : t && !this.isLoading ? `${c.t("bookingSent")}` : `${c.t("bookingConfirmed")}`, "!"), n("div", { key: "bb6cef397ebe5aec3ed49f455ac00430594c4c6f", class: "card-description", part: "nbec__description" }, t ? c.t("bookingSentDescription") : n("span", null, c.t("bookingConfirmedDescription")))), n("div", { key: "d4732fc9421c4d54062bdac74e69a476322f168a", class: "booking-date-time" }, n("checkmark-circle-icon", { key: "caadcce299c4506d709a65bfbc3d10fec64ef6d6" }), n("h3", { key: "8a2dc813f1be6bab13a53328c4e9dbb5ec7d41df" }, c.t("bookingDateAndTimeHeader")), n("p", { key: "fedc61f46ba1b96e424b23aff08c382296e4a6d3" }, (s = this.selectedTimeslot) != null && s.start_time ? K(new Date((o = this.selectedTimeslot) == null ? void 0 : o.start_time).toLocaleDateString(Q[this.selectedLanguage], { dateStyle: "full" })) : "-", " ", n("br", { key: "6efc18bfd398bca545c359b5876ff9a16792485f" }), this.startTime, " - ", this.endTime)), n("div", { key: "c972d3fc4f1541ec6a1fde958176de0adccf3bcd", class: "booking-participants" }), !t && n("div", { class: "button-container" }, n("div", { class: {
61
- footer: !0,
62
- "no-footer": ((r = (i = this.configSettings) == null ? void 0 : i.scheduler) == null ? void 0 : r.hide_cancellation_options) && ((p = (l = this.configSettings) == null ? void 0 : l.scheduler) == null ? void 0 : p.hide_rescheduling_options) || ((m = this.configSettings) == null ? void 0 : m.booking_type) === "organizer-confirmation",
63
- "no-template-cols": ((u = (f = this.configSettings) == null ? void 0 : f.scheduler) == null ? void 0 : u.hide_cancellation_options) || ((v = (h = this.configSettings) == null ? void 0 : h.scheduler) == null ? void 0 : v.hide_rescheduling_options)
64
- } }, !((w = (x = this.configSettings) == null ? void 0 : x.scheduler) != null && w.hide_cancellation_options) && n("button-component", { variant: "destructive", onClick: this.handleCancelBookingButtonClicked, part: "nbec__button-outline nbec__cancel-cta" }, `${c.t("cancelBookingButton")}`), !((y = (C = this.configSettings) == null ? void 0 : C.scheduler) != null && y.hide_rescheduling_options) && n("button-component", { variant: "basic", onClick: this.handleRescheduleButtonClicked, part: "nbec__button-outline nbec__reschedule-cta" }, `${c.t("rescheduleBookingButton")}`))))));
65
- }
66
- };
67
- ke([
68
- _({
69
- name: "nylas-booked-event-card",
70
- stateToProps: /* @__PURE__ */ new Map([
71
- ["scheduler.bookingInfo", "bookingInfo"],
72
- ["scheduler.rescheduleBookingId", "rescheduleBookingId"],
73
- ["scheduler.selectedTimezone", "selectedTimezone"],
74
- ["scheduler.selectedTimeslot", "selectedTimeslot"],
75
- ["scheduler.isLoading", "isLoading"],
76
- ["scheduler.selectedLanguage", "selectedLanguage"],
77
- ["scheduler.configSettings", "configSettings"]
78
- ]),
79
- eventToProps: {
80
- cancelBookingButtonClicked: async (e, t) => {
81
- t.scheduler.setCancel(e.detail.bookingId);
82
- },
83
- rescheduleButtonClicked: async (e, t) => {
84
- const a = await t.scheduler.setReschedule(e.detail.bookingId), { errorHandler: s } = e.detail;
85
- s && (!a || "error" in a) && s(a);
86
- },
87
- rescheduleBookedEventError: async (e, t) => {
88
- d("nylas-booked-event-card", "rescheduleBookedEventError", e.detail);
89
- },
90
- cancelBookedEventValidationError: async (e, t) => {
91
- d("nylas-booked-event-card", "cancelBookedEventValidationError", e.detail);
92
- }
93
- },
94
- fireRegisterEvent: !0
95
- }),
96
- R("design:type", Function),
97
- R("design:paramtypes", []),
98
- R("design:returntype", void 0)
99
- ], ee.prototype, "render", null);
100
- ee.style = ve;
101
- const Ce = ':host{display:block;height:100%;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}@media screen and (max-width: 768px){.cta{grid-template-columns:1fr}}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper input::placeholder{color:var(--nylas-base-300)}.input-wrapper label,.input-wrapper input{font-family:var(--nylas-font-family);font-size:16px}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}.button-content{display:flex;gap:4px;align-items:center}sp-infield-button{--spectrum-infield-button-background-color:transparent;--spectrum-infield-button-background-color-hover:transparent;--spectrum-infield-button-background-color-active:transparent;--spectrum-infield-button-border-color:transparent;--spectrum-infield-button-border-width:1px;--spectrum-infield-button-border-radius:0;color:var(--nylas-base-600);background:transparent;border:none;outline:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:52px;width:52px;display:flex;position:absolute;right:0;align-items:center;justify-content:center;cursor:pointer}sp-infield-button sp-icon-cross300{color:var(--nylas-base-600)}sp-infield-button.error{border-width:2px;border-color:var(--nylas-error)}input[type=text],input[type=email]{display:flex;height:48px;padding-left:16px;align-items:center;gap:8px;align-self:stretch;border-radius:var(--nylas-border-radius-2x);border:1px solid var(--nylas-base-300);background:var(--nylas-base-0);width:-webkit-fill-available;color:var(--nylas-base-900);font-size:16px;font-style:normal;font-weight:400;line-height:150%}input[type=text]:focus,input[type=email]:focus{outline-color:var(--nylas-primary)}input[type=text].error,input[type=email].error{border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}input[type=text].error::placeholder,input[type=email].error::placeholder{font-weight:400}input[type=text]::placeholder,input[type=email]::placeholder{color:var(--nylas-base-300)}input[type=text].guest-email,input[type=email].guest-email{color:var(--nylas-base-900);padding-right:52px}label{display:flex;color:var(--nylas-base-800, #293056);font-size:14px;font-style:normal;font-weight:400;line-height:150%}label.error{color:var(--nylas-error)}label span.required{color:var(--nylas-error);padding:0 0.25rem}button-component.remove-guest{position:absolute;height:51px;right:0}button-component.remove-guest.error button{border-color:var(--nylas-error)}button-component.remove-guest button{height:inherit;border-top-left-radius:initial;border-bottom-left-radius:initial;border:none !important;border-left:1px solid var(--nylas-base-300) !important}button-component.remove-guest button:hover,button-component.remove-guest button:focus{outline:1px solid var(--nylas-primary) !important;color:var(--nylas-primary)}button-component.back button{--dot-color:var(--nylas-base-800)}.guest-email-input{position:relative;display:flex;width:100%}', _e = Ce;
102
- var xe = function(e, t, a, s) {
103
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
104
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
105
- i = Reflect.decorate(e, t, a, s);
106
- else
107
- for (var l = e.length - 1; l >= 0; l--)
108
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
109
- return o > 3 && i && Object.defineProperty(t, a, i), i;
110
- }, j = function(e, t) {
111
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
112
- return Reflect.metadata(e, t);
113
- };
114
- const L = /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/, te = class {
115
- constructor(e) {
116
- k(this, e), this.nameChanged = b(this, "nameChanged", 7), this.emailChanged = b(this, "emailChanged", 7), this.backButtonClicked = b(this, "backButtonClicked", 7), this.detailsConfirmed = b(this, "detailsConfirmed", 7), this.bookingFormError = b(this, "bookingFormError", 7), this.bookingFormSubmitted = b(this, "bookingFormSubmitted", 7), this.handleGuestChange = (t, a) => {
117
- this.resetGuestEmailError(t);
118
- const s = [...this.guestEmails];
119
- s[t] = X(a), this.guestEmails = [...s];
120
- }, this.handleGuestBlur = (t, a) => {
121
- if (this.resetGuestEmailError(t), a === "") {
122
- this.guestEmailErrors[t] = c.t("fieldRequired", { field: c.t("email") });
123
- return;
124
- }
125
- if (!L.test(a)) {
126
- this.guestEmailErrors[t] = c.t("invalidInputFormat", { field: c.t("email") });
127
- return;
128
- }
129
- this.handleGuestChange(t, a);
130
- }, this.addGuestButtonClickedHandler = (t) => {
131
- t.preventDefault(), this.guestEmails = [...this.guestEmails, ""];
132
- }, this.removeGuestButtonClickHandler = (t, a) => {
133
- t.preventDefault(), this.resetGuestEmailError(a);
134
- const s = [...this.guestEmails];
135
- s.splice(a, 1), this.guestEmails = [...s];
136
- }, this.handleBackButtonClicked = (t) => {
137
- t.preventDefault(), this.backButtonLoading = !0, this.backButtonClicked.emit();
138
- }, this.bookButtonClickedHandler = async (t) => {
139
- var l, p, m, f, u, h, v, x, w;
140
- if (t.preventDefault(), this.bookingFormSubmitted.emit().defaultPrevented)
141
- return;
142
- d("nylas-booking-form", "bookButtonClickedHandler", this.bookingInfo);
143
- const s = this.name || ((p = (l = this.bookingInfo) == null ? void 0 : l.primaryParticipant) == null ? void 0 : p.name), o = this.email || ((f = (m = this.bookingInfo) == null ? void 0 : m.primaryParticipant) == null ? void 0 : f.email);
144
- if (!s || s === "") {
145
- this.isNameValid = !1, this.validationError.name = c.t("fieldRequired", { field: c.t("name") }) || "Name is required", this.bookingFormError.emit({
146
- title: "Booking form error",
147
- description: "Name is required"
148
- });
149
- return;
150
- }
151
- if (!o || o === "") {
152
- this.isEmailValid = !1, this.validationError.email = c.t("fieldRequired", { field: c.t("email") }) || "Email is required", this.bookingFormError.emit({
153
- title: "Booking form error",
154
- description: "Email is required"
155
- });
156
- return;
157
- }
158
- if (!L.test(o)) {
159
- this.isEmailValid = !1, this.validationError.email = c.t("invalidInputFormat", { field: c.t("email") }), this.bookingFormError.emit({
160
- title: "Booking form error",
161
- description: c.t("invalidInputFormat", { field: c.t("email") }) || "Invalid email"
162
- });
163
- return;
164
- }
165
- let i = [];
166
- if (this.guestEmails.length > 0) {
167
- let C = !1;
168
- if (this.guestEmails.forEach((y, B) => {
169
- y === "" ? (C = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [B]: c.t("fieldRequired", { field: c.t("email") }) }) : L.test(y) || (C = !0, this.guestEmailErrors = { ...this.guestEmailErrors, [B]: c.t("invalidInputFormat", { field: c.t("email") }) });
170
- }), C) {
171
- this.bookingFormError.emit({
172
- title: "Booking form error",
173
- description: c.t("invalidInputFormat", { field: c.t("guestEmail") }) || "Invalid guest email"
174
- });
175
- return;
176
- }
177
- i = this.guestEmails.map((y) => ({ name: y.trim(), email: y.trim() }));
178
- } else
179
- (u = this.bookingInfo) != null && u.guests && (i = (h = this.bookingInfo) == null ? void 0 : h.guests);
180
- const r = {};
181
- if ((v = this.bookingInfo) != null && v.additionalFields) {
182
- const C = ((w = (x = this.configSettings) == null ? void 0 : x.scheduler) == null ? void 0 : w.additional_fields) || {};
183
- Object.entries(this.bookingInfo.additionalFields).forEach(([y, B]) => {
184
- y in C && (r[y] = B.value);
185
- });
186
- }
187
- this.detailsConfirmed.emit({
188
- primaryParticipant: {
189
- name: s,
190
- email: o
191
- },
192
- guests: i,
193
- additionalFields: { ...r, ...this.additionalFields }
194
- });
195
- }, this.updateAdditionalFields = (t, a) => {
196
- this.additionalFields && (this.additionalFields[t] = a);
197
- }, this.isLoading = void 0, this.bookingInfo = void 0, this.eventInfo = void 0, this.configSettings = void 0, this.name = "", this.email = "", this.guestEmails = [], this.guestEmailErrors = {}, this.isNameValid = !0, this.isEmailValid = !0, this.additionalFields = {}, this.validationError = { name: "", email: "" }, this.backButtonLoading = !1;
198
- }
199
- connectedCallback() {
200
- }
201
- disconnectedCallback() {
202
- }
203
- componentWillLoad() {
204
- var e, t, a;
205
- d("nylas-booking-form", "componentWillLoad", this.bookingInfo), this.bookingInfo && ((e = this.bookingInfo) != null && e.primaryParticipant) && (this.name = (t = this.bookingInfo.primaryParticipant) == null ? void 0 : t.name, this.email = (a = this.bookingInfo.primaryParticipant) == null ? void 0 : a.email);
206
- }
207
- bookingInfoChangedHandler(e) {
208
- e && e.primaryParticipant && (this.name = e.primaryParticipant.name, this.email = e.primaryParticipant.email);
209
- }
210
- changeName(e) {
211
- this.isNameValid = !0, this.validationError.name = "", this.name = fe(e), this.nameChanged.emit(e);
212
- }
213
- changeEmail(e) {
214
- this.isEmailValid = !0, this.validationError.email = "", this.email = X(e), this.emailChanged.emit(e);
215
- }
216
- resetGuestEmailError(e) {
217
- const t = { ...this.guestEmailErrors };
218
- delete t[e], this.guestEmailErrors = { ...t };
219
- }
220
- nylasFormInputChangedHandler(e) {
221
- switch (e.detail.name) {
222
- case "name":
223
- this.changeName(e.detail.value);
224
- break;
225
- case "email":
226
- this.changeEmail(e.detail.value);
227
- break;
228
- default:
229
- if (e.detail.error) {
230
- this.bookingFormError.emit({
231
- title: "Booking form error",
232
- description: e.detail.error
233
- });
234
- return;
235
- }
236
- this.updateAdditionalFields(e.detail.name, e.detail.value);
237
- break;
238
- }
239
- }
240
- selectOptionChangedHandler(e) {
241
- if (e.detail.error) {
242
- this.bookingFormError.emit({
243
- title: "Booking form error",
244
- description: e.detail.error
245
- });
246
- return;
247
- }
248
- this.updateAdditionalFields(e.detail.name, e.detail.value);
249
- }
250
- switchToggledHandler(e) {
251
- this.updateAdditionalFields(e.detail.name, e.detail.checked ? "true" : "false");
252
- }
253
- checkboxToggledHandler(e) {
254
- this.updateAdditionalFields(e.detail.name, e.detail.checked ? "true" : "false");
255
- }
256
- radioChangedHandler(e) {
257
- this.updateAdditionalFields(e.detail.name, e.detail.value);
258
- }
259
- dropdownDefaultSelectedHandler(e) {
260
- this.updateAdditionalFields(e.detail.name, e.detail.value);
261
- }
262
- render() {
263
- var e, t, a, s, o, i, r, l, p;
264
- return n(g, { key: "0ea30bef8b00673240ee959d6b8baaffc7d2c715" }, n("form", { key: "d5bf36df0f5419c98b5114719c731e8c3201bc7b", onSubmit: (m) => this.bookButtonClickedHandler(m), noValidate: !0 }, n("div", { key: "2a7a7cbaae2af6f3b79e23366752a421bf2304ba", class: "nylas-booking-form", part: "nbf" }, n("div", { key: "9af4ebc990cb2ef4e3e58af148eb7609b203c78a", class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { key: "31ea0d5c904a62c2c9b8d7572b448d9a28b24e86", label: c.t("name"), name: "name", id: "name", defaultValue: ((t = (e = this.bookingInfo) == null ? void 0 : e.primaryParticipant) == null ? void 0 : t.name) || this.name, placeholder: c.t("namePlaceholder"), type: "text", required: !0, requiredError: c.t("fieldRequired", { field: c.t("name") }), patternError: c.t("invalidInputFormat", { field: c.t("name") }), part: "nbf__input-textfield" })), n("div", { key: "95de0dabca66d11e1370b282e4d23eb545fb33a6", class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { key: "712b25028a9d12bde236ada12c9b8ee15a70c885", label: c.t("email"), name: "email", id: "email", pattern: L, defaultValue: ((s = (a = this.bookingInfo) == null ? void 0 : a.primaryParticipant) == null ? void 0 : s.email) || this.email, placeholder: c.t("emailPlaceholder"), type: "email", required: !0, requiredError: c.t("fieldRequired", { field: c.t("email") }), patternError: c.t("invalidInputFormat", { field: c.t("email") }), part: "nbf__input-textfield" })), ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_additional_guests) !== !0 && n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, this.guestEmails.map((m, f) => n("div", { class: "input-wrapper button-wrapper" }, n("label", { class: {
265
- error: !!this.guestEmailErrors[f]
266
- } }, c.t("guestEmail")), n("div", { class: "guest-email-input" }, n("input", { type: "email", id: `guest-email-${f}`, maxLength: 100, class: {
267
- "guest-email": !0,
268
- error: !!this.guestEmailErrors[f]
269
- }, placeholder: c.t("guestEmailPlaceholder"), value: m, "data-index": f, part: "nbf__input-textfield", onBlur: (u) => {
270
- var h;
271
- return this.handleGuestBlur(f, (h = u.target) == null ? void 0 : h.value);
272
- }, onInput: (u) => {
273
- var h;
274
- return this.handleGuestChange(f, (h = u.target) == null ? void 0 : h.value);
275
- } }), n("button-component", { variant: "basic", tooltip: "Remove guest", onClick: (u) => this.removeGuestButtonClickHandler(u, f), class: {
276
- "remove-guest": !0,
277
- error: !!this.guestEmailErrors[f]
278
- } }, n("close-icon", null))), n("p", { class: "help-text" }, this.guestEmailErrors[f]))), n("button-component", { class: "add-guest", variant: "invisible", part: "nbf__button-ghost", onClick: (m) => this.addGuestButtonClickedHandler(m) }, n("div", { class: "button-content" }, n("add-circle-icon", { slot: "icon" }), this.guestEmails.length > 0 ? `${c.t("addAnotherGuest")}` : `${c.t("addGuest")}`))), (p = Object.entries(((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.additional_fields) || {})) == null ? void 0 : p.sort((m, f) => m[1].order - f[1].order).map((m) => {
279
- var x, w, C, y, B, W;
280
- const f = m[1], u = f.label, h = m[0], v = ((C = (w = (x = this.bookingInfo) == null ? void 0 : x.additionalFields) == null ? void 0 : w[h]) == null ? void 0 : C.value) || "";
281
- switch (f.type) {
282
- case "dropdown":
283
- return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("select-dropdown", { label: u, name: h, id: h, withSearch: !1, defaultSelectedOption: v ? { value: v, label: v } : void 0, options: (y = f.options) == null ? void 0 : y.map((T) => ({ value: T, label: T })), required: f.required, exportparts: "sd_dropdown: nbf__dropdown, sd_dropdown-button: nbf__dropdown-button, sd_dropdown-content: nbf__dropdown-content" }));
284
- case "checkbox":
285
- return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("checkbox-component", { label: u, name: h, id: h, checked: v === "true", required: f.required, part: "nbf__checkbox-component" }));
286
- case "radio_button":
287
- return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("radio-button-group", { label: u, name: h, id: h, defaultSelectedValue: v || ((B = f.options) == null ? void 0 : B[0]) || "", options: (W = f.options) == null ? void 0 : W.map((T) => ({ value: T, label: T })), required: f.required, part: "nbf__radio-button-group" }));
288
- case "multi_line_text":
289
- return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("textarea-component", { label: u, defaultValue: v, name: h, id: h, required: f.required, part: "nbf__textarea-component" }));
290
- default:
291
- return n("div", { class: "input-wrapper", part: "nbf__input-wrapper" }, n("input-component", { label: u, name: h, id: h, type: f.type, defaultValue: v || "", requiredError: c.t("fieldRequired", { field: u }), required: f.required, part: "nbf__input-textfield" }));
292
- }
293
- })), n("div", { key: "f89d9ed23eca94e127aca472e8444336160a4a49", class: "cta" }, n("button-component", { key: "e1de4364cd5d351f23499ab82bf4d444185a47cc", variant: "basic", class: "back", part: "nbf__button-outline", isLoading: this.backButtonLoading && this.isLoading, onClick: this.handleBackButtonClicked }, n("slot", { key: "1b1a422766e53e8e1aec7d31db9c2406afec3da1", name: "booking-form-back-label" }, `${c.t("backButton")}`)), n("button-component", { key: "68c249ef1ca7dad8b6217d86662dd195ec77b016", variant: "primary", isLoading: !this.backButtonLoading && this.isLoading, disabled: this.isLoading, part: "nbf__button-primary", type: "submit" }, n("slot", { key: "de2c7d09c9203409e7d92b80f6901b5099ab1163", name: "booking-form-book-label" }, `${c.t("bookNowButton")}`)))));
294
- }
295
- get host() {
296
- return G(this);
297
- }
298
- static get watchers() {
299
- return {
300
- bookingInfo: ["bookingInfoChangedHandler"]
301
- };
302
- }
303
- };
304
- xe([
305
- _({
306
- name: "nylas-booking-form",
307
- stateToProps: /* @__PURE__ */ new Map([
308
- ["scheduler.isLoading", "isLoading"],
309
- ["scheduler.bookingInfo", "bookingInfo"],
310
- ["scheduler.eventInfo", "eventInfo"],
311
- ["scheduler.configSettings", "configSettings"]
312
- ]),
313
- eventToProps: {
314
- backButtonClicked: async (e, t) => {
315
- t.scheduler.toggleAdditionalData(!1);
316
- },
317
- nameChanged: async (e, t) => {
318
- t.scheduler.setParticipantName(e.detail);
319
- },
320
- emailChanged: async (e, t) => {
321
- t.scheduler.setParticipantEmail(e.detail);
322
- },
323
- detailsConfirmed: async (e, t) => {
324
- d("nylas-booking-form", "detailsConfirmed", e.detail);
325
- },
326
- bookingFormSubmitted: async (e, t) => {
327
- d("nylas-booking-form", "bookingFormSubmitted", e.detail);
328
- },
329
- bookingFormError: async (e, t) => {
330
- d("nylas-booking-form", "bookingFormError", e.detail);
331
- }
332
- },
333
- fireRegisterEvent: !0
334
- }),
335
- j("design:type", Function),
336
- j("design:paramtypes", []),
337
- j("design:returntype", void 0)
338
- ], te.prototype, "render", null);
339
- te.style = _e;
340
- const we = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:block;width:400px;font-family:var(--nylas-font-family)}.nylas-cancel-booking-form{display:flex;align-items:center;flex-direction:column;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}.nylas-cancel-booking-form form{width:100%}.nylas-cancel-booking-form__title{font-size:18px;font-weight:600;margin-bottom:0;color:var(--nylas-base-900)}.nylas-cancel-booking-form__description{font-size:1rem;font-style:normal;font-weight:400;line-height:140%;color:var(--nylas-base-600);padding-bottom:1.25rem}.nylas-cancel-booking-form__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}.footer{display:grid;grid-template-columns:1fr 1fr;width:100%;padding-top:1.25rem;gap:1rem;border-top:1px solid var(--nylas-base-200);margin-top:1.25rem}', Ee = we;
341
- var Be = function(e, t, a, s) {
342
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
343
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
344
- i = Reflect.decorate(e, t, a, s);
345
- else
346
- for (var l = e.length - 1; l >= 0; l--)
347
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
348
- return o > 3 && i && Object.defineProperty(t, a, i), i;
349
- }, F = function(e, t) {
350
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
351
- return Reflect.metadata(e, t);
352
- };
353
- const ne = class {
354
- constructor(e) {
355
- var t, a;
356
- k(this, e), this.goBackButtonClicked = b(this, "goBackButtonClicked", 7), this.cancelBookingFormSubmitted = b(this, "cancelBookingFormSubmitted", 7), this.triggerValidation = b(this, "triggerValidation", 7), this.cancelBookedEventError = b(this, "cancelBookedEventError", 7), this.cancelBookingFormError = b(this, "cancelBookingFormError", 7), this.handleGoBackClicked = () => {
357
- this.goBackButtonClicked.emit();
358
- }, this.handleSubmitCancelBooking = (s) => {
359
- var r, l, p;
360
- if (this.triggerValidation.emit({}), s.preventDefault(), !this.cancellationReason) {
361
- this.cancellationError = c.t("cancellationErrorMessage"), this.cancelBookingFormError.emit({ title: c.t("cancelBokingFormError"), description: c.t("cancellationErrorMessage") });
362
- return;
363
- }
364
- const o = (l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.min_cancellation_notice;
365
- if (this.selectedTimeslot && o && new Date((p = this.selectedTimeslot) == null ? void 0 : p.start_time).getTime() - o * 60 * 1e3 < (/* @__PURE__ */ new Date()).getTime()) {
366
- this.cancelBookedEventError.emit({
367
- error: {
368
- title: c.t("cancellationErrorTitle"),
369
- message: c.t("minimumCancellationNoticeErrorMessage", { minCancellationNotice: o })
370
- }
371
- });
372
- return;
373
- }
374
- d(`[nylas-cancel-booking-form] Cancel booking form submitted with reason: ${this.cancellationReason}`);
375
- const i = (m) => {
376
- this.cancelBookedEventError.emit(m);
377
- };
378
- this.cancelBookingId ? this.cancelBookingFormSubmitted.emit({ bookingId: this.cancelBookingId, action: "cancel", reason: this.cancellationReason, errorHandler: i }) : this.rejectBookingId && this.cancelBookingFormSubmitted.emit({ bookingId: this.rejectBookingId, action: "reject", reason: this.cancellationReason, errorHandler: i });
379
- }, this.cancelBookingId = void 0, this.rejectBookingId = void 0, this.selectedTimeslot = void 0, this.configSettings = void 0, this.eventInfo = void 0, this.isLoading = void 0, this.cancellationReason = "", this.cancellationError = "", this.cancellationPolicy = ((a = (t = this.configSettings) == null ? void 0 : t.scheduler) == null ? void 0 : a.cancellation_policy) || "Your current timeslot will become available to others.";
380
- }
381
- configSettingsChangedHandler(e) {
382
- var t;
383
- this.cancellationPolicy = ((t = e == null ? void 0 : e.scheduler) == null ? void 0 : t.cancellation_policy) || "Your current timeslot will become available to others.";
384
- }
385
- connectedCallback() {
386
- d("[nylas-cancel-booking-form] Component connected");
387
- }
388
- async componentWillLoad() {
389
- d("[nylas-cancel-booking-form] Component will load");
390
- }
391
- async componentDidLoad() {
392
- d("[nylas-cancel-booking-form] Component did load"), this.cancelBookingId || console.warn('[nylas-cancel-booking-form] No booking ID provided, "cancelBookingId" prop is required.');
393
- }
394
- disconnectedCallback() {
395
- d("[nylas-cancel-booking-form] Component disconnected");
396
- }
397
- handleNylasFormInputChanged(e) {
398
- this.triggerValidation.emit({}), e.detail.name === "cancel-reason" && (this.cancellationReason = e.detail.value, this.cancellationError = e.detail.error);
399
- }
400
- render() {
401
- var e, t;
402
- return n(g, { key: "c4bdf11986a6efc5b9005e82583c3e0543c424b7", part: "ncbf" }, n("div", { key: "be45863d677fc6f4e0e7a473367d4e668988a6e3", class: "nylas-cancel-booking-form", part: "ncbf__card" }, n("div", { key: "acd1467de81bc7518ef026d18abaf2bec08ee9e7", class: "nylas-cancel-booking-form__calendar-icon", part: "ncbf__icon" }, n("calendar-cancel-icon", { key: "8622cec85da5c6767d4acd913d540ab5379d6a6b" })), n("h3", { key: "b16e109071f7b3ce4bdeff18d75b395b6397ef66", class: "nylas-cancel-booking-form__title", part: "ncbf__title" }, c.t("cancelBookingTitle")), n("div", { key: "99a98fda2cf78631fbf217425e98f50053819944", class: "nylas-cancel-booking-form__description", part: "ncbf__description" }, (t = (e = this.configSettings) == null ? void 0 : e.scheduler) != null && t.cancellation_policy ? this.cancellationPolicy : `${c.t("cancelBookingMessage")}`), n("form", { key: "4f139a76c233767562d69e6abbc8bed2fe7068a4", onSubmit: this.handleSubmitCancelBooking }, n("textarea-component", { key: "cb9cb36cbc8054f0c99049230edd6867864b85eb", id: "cancel-reason", name: "cancel-reason", required: !0, label: c.t("reasonForCancellation"), class: this.cancellationError ? "error" : "", part: "ncbf__reason-textarea", defaultValue: this.cancellationReason }), n("div", { key: "d10517e31cc74630c726db714b2ec2f732ebb595", class: "footer" }, n("button-component", { key: "4074187227af0cb6c35a530faef004edde580f34", variant: "destructive", class: "cancel", type: "submit", part: "ncbf__button-cta", disabled: this.isLoading }, c.t("cancelBookingButton")), !!this.eventInfo && n("button-component", { variant: "basic", class: "back", part: "ncbf__button-outline", onClick: this.handleGoBackClicked }, c.t("goBackButton"))))));
403
- }
404
- static get watchers() {
405
- return {
406
- configSettings: ["configSettingsChangedHandler"]
407
- };
408
- }
409
- };
410
- Be([
411
- _({
412
- name: "nylas-cancel-booking-form",
413
- stateToProps: /* @__PURE__ */ new Map([
414
- ["scheduler.configSettings", "configSettings"],
415
- ["scheduler.selectedTimeslot", "selectedTimeslot"],
416
- ["scheduler.eventInfo", "eventInfo"],
417
- ["scheduler.isLoading", "isLoading"],
418
- ["scheduler.cancelBookingId", "cancelBookingId"],
419
- ["scheduler.rejectBookingId", "rejectBookingId"]
420
- ]),
421
- eventToProps: {
422
- cancelBookingFormSubmitted: async (e, t) => {
423
- const { action: a, errorHandler: s } = e.detail;
424
- if (a === "cancel") {
425
- const o = await t.scheduler.cancelBooking(e.detail.bookingId, e.detail.reason);
426
- s && (!o || "error" in o) && s(o);
427
- } else if (a === "reject") {
428
- const o = await t.scheduler.updateBooking({
429
- bookingId: e.detail.bookingId,
430
- status: "cancelled",
431
- reason: e.detail.reason
432
- });
433
- s && (!o || "error" in o) && s(o);
434
- }
435
- },
436
- goBackButtonClicked: async (e, t) => {
437
- d("nylas-cancel-booking-form", "goBackButtonClicked", e.detail), t.scheduler.goBack();
438
- },
439
- cancelBookedEventError: async (e, t) => {
440
- d("nylas-cancel-booking-form", "cancelBookedEventError", e.detail);
441
- },
442
- cancelBookingFormError: async (e, t) => {
443
- d("nylas-cancel-booking-form", "cancelBookingFormError", e.detail);
444
- }
445
- },
446
- fireRegisterEvent: !0
447
- }),
448
- F("design:type", Function),
449
- F("design:paramtypes", []),
450
- F("design:returntype", void 0)
451
- ], ne.prototype, "render", null);
452
- ne.style = Ee;
453
- const Te = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-cancelled-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-cancelled-event-card{width:inherit}}.nylas-cancelled-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-cancelled-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-cancelled-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-cancelled-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', De = Te;
454
- var Le = function(e, t, a, s) {
455
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
456
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
457
- i = Reflect.decorate(e, t, a, s);
458
- else
459
- for (var l = e.length - 1; l >= 0; l--)
460
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
461
- return o > 3 && i && Object.defineProperty(t, a, i), i;
462
- }, P = function(e, t) {
463
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
464
- return Reflect.metadata(e, t);
465
- };
466
- const ae = class {
467
- constructor(e) {
468
- k(this, e), this.closeCancelEventCardClicked = b(this, "closeCancelEventCardClicked", 7), this.cancelledEventCardError = b(this, "cancelledEventCardError", 7), this.handleCloseClicked = () => {
469
- this.isClosing = !0;
470
- const t = (a) => {
471
- this.cancelledEventCardError.emit(a), this.isClosing = !1;
472
- };
473
- this.closeCancelEventCardClicked.emit({ errorHandler: t });
474
- }, this.configSettings = void 0, this.cancelledEventInfo = void 0, this.isClosing = !1;
475
- }
476
- connectedCallback() {
477
- d("[nylas-cancelled-event-card] Component connected");
478
- }
479
- async componentWillLoad() {
480
- d("[nylas-cancelled-event-card] Component will load");
481
- }
482
- async componentDidLoad() {
483
- d("[nylas-cancelled-event-card] Component did load"), this.cancelledEventInfo || console.warn('[nylas-cancelled-event-card] No cancelled event info provided, "cancelledEventInfo" prop is required.');
484
- }
485
- disconnectedCallback() {
486
- d("[nylas-cancelled-event-card] Component disconnected");
487
- }
488
- render() {
489
- var e, t;
490
- return n(g, { key: "e5e3ac32d965a7d9e9bc0bb8bbd774625ff07d7b", part: "ncec" }, n("div", { key: "e4ef634f512035b0e36012009a49d4e3e9845973", class: "nylas-cancelled-event-card", part: "ncec__card" }, n("div", { key: "8a739422bcf542b9b8c97c0a56032b4393755d5d", class: "nylas-cancelled-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "cd4aa557789c4487f6ce7ef70337a4af83e4d3be" })), n("h3", { key: "48aff2d9672f9d7e24b61ec5fa3b21ec63345f54", class: "nylas-cancelled-event-card__title", part: "ncec__title" }, c.t("bookingCancelledTitle"), "!"), n("div", { key: "0c861a46988ad3071850dbe61f8344b5da6cd6d6", class: "nylas-cancelled-event-card__description", part: "ncec__description" }, c.t("bookingCancelledMessage"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), n("div", { key: "d9801695af5953536439a188c7e1d8d324a2fdbd", class: "nylas-cancelled-event-card__cta" }, n("button-component", { key: "b8c463a0ef0c36a4c28b46a3ad0aaa7f5b8f2efc", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
491
- }
492
- };
493
- Le([
494
- _({
495
- name: "nylas-cancelled-event-card",
496
- stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
497
- eventToProps: {
498
- closeCancelEventCardClicked: async (e, t) => {
499
- const a = await t.scheduler.resetCancel(), { errorHandler: s } = e.detail;
500
- s && (!a || "error" in a) && s(a);
501
- },
502
- cancelledEventCardError: async (e, t) => {
503
- d("nylas-cancelled-event-card", "cancelledEventCardError", e.detail);
504
- }
505
- },
506
- fireRegisterEvent: !0
507
- }),
508
- P("design:type", Function),
509
- P("design:paramtypes", []),
510
- P("design:returntype", void 0)
511
- ], ae.prototype, "render", null);
512
- ae.style = De;
513
- const Se = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-confirmed-event-card{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);width:400px;background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:1.5rem;position:relative;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.nylas-confirmed-event-card{width:inherit}}.nylas-confirmed-event-card__title{font-size:18px;font-weight:600;line-height:24px;color:var(--nylas-base-900);text-align:center}.nylas-confirmed-event-description{font-size:16px;font-weight:500;color:var(--nylas-base-600)}.nylas-confirmed-event-card__calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}.nylas-confirmed-event-card__cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;margin-top:1rem}calendar-cancel-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{width:100%}', Ie = Se;
514
- var ze = function(e, t, a, s) {
515
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
516
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
517
- i = Reflect.decorate(e, t, a, s);
518
- else
519
- for (var l = e.length - 1; l >= 0; l--)
520
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
521
- return o > 3 && i && Object.defineProperty(t, a, i), i;
522
- }, M = function(e, t) {
523
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
524
- return Reflect.metadata(e, t);
525
- };
526
- const ie = class {
527
- constructor(e) {
528
- k(this, e), this.closeConfirmEventCardClicked = b(this, "closeConfirmEventCardClicked", 7), this.confirmedEventCardError = b(this, "confirmedEventCardError", 7), this.handleCloseClicked = () => {
529
- this.isClosing = !0;
530
- const t = (a) => {
531
- this.confirmedEventCardError.emit(a), this.isClosing = !1;
532
- };
533
- this.closeConfirmEventCardClicked.emit({ errorHandler: t });
534
- }, this.configSettings = void 0, this.confirmedEventInfo = void 0, this.isClosing = !1;
535
- }
536
- connectedCallback() {
537
- d("[nylas-confirmed-event-card] Component connected");
538
- }
539
- async componentWillLoad() {
540
- d("[nylas-confirmed-event-card] Component will load");
541
- }
542
- async componentDidLoad() {
543
- d("[nylas-confirmed-event-card] Component did load"), this.confirmedEventInfo || console.warn('[nylas-confirmed-event-card] No confirmed event info provided, "confirmedEventInfo" prop is required.');
544
- }
545
- disconnectedCallback() {
546
- d("[nylas-confirmed-event-card] Component disconnected");
547
- }
548
- render() {
549
- var e, t;
550
- return n(g, { key: "a5fbf79c6b7f27046b599c16d231226ff9c88f84", part: "ncec" }, n("div", { key: "06c6f5fa4e75d9ce01dc9145259bf4bfddf33624", class: "nylas-confirmed-event-card", part: "ncec__card" }, n("div", { key: "11a58aa7dba6da706cd35791c58442b022f97939", class: "nylas-confirmed-event-card__calendar-icon", part: "ncec__icon" }, n("calendar-cancel-icon", { key: "752da0991cdcfa12dc9c7dc1020ea9388f11c30e" })), n("h3", { key: "238934bc1f8bcb137e6e33eb66afb5bee01749b7", class: "nylas-confirmed-event-card__title", part: "ncec__title" }, c.t("confirmedEventCardTitle"), "!"), n("div", { key: "3a3d8ad8302ad54b528c37f0eb25d12590bb4f0d", class: "nylas-confirmed-event-card__description", part: "ncec__description" }, c.t("confirmedEventCardDescription"), " ", ((t = (e = this.configSettings) == null ? void 0 : e.organizer) == null ? void 0 : t.name) || "the participants", "."), n("div", { key: "49c69f2f9c01e4e775cb8caadbca213424e0a952", class: "nylas-confirmed-event-card__cta" }, n("button-component", { key: "e6e75c57f294d688a108df09ffc9daf849ef6319", variant: "basic", disabled: this.isClosing, part: "ncec__button-outline", onClick: this.handleCloseClicked }, this.isClosing ? `${c.t("closingButton")}...` : `${c.t("closeButton")}`))));
551
- }
552
- };
553
- ze([
554
- _({
555
- name: "nylas-confirmed-event-card",
556
- stateToProps: /* @__PURE__ */ new Map([["scheduler.configSettings", "configSettings"]]),
557
- eventToProps: {
558
- closeConfirmEventCardClicked: async (e, t) => {
559
- const a = await t.scheduler.resetConfirm(), { errorHandler: s } = e.detail;
560
- s && (!a || "error" in a) && s(a);
561
- }
562
- },
563
- fireRegisterEvent: !0
564
- }),
565
- M("design:type", Function),
566
- M("design:paramtypes", []),
567
- M("design:returntype", void 0)
568
- ], ie.prototype, "render", null);
569
- ie.style = Ie;
570
- const N = /* @__PURE__ */ new Date(), O = /* @__PURE__ */ new Date();
571
- function I(e, t, a, s) {
572
- function o(i) {
573
- return e(i = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+i)), i;
574
- }
575
- return o.floor = (i) => (e(i = /* @__PURE__ */ new Date(+i)), i), o.ceil = (i) => (e(i = new Date(i - 1)), t(i, 1), e(i), i), o.round = (i) => {
576
- const r = o(i), l = o.ceil(i);
577
- return i - r < l - i ? r : l;
578
- }, o.offset = (i, r) => (t(i = /* @__PURE__ */ new Date(+i), r == null ? 1 : Math.floor(r)), i), o.range = (i, r, l) => {
579
- const p = [];
580
- if (i = o.ceil(i), l = l == null ? 1 : Math.floor(l), !(i < r) || !(l > 0))
581
- return p;
582
- let m;
583
- do
584
- p.push(m = /* @__PURE__ */ new Date(+i)), t(i, l), e(i);
585
- while (m < i && i < r);
586
- return p;
587
- }, o.filter = (i) => I((r) => {
588
- if (r >= r)
589
- for (; e(r), !i(r); )
590
- r.setTime(r - 1);
591
- }, (r, l) => {
592
- if (r >= r)
593
- if (l < 0)
594
- for (; ++l <= 0; )
595
- for (; t(r, -1), !i(r); )
596
- ;
597
- else
598
- for (; --l >= 0; )
599
- for (; t(r, 1), !i(r); )
600
- ;
601
- }), a && (o.count = (i, r) => (N.setTime(+i), O.setTime(+r), e(N), e(O), Math.floor(a(N, O))), o.every = (i) => (i = Math.floor(i), !isFinite(i) || !(i > 0) ? null : i > 1 ? o.filter(s ? (r) => s(r) % i === 0 : (r) => o.count(0, r) % i === 0) : o)), o;
602
- }
603
- const Re = 1e3, oe = Re * 60, je = oe * 60, S = je * 24, $ = I(
604
- (e) => e.setHours(0, 0, 0, 0),
605
- (e, t) => e.setDate(e.getDate() + t),
606
- (e, t) => (t - e - (t.getTimezoneOffset() - e.getTimezoneOffset()) * oe) / S,
607
- (e) => e.getDate() - 1
608
- );
609
- I((e) => {
610
- e.setUTCHours(0, 0, 0, 0);
611
- }, (e, t) => {
612
- e.setUTCDate(e.getUTCDate() + t);
613
- }, (e, t) => (t - e) / S, (e) => e.getUTCDate() - 1);
614
- I((e) => {
615
- e.setUTCHours(0, 0, 0, 0);
616
- }, (e, t) => {
617
- e.setUTCDate(e.getUTCDate() + t);
618
- }, (e, t) => (t - e) / S, (e) => Math.floor(e / S));
619
- const Fe = ':host{display:block;min-height:444px;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}@media screen and (max-width: 768px){:host{min-height:auto}}.nylas-date-picker{display:flex;gap:1rem;flex-direction:column}.header{margin:0 0.5rem;height:48px}.header h2{font-size:1.3125rem;font-weight:400;line-height:1rem;color:var(--nylas-base-800)}.header h2 strong{font-weight:600}.title{margin:0 -1.25rem;display:flex;flex-direction:column;padding:0 1.5rem;gap:0.5rem;border-bottom:1px solid var(--nylas-base-200);font-family:var(--nylas-font-family)}.title h1{margin-bottom:0;font-size:18px;line-height:20px;font-weight:600;display:flex;gap:0.5rem;align-items:center}.title p{margin-top:0;font-size:16px;display:flex;gap:0.5rem;align-items:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.dates{display:grid;justify-items:center;grid-template-columns:repeat(7, 1fr);gap:0.5rem;margin-bottom:24px}.dates .date{position:relative;display:flex;flex-direction:row;justify-content:center;align-items:center;height:48px;width:48px;min-width:2rem;min-height:2rem;cursor:pointer;border-radius:var(--nylas-border-radius-2x);font-size:16px;font-weight:600;font-family:inherit;color:var(--nylas-base-text);background-color:var(--nylas-base-100);cursor:pointer;border:none}@media screen and (max-width: 412px){.dates .date{width:38px;height:38px;min-width:none}}.dates .date:hover:not(:disabled){box-shadow:0 0 0 2px var(--nylas-base-500) inset}.dates .date.date.current-month{color:var(--nylas-base-800)}.dates .date.date.selected{background-color:var(--nylas-primary);color:var(--nylas-base-0);font-weight:700}.dates .date.date.day-skeleton{color:var(--nylas-base-300)}.dates .date:disabled{color:var(--nylas-base-300);background-color:transparent;font-weight:400;cursor:not-allowed}.dates .day{font-size:12px;color:var(--nylas-base-800);font-weight:600;letter-spacing:0.5px;height:32px;display:flex;align-items:center}@media screen and (max-width: 768px){.dates .day{font-size:14px}}.dates .date.day-skeleton{height:48px;width:48px;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out;background-color:var(--nylas-base-50)}@media screen and (max-width: 412px){.dates .date.day-skeleton{width:38px;height:38px;min-width:none}}.dates .date.current-day::after{content:"";position:absolute;bottom:6px;left:50%;transform:translateX(-50%);width:6px;height:6px;border-radius:50%;background-color:var(--nylas-base-500)}.dates .date.current-day.selected::after{background-color:var(--nylas-base-100)}.pagination{display:flex;flex-direction:row;justify-content:space-between;align-items:center;min-width:92px}.pagination .chevron-right{transform:rotate(180deg)}.pagination .button{display:flex;flex-direction:row;justify-content:center;align-items:center;height:3vh;width:3vh;min-width:3em;min-height:3em;cursor:pointer;border-radius:var(--nylas-border-radius-2x);background-color:transparent;color:var(--nylas-base-800);cursor:pointer;border:none}.pagination .button:hover{background-color:var(--nylas-base-50)}.pagination .button:active{background-color:var(--nylas-base-100)}.pagination .button:disabled{background-color:transparent;color:var(--nylas-base-300);cursor:not-allowed}.flex-row{display:flex;flex-direction:row;justify-content:space-between;align-items:center;color:var(--nylas-base-500)}', Pe = Fe;
620
- var Me = function(e, t, a, s) {
621
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
622
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
623
- i = Reflect.decorate(e, t, a, s);
624
- else
625
- for (var l = e.length - 1; l >= 0; l--)
626
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
627
- return o > 3 && i && Object.defineProperty(t, a, i), i;
628
- }, H = function(e, t) {
629
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
630
- return Reflect.metadata(e, t);
631
- };
632
- const se = class {
633
- constructor(e) {
634
- k(this, e), this.dateSelected = b(this, "dateSelected", 7), this.monthChanged = b(this, "monthChanged", 7), this.selectableDates = void 0, this.configSettings = void 0, this.selectedDate = void 0, this.selectedLanguage = void 0, this.isLoading = void 0, this.eventDuration = void 0, this.month = this.selectedDate || /* @__PURE__ */ new Date(), this.dates = this.getDates(), this.disableNextMonthButton = !1;
635
- }
636
- configSettingsChanged(e) {
637
- var o;
638
- const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), a = (o = e == null ? void 0 : e.scheduler) == null ? void 0 : o.available_days_in_future;
639
- if (a === void 0)
640
- return;
641
- Y(/* @__PURE__ */ new Date(), a).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1;
642
- }
643
- selectedLanguageChanged(e) {
644
- c.changeLanguage(e);
645
- }
646
- connectedCallback() {
647
- }
648
- disconnectedCallback() {
649
- }
650
- componentWillLoad() {
651
- }
652
- getDates() {
653
- const e = be(this.month), t = me(this.month);
654
- return $.range($.offset(t, -t.getDay()), $.offset(e, 7 - e.getDay()));
655
- }
656
- selectDate(e) {
657
- this.dateSelected.emit(e);
658
- }
659
- changeMonth(e) {
660
- var o, i;
661
- this.month = new Date(this.month.getFullYear(), this.month.getMonth() + e, 1);
662
- const t = new Date(this.month.getFullYear(), this.month.getMonth() + 1, 1), a = (i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.available_days_in_future;
663
- Y(/* @__PURE__ */ new Date(), a).getTime() < t.getTime() ? this.disableNextMonthButton = !0 : this.disableNextMonthButton = !1, this.dates = this.getDates(), this.monthChanged.emit(this.month);
664
- }
665
- isSelected(e, t, a) {
666
- return e && t && E(e, t) && a && (a == null ? void 0 : a.length) > 0;
667
- }
668
- isDisabled(e, t) {
669
- return e && (t == null ? void 0 : t.find((a) => E(a, e))) === void 0;
670
- }
671
- render() {
672
- var e, t, a, s, o, i, r;
673
- return n(g, { key: "06638094c3e21b094641e5adbf08762b346fc10e", part: "ndp" }, n("div", { key: "370143e471513ab59c49dc369208365e5dcd1865", class: "nylas-date-picker" }, n("div", { key: "9b84a00eada140f2f142dec17a8418854160be87", class: "title", part: "ndp__title" }, (e = this.configSettings) != null && e.name ? n("h1", null, (t = this.configSettings) == null ? void 0 : t.name) : ((s = (a = this.configSettings) == null ? void 0 : a.organizer) == null ? void 0 : s.name) && n("h1", null, n("person-icon", null), ((i = (o = this.configSettings) == null ? void 0 : o.organizer) == null ? void 0 : i.name) || "Organizer"), n("p", { key: "a64fee4f4c6886b31620cdc62de0769e3908b634" }, n("clock-icon", { key: "e6c4d1cf6fd0b45e9824f26cb4f1a9fd828347d3" }), this.eventDuration ? he(this.eventDuration) : `- ${c.t("time.minutes")}`)), n("div", { key: "7568638d6af0fa03f84cf4b32b418c6b4f4df0de", class: "header flex-row" }, n("h2", { key: "7b656957b240be95038151d5ca2089967b3704cd", part: "ndp__month-header" }, n("strong", { key: "cea1b1a9fc986885cb1425075364bb6b97b0d0e2" }, ue(this.month.toLocaleDateString(void 0, { month: "long" }).toLocaleLowerCase())), " ", this.month.toLocaleDateString(void 0, { year: "numeric" })), n("div", { key: "daf2f52ae4ca9e381fefadf53b9bf9f7a2c47987", class: "pagination" }, n("button", { key: "e182f6af777a122aaaa323fbada73258fd8bcf90", title: "Previous month", onClick: () => this.changeMonth(-1), class: { "chevron-left": !0, button: !0 }, disabled: !((r = this.selectableDates) != null && r.length) || this.month <= /* @__PURE__ */ new Date(), part: "ndp__month-button" }, n("chevron-icon", { key: "a9703cc9a0cbfc72e800f72a56233467bff2e5f9" })), n("button", { key: "bcafc749f794352746d64974e8e564a5db1125a4", title: "Next month", onClick: () => this.changeMonth(1), class: { "chevron-right": !0, button: !0 }, disabled: this.disableNextMonthButton, part: "ndp__month-button" }, n("chevron-icon", { key: "5fc036471ed8f1caabe79e8489321070d9b6eae3" })))), n("div", { key: "701d99cc45475a8b9217893bfa56c0fa80f61520", class: "dates" }, [
674
- c.t("days.sunday"),
675
- c.t("days.monday"),
676
- c.t("days.tuesday"),
677
- c.t("days.wednesday"),
678
- c.t("days.thursday"),
679
- c.t("days.friday"),
680
- c.t("days.saturday")
681
- ].map((l) => n("div", { class: "day", part: "ndp__day" }, l)), this.dates.map((l, p) => {
682
- var f;
683
- const m = this.isDisabled(l, this.selectableDates);
684
- return this.isLoading ? n("button", { disabled: !0, class: {
685
- "date day-skeleton": !0,
686
- "current-month": z(l, this.month)
687
- }, style: { animationDelay: `${p * 20}ms` }, part: "ndp__date ndp__date--disabled" }, l.getDate()) : n("button", { class: {
688
- date: !0,
689
- selected: !!(this.selectedDate && E(l, this.selectedDate) && this.selectableDates && ((f = this.selectableDates) == null ? void 0 : f.length) > 0),
690
- "current-day": E(l, /* @__PURE__ */ new Date()),
691
- "current-month": z(l, this.month)
692
- }, "aria-lang": l.toLocaleDateString(void 0, { dateStyle: "full" }), disabled: m, onClick: () => this.selectDate(l), part: `ndp__date ${this.isSelected(l, this.selectedDate, this.selectableDates) ? "ndp__date--selected" : ""} ${E(l, /* @__PURE__ */ new Date()) ? "ndp__date--current-day" : ""} ${z(l, this.month) ? "ndp__date--current-month" : ""}` }, l.getDate());
693
- }))));
694
- }
695
- static get watchers() {
696
- return {
697
- configSettings: ["configSettingsChanged"],
698
- selectedLanguage: ["selectedLanguageChanged"]
699
- };
700
- }
701
- };
702
- Me([
703
- _({
704
- name: "nylas-date-picker",
705
- stateToProps: /* @__PURE__ */ new Map([
706
- ["scheduler.selectableDates", "selectableDates"],
707
- ["scheduler.selectedDate", "selectedDate"],
708
- ["scheduler.isLoading", "isLoading"],
709
- ["scheduler.configSettings", "configSettings"],
710
- ["scheduler.eventDuration", "eventDuration"],
711
- ["scheduler.selectedLanguage", "selectedLanguage"]
712
- ]),
713
- eventToProps: {
714
- dateSelected: async (e, t) => {
715
- d("nylas-date-picker", "dateSelected", e.detail), t.scheduler.selectDate(e.detail);
716
- },
717
- monthChanged: async (e, t) => {
718
- d("nylas-date-picker", "monthChanged", e.detail);
719
- }
720
- },
721
- fireRegisterEvent: !0
722
- }),
723
- H("design:type", Function),
724
- H("design:paramtypes", []),
725
- H("design:returntype", void 0)
726
- ], se.prototype, "render", null);
727
- se.style = Pe;
728
- const Ne = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.nylas-locale-switch{display:flex;flex-direction:row;justify-content:space-between;align-items:center;border-left:none;border-right:none;color:var(--nylas-base-50);font-size:14px;font-weight:600;cursor:pointer;transition:all 0.2s ease-in-out;font-family:inherit}@media screen and (max-width: 768px){.nylas-locale-switch{font-size:16px}}.select-wrapper{display:flex;align-items:center;gap:0.5rem}select{border:none;background:transparent;cursor:pointer;outline:none;background-color:transparent;margin:0 0 1px;padding:4px;vertical-align:middle}select#timezone{width:140px}select#language{width:80px}span.timezone-label{display:flex;width:-webkit-fill-available;justify-content:space-between}select-dropdown{width:auto}select-dropdown::part(sd_dropdown-button){border:none;padding:10px}select-dropdown::part(sd_dropdown-content){max-width:306px}', Oe = Ne;
729
- var $e = function(e, t, a, s) {
730
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
731
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
732
- i = Reflect.decorate(e, t, a, s);
733
- else
734
- for (var l = e.length - 1; l >= 0; l--)
735
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
736
- return o > 3 && i && Object.defineProperty(t, a, i), i;
737
- }, A = function(e, t) {
738
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
739
- return Reflect.metadata(e, t);
740
- };
741
- const re = class {
742
- constructor(e) {
743
- k(this, e), this.timezoneChanged = b(this, "timezoneChanged", 7), this.languageChanged = b(this, "languageChanged", 7), this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = navigator.language;
744
- }
745
- connectedCallback() {
746
- }
747
- disconnectedCallback() {
748
- }
749
- componentWillLoad() {
750
- }
751
- changeTimezone(e) {
752
- this.selectedTimezone = e, this.timezoneChanged.emit(e);
753
- }
754
- changeLanguage(e) {
755
- this.selectedLanguage = e, this.languageChanged.emit(e);
756
- }
757
- nylasFormDropdownChangedHandler(e) {
758
- const { name: t, value: a } = e.detail;
759
- t === "timezone" ? this.changeTimezone(a) : t === "language" && this.changeLanguage(a);
760
- }
761
- getTimezoneLabelHTML(e) {
762
- const t = pe(e);
763
- return n("span", { class: "timezone-label", style: {
764
- display: "flex",
765
- alignItems: "center",
766
- justifyContent: "space-between",
767
- width: "-webkit-fill-available"
768
- } }, D[e], " ", n("span", { class: "timezone-offset", style: {
769
- fontSize: "14px",
770
- fontWeight: "400",
771
- color: "var(--nylas-base-500)"
772
- } }, t));
773
- }
774
- render() {
775
- const e = Object.keys(D).map((a) => ({
776
- labelHTML: this.getTimezoneLabelHTML(a),
777
- label: D[a],
778
- value: a
779
- })), t = Object.keys(J).map((a) => ({
780
- label: J[a],
781
- value: a
782
- }));
783
- return n(g, { key: "8e8ec3819083fb25cb8620f14aa1f140a995ec89" }, n("div", { key: "45aaebcd9f80d54dc01b5d611094fa05225c8331", class: "nylas-locale-switch", part: "nls" }, n("div", { key: "47d8166b91a3ef742b14e5783338c3701be85eb7", class: {
784
- "select-wrapper": !0,
785
- timezone: !0
786
- }, part: "nls__timezone" }, n("select-dropdown", { key: "71edd2352b6067a18b9ba676495e59c954e6c07d", name: "timezone", options: e, defaultSelectedOption: e.find((a) => a.value == this.selectedTimezone), exportparts: "sd_dropdown: nls__timezone-dropdown, sd_dropdown-button: nls__timezone-drop-button, sd_dropdown-button-selected-label: nls__timezone-drop-button-selected-label, sd_dropdown-content: nls__timezone-drop-content, sd_dropdown_label: nls__timezone-drop-label" }, n("span", { key: "f48e3c11a1981e32b75f5425570db0b584db7f51", slot: "select-icon" }, n("globe-icon", { key: "6b6721c8d88d715dbcb52d2e2750c22015ac252c", width: "20", height: "20" })))), n("div", { key: "fe652536d637774336cad11a65bba7bfd8636972", class: {
787
- "select-wrapper": !0,
788
- language: !0
789
- }, part: "nls__language" }, n("select-dropdown", { key: "f83f8dbf84878fb1670d4a6f59b045c111420ce1", name: "language", options: t, defaultSelectedOption: t.find((a) => a.value == this.selectedLanguage), exportparts: "sd_dropdown: nls__language-dropdown, sd_dropdown-button: nls__language-drop-button, sd_dropdown-content: nls__language-drop-content, sd_dropdown_label: nls__language-drop-label" }, n("span", { key: "3d66833265053e81c9333b5d36ae822ed3a17878", slot: "select-icon" }, n("translate-icon", { key: "30121c5733873930e7e1e3bdaedf11bd2f258139", width: "20", height: "20" }))))));
790
- }
791
- };
792
- $e([
793
- _({
794
- name: "nylas-locale-switch",
795
- stateToProps: /* @__PURE__ */ new Map([
796
- ["scheduler.selectedLanguage", "selectedLanguage"],
797
- ["scheduler.selectedTimezone", "selectedTimezone"]
798
- ]),
799
- eventToProps: {
800
- timezoneChanged: async (e, t) => {
801
- d("nylas-locale-switch", "timezoneChanged", e.detail), t.scheduler.selectTimezone(e.detail);
802
- },
803
- languageChanged: async (e, t) => {
804
- d("nylas-locale-switch", "languageChanged", e.detail), t.scheduler.selectLanguage(e.detail);
805
- }
806
- },
807
- fireRegisterEvent: !0
808
- }),
809
- A("design:type", Function),
810
- A("design:paramtypes", []),
811
- A("design:returntype", void 0)
812
- ], re.prototype, "render", null);
813
- re.style = Oe;
814
- const He = ".sc-nylas-logo-h{display:flex}", Ae = He, qe = class {
815
- constructor(e) {
816
- k(this, e), this.width = "69", this.height = "24";
817
- }
818
- render() {
819
- return n("svg", { key: "12dffc0c444183dfd3bb8593076a6b022de4654b", width: this.width, height: this.height, viewBox: "0 0 69 20", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, n("g", { key: "89545db6a2731faffdf62b9f0826211c9827af35", "clip-path": "url(#clip0_455_3543)" }, n("path", { key: "bc169c74819239b2c40b3730a445f45d1a16f445", d: "M15.8092 3.03248C14.6497 1.86996 13.1076 1.23047 11.4646 1.23047C9.82156 1.23047 8.27753 1.86996 7.11999 3.03248L0.835347 9.33381C0.686846 9.4827 0.60498 9.68123 0.60498 9.89312C0.60498 10.105 0.686846 10.3035 0.835347 10.4524C0.983848 10.6013 1.18185 10.6834 1.39318 10.6834C1.60451 10.6834 1.80251 10.6013 1.95101 10.4524L8.23374 4.15111C10.0139 2.36627 12.9134 2.36627 14.6935 4.15111C16.4736 5.93785 16.4756 8.84322 14.6935 10.6281L8.4108 16.9275C8.10428 17.2348 8.10428 17.7368 8.4108 18.0461C8.5593 18.195 8.75731 18.2771 8.96863 18.2771C9.17996 18.2771 9.37796 18.195 9.52646 18.0461L15.8092 11.7467C16.9687 10.5841 17.6064 9.03793 17.6064 7.39053C17.6064 5.74314 16.9687 4.19501 15.8092 3.03439V3.03248Z", fill: "currentColor" }), n("path", { key: "456cd298652217764f8486bca01860c4f1132e58", d: "M14.9296 7.39038C14.9296 6.46074 14.5698 5.58837 13.9148 4.93361C12.5631 3.57828 10.3641 3.57828 9.01239 4.93361L0.663961 13.3023C0.51546 13.4512 0.433594 13.6497 0.433594 13.8616C0.433594 14.0735 0.51546 14.272 0.663961 14.4209C0.812462 14.5698 1.01046 14.6519 1.22179 14.6519C1.43312 14.6519 1.63112 14.5698 1.77962 14.4209L10.0367 6.1515L10.05 6.13623C10.0747 6.10759 10.1014 6.07705 10.128 6.05033C10.1585 6.01978 10.1928 5.99115 10.2251 5.96252L10.2442 5.94534C10.9886 5.31349 12.1119 5.3593 12.8011 6.05033C13.4903 6.74135 13.536 7.78171 12.9705 8.53192L12.9648 8.53955C12.9058 8.61591 12.8544 8.67699 12.8011 8.73044C12.7497 8.78198 12.6906 8.83352 12.6069 8.90033L4.45264 17.0991C4.30414 17.248 4.22227 17.4465 4.22227 17.6584C4.22227 17.8703 4.30414 18.0689 4.45264 18.2177C4.60114 18.3666 4.79914 18.4487 5.01047 18.4487C5.2218 18.4487 5.4198 18.3666 5.5683 18.2177L13.9167 9.84716C14.5698 9.1924 14.9315 8.31812 14.9315 7.39038H14.9296Z", fill: "currentColor" }), n("path", { key: "99e86fdeed7fd4e6440e749884432df26dfe1d37", d: "M10.6821 9.11238C10.4727 9.01694 10.2861 8.88904 10.1281 8.7306C9.97008 8.57216 9.84252 8.38508 9.74733 8.1751L9.69021 8.05103L0.467916 17.2978C0.287049 17.4792 0.174721 17.7082 0.149971 17.9411C0.125221 18.1778 0.19376 18.3897 0.344165 18.5405C0.471724 18.6684 0.65259 18.739 0.850592 18.739C1.11142 18.739 1.37796 18.6207 1.58358 18.4145L10.8059 9.16774L10.6821 9.11047V9.11238Z", fill: "currentColor" }), n("path", { key: "68231e9e8a5f86804d3590ca240bcaf362df1fa6", d: "M68.401 10.6185C68.2126 10.2692 67.9593 9.97334 67.6433 9.73854C67.3235 9.49993 66.956 9.31094 66.5486 9.17541C66.1316 9.03606 65.7033 8.91771 65.2749 8.81844C64.7951 8.70582 64.3039 8.57983 63.8165 8.44811C63.3196 8.31258 62.9065 8.14269 62.5905 7.94225C62.4743 7.88689 62.3391 7.76663 62.3391 7.50129C62.3391 7.39821 62.3639 7.29704 62.4153 7.19587L62.4248 7.18059C62.5352 7.02216 62.7142 6.8828 62.975 6.75109C63.234 6.62128 63.609 6.55829 64.1231 6.55829C64.5286 6.55829 64.877 6.61365 65.1569 6.72436C65.4348 6.83508 65.6652 6.96871 65.8442 7.12524C66.0212 7.27986 66.1659 7.45357 66.2782 7.63873C66.3563 7.76854 66.4267 7.89262 66.4858 8.00525L68.2754 6.84081C68.1669 6.59456 68.0146 6.33495 67.8204 6.0677C67.6033 5.768 67.3254 5.4893 66.9922 5.23732C66.659 4.98534 66.2516 4.77345 65.7813 4.60929C65.3111 4.44512 64.7532 4.36304 64.1231 4.36304C63.3844 4.36304 62.7599 4.46421 62.2706 4.66083C61.7813 4.85935 61.3815 5.09988 61.0845 5.37667C60.7875 5.65346 60.5628 5.95125 60.4143 6.2605C60.2639 6.57547 60.1611 6.85799 60.1078 7.10233C60.0945 7.18059 60.0812 7.27031 60.0678 7.36767C60.0545 7.4593 60.0469 7.5452 60.0469 7.62537C60.0469 8.13314 60.1745 8.56074 60.4239 8.89671C60.679 9.24222 61.0045 9.53429 61.391 9.76336C61.7813 9.99624 62.2116 10.1852 62.6704 10.3227C63.1388 10.462 63.5862 10.5823 64.0012 10.6796C64.4067 10.777 64.7932 10.8782 65.1531 10.9774C65.5224 11.0786 65.8289 11.2122 66.0631 11.3745C66.2801 11.5425 66.3887 11.7448 66.3887 11.9777C66.3887 12.2278 66.2916 12.4263 66.0993 12.5695C65.9279 12.6954 65.7261 12.7985 65.4958 12.8711C65.273 12.9436 65.0407 12.9913 64.8066 13.0142C64.58 13.0352 64.3915 13.0467 64.2468 13.0467C63.8032 13.0467 63.4224 13.0028 63.1197 12.915C62.8151 12.8272 62.5638 12.7241 62.3734 12.6057C62.1811 12.4874 62.0288 12.3614 61.9222 12.2316C61.8213 12.1094 61.747 12.0082 61.7014 11.9319L61.4957 11.6303L59.708 12.7928C59.8508 13.0161 60.0298 13.2643 60.2392 13.5296C60.4772 13.8293 60.7837 14.1138 61.153 14.3734C61.5224 14.633 61.966 14.8525 62.4724 15.0243C62.9788 15.1961 63.5748 15.282 64.2468 15.282C64.797 15.282 65.2901 15.2324 65.7166 15.137C66.1412 15.0396 66.5162 14.9117 66.8285 14.7552C67.1388 14.6005 67.4015 14.4192 67.6109 14.2149C67.8223 14.0107 67.9974 13.8026 68.1326 13.6003C68.4563 13.1135 68.6409 12.5504 68.6828 11.9262C68.6828 11.4069 68.5876 10.9641 68.401 10.6166V10.6185Z", fill: "currentColor" }), n("path", { key: "80b2550211f60e218c5f52f975a060e3ac4ea84a", d: "M26.3585 4.27905C23.7901 4.27905 21.6997 6.37504 21.6997 8.95017V15.0701H23.9291V8.95017C23.9291 7.6082 25.0181 6.5163 26.3565 6.5163C27.695 6.5163 28.784 7.6082 28.784 8.95017V15.0701H31.0134V8.95017C31.0134 6.37504 28.9229 4.27905 26.3546 4.27905H26.3585Z", fill: "currentColor" }), n("path", { key: "b5db41daab85f0ffd7738f492ede6189237b7d5f", d: "M53.4522 4.27905C50.4251 4.27905 47.9634 6.74728 47.9634 9.78245C47.9634 12.8176 50.427 15.2859 53.4522 15.2859C54.5545 15.2859 55.6188 14.9594 56.5288 14.3409L56.7116 14.2169V15.0682H58.941V9.78245C58.941 6.74728 56.4793 4.27905 53.4522 4.27905ZM53.4522 13.0505C51.655 13.0505 50.1928 11.5845 50.1928 9.78245C50.1928 7.98044 51.655 6.51439 53.4522 6.51439C55.2494 6.51439 56.7116 7.98044 56.7116 9.78245C56.7116 11.5845 55.2494 13.0505 53.4522 13.0505Z", fill: "currentColor" }), n("path", { key: "9fc6c3fe5eb5f86e4e53126c98958f36a128030f", d: "M45.5795 10.6166V0.356201H43.3501V10.6166C43.3501 13.1517 45.3758 15.2228 47.8908 15.2858V13.0486C46.6057 12.9875 45.5795 11.9204 45.5795 10.6166Z", fill: "currentColor" }), n("path", { key: "dcbcc1f9ad3d20c137644553a90ec0afc7f6bdf9", d: "M39.5428 4.4967V10.63C39.5428 11.6761 38.8669 12.621 37.9016 12.9284C37.1249 13.1746 36.3157 13.0486 35.6817 12.5829C35.0592 12.1247 34.6879 11.3917 34.6879 10.6186V4.4967H32.4585V10.5995C32.4585 12.7165 33.8388 14.57 35.8131 15.1084C37.0354 15.4424 38.2995 15.2973 39.3695 14.7037L39.5428 14.6063V14.9747C39.5428 16.2766 38.5166 17.3437 37.2315 17.4067V19.6439C39.7465 19.5809 41.7722 17.5117 41.7722 14.9747V4.4967H39.5428Z", fill: "currentColor" })), n("defs", { key: "569df0349b4a24ea2d0a0bee9788b0b8911dcf39" }, n("clipPath", { key: "7a24bd2f656eba24c53b46b1b65b6ae5ea11c378", id: "clip0_455_3543" }, n("rect", { key: "60a57936d17acf21b9c58a177f17f3ce3fede7f1", width: "68.7123", height: "19.2877", fill: "white", transform: "translate(0.144043 0.356201)" }))));
820
- }
821
- };
822
- qe.style = Ae;
823
- const Ve = ':host{display:block;margin-bottom:-12px;width:100%;z-index:1;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.notif{display:flex;padding:17px;align-items:flex-start;justify-content:space-between;gap:16px;border-radius:var(--nylas-border-radius-2x);border:1.5px solid var(--nylas-error);background:var(--nylas-base-0)}@media screen and (max-width: 768px){.notif{width:auto}}.notif .content{display:flex;flex-direction:row;gap:8px}.notif .content .message{font-size:14px;font-weight:400;color:var(--nylas-base-800)}.notif .content .message .title{font-size:16px;font-weight:600;color:var(--nylas-base-950);display:block}.notif .content .message .description{font-size:14px;font-weight:400;color:var(--nylas-base-800);display:block}.notif .content .icon.error{color:var(--nylas-error)}.notif.error{border-color:var(--nylas-error);background:rgb(255, 248, 248)}.notif.warning{border-color:var(--nylas-warning)}.notif.info{border-color:var(--nylas-info)}.notif.success{border-color:var(--nylas-success)}.notif .dismiss-btn{background:none;border:none;color:var(--nylas-base-950);cursor:pointer}', Ze = Ve, Ge = class {
824
- constructor(e) {
825
- k(this, e), this.ttl = 5e3, this.allowedCategories = ["component", "api", "validation", "invalid_session"], this.notifications = [];
826
- }
827
- onError(e) {
828
- d(`[nylas-notification] Error: ${e.detail.notification.title}`), this.handleNotification(e);
829
- }
830
- onWarning(e) {
831
- d(`[nylas-notification] Warning: ${e.detail.notification.title}`), this.handleNotification(e);
832
- }
833
- onInfo(e) {
834
- d(`[nylas-notification] Info: ${e.detail.notification.title}`), this.handleNotification(e);
835
- }
836
- onSuccess(e) {
837
- d(`[nylas-notification] Success: ${e.detail.notification.title}`), this.handleNotification(e);
838
- }
839
- isChildOf(e) {
840
- let t = this.host.parentNode;
841
- for (; t; ) {
842
- if (t === e)
843
- return !0;
844
- t instanceof ShadowRoot ? t = t.host : t = t.parentNode;
845
- }
846
- return !1;
847
- }
848
- handleNotification(e) {
849
- const t = e.detail.host;
850
- if (e.defaultPrevented) {
851
- d("[nylas-notification] Event default prevented");
852
- return;
853
- }
854
- if (t && !this.isChildOf(t)) {
855
- d("[nylas-notification] Host not a parent");
856
- return;
857
- }
858
- if (this.ttl === 0) {
859
- d("[nylas-notification] TTL is 0");
860
- return;
861
- }
862
- if (this.allowedCategories.length > 0 && !this.allowedCategories.includes(e.detail.notification.category)) {
863
- d("[nylas-notification] Category not allowed");
864
- return;
865
- }
866
- if (this.notifications = [...this.notifications, { ...e.detail.notification }], e.detail.notification.ttl !== "none") {
867
- const a = e.detail.notification.ttl ? e.detail.notification.ttl : this.ttl;
868
- window.setTimeout(() => {
869
- this.notifications = this.notifications.filter((s) => s.id !== e.detail.notification.id);
870
- }, a);
871
- }
872
- }
873
- dismissNotification(e) {
874
- this.notifications = this.notifications.filter((t) => t.id !== e);
875
- }
876
- render() {
877
- return n(g, { key: "03f95b47c77afb69a2696473c2bf8c3f1e1ed44a" }, n(ge, { key: "990afe9475e36dbae84a70266ef0b5188d2011de" }, this.notifications.map((e) => n("div", { class: `notif ${e.type}`, key: e.id }, n("div", { class: "content" }, n("span", { class: `icon ${e.type}` }, (e.type === "error" || e.type === "warning") && n("warning-icon", null)), n("span", { class: "message" }, n("span", { class: "title" }, e.title), e.description && n("span", { class: "description" }, e.description))), n("button", { class: "dismiss-btn", onClick: () => this.dismissNotification(e.id) }, n("close-icon", null)))), n("slot", { key: "49a5c13a306626b5bba79c443bb8501fe50c7ea3" })));
878
- }
879
- get host() {
880
- return G(this);
881
- }
882
- };
883
- Ge.style = Ze;
884
- const We = ':host{display:block;--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.event-card-wrapper{height:inherit;display:flex;flex-direction:column;justify-content:space-between;align-items:center;font-family:var(--nylas-font-family);background-color:var(--nylas-base-0);color:var(--nylas-base-900);border-radius:var(--nylas-border-radius-3x);position:relative;margin-top:1rem;width:424px;box-shadow:0px 1px 4px rgba(0, 0, 0, 0.1), 0px 3px 6px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card-wrapper{width:100%;border-radius:0px}}.calendar-icon{display:flex;align-items:center;justify-content:center;width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200);color:var(--nylas-base-700)}.booked-event-header{margin:1.5rem 4rem;overflow-wrap:anywhere;display:flex;align-items:center;flex-direction:column;font-size:1rem;font-weight:400}.booked-event-header h2{color:var(--nylas-base-600);margin-top:1.5rem;margin-bottom:0.25rem;font-size:1.125rem;font-weight:600}.manage-booking-description{border-top:1px solid var(--nylas-base-200)}.manage-booking-description p{font-size:16px;margin:1rem;padding:0.5rem 1rem;font-weight:400;color:var(--nylas-base-800)}.footer{padding:0.5rem;display:grid;grid-template-columns:1fr 1fr;gap:0.5rem;box-sizing:border-box;background-color:var(--nylas-base-25);width:100%;border-radius:0 0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x)}.footer.no-template-cols{grid-template-columns:1fr}.footer.no-footer{display:none}sp-divider{background-color:var(--nylas-base-200);height:1px}calendar-check-icon{display:flex;align-items:center;justify-content:center;height:100%}button-component{--dot-color:var(--nylas-base-700)}', Ue = We;
885
- var Xe = function(e, t, a, s) {
886
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
887
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
888
- i = Reflect.decorate(e, t, a, s);
889
- else
890
- for (var l = e.length - 1; l >= 0; l--)
891
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
892
- return o > 3 && i && Object.defineProperty(t, a, i), i;
893
- }, q = function(e, t) {
894
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
895
- return Reflect.metadata(e, t);
896
- };
897
- const le = class {
898
- constructor(e) {
899
- k(this, e), this.rejectBookingButtonClicked = b(this, "rejectBookingButtonClicked", 7), this.confirmBookingButtonClicked = b(this, "confirmBookingButtonClicked", 7), this.confirmBookingError = b(this, "confirmBookingError", 7), this.handleConfirmBookingButtonClicked = () => {
900
- this.action = "confirm";
901
- const t = (a) => {
902
- this.confirmBookingError.emit(a);
903
- };
904
- this.organizerConfirmationBookingId && !this.isLoading && this.confirmBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host, errorHandler: t });
905
- }, this.handleRejectBookingButtonClicked = () => {
906
- this.action = "reject", this.organizerConfirmationBookingId && !this.isLoading && this.rejectBookingButtonClicked.emit({ bookingId: this.organizerConfirmationBookingId, host: this.host });
907
- }, this.configSettings = void 0, this.isLoading = void 0, this.organizerConfirmationBookingId = void 0, this.selectedLanguage = navigator.language, this.action = null;
908
- }
909
- connectedCallback() {
910
- }
911
- disconnectedCallback() {
912
- }
913
- async componentWillLoad() {
914
- d("[nylas-organizer-confirmation-card] Component will load");
915
- }
916
- async componentDidLoad() {
917
- d("[nylas-organizer-confirmation-card] Component did load");
918
- }
919
- async resetAction() {
920
- this.action = null;
921
- }
922
- render() {
923
- var e, t, a, s, o, i, r, l, p, m, f, u;
924
- return n(g, { key: "c722e5ad0c458060b988e0a49fde079d8258125e", part: "nmcc" }, n("div", { key: "758b60b6834f7150a30434538707f321754f9f8b", class: "event-card-wrapper", part: "nmccc__card" }, n("div", { key: "675e8ab2297fefe3840eb06b536706e216cd525a", class: "calendar-icon" }, n("calendar-check-icon", { key: "56768b41e1abebb836619f1da25fdba7b0b32203" })), n("div", { key: "a026a0daa62a4bf5054682a93c19f296b4761d31", class: "booked-event-header" }, n("h2", { key: "38ba7f91abcde16f459f50a3638245e2c994f4f5", slot: "card-title", part: "nmcc__title" }, !!this.organizerConfirmationBookingId && `${c.t("bookingPendingTitle")}!`)), n("div", { key: "4ca2d5bd6cf71f624bb2eed64c0f8c44089adc0a", class: "manage-booking-description" }, n("p", { key: "6584d4ac6e59c6b4156f886a6903d05dcef37c3a" }, c.t("bookingPendingnDescription"))), n("div", { key: "805a279cbff4f92eb91f150146a6d5688945ffe6", class: {
925
- footer: !0,
926
- "no-footer": ((t = (e = this.configSettings) == null ? void 0 : e.scheduler) == null ? void 0 : t.hide_cancellation_options) && ((s = (a = this.configSettings) == null ? void 0 : a.scheduler) == null ? void 0 : s.hide_rescheduling_options),
927
- "no-template-cols": ((i = (o = this.configSettings) == null ? void 0 : o.scheduler) == null ? void 0 : i.hide_cancellation_options) || ((l = (r = this.configSettings) == null ? void 0 : r.scheduler) == null ? void 0 : l.hide_rescheduling_options)
928
- } }, !((m = (p = this.configSettings) == null ? void 0 : p.scheduler) != null && m.hide_cancellation_options) && n("button-component", { variant: "destructive", onClick: this.handleRejectBookingButtonClicked, isLoading: this.isLoading && this.action === "reject", part: "nmcc__button-outline nmcc__cancel-cta" }, `${c.t("rejectBookingButton")}`), !((u = (f = this.configSettings) == null ? void 0 : f.scheduler) != null && u.hide_rescheduling_options) && n("button-component", { variant: "basic", onClick: this.handleConfirmBookingButtonClicked, isLoading: this.isLoading && this.action === "confirm", part: "nmcc__button-outline nmcc__reschedule-cta" }, `${c.t("confirmBookingButton")}`))));
929
- }
930
- get host() {
931
- return G(this);
932
- }
933
- };
934
- Xe([
935
- _({
936
- name: "nylas-organizer-confirmation-card",
937
- stateToProps: /* @__PURE__ */ new Map([
938
- ["scheduler.organizerConfirmationBookingId", "organizerConfirmationBookingId"],
939
- ["scheduler.configSettings", "configSettings"],
940
- ["scheduler.isLoading", "isLoading"],
941
- ["scheduler.selectedLanguage", "selectedLanguage"]
942
- ]),
943
- eventToProps: {
944
- rejectBookingButtonClicked: async (e, t) => {
945
- t.scheduler.setReject(e.detail.bookingId);
946
- },
947
- confirmBookingButtonClicked: async (e, t) => {
948
- const { host: a } = e.detail, s = await t.scheduler.updateBooking({
949
- bookingId: e.detail.bookingId,
950
- status: "confirmed"
951
- }), { errorHandler: o } = e.detail;
952
- o && (!s || "error" in s) && o(s), await a.resetAction();
953
- }
954
- },
955
- fireRegisterEvent: !0
956
- }),
957
- q("design:type", Function),
958
- q("design:paramtypes", []),
959
- q("design:returntype", void 0)
960
- ], le.prototype, "render", null);
961
- le.style = Ue;
962
- const Ye = ':host{--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif;display:block;position:relative;height:inherit;display:flex;flex-direction:column;justify-content:center;align-items:center;font-family:var(--nylas-font-family)}.event-card{display:flex;align-items:center;flex-direction:column;width:calc(100% - 3rem);background-color:var(--nylas-base-0);color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);padding:3rem 1.5rem 1.5rem 1.5rem;position:relative;box-shadow:0px 1px 3px 0px rgba(0, 0, 0, 0.1), 0px 1px 2px 0px rgba(0, 0, 0, 0.06)}@media screen and (max-width: 768px){.event-card{margin-bottom:2rem}}.nylas-selected-event-card__date{font-size:min(max(16px, 3vw), 18px);font-weight:600}.nylas-selected-event-card__time{font-size:16px;font-weight:500}.calendar-icon{width:3rem;height:3rem;border-radius:50%;position:absolute;top:-1.25rem;left:50%;transform:translateX(-50%);background-color:var(--nylas-base-0);border:1px solid var(--nylas-base-200)}calendar-icon{display:flex;align-items:center;justify-content:center;height:100%}.event-timezone{display:flex;color:var(--nylas-base-600);margin-bottom:8px;gap:4px;align-items:center}@media screen and (max-width: 768px){.event-timezone{margin-bottom:16px}}', Je = Ye;
963
- var Ke = function(e, t, a, s) {
964
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
965
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
966
- i = Reflect.decorate(e, t, a, s);
967
- else
968
- for (var l = e.length - 1; l >= 0; l--)
969
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
970
- return o > 3 && i && Object.defineProperty(t, a, i), i;
971
- }, V = function(e, t) {
972
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
973
- return Reflect.metadata(e, t);
974
- };
975
- const ce = class {
976
- constructor(e) {
977
- k(this, e), this.selectedDate = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedLanguage = void 0, this.startTime = "", this.endTime = "";
978
- }
979
- connectedCallback() {
980
- }
981
- disconnectedCallback() {
982
- }
983
- async componentWillLoad() {
984
- d("[nylas-selected-event-card] Component will load");
985
- }
986
- async componentDidLoad() {
987
- var t, a;
988
- d("[nylas-selected-event-card] Component did load"), this.selectedDate || console.warn('[nylas-selected-event-card] "selectedDate" prop is not provided.'), this.selectedTimeslot || console.warn('[nylas-selected-event-card] "selectedTimeslot" prop is not provided.');
989
- const e = new Intl.DateTimeFormat("en-US", {
990
- hour: "2-digit",
991
- minute: "2-digit",
992
- timeZone: this.selectedTimezone
993
- });
994
- this.startTime = e.format(new Date((t = this.selectedTimeslot) == null ? void 0 : t.start_time)), this.endTime = e.format(new Date((a = this.selectedTimeslot) == null ? void 0 : a.end_time));
995
- }
996
- render() {
997
- var e;
998
- return n(g, { key: "988d5270aa9dbd656c11d70ae0f3058dd25b4eb8", part: "nsec" }, n("div", { key: "21681211baf07faa5b09cec29611859a8dbdd37b", class: "event-card", part: "nsec__card" }, n("div", { key: "9b478bc27a5469a7c67786e3b1958e20e2f59d9e", class: "calendar-icon", part: "nsec__icon" }, n("calendar-icon", { key: "9a9f4cd2551747874876d8a32943a8cd98032d1e" })), n("div", { key: "f9dcde6ca9cffbfeb2f5dcd4e3586433bf2fd055", class: "nylas-selected-event-card__date", part: "nsec__date" }, this.selectedDate ? K((e = this.selectedDate) == null ? void 0 : e.toLocaleDateString(Q[this.selectedLanguage || navigator.language], { dateStyle: "full", timeZone: this.selectedTimezone })) : "-"), n("div", { key: "a6151b6f505de22f748fcd959c5aa04721a4dd52", class: "nylas-selected-event-card__time", part: "nsec__time" }, this.startTime, " - ", this.endTime)), n("div", { key: "9190417c554a5e960841a8e132f3995574da14be", class: "event-timezone", part: "nsec__timezone" }, n("globe-icon", { key: "16f199ce28c18cc975bd8ade52f6b4fccfbe4455" }), D[this.selectedTimezone]));
999
- }
1000
- };
1001
- Ke([
1002
- _({
1003
- name: "nylas-selected-event-card",
1004
- stateToProps: /* @__PURE__ */ new Map([
1005
- ["scheduler.selectedDate", "selectedDate"],
1006
- ["scheduler.selectedTimeslot", "selectedTimeslot"],
1007
- ["scheduler.selectedTimezone", "selectedTimezone"],
1008
- ["scheduler.selectedLanguage", "selectedLanguage"]
1009
- ]),
1010
- eventToProps: {},
1011
- fireRegisterEvent: !0
1012
- }),
1013
- V("design:type", Function),
1014
- V("design:paramtypes", []),
1015
- V("design:returntype", void 0)
1016
- ], ce.prototype, "render", null);
1017
- ce.style = Je;
1018
- const Qe = ':host{display:block;height:calc(100% - 48px);--nylas-primary:#2563eb;--nylas-error:#cc4841;--nylas-error-pressed:#992222;--nylas-wraning:#f06c00;--nylas-success:#16a392;--nylas-info:#2b8fc2;--nylas-base-0:#ffffff;--nylas-base-25:#fcfcfd;--nylas-base-50:#f8f9fc;--nylas-base-100:#eaecf5;--nylas-base-200:#d5d9eb;--nylas-base-300:#b3b8d8;--nylas-base-400:#717bbc;--nylas-base-500:#4e5ba6;--nylas-base-600:#3e4784;--nylas-base-700:#263f72;--nylas-base-800:#293056;--nylas-base-900:#101323;--nylas-base-950:#0e101b;--nylas-border-radius:0.25rem;--nylas-border-radius-2x:0.5rem;--nylas-border-radius-3x:0.75rem;--nylas-font-family:"Inter", sans-serif}.time-picker-wrapper{display:flex;flex-direction:column;height:100%}.timeslots{position:relative;display:flex;flex-direction:column;gap:0.75rem;align-items:center;overflow-y:scroll;padding:0.5rem 1.5rem 1.5rem;flex:1}.time{box-sizing:border-box;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:4px 12px;gap:0.5rem;font-size:16px;font-weight:500;font-family:inherit;width:100%;height:48px;color:var(--nylas-base-800);background:var(--nylas-base-0);border:none;outline:1.5px solid var(--nylas-base-200);border-radius:var(--nylas-border-radius-2x);flex:none;order:4;align-self:stretch;flex-grow:0;cursor:pointer}.time:hover,.time:focus{color:var(--nylas-primary);outline-color:var(--nylas-primary)}.time.selected{font-weight:600;color:var(--nylas-primary);outline:2px solid var(--nylas-primary);border-color:transparent;box-shadow:0 0 0 2px var(--nylas-primary)}.empty{text-align:center;padding:0 1.5rem;color:var(--nylas-base-600);font-size:min(max(12px, 2vw), 14px);height:450px;display:flex;align-items:center;justify-content:center}@keyframes pulsate{0%{background-color:var(--nylas-base-50)}50%{background-color:var(--nylas-base-100)}100%{background-color:var(--nylas-base-50)}}.loading{padding:0 1.5rem}.loading .timeslot-skeleton{width:100%;height:4rem;background-color:var(--nylas-base-50);margin-bottom:0.5rem;border-radius:var(--nylas-border-radius-2x);animation:pulsate 1.5s infinite ease-in-out}.footer{width:100%;padding:14px;box-sizing:border-box;border-top:1px solid var(--nylas-base-200)}', et = Qe;
1019
- var tt = function(e, t, a, s) {
1020
- var o = arguments.length, i = o < 3 ? t : s === null ? s = Object.getOwnPropertyDescriptor(t, a) : s, r;
1021
- if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
1022
- i = Reflect.decorate(e, t, a, s);
1023
- else
1024
- for (var l = e.length - 1; l >= 0; l--)
1025
- (r = e[l]) && (i = (o < 3 ? r(i) : o > 3 ? r(t, a, i) : r(t, a)) || i);
1026
- return o > 3 && i && Object.defineProperty(t, a, i), i;
1027
- }, Z = function(e, t) {
1028
- if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
1029
- return Reflect.metadata(e, t);
1030
- };
1031
- const de = class {
1032
- constructor(e) {
1033
- k(this, e), this.timeslotSelected = b(this, "timeslotSelected", 7), this.timeslotConfirmed = b(this, "timeslotConfirmed", 7), this.handleConfirmedTimeslot = async (t, a) => {
1034
- t.preventDefault(), d("[nylas-timeslot-picker] Confirm timeslot", a), this.timeslotConfirmed.emit(a);
1035
- }, this.handleMouseEnter = (t) => {
1036
- this.hoveredTimeslotIndex = t;
1037
- }, this.handleMouseLeave = () => {
1038
- this.hoveredTimeslotIndex = -1;
1039
- }, this.availability = void 0, this.isLoading = void 0, this.selectedTimeslot = void 0, this.selectedTimezone = Intl.DateTimeFormat().resolvedOptions().timeZone, this.selectedDate = /* @__PURE__ */ new Date(), this.selectedLanguage = void 0, this.times = [], this.hoveredTimeslotIndex = void 0, this.selectedTimeslotIndex = void 0;
1040
- }
1041
- selectedLanguageChanged(e) {
1042
- c.changeLanguage(e);
1043
- }
1044
- selectedDateChanged(e) {
1045
- var t;
1046
- if (d("[nylas-timeslot-picker] Selected date changed", { newVal: e }), e && (this.selectedTimeslotIndex = "", typeof e < "u")) {
1047
- const a = (t = this.availability) == null ? void 0 : t.filter((s) => E(s.start_time, e)).map((s) => s);
1048
- this.times = a || [];
1049
- }
1050
- }
1051
- availabilityChanged(e) {
1052
- if (d("[nylas-timeslot-picker] Available times changed", { newVal: e, selectedDate: this.selectedDate }), typeof e < "u") {
1053
- const t = e == null ? void 0 : e.filter((a) => this.selectedDate && E(a.start_time, this.selectedDate)).map((a) => a);
1054
- this.times = t || [];
1055
- }
1056
- }
1057
- connectedCallback() {
1058
- }
1059
- disconnectedCallback() {
1060
- }
1061
- async componentWillLoad() {
1062
- d("[nylas-timeslot-picker] Component will load", { selectedDate: this.selectedDate, availability: this.availability, times: this.times });
1063
- }
1064
- async componentDidLoad() {
1065
- var t;
1066
- d("[nylas-timeslot-picker] Component did load");
1067
- const e = (t = this.availability) == null ? void 0 : t.filter((a) => this.selectedDate && E(a.start_time, this.selectedDate)).map((a) => a);
1068
- this.times = e || [];
1069
- }
1070
- getTimeslotId(e, t) {
1071
- return `${e.toLocaleDateString()}-${t}`;
1072
- }
1073
- onClickSelectTime(e, t) {
1074
- d("[nylas-timeslot-picker] Time selected", e, t), this.selectedTimeslotIndex = this.getTimeslotId(e.start_time, t), this.timeslotSelected.emit({
1075
- start_time: e.start_time,
1076
- end_time: e.end_time,
1077
- emails: e.emails
1078
- });
1079
- }
1080
- getTimeSlotLabel(e) {
1081
- const t = new Intl.DateTimeFormat("en-US", {
1082
- hour: "2-digit",
1083
- minute: "2-digit",
1084
- timeZone: this.selectedTimezone
1085
- });
1086
- return `${t.format(e.start_time)} - ${t.format(e.end_time)}`;
1087
- }
1088
- render() {
1089
- return this.isLoading ? n(g, null, n("div", { class: "loading" }, new Array(6).fill(0).map((e, t) => n("div", { class: "timeslot-skeleton", style: { animationDelay: `${t * 20}ms` } })))) : this.availability && this.availability.length === 0 ? n(g, null, n("div", { class: "empty" }, n("span", null, "No dates available"))) : (!this.times || this.times.length === 0) && this.selectedDate ? n(g, null, n("div", { class: "empty" }, n("span", null, "No time slots available for selected date"))) : this.selectedDate ? n(g, { part: "ntp" }, n("div", { class: "time-picker-wrapper" }, n("div", { class: "timeslots" }, this.times.map((e, t) => {
1090
- var a, s, o, i;
1091
- return n("button", { part: `ntp__timeslot ${((s = (a = this.selectedTimeslot) == null ? void 0 : a.start_time) == null ? void 0 : s.getTime()) === e.start_time.getTime() ? "ntp__timeslot--selected" : ""}`, "aria-role": "button", class: {
1092
- time: !0,
1093
- selected: typeof this.selectedTimeslot < "u" && ((i = (o = this.selectedTimeslot) == null ? void 0 : o.start_time) == null ? void 0 : i.getTime()) === e.start_time.getTime()
1094
- }, onClick: () => this.onClickSelectTime(e, t), onMouseEnter: () => this.handleMouseEnter(t), onMouseLeave: () => this.handleMouseLeave() }, this.hoveredTimeslotIndex == t || this.selectedTimeslotIndex == this.getTimeslotId(e.start_time, t) ? this.getTimeSlotLabel(e) : e.start_time.toLocaleTimeString([], { hour: "2-digit", minute: "2-digit", timeZone: this.selectedTimezone }));
1095
- })), this.selectedTimeslot && n("div", { class: "footer" }, n("button-component", { variant: "primary", onClick: (e) => this.handleConfirmedTimeslot(e, this.selectedTimeslot), part: "ntp__button-primary" }, n("slot", { name: "timeslot-picker-cta-label" }, c.t("nextButton")))))) : n(g, null);
1096
- }
1097
- static get watchers() {
1098
- return {
1099
- selectedLanguage: ["selectedLanguageChanged"],
1100
- selectedDate: ["selectedDateChanged"],
1101
- availability: ["availabilityChanged"]
1102
- };
1103
- }
1104
- };
1105
- tt([
1106
- _({
1107
- name: "nylas-timeslot-picker",
1108
- stateToProps: /* @__PURE__ */ new Map([
1109
- ["scheduler.selectedDate", "selectedDate"],
1110
- ["scheduler.availability", "availability"],
1111
- ["scheduler.selectedTimeslot", "selectedTimeslot"],
1112
- ["scheduler.selectedTimezone", "selectedTimezone"],
1113
- ["scheduler.selectedLanguage", "selectedLanguage"],
1114
- ["scheduler.isLoading", "isLoading"]
1115
- ]),
1116
- eventToProps: {
1117
- timeslotSelected: async (e, t) => {
1118
- d("nylas-timeslot-picker", "timeslotSelected", e.detail), t.scheduler.selectTime(e.detail);
1119
- },
1120
- timeslotConfirmed: async (e, t) => {
1121
- d("nylas-timeslot-picker", "timeslotConfirmed", e.detail), e.detail && t.scheduler.toggleAdditionalData(!0);
1122
- }
1123
- },
1124
- fireRegisterEvent: !0
1125
- }),
1126
- Z("design:type", Function),
1127
- Z("design:paramtypes", []),
1128
- Z("design:returntype", void 0)
1129
- ], de.prototype, "render", null);
1130
- de.style = et;
1131
- export {
1132
- ee as nylas_booked_event_card,
1133
- te as nylas_booking_form,
1134
- ne as nylas_cancel_booking_form,
1135
- ae as nylas_cancelled_event_card,
1136
- ie as nylas_confirmed_event_card,
1137
- se as nylas_date_picker,
1138
- re as nylas_locale_switch,
1139
- qe as nylas_logo,
1140
- Ge as nylas_notification,
1141
- le as nylas_organizer_confirmation_card,
1142
- ce as nylas_selected_event_card,
1143
- de as nylas_timeslot_picker
1144
- };