@nylas/react 1.0.0-prealpha1 → 1.0.1-prealpha1

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 (88) hide show
  1. package/dist/add-circle-icon.entry-4b8debfa.js +15 -0
  2. package/dist/add-circle-icon.entry-c5fdaa6f.cjs +1 -0
  3. package/dist/{archive-icon_7.entry-53aede1b.js → archive-icon_7.entry-9f3eca2c.js} +16 -16
  4. package/dist/{archive-icon_7.entry-8c90815a.cjs → archive-icon_7.entry-baecb43c.cjs} +1 -1
  5. package/dist/{arrow-icon.entry-a2f53919.cjs → arrow-icon.entry-9ab0c414.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-2867f4fb.js → arrow-icon.entry-a3b36218.js} +4 -4
  7. package/dist/{bold-icon_3.entry-e0bc6774.cjs → bold-icon_3.entry-50406bc7.cjs} +1 -1
  8. package/dist/{bold-icon_3.entry-ad806730.js → bold-icon_3.entry-b0d81839.js} +6 -6
  9. package/dist/{calendar-cancel-icon.entry-74051835.js → calendar-cancel-icon.entry-0d07e33c.js} +5 -5
  10. package/dist/{calendar-cancel-icon.entry-546b7bd4.cjs → calendar-cancel-icon.entry-8f498984.cjs} +1 -1
  11. package/dist/{calendar-check-icon_3.entry-f5846fee.cjs → calendar-check-icon_3.entry-5415e916.cjs} +1 -1
  12. package/dist/{calendar-check-icon_3.entry-42bab0b4.js → calendar-check-icon_3.entry-cfb612c6.js} +4 -4
  13. package/dist/{calendar-icon.entry-25474b1e.cjs → calendar-icon.entry-219efd7a.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-c751873f.js → calendar-icon.entry-e5f20598.js} +5 -5
  15. package/dist/chevron-icon.entry-3c709061.cjs +1 -0
  16. package/dist/chevron-icon.entry-f5d5d1b1.js +15 -0
  17. package/dist/close-icon_2.entry-eca351c4.js +25 -0
  18. package/dist/{close-icon_2.entry-aa015993.cjs → close-icon_2.entry-fa4f6d3e.cjs} +1 -1
  19. package/dist/{document-refresh-icon.entry-ca2ef29e.cjs → document-refresh-icon.entry-3a29a6e6.cjs} +1 -1
  20. package/dist/{document-refresh-icon.entry-b27207eb.js → document-refresh-icon.entry-89ad42fa.js} +5 -5
  21. package/dist/elements/index.d.ts +4 -0
  22. package/dist/{elements-60ebdb01-24595598.cjs → elements-dc5b338e-81a0319c.cjs} +577 -555
  23. package/dist/{elements-60ebdb01-5d144002.js → elements-dc5b338e-fb5dbfb5.js} +3339 -2763
  24. package/dist/{forward-icon_6.entry-dc8f7235.js → forward-icon_6.entry-0a6dff18.js} +127 -127
  25. package/dist/{forward-icon_6.entry-725d1be4.cjs → forward-icon_6.entry-ce725f05.cjs} +3 -3
  26. package/dist/{globe-icon.entry-796d3f48.js → globe-icon.entry-71414bc6.js} +4 -4
  27. package/dist/{globe-icon.entry-918cfd35.cjs → globe-icon.entry-a0c9599a.cjs} +1 -1
  28. package/dist/index-586a4206.cjs +30 -0
  29. package/dist/{index-4f65b6f9.js → index-98d3a4da.js} +410 -401
  30. package/dist/{index-2b85580a-bfc3ceac.cjs → index-b30d446a-3d69a3cc.cjs} +1 -1
  31. package/dist/{index-2b85580a-f9211f23.js → index-b30d446a-e0eaccad.js} +4 -9
  32. package/dist/{loading-icon.entry-8e49fab0.js → loading-icon.entry-15debb7d.js} +4 -4
  33. package/dist/loading-icon.entry-d2680046.cjs +1 -0
  34. package/dist/{mailbox-store-0019772c-06d31a90.js → mailbox-store-19f0c6c9-23a4e72f.js} +1 -1
  35. package/dist/{mailbox-store-0019772c-d1254c5c.cjs → mailbox-store-19f0c6c9-9a3ef58a.cjs} +1 -1
  36. package/dist/{nylas-booked-event-card_9.entry-ea02f083.cjs → nylas-booked-event-card_10.entry-27efa654.cjs} +6 -139
  37. package/dist/{nylas-booked-event-card_9.entry-d995d7cb.js → nylas-booked-event-card_10.entry-f2481a57.js} +1818 -1927
  38. package/dist/{nylas-if-state_3.entry-e8c831b7.cjs → nylas-if-state_3.entry-6c0bf8eb.cjs} +1 -1
  39. package/dist/{nylas-if-state_3.entry-ce816adb.js → nylas-if-state_3.entry-d805d4c6.js} +6 -6
  40. package/dist/{nylas-list-folders.entry-8134344b.js → nylas-list-folders.entry-472bd255.js} +3 -3
  41. package/dist/{nylas-list-folders.entry-de8cca60.cjs → nylas-list-folders.entry-cc04a07e.cjs} +1 -1
  42. package/dist/{nylas-list-threads.entry-93b70a1a.cjs → nylas-list-threads.entry-795c5a2b.cjs} +1 -1
  43. package/dist/{nylas-list-threads.entry-1367fe30.js → nylas-list-threads.entry-f3266bf7.js} +3 -3
  44. package/dist/{nylas-mailbox-pagination.entry-568ac217.js → nylas-mailbox-pagination.entry-bd0d3bda.js} +2 -2
  45. package/dist/{nylas-mailbox-pagination.entry-6bb0ee37.cjs → nylas-mailbox-pagination.entry-f701fd83.cjs} +1 -1
  46. package/dist/{nylas-mailbox-toolbar-button.entry-9214b283.js → nylas-mailbox-toolbar-button.entry-9641b5cd.js} +8 -8
  47. package/dist/{nylas-mailbox-toolbar-button.entry-d4ad5c15.cjs → nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs} +1 -1
  48. package/dist/{nylas-open-hours-picker.entry-109f13f5.js → nylas-open-hours-picker.entry-42942946.js} +58 -58
  49. package/dist/{nylas-open-hours-picker.entry-2c19643f.cjs → nylas-open-hours-picker.entry-aa103daf.cjs} +1 -1
  50. package/dist/{nylas-provider.entry-87fa9276.cjs → nylas-provider.entry-5bb55b2d.cjs} +1 -1
  51. package/dist/{nylas-provider.entry-2cfe5f0e.js → nylas-provider.entry-b94198a1.js} +7 -7
  52. package/dist/nylas-scheduler.entry-3b7cb841.js +230 -0
  53. package/dist/nylas-scheduler.entry-ea6fb146.cjs +1 -0
  54. package/dist/{nylas-threads-refresh.entry-6d61a689.cjs → nylas-threads-refresh.entry-4002608b.cjs} +1 -1
  55. package/dist/{nylas-threads-refresh.entry-9111a403.js → nylas-threads-refresh.entry-7d567ed1.js} +4 -4
  56. package/dist/nylas-threads-search.entry-556f1219.cjs +1 -0
  57. package/dist/{nylas-threads-search.entry-2124f663.js → nylas-threads-search.entry-c881d54b.js} +12 -12
  58. package/dist/{nylas-view-thread.entry-4ecbcd78.cjs → nylas-view-thread.entry-6faf1b51.cjs} +1 -1
  59. package/dist/{nylas-view-thread.entry-fe51c1f6.js → nylas-view-thread.entry-d8de6c83.js} +3 -3
  60. package/dist/play-icon_2.entry-2e21b8b9.cjs +1 -0
  61. package/dist/play-icon_2.entry-cae94826.js +25 -0
  62. package/dist/react.cjs +1 -1
  63. package/dist/react.js +57 -53
  64. package/dist/{refresh-icon.entry-9f24e833.cjs → refresh-icon.entry-3e0aef26.cjs} +1 -1
  65. package/dist/{refresh-icon.entry-4ddd53b0.js → refresh-icon.entry-9563850b.js} +4 -4
  66. package/dist/{register-component-55376f31-5eaf8954.js → register-component-152c6ad2-418db864.js} +1 -1
  67. package/dist/{register-component-55376f31-8d6ddee4.cjs → register-component-152c6ad2-b0d34c36.cjs} +1 -1
  68. package/dist/scheduler-store-7d48e682-39104219.js +289 -0
  69. package/dist/scheduler-store-7d48e682-449277d4.cjs +1 -0
  70. package/dist/search-icon_3.entry-9b027cfc.cjs +1 -0
  71. package/dist/search-icon_3.entry-e36548ec.js +101 -0
  72. package/package.json +1 -1
  73. package/dist/chevron-icon.entry-60842fb6.js +0 -15
  74. package/dist/chevron-icon.entry-97e4621e.cjs +0 -1
  75. package/dist/close-icon_2.entry-ef03bd27.js +0 -25
  76. package/dist/index-29d0e781.cjs +0 -30
  77. package/dist/loading-icon.entry-b2534e3e.cjs +0 -1
  78. package/dist/nylas-scheduler.entry-6ec8e574.js +0 -195
  79. package/dist/nylas-scheduler.entry-b41cbf99.cjs +0 -1
  80. package/dist/nylas-threads-search.entry-03073490.cjs +0 -1
  81. package/dist/play-icon_2.entry-8e156535.js +0 -25
  82. package/dist/play-icon_2.entry-cf1cbc8d.cjs +0 -1
  83. package/dist/property-0065dde7-83dc9cc4.cjs +0 -23
  84. package/dist/property-0065dde7-c57b8fa3.js +0 -589
  85. package/dist/scheduler-store-5a39585a-117668e3.js +0 -173
  86. package/dist/scheduler-store-5a39585a-2c848bec.cjs +0 -1
  87. package/dist/translate-icon.entry-0cd24de4.cjs +0 -1
  88. package/dist/translate-icon.entry-db2cdf1d.js +0 -15
@@ -1,6 +1,6 @@
1
- import { r as ne, h as g, c as We, H as $e, g as Rt, F as bn } from "./index-4f65b6f9.js";
2
- import { d as T, j as yn, k as En, p as Tn, l as An } from "./utils-5074a070-ce33ee6b.js";
3
- import { R as _n } from "./register-component-55376f31-5eaf8954.js";
1
+ import { r as ne, h as g, c as We, H as $e, g as Rt, F as yn } from "./index-98d3a4da.js";
2
+ import { d as T, j as bn, k as En, p as Tn, l as An } from "./utils-5074a070-ce33ee6b.js";
3
+ import { R as _n } from "./register-component-152c6ad2-418db864.js";
4
4
  import { c as wn } from "./_commonjsHelpers-57e89916-af061c86.js";
5
5
  import "react";
6
6
  import "react-dom";
@@ -9,7 +9,7 @@ const vn = ".sc-forward-icon-h{display:flex}", Sn = vn, Cn = class {
9
9
  ne(this, t), this.width = "15", this.height = "15";
10
10
  }
11
11
  render() {
12
- return g("svg", { key: "4f51b5a4b2779e9877ce09164250017619114cb0", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "b2f1b016bdaef66b1c014791dd681fdfbdb3a160", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
12
+ return g("svg", { key: "f6f2a0745a4ea7849081d7ac5d0244ee69d087b7", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "484a8d3299af5b6a48929d894214027e3c273fe4", d: "m1246.246 64-90.496 90.496 477.952 477.952h-590.848C467.878 632.448.038 1100.416.038 1675.392v109.056h128v-109.056c0-504.576 410.368-914.944 914.816-914.944h590.848l-477.952 478.08 90.496 90.496 632.448-632.576L1246.246 64Z", "fill-rule": "evenodd" }));
13
13
  }
14
14
  };
15
15
  Cn.style = Sn;
@@ -58,20 +58,20 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
58
58
  T("no selection");
59
59
  return;
60
60
  }
61
- const m = s.getRangeAt(0), a = s.toString();
61
+ const f = s.getRangeAt(0), a = s.toString();
62
62
  if (!a) {
63
63
  o.style.display = "none";
64
64
  return;
65
65
  }
66
- const f = t.querySelector(".message-body");
67
- if (!f) {
66
+ const m = t.querySelector(".message-body");
67
+ if (!m) {
68
68
  T("no message body");
69
69
  return;
70
70
  }
71
- const l = m.commonAncestorContainer.parentElement;
71
+ const l = f.commonAncestorContainer.parentElement;
72
72
  if (!l)
73
73
  return;
74
- const E = f.getBoundingClientRect();
74
+ const E = m.getBoundingClientRect();
75
75
  T("messageBodyRect", { messageBodyRect: E });
76
76
  const _ = l.getBoundingClientRect();
77
77
  T("foundRect", { foundRect: _ });
@@ -85,22 +85,22 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
85
85
  T("no editor element");
86
86
  return;
87
87
  }
88
- this.editorEl.querySelectorAll(".message-body").forEach((f) => f.remove());
88
+ this.editorEl.querySelectorAll(".message-body").forEach((m) => m.remove());
89
89
  const o = document.createElement("div");
90
90
  o.classList.add("message-body");
91
91
  const u = document.createElement("p");
92
92
  u.innerHTML = " ", o.appendChild(u);
93
93
  const s = document.createElement("br");
94
94
  o.appendChild(s);
95
- const m = document.createElement("div");
96
- if (m.classList.add("reply-text"), m.innerText = `On ${new Date(t.date * 1e3).toLocaleDateString(void 0, { dateStyle: "full" })} <${(a = t.from) == null ? void 0 : a.map((f) => f.name || f.email).join(", ")}> wrote:`, o.appendChild(m), t.body) {
97
- const f = document.createElement("html");
98
- f.innerHTML = t.body;
95
+ const f = document.createElement("div");
96
+ if (f.classList.add("reply-text"), f.innerText = `On ${new Date(t.date * 1e3).toLocaleDateString(void 0, { dateStyle: "full" })} <${(a = t.from) == null ? void 0 : a.map((m) => m.name || m.email).join(", ")}> wrote:`, o.appendChild(f), t.body) {
97
+ const m = document.createElement("html");
98
+ m.innerHTML = t.body;
99
99
  const i = document.createElement("blockquote");
100
- i.classList.add("collapsed"), i.classList.add("gmail_quote"), i.innerHTML = f.innerHTML, o.appendChild(i), T("replyContainer", { replyContainer: i });
100
+ i.classList.add("collapsed"), i.classList.add("gmail_quote"), i.innerHTML = m.innerHTML, o.appendChild(i), T("replyContainer", { replyContainer: i });
101
101
  }
102
- this.editorEl.appendChild(o), this.editorEl.querySelectorAll("blockquote.collapsed").forEach((f) => {
103
- f.addEventListener("click", function(i) {
102
+ this.editorEl.appendChild(o), this.editorEl.querySelectorAll("blockquote.collapsed").forEach((m) => {
103
+ m.addEventListener("click", function(i) {
104
104
  i.preventDefault();
105
105
  const l = i.target;
106
106
  l.classList.remove("collapsed"), l.classList.add("expanded");
@@ -108,7 +108,7 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
108
108
  }), this.editorEl.focus();
109
109
  }
110
110
  render() {
111
- return g($e, { key: "a1e6e146356d27b4612c1381a051e421468016f9" }, g("sp-theme", { key: "a55f43e956e35a41e0854b7653f3eaa0472e4603", scale: "medium", color: "dark" }, g("div", { key: "dca393d6d4cae7d64630c2e684fa403638135aab", class: "editor", contentEditable: !0, ref: (t) => this.editorEl = t }, g("div", { key: "e77b4c9ea8b843cb15ebe92b49120bcf7b6a7ce4", class: "toolbar", ref: (t) => this.toolbarEl = t, contentEditable: !1 }, g("sp-button", { key: "0b825b12e643a37c4e746eec4fc51608f576a58b", quiet: !0, onClick: () => document.execCommand("bold") }, g("div", { key: "95051b6e9b07e9792e180e09a0ca74c834a6f6c8", slot: "icon" }, g("bold-icon", { key: "6f33cd1e9525984d8c9b001f2b3a114bf08ec9a5" })), g("div", { key: "250323dfd86467b528903b7cdbfc704efffcc789", slot: "label" }, "Bold")), g("sp-button", { key: "af4d4302617dd0ee1ad3d50161e4a019e4fbc1e7", quiet: !0, onClick: () => document.execCommand("underline") }, g("div", { key: "aa2e4a6c9be743d228b5ebc7a8c59d59cbed5b2c", slot: "icon" }, g("underline-icon", { key: "6833ead83e35cd0b07c0c88b81be3446d3efd824" })), g("div", { key: "1c18f62267adfa70e176efed64f745dd202c0230", slot: "label" }, "Underline")), g("sp-button", { key: "08139372218452b7b83aa9580cb9a797106b189f", quiet: !0, onClick: () => document.execCommand("italic") }, g("div", { key: "bd439d444ae836a0c612e57f92b7c0e303ff732a", slot: "icon" }, g("italic-icon", { key: "c25d86181198e1f1b176caad9ccfc0ecd5653c15" })), g("div", { key: "c6231490b7c86113f8dbcfc8386ec5581f6b2a3a", slot: "label" }, "Italic")))), g("div", { key: "95921362af8283ee5d04cf17faf4c8b5725ba7bd", class: "buttons" }, g("sp-button", { key: "6c21a44e39720b78fddda544d3b3e3dd2597d9c3", onClick: this.sendComposer, class: "send" }, "Send"), g("sp-button", { key: "2d0354668c676f6e723be1f0e9614cff6120d361", onClick: this.closeComposer, class: "close" }, "Close"))));
111
+ return g($e, { key: "b25497b478659d675aadb91a6b7e147ff6e5e9b8" }, g("sp-theme", { key: "dd88253135657e6cda8daf8e71635c16d736a317", scale: "medium", color: "dark" }, g("div", { key: "f23ecbde8bda95328796f60bc5612cedd30cd488", class: "editor", contentEditable: !0, ref: (t) => this.editorEl = t }, g("div", { key: "871c357e3c095fe2237d228bbaaeb1f5247734b3", class: "toolbar", ref: (t) => this.toolbarEl = t, contentEditable: !1 }, g("sp-button", { key: "626560dcbd264b9572be5f7d69268186c8b1a0f6", quiet: !0, onClick: () => document.execCommand("bold") }, g("div", { key: "d83785d23518d539064405eb657d9291f76436be", slot: "icon" }, g("bold-icon", { key: "ce45db34d019a60e3955a3a32335447ae1e27b14" })), g("div", { key: "9f05672f538617fbaca46e8287f7e2ebc0909816", slot: "label" }, "Bold")), g("sp-button", { key: "2906871fa67987ab87a7619b7bb0b9ee09b3dca8", quiet: !0, onClick: () => document.execCommand("underline") }, g("div", { key: "b75c2a77ed80693f66b6bddcc9c7af13c474bd7d", slot: "icon" }, g("underline-icon", { key: "733d5dd3fa2906c9ad4e6a212c3282315290f0bb" })), g("div", { key: "f59da34a2ef65a4339a5e5770acd41e1e4c0d4b1", slot: "label" }, "Underline")), g("sp-button", { key: "5654719682fe352f5a060e1a947d52686dcbb91c", quiet: !0, onClick: () => document.execCommand("italic") }, g("div", { key: "650498d94ec07f8fd43d305637f189336aaac2a1", slot: "icon" }, g("italic-icon", { key: "8f03281a56c6b35f17b7a7f5f10285f3be87d757" })), g("div", { key: "03ba08b7ffb8023b44bbd7a107f8767e7430a692", slot: "label" }, "Italic")))), g("div", { key: "19cd7d52d3f24a440a6b4ae6beb75a680403d94d", class: "buttons" }, g("sp-button", { key: "dfe307499781aa00e03de3316043a4d47bf349a5", onClick: this.sendComposer, class: "send" }, "Send"), g("sp-button", { key: "c8d6a72d27723f1c2ac789d0a03d22b14ebfdec6", onClick: this.closeComposer, class: "close" }, "Close"))));
112
112
  }
113
113
  get host() {
114
114
  return Rt(this);
@@ -122,13 +122,13 @@ const Ln = ':host{display:grid;color:var(--nylas-color-primary-900)}.editor{posi
122
122
  kn.style = Rn;
123
123
  const Mn = ":host{display:block}sp-button{padding:0;border:0;border-radius:var(--nylas-border-radius);min-block-size:50%;min-inline-size:2rem;background-color:var(--nylas-color-primary-300);fill:var(--nylas-color-primary-800)}sp-button:hover{background-color:var(--nylas-color-primary-400)}.summarize-button.stopped{animation:none}.summarize-button.playing{animation:pulse 2s infinite}.summarize-button.loading{display:flex;align-content:center;height:1.5rem;width:2rem;vertical-align:middle;animation:pulse 2s infinite;flex-wrap:wrap}.summarize-button.loading loading-icon{--dot-color:var(--nylas-color-primary-600)}@keyframes pulse{0%{transform:scale(1);box-shadow:0 0 0 0 var(--nylas-color-primary-300)}70%{transform:scale(1.05);box-shadow:0 0 0 10px rgba(255, 69, 0, 0)}100%{transform:scale(1);box-shadow:0 0 0 0 rgba(255, 69, 0, 0)}}@keyframes wave{0%{transform:translateX(0)}50%{transform:translateX(100%)}100%{transform:translateX(0)}}", Nn = Mn;
124
124
  var xn = function(t, o, u, s) {
125
- var m = arguments.length, a = m < 3 ? o : s === null ? s = Object.getOwnPropertyDescriptor(o, u) : s, f;
125
+ var f = arguments.length, a = f < 3 ? o : s === null ? s = Object.getOwnPropertyDescriptor(o, u) : s, m;
126
126
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")
127
127
  a = Reflect.decorate(t, o, u, s);
128
128
  else
129
129
  for (var i = t.length - 1; i >= 0; i--)
130
- (f = t[i]) && (a = (m < 3 ? f(a) : m > 3 ? f(o, u, a) : f(o, u)) || a);
131
- return m > 3 && a && Object.defineProperty(o, u, a), a;
130
+ (m = t[i]) && (a = (f < 3 ? m(a) : f > 3 ? m(o, u, a) : m(o, u)) || a);
131
+ return f > 3 && a && Object.defineProperty(o, u, a), a;
132
132
  }, Be = function(t, o) {
133
133
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function")
134
134
  return Reflect.metadata(t, o);
@@ -182,17 +182,17 @@ const kt = class {
182
182
  return;
183
183
  }
184
184
  const u = new MediaSource();
185
- let s, m = !1;
185
+ let s, f = !1;
186
186
  o.src = URL.createObjectURL(u), u.addEventListener("sourceopen", a);
187
187
  async function a() {
188
- s = u.addSourceBuffer("audio/mpeg"), s.addEventListener("updateend", f);
188
+ s = u.addSourceBuffer("audio/mpeg"), s.addEventListener("updateend", m);
189
189
  const i = await t;
190
190
  if (i == null)
191
191
  throw new Error("ReadableStream not yet supported in this browser.");
192
192
  const l = i.getReader(), E = () => {
193
193
  l.read().then(({ done: _, value: N }) => {
194
194
  if (_) {
195
- m = !0;
195
+ f = !0;
196
196
  return;
197
197
  }
198
198
  s.updating || s.appendBuffer(N), E();
@@ -202,11 +202,11 @@ const kt = class {
202
202
  };
203
203
  E(), o.paused && o.play().catch((_) => console.error("Error playing audio:", _));
204
204
  }
205
- function f() {
206
- if (m) {
205
+ function m() {
206
+ if (f) {
207
207
  u.endOfStream(), u.removeEventListener("sourceopen", a), u.removeEventListener("sourceclose", () => {
208
208
  T("[nylas-summarize-message-button] Source closed");
209
- }), s.removeEventListener("updateend", f);
209
+ }), s.removeEventListener("updateend", m);
210
210
  return;
211
211
  }
212
212
  }
@@ -215,12 +215,12 @@ const kt = class {
215
215
  return t.read().then(({ done: u, value: s }) => u ? o : (o.push(s), this.readChunk(t, o)));
216
216
  }
217
217
  render() {
218
- return g($e, { key: "507fa8a1d6570be296501c8e154ef8b85cda0871" }, g("sp-theme", { key: "2db0d8c57e95c758f240a0e9328c26ec4e3d2e77", scale: "medium", color: "dark" }, g("sp-button", { key: "df8bb0eb9069456125bd570eb280f018e0ebb9e3", label: "Summarize email", "icon-only": !0, onClickCapture: this.onClick, class: {
218
+ return g($e, { key: "052c49f7b564274561da89404b06b490b993b1f0" }, g("sp-theme", { key: "55b4965642873d51c445b4db4eac17119d6e0568", scale: "medium", color: "dark" }, g("sp-button", { key: "c7bf00d3570f9129cdb3005d0e0877c95cb75466", label: "Summarize email", "icon-only": !0, onClickCapture: this.onClick, class: {
219
219
  "summarize-button": !0,
220
220
  stopped: this.state === "stopped",
221
221
  loading: this.state === "loading",
222
222
  playing: this.state === "playing"
223
- } }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "3bc2427c264410ae9c68f1aec3d3b0c675ae108b", ref: (t) => this.audioRef = t, autoPlay: !0, onPlaying: () => this.state = "playing", onPause: () => this.state = "stopped", onEnded: () => {
223
+ } }, this.state === "stopped" && g("play-icon", null), this.state === "loading" && g("loading-icon", null), this.state === "playing" && g("stop-icon", null)), g("audio", { key: "489a2f36807bf74313ca4ce0cdfe84682a614a34", ref: (t) => this.audioRef = t, autoPlay: !0, onPlaying: () => this.state = "playing", onPause: () => this.state = "stopped", onEnded: () => {
224
224
  this.state = "stopped", T("[nylas-summarize-message-button] Audio ended");
225
225
  } })));
226
226
  }
@@ -230,10 +230,10 @@ xn([
230
230
  name: "nylas-summarize-message-button",
231
231
  eventToProps: {
232
232
  summarize: async (t, o) => {
233
- const { playAudio: u, updateState: s, abortController: m, message: a } = t.detail, f = An(a.body || "");
233
+ const { playAudio: u, updateState: s, abortController: f, message: a } = t.detail, m = An(a.body || "");
234
234
  await s("loading");
235
235
  try {
236
- const i = await o.messages.summarizeText(f), l = o.messages.textToSpeech(i, m);
236
+ const i = await o.messages.summarizeText(m), l = o.messages.textToSpeech(i, f);
237
237
  await u(l);
238
238
  } catch (i) {
239
239
  await s("stopped"), console.error("Error summarizing message:", i);
@@ -260,16 +260,16 @@ function Mt(t) {
260
260
  const o = (a = t.match(/\d+/g)) == null ? void 0 : a.map(Number);
261
261
  if (!o)
262
262
  return t;
263
- const [u, s, m] = o;
264
- return `rgb(${255 - u}, ${255 - s}, ${255 - m})`;
263
+ const [u, s, f] = o;
264
+ return `rgb(${255 - u}, ${255 - s}, ${255 - f})`;
265
265
  }
266
266
  function On(t) {
267
267
  var a;
268
268
  const o = (a = t.match(/\d+\.?\d*/g)) == null ? void 0 : a.map(Number);
269
269
  if (!o)
270
270
  return t;
271
- const [u, s, m] = o;
272
- return `hsl(${u}, ${s}%, ${100 - m}%)`;
271
+ const [u, s, f] = o;
272
+ return `hsl(${u}, ${s}%, ${100 - f}%)`;
273
273
  }
274
274
  function In(t) {
275
275
  return /^[a-z]+$/i.test(t);
@@ -297,9 +297,9 @@ function Lt(t) {
297
297
  const l = i[0].trim(), E = l.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), [_, N, U] = i[1].split(" ");
298
298
  o = o.replaceAll(E, l.replace(U, P(U)));
299
299
  }
300
- const m = o.matchAll(/background-color:\s*([^;]+)/g);
301
- if (m)
302
- for (const i of m) {
300
+ const f = o.matchAll(/background-color:\s*([^;]+)/g);
301
+ if (f)
302
+ for (const i of f) {
303
303
  const [l, E] = i, _ = l.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
304
304
  o = o.replaceAll(_, l.replace(E, P(E))), T("backgroundColor", { fullMatch: l, replace: l.replace(E, P(E)), color: E, invertColor: P(E) });
305
305
  }
@@ -309,9 +309,9 @@ function Lt(t) {
309
309
  const l = i[0].trim(), E = l.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&"), [_, N, U] = i[1].split(" ");
310
310
  o = o.replaceAll(E, l.replace(U, P(U)));
311
311
  }
312
- const f = o.matchAll(/color:\s*([^;]+)/g);
313
- if (f)
314
- for (const i of f) {
312
+ const m = o.matchAll(/color:\s*([^;]+)/g);
313
+ if (m)
314
+ for (const i of m) {
315
315
  const [l, E] = i, _ = l.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&");
316
316
  o = o.replaceAll(_, l.replace(E, P(E)));
317
317
  }
@@ -319,8 +319,8 @@ function Lt(t) {
319
319
  }
320
320
  }
321
321
  if (t instanceof HTMLElement) {
322
- const o = window.getComputedStyle(t), u = o.color || t.style.color, s = o.backgroundColor || t.style.backgroundColor, m = o.borderColor || t.style.borderColor;
323
- u && !s ? t.style.color = "" : u && s ? (t.style.color = P(u), t.style.backgroundColor = P(s), T("element", t), T("computedStyle.color", u), T("computedStyle.backgroundColor", s), T("invertColor(color)", P(u)), T("invertColor(backgroundColor)", P(s))) : !u && s && (t.style.backgroundColor = ""), m && (T("borderColor", m), t.style.borderColor = P(m)), t.hasAttribute("bgcolor") && t.removeAttribute("bgcolor");
322
+ const o = window.getComputedStyle(t), u = o.color || t.style.color, s = o.backgroundColor || t.style.backgroundColor, f = o.borderColor || t.style.borderColor;
323
+ u && !s ? t.style.color = "" : u && s ? (t.style.color = P(u), t.style.backgroundColor = P(s), T("element", t), T("computedStyle.color", u), T("computedStyle.backgroundColor", s), T("invertColor(color)", P(u)), T("invertColor(backgroundColor)", P(s))) : !u && s && (t.style.backgroundColor = ""), f && (T("borderColor", f), t.style.borderColor = P(f)), t.hasAttribute("bgcolor") && t.removeAttribute("bgcolor");
324
324
  }
325
325
  }
326
326
  function zn(t) {
@@ -335,9 +335,9 @@ var Nt = { exports: {} };
335
335
  const {
336
336
  entries: u,
337
337
  setPrototypeOf: s,
338
- isFrozen: m,
338
+ isFrozen: f,
339
339
  getPrototypeOf: a,
340
- getOwnPropertyDescriptor: f
340
+ getOwnPropertyDescriptor: m
341
341
  } = Object;
342
342
  let {
343
343
  freeze: i,
@@ -351,68 +351,68 @@ var Nt = { exports: {} };
351
351
  return c;
352
352
  }), l || (l = function(c) {
353
353
  return c;
354
- }), _ || (_ = function(c, y, h) {
355
- return c.apply(y, h);
356
- }), N || (N = function(c, y) {
357
- return new c(...y);
354
+ }), _ || (_ = function(c, b, h) {
355
+ return c.apply(b, h);
356
+ }), N || (N = function(c, b) {
357
+ return new c(...b);
358
358
  });
359
359
  const U = I(Array.prototype.forEach), de = I(Array.prototype.pop), G = I(Array.prototype.push), X = I(String.prototype.toLowerCase), oe = I(String.prototype.toString), Ee = I(String.prototype.match), W = I(String.prototype.replace), xt = I(String.prototype.indexOf), Dt = I(String.prototype.trim), O = I(RegExp.prototype.test), ie = Ot(TypeError);
360
- function I(b) {
360
+ function I(y) {
361
361
  return function(c) {
362
- for (var y = arguments.length, h = new Array(y > 1 ? y - 1 : 0), k = 1; k < y; k++)
362
+ for (var b = arguments.length, h = new Array(b > 1 ? b - 1 : 0), k = 1; k < b; k++)
363
363
  h[k - 1] = arguments[k];
364
- return _(b, c, h);
364
+ return _(y, c, h);
365
365
  };
366
366
  }
367
- function Ot(b) {
367
+ function Ot(y) {
368
368
  return function() {
369
- for (var c = arguments.length, y = new Array(c), h = 0; h < c; h++)
370
- y[h] = arguments[h];
371
- return N(b, y);
369
+ for (var c = arguments.length, b = new Array(c), h = 0; h < c; h++)
370
+ b[h] = arguments[h];
371
+ return N(y, b);
372
372
  };
373
373
  }
374
- function p(b, c) {
375
- let y = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : X;
376
- s && s(b, null);
374
+ function p(y, c) {
375
+ let b = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : X;
376
+ s && s(y, null);
377
377
  let h = c.length;
378
378
  for (; h--; ) {
379
379
  let k = c[h];
380
380
  if (typeof k == "string") {
381
- const F = y(k);
382
- F !== k && (m(c) || (c[h] = F), k = F);
381
+ const F = b(k);
382
+ F !== k && (f(c) || (c[h] = F), k = F);
383
383
  }
384
- b[k] = !0;
384
+ y[k] = !0;
385
385
  }
386
- return b;
386
+ return y;
387
387
  }
388
- function It(b) {
389
- for (let c = 0; c < b.length; c++)
390
- f(b, c) === void 0 && (b[c] = null);
391
- return b;
388
+ function It(y) {
389
+ for (let c = 0; c < y.length; c++)
390
+ m(y, c) === void 0 && (y[c] = null);
391
+ return y;
392
392
  }
393
- function $(b) {
393
+ function $(y) {
394
394
  const c = E(null);
395
- for (const [y, h] of u(b))
396
- f(b, y) !== void 0 && (Array.isArray(h) ? c[y] = It(h) : h && typeof h == "object" && h.constructor === Object ? c[y] = $(h) : c[y] = h);
395
+ for (const [b, h] of u(y))
396
+ m(y, b) !== void 0 && (Array.isArray(h) ? c[b] = It(h) : h && typeof h == "object" && h.constructor === Object ? c[b] = $(h) : c[b] = h);
397
397
  return c;
398
398
  }
399
- function ue(b, c) {
400
- for (; b !== null; ) {
401
- const h = f(b, c);
399
+ function ue(y, c) {
400
+ for (; y !== null; ) {
401
+ const h = m(y, c);
402
402
  if (h) {
403
403
  if (h.get)
404
404
  return I(h.get);
405
405
  if (typeof h.value == "function")
406
406
  return I(h.value);
407
407
  }
408
- b = a(b);
408
+ y = a(y);
409
409
  }
410
- function y(h) {
410
+ function b(h) {
411
411
  return console.warn("fallback value for", h), null;
412
412
  }
413
- return y;
413
+ return b;
414
414
  }
415
- const qe = i(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Te = i(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ae = i(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Pt = i(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), _e = i(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ut = i(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ye = i(["#text"]), je = i(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), we = i(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Xe = i(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), fe = i(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), zt = l(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ft = l(/<%[\w\W]*|[\w\W]*%>/gm), Ht = l(/\${[\w\W]*}/gm), Bt = l(/^data-[\-\w.\u00B7-\uFFFF]/), Wt = l(/^aria-[\-\w]+$/), Ve = l(
415
+ const qe = i(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "section", "select", "shadow", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Te = i(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ae = i(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Pt = i(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), _e = i(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Ut = i(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Ye = i(["#text"]), je = i(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "pattern", "placeholder", "playsinline", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "xmlns", "slot"]), we = i(["accent-height", "accumulate", "additive", "alignment-baseline", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Xe = i(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), me = i(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), zt = l(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Ft = l(/<%[\w\W]*|[\w\W]*%>/gm), Ht = l(/\${[\w\W]*}/gm), Bt = l(/^data-[\-\w.\u00B7-\uFFFF]/), Wt = l(/^aria-[\-\w]+$/), Ve = l(
416
416
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
417
417
  // eslint-disable-line no-useless-escape
418
418
  ), Gt = l(/^(?:\w+script|data):/i), $t = l(
@@ -433,12 +433,12 @@ var Nt = { exports: {} };
433
433
  });
434
434
  const qt = function() {
435
435
  return typeof window > "u" ? null : window;
436
- }, Yt = function(c, y) {
436
+ }, Yt = function(c, b) {
437
437
  if (typeof c != "object" || typeof c.createPolicy != "function")
438
438
  return null;
439
439
  let h = null;
440
440
  const k = "data-tt-policy-suffix";
441
- y && y.hasAttribute(k) && (h = y.getAttribute(k));
441
+ b && b.hasAttribute(k) && (h = b.getAttribute(k));
442
442
  const F = "dompurify" + (h ? "#" + h : "");
443
443
  try {
444
444
  return c.createPolicy(F, {
@@ -454,27 +454,27 @@ var Nt = { exports: {} };
454
454
  }
455
455
  };
456
456
  function Qe() {
457
- let b = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qt();
457
+ let y = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : qt();
458
458
  const c = (d) => Qe(d);
459
- if (c.version = "3.0.8", c.removed = [], !b || !b.document || b.document.nodeType !== 9)
459
+ if (c.version = "3.0.8", c.removed = [], !y || !y.document || y.document.nodeType !== 9)
460
460
  return c.isSupported = !1, c;
461
461
  let {
462
- document: y
463
- } = b;
464
- const h = y, k = h.currentScript, {
462
+ document: b
463
+ } = y;
464
+ const h = b, k = h.currentScript, {
465
465
  DocumentFragment: F,
466
466
  HTMLTemplateElement: V,
467
467
  Node: ve,
468
468
  Element: Je,
469
469
  NodeFilter: Se,
470
- NamedNodeMap: Xt = b.NamedNodeMap || b.MozNamedAttrMap,
470
+ NamedNodeMap: Xt = y.NamedNodeMap || y.MozNamedAttrMap,
471
471
  HTMLFormElement: Vt,
472
472
  DOMParser: Zt,
473
- trustedTypes: me
474
- } = b, pe = Je.prototype, Kt = ue(pe, "cloneNode"), Qt = ue(pe, "nextSibling"), Jt = ue(pe, "childNodes"), Ce = ue(pe, "parentNode");
473
+ trustedTypes: fe
474
+ } = y, pe = Je.prototype, Kt = ue(pe, "cloneNode"), Qt = ue(pe, "nextSibling"), Jt = ue(pe, "childNodes"), Ce = ue(pe, "parentNode");
475
475
  if (typeof V == "function") {
476
- const d = y.createElement("template");
477
- d.content && d.content.ownerDocument && (y = d.content.ownerDocument);
476
+ const d = b.createElement("template");
477
+ d.content && d.content.ownerDocument && (b = d.content.ownerDocument);
478
478
  }
479
479
  let M, ae = "";
480
480
  const {
@@ -482,7 +482,7 @@ var Nt = { exports: {} };
482
482
  createNodeIterator: en,
483
483
  createDocumentFragment: tn,
484
484
  getElementsByTagName: nn
485
- } = y, {
485
+ } = b, {
486
486
  importNode: on
487
487
  } = h;
488
488
  let z = {};
@@ -501,7 +501,7 @@ var Nt = { exports: {} };
501
501
  } = Ke, v = null;
502
502
  const nt = p({}, [...qe, ...Te, ...Ae, ..._e, ...Ye]);
503
503
  let S = null;
504
- const ot = p({}, [...je, ...we, ...Xe, ...fe]);
504
+ const ot = p({}, [...je, ...we, ...Xe, ...me]);
505
505
  let w = Object.seal(E(null, {
506
506
  tagNameCheck: {
507
507
  writable: !0,
@@ -528,50 +528,50 @@ var Nt = { exports: {} };
528
528
  let dt = null;
529
529
  const ut = p({}, ["audio", "video", "img", "source", "image", "track"]);
530
530
  let Pe = null;
531
- const ft = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), be = "http://www.w3.org/1998/Math/MathML", ye = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml";
531
+ const mt = p({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), ye = "http://www.w3.org/1998/Math/MathML", be = "http://www.w3.org/2000/svg", H = "http://www.w3.org/1999/xhtml";
532
532
  let ee = H, Ue = !1, ze = null;
533
- const cn = p({}, [be, ye, H], oe);
533
+ const cn = p({}, [ye, be, H], oe);
534
534
  let le = null;
535
535
  const dn = ["application/xhtml+xml", "text/html"], un = "text/html";
536
536
  let C = null, te = null;
537
- const fn = y.createElement("form"), mt = function(e) {
537
+ const mn = b.createElement("form"), ft = function(e) {
538
538
  return e instanceof RegExp || e instanceof Function;
539
539
  }, Fe = function() {
540
540
  let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
541
541
  if (!(te && te === e)) {
542
542
  if ((!e || typeof e != "object") && (e = {}), e = $(e), le = // eslint-disable-next-line unicorn/prefer-includes
543
543
  dn.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? un : e.PARSER_MEDIA_TYPE, C = le === "application/xhtml+xml" ? oe : X, v = "ALLOWED_TAGS" in e ? p({}, e.ALLOWED_TAGS, C) : nt, S = "ALLOWED_ATTR" in e ? p({}, e.ALLOWED_ATTR, C) : ot, ze = "ALLOWED_NAMESPACES" in e ? p({}, e.ALLOWED_NAMESPACES, oe) : cn, Pe = "ADD_URI_SAFE_ATTR" in e ? p(
544
- $(ft),
544
+ $(mt),
545
545
  // eslint-disable-line indent
546
546
  e.ADD_URI_SAFE_ATTR,
547
547
  // eslint-disable-line indent
548
548
  C
549
549
  // eslint-disable-line indent
550
- ) : ft, dt = "ADD_DATA_URI_TAGS" in e ? p(
550
+ ) : mt, dt = "ADD_DATA_URI_TAGS" in e ? p(
551
551
  $(ut),
552
552
  // eslint-disable-line indent
553
553
  e.ADD_DATA_URI_TAGS,
554
554
  // eslint-disable-line indent
555
555
  C
556
556
  // eslint-disable-line indent
557
- ) : ut, J = "FORBID_CONTENTS" in e ? p({}, e.FORBID_CONTENTS, C) : ct, re = "FORBID_TAGS" in e ? p({}, e.FORBID_TAGS, C) : {}, Ne = "FORBID_ATTR" in e ? p({}, e.FORBID_ATTR, C) : {}, Q = "USE_PROFILES" in e ? e.USE_PROFILES : !1, it = e.ALLOW_ARIA_ATTR !== !1, xe = e.ALLOW_DATA_ATTR !== !1, at = e.ALLOW_UNKNOWN_PROTOCOLS || !1, rt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Z = e.SAFE_FOR_TEMPLATES || !1, q = e.WHOLE_DOCUMENT || !1, K = e.RETURN_DOM || !1, he = e.RETURN_DOM_FRAGMENT || !1, ge = e.RETURN_TRUSTED_TYPE || !1, Oe = e.FORCE_BODY || !1, st = e.SANITIZE_DOM !== !1, lt = e.SANITIZE_NAMED_PROPS || !1, Ie = e.KEEP_CONTENT !== !1, se = e.IN_PLACE || !1, tt = e.ALLOWED_URI_REGEXP || Ve, ee = e.NAMESPACE || H, w = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && mt(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (w.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && mt(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (w.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Z && (xe = !1), he && (K = !0), Q && (v = p({}, Ye), S = [], Q.html === !0 && (p(v, qe), p(S, je)), Q.svg === !0 && (p(v, Te), p(S, we), p(S, fe)), Q.svgFilters === !0 && (p(v, Ae), p(S, we), p(S, fe)), Q.mathMl === !0 && (p(v, _e), p(S, Xe), p(S, fe))), e.ADD_TAGS && (v === nt && (v = $(v)), p(v, e.ADD_TAGS, C)), e.ADD_ATTR && (S === ot && (S = $(S)), p(S, e.ADD_ATTR, C)), e.ADD_URI_SAFE_ATTR && p(Pe, e.ADD_URI_SAFE_ATTR, C), e.FORBID_CONTENTS && (J === ct && (J = $(J)), p(J, e.FORBID_CONTENTS, C)), Ie && (v["#text"] = !0), q && p(v, ["html", "head", "body"]), v.table && (p(v, ["tbody"]), delete re.tbody), e.TRUSTED_TYPES_POLICY) {
557
+ ) : ut, J = "FORBID_CONTENTS" in e ? p({}, e.FORBID_CONTENTS, C) : ct, re = "FORBID_TAGS" in e ? p({}, e.FORBID_TAGS, C) : {}, Ne = "FORBID_ATTR" in e ? p({}, e.FORBID_ATTR, C) : {}, Q = "USE_PROFILES" in e ? e.USE_PROFILES : !1, it = e.ALLOW_ARIA_ATTR !== !1, xe = e.ALLOW_DATA_ATTR !== !1, at = e.ALLOW_UNKNOWN_PROTOCOLS || !1, rt = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Z = e.SAFE_FOR_TEMPLATES || !1, q = e.WHOLE_DOCUMENT || !1, K = e.RETURN_DOM || !1, he = e.RETURN_DOM_FRAGMENT || !1, ge = e.RETURN_TRUSTED_TYPE || !1, Oe = e.FORCE_BODY || !1, st = e.SANITIZE_DOM !== !1, lt = e.SANITIZE_NAMED_PROPS || !1, Ie = e.KEEP_CONTENT !== !1, se = e.IN_PLACE || !1, tt = e.ALLOWED_URI_REGEXP || Ve, ee = e.NAMESPACE || H, w = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && ft(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (w.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && ft(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (w.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (w.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Z && (xe = !1), he && (K = !0), Q && (v = p({}, Ye), S = [], Q.html === !0 && (p(v, qe), p(S, je)), Q.svg === !0 && (p(v, Te), p(S, we), p(S, me)), Q.svgFilters === !0 && (p(v, Ae), p(S, we), p(S, me)), Q.mathMl === !0 && (p(v, _e), p(S, Xe), p(S, me))), e.ADD_TAGS && (v === nt && (v = $(v)), p(v, e.ADD_TAGS, C)), e.ADD_ATTR && (S === ot && (S = $(S)), p(S, e.ADD_ATTR, C)), e.ADD_URI_SAFE_ATTR && p(Pe, e.ADD_URI_SAFE_ATTR, C), e.FORBID_CONTENTS && (J === ct && (J = $(J)), p(J, e.FORBID_CONTENTS, C)), Ie && (v["#text"] = !0), q && p(v, ["html", "head", "body"]), v.table && (p(v, ["tbody"]), delete re.tbody), e.TRUSTED_TYPES_POLICY) {
558
558
  if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function")
559
559
  throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
560
560
  if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function")
561
561
  throw ie('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
562
562
  M = e.TRUSTED_TYPES_POLICY, ae = M.createHTML("");
563
563
  } else
564
- M === void 0 && (M = Yt(me, k)), M !== null && typeof ae == "string" && (ae = M.createHTML(""));
564
+ M === void 0 && (M = Yt(fe, k)), M !== null && typeof ae == "string" && (ae = M.createHTML(""));
565
565
  i && i(e), te = e;
566
566
  }
567
- }, pt = p({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = p({}, ["foreignobject", "desc", "title", "annotation-xml"]), mn = p({}, ["title", "style", "font", "a", "script"]), gt = p({}, [...Te, ...Ae, ...Pt]), bt = p({}, [..._e, ...Ut]), pn = function(e) {
567
+ }, pt = p({}, ["mi", "mo", "mn", "ms", "mtext"]), ht = p({}, ["foreignobject", "desc", "title", "annotation-xml"]), fn = p({}, ["title", "style", "font", "a", "script"]), gt = p({}, [...Te, ...Ae, ...Pt]), yt = p({}, [..._e, ...Ut]), pn = function(e) {
568
568
  let n = Ce(e);
569
569
  (!n || !n.tagName) && (n = {
570
570
  namespaceURI: ee,
571
571
  tagName: "template"
572
572
  });
573
573
  const r = X(e.tagName), A = X(n.tagName);
574
- return ze[e.namespaceURI] ? e.namespaceURI === ye ? n.namespaceURI === H ? r === "svg" : n.namespaceURI === be ? r === "svg" && (A === "annotation-xml" || pt[A]) : !!gt[r] : e.namespaceURI === be ? n.namespaceURI === H ? r === "math" : n.namespaceURI === ye ? r === "math" && ht[A] : !!bt[r] : e.namespaceURI === H ? n.namespaceURI === ye && !ht[A] || n.namespaceURI === be && !pt[A] ? !1 : !bt[r] && (mn[r] || !gt[r]) : !!(le === "application/xhtml+xml" && ze[e.namespaceURI]) : !1;
574
+ return ze[e.namespaceURI] ? e.namespaceURI === be ? n.namespaceURI === H ? r === "svg" : n.namespaceURI === ye ? r === "svg" && (A === "annotation-xml" || pt[A]) : !!gt[r] : e.namespaceURI === ye ? n.namespaceURI === H ? r === "math" : n.namespaceURI === be ? r === "math" && ht[A] : !!yt[r] : e.namespaceURI === H ? n.namespaceURI === be && !ht[A] || n.namespaceURI === ye && !pt[A] ? !1 : !yt[r] && (fn[r] || !gt[r]) : !!(le === "application/xhtml+xml" && ze[e.namespaceURI]) : !1;
575
575
  }, Y = function(e) {
576
576
  G(c.removed, {
577
577
  element: e
@@ -604,7 +604,7 @@ var Nt = { exports: {} };
604
604
  n.setAttribute(e, "");
605
605
  } catch {
606
606
  }
607
- }, yt = function(e) {
607
+ }, bt = function(e) {
608
608
  let n = null, r = null;
609
609
  if (Oe)
610
610
  e = "<remove></remove>" + e;
@@ -627,7 +627,7 @@ var Nt = { exports: {} };
627
627
  }
628
628
  }
629
629
  const L = n.body || n.documentElement;
630
- return e && r && L.insertBefore(y.createTextNode(r), L.childNodes[0] || null), ee === H ? nn.call(n, q ? "html" : "body")[0] : q ? n.documentElement : L;
630
+ return e && r && L.insertBefore(b.createTextNode(r), L.childNodes[0] || null), ee === H ? nn.call(n, q ? "html" : "body")[0] : q ? n.documentElement : L;
631
631
  }, Et = function(e) {
632
632
  return en.call(
633
633
  e.ownerDocument || e,
@@ -673,7 +673,7 @@ var Nt = { exports: {} };
673
673
  element: e.cloneNode()
674
674
  }), e.textContent = n)), B("afterSanitizeElements", e, null), !1);
675
675
  }, _t = function(e, n, r) {
676
- if (st && (n === "id" || n === "name") && (r in y || r in fn))
676
+ if (st && (n === "id" || n === "name") && (r in b || r in mn))
677
677
  return !1;
678
678
  if (!(xe && !Ne[n] && O(an, n))) {
679
679
  if (!(it && O(rn, n))) {
@@ -734,8 +734,8 @@ var Nt = { exports: {} };
734
734
  });
735
735
  const St = C(e.nodeName);
736
736
  if (_t(St, ce, D)) {
737
- if (lt && (ce === "id" || ce === "name") && (He(R, e), D = ln + D), M && typeof me == "object" && typeof me.getAttributeType == "function" && !x)
738
- switch (me.getAttributeType(St, ce)) {
737
+ if (lt && (ce === "id" || ce === "name") && (He(R, e), D = ln + D), M && typeof fe == "object" && typeof fe.getAttributeType == "function" && !x)
738
+ switch (fe.getAttributeType(St, ce)) {
739
739
  case "TrustedHTML": {
740
740
  D = M.createHTML(D);
741
741
  break;
@@ -776,12 +776,12 @@ var Nt = { exports: {} };
776
776
  throw ie("root node is forbidden and cannot be sanitized in-place");
777
777
  }
778
778
  } else if (d instanceof ve)
779
- n = yt("<!---->"), r = n.ownerDocument.importNode(d, !0), r.nodeType === 1 && r.nodeName === "BODY" || r.nodeName === "HTML" ? n = r : n.appendChild(r);
779
+ n = bt("<!---->"), r = n.ownerDocument.importNode(d, !0), r.nodeType === 1 && r.nodeName === "BODY" || r.nodeName === "HTML" ? n = r : n.appendChild(r);
780
780
  else {
781
781
  if (!K && !Z && !q && // eslint-disable-next-line unicorn/prefer-includes
782
782
  d.indexOf("<") === -1)
783
783
  return M && ge ? M.createHTML(d) : d;
784
- if (n = yt(d), !n)
784
+ if (n = bt(d), !n)
785
785
  return K ? null : ge ? ae : "";
786
786
  }
787
787
  n && Oe && Y(n.firstChild);
@@ -834,21 +834,21 @@ Ge.addHook("afterSanitizeAttributes", function(t) {
834
834
  const Bn = class {
835
835
  constructor(t) {
836
836
  ne(this, t), this.htmlElement = document.createElement("html"), this.setBody = (o) => {
837
- var m;
837
+ var f;
838
838
  this.state = "loading", this.styles = [], this.hoistedFontURLs = /* @__PURE__ */ new Map(), this.sanitizedBody = "", document.querySelectorAll(".nylas-view-email-font").forEach((a) => {
839
839
  a.remove();
840
- }), (this.message ? yn(this.message) : En(o)) || (o = `<html><body>${Tn(o)}</body></html>`), this.htmlElement.innerHTML = o, this.detectDarkMode && zn(this.htmlElement), this.htmlElement.querySelectorAll("link").forEach((a) => {
840
+ }), (this.message ? bn(this.message) : En(o)) || (o = `<html><body>${Tn(o)}</body></html>`), this.htmlElement.innerHTML = o, this.detectDarkMode && zn(this.htmlElement), this.htmlElement.querySelectorAll("link").forEach((a) => {
841
841
  if (console.debug(`[nylas-view-email] Hoisting link: ${a.getAttribute("href")}`), a.getAttribute("rel") === "stylesheet" && a.getAttribute("href")) {
842
- const f = a.getAttribute("href");
843
- if (f) {
844
- const i = new URL(f, window.location.href);
842
+ const m = a.getAttribute("href");
843
+ if (m) {
844
+ const i = new URL(m, window.location.href);
845
845
  (i.protocol === "https:" || i.protocol === "http:") && this.hoistedFontURLs.set(i.href, i.href);
846
846
  }
847
847
  }
848
848
  }), this.htmlElement.querySelectorAll("style").forEach((a) => {
849
849
  a.innerHTML.split(`
850
- `).forEach((f) => {
851
- const i = f.match(/@import url\((.*)\)/);
850
+ `).forEach((m) => {
851
+ const i = m.match(/@import url\((.*)\)/);
852
852
  if (i) {
853
853
  const l = new URL(i[1], window.location.href);
854
854
  (l.protocol === "https:" || l.protocol === "http:") && this.hoistedFontURLs.set(l.href, l.href);
@@ -860,25 +860,25 @@ const Bn = class {
860
860
  const s = this.htmlElement.querySelector(".gmail_quote");
861
861
  if (s) {
862
862
  const a = document.createElement("button");
863
- a.classList.add("nylas-view-email-toggle-button"), a.setAttribute("aria-label", "Show quoted text"), a.innerText = "...", (m = s.parentElement) == null || m.insertBefore(a, s);
863
+ a.classList.add("nylas-view-email-toggle-button"), a.setAttribute("aria-label", "Show quoted text"), a.innerText = "...", (f = s.parentElement) == null || f.insertBefore(a, s);
864
864
  }
865
- this.sanitizedBody = Ge.sanitize(this.htmlElement.innerHTML), this.hoistedFontURLs.forEach((a, f) => {
865
+ this.sanitizedBody = Ge.sanitize(this.htmlElement.innerHTML), this.hoistedFontURLs.forEach((a, m) => {
866
866
  const i = document.createElement("link");
867
867
  i.setAttribute("rel", "stylesheet"), i.setAttribute("href", a), i.classList.add("nylas-view-email-font"), document.head.appendChild(i);
868
868
  }), this.state = "ready";
869
869
  }, this.handleMobileSize = () => {
870
- var u, s, m, a;
870
+ var u, s, f, a;
871
871
  const o = Math.max(document.documentElement.clientWidth || 0, window.innerWidth || 0);
872
872
  if (o <= 768) {
873
- const f = (u = this.viewEmailElement) == null ? void 0 : u.getBoundingClientRect();
874
- if (f && this.viewEmailElement && this.parent && f.width > o) {
873
+ const m = (u = this.viewEmailElement) == null ? void 0 : u.getBoundingClientRect();
874
+ if (m && this.viewEmailElement && this.parent && m.width > o) {
875
875
  const i = this.parent, l = i == null ? void 0 : i.getBoundingClientRect();
876
876
  T("Parent width:", l == null ? void 0 : l.width, "Parent height:", l == null ? void 0 : l.height), T("Parent client width:", i.clientWidth, "Parent client height:", i.clientHeight);
877
- const E = l.width / f.width, _ = l.height / f.height, N = Math.min(E, _);
878
- T("Scale:", N), this.viewEmailElement.style.setProperty("transform", `scale(${N})`), this.viewEmailElement.style.setProperty("transform-origin", "top left"), this.viewEmailElement.style.setProperty("height", `${f.height * N}px`);
877
+ const E = l.width / m.width, _ = l.height / m.height, N = Math.min(E, _);
878
+ T("Scale:", N), this.viewEmailElement.style.setProperty("transform", `scale(${N})`), this.viewEmailElement.style.setProperty("transform-origin", "top left"), this.viewEmailElement.style.setProperty("height", `${m.height * N}px`);
879
879
  }
880
880
  } else
881
- (s = this.viewEmailElement) == null || s.style.removeProperty("transform"), (m = this.viewEmailElement) == null || m.style.removeProperty("transform-origin"), (a = this.viewEmailElement) == null || a.style.removeProperty("height");
881
+ (s = this.viewEmailElement) == null || s.style.removeProperty("transform"), (f = this.viewEmailElement) == null || f.style.removeProperty("transform-origin"), (a = this.viewEmailElement) == null || a.style.removeProperty("height");
882
882
  }, this.message = void 0, this.parent = void 0, this.attachments = [], this.detectDarkMode = !0, this.state = "loading", this.sanitizedBody = "", this.styles = [], this.viewEmailElement = void 0, this.hoistedFontURLs = /* @__PURE__ */ new Map();
883
883
  }
884
884
  connectedCallback() {
@@ -907,14 +907,14 @@ const Bn = class {
907
907
  const t = (o = this.viewEmailElement) == null ? void 0 : o.querySelectorAll(".nylas-view-email-toggle-button");
908
908
  t && t.forEach((u) => {
909
909
  u.addEventListener("click", () => {
910
- var m;
911
- const s = (m = this.viewEmailElement) == null ? void 0 : m.querySelector(".gmail_quote");
910
+ var f;
911
+ const s = (f = this.viewEmailElement) == null ? void 0 : f.querySelector(".gmail_quote");
912
912
  s && s.classList.toggle("show");
913
913
  });
914
914
  });
915
915
  }
916
916
  render() {
917
- return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "c32409cd5bf30781d0d400103e9715bf48e13b23" }, this.state === "loading" && g("div", null, "Loading..."), this.state === "ready" && g(bn, null, this.styles.map((t) => g("style", null, Ge.sanitize(t.innerHTML))), g("div", { class: "view-email", part: "view-email", innerHTML: this.sanitizedBody, ref: (t) => this.viewEmailElement = t })));
917
+ return console.debug("[nylas-view-email] render", { hoistedFontURLs: this.hoistedFontURLs }), g($e, { key: "4fe5de7068b18d3566e049d2b068e2a568e8d849" }, this.state === "loading" && g("div", null, "Loading..."), this.state === "ready" && g(yn, null, this.styles.map((t) => g("style", null, Ge.sanitize(t.innerHTML))), g("div", { class: "view-email", part: "view-email", innerHTML: this.sanitizedBody, ref: (t) => this.viewEmailElement = t })));
918
918
  }
919
919
  get host() {
920
920
  return Rt(this);
@@ -932,7 +932,7 @@ const Wn = ".sc-reply-all-icon-h{display:flex}", Gn = Wn, $n = class {
932
932
  ne(this, t), this.width = "15", this.height = "15";
933
933
  }
934
934
  render() {
935
- return g("svg", { key: "90b30777b0de1b9622f557cb54af3397458b1599", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "4a7b8ec38ab7e5ed3d78d9b7c1c9730e94be8a45", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
935
+ return g("svg", { key: "b8ecda42e9fee4ee178dba36bf798a6a0404424d", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "94ea534065e92c1e70cbe5d29b3f2afc2c1597a5", d: "m1030.975 188 81.249 81.249-429.228 429.228h300.747c516.223 0 936.257 420.034 936.257 936.257v98.028h-114.92v-98.028c0-452.901-368.436-821.337-821.337-821.337H682.996l429.228 429.229-81.25 81.248-567.936-567.937L1030.975 188Zm-463.038.011 81.249 81.25-486.688 486.688 486.688 486.688-81.249 81.249L0 755.949 567.937 188.01Z", "fill-rule": "evenodd" }));
936
936
  }
937
937
  };
938
938
  $n.style = Gn;
@@ -941,7 +941,7 @@ const qn = ".sc-reply-icon-h{display:flex}", Yn = qn, jn = class {
941
941
  ne(this, t), this.width = "15", this.height = "15";
942
942
  }
943
943
  render() {
944
- return g("svg", { key: "d3fe83055b3bb9b88f5347f3bb5d8cec29354dce", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "c2082dfa35e4bb43d4e0489243b47b4d08ff34ac", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
944
+ return g("svg", { key: "7bd2f7db7c28d9eacd86fea8287078d3a5572a64", fill: "auto", width: this.width, height: this.height, viewBox: "0 0 1920 1920", xmlns: "http://www.w3.org/2000/svg" }, g("path", { key: "c9ed6c5cb89c0f3c7a9417ae4875b2c9dd6b60ce", d: "M835.942 632.563H244.966l478.08-478.08-90.496-90.496L-.026 696.563 632.55 1329.14l90.496-90.496-478.08-478.08h590.976c504.448 0 914.816 410.368 914.816 914.816v109.184h128V1675.38c0-574.976-467.84-1042.816-1042.816-1042.816", "fill-rule": "evenodd" }));
945
945
  }
946
946
  };
947
947
  jn.style = Yn;