@nylas/react 1.0.1-prealpha1 → 1.0.2-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 (69) hide show
  1. package/dist/{add-circle-icon.entry-c5fdaa6f.cjs → add-circle-icon.entry-2ccb238b.cjs} +1 -1
  2. package/dist/{add-circle-icon.entry-4b8debfa.js → add-circle-icon.entry-35d6aa07.js} +1 -1
  3. package/dist/{archive-icon_7.entry-baecb43c.cjs → archive-icon_7.entry-84d70dbf.cjs} +1 -1
  4. package/dist/{archive-icon_7.entry-9f3eca2c.js → archive-icon_7.entry-91aaa1aa.js} +1 -1
  5. package/dist/{arrow-icon.entry-9ab0c414.cjs → arrow-icon.entry-400a08fa.cjs} +1 -1
  6. package/dist/{arrow-icon.entry-a3b36218.js → arrow-icon.entry-8b2e96a6.js} +1 -1
  7. package/dist/{bold-icon_3.entry-b0d81839.js → bold-icon_3.entry-4b2798a8.js} +1 -1
  8. package/dist/{bold-icon_3.entry-50406bc7.cjs → bold-icon_3.entry-9ad35153.cjs} +1 -1
  9. package/dist/{calendar-cancel-icon.entry-0d07e33c.js → calendar-cancel-icon.entry-83ba884a.js} +1 -1
  10. package/dist/{calendar-cancel-icon.entry-8f498984.cjs → calendar-cancel-icon.entry-fcb66929.cjs} +1 -1
  11. package/dist/{calendar-check-icon_3.entry-cfb612c6.js → calendar-check-icon_3.entry-903e2d82.js} +1 -1
  12. package/dist/{calendar-check-icon_3.entry-5415e916.cjs → calendar-check-icon_3.entry-a16ce05e.cjs} +1 -1
  13. package/dist/{calendar-icon.entry-219efd7a.cjs → calendar-icon.entry-7bae38d7.cjs} +1 -1
  14. package/dist/{calendar-icon.entry-e5f20598.js → calendar-icon.entry-8f38af4a.js} +1 -1
  15. package/dist/{chevron-icon.entry-3c709061.cjs → chevron-icon.entry-58366662.cjs} +1 -1
  16. package/dist/{chevron-icon.entry-f5d5d1b1.js → chevron-icon.entry-5e11cef5.js} +1 -1
  17. package/dist/{close-icon_2.entry-eca351c4.js → close-icon_2.entry-011d9cf4.js} +1 -1
  18. package/dist/{close-icon_2.entry-fa4f6d3e.cjs → close-icon_2.entry-83088b9a.cjs} +1 -1
  19. package/dist/{document-refresh-icon.entry-3a29a6e6.cjs → document-refresh-icon.entry-071ffd66.cjs} +1 -1
  20. package/dist/{document-refresh-icon.entry-89ad42fa.js → document-refresh-icon.entry-9083a2e9.js} +1 -1
  21. package/dist/{forward-icon_6.entry-ce725f05.cjs → forward-icon_6.entry-3345af84.cjs} +1 -1
  22. package/dist/{forward-icon_6.entry-0a6dff18.js → forward-icon_6.entry-b60fcb35.js} +2 -2
  23. package/dist/{globe-icon.entry-a0c9599a.cjs → globe-icon.entry-8325e73e.cjs} +1 -1
  24. package/dist/{globe-icon.entry-71414bc6.js → globe-icon.entry-e3fd373f.js} +1 -1
  25. package/dist/{index-586a4206.cjs → index-3b6f5cd5.cjs} +1 -1
  26. package/dist/{index-98d3a4da.js → index-630f4e87.js} +28 -28
  27. package/dist/{index-b30d446a-e0eaccad.js → index-b30d446a-a90f84b2.js} +1 -1
  28. package/dist/{index-b30d446a-3d69a3cc.cjs → index-b30d446a-cbbef925.cjs} +1 -1
  29. package/dist/{loading-icon.entry-15debb7d.js → loading-icon.entry-27410cf8.js} +1 -1
  30. package/dist/{loading-icon.entry-d2680046.cjs → loading-icon.entry-b2096d2b.cjs} +1 -1
  31. package/dist/{mailbox-store-19f0c6c9-9a3ef58a.cjs → mailbox-store-19f0c6c9-a0cbfa97.cjs} +1 -1
  32. package/dist/{mailbox-store-19f0c6c9-23a4e72f.js → mailbox-store-19f0c6c9-e3e8b4e5.js} +1 -1
  33. package/dist/{nylas-booked-event-card_10.entry-f2481a57.js → nylas-booked-event-card_10.entry-7e66a648.js} +3 -3
  34. package/dist/{nylas-booked-event-card_10.entry-27efa654.cjs → nylas-booked-event-card_10.entry-ed515326.cjs} +2 -2
  35. package/dist/{nylas-if-state_3.entry-6c0bf8eb.cjs → nylas-if-state_3.entry-504be976.cjs} +1 -1
  36. package/dist/{nylas-if-state_3.entry-d805d4c6.js → nylas-if-state_3.entry-e96d01f1.js} +4 -4
  37. package/dist/{nylas-list-folders.entry-cc04a07e.cjs → nylas-list-folders.entry-866361cc.cjs} +1 -1
  38. package/dist/{nylas-list-folders.entry-472bd255.js → nylas-list-folders.entry-a5437201.js} +2 -2
  39. package/dist/{nylas-list-threads.entry-795c5a2b.cjs → nylas-list-threads.entry-04989295.cjs} +1 -1
  40. package/dist/{nylas-list-threads.entry-f3266bf7.js → nylas-list-threads.entry-fd6cda61.js} +2 -2
  41. package/dist/{nylas-mailbox-pagination.entry-bd0d3bda.js → nylas-mailbox-pagination.entry-988214bc.js} +2 -2
  42. package/dist/{nylas-mailbox-pagination.entry-f701fd83.cjs → nylas-mailbox-pagination.entry-e0bd4aef.cjs} +1 -1
  43. package/dist/{nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs → nylas-mailbox-toolbar-button.entry-3d772b26.cjs} +1 -1
  44. package/dist/{nylas-mailbox-toolbar-button.entry-9641b5cd.js → nylas-mailbox-toolbar-button.entry-c720e22a.js} +2 -2
  45. package/dist/{nylas-open-hours-picker.entry-42942946.js → nylas-open-hours-picker.entry-6bdc7c73.js} +1 -1
  46. package/dist/{nylas-open-hours-picker.entry-aa103daf.cjs → nylas-open-hours-picker.entry-881b6db7.cjs} +1 -1
  47. package/dist/{nylas-provider.entry-b94198a1.js → nylas-provider.entry-70721009.js} +4 -4
  48. package/dist/{nylas-provider.entry-5bb55b2d.cjs → nylas-provider.entry-8d9a844b.cjs} +1 -1
  49. package/dist/{nylas-scheduler.entry-3b7cb841.js → nylas-scheduler.entry-7321e18f.js} +3 -3
  50. package/dist/{nylas-scheduler.entry-ea6fb146.cjs → nylas-scheduler.entry-e82977fb.cjs} +1 -1
  51. package/dist/{nylas-threads-refresh.entry-4002608b.cjs → nylas-threads-refresh.entry-477e68e4.cjs} +1 -1
  52. package/dist/{nylas-threads-refresh.entry-7d567ed1.js → nylas-threads-refresh.entry-b7f9e93f.js} +2 -2
  53. package/dist/{nylas-threads-search.entry-c881d54b.js → nylas-threads-search.entry-95afea9c.js} +2 -2
  54. package/dist/{nylas-threads-search.entry-556f1219.cjs → nylas-threads-search.entry-c5854641.cjs} +1 -1
  55. package/dist/{nylas-view-thread.entry-d8de6c83.js → nylas-view-thread.entry-165173b1.js} +2 -2
  56. package/dist/{nylas-view-thread.entry-6faf1b51.cjs → nylas-view-thread.entry-8b72cbdb.cjs} +1 -1
  57. package/dist/{play-icon_2.entry-cae94826.js → play-icon_2.entry-ed5877e3.js} +1 -1
  58. package/dist/{play-icon_2.entry-2e21b8b9.cjs → play-icon_2.entry-f23ed6c1.cjs} +1 -1
  59. package/dist/react.cjs +1 -1
  60. package/dist/react.js +1 -1
  61. package/dist/{refresh-icon.entry-3e0aef26.cjs → refresh-icon.entry-601cac89.cjs} +1 -1
  62. package/dist/{refresh-icon.entry-9563850b.js → refresh-icon.entry-e48a338f.js} +1 -1
  63. package/dist/{register-component-152c6ad2-b0d34c36.cjs → register-component-152c6ad2-0df7215b.cjs} +1 -1
  64. package/dist/{register-component-152c6ad2-418db864.js → register-component-152c6ad2-a06f58c2.js} +1 -1
  65. package/dist/{scheduler-store-7d48e682-39104219.js → scheduler-store-7d48e682-0c0c3991.js} +1 -1
  66. package/dist/{scheduler-store-7d48e682-449277d4.cjs → scheduler-store-7d48e682-674705ef.cjs} +1 -1
  67. package/dist/{search-icon_3.entry-e36548ec.js → search-icon_3.entry-292138c3.js} +1 -1
  68. package/dist/{search-icon_3.entry-9b027cfc.cjs → search-icon_3.entry-8e555357.cjs} +1 -1
  69. package/package.json +1 -1
@@ -1,4 +1,4 @@
1
- "use strict";var un=Object.defineProperty;var dn=(e,t,s)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ve=(e,t,s)=>(dn(e,typeof t!="symbol"?t+"":t,s),s);const N=require("react");require("react-dom");function fn(){var e=[];if(typeof window<"u"){var t=window;(!t.customElements||t.Element&&(!t.Element.prototype.closest||!t.Element.prototype.matches||!t.Element.prototype.remove||!t.Element.prototype.getRootNode))&&e.push(Promise.resolve().then(()=>require("./dom-68f08be9.cjs")));var s=function(){try{var r=new URL("b","http://a");return r.pathname="c%20d",r.href==="http://a/c%20d"&&r.searchParams}catch{return!1}};(typeof Object.assign!="function"||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||t.NodeList&&!t.NodeList.prototype.forEach||!t.fetch||!s()||typeof WeakMap>"u")&&e.push(Promise.resolve().then(()=>require("./core-js-38e53e34.cjs")))}return Promise.all(e)}const hn="nylas-web-elements";let se,Pe,L=!1,Ee=null,Se=!1;const M=(e,t="")=>()=>{},pn=(e,t)=>()=>{},$n="{visibility:hidden}.hydrated{visibility:inherit}",ht="slot-fb{display:contents}slot-fb[hidden]{display:none}",tt={},gn="http://www.w3.org/2000/svg",yn="http://www.w3.org/1999/xhtml",vn=e=>e!=null,Te=e=>(e=typeof e,e==="object"||e==="function");function pt(e){var t,s,r;return(r=(s=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||s===void 0?void 0:s.getAttribute("content"))!==null&&r!==void 0?r:void 0}const _e=(e,t,...s)=>{let r=null,o=null,l=!1,a=!1;const u=[],c=$=>{for(let p=0;p<$.length;p++)r=$[p],Array.isArray(r)?c(r):r!=null&&typeof r!="boolean"&&((l=typeof e!="function"&&!Te(r))&&(r=String(r)),l&&a?u[u.length-1].$text$+=r:u.push(l?oe(null,r):r),a=l)};if(c(s),t){t.key&&(o=t.key);{const $=t.className||t.class;$&&(t.class=typeof $!="object"?$:Object.keys($).filter(p=>$[p]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,u,bn);const f=oe(e,null);return f.$attrs$=t,u.length>0&&(f.$children$=u),f.$key$=o,f},oe=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s},$t={},mn=e=>e&&e.$tag$===$t,bn={forEach:(e,t)=>e.map(nt).forEach(t),map:(e,t)=>e.map(nt).map(t).map(En)},nt=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),En=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),_e(e.vtag,s,...e.vchildren||[])}const t=oe(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Sn=(e,t)=>e!=null&&!Te(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,gt=e=>q(e).$hostElement$,wn=(e,t,s)=>{const r=gt(e);return{emit:o=>yt(r,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:o})}},yt=(e,t,s)=>{const r=x.ce(t,s);return e.dispatchEvent(r),r},rt=new WeakMap,Cn=(e,t,s)=>{let r=ie.get(e);Vn&&s?(r=r||new CSSStyleSheet,typeof r=="string"?r=t:r.replaceSync(t)):r=t,ie.set(e,r)},kn=(e,t,s)=>{var r;const o=vt(t),l=ie.get(o);if(e=e.nodeType===11?e:A,l)if(typeof l=="string"){e=e.head||e;let a=rt.get(e),u;if(a||rt.set(e,a=new Set),!a.has(o)){{u=A.createElement("style"),u.innerHTML=l;const c=(r=x.$nonce$)!==null&&r!==void 0?r:pt(A);c!=null&&u.setAttribute("nonce",c),e.insertBefore(u,e.querySelector("link"))}t.$flags$&4&&(u.innerHTML+=ht),a&&a.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o},Pn=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,r=t.$flags$,o=M("attachStyles",t.$tagName$),l=kn(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);r&10&&(s["s-sc"]=l,s.classList.add(l+"-h"),r&2&&s.classList.add(l+"-s")),o()},vt=(e,t)=>"sc-"+e.$tagName$,st=(e,t,s,r,o,l)=>{if(s!==r){let a=lt(e,t),u=t.toLowerCase();if(t==="class"){const c=e.classList,f=ot(s),$=ot(r);c.remove(...f.filter(p=>p&&!$.includes(p))),c.add(...$.filter(p=>p&&!f.includes(p)))}else if(t==="style"){for(const c in s)(!r||r[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in r)(!s||r[c]!==s[c])&&(c.includes("-")?e.style.setProperty(c,r[c]):e.style[c]=r[c])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!a&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):lt(Q,u)?t=u.slice(2):t=u[2]+t.slice(3),s||r){const c=t.endsWith(mt);t=t.replace(_n,""),s&&x.rel(e,t,s,c),r&&x.ael(e,t,r,c)}}else{const c=Te(r);if((a||c&&r!==null)&&!o)try{if(e.tagName.includes("-"))e[t]=r;else{const f=r??"";t==="list"?a=!1:(s==null||e[t]!=f)&&(e[t]=f)}}catch{}r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!a||l&4||o)&&!c&&(r=r===!0?"":r,e.setAttribute(t,r))}}},Tn=/\s/,ot=e=>e?e.split(Tn):[],mt="Capture",_n=new RegExp(mt+"$"),bt=(e,t,s,r)=>{const o=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,l=e&&e.$attrs$||tt,a=t.$attrs$||tt;for(r in l)r in a||st(o,r,l[r],void 0,s,t.$flags$);for(r in a)st(o,r,l[r],a[r],s,t.$flags$)},ae=(e,t,s,r)=>{const o=t.$children$[s];let l=0,a,u;if(o.$text$!==null)a=o.$elm$=A.createTextNode(o.$text$);else{if(L||(L=o.$tag$==="svg"),a=o.$elm$=A.createElementNS(L?gn:yn,o.$tag$),L&&o.$tag$==="foreignObject"&&(L=!1),bt(null,o,L),vn(se)&&a["s-si"]!==se&&a.classList.add(a["s-si"]=se),o.$children$)for(l=0;l<o.$children$.length;++l)u=ae(e,o,l),u&&a.appendChild(u);o.$tag$==="svg"?L=!1:a.tagName==="foreignObject"&&(L=!0)}return a["s-hn"]=Pe,a},Et=(e,t,s,r,o,l)=>{let a=e,u;for(a.shadowRoot&&a.tagName===Pe&&(a=a.shadowRoot);o<=l;++o)r[o]&&(u=ae(null,s,o),u&&(r[o].$elm$=u,a.insertBefore(u,t)))},St=(e,t,s)=>{for(let r=t;r<=s;++r){const o=e[r];if(o){const l=o.$elm$;wt(o),l&&l.remove()}}},Rn=(e,t,s,r,o=!1)=>{let l=0,a=0,u=0,c=0,f=t.length-1,$=t[0],p=t[f],S=r.length-1,b=r[0],k=r[S],P,T;for(;l<=f&&a<=S;)if($==null)$=t[++l];else if(p==null)p=t[--f];else if(b==null)b=r[++a];else if(k==null)k=r[--S];else if(re($,b,o))z($,b,o),$=t[++l],b=r[++a];else if(re(p,k,o))z(p,k,o),p=t[--f],k=r[--S];else if(re($,k,o))z($,k,o),e.insertBefore($.$elm$,p.$elm$.nextSibling),$=t[++l],k=r[--S];else if(re(p,b,o))z(p,b,o),e.insertBefore(p.$elm$,$.$elm$),p=t[--f],b=r[++a];else{for(u=-1,c=l;c<=f;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===b.$key$){u=c;break}u>=0?(T=t[u],T.$tag$!==b.$tag$?P=ae(t&&t[a],s,u):(z(T,b,o),t[u]=void 0,P=T.$elm$),b=r[++a]):(P=ae(t&&t[a],s,a),b=r[++a]),P&&$.$elm$.parentNode.insertBefore(P,$.$elm$)}l>f?Et(e,r[S+1]==null?null:r[S+1].$elm$,s,r,a,S):a>S&&St(t,l,f)},re=(e,t,s=!1)=>e.$tag$===t.$tag$?s?!0:e.$key$===t.$key$:!1,z=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,o=e.$children$,l=t.$children$,a=t.$tag$,u=t.$text$;u===null?(L=a==="svg"?!0:a==="foreignObject"?!1:L,a==="slot"||bt(e,t,L),o!==null&&l!==null?Rn(r,o,t,l,s):l!==null?(e.$text$!==null&&(r.textContent=""),Et(r,null,t,l,0,l.length-1)):o!==null&&St(o,0,o.length-1),L&&a==="svg"&&(L=!1)):e.$text$!==u&&(r.data=u)},wt=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(wt)},In=(e,t,s=!1)=>{const r=e.$hostElement$,o=e.$vnode$||oe(null,null),l=mn(t)?t:_e(null,null,t);if(Pe=r.tagName,s&&l.$attrs$)for(const a of Object.keys(l.$attrs$))r.hasAttribute(a)&&!["key","ref","style","class"].includes(a)&&(l.$attrs$[a]=r[a]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=o.$elm$=r.shadowRoot||r,se=r["s-sc"],z(o,l,s)},Ct=(e,t)=>{t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},le=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Ct(e,e.$ancestorComponent$),tr(()=>xn(e,t))},xn=(e,t)=>{const s=M("scheduleUpdate",e.$cmpMeta$.$tagName$),r=e.$lazyInstance$;let o;return t&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([l,a])=>Y(r,l,a)),e.$queuedListeners$=void 0),o=Y(r,"componentWillLoad")),o=at(o,()=>Y(r,"componentWillRender")),s(),at(o,()=>Ln(e,r,t))},at=(e,t)=>On(e)?e.then(t):t(),On=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",Ln=async(e,t,s)=>{var r;const o=e.$hostElement$,l=M("update",e.$cmpMeta$.$tagName$),a=o["s-rc"];s&&Pn(e);const u=M("render",e.$cmpMeta$.$tagName$);An(e,t,o,s),a&&(a.map(c=>c()),o["s-rc"]=void 0),u(),l();{const c=(r=o["s-p"])!==null&&r!==void 0?r:[],f=()=>Nn(e);c.length===0?f():(Promise.all(c).then(f),e.$flags$|=4,c.length=0)}},An=(e,t,s,r)=>{try{Ee=t,t=t.render(),e.$flags$&=-17,e.$flags$|=2,In(e,t,r)}catch(o){v(o,e.$hostElement$)}return Ee=null,null},jn=()=>Ee,Nn=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,r=M("postUpdate",t),o=e.$lazyInstance$,l=e.$ancestorComponent$;e.$flags$&64?r():(e.$flags$|=64,Pt(s),Y(o,"componentDidLoad"),r(),e.$onReadyResolve$(s),l||kt()),e.$onInstanceResolve$(s),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Ie(()=>le(e,!1)),e.$flags$&=-517},Dn=e=>{{const t=q(e),s=t.$hostElement$.isConnected;return s&&(t.$flags$&18)===2&&le(t,!1),s}},kt=e=>{Pt(A.documentElement),Ie(()=>yt(Q,"appload",{detail:{namespace:hn}}))},Y=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(r){v(r)}},Pt=e=>e.classList.add("hydrated"),Fn=(e,t)=>q(e).$instanceValues$.get(t),Mn=(e,t,s,r)=>{const o=q(e),l=o.$hostElement$,a=o.$instanceValues$.get(t),u=o.$flags$,c=o.$lazyInstance$;s=Sn(s,r.$members$[t][0]);const f=Number.isNaN(a)&&Number.isNaN(s),$=s!==a&&!f;if((!(u&8)||a===void 0)&&$&&(o.$instanceValues$.set(t,s),c)){if(r.$watchers$&&u&128){const p=r.$watchers$[t];p&&p.map(S=>{try{c[S](s,a,t)}catch(b){v(b,l)}})}(u&18)===2&&le(o,!1)}},Tt=(e,t,s)=>{var r;const o=e.prototype;if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const l=Object.entries(t.$members$);if(l.map(([a,[u]])=>{u&31||s&2&&u&32?Object.defineProperty(o,a,{get(){return Fn(this,a)},set(c){Mn(this,a,c,t)},configurable:!0,enumerable:!0}):s&1&&u&64&&Object.defineProperty(o,a,{value(...c){var f;const $=q(this);return(f=$==null?void 0:$.$onInstancePromise$)===null||f===void 0?void 0:f.then(()=>{var p;return(p=$.$lazyInstance$)===null||p===void 0?void 0:p[a](...c)})}})}),s&1){const a=new Map;o.attributeChangedCallback=function(u,c,f){x.jmp(()=>{var $;const p=a.get(u);if(this.hasOwnProperty(p))f=this[p],delete this[p];else{if(o.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==f)return;if(p==null){const S=q(this),b=S==null?void 0:S.$flags$;if(b&&!(b&8)&&b&128&&f!==c){const k=S.$lazyInstance$,P=($=t.$watchers$)===null||$===void 0?void 0:$[u];P==null||P.forEach(T=>{k[T]!=null&&k[T].call(k,f,c,u)})}return}}this[p]=f===null&&typeof this[p]=="boolean"?!1:f})},e.observedAttributes=Array.from(new Set([...Object.keys((r=t.$watchers$)!==null&&r!==void 0?r:{}),...l.filter(([u,c])=>c[0]&15).map(([u,c])=>{const f=c[1]||u;return a.set(f,u),f})]))}}return e},qn=async(e,t,s,r)=>{let o;if(!(t.$flags$&32)){t.$flags$|=32;{if(o=Kn(s),o.then){const c=pn();o=await o,c()}o.isProxied||(s.$watchers$=o.watchers,Tt(o,s,2),o.isProxied=!0);const u=M("createInstance",s.$tagName$);t.$flags$|=8;try{new o(t)}catch(c){v(c)}t.$flags$&=-9,t.$flags$|=128,u(),we(t.$lazyInstance$)}if(o.style){let u=o.style;const c=vt(s);if(!ie.has(c)){const f=M("registerStyles",s.$tagName$);Cn(c,u,!!(s.$flags$&1)),f()}}}const l=t.$ancestorComponent$,a=()=>le(t,!0);l&&l["s-rc"]?l["s-rc"].push(a):a()},we=e=>{Y(e,"connectedCallback")},Un=e=>{if(!(x.$flags$&1)){const t=q(e),s=t.$cmpMeta$,r=M("connectedCallback",s.$tagName$);if(t.$flags$&1)_t(e,t,s.$listeners$),t!=null&&t.$lazyInstance$?we(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>we(t.$lazyInstance$));else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Ct(t,t.$ancestorComponent$=o);break}}s.$members$&&Object.entries(s.$members$).map(([o,[l]])=>{if(l&31&&e.hasOwnProperty(o)){const a=e[o];delete e[o],e[o]=a}}),qn(e,t,s)}r()}},it=e=>{Y(e,"disconnectedCallback")},Bn=async e=>{if(!(x.$flags$&1)){const t=q(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0),t!=null&&t.$lazyInstance$?it(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>it(t.$lazyInstance$))}},Hn=(e,t={})=>{var s;const r=M(),o=[],l=t.exclude||[],a=Q.customElements,u=A.head,c=u.querySelector("meta[charset]"),f=A.createElement("style"),$=[];let p,S=!0;Object.assign(x,t),x.$resourcesUrl$=new URL(t.resourcesUrl||"./",A.baseURI).href;let b=!1;if(e.map(k=>{k[1].map(P=>{var T;const R={$flags$:P[0],$tagName$:P[1],$members$:P[2],$listeners$:P[3]};R.$flags$&4&&(b=!0),R.$members$=P[2],R.$listeners$=P[3],R.$watchers$=(T=P[4])!==null&&T!==void 0?T:{};const C=R.$tagName$,ce=class extends HTMLElement{constructor(B){super(B),B=this,Xn(B,R),R.$flags$&1&&B.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),S?$.push(this):x.jmp(()=>Un(this))}disconnectedCallback(){x.jmp(()=>Bn(this))}componentOnReady(){return q(this).$onReadyPromise$}};R.$lazyBundleId$=k[0],!l.includes(C)&&!a.get(C)&&(o.push(C),a.define(C,Tt(ce,R,1)))})}),b&&(f.innerHTML+=ht),f.innerHTML+=o+$n,f.innerHTML.length){f.setAttribute("data-styles","");const k=(s=x.$nonce$)!==null&&s!==void 0?s:pt(A);k!=null&&f.setAttribute("nonce",k),u.insertBefore(f,c?c.nextSibling:u.firstChild)}S=!1,$.length?$.map(k=>k.connectedCallback()):x.jmp(()=>p=setTimeout(kt,30)),r()},Wn=(e,t)=>t,_t=(e,t,s,r)=>{s&&s.map(([o,l,a])=>{const u=Yn(e,o),c=zn(t,a),f=Gn(o);x.ael(u,l,c,f),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>x.rel(u,l,c,f))})},zn=(e,t)=>s=>{try{e.$flags$&256?e.$lazyInstance$[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s])}catch(r){v(r)}},Yn=(e,t)=>t&4?A:t&8?Q:t&16?A.body:e,Gn=e=>Qn?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,Re=new WeakMap,q=e=>Re.get(e),Jn=(e,t)=>Re.set(t.$lazyInstance$=e,t),Xn=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return s.$onInstancePromise$=new Promise(r=>s.$onInstanceResolve$=r),s.$onReadyPromise$=new Promise(r=>s.$onReadyResolve$=r),e["s-p"]=[],e["s-rc"]=[],_t(e,s,t.$listeners$),Re.set(e,s)},lt=(e,t)=>t in e,v=(e,t)=>(0,console.error)(e,t),me=new Map,Kn=(e,t,s)=>{const r=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$,l=me.get(o);if(l)return l[r];if(!s||!BUILD.hotModuleReplacement){const a=u=>(me.set(o,u),u[r]);switch(o){case"nylas-if-state_3":return Promise.resolve().then(()=>require("./nylas-if-state_3.entry-6c0bf8eb.cjs")).then(a,v);case"document-refresh-icon":return Promise.resolve().then(()=>require("./document-refresh-icon.entry-3a29a6e6.cjs")).then(a,v);case"nylas-list-folders":return Promise.resolve().then(()=>require("./nylas-list-folders.entry-cc04a07e.cjs")).then(a,v);case"nylas-list-threads":return Promise.resolve().then(()=>require("./nylas-list-threads.entry-795c5a2b.cjs")).then(a,v);case"nylas-mailbox-pagination":return Promise.resolve().then(()=>require("./nylas-mailbox-pagination.entry-f701fd83.cjs")).then(a,v);case"nylas-mailbox-toolbar-button":return Promise.resolve().then(()=>require("./nylas-mailbox-toolbar-button.entry-b9d6a3c8.cjs")).then(a,v);case"nylas-open-hours-picker":return Promise.resolve().then(()=>require("./nylas-open-hours-picker.entry-aa103daf.cjs")).then(a,v);case"nylas-provider":return Promise.resolve().then(()=>require("./nylas-provider.entry-5bb55b2d.cjs")).then(a,v);case"nylas-scheduler":return Promise.resolve().then(()=>require("./nylas-scheduler.entry-ea6fb146.cjs")).then(a,v);case"nylas-threads-refresh":return Promise.resolve().then(()=>require("./nylas-threads-refresh.entry-4002608b.cjs")).then(a,v);case"nylas-threads-search":return Promise.resolve().then(()=>require("./nylas-threads-search.entry-556f1219.cjs")).then(a,v);case"nylas-view-thread":return Promise.resolve().then(()=>require("./nylas-view-thread.entry-6faf1b51.cjs")).then(a,v);case"archive-icon_7":return Promise.resolve().then(()=>require("./archive-icon_7.entry-baecb43c.cjs")).then(a,v);case"arrow-icon":return Promise.resolve().then(()=>require("./arrow-icon.entry-9ab0c414.cjs")).then(a,v);case"forward-icon_6":return Promise.resolve().then(()=>require("./forward-icon_6.entry-ce725f05.cjs")).then(a,v);case"nylas-booked-event-card_10":return Promise.resolve().then(()=>require("./nylas-booked-event-card_10.entry-27efa654.cjs")).then(a,v);case"add-circle-icon":return Promise.resolve().then(()=>require("./add-circle-icon.entry-c5fdaa6f.cjs")).then(a,v);case"bold-icon_3":return Promise.resolve().then(()=>require("./bold-icon_3.entry-50406bc7.cjs")).then(a,v);case"calendar-check-icon_3":return Promise.resolve().then(()=>require("./calendar-check-icon_3.entry-5415e916.cjs")).then(a,v);case"calendar-icon":return Promise.resolve().then(()=>require("./calendar-icon.entry-219efd7a.cjs")).then(a,v);case"close-icon_2":return Promise.resolve().then(()=>require("./close-icon_2.entry-fa4f6d3e.cjs")).then(a,v);case"play-icon_2":return Promise.resolve().then(()=>require("./play-icon_2.entry-2e21b8b9.cjs")).then(a,v);case"refresh-icon":return Promise.resolve().then(()=>require("./refresh-icon.entry-3e0aef26.cjs")).then(a,v);case"search-icon_3":return Promise.resolve().then(()=>require("./search-icon_3.entry-9b027cfc.cjs")).then(a,v);case"calendar-cancel-icon":return Promise.resolve().then(()=>require("./calendar-cancel-icon.entry-8f498984.cjs")).then(a,v);case"globe-icon":return Promise.resolve().then(()=>require("./globe-icon.entry-a0c9599a.cjs")).then(a,v);case"loading-icon":return Promise.resolve().then(()=>require("./loading-icon.entry-d2680046.cjs")).then(a,v);case"chevron-icon":return Promise.resolve().then(()=>require("./chevron-icon.entry-3c709061.cjs")).then(a,v)}}return import(`./${o}.entry.js`).then(a=>(me.set(o,a),a[r]),v)},ie=new Map,Q=typeof window<"u"?window:{},A=Q.document||{head:{}},x={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Qn=(()=>{let e=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Zn=e=>Promise.resolve(e),Vn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),ct=[],Rt=[],er=(e,t)=>s=>{e.push(s),Se||(Se=!0,t&&x.$flags$&4?Ie(Ce):x.raf(Ce))},ut=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){v(s)}e.length=0},Ce=()=>{ut(ct),ut(Rt),(Se=ct.length>0)&&x.raf(Ce)},Ie=e=>Zn().then(e),tr=er(Rt,!0);async function nr(){await Promise.resolve().then(()=>require("./elements-dc5b338e-81a0319c.cjs"))}const rr=nr,sr=(e,t)=>{if(!(typeof window>"u"))return rr(),Hn([["nylas-scheduler",[[1,"nylas-scheduler",{mode:[1],defaultSchedulerStoreState:[16],sessionId:[1,"session-id"],schedulerApiUrl:[1,"scheduler-api-url"],bookingInfo:[16],rescheduleBookingId:[1,"reschedule-booking-id"],cancelBookingId:[1,"cancel-booking-id"],eventOverrides:[16],isLoading:[4,"is-loading"],themeConfig:[16],showNotification:[4,"show-notification"],automaticComponentRegistration:[32],selectedDateLabel:[32],getNylasSchedulerStore:[64],getNylasSchedulerConnector:[64],getRef:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"monthChanged","monthChangedHandler"],[0,"detailsConfirmed","bookButtonClickedHandler"],[0,"dateSelected","dateSelectedHandler"],[0,"cancelBookedEventError","cancelBookedEventErrorHandler"],[0,"rescheduleBookedEventError","rescheduleBookedEventErrorHandler"]],{bookingInfo:["bookingInfoChanged"]}]]],["nylas-view-thread",[[1,"nylas-view-thread",{draft:[16],thread:[16],messages:[16],attachments:[16],state:[32],internalMessages:[32],showAllEmails:[32],showComposer:[32]},null,{thread:["threadChanged"],messages:["updateInternalMessages"]}]]],["nylas-list-folders",[[1,"nylas-list-folders",{folders:[16],selectedFolder:[1,"selected-folder"],defaultFolders:[32],otherFolders:[32]},null,{folders:["watchFolders"]}]]],["nylas-mailbox-pagination",[[1,"nylas-mailbox-pagination",{state:[1],hasNextPage:[4,"has-next-page"],hasPreviousPage:[4,"has-previous-page"],scrollTarget:[1,"scroll-target"],mobileOnlyInfiniteScroll:[4,"mobile-only-infinite-scroll"],mobileViewPortWidth:[2,"mobile-view-port-width"],nextPage:[64],previousPage:[64]},[[9,"scroll","handlePageScroll"]]]]],["nylas-threads-refresh",[[1,"nylas-threads-refresh",{start:[32],state:[32],pulling:[32],updateState:[64]}]]],["nylas-if-state_3",[[1,"nylas-if-state",{state:[1],isStateSet:[4,"is-state-set"],isBoolean:[4,"is-boolean"],getStore:[16],transition:[1],show:[32],classes:[32]},null,{getStore:["onGetStoreChange"]}],[1,"nylas-login",{isAuthenticated:[4,"is-authenticated"],nylasConnector:[16],scopes:[16],loginMethod:[1,"login-method"],companyName:[1,"company-name"],logoUrl:[1,"logo-url"],logoWidth:[1,"logo-width"],providers:[1],buttonText:[1,"button-text"],email:[32]}],[1,"nylas-mailbox",{automaticComponentRegistration:[4,"automatic-component-registration"],eventOverrides:[16],authConfig:[16],defaultAuthStoreState:[16],defaultMailboxStoreState:[16],getMailboxStore:[64],getAuthStore:[64],getNylasAuth:[64],getNylasMailboxConnector:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["document-refresh-icon",[[2,"document-refresh-icon",{width:[1],height:[1]}]]],["nylas-list-threads",[[1,"nylas-list-threads",{threads:[16],isAuthenticated:[4,"is-authenticated"],tokenInfo:[16],state:[1],showCheckbox:[4,"show-checkbox"]}]]],["nylas-mailbox-toolbar-button",[[1,"nylas-mailbox-toolbar-button",{method:[1],dataState:[1,"data-state"],iconOnly:[4,"icon-only"],mailboxConnector:[16]}]]],["nylas-open-hours-picker",[[1,"nylas-open-hours-picker",{openHours:[16],startTime:[1040],endTime:[1040],stepMinutes:[2,"step-minutes"],dragThreshold:[2,"drag-threshold"],mobileViewPortWidth:[2,"mobile-view-port-width"],intervalMinutes:[32],times:[32],availableTimes:[32],draggingStartDate:[32],draggingEndDate:[32],inverse:[32],isMobile:[32]},[[9,"resize","onResize"]],{openHours:["whenOpenHoursChanged"],availableTimes:["availableTimesChanged"],inverse:["inverseChanged"]}]]],["nylas-provider",[[1,"nylas-provider",{authConfig:[16],eventOverrides:[16],automaticComponentRegistration:[4,"automatic-component-registration"],getNylasAuth:[64],getNylasConnector:[64],getMailboxStore:[64],getAuthStore:[64],getNylasSchedulerStore:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["nylas-threads-search",[[1,"nylas-threads-search",{query:[1],internalQuery:[32]},null,{query:["onQueryChange"]}]]],["arrow-icon",[[2,"arrow-icon",{width:[1],height:[1]}]]],["add-circle-icon",[[2,"add-circle-icon",{width:[1],height:[1]}]]],["calendar-icon",[[2,"calendar-icon",{width:[1],height:[1]}]]],["refresh-icon",[[2,"refresh-icon",{width:[1],height:[1]}]]],["calendar-cancel-icon",[[2,"calendar-cancel-icon",{width:[1],height:[1]}]]],["close-icon_2",[[2,"close-icon",{width:[1],height:[1]}],[2,"warning-icon",{width:[1],height:[1]}]]],["play-icon_2",[[2,"play-icon",{width:[1],height:[1]}],[2,"stop-icon",{width:[1],height:[1]}]]],["globe-icon",[[2,"globe-icon",{width:[1],height:[1]}]]],["loading-icon",[[1,"loading-icon",{width:[1],height:[1]}]]],["bold-icon_3",[[2,"bold-icon",{width:[1],height:[1]}],[2,"italic-icon",{width:[1],height:[1]}],[2,"underline-icon",{width:[1],height:[1]}]]],["forward-icon_6",[[1,"nylas-composer",{message:[16],viewEmailElement:[16]},null,{message:["watchBody"]}],[1,"nylas-summarize-message-button",{message:[16],state:[32],updateState:[64],playAudio:[64]}],[2,"forward-icon",{width:[1],height:[1]}],[1,"nylas-view-email",{message:[16],parent:[16],attachments:[16],detectDarkMode:[4,"detect-dark-mode"],state:[32],sanitizedBody:[32],styles:[32],viewEmailElement:[32],hoistedFontURLs:[32]},[[9,"resize","handleScroll"]],{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}],[2,"reply-all-icon",{width:[1],height:[1]}],[2,"reply-icon",{width:[1],height:[1]}]]],["calendar-check-icon_3",[[2,"calendar-check-icon",{width:[1],height:[1]}],[2,"checkmark-circle-icon",{width:[1],height:[1]}],[2,"people-icon",{width:[1],height:[1]}]]],["chevron-icon",[[2,"chevron-icon",{width:[1],height:[1]}]]],["search-icon_3",[[1,"select-dropdown",{name:[1],options:[16],defaultSelectedOption:[16],selectedOption:[32],isOpen:[32],searchValue:[32],filteredOptions:[32],ariaActivedescendant:[32]},[[4,"click","handleOutsideClick"]]],[2,"translate-icon",{width:[1],height:[1]}],[2,"search-icon",{width:[1],height:[1]}]]],["archive-icon_7",[[2,"archive-icon",{width:[1],height:[1]}],[2,"folder-icon",{width:[1],height:[1]}],[2,"inbox-icon",{width:[1],height:[1]}],[2,"sent-icon",{width:[1],height:[1]}],[2,"spam-icon",{width:[1],height:[1]}],[2,"star-icon",{width:[1],height:[1]}],[2,"trash-icon",{width:[1],height:[1]}]]],["nylas-booked-event-card_10",[[1,"nylas-locale-switch",{selectedTimezone:[1025,"selected-timezone"],selectedLanguage:[1025,"selected-language"]},[[0,"selectedOptionChanged","selectedOptionChangedHandler"]]],[1,"nylas-booked-event-card",{eventInfo:[16],bookingFlow:[1,"booking-flow"],bookingInfo:[8,"booking-info"]}],[1,"nylas-booking-form",{isLoading:[4,"is-loading"],bookingInfo:[8,"booking-info"],eventInfo:[16],name:[32],email:[32],guestEmails:[32],guestEmailErrors:[32],isNameValid:[32],isEmailValid:[32],validationError:[32]},null,{bookingInfo:["bookingInfoChangedHandler"]}],[1,"nylas-notification",{ttl:[2],allowedCategories:[16],notifications:[32]},[[16,"nylasSchedulerError","onError"],[16,"nylasSchedulerWarning","onWarning"],[16,"nylasSchedulerInfo","onInfo"],[16,"nylasSchedulerSuccess","onSuccess"]]],[1,"nylas-selected-event-card",{selectedDate:[16],selectedTimeslot:[16],selectedTimezone:[1,"selected-timezone"],startTime:[32],endTime:[32]},null,{selectedTimeslot:["handleSelectedTimeslotChange"]}],[1,"nylas-cancel-booking-form",{cancelBookingId:[1,"cancel-booking-id"],cancellationReason:[32],cancellationError:[32]}],[1,"nylas-cancelled-event-card",{cancelledEvent:[16]}],[1,"nylas-date-picker",{selectableDates:[16],selectedDate:[16],isLoading:[4,"is-loading"],month:[32],dates:[32]}],[2,"nylas-logo",{width:[1],height:[1]}],[1,"nylas-timeslot-picker",{selectedDate:[16],availability:[16],selectedTimeslot:[16],isLoading:[4,"loading-state"],selectedTimezone:[1,"selected-timezone"],times:[32],hoveredTimeslotIndex:[32],selectedTimeslotIndex:[32]},null,{selectedDate:["selectedDateChanged"],availability:["availabilityChanged"]}]]]],t)};(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}})();var ke={exports:{}},X={};/**
1
+ "use strict";var un=Object.defineProperty;var dn=(e,t,s)=>t in e?un(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var ve=(e,t,s)=>(dn(e,typeof t!="symbol"?t+"":t,s),s);const N=require("react");require("react-dom");function fn(){var e=[];if(typeof window<"u"){var t=window;(!t.customElements||t.Element&&(!t.Element.prototype.closest||!t.Element.prototype.matches||!t.Element.prototype.remove||!t.Element.prototype.getRootNode))&&e.push(Promise.resolve().then(()=>require("./dom-68f08be9.cjs")));var s=function(){try{var r=new URL("b","http://a");return r.pathname="c%20d",r.href==="http://a/c%20d"&&r.searchParams}catch{return!1}};(typeof Object.assign!="function"||!Object.entries||!Array.prototype.find||!Array.prototype.includes||!String.prototype.startsWith||!String.prototype.endsWith||t.NodeList&&!t.NodeList.prototype.forEach||!t.fetch||!s()||typeof WeakMap>"u")&&e.push(Promise.resolve().then(()=>require("./core-js-38e53e34.cjs")))}return Promise.all(e)}const hn="nylas-web-elements";let se,Pe,L=!1,Ee=null,Se=!1;const M=(e,t="")=>()=>{},pn=(e,t)=>()=>{},$n="{visibility:hidden}.hydrated{visibility:inherit}",ht="slot-fb{display:contents}slot-fb[hidden]{display:none}",tt={},gn="http://www.w3.org/2000/svg",yn="http://www.w3.org/1999/xhtml",vn=e=>e!=null,Te=e=>(e=typeof e,e==="object"||e==="function");function pt(e){var t,s,r;return(r=(s=(t=e.head)===null||t===void 0?void 0:t.querySelector('meta[name="csp-nonce"]'))===null||s===void 0?void 0:s.getAttribute("content"))!==null&&r!==void 0?r:void 0}const _e=(e,t,...s)=>{let r=null,o=null,l=!1,a=!1;const u=[],c=$=>{for(let p=0;p<$.length;p++)r=$[p],Array.isArray(r)?c(r):r!=null&&typeof r!="boolean"&&((l=typeof e!="function"&&!Te(r))&&(r=String(r)),l&&a?u[u.length-1].$text$+=r:u.push(l?oe(null,r):r),a=l)};if(c(s),t){t.key&&(o=t.key);{const $=t.className||t.class;$&&(t.class=typeof $!="object"?$:Object.keys($).filter(p=>$[p]).join(" "))}}if(typeof e=="function")return e(t===null?{}:t,u,bn);const f=oe(e,null);return f.$attrs$=t,u.length>0&&(f.$children$=u),f.$key$=o,f},oe=(e,t)=>{const s={$flags$:0,$tag$:e,$text$:t,$elm$:null,$children$:null};return s.$attrs$=null,s.$key$=null,s},$t={},mn=e=>e&&e.$tag$===$t,bn={forEach:(e,t)=>e.map(nt).forEach(t),map:(e,t)=>e.map(nt).map(t).map(En)},nt=e=>({vattrs:e.$attrs$,vchildren:e.$children$,vkey:e.$key$,vname:e.$name$,vtag:e.$tag$,vtext:e.$text$}),En=e=>{if(typeof e.vtag=="function"){const s=Object.assign({},e.vattrs);return e.vkey&&(s.key=e.vkey),e.vname&&(s.name=e.vname),_e(e.vtag,s,...e.vchildren||[])}const t=oe(e.vtag,e.vtext);return t.$attrs$=e.vattrs,t.$children$=e.vchildren,t.$key$=e.vkey,t.$name$=e.vname,t},Sn=(e,t)=>e!=null&&!Te(e)?t&4?e==="false"?!1:e===""||!!e:t&2?parseFloat(e):t&1?String(e):e:e,gt=e=>q(e).$hostElement$,wn=(e,t,s)=>{const r=gt(e);return{emit:o=>yt(r,t,{bubbles:!!(s&4),composed:!!(s&2),cancelable:!!(s&1),detail:o})}},yt=(e,t,s)=>{const r=x.ce(t,s);return e.dispatchEvent(r),r},rt=new WeakMap,Cn=(e,t,s)=>{let r=ie.get(e);Vn&&s?(r=r||new CSSStyleSheet,typeof r=="string"?r=t:r.replaceSync(t)):r=t,ie.set(e,r)},kn=(e,t,s)=>{var r;const o=vt(t),l=ie.get(o);if(e=e.nodeType===11?e:A,l)if(typeof l=="string"){e=e.head||e;let a=rt.get(e),u;if(a||rt.set(e,a=new Set),!a.has(o)){{u=A.createElement("style"),u.innerHTML=l;const c=(r=x.$nonce$)!==null&&r!==void 0?r:pt(A);c!=null&&u.setAttribute("nonce",c),e.insertBefore(u,e.querySelector("link"))}t.$flags$&4&&(u.innerHTML+=ht),a&&a.add(o)}}else e.adoptedStyleSheets.includes(l)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,l]);return o},Pn=e=>{const t=e.$cmpMeta$,s=e.$hostElement$,r=t.$flags$,o=M("attachStyles",t.$tagName$),l=kn(s.shadowRoot?s.shadowRoot:s.getRootNode(),t);r&10&&(s["s-sc"]=l,s.classList.add(l+"-h"),r&2&&s.classList.add(l+"-s")),o()},vt=(e,t)=>"sc-"+e.$tagName$,st=(e,t,s,r,o,l)=>{if(s!==r){let a=lt(e,t),u=t.toLowerCase();if(t==="class"){const c=e.classList,f=ot(s),$=ot(r);c.remove(...f.filter(p=>p&&!$.includes(p))),c.add(...$.filter(p=>p&&!f.includes(p)))}else if(t==="style"){for(const c in s)(!r||r[c]==null)&&(c.includes("-")?e.style.removeProperty(c):e.style[c]="");for(const c in r)(!s||r[c]!==s[c])&&(c.includes("-")?e.style.setProperty(c,r[c]):e.style[c]=r[c])}else if(t!=="key")if(t==="ref")r&&r(e);else if(!a&&t[0]==="o"&&t[1]==="n"){if(t[2]==="-"?t=t.slice(3):lt(Q,u)?t=u.slice(2):t=u[2]+t.slice(3),s||r){const c=t.endsWith(mt);t=t.replace(_n,""),s&&x.rel(e,t,s,c),r&&x.ael(e,t,r,c)}}else{const c=Te(r);if((a||c&&r!==null)&&!o)try{if(e.tagName.includes("-"))e[t]=r;else{const f=r??"";t==="list"?a=!1:(s==null||e[t]!=f)&&(e[t]=f)}}catch{}r==null||r===!1?(r!==!1||e.getAttribute(t)==="")&&e.removeAttribute(t):(!a||l&4||o)&&!c&&(r=r===!0?"":r,e.setAttribute(t,r))}}},Tn=/\s/,ot=e=>e?e.split(Tn):[],mt="Capture",_n=new RegExp(mt+"$"),bt=(e,t,s,r)=>{const o=t.$elm$.nodeType===11&&t.$elm$.host?t.$elm$.host:t.$elm$,l=e&&e.$attrs$||tt,a=t.$attrs$||tt;for(r in l)r in a||st(o,r,l[r],void 0,s,t.$flags$);for(r in a)st(o,r,l[r],a[r],s,t.$flags$)},ae=(e,t,s,r)=>{const o=t.$children$[s];let l=0,a,u;if(o.$text$!==null)a=o.$elm$=A.createTextNode(o.$text$);else{if(L||(L=o.$tag$==="svg"),a=o.$elm$=A.createElementNS(L?gn:yn,o.$tag$),L&&o.$tag$==="foreignObject"&&(L=!1),bt(null,o,L),vn(se)&&a["s-si"]!==se&&a.classList.add(a["s-si"]=se),o.$children$)for(l=0;l<o.$children$.length;++l)u=ae(e,o,l),u&&a.appendChild(u);o.$tag$==="svg"?L=!1:a.tagName==="foreignObject"&&(L=!0)}return a["s-hn"]=Pe,a},Et=(e,t,s,r,o,l)=>{let a=e,u;for(a.shadowRoot&&a.tagName===Pe&&(a=a.shadowRoot);o<=l;++o)r[o]&&(u=ae(null,s,o),u&&(r[o].$elm$=u,a.insertBefore(u,t)))},St=(e,t,s)=>{for(let r=t;r<=s;++r){const o=e[r];if(o){const l=o.$elm$;wt(o),l&&l.remove()}}},Rn=(e,t,s,r,o=!1)=>{let l=0,a=0,u=0,c=0,f=t.length-1,$=t[0],p=t[f],S=r.length-1,b=r[0],k=r[S],P,T;for(;l<=f&&a<=S;)if($==null)$=t[++l];else if(p==null)p=t[--f];else if(b==null)b=r[++a];else if(k==null)k=r[--S];else if(re($,b,o))z($,b,o),$=t[++l],b=r[++a];else if(re(p,k,o))z(p,k,o),p=t[--f],k=r[--S];else if(re($,k,o))z($,k,o),e.insertBefore($.$elm$,p.$elm$.nextSibling),$=t[++l],k=r[--S];else if(re(p,b,o))z(p,b,o),e.insertBefore(p.$elm$,$.$elm$),p=t[--f],b=r[++a];else{for(u=-1,c=l;c<=f;++c)if(t[c]&&t[c].$key$!==null&&t[c].$key$===b.$key$){u=c;break}u>=0?(T=t[u],T.$tag$!==b.$tag$?P=ae(t&&t[a],s,u):(z(T,b,o),t[u]=void 0,P=T.$elm$),b=r[++a]):(P=ae(t&&t[a],s,a),b=r[++a]),P&&$.$elm$.parentNode.insertBefore(P,$.$elm$)}l>f?Et(e,r[S+1]==null?null:r[S+1].$elm$,s,r,a,S):a>S&&St(t,l,f)},re=(e,t,s=!1)=>e.$tag$===t.$tag$?s?!0:e.$key$===t.$key$:!1,z=(e,t,s=!1)=>{const r=t.$elm$=e.$elm$,o=e.$children$,l=t.$children$,a=t.$tag$,u=t.$text$;u===null?(L=a==="svg"?!0:a==="foreignObject"?!1:L,a==="slot"||bt(e,t,L),o!==null&&l!==null?Rn(r,o,t,l,s):l!==null?(e.$text$!==null&&(r.textContent=""),Et(r,null,t,l,0,l.length-1)):o!==null&&St(o,0,o.length-1),L&&a==="svg"&&(L=!1)):e.$text$!==u&&(r.data=u)},wt=e=>{e.$attrs$&&e.$attrs$.ref&&e.$attrs$.ref(null),e.$children$&&e.$children$.map(wt)},In=(e,t,s=!1)=>{const r=e.$hostElement$,o=e.$vnode$||oe(null,null),l=mn(t)?t:_e(null,null,t);if(Pe=r.tagName,s&&l.$attrs$)for(const a of Object.keys(l.$attrs$))r.hasAttribute(a)&&!["key","ref","style","class"].includes(a)&&(l.$attrs$[a]=r[a]);l.$tag$=null,l.$flags$|=4,e.$vnode$=l,l.$elm$=o.$elm$=r.shadowRoot||r,se=r["s-sc"],z(o,l,s)},Ct=(e,t)=>{t&&!e.$onRenderResolve$&&t["s-p"]&&t["s-p"].push(new Promise(s=>e.$onRenderResolve$=s))},le=(e,t)=>{if(e.$flags$|=16,e.$flags$&4){e.$flags$|=512;return}return Ct(e,e.$ancestorComponent$),tr(()=>xn(e,t))},xn=(e,t)=>{const s=M("scheduleUpdate",e.$cmpMeta$.$tagName$),r=e.$lazyInstance$;let o;return t&&(e.$flags$|=256,e.$queuedListeners$&&(e.$queuedListeners$.map(([l,a])=>Y(r,l,a)),e.$queuedListeners$=void 0),o=Y(r,"componentWillLoad")),o=at(o,()=>Y(r,"componentWillRender")),s(),at(o,()=>Ln(e,r,t))},at=(e,t)=>On(e)?e.then(t):t(),On=e=>e instanceof Promise||e&&e.then&&typeof e.then=="function",Ln=async(e,t,s)=>{var r;const o=e.$hostElement$,l=M("update",e.$cmpMeta$.$tagName$),a=o["s-rc"];s&&Pn(e);const u=M("render",e.$cmpMeta$.$tagName$);An(e,t,o,s),a&&(a.map(c=>c()),o["s-rc"]=void 0),u(),l();{const c=(r=o["s-p"])!==null&&r!==void 0?r:[],f=()=>Nn(e);c.length===0?f():(Promise.all(c).then(f),e.$flags$|=4,c.length=0)}},An=(e,t,s,r)=>{try{Ee=t,t=t.render(),e.$flags$&=-17,e.$flags$|=2,In(e,t,r)}catch(o){v(o,e.$hostElement$)}return Ee=null,null},jn=()=>Ee,Nn=e=>{const t=e.$cmpMeta$.$tagName$,s=e.$hostElement$,r=M("postUpdate",t),o=e.$lazyInstance$,l=e.$ancestorComponent$;e.$flags$&64?r():(e.$flags$|=64,Pt(s),Y(o,"componentDidLoad"),r(),e.$onReadyResolve$(s),l||kt()),e.$onInstanceResolve$(s),e.$onRenderResolve$&&(e.$onRenderResolve$(),e.$onRenderResolve$=void 0),e.$flags$&512&&Ie(()=>le(e,!1)),e.$flags$&=-517},Dn=e=>{{const t=q(e),s=t.$hostElement$.isConnected;return s&&(t.$flags$&18)===2&&le(t,!1),s}},kt=e=>{Pt(A.documentElement),Ie(()=>yt(Q,"appload",{detail:{namespace:hn}}))},Y=(e,t,s)=>{if(e&&e[t])try{return e[t](s)}catch(r){v(r)}},Pt=e=>e.classList.add("hydrated"),Fn=(e,t)=>q(e).$instanceValues$.get(t),Mn=(e,t,s,r)=>{const o=q(e),l=o.$hostElement$,a=o.$instanceValues$.get(t),u=o.$flags$,c=o.$lazyInstance$;s=Sn(s,r.$members$[t][0]);const f=Number.isNaN(a)&&Number.isNaN(s),$=s!==a&&!f;if((!(u&8)||a===void 0)&&$&&(o.$instanceValues$.set(t,s),c)){if(r.$watchers$&&u&128){const p=r.$watchers$[t];p&&p.map(S=>{try{c[S](s,a,t)}catch(b){v(b,l)}})}(u&18)===2&&le(o,!1)}},Tt=(e,t,s)=>{var r;const o=e.prototype;if(t.$members$){e.watchers&&(t.$watchers$=e.watchers);const l=Object.entries(t.$members$);if(l.map(([a,[u]])=>{u&31||s&2&&u&32?Object.defineProperty(o,a,{get(){return Fn(this,a)},set(c){Mn(this,a,c,t)},configurable:!0,enumerable:!0}):s&1&&u&64&&Object.defineProperty(o,a,{value(...c){var f;const $=q(this);return(f=$==null?void 0:$.$onInstancePromise$)===null||f===void 0?void 0:f.then(()=>{var p;return(p=$.$lazyInstance$)===null||p===void 0?void 0:p[a](...c)})}})}),s&1){const a=new Map;o.attributeChangedCallback=function(u,c,f){x.jmp(()=>{var $;const p=a.get(u);if(this.hasOwnProperty(p))f=this[p],delete this[p];else{if(o.hasOwnProperty(p)&&typeof this[p]=="number"&&this[p]==f)return;if(p==null){const S=q(this),b=S==null?void 0:S.$flags$;if(b&&!(b&8)&&b&128&&f!==c){const k=S.$lazyInstance$,P=($=t.$watchers$)===null||$===void 0?void 0:$[u];P==null||P.forEach(T=>{k[T]!=null&&k[T].call(k,f,c,u)})}return}}this[p]=f===null&&typeof this[p]=="boolean"?!1:f})},e.observedAttributes=Array.from(new Set([...Object.keys((r=t.$watchers$)!==null&&r!==void 0?r:{}),...l.filter(([u,c])=>c[0]&15).map(([u,c])=>{const f=c[1]||u;return a.set(f,u),f})]))}}return e},qn=async(e,t,s,r)=>{let o;if(!(t.$flags$&32)){t.$flags$|=32;{if(o=Kn(s),o.then){const c=pn();o=await o,c()}o.isProxied||(s.$watchers$=o.watchers,Tt(o,s,2),o.isProxied=!0);const u=M("createInstance",s.$tagName$);t.$flags$|=8;try{new o(t)}catch(c){v(c)}t.$flags$&=-9,t.$flags$|=128,u(),we(t.$lazyInstance$)}if(o.style){let u=o.style;const c=vt(s);if(!ie.has(c)){const f=M("registerStyles",s.$tagName$);Cn(c,u,!!(s.$flags$&1)),f()}}}const l=t.$ancestorComponent$,a=()=>le(t,!0);l&&l["s-rc"]?l["s-rc"].push(a):a()},we=e=>{Y(e,"connectedCallback")},Un=e=>{if(!(x.$flags$&1)){const t=q(e),s=t.$cmpMeta$,r=M("connectedCallback",s.$tagName$);if(t.$flags$&1)_t(e,t,s.$listeners$),t!=null&&t.$lazyInstance$?we(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>we(t.$lazyInstance$));else{t.$flags$|=1;{let o=e;for(;o=o.parentNode||o.host;)if(o["s-p"]){Ct(t,t.$ancestorComponent$=o);break}}s.$members$&&Object.entries(s.$members$).map(([o,[l]])=>{if(l&31&&e.hasOwnProperty(o)){const a=e[o];delete e[o],e[o]=a}}),qn(e,t,s)}r()}},it=e=>{Y(e,"disconnectedCallback")},Bn=async e=>{if(!(x.$flags$&1)){const t=q(e);t.$rmListeners$&&(t.$rmListeners$.map(s=>s()),t.$rmListeners$=void 0),t!=null&&t.$lazyInstance$?it(t.$lazyInstance$):t!=null&&t.$onReadyPromise$&&t.$onReadyPromise$.then(()=>it(t.$lazyInstance$))}},Hn=(e,t={})=>{var s;const r=M(),o=[],l=t.exclude||[],a=Q.customElements,u=A.head,c=u.querySelector("meta[charset]"),f=A.createElement("style"),$=[];let p,S=!0;Object.assign(x,t),x.$resourcesUrl$=new URL(t.resourcesUrl||"./",A.baseURI).href;let b=!1;if(e.map(k=>{k[1].map(P=>{var T;const R={$flags$:P[0],$tagName$:P[1],$members$:P[2],$listeners$:P[3]};R.$flags$&4&&(b=!0),R.$members$=P[2],R.$listeners$=P[3],R.$watchers$=(T=P[4])!==null&&T!==void 0?T:{};const C=R.$tagName$,ce=class extends HTMLElement{constructor(B){super(B),B=this,Xn(B,R),R.$flags$&1&&B.attachShadow({mode:"open"})}connectedCallback(){p&&(clearTimeout(p),p=null),S?$.push(this):x.jmp(()=>Un(this))}disconnectedCallback(){x.jmp(()=>Bn(this))}componentOnReady(){return q(this).$onReadyPromise$}};R.$lazyBundleId$=k[0],!l.includes(C)&&!a.get(C)&&(o.push(C),a.define(C,Tt(ce,R,1)))})}),b&&(f.innerHTML+=ht),f.innerHTML+=o+$n,f.innerHTML.length){f.setAttribute("data-styles","");const k=(s=x.$nonce$)!==null&&s!==void 0?s:pt(A);k!=null&&f.setAttribute("nonce",k),u.insertBefore(f,c?c.nextSibling:u.firstChild)}S=!1,$.length?$.map(k=>k.connectedCallback()):x.jmp(()=>p=setTimeout(kt,30)),r()},Wn=(e,t)=>t,_t=(e,t,s,r)=>{s&&s.map(([o,l,a])=>{const u=Yn(e,o),c=zn(t,a),f=Gn(o);x.ael(u,l,c,f),(t.$rmListeners$=t.$rmListeners$||[]).push(()=>x.rel(u,l,c,f))})},zn=(e,t)=>s=>{try{e.$flags$&256?e.$lazyInstance$[t](s):(e.$queuedListeners$=e.$queuedListeners$||[]).push([t,s])}catch(r){v(r)}},Yn=(e,t)=>t&4?A:t&8?Q:t&16?A.body:e,Gn=e=>Qn?{passive:(e&1)!==0,capture:(e&2)!==0}:(e&2)!==0,Re=new WeakMap,q=e=>Re.get(e),Jn=(e,t)=>Re.set(t.$lazyInstance$=e,t),Xn=(e,t)=>{const s={$flags$:0,$hostElement$:e,$cmpMeta$:t,$instanceValues$:new Map};return s.$onInstancePromise$=new Promise(r=>s.$onInstanceResolve$=r),s.$onReadyPromise$=new Promise(r=>s.$onReadyResolve$=r),e["s-p"]=[],e["s-rc"]=[],_t(e,s,t.$listeners$),Re.set(e,s)},lt=(e,t)=>t in e,v=(e,t)=>(0,console.error)(e,t),me=new Map,Kn=(e,t,s)=>{const r=e.$tagName$.replace(/-/g,"_"),o=e.$lazyBundleId$,l=me.get(o);if(l)return l[r];if(!s||!BUILD.hotModuleReplacement){const a=u=>(me.set(o,u),u[r]);switch(o){case"nylas-if-state_3":return Promise.resolve().then(()=>require("./nylas-if-state_3.entry-504be976.cjs")).then(a,v);case"document-refresh-icon":return Promise.resolve().then(()=>require("./document-refresh-icon.entry-071ffd66.cjs")).then(a,v);case"nylas-list-folders":return Promise.resolve().then(()=>require("./nylas-list-folders.entry-866361cc.cjs")).then(a,v);case"nylas-list-threads":return Promise.resolve().then(()=>require("./nylas-list-threads.entry-04989295.cjs")).then(a,v);case"nylas-mailbox-pagination":return Promise.resolve().then(()=>require("./nylas-mailbox-pagination.entry-e0bd4aef.cjs")).then(a,v);case"nylas-mailbox-toolbar-button":return Promise.resolve().then(()=>require("./nylas-mailbox-toolbar-button.entry-3d772b26.cjs")).then(a,v);case"nylas-open-hours-picker":return Promise.resolve().then(()=>require("./nylas-open-hours-picker.entry-881b6db7.cjs")).then(a,v);case"nylas-provider":return Promise.resolve().then(()=>require("./nylas-provider.entry-8d9a844b.cjs")).then(a,v);case"nylas-scheduler":return Promise.resolve().then(()=>require("./nylas-scheduler.entry-e82977fb.cjs")).then(a,v);case"nylas-threads-refresh":return Promise.resolve().then(()=>require("./nylas-threads-refresh.entry-477e68e4.cjs")).then(a,v);case"nylas-threads-search":return Promise.resolve().then(()=>require("./nylas-threads-search.entry-c5854641.cjs")).then(a,v);case"nylas-view-thread":return Promise.resolve().then(()=>require("./nylas-view-thread.entry-8b72cbdb.cjs")).then(a,v);case"archive-icon_7":return Promise.resolve().then(()=>require("./archive-icon_7.entry-84d70dbf.cjs")).then(a,v);case"arrow-icon":return Promise.resolve().then(()=>require("./arrow-icon.entry-400a08fa.cjs")).then(a,v);case"forward-icon_6":return Promise.resolve().then(()=>require("./forward-icon_6.entry-3345af84.cjs")).then(a,v);case"nylas-booked-event-card_10":return Promise.resolve().then(()=>require("./nylas-booked-event-card_10.entry-ed515326.cjs")).then(a,v);case"add-circle-icon":return Promise.resolve().then(()=>require("./add-circle-icon.entry-2ccb238b.cjs")).then(a,v);case"bold-icon_3":return Promise.resolve().then(()=>require("./bold-icon_3.entry-9ad35153.cjs")).then(a,v);case"calendar-check-icon_3":return Promise.resolve().then(()=>require("./calendar-check-icon_3.entry-a16ce05e.cjs")).then(a,v);case"calendar-icon":return Promise.resolve().then(()=>require("./calendar-icon.entry-7bae38d7.cjs")).then(a,v);case"close-icon_2":return Promise.resolve().then(()=>require("./close-icon_2.entry-83088b9a.cjs")).then(a,v);case"play-icon_2":return Promise.resolve().then(()=>require("./play-icon_2.entry-f23ed6c1.cjs")).then(a,v);case"refresh-icon":return Promise.resolve().then(()=>require("./refresh-icon.entry-601cac89.cjs")).then(a,v);case"search-icon_3":return Promise.resolve().then(()=>require("./search-icon_3.entry-8e555357.cjs")).then(a,v);case"calendar-cancel-icon":return Promise.resolve().then(()=>require("./calendar-cancel-icon.entry-fcb66929.cjs")).then(a,v);case"globe-icon":return Promise.resolve().then(()=>require("./globe-icon.entry-8325e73e.cjs")).then(a,v);case"loading-icon":return Promise.resolve().then(()=>require("./loading-icon.entry-b2096d2b.cjs")).then(a,v);case"chevron-icon":return Promise.resolve().then(()=>require("./chevron-icon.entry-58366662.cjs")).then(a,v)}}return import(`./${o}.entry.js`).then(a=>(me.set(o,a),a[r]),v)},ie=new Map,Q=typeof window<"u"?window:{},A=Q.document||{head:{}},x={$flags$:0,$resourcesUrl$:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,s,r)=>e.addEventListener(t,s,r),rel:(e,t,s,r)=>e.removeEventListener(t,s,r),ce:(e,t)=>new CustomEvent(e,t)},Qn=(()=>{let e=!1;try{A.addEventListener("e",null,Object.defineProperty({},"passive",{get(){e=!0}}))}catch{}return e})(),Zn=e=>Promise.resolve(e),Vn=(()=>{try{return new CSSStyleSheet,typeof new CSSStyleSheet().replaceSync=="function"}catch{}return!1})(),ct=[],Rt=[],er=(e,t)=>s=>{e.push(s),Se||(Se=!0,t&&x.$flags$&4?Ie(Ce):x.raf(Ce))},ut=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(s){v(s)}e.length=0},Ce=()=>{ut(ct),ut(Rt),(Se=ct.length>0)&&x.raf(Ce)},Ie=e=>Zn().then(e),tr=er(Rt,!0);async function nr(){await Promise.resolve().then(()=>require("./elements-dc5b338e-81a0319c.cjs"))}const rr=nr,sr=(e,t)=>{if(!(typeof window>"u"))return rr(),Hn([["nylas-scheduler",[[1,"nylas-scheduler",{mode:[1],defaultSchedulerStoreState:[16],sessionId:[1,"session-id"],schedulerApiUrl:[1,"scheduler-api-url"],bookingInfo:[16],rescheduleBookingId:[1,"reschedule-booking-id"],cancelBookingId:[1,"cancel-booking-id"],eventOverrides:[16],isLoading:[4,"is-loading"],themeConfig:[16],showNotification:[4,"show-notification"],automaticComponentRegistration:[32],selectedDateLabel:[32],getNylasSchedulerStore:[64],getNylasSchedulerConnector:[64],getRef:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"],[0,"monthChanged","monthChangedHandler"],[0,"detailsConfirmed","bookButtonClickedHandler"],[0,"dateSelected","dateSelectedHandler"],[0,"cancelBookedEventError","cancelBookedEventErrorHandler"],[0,"rescheduleBookedEventError","rescheduleBookedEventErrorHandler"]],{bookingInfo:["bookingInfoChanged"]}]]],["nylas-view-thread",[[1,"nylas-view-thread",{draft:[16],thread:[16],messages:[16],attachments:[16],state:[32],internalMessages:[32],showAllEmails:[32],showComposer:[32]},null,{thread:["threadChanged"],messages:["updateInternalMessages"]}]]],["nylas-list-folders",[[1,"nylas-list-folders",{folders:[16],selectedFolder:[1,"selected-folder"],defaultFolders:[32],otherFolders:[32]},null,{folders:["watchFolders"]}]]],["nylas-mailbox-pagination",[[1,"nylas-mailbox-pagination",{state:[1],hasNextPage:[4,"has-next-page"],hasPreviousPage:[4,"has-previous-page"],scrollTarget:[1,"scroll-target"],mobileOnlyInfiniteScroll:[4,"mobile-only-infinite-scroll"],mobileViewPortWidth:[2,"mobile-view-port-width"],nextPage:[64],previousPage:[64]},[[9,"scroll","handlePageScroll"]]]]],["nylas-threads-refresh",[[1,"nylas-threads-refresh",{start:[32],state:[32],pulling:[32],updateState:[64]}]]],["nylas-if-state_3",[[1,"nylas-if-state",{state:[1],isStateSet:[4,"is-state-set"],isBoolean:[4,"is-boolean"],getStore:[16],transition:[1],show:[32],classes:[32]},null,{getStore:["onGetStoreChange"]}],[1,"nylas-login",{isAuthenticated:[4,"is-authenticated"],nylasConnector:[16],scopes:[16],loginMethod:[1,"login-method"],companyName:[1,"company-name"],logoUrl:[1,"logo-url"],logoWidth:[1,"logo-width"],providers:[1],buttonText:[1,"button-text"],email:[32]}],[1,"nylas-mailbox",{automaticComponentRegistration:[4,"automatic-component-registration"],eventOverrides:[16],authConfig:[16],defaultAuthStoreState:[16],defaultMailboxStoreState:[16],getMailboxStore:[64],getAuthStore:[64],getNylasAuth:[64],getNylasMailboxConnector:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["document-refresh-icon",[[2,"document-refresh-icon",{width:[1],height:[1]}]]],["nylas-list-threads",[[1,"nylas-list-threads",{threads:[16],isAuthenticated:[4,"is-authenticated"],tokenInfo:[16],state:[1],showCheckbox:[4,"show-checkbox"]}]]],["nylas-mailbox-toolbar-button",[[1,"nylas-mailbox-toolbar-button",{method:[1],dataState:[1,"data-state"],iconOnly:[4,"icon-only"],mailboxConnector:[16]}]]],["nylas-open-hours-picker",[[1,"nylas-open-hours-picker",{openHours:[16],startTime:[1040],endTime:[1040],stepMinutes:[2,"step-minutes"],dragThreshold:[2,"drag-threshold"],mobileViewPortWidth:[2,"mobile-view-port-width"],intervalMinutes:[32],times:[32],availableTimes:[32],draggingStartDate:[32],draggingEndDate:[32],inverse:[32],isMobile:[32]},[[9,"resize","onResize"]],{openHours:["whenOpenHoursChanged"],availableTimes:["availableTimesChanged"],inverse:["inverseChanged"]}]]],["nylas-provider",[[1,"nylas-provider",{authConfig:[16],eventOverrides:[16],automaticComponentRegistration:[4,"automatic-component-registration"],getNylasAuth:[64],getNylasConnector:[64],getMailboxStore:[64],getAuthStore:[64],getNylasSchedulerStore:[64]},[[0,"registerComponent","registerComponentHandler"],[0,"unregisterComponent","unregisterComponentHandler"]]]]],["nylas-threads-search",[[1,"nylas-threads-search",{query:[1],internalQuery:[32]},null,{query:["onQueryChange"]}]]],["arrow-icon",[[2,"arrow-icon",{width:[1],height:[1]}]]],["add-circle-icon",[[2,"add-circle-icon",{width:[1],height:[1]}]]],["calendar-icon",[[2,"calendar-icon",{width:[1],height:[1]}]]],["refresh-icon",[[2,"refresh-icon",{width:[1],height:[1]}]]],["calendar-cancel-icon",[[2,"calendar-cancel-icon",{width:[1],height:[1]}]]],["close-icon_2",[[2,"close-icon",{width:[1],height:[1]}],[2,"warning-icon",{width:[1],height:[1]}]]],["play-icon_2",[[2,"play-icon",{width:[1],height:[1]}],[2,"stop-icon",{width:[1],height:[1]}]]],["globe-icon",[[2,"globe-icon",{width:[1],height:[1]}]]],["loading-icon",[[1,"loading-icon",{width:[1],height:[1]}]]],["bold-icon_3",[[2,"bold-icon",{width:[1],height:[1]}],[2,"italic-icon",{width:[1],height:[1]}],[2,"underline-icon",{width:[1],height:[1]}]]],["forward-icon_6",[[1,"nylas-composer",{message:[16],viewEmailElement:[16]},null,{message:["watchBody"]}],[1,"nylas-summarize-message-button",{message:[16],state:[32],updateState:[64],playAudio:[64]}],[2,"forward-icon",{width:[1],height:[1]}],[1,"nylas-view-email",{message:[16],parent:[16],attachments:[16],detectDarkMode:[4,"detect-dark-mode"],state:[32],sanitizedBody:[32],styles:[32],viewEmailElement:[32],hoistedFontURLs:[32]},[[9,"resize","handleScroll"]],{message:["messageChanged"],viewEmailElement:["viewEmailElementChanged"]}],[2,"reply-all-icon",{width:[1],height:[1]}],[2,"reply-icon",{width:[1],height:[1]}]]],["calendar-check-icon_3",[[2,"calendar-check-icon",{width:[1],height:[1]}],[2,"checkmark-circle-icon",{width:[1],height:[1]}],[2,"people-icon",{width:[1],height:[1]}]]],["chevron-icon",[[2,"chevron-icon",{width:[1],height:[1]}]]],["search-icon_3",[[1,"select-dropdown",{name:[1],options:[16],defaultSelectedOption:[16],selectedOption:[32],isOpen:[32],searchValue:[32],filteredOptions:[32],ariaActivedescendant:[32]},[[4,"click","handleOutsideClick"]]],[2,"translate-icon",{width:[1],height:[1]}],[2,"search-icon",{width:[1],height:[1]}]]],["archive-icon_7",[[2,"archive-icon",{width:[1],height:[1]}],[2,"folder-icon",{width:[1],height:[1]}],[2,"inbox-icon",{width:[1],height:[1]}],[2,"sent-icon",{width:[1],height:[1]}],[2,"spam-icon",{width:[1],height:[1]}],[2,"star-icon",{width:[1],height:[1]}],[2,"trash-icon",{width:[1],height:[1]}]]],["nylas-booked-event-card_10",[[1,"nylas-locale-switch",{selectedTimezone:[1025,"selected-timezone"],selectedLanguage:[1025,"selected-language"]},[[0,"selectedOptionChanged","selectedOptionChangedHandler"]]],[1,"nylas-booked-event-card",{eventInfo:[16],bookingFlow:[1,"booking-flow"],bookingInfo:[8,"booking-info"]}],[1,"nylas-booking-form",{isLoading:[4,"is-loading"],bookingInfo:[8,"booking-info"],eventInfo:[16],name:[32],email:[32],guestEmails:[32],guestEmailErrors:[32],isNameValid:[32],isEmailValid:[32],validationError:[32]},null,{bookingInfo:["bookingInfoChangedHandler"]}],[1,"nylas-notification",{ttl:[2],allowedCategories:[16],notifications:[32]},[[16,"nylasSchedulerError","onError"],[16,"nylasSchedulerWarning","onWarning"],[16,"nylasSchedulerInfo","onInfo"],[16,"nylasSchedulerSuccess","onSuccess"]]],[1,"nylas-selected-event-card",{selectedDate:[16],selectedTimeslot:[16],selectedTimezone:[1,"selected-timezone"],startTime:[32],endTime:[32]},null,{selectedTimeslot:["handleSelectedTimeslotChange"]}],[1,"nylas-cancel-booking-form",{cancelBookingId:[1,"cancel-booking-id"],cancellationReason:[32],cancellationError:[32]}],[1,"nylas-cancelled-event-card",{cancelledEvent:[16]}],[1,"nylas-date-picker",{selectableDates:[16],selectedDate:[16],isLoading:[4,"is-loading"],month:[32],dates:[32]}],[2,"nylas-logo",{width:[1],height:[1]}],[1,"nylas-timeslot-picker",{selectedDate:[16],availability:[16],selectedTimeslot:[16],isLoading:[4,"loading-state"],selectedTimezone:[1,"selected-timezone"],times:[32],hoveredTimeslotIndex:[32],selectedTimeslotIndex:[32]},null,{selectedDate:["selectedDateChanged"],availability:["availabilityChanged"]}]]]],t)};(function(){if(typeof window<"u"&&window.Reflect!==void 0&&window.customElements!==void 0){var e=HTMLElement;window.HTMLElement=function(){return Reflect.construct(e,[],this.constructor)},HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}})();var ke={exports:{}},X={};/**
2
2
  * @license React
3
3
  * react-jsx-runtime.production.min.js
4
4
  *
@@ -488,142 +488,142 @@ const $t = (e, t, ...s) => {
488
488
  case "nylas-if-state_3":
489
489
  return import(
490
490
  /* webpackMode: "lazy" */
491
- "./nylas-if-state_3.entry-d805d4c6.js"
491
+ "./nylas-if-state_3.entry-e96d01f1.js"
492
492
  ).then(a, v);
493
493
  case "document-refresh-icon":
494
494
  return import(
495
495
  /* webpackMode: "lazy" */
496
- "./document-refresh-icon.entry-89ad42fa.js"
496
+ "./document-refresh-icon.entry-9083a2e9.js"
497
497
  ).then(a, v);
498
498
  case "nylas-list-folders":
499
499
  return import(
500
500
  /* webpackMode: "lazy" */
501
- "./nylas-list-folders.entry-472bd255.js"
501
+ "./nylas-list-folders.entry-a5437201.js"
502
502
  ).then(a, v);
503
503
  case "nylas-list-threads":
504
504
  return import(
505
505
  /* webpackMode: "lazy" */
506
- "./nylas-list-threads.entry-f3266bf7.js"
506
+ "./nylas-list-threads.entry-fd6cda61.js"
507
507
  ).then(a, v);
508
508
  case "nylas-mailbox-pagination":
509
509
  return import(
510
510
  /* webpackMode: "lazy" */
511
- "./nylas-mailbox-pagination.entry-bd0d3bda.js"
511
+ "./nylas-mailbox-pagination.entry-988214bc.js"
512
512
  ).then(a, v);
513
513
  case "nylas-mailbox-toolbar-button":
514
514
  return import(
515
515
  /* webpackMode: "lazy" */
516
- "./nylas-mailbox-toolbar-button.entry-9641b5cd.js"
516
+ "./nylas-mailbox-toolbar-button.entry-c720e22a.js"
517
517
  ).then(a, v);
518
518
  case "nylas-open-hours-picker":
519
519
  return import(
520
520
  /* webpackMode: "lazy" */
521
- "./nylas-open-hours-picker.entry-42942946.js"
521
+ "./nylas-open-hours-picker.entry-6bdc7c73.js"
522
522
  ).then(a, v);
523
523
  case "nylas-provider":
524
524
  return import(
525
525
  /* webpackMode: "lazy" */
526
- "./nylas-provider.entry-b94198a1.js"
526
+ "./nylas-provider.entry-70721009.js"
527
527
  ).then(a, v);
528
528
  case "nylas-scheduler":
529
529
  return import(
530
530
  /* webpackMode: "lazy" */
531
- "./nylas-scheduler.entry-3b7cb841.js"
531
+ "./nylas-scheduler.entry-7321e18f.js"
532
532
  ).then(a, v);
533
533
  case "nylas-threads-refresh":
534
534
  return import(
535
535
  /* webpackMode: "lazy" */
536
- "./nylas-threads-refresh.entry-7d567ed1.js"
536
+ "./nylas-threads-refresh.entry-b7f9e93f.js"
537
537
  ).then(a, v);
538
538
  case "nylas-threads-search":
539
539
  return import(
540
540
  /* webpackMode: "lazy" */
541
- "./nylas-threads-search.entry-c881d54b.js"
541
+ "./nylas-threads-search.entry-95afea9c.js"
542
542
  ).then(a, v);
543
543
  case "nylas-view-thread":
544
544
  return import(
545
545
  /* webpackMode: "lazy" */
546
- "./nylas-view-thread.entry-d8de6c83.js"
546
+ "./nylas-view-thread.entry-165173b1.js"
547
547
  ).then(a, v);
548
548
  case "archive-icon_7":
549
549
  return import(
550
550
  /* webpackMode: "lazy" */
551
- "./archive-icon_7.entry-9f3eca2c.js"
551
+ "./archive-icon_7.entry-91aaa1aa.js"
552
552
  ).then(a, v);
553
553
  case "arrow-icon":
554
554
  return import(
555
555
  /* webpackMode: "lazy" */
556
- "./arrow-icon.entry-a3b36218.js"
556
+ "./arrow-icon.entry-8b2e96a6.js"
557
557
  ).then(a, v);
558
558
  case "forward-icon_6":
559
559
  return import(
560
560
  /* webpackMode: "lazy" */
561
- "./forward-icon_6.entry-0a6dff18.js"
561
+ "./forward-icon_6.entry-b60fcb35.js"
562
562
  ).then(a, v);
563
563
  case "nylas-booked-event-card_10":
564
564
  return import(
565
565
  /* webpackMode: "lazy" */
566
- "./nylas-booked-event-card_10.entry-f2481a57.js"
566
+ "./nylas-booked-event-card_10.entry-7e66a648.js"
567
567
  ).then(a, v);
568
568
  case "add-circle-icon":
569
569
  return import(
570
570
  /* webpackMode: "lazy" */
571
- "./add-circle-icon.entry-4b8debfa.js"
571
+ "./add-circle-icon.entry-35d6aa07.js"
572
572
  ).then(a, v);
573
573
  case "bold-icon_3":
574
574
  return import(
575
575
  /* webpackMode: "lazy" */
576
- "./bold-icon_3.entry-b0d81839.js"
576
+ "./bold-icon_3.entry-4b2798a8.js"
577
577
  ).then(a, v);
578
578
  case "calendar-check-icon_3":
579
579
  return import(
580
580
  /* webpackMode: "lazy" */
581
- "./calendar-check-icon_3.entry-cfb612c6.js"
581
+ "./calendar-check-icon_3.entry-903e2d82.js"
582
582
  ).then(a, v);
583
583
  case "calendar-icon":
584
584
  return import(
585
585
  /* webpackMode: "lazy" */
586
- "./calendar-icon.entry-e5f20598.js"
586
+ "./calendar-icon.entry-8f38af4a.js"
587
587
  ).then(a, v);
588
588
  case "close-icon_2":
589
589
  return import(
590
590
  /* webpackMode: "lazy" */
591
- "./close-icon_2.entry-eca351c4.js"
591
+ "./close-icon_2.entry-011d9cf4.js"
592
592
  ).then(a, v);
593
593
  case "play-icon_2":
594
594
  return import(
595
595
  /* webpackMode: "lazy" */
596
- "./play-icon_2.entry-cae94826.js"
596
+ "./play-icon_2.entry-ed5877e3.js"
597
597
  ).then(a, v);
598
598
  case "refresh-icon":
599
599
  return import(
600
600
  /* webpackMode: "lazy" */
601
- "./refresh-icon.entry-9563850b.js"
601
+ "./refresh-icon.entry-e48a338f.js"
602
602
  ).then(a, v);
603
603
  case "search-icon_3":
604
604
  return import(
605
605
  /* webpackMode: "lazy" */
606
- "./search-icon_3.entry-e36548ec.js"
606
+ "./search-icon_3.entry-292138c3.js"
607
607
  ).then(a, v);
608
608
  case "calendar-cancel-icon":
609
609
  return import(
610
610
  /* webpackMode: "lazy" */
611
- "./calendar-cancel-icon.entry-0d07e33c.js"
611
+ "./calendar-cancel-icon.entry-83ba884a.js"
612
612
  ).then(a, v);
613
613
  case "globe-icon":
614
614
  return import(
615
615
  /* webpackMode: "lazy" */
616
- "./globe-icon.entry-71414bc6.js"
616
+ "./globe-icon.entry-e3fd373f.js"
617
617
  ).then(a, v);
618
618
  case "loading-icon":
619
619
  return import(
620
620
  /* webpackMode: "lazy" */
621
- "./loading-icon.entry-15debb7d.js"
621
+ "./loading-icon.entry-27410cf8.js"
622
622
  ).then(a, v);
623
623
  case "chevron-icon":
624
624
  return import(
625
625
  /* webpackMode: "lazy" */
626
- "./chevron-icon.entry-f5d5d1b1.js"
626
+ "./chevron-icon.entry-5e11cef5.js"
627
627
  ).then(a, v);
628
628
  }
629
629
  }
@@ -1,5 +1,5 @@
1
1
  import { d as T, u as or, e as dn } from "./utils-5074a070-ce33ee6b.js";
2
- import { a as fn, f as pn } from "./index-98d3a4da.js";
2
+ import { a as fn, f as pn } from "./index-630f4e87.js";
3
3
  class ar {
4
4
  constructor(e, n, r = !0, s) {
5
5
  this.automaticComponentRegistration = !0, this.registeredComponents = {}, this.propStateRegistrations = /* @__PURE__ */ new Map(), this.eventListenerRegistrations = /* @__PURE__ */ new Map(), this.host = e, this.stores = n, this.automaticComponentRegistration = r, this.eventOverrides = s, T(`[${this.hostTagName}] Initializing (abstract) provider.`, { eventOverrides: s }), this.registerComponent = this.registerComponent.bind(this), this.getStore = this.getStore.bind(this), Object.keys(this.stores).forEach((i) => {
@@ -1,4 +1,4 @@
1
- "use strict";const T=require("./utils-5074a070-d5ba6add.cjs"),Ye=require("./index-586a4206.cjs");class ir{constructor(e,n,r=!0,s){this.automaticComponentRegistration=!0,this.registeredComponents={},this.propStateRegistrations=new Map,this.eventListenerRegistrations=new Map,this.host=e,this.stores=n,this.automaticComponentRegistration=r,this.eventOverrides=s,T.debug(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s}),this.registerComponent=this.registerComponent.bind(this),this.getStore=this.getStore.bind(this),Object.keys(this.stores).forEach(i=>{this.propStateRegistrations.set(i,new Map)})}async componentWillLoad(e){T.debug(`[${this.hostTagName}] Will load`),this.setupStoreListeners(),this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter(r=>r.tagName.toLowerCase().startsWith("nylas-"));T.debug(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n}),n.forEach(r=>{const s=r;if(!s){T.debug(`[~${this.hostTagName}] Component ${s.tagName} does not have a name. Skipping.`);return}if(!s.registerNylasComponent){T.debug(`[~${this.hostTagName}] Component ${s.tagName} is not a component that can be registered. Skipping.`,{component:s});return}const i={element:s,name:s.tagName.toLowerCase(),getStoresToProp:s.getStoresToProp,storeToProps:s.storeToProps,stateToProps:s.stateToProps,authToProp:s.authToProp,eventToProps:s.eventToProps,connectorToProp:s.connectorToProp};this.registerComponent(i)})}async componentDidLoad(){T.debug(`[${this.hostTagName}] Did load`)}async componentDisconnected(){Object.values(this.stores).forEach(e=>{e.dispose()})}async registerComponentHandler(e){if(e.stopPropagation(),!this.automaticComponentRegistration){T.debug(`[${this.hostTagName}] Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}this.registerComponent(e.detail)}async unregisterComponentHandler(e){if(e.stopPropagation(),!this.automaticComponentRegistration){T.debug(`[${this.hostTagName}] Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}registerComponent(e){T.debug(`[${this.hostTagName}] Registering component ${e.name}.`);const n=e.element.dataset.nylasId;if(n&&this.registeredComponents[n]){T.debug(`[${this.hostTagName}] Component ${e.name} already registered. Skipping.`);return}const{stateToProps:r,getStoresToProp:s,eventToProps:i,storeToProps:o,connectorToProp:u,element:a}=e;a.dataset.nylasId=T.uniqueID(),this.registeredComponents[a.dataset.nylasId]=e;const l=this.eventOverrides;i==null||i.forEach((h,c)=>{var y;const d=this.nylasConnector,g=async m=>{T.debug(`[${this.hostTagName}] Handling "${e.name}" prop "${String(c)}" event.`,{event:m}),c in l&&(T.debug(`[${this.hostTagName}] Found event override for "${String(c)}" event. Calling override.`),await l[c](m,d)),m.defaultPrevented||await h(m,d)},p=e.element.dataset.nylasId;p&&!this.eventListenerRegistrations.has(p)&&this.eventListenerRegistrations.set(p,[]),p&&((y=this.eventListenerRegistrations.get(p))==null||y.push([a,c,g])),T.debug(`[${this.hostTagName}] Setting "${e.name}" event "${String(c)}" to automcially call NylasConnector method.`);const f=T.formatEventName(c.toString());T.debug(`[${this.hostTagName}] Adding event listener for "${f}" on "${a.tagName}"`),a.addEventListener(f,g)}),r==null||r.forEach((h,c)=>{var y,m,v,b;const[d,g]=c.split("."),f=this.getStore(d).state[g];if(!a.dataset.nylasId){T.debug(`[${this.hostTagName}] Component "${e.name}" not registered. Skipping.`,{component:e});return}this.propStateRegistrations.has(d)||this.propStateRegistrations.set(d,new Map),(y=this.propStateRegistrations.get(d))!=null&&y.has(g)?(b=(v=this.propStateRegistrations.get(d))==null?void 0:v.get(g))==null||b.push({elementId:a.dataset.nylasId,propKey:h}):(m=this.propStateRegistrations.get(d))==null||m.set(g,[{elementId:a.dataset.nylasId,propKey:h}]),a[h.toString()]=f,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${h.toString()}" to "${c}" value.`,{stateValue:f})}),s&&(a[s==null?void 0:s.toString()]=this.getStore,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${s.toString()}" to "getStore" method.`)),o==null||o.forEach((h,c)=>{const d=this.getStore(c);a[h.toString()]=d,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${h.toString()}" to "${c}" store.`,{store:d})}),u&&(a[u==null?void 0:u.toString()]=this.nylasConnector,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${u.toString()}" to "nylasConnector" value.`,{connectorToProp:u})),T.debug(`[${this.hostTagName}] Component ${e.name} registered.`)}unregisterComponent(e){T.debug(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){T.debug(`[${this.hostTagName}] Component ${e.name} not registered. Skipping.`);return}if(this.registeredComponents[n]){T.debug(`[${this.hostTagName}] Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach((s,i)=>{s.forEach((o,u)=>{var h,c;const a=(h=this.propStateRegistrations.get(i))==null?void 0:h.get(u),l=a==null?void 0:a.filter(d=>d.elementId!==n);l&&((c=this.propStateRegistrations.get(i))==null||c.set(u,l))})});const r=this.eventListenerRegistrations.get(n);r==null||r.forEach(([s,i,o])=>{const u=T.formatEventName(i.toString());T.debug(`[${this.hostTagName}] Removing event listener for "${u}" on "${s.tagName}"`),s.removeEventListener(u,o)}),delete this.registeredComponents[n]}getStore(e){const n=this.stores[e];if(!n)throw new Error(`[${this.hostTagName}] Store "${e.toString()}" not found.`);return n}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach(([n,r])=>{T.debug(`[${e.hostTagName}] Listening for changes in "${n}" store.`),r.use({set(s,i,o){var l;if(T.debug(`[${e.hostTagName}] Store "${n}" state "${s.toString()}" changed`,{newValue:i,oldValue:o}),i===o){T.debug(`[${e.hostTagName}] Store "${n}" state "${s.toString()}" unchanged. Skipping.`);return}const u=e.registeredComponents;if(!u){T.debug(`[${e.hostTagName}] No registered components found. Skipping.`);return}const a=((l=e.propStateRegistrations.get(n))==null?void 0:l.get(s.toString()))||[];T.debug(`[${e.hostTagName}] Found ${a.length} prop(s) registered for "${s.toString()}" store.`,{props:a,propStateRegistrations:e.propStateRegistrations}),a.forEach(({elementId:h,propKey:c})=>{const d=u[h];if(!d){T.debug(`[${e.hostTagName}] Component "${h}" not found. Skipping.`,{component:d});return}const p=e.getStore(n).state[s];d.element[c.toString()]=p,T.debug(`[${e.hostTagName}] Setting "${d.name}" prop "${c.toString()}" to "${s.toString()}" value.`,{stateValue:p})})}})})}get hostTagName(){var e,n;return((n=(e=this.host)==null?void 0:e.tagName)==null?void 0:n.toLowerCase())??"nylas-provider"}}class or extends ir{}var ar=Object.defineProperty,ur=(t,e,n)=>e in t?ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ct=(t,e,n)=>(ur(t,typeof e!="symbol"?e+"":e,n),n),Cn=(t=>(t.Error="error",t.Warning="warning",t.Info="info",t.Success="success",t))(Cn||{});const cr=t=>"error"in t;class lr extends Error{constructor(e){super(e==null?void 0:e.message),ct(this,"apiError"),this.name="NylasAPIError",this.stack=new Error().stack,this.apiError=e}}async function fn(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",e),r=Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("");return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const R=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$=Object.keys,F=Array.isArray;function U(t,e){return typeof e!="object"||$(e).forEach(function(n){t[n]=e[n]}),t}typeof Promise>"u"||R.Promise||(R.Promise=Promise);const Be=Object.getPrototypeOf,hr={}.hasOwnProperty;function z(t,e){return hr.call(t,e)}function Ee(t,e){typeof e=="function"&&(e=e(Be(t))),(typeof Reflect>"u"?$:Reflect.ownKeys)(e).forEach(n=>{ee(t,n,e[n])})}const Tn=Object.defineProperty;function ee(t,e,n,r){Tn(t,e,U(n&&z(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ke(t){return{from:function(e){return t.prototype=Object.create(e.prototype),ee(t.prototype,"constructor",t),{extend:Ee.bind(null,t.prototype)}}}}const dr=Object.getOwnPropertyDescriptor;function en(t,e){let n;return dr(t,e)||(n=Be(t))&&en(n,e)}const fr=[].slice;function lt(t,e,n){return fr.call(t,e,n)}function An(t,e){return e(t)}function Ie(t){if(!t)throw new Error("Assertion Failed")}function On(t){R.setImmediate?setImmediate(t):setTimeout(t,0)}function In(t,e){return t.reduce((n,r,s)=>{var i=e(r,s);return i&&(n[i[0]]=i[1]),n},{})}function te(t,e){if(z(t,e))return t[e];if(!e)return t;if(typeof e!="string"){for(var n=[],r=0,s=e.length;r<s;++r){var i=te(t,e[r]);n.push(i)}return n}var o=e.indexOf(".");if(o!==-1){var u=t[e.substr(0,o)];return u===void 0?void 0:te(u,e.substr(o+1))}}function H(t,e,n){if(t&&e!==void 0&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if(typeof e!="string"&&"length"in e){Ie(typeof n!="string"&&"length"in n);for(var r=0,s=e.length;r<s;++r)H(t,e[r],n[r])}else{var i=e.indexOf(".");if(i!==-1){var o=e.substr(0,i),u=e.substr(i+1);if(u==="")n===void 0?F(t)&&!isNaN(parseInt(o))?t.splice(o,1):delete t[o]:t[o]=n;else{var a=t[o];a&&z(t,o)||(a=t[o]={}),H(a,u,n)}}else n===void 0?F(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function Rn(t){var e={};for(var n in t)z(t,n)&&(e[n]=t[n]);return e}const pr=[].concat;function Kn(t){return pr.apply([],t)}const jn="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Kn([8,16,32,64].map(t=>["Int","Uint","Float"].map(e=>e+t+"Array")))).filter(t=>R[t]),gr=jn.map(t=>R[t]);In(jn,t=>[t,!0]);let se=null;function We(t){se=typeof WeakMap<"u"&&new WeakMap;const e=At(t);return se=null,e}function At(t){if(!t||typeof t!="object")return t;let e=se&&se.get(t);if(e)return e;if(F(t)){e=[],se&&se.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(At(t[n]))}else if(gr.indexOf(t.constructor)>=0)e=t;else{const i=Be(t);for(var s in e=i===Object.prototype?{}:Object.create(i),se&&se.set(t,e),t)z(t,s)&&(e[s]=At(t[s]))}return e}const{toString:mr}={};function Ot(t){return mr.call(t).slice(8,-1)}const It=typeof Symbol<"u"?Symbol.iterator:"@@iterator",yr=typeof It=="symbol"?function(t){var e;return t!=null&&(e=t[It])&&e.apply(t)}:function(){return null},_e={};function J(t){var e,n,r,s;if(arguments.length===1){if(F(t))return t.slice();if(this===_e&&typeof t=="string")return[t];if(s=yr(t)){for(n=[];!(r=s.next()).done;)n.push(r.value);return n}if(t==null)return[t];if(typeof(e=t.length)=="number"){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}const tn=typeof Symbol<"u"?t=>t[Symbol.toStringTag]==="AsyncFunction":()=>!1;var G=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Dn(t,e){G=t,$n=e}var $n=()=>!0;const vr=!new Error("").stack;function Pe(){if(vr)try{throw new Error}catch(t){return t}return new Error}function Rt(t,e){var n=t.stack;return n?(e=e||0,n.indexOf(t.name)===0&&(e+=(t.name+t.message).split(`
1
+ "use strict";const T=require("./utils-5074a070-d5ba6add.cjs"),Ye=require("./index-3b6f5cd5.cjs");class ir{constructor(e,n,r=!0,s){this.automaticComponentRegistration=!0,this.registeredComponents={},this.propStateRegistrations=new Map,this.eventListenerRegistrations=new Map,this.host=e,this.stores=n,this.automaticComponentRegistration=r,this.eventOverrides=s,T.debug(`[${this.hostTagName}] Initializing (abstract) provider.`,{eventOverrides:s}),this.registerComponent=this.registerComponent.bind(this),this.getStore=this.getStore.bind(this),Object.keys(this.stores).forEach(i=>{this.propStateRegistrations.set(i,new Map)})}async componentWillLoad(e){T.debug(`[${this.hostTagName}] Will load`),this.setupStoreListeners(),this.nylasConnector=e;const n=Array.from(this.host.querySelectorAll("*")).filter(r=>r.tagName.toLowerCase().startsWith("nylas-"));T.debug(`[${this.hostTagName}] Found ${n.length} child component(s).`,{childComponents:n}),n.forEach(r=>{const s=r;if(!s){T.debug(`[~${this.hostTagName}] Component ${s.tagName} does not have a name. Skipping.`);return}if(!s.registerNylasComponent){T.debug(`[~${this.hostTagName}] Component ${s.tagName} is not a component that can be registered. Skipping.`,{component:s});return}const i={element:s,name:s.tagName.toLowerCase(),getStoresToProp:s.getStoresToProp,storeToProps:s.storeToProps,stateToProps:s.stateToProps,authToProp:s.authToProp,eventToProps:s.eventToProps,connectorToProp:s.connectorToProp};this.registerComponent(i)})}async componentDidLoad(){T.debug(`[${this.hostTagName}] Did load`)}async componentDisconnected(){Object.values(this.stores).forEach(e=>{e.dispose()})}async registerComponentHandler(e){if(e.stopPropagation(),!this.automaticComponentRegistration){T.debug(`[${this.hostTagName}] Automatic component registration disabled. Skipping registration of ${e.detail.name}.`);return}this.registerComponent(e.detail)}async unregisterComponentHandler(e){if(e.stopPropagation(),!this.automaticComponentRegistration){T.debug(`[${this.hostTagName}] Automatic component registration disabled. Skipping unregistration of ${e.detail.name}.`);return}this.unregisterComponent(e.detail)}registerComponent(e){T.debug(`[${this.hostTagName}] Registering component ${e.name}.`);const n=e.element.dataset.nylasId;if(n&&this.registeredComponents[n]){T.debug(`[${this.hostTagName}] Component ${e.name} already registered. Skipping.`);return}const{stateToProps:r,getStoresToProp:s,eventToProps:i,storeToProps:o,connectorToProp:u,element:a}=e;a.dataset.nylasId=T.uniqueID(),this.registeredComponents[a.dataset.nylasId]=e;const l=this.eventOverrides;i==null||i.forEach((h,c)=>{var y;const d=this.nylasConnector,g=async m=>{T.debug(`[${this.hostTagName}] Handling "${e.name}" prop "${String(c)}" event.`,{event:m}),c in l&&(T.debug(`[${this.hostTagName}] Found event override for "${String(c)}" event. Calling override.`),await l[c](m,d)),m.defaultPrevented||await h(m,d)},p=e.element.dataset.nylasId;p&&!this.eventListenerRegistrations.has(p)&&this.eventListenerRegistrations.set(p,[]),p&&((y=this.eventListenerRegistrations.get(p))==null||y.push([a,c,g])),T.debug(`[${this.hostTagName}] Setting "${e.name}" event "${String(c)}" to automcially call NylasConnector method.`);const f=T.formatEventName(c.toString());T.debug(`[${this.hostTagName}] Adding event listener for "${f}" on "${a.tagName}"`),a.addEventListener(f,g)}),r==null||r.forEach((h,c)=>{var y,m,v,b;const[d,g]=c.split("."),f=this.getStore(d).state[g];if(!a.dataset.nylasId){T.debug(`[${this.hostTagName}] Component "${e.name}" not registered. Skipping.`,{component:e});return}this.propStateRegistrations.has(d)||this.propStateRegistrations.set(d,new Map),(y=this.propStateRegistrations.get(d))!=null&&y.has(g)?(b=(v=this.propStateRegistrations.get(d))==null?void 0:v.get(g))==null||b.push({elementId:a.dataset.nylasId,propKey:h}):(m=this.propStateRegistrations.get(d))==null||m.set(g,[{elementId:a.dataset.nylasId,propKey:h}]),a[h.toString()]=f,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${h.toString()}" to "${c}" value.`,{stateValue:f})}),s&&(a[s==null?void 0:s.toString()]=this.getStore,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${s.toString()}" to "getStore" method.`)),o==null||o.forEach((h,c)=>{const d=this.getStore(c);a[h.toString()]=d,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${h.toString()}" to "${c}" store.`,{store:d})}),u&&(a[u==null?void 0:u.toString()]=this.nylasConnector,T.debug(`[${this.hostTagName}] Setting "${e.name}" prop "${u.toString()}" to "nylasConnector" value.`,{connectorToProp:u})),T.debug(`[${this.hostTagName}] Component ${e.name} registered.`)}unregisterComponent(e){T.debug(`[${this.hostTagName}] Unregistering component ${e.name}.`);const n=e.element.dataset.nylasId;if(!n){T.debug(`[${this.hostTagName}] Component ${e.name} not registered. Skipping.`);return}if(this.registeredComponents[n]){T.debug(`[${this.hostTagName}] Component ${e.name} not registered. Skipping.`);return}this.propStateRegistrations.forEach((s,i)=>{s.forEach((o,u)=>{var h,c;const a=(h=this.propStateRegistrations.get(i))==null?void 0:h.get(u),l=a==null?void 0:a.filter(d=>d.elementId!==n);l&&((c=this.propStateRegistrations.get(i))==null||c.set(u,l))})});const r=this.eventListenerRegistrations.get(n);r==null||r.forEach(([s,i,o])=>{const u=T.formatEventName(i.toString());T.debug(`[${this.hostTagName}] Removing event listener for "${u}" on "${s.tagName}"`),s.removeEventListener(u,o)}),delete this.registeredComponents[n]}getStore(e){const n=this.stores[e];if(!n)throw new Error(`[${this.hostTagName}] Store "${e.toString()}" not found.`);return n}async setupStoreListeners(){const e=this;Object.entries(this.stores).forEach(([n,r])=>{T.debug(`[${e.hostTagName}] Listening for changes in "${n}" store.`),r.use({set(s,i,o){var l;if(T.debug(`[${e.hostTagName}] Store "${n}" state "${s.toString()}" changed`,{newValue:i,oldValue:o}),i===o){T.debug(`[${e.hostTagName}] Store "${n}" state "${s.toString()}" unchanged. Skipping.`);return}const u=e.registeredComponents;if(!u){T.debug(`[${e.hostTagName}] No registered components found. Skipping.`);return}const a=((l=e.propStateRegistrations.get(n))==null?void 0:l.get(s.toString()))||[];T.debug(`[${e.hostTagName}] Found ${a.length} prop(s) registered for "${s.toString()}" store.`,{props:a,propStateRegistrations:e.propStateRegistrations}),a.forEach(({elementId:h,propKey:c})=>{const d=u[h];if(!d){T.debug(`[${e.hostTagName}] Component "${h}" not found. Skipping.`,{component:d});return}const p=e.getStore(n).state[s];d.element[c.toString()]=p,T.debug(`[${e.hostTagName}] Setting "${d.name}" prop "${c.toString()}" to "${s.toString()}" value.`,{stateValue:p})})}})})}get hostTagName(){var e,n;return((n=(e=this.host)==null?void 0:e.tagName)==null?void 0:n.toLowerCase())??"nylas-provider"}}class or extends ir{}var ar=Object.defineProperty,ur=(t,e,n)=>e in t?ar(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,ct=(t,e,n)=>(ur(t,typeof e!="symbol"?e+"":e,n),n),Cn=(t=>(t.Error="error",t.Warning="warning",t.Info="info",t.Success="success",t))(Cn||{});const cr=t=>"error"in t;class lr extends Error{constructor(e){super(e==null?void 0:e.message),ct(this,"apiError"),this.name="NylasAPIError",this.stack=new Error().stack,this.apiError=e}}async function fn(t){const e=new TextEncoder().encode(t),n=await crypto.subtle.digest("SHA-256",e),r=Array.from(new Uint8Array(n)).map(s=>s.toString(16).padStart(2,"0")).join("");return btoa(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/,"")}const R=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,$=Object.keys,F=Array.isArray;function U(t,e){return typeof e!="object"||$(e).forEach(function(n){t[n]=e[n]}),t}typeof Promise>"u"||R.Promise||(R.Promise=Promise);const Be=Object.getPrototypeOf,hr={}.hasOwnProperty;function z(t,e){return hr.call(t,e)}function Ee(t,e){typeof e=="function"&&(e=e(Be(t))),(typeof Reflect>"u"?$:Reflect.ownKeys)(e).forEach(n=>{ee(t,n,e[n])})}const Tn=Object.defineProperty;function ee(t,e,n,r){Tn(t,e,U(n&&z(n,"get")&&typeof n.get=="function"?{get:n.get,set:n.set,configurable:!0}:{value:n,configurable:!0,writable:!0},r))}function ke(t){return{from:function(e){return t.prototype=Object.create(e.prototype),ee(t.prototype,"constructor",t),{extend:Ee.bind(null,t.prototype)}}}}const dr=Object.getOwnPropertyDescriptor;function en(t,e){let n;return dr(t,e)||(n=Be(t))&&en(n,e)}const fr=[].slice;function lt(t,e,n){return fr.call(t,e,n)}function An(t,e){return e(t)}function Ie(t){if(!t)throw new Error("Assertion Failed")}function On(t){R.setImmediate?setImmediate(t):setTimeout(t,0)}function In(t,e){return t.reduce((n,r,s)=>{var i=e(r,s);return i&&(n[i[0]]=i[1]),n},{})}function te(t,e){if(z(t,e))return t[e];if(!e)return t;if(typeof e!="string"){for(var n=[],r=0,s=e.length;r<s;++r){var i=te(t,e[r]);n.push(i)}return n}var o=e.indexOf(".");if(o!==-1){var u=t[e.substr(0,o)];return u===void 0?void 0:te(u,e.substr(o+1))}}function H(t,e,n){if(t&&e!==void 0&&(!("isFrozen"in Object)||!Object.isFrozen(t)))if(typeof e!="string"&&"length"in e){Ie(typeof n!="string"&&"length"in n);for(var r=0,s=e.length;r<s;++r)H(t,e[r],n[r])}else{var i=e.indexOf(".");if(i!==-1){var o=e.substr(0,i),u=e.substr(i+1);if(u==="")n===void 0?F(t)&&!isNaN(parseInt(o))?t.splice(o,1):delete t[o]:t[o]=n;else{var a=t[o];a&&z(t,o)||(a=t[o]={}),H(a,u,n)}}else n===void 0?F(t)&&!isNaN(parseInt(e))?t.splice(e,1):delete t[e]:t[e]=n}}function Rn(t){var e={};for(var n in t)z(t,n)&&(e[n]=t[n]);return e}const pr=[].concat;function Kn(t){return pr.apply([],t)}const jn="Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,ArrayBuffer,DataView,Uint8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(Kn([8,16,32,64].map(t=>["Int","Uint","Float"].map(e=>e+t+"Array")))).filter(t=>R[t]),gr=jn.map(t=>R[t]);In(jn,t=>[t,!0]);let se=null;function We(t){se=typeof WeakMap<"u"&&new WeakMap;const e=At(t);return se=null,e}function At(t){if(!t||typeof t!="object")return t;let e=se&&se.get(t);if(e)return e;if(F(t)){e=[],se&&se.set(t,e);for(var n=0,r=t.length;n<r;++n)e.push(At(t[n]))}else if(gr.indexOf(t.constructor)>=0)e=t;else{const i=Be(t);for(var s in e=i===Object.prototype?{}:Object.create(i),se&&se.set(t,e),t)z(t,s)&&(e[s]=At(t[s]))}return e}const{toString:mr}={};function Ot(t){return mr.call(t).slice(8,-1)}const It=typeof Symbol<"u"?Symbol.iterator:"@@iterator",yr=typeof It=="symbol"?function(t){var e;return t!=null&&(e=t[It])&&e.apply(t)}:function(){return null},_e={};function J(t){var e,n,r,s;if(arguments.length===1){if(F(t))return t.slice();if(this===_e&&typeof t=="string")return[t];if(s=yr(t)){for(n=[];!(r=s.next()).done;)n.push(r.value);return n}if(t==null)return[t];if(typeof(e=t.length)=="number"){for(n=new Array(e);e--;)n[e]=t[e];return n}return[t]}for(e=arguments.length,n=new Array(e);e--;)n[e]=arguments[e];return n}const tn=typeof Symbol<"u"?t=>t[Symbol.toStringTag]==="AsyncFunction":()=>!1;var G=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function Dn(t,e){G=t,$n=e}var $n=()=>!0;const vr=!new Error("").stack;function Pe(){if(vr)try{throw new Error}catch(t){return t}return new Error}function Rt(t,e){var n=t.stack;return n?(e=e||0,n.indexOf(t.name)===0&&(e+=(t.name+t.message).split(`
2
2
  `).length),n.split(`
3
3
  `).slice(e).filter($n).map(r=>`
4
4
  `+r).join("")):""}var Nn=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],nn=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(Nn),br={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transaction aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function xe(t,e){this._e=Pe(),this.name=t,this.message=e}function Bn(t,e){return t+". Errors: "+Object.keys(e).map(n=>e[n].toString()).filter((n,r,s)=>s.indexOf(n)===r).join(`
@@ -1,4 +1,4 @@
1
- import { r as t, h as e } from "./index-98d3a4da.js";
1
+ import { r as t, h as e } from "./index-630f4e87.js";
2
2
  import "react";
3
3
  import "react-dom";
4
4
  const i = ".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}", n = i, o = class {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-586a4206.cjs");require("react");require("react-dom");const i=".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}",n=i,t=class{constructor(a){e.registerInstance(this,a),this.width="15",this.height="15"}render(){return e.h("div",{key:"bf96616e119f5ffef943b4bee1c45cbf9919bba7",class:"wave"},e.h("div",{key:"cb1a652eae22004ac8f265f68a8dbf56adeaf0e1",class:"dot"}),e.h("div",{key:"5f608e19d592c0fb0fd81b43702c391af2667f41",class:"dot"}),e.h("div",{key:"1b2d7ab591ec6e8fe0c1502a8e290281ce140e52",class:"dot"}))}};t.style=n;exports.loading_icon=t;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-3b6f5cd5.cjs");require("react");require("react-dom");const i=".wave{display:flex;align-items:center;justify-content:center}.dot{width:4px;height:4px;background-color:var(--dot-color, white);border-radius:50%;margin:0 2px;animation:wave 1.5s infinite ease-in-out}.dot:nth-child(2){animation-delay:0.2s}.dot:nth-child(3){animation-delay:0.4s}@keyframes wave{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-4px)}}",n=i,t=class{constructor(a){e.registerInstance(this,a),this.width="15",this.height="15"}render(){return e.h("div",{key:"bf96616e119f5ffef943b4bee1c45cbf9919bba7",class:"wave"},e.h("div",{key:"cb1a652eae22004ac8f265f68a8dbf56adeaf0e1",class:"dot"}),e.h("div",{key:"5f608e19d592c0fb0fd81b43702c391af2667f41",class:"dot"}),e.h("div",{key:"1b2d7ab591ec6e8fe0c1502a8e290281ce140e52",class:"dot"}))}};t.style=n;exports.loading_icon=t;
@@ -1 +1 @@
1
- "use strict";const o=require("./utils-5074a070-d5ba6add.cjs"),i=require("./index-b30d446a-3d69a3cc.cjs");class g{constructor(t,e){this.nylasAuth=t,this.nylasAuthStore=e}async validateSession(){const t=await this.isAccessTokenValid();if(!t)this.logout();else{let e=await this.nylasAuth.getTokenInfo();if(e){const a=Math.floor(Date.now()/1e3);if(e.expires_in&&e.expires_in-a<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),e=await this.nylasAuth.refreshAccessToken(),!e)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=e}}this.nylasAuthStore.state.isAuthenticated=t}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(t,e,s){return this.nylasAuth.getHostedAuthRedirectURL(t,e,s)}async manageHostedAuthCodeExchange(t){const s=new URL(t).searchParams.get("code");if(s){const a=await this.nylasAuth.exchangeAuthCodeForTokenInfo(s);if(a)return this.nylasAuthStore.state.tokenInfo=a,this.nylasAuthStore.state.isAuthenticated=!0,a}return null}}class f{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getMessages(){var n;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");this.nylasMailboxStore.state.state="loading";const t=this.nylasMailboxStore.state.messgeQueryParams,e=new URLSearchParams;for(const h in t){const u=(n=t[h])==null?void 0:n.toString();u&&e.append(h,u)}const s=`/v3/grants/me/messages?${e.toString()}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.messages=r,this.nylasMailboxStore.state.state="ready",r}async getThreadMessages(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest(`/v3/grants/me/messages?thread_id=${t}&fields=include_headers`);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.messages=s,s}downloadMessageAttachments(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=[],s=t.attachments||[];for(const a of s){const r=this.nylasAuth.nylasDownloadFileRequest(`/v3/grants/me/attachments/${a.id}?message_id=${t.id}`);e.push(r)}return e}async summarizeText(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/summarize","POST",{message:{body:t}},!0,this.nylasAuth.config.elementsApiUri);if(i.Xr(e))throw new i.Zr(e.error);return e.data.summary}async textToSpeech(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");return this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/tts","POST",{text:t},!1,this.nylasAuth.config.elementsApiUri,{...e?{signal:e==null?void 0:e.signal}:{}})}}class w{constructor(t,e,s,a){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s,this.router=a}async getThreads(t,e="overwrite",s=!0){var c;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");s&&(this.nylasMailboxStore.state.state="loading");const a=t||this.nylasMailboxStore.state.threadsQueryParams,r=new URLSearchParams;for(const y in a){const d=(c=a[y])==null?void 0:c.toString();typeof d<"u"&&d!==null&&r.append(y,d)}a.search_query_native?this.router.navigate(`/?query=${a.search_query_native}`,!0):this.nylasMailboxStore.state.threadsQueryParams.search_query_native&&!a.search_query_native&&this.router.navigate("/",!0),a.page_token||(this.nylasMailboxStore.state.previousThreadPageTokens=[]),this.nylasMailboxStore.state.threadsQueryParams=a;const n=`/v3/grants/me/threads?${r.toString()}`,h=await this.nylasAuth.nylasAPIRequest(n);if(i.Xr(h))throw new i.Zr(h.error);const u=h.data;switch(e){case"prepend":this.nylasMailboxStore.state.threads=[...u,...this.nylasMailboxStore.state.threads];break;case"append":this.nylasMailboxStore.state.threads=[...this.nylasMailboxStore.state.threads,...u];break;case"overwrite":default:this.nylasMailboxStore.state.threads=u;break}return h.next_cursor?this.nylasMailboxStore.state.nextThreadPageToken=h.next_cursor:this.nylasMailboxStore.state.nextThreadPageToken=null,s&&(this.nylasMailboxStore.state.state="ready"),u}async getThread(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");const e=this.nylasMailboxStore.state.threads.find(n=>n.id===t);if(e)return e;this.nylasMailboxStore.state.state="loading";const s=`/v3/grants/me/threads/${t}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.state="ready",r}async nextThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.nextThreadPageToken)throw new Error("No next page token");this.nylasMailboxStore.state.previousThreadPageTokens=Array.from(new Set([...this.nylasMailboxStore.state.previousThreadPageTokens,this.nylasMailboxStore.state.threadsQueryParams.page_token??null]));const s=this.nylasMailboxStore.state.nextThreadPageToken;return this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:s},t,e)}async previousThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.previousThreadPageTokens.length)throw new Error("No previous page token");const s=[...this.nylasMailboxStore.state.previousThreadPageTokens],a=s.pop();return this.nylasMailboxStore.state.previousThreadPageTokens=s,this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:a??void 0},t,e)}updateThreadQueryParams(t){this.nylasMailboxStore.state.threadsQueryParams={...this.nylasMailboxStore.state.threadsQueryParams,...t}}back(){this.router.navigate("/",!0),this.nylasMailboxStore.state.selectedThread=null}unSelectThread(){this.nylasMailboxStore.state.selectedThread=null}async selectThread(t){this.router.navigate(`/thread/${t.id}`,!0),this.nylasMailboxStore.state.selectedThread=t,t.unread&&this.markThreadAsRead(t).catch(e=>{o.debug("Error marking thread as read",e)})}async markThreadAsRead(t){return this.updateThread(t,{unread:!1})}async updateThread(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email","modify"))throw new Error("Missing thread:modify scope");const s=`/v3/grants/me/threads/${t.id}`,a=await this.nylasAuth.nylasAPIRequest(s,"PUT",e);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.selectedThread=r,r}}class m{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getFolders(){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");this.nylasMailboxStore.state.state="loading";const t="/v3/grants/me/folders",e=await this.nylasAuth.nylasAPIRequest(t);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.folders=s,this.nylasMailboxStore.state.state="ready",s}async selectFolder(t){this.nylasMailboxStore.state.threadsQueryParams={in:t.id,...this.nylasMailboxStore.state.threadsQueryParams||{}}}}class p extends Event{constructor(t,e){super(t,e),this.oldURL=e.oldURL,this.newURL=e.newURL}}class S{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const t=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}else{const t=new p("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}}addRouteChangeListener(t,e){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([t,e])}navigate(t,e){if(o.debug("HashRouter navigate"),e)return window.history.pushState(null,"",`#${t}`);window.location.hash=t}setRoute(t){o.debug("HashRouter setRoute"),window.location.hash=t}matchRoute(t,e){const s=t.split("/"),a=e.split("/");if(o.debug(`HashRouter matchRoute route=${t} path=${e}`,{routeParts:s,pathParts:a}),s[1]===""&&a[0]==="")return!0;if(s.length!==a.length)return!1;for(let r=0;r<s.length;r++){const n=s[r],h=a[r];if(!n.startsWith(":")&&n!==h)return!1}return!0}getRouteParams(t){o.debug("HashRouter getRouteParams");const e={},s=t.split("/"),a=window.location.hash.split("/");return s.forEach((r,n)=>{if(r.startsWith(":")){const h=r.substring(1);e[h]=a[n]}}),e}getRouteWithParams(t,e){o.debug("HashRouter getRouteWithParams");let s=t;return Object.keys(e).forEach(a=>{s=s.replace(`:${a}`,e[a])}),s}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(t){this.routeChangeListeners.forEach(async([e,s])=>{const a=t.newURL.indexOf("#")===-1?"":t.newURL.substring(t.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${e} path=${a}`,{event:t}),!this.matchRoute(e,a)){o.debug(`HashRouter onRouteChange route=${e} path=${a} does not match`);return}const r=this.getRouteParams(e);await s(e,a,r)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function A(l={}){const t={isAuthenticated:!1,tokenInfo:null,state:"ready",...l},e=i.createStore(t);return e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}function T(l={}){const t={state:"ready",messages:[],threads:[],folders:[],selectedThread:null,nextThreadPageToken:null,previousThreadPageTokens:[],searchQuery:"",hasNextThreadPage:!1,hasPreviousThreadPage:!1,selectedFolder:"inbox",threadsQueryParams:{in:"inbox"},messgeQueryParams:{fields:"include_headers"},...l},e=i.createStore({...t});return e.onChange("nextThreadPageToken",s=>{e.set("hasNextThreadPage",s!==null)}),e.onChange("previousThreadPageTokens",s=>{e.set("hasPreviousThreadPage",s.length>0)}),e.onChange("threadsQueryParams",s=>{e.set("selectedFolder",s.in||"inbox"),e.set("searchQuery",s.search_query_native||"")}),e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}exports.CreateNylasAuthStore=A;exports.CreateNylasMailboxStore=T;exports.HashRouter=S;exports.NylasAuthConnector=g;exports.NylasFoldersConnector=m;exports.NylasMessagesConnector=f;exports.NylasThreadsConnector=w;
1
+ "use strict";const o=require("./utils-5074a070-d5ba6add.cjs"),i=require("./index-b30d446a-cbbef925.cjs");class g{constructor(t,e){this.nylasAuth=t,this.nylasAuthStore=e}async validateSession(){const t=await this.isAccessTokenValid();if(!t)this.logout();else{let e=await this.nylasAuth.getTokenInfo();if(e){const a=Math.floor(Date.now()/1e3);if(e.expires_in&&e.expires_in-a<3e5&&(o.debug("[NylasAuthConnectorMixin] Refreshing access token"),e=await this.nylasAuth.refreshAccessToken(),!e)){o.debug("[NylasAuthConnectorMixin] Token is expired and could not be refreshed. Logging out."),this.logout();return}this.nylasAuthStore.state.tokenInfo=e}}this.nylasAuthStore.state.isAuthenticated=t}async isAuthenticated(){return this.nylasAuth.isAuthenticated()}async getTokenInfo(){return this.nylasAuth.getTokenInfo()}async isAccessTokenValid(){return this.nylasAuth.isAccessTokenValid()}async logout(){await this.nylasAuth.logout()}async getHostedAuthRedirectURL(t,e,s){return this.nylasAuth.getHostedAuthRedirectURL(t,e,s)}async manageHostedAuthCodeExchange(t){const s=new URL(t).searchParams.get("code");if(s){const a=await this.nylasAuth.exchangeAuthCodeForTokenInfo(s);if(a)return this.nylasAuthStore.state.tokenInfo=a,this.nylasAuthStore.state.isAuthenticated=!0,a}return null}}class f{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getMessages(){var n;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");this.nylasMailboxStore.state.state="loading";const t=this.nylasMailboxStore.state.messgeQueryParams,e=new URLSearchParams;for(const h in t){const u=(n=t[h])==null?void 0:n.toString();u&&e.append(h,u)}const s=`/v3/grants/me/messages?${e.toString()}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.messages=r,this.nylasMailboxStore.state.state="ready",r}async getThreadMessages(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest(`/v3/grants/me/messages?thread_id=${t}&fields=include_headers`);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.messages=s,s}downloadMessageAttachments(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=[],s=t.attachments||[];for(const a of s){const r=this.nylasAuth.nylasDownloadFileRequest(`/v3/grants/me/attachments/${a.id}?message_id=${t.id}`);e.push(r)}return e}async summarizeText(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");const e=await this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/summarize","POST",{message:{body:t}},!0,this.nylasAuth.config.elementsApiUri);if(i.Xr(e))throw new i.Zr(e.error);return e.data.summary}async textToSpeech(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing message:read-only scope");return this.nylasAuth.nylasAPIRequest("/v3/grants/me/mailbox/tts","POST",{text:t},!1,this.nylasAuth.config.elementsApiUri,{...e?{signal:e==null?void 0:e.signal}:{}})}}class w{constructor(t,e,s,a){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s,this.router=a}async getThreads(t,e="overwrite",s=!0){var c;if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");s&&(this.nylasMailboxStore.state.state="loading");const a=t||this.nylasMailboxStore.state.threadsQueryParams,r=new URLSearchParams;for(const y in a){const d=(c=a[y])==null?void 0:c.toString();typeof d<"u"&&d!==null&&r.append(y,d)}a.search_query_native?this.router.navigate(`/?query=${a.search_query_native}`,!0):this.nylasMailboxStore.state.threadsQueryParams.search_query_native&&!a.search_query_native&&this.router.navigate("/",!0),a.page_token||(this.nylasMailboxStore.state.previousThreadPageTokens=[]),this.nylasMailboxStore.state.threadsQueryParams=a;const n=`/v3/grants/me/threads?${r.toString()}`,h=await this.nylasAuth.nylasAPIRequest(n);if(i.Xr(h))throw new i.Zr(h.error);const u=h.data;switch(e){case"prepend":this.nylasMailboxStore.state.threads=[...u,...this.nylasMailboxStore.state.threads];break;case"append":this.nylasMailboxStore.state.threads=[...this.nylasMailboxStore.state.threads,...u];break;case"overwrite":default:this.nylasMailboxStore.state.threads=u;break}return h.next_cursor?this.nylasMailboxStore.state.nextThreadPageToken=h.next_cursor:this.nylasMailboxStore.state.nextThreadPageToken=null,s&&(this.nylasMailboxStore.state.state="ready"),u}async getThread(t){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");const e=this.nylasMailboxStore.state.threads.find(n=>n.id===t);if(e)return e;this.nylasMailboxStore.state.state="loading";const s=`/v3/grants/me/threads/${t}`,a=await this.nylasAuth.nylasAPIRequest(s);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.state="ready",r}async nextThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.nextThreadPageToken)throw new Error("No next page token");this.nylasMailboxStore.state.previousThreadPageTokens=Array.from(new Set([...this.nylasMailboxStore.state.previousThreadPageTokens,this.nylasMailboxStore.state.threadsQueryParams.page_token??null]));const s=this.nylasMailboxStore.state.nextThreadPageToken;return this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:s},t,e)}async previousThreadPage(t="overwrite",e=!0){if(!this.nylasMailboxStore.state.previousThreadPageTokens.length)throw new Error("No previous page token");const s=[...this.nylasMailboxStore.state.previousThreadPageTokens],a=s.pop();return this.nylasMailboxStore.state.previousThreadPageTokens=s,this.getThreads({...this.nylasMailboxStore.state.threadsQueryParams,page_token:a??void 0},t,e)}updateThreadQueryParams(t){this.nylasMailboxStore.state.threadsQueryParams={...this.nylasMailboxStore.state.threadsQueryParams,...t}}back(){this.router.navigate("/",!0),this.nylasMailboxStore.state.selectedThread=null}unSelectThread(){this.nylasMailboxStore.state.selectedThread=null}async selectThread(t){this.router.navigate(`/thread/${t.id}`,!0),this.nylasMailboxStore.state.selectedThread=t,t.unread&&this.markThreadAsRead(t).catch(e=>{o.debug("Error marking thread as read",e)})}async markThreadAsRead(t){return this.updateThread(t,{unread:!1})}async updateThread(t,e){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email","modify"))throw new Error("Missing thread:modify scope");const s=`/v3/grants/me/threads/${t.id}`,a=await this.nylasAuth.nylasAPIRequest(s,"PUT",e);if(i.Xr(a))throw new i.Zr(a.error);const r=a.data;return this.nylasMailboxStore.state.threads=this.nylasMailboxStore.state.threads.map(n=>n.id===r.id?r:n),this.nylasMailboxStore.state.selectedThread=r,r}}class m{constructor(t,e,s){this.nylasAuth=t,this.nylasAuthStore=e,this.nylasMailboxStore=s}async getFolders(){if(!this.nylasAuthStore.state.isAuthenticated)throw new Error("Not authenticated");if(!this.nylasAuth.hasScopeByType("email",["read-only","modify"]))throw new Error("Missing thread:read-only scope");this.nylasMailboxStore.state.state="loading";const t="/v3/grants/me/folders",e=await this.nylasAuth.nylasAPIRequest(t);if(i.Xr(e))throw new i.Zr(e.error);const s=e.data;return this.nylasMailboxStore.state.folders=s,this.nylasMailboxStore.state.state="ready",s}async selectFolder(t){this.nylasMailboxStore.state.threadsQueryParams={in:t.id,...this.nylasMailboxStore.state.threadsQueryParams||{}}}}class p extends Event{constructor(t,e){super(t,e),this.oldURL=e.oldURL,this.newURL=e.newURL}}class S{constructor(){this.routeChangeListeners=[],o.debug("HashRouter constructor")}destroy(){o.debug("HashRouter destroy"),window.removeEventListener("hashchange",this.onRouteChange.bind(this))}init(){if(o.debug("HashRouter init"),window.addEventListener("hashchange",this.onRouteChange.bind(this)),typeof HashChangeEvent<"u"){const t=new HashChangeEvent("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}else{const t=new p("hashchange",{oldURL:"",newURL:window.location.href});this.onRouteChange(t)}}addRouteChangeListener(t,e){o.debug("HashRouter addRouteChangeListener"),this.routeChangeListeners.push([t,e])}navigate(t,e){if(o.debug("HashRouter navigate"),e)return window.history.pushState(null,"",`#${t}`);window.location.hash=t}setRoute(t){o.debug("HashRouter setRoute"),window.location.hash=t}matchRoute(t,e){const s=t.split("/"),a=e.split("/");if(o.debug(`HashRouter matchRoute route=${t} path=${e}`,{routeParts:s,pathParts:a}),s[1]===""&&a[0]==="")return!0;if(s.length!==a.length)return!1;for(let r=0;r<s.length;r++){const n=s[r],h=a[r];if(!n.startsWith(":")&&n!==h)return!1}return!0}getRouteParams(t){o.debug("HashRouter getRouteParams");const e={},s=t.split("/"),a=window.location.hash.split("/");return s.forEach((r,n)=>{if(r.startsWith(":")){const h=r.substring(1);e[h]=a[n]}}),e}getRouteWithParams(t,e){o.debug("HashRouter getRouteWithParams");let s=t;return Object.keys(e).forEach(a=>{s=s.replace(`:${a}`,e[a])}),s}getRoute(){return o.debug("HashRouter getRoute"),window.location.hash}onRouteChange(t){this.routeChangeListeners.forEach(async([e,s])=>{const a=t.newURL.indexOf("#")===-1?"":t.newURL.substring(t.newURL.indexOf("#")+1);if(o.debug(`HashRouter onRouteChange route=${e} path=${a}`,{event:t}),!this.matchRoute(e,a)){o.debug(`HashRouter onRouteChange route=${e} path=${a} does not match`);return}const r=this.getRouteParams(e);await s(e,a,r)})}getBasePath(){return o.debug("HashRouter getBasePath"),""}}function A(l={}){const t={isAuthenticated:!1,tokenInfo:null,state:"ready",...l},e=i.createStore(t);return e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}function T(l={}){const t={state:"ready",messages:[],threads:[],folders:[],selectedThread:null,nextThreadPageToken:null,previousThreadPageTokens:[],searchQuery:"",hasNextThreadPage:!1,hasPreviousThreadPage:!1,selectedFolder:"inbox",threadsQueryParams:{in:"inbox"},messgeQueryParams:{fields:"include_headers"},...l},e=i.createStore({...t});return e.onChange("nextThreadPageToken",s=>{e.set("hasNextThreadPage",s!==null)}),e.onChange("previousThreadPageTokens",s=>{e.set("hasPreviousThreadPage",s.length>0)}),e.onChange("threadsQueryParams",s=>{e.set("selectedFolder",s.in||"inbox"),e.set("searchQuery",s.search_query_native||"")}),e.reset=()=>{for(const s in t){const a=t[s];e.set(s,a)}},e}exports.CreateNylasAuthStore=A;exports.CreateNylasMailboxStore=T;exports.HashRouter=S;exports.NylasAuthConnector=g;exports.NylasFoldersConnector=m;exports.NylasMessagesConnector=f;exports.NylasThreadsConnector=w;
@@ -1,5 +1,5 @@
1
1
  import { d as o } from "./utils-5074a070-ce33ee6b.js";
2
- import { c as f, X as u, Z as d } from "./index-b30d446a-e0eaccad.js";
2
+ import { c as f, X as u, Z as d } from "./index-b30d446a-a90f84b2.js";
3
3
  class S {
4
4
  constructor(t, e) {
5
5
  this.nylasAuth = t, this.nylasAuthStore = e;
@@ -1,5 +1,5 @@
1
- import { r as O0, c as w, h as q, H as F, g as HM, F as YM } from "./index-98d3a4da.js";
2
- import { R as L0 } from "./register-component-152c6ad2-418db864.js";
1
+ import { r as O0, c as w, h as q, H as F, g as HM, F as YM } from "./index-630f4e87.js";
2
+ import { R as L0 } from "./register-component-152c6ad2-a06f58c2.js";
3
3
  import { d as T, m as jM, n as GM, o as f0, q as k1 } from "./utils-5074a070-ce33ee6b.js";
4
4
  import { c as VM, g as KM } from "./_commonjsHelpers-57e89916-af061c86.js";
5
5
  import { t as $1, d as QM, c as a1 } from "./duration-bddc4a13-179ce826.js";
@@ -3802,7 +3802,7 @@ q3([
3802
3802
  w1("design:returntype", void 0)
3803
3803
  ], hM.prototype, "render", null);
3804
3804
  hM.style = o3;
3805
- const e3 = ":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}sp-theme{height:100%}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:0.5rem;box-sizing:border-box;border-top:1px solid var(--nylas-base-100)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-600);border:1px solid var(--nylas-base-300)}sp-button.back:hover{border-color:var(--nylas-primary)}sp-button.back:active{border:2px solid var(--nylas-base-800)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}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:1px solid var(--nylas-base-300);border-radius:0 var(--nylas-border-radius-2x) var(--nylas-border-radius-2x) 0;height:calc(100% - 4px);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].error,input[type=email].error{color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}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}", W3 = e3;
3805
+ const e3 = ":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}sp-theme{height:100%}.nylas-booking-form{width:100%;padding:1.5rem;box-sizing:border-box;height:450px;overflow-y:auto;height:100%}form{height:100%;display:flex;flex-direction:column;justify-content:space-between;align-items:center}sp-textfield{--spectrum-corner-radius-100:var(--nylas-border-radius-2x);--spectrum-textfield-border-color:var(--nylas-base-300);position:relative;width:100%;height:48px;margin-bottom:16px;color:var(--nylas-base-500)}.cta{width:100%;display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;gap:0.5rem;padding:0.5rem;box-sizing:border-box;border-top:1px solid var(--nylas-base-100)}@media screen and (max-width: 768px){.cta{flex-direction:column-reverse}}sp-button{background-color:transparent;color:var(--nylas-base-800);border-radius:var(--nylas-border-radius-2x);--button-width:50%}@media screen and (max-width: 768px){sp-button{--button-width:100%}}sp-button:hover{background-color:var(--nylas-base-100);color:var(--nylas-primary);border-radius:var(--nylas-border-radius-2x)}sp-button:active{background-color:var(--nylas-base-200);color:var(--nylas-base-800)}sp-button.back{width:var(--button-width);background-color:transparent;color:var(--nylas-base-600);border:1px solid var(--nylas-base-300)}sp-button.back:hover{border-color:var(--nylas-primary)}sp-button.back:active{border:2px solid var(--nylas-base-800)}sp-button.book{width:var(--button-width);background-color:var(--nylas-primary);color:var(--nylas-base-0)}sp-button.book:hover{background-color:var(--nylas-base-600)}sp-button.book:active{background-color:var(--nylas-base-800)}.input-wrapper{width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:4px;margin-bottom:1rem}.input-wrapper .help-text{margin:0;color:var(--nylas-error)}.button-wrapper{width:100%;align-items:flex-start;height:max-content;position:relative}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: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].error,input[type=email].error{color:var(--nylas-base-25);border-radius:var(--nylas-border-radius-2x);font-weight:600;border-color:var(--nylas-error);border-width:2px}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}", W3 = e3;
3806
3806
  var a3 = function(M, b, z, p) {
3807
3807
  var O = arguments.length, c = O < 3 ? b : p === null ? p = Object.getOwnPropertyDescriptor(b, z) : p, A;
3808
3808
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function")