@remit/web-client-dist 0.0.330 → 0.0.331

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 (100) hide show
  1. package/assets/{BriefPane-C1eqvaCk.js → BriefPane-B4OnBw7A.js} +1 -1
  2. package/assets/{ErrorState-Xgz5SZ1i.js → ErrorState-9wFdKXpo.js} +1 -1
  3. package/assets/{FlaggedPane-CHjYkYPa.js → FlaggedPane-VNYPSCvj.js} +1 -1
  4. package/assets/{MailListHeader-XjtEHsNb.js → MailListHeader-CA5lvtZs.js} +8 -8
  5. package/assets/{MailViewChrome-DzdQIg9X.js → MailViewChrome-D-68x2uE.js} +1 -1
  6. package/assets/{MailboxPane-zOiUq9W3.js → MailboxPane-BWOjvlNs.js} +1 -1
  7. package/assets/{NavMenuButton-DoGvk8wx.js → NavMenuButton-cseqHrgr.js} +1 -1
  8. package/assets/{OnboardingWizard-C2iCTPCo.js → OnboardingWizard-DAdN9w-x.js} +1 -1
  9. package/assets/{OutboxPane-CAD8JF4k.js → OutboxPane-VocIZWXW.js} +1 -1
  10. package/assets/_mailboxId-BYy5x0wE.js +1 -0
  11. package/assets/_messageId-0tY_nYQ1.js +1 -0
  12. package/assets/_messageId-C7Dc1hnG.js +1 -0
  13. package/assets/_messageId-C8LAzwtA.js +1 -0
  14. package/assets/_outboxMessageId-BHx_kFyq.js +1 -0
  15. package/assets/_threadId-BpoqHy6Q.js +1 -0
  16. package/assets/_threadId-Dcpkewj-.js +1 -0
  17. package/assets/_threadId-QRWabVsi.js +1 -0
  18. package/assets/{account-form-helpers-Buy_HBYK.js → account-form-helpers-COfJkI9V.js} +1 -1
  19. package/assets/{accounts-BzJANMcx.js → accounts-CZ83UwON.js} +1 -1
  20. package/assets/{advanced-3PVpC1JX.js → advanced-CIk7-tvi.js} +1 -1
  21. package/assets/{appearance-irISnZrI.js → appearance-DamZUddD.js} +1 -1
  22. package/assets/{avatar-sJ32b2ZB.js → avatar-BvDbtKy6.js} +1 -1
  23. package/assets/{bottom-sheet-Du7lm3N2.js → bottom-sheet-0UhJ47Gv.js} +1 -1
  24. package/assets/brief-CAe8f7q6.js +1 -0
  25. package/assets/{brief-qI-Ns5Ua.js → brief-JcrOpUjt.js} +1 -1
  26. package/assets/{browser-ponyfill-IzUT47To.js → browser-ponyfill-CU-pwafu.js} +1 -1
  27. package/assets/{circle-check-B0efcy-K.js → circle-check-Bxbx7HfB.js} +1 -1
  28. package/assets/{circle-check-big-D3RJmZBi.js → circle-check-big-CjzecMB6.js} +1 -1
  29. package/assets/{circle-help-DNaIbW9w.js → circle-help-BK_hzj_i.js} +1 -1
  30. package/assets/{clock-CAIXj_wn.js → clock-B1X_i57Q.js} +1 -1
  31. package/assets/{confirm-dialog-tg4IO863.js → confirm-dialog-Dh8sRH0e.js} +1 -1
  32. package/assets/{download-CZYAEXR3.js → download-CZ0V6I3x.js} +1 -1
  33. package/assets/{filters-D_4-GKkF.js → filters-CdfgcLH2.js} +1 -1
  34. package/assets/flagged-5fgl4f2w.js +1 -0
  35. package/assets/{flagged-Cao7LXlK.js → flagged-DZMd8zSP.js} +1 -1
  36. package/assets/{folders-DdNR5vUs.js → folders-CWWWGsQ5.js} +1 -1
  37. package/assets/index-B3m_6Q-7.js +1 -0
  38. package/assets/index-C7Dc1hnG.js +1 -0
  39. package/assets/index-C8LAzwtA.js +1 -0
  40. package/assets/index-CHntB8XM.js +1 -0
  41. package/assets/index-DIEk2vzA.js +1 -0
  42. package/assets/index-DdWkZUge.js +1 -0
  43. package/assets/index-DgAf2bQz.js +1 -0
  44. package/assets/index-DuJrRaFE.js +1 -0
  45. package/assets/{index-B_E2UDsv.js → index-tka6wZr_.js} +4 -4
  46. package/assets/{kbd-BCoy2IeN.js → kbd-Dt_vzEGr.js} +1 -1
  47. package/assets/{labels-DEWxeP4-.js → labels-DIFvP3py.js} +1 -1
  48. package/assets/{mail-K056GElV.js → mail-O6_yrku3.js} +1 -1
  49. package/assets/{menu-CyQNIqgm.js → menu-DAXEVDbj.js} +1 -1
  50. package/assets/{move-options-BDhHrsb6.js → move-options-MgiRekSU.js} +1 -1
  51. package/assets/{nav-link-D2neGN8U.js → nav-link-CBO_nghm.js} +1 -1
  52. package/assets/{onboarding-gCMR_L2A.js → onboarding-BY09gnzV.js} +1 -1
  53. package/assets/outbox-CvxSD7ed.js +1 -0
  54. package/assets/{pencil-BTDLG6o9.js → pencil-B5Es_aSh.js} +1 -1
  55. package/assets/rich-text-DmHS1zFG.js +29 -0
  56. package/assets/rich-text-spellcheck-words-C1Zx88ZY.js +1 -0
  57. package/assets/rich-text-spellcheck-worker-C399ph5r.js +1 -0
  58. package/assets/rich-text-spellcheck-worker-provider-CYQ5Q4f9.js +1 -0
  59. package/assets/{rotate-ccw-CJ6ZyB3Y.js → rotate-ccw-Bez3srEV.js} +1 -1
  60. package/assets/{row-actions-D5tHz-Kt.js → row-actions-Bqp5HmTh.js} +1 -1
  61. package/assets/{search-scope-5RASGpum.js → search-scope-By6SdCOd.js} +1 -1
  62. package/assets/{search-token-index-C4Fe_kHI.js → search-token-index-Bw0eYLiL.js} +1 -1
  63. package/assets/{search-view-DMyiUtsQ.js → search-view-Cv6MXaNP.js} +1 -1
  64. package/assets/{senders-bpUhaM6M.js → senders-FBv_d32p.js} +1 -1
  65. package/assets/settings-C-JiUEpC.js +1 -0
  66. package/assets/{settings-screen-t6UPYsh-.js → settings-screen-ClWEZnOS.js} +1 -1
  67. package/assets/{shield-check-CdGNmVbB.js → shield-check-C78q6yIg.js} +1 -1
  68. package/assets/{suggested-vips-MyOxkJXk.js → suggested-vips-BFYmT1iv.js} +1 -1
  69. package/assets/{use-match-media-oLZSDQbf.js → use-match-media-BrJFrufZ.js} +1 -1
  70. package/assets/{useDebouncedValue-BFQNA4LE.js → useDebouncedValue-DiRlxnWS.js} +1 -1
  71. package/assets/{useFilters-Ch0Rz-QY.js → useFilters-Cafs9rMu.js} +1 -1
  72. package/assets/{useLabels-C_RuDPDr.js → useLabels-Dg_FXfB1.js} +1 -1
  73. package/assets/{useRefreshControl-B5Wc-mkG.js → useRefreshControl-BHJbdmbT.js} +1 -1
  74. package/assets/{useSearchMirror-4nvtBo0Y.js → useSearchMirror-Df_I-_ih.js} +1 -1
  75. package/assets/{useSearchTokenContext-DFAPyUzs.js → useSearchTokenContext-B60LlfMs.js} +1 -1
  76. package/assets/{useSemanticSearch-DpJZep87.js → useSemanticSearch-ocRX-T7M.js} +1 -1
  77. package/assets/{useSignature-CUY9s-pk.js → useSignature-BboURLQ5.js} +1 -1
  78. package/index.html +1 -1
  79. package/package.json +1 -1
  80. package/assets/_mailboxId-Btckx8tp.js +0 -1
  81. package/assets/_messageId-BDYmbwt3.js +0 -1
  82. package/assets/_messageId-DfrVM9nA.js +0 -1
  83. package/assets/_messageId-Dzj1PERE.js +0 -1
  84. package/assets/_outboxMessageId-DgEN5BZl.js +0 -1
  85. package/assets/_threadId-CR-7fZw6.js +0 -1
  86. package/assets/_threadId-DgpxvW8b.js +0 -1
  87. package/assets/_threadId-WgMhSWLQ.js +0 -1
  88. package/assets/brief-CzT_8oMU.js +0 -1
  89. package/assets/flagged-DgBNfl93.js +0 -1
  90. package/assets/index-BIP9pzjX.js +0 -1
  91. package/assets/index-C7lRyAZj.js +0 -1
  92. package/assets/index-DDYDIsO2.js +0 -1
  93. package/assets/index-DarLHUir.js +0 -1
  94. package/assets/index-DfrVM9nA.js +0 -1
  95. package/assets/index-DgcxbW2K.js +0 -1
  96. package/assets/index-Dzj1PERE.js +0 -1
  97. package/assets/index-T_2lKmJ5.js +0 -1
  98. package/assets/outbox-CyCx1pkU.js +0 -1
  99. package/assets/rich-text-6u8XzJZ0.js +0 -29
  100. package/assets/settings-CVQVSphQ.js +0 -1
@@ -0,0 +1 @@
1
+ const v=(t,n)=>{const r=new Map,s=new Map,o=new Set;let a={state:"opening",language:t};const d=(e,c)=>{const l=s.get(e);l&&(s.delete(e),l.abandon(new Error(c)))},i=e=>{for(const c of[...s.keys()])d(c,e)},u=e=>{a=e;for(const c of o)c(e)};return n.listen(e=>{if(e.type==="ready"){u({state:"ready",language:t});return}if(e.type==="failed"){u({state:"failed",language:t,reason:e.reason,detail:e.detail}),i(e.detail);return}if(e.type==="suggested"){const l=s.get(e.requestId);if(!l)return;s.delete(e.requestId),l.settle({requestId:e.requestId,word:e.word,suggestions:e.suggestions});return}const c=r.get(e.requestId);c&&(r.delete(e.requestId),c({requestId:e.requestId,revision:e.revision,findings:e.findings}))}),n.fail(e=>{u({state:"failed",language:t,reason:"worker",detail:e}),i(e)}),n.post({type:"open",language:t}),{language:t,onStatus:e=>(o.add(e),e(a),()=>{o.delete(e)}),check:e=>new Promise(c=>{r.set(e.requestId,c),n.post({type:"check",...e})}),suggest:e=>new Promise((c,l)=>{const f=setTimeout(()=>d(e.requestId,`no suggestions for "${e.word}" within 5000ms`),5e3);s.set(e.requestId,{settle:p=>{clearTimeout(f),c(p)},abandon:p=>{clearTimeout(f),l(p)}}),n.post({type:"suggest",...e})}),close:()=>{r.clear(),i("the checker closed"),o.clear(),n.terminate()}}},b=5,w=new Set(["a","about","address","after","afternoon","again","agenda","all","already","also","always","an","and","answer","any","apologies","approved","are","as","at","attached","available","be","because","been","before","both","budget","but","by","calendar","call","can","change","client","colleague","come","confirm","could","customer","day","deadline","decision","definitely","delivery","did","do","document","does","done","down","draft","each","email","end","environment","even","every","few","figures","find","first","follow","for","forward","friday","from","get","give","go","good","had","has","have","he","help","her","here","him","his","how","i","if","in","into","invoice","is","it","its","just","keep","know","last","let","like","long","look","made","make","many","may","me","meeting","message","month","more","morning","most","much","must","my","necessary","need","new","next","no","not","note","notes","now","number","numbers","occurred","of","off","office","on","once","one","only","or","other","our","out","over","own","page","payment","people","please","presentation","price","process","product","project","put","quarter","question","read","ready","receipt","receive","received","recommend","regards","report","review","right","same","say","schedule","see","send","sent","separate","service","she","should","show","since","so","some","sorry","still","such","summary","support","take","team","tell","than","thanks","that","the","their","them","then","there","these","they","thing","think","this","those","through","time","to","today","together","tomorrow","too","two","up","update","us","use","version","very","want","was","way","we","week","welcome","well","were","what","when","where","which","while","who","why","will","with","word","work","would","year","yes","you","your"]),y=new Map([["en",w]]),k=t=>y.get(t.toLowerCase().split("-")[0])??null,m=t=>t.toLowerCase().replace(/’/g,"'"),h=2,g=(t,n)=>{let r=[],s=Array.from({length:n.length+1},(o,a)=>a);for(let o=1;o<=t.length;o+=1){const a=[o];let d=o;for(let i=1;i<=n.length;i+=1){const u=t[o-1]===n[i-1]?0:1;let e=Math.min(a[i-1]+1,s[i]+1,s[i-1]+u);o>1&&i>1&&t[o-1]===n[i-2]&&t[o-2]===n[i-1]&&(e=Math.min(e,r[i-2]+1)),a[i]=e,e<d&&(d=e)}if(d>h)return h+1;r=s,s=a}return s[n.length]},I=(t,n)=>{let r=0;for(;r<t.length&&r<n.length&&t[r]===n[r];)r+=1;return r},S=(t,n)=>{const r=t.toUpperCase();return t===r&&t!==t.toLowerCase()?n.toUpperCase():t[0]===r[0]&&t[0]!==t.toLowerCase()[0]?n[0].toUpperCase()+n.slice(1):n},E=(t,n)=>{const r=m(t);if(r.length<2||n.has(r))return[];const s=[];for(const o of n){if(Math.abs(o.length-r.length)>h)continue;const a=g(r,o);a>h||s.push({candidate:o,distance:a,prefix:I(r,o)})}return s.sort((o,a)=>o.distance-a.distance||a.prefix-o.prefix||o.candidate.localeCompare(a.candidate)),s.slice(0,5).map(({candidate:o})=>S(t,o))};export{b as S,k as d,m as n,v as o,E as s};
@@ -0,0 +1 @@
1
+ (function(){"use strict";const g=new Set(["a","about","address","after","afternoon","again","agenda","all","already","also","always","an","and","answer","any","apologies","approved","are","as","at","attached","available","be","because","been","before","both","budget","but","by","calendar","call","can","change","client","colleague","come","confirm","could","customer","day","deadline","decision","definitely","delivery","did","do","document","does","done","down","draft","each","email","end","environment","even","every","few","figures","find","first","follow","for","forward","friday","from","get","give","go","good","had","has","have","he","help","her","here","him","his","how","i","if","in","into","invoice","is","it","its","just","keep","know","last","let","like","long","look","made","make","many","may","me","meeting","message","month","more","morning","most","much","must","my","necessary","need","new","next","no","not","note","notes","now","number","numbers","occurred","of","off","office","on","once","one","only","or","other","our","out","over","own","page","payment","people","please","presentation","price","process","product","project","put","quarter","question","read","ready","receipt","receive","received","recommend","regards","report","review","right","same","say","schedule","see","send","sent","separate","service","she","should","show","since","so","some","sorry","still","such","summary","support","take","team","tell","than","thanks","that","the","their","them","then","there","these","they","thing","think","this","those","through","time","to","today","together","tomorrow","too","two","up","update","us","use","version","very","want","was","way","we","week","welcome","well","were","what","when","where","which","while","who","why","will","with","word","work","would","year","yes","you","your"]),d=new Map([["en",g]]),u=e=>d.get(e.toLowerCase().split("-")[0])??null,p=e=>e.toLowerCase().replace(/’/g,"'"),f=(e,n)=>{const s=new RegExp("\\p{L}[\\p{L}\\p{M}'’]*","gu"),r=[];let t=s.exec(e);for(;t;){const o=t[0];o.length>1&&!n.has(p(o))&&r.push({start:t.index,end:t.index+o.length}),t=s.exec(e)}return r},l=2,m=(e,n)=>{let s=[],r=Array.from({length:n.length+1},(t,o)=>o);for(let t=1;t<=e.length;t+=1){const o=[t];let h=t;for(let a=1;a<=n.length;a+=1){const b=e[t-1]===n[a-1]?0:1;let i=Math.min(o[a-1]+1,r[a]+1,r[a-1]+b);t>1&&a>1&&e[t-1]===n[a-2]&&e[t-2]===n[a-1]&&(i=Math.min(i,s[a-2]+1)),o[a]=i,i<h&&(h=i)}if(h>l)return l+1;s=r,r=o}return r[n.length]},w=(e,n)=>{let s=0;for(;s<e.length&&s<n.length&&e[s]===n[s];)s+=1;return s},y=(e,n)=>{const s=e.toUpperCase();return e===s&&e!==e.toLowerCase()?n.toUpperCase():e[0]===s[0]&&e[0]!==e.toLowerCase()[0]?n[0].toUpperCase()+n.slice(1):n},v=(e,n)=>{const s=p(e);if(s.length<2||n.has(s))return[];const r=[];for(const t of n){if(Math.abs(t.length-s.length)>l)continue;const o=m(s,t);o>l||r.push({candidate:t,distance:o,prefix:w(s,t)})}return r.sort((t,o)=>t.distance-o.distance||o.prefix-t.prefix||t.candidate.localeCompare(o.candidate)),r.slice(0,5).map(({candidate:t})=>y(e,t))},I=e=>{const n=u(e.language);return n?e.spans.flatMap(s=>f(s.text,n).map(r=>({spanId:s.spanId,start:r.start,end:r.end,kind:"spelling",suggestions:[]}))):[]},c=globalThis;c.addEventListener("message",({data:e})=>{if(e.type==="open"){c.postMessage({type:"ready",language:e.language});return}if(e.type==="suggest"){const n=u(e.language);c.postMessage({type:"suggested",requestId:e.requestId,word:e.word,suggestions:n?v(e.word,n):[]});return}c.postMessage({type:"checked",requestId:e.requestId,revision:e.revision,findings:I(e)})})})();
@@ -0,0 +1 @@
1
+ import{d as s,o}from"./rich-text-spellcheck-words-C1Zx88ZY.js";const n=e=>({post:r=>e.postMessage(r),listen:r=>e.addEventListener("message",t=>r(t.data)),fail:r=>e.addEventListener("error",t=>r(t.message)),terminate:()=>e.terminate()}),i=async e=>{if(!s(e))return null;const r=new Worker(new URL("/assets/rich-text-spellcheck-worker-C399ph5r.js",import.meta.url),{type:"module"});return o(e,n(r))};export{i as openSpellcheckWorker};
@@ -1 +1 @@
1
- import{c as t}from"./index-B_E2UDsv.js";const e=t("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);export{e as R};
1
+ import{c as t}from"./index-tka6wZr_.js";const e=t("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);export{e as R};
@@ -1 +1 @@
1
- import{r as e,j as l,B as b,b as y,an as x}from"./index-B_E2UDsv.js";const i=()=>l.jsx(x,{className:"size-3.5 animate-spin"}),m=(s,n)=>n?l.jsx("span",{className:"sr-only",children:s}):s;function p({actions:s=[],destructive:n,className:o}){const[f,r]=e.useState(!1);return f&&n?.confirm?l.jsxs("div",{className:y("flex items-center gap-2",o),children:[l.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),l.jsx(b,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:n.confirm.cancelLabel??"Cancel"}),l.jsx(b,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?i():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):l.jsxs("div",{className:y("flex items-center gap-2",o),children:[s.map(a=>l.jsx(b,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?i():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:m(a.label,a.iconOnly)},a.label)),n&&l.jsx(b,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?i():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){r(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:m(n.label,n.iconOnly)})]})}export{p as R};
1
+ import{r as e,j as l,B as b,b as y,an as x}from"./index-tka6wZr_.js";const i=()=>l.jsx(x,{className:"size-3.5 animate-spin"}),m=(s,n)=>n?l.jsx("span",{className:"sr-only",children:s}):s;function p({actions:s=[],destructive:n,className:o}){const[f,r]=e.useState(!1);return f&&n?.confirm?l.jsxs("div",{className:y("flex items-center gap-2",o),children:[l.jsx("span",{className:"text-xs text-fg-muted",children:n.confirm.prompt}),l.jsx(b,{variant:"secondary",size:"sm",onClick:()=>r(!1),children:n.confirm.cancelLabel??"Cancel"}),l.jsx(b,{variant:"danger",size:"sm","aria-busy":n.busy,icon:n.busy?i():void 0,onClick:()=>{n.busy||n.onClick()},children:n.busy?n.busyLabel??"Working…":n.confirm.confirmLabel??n.label})]}):l.jsxs("div",{className:y("flex items-center gap-2",o),children:[s.map(a=>l.jsx(b,{variant:a.variant??"ghost",size:"sm","aria-busy":a.busy,"aria-label":a.iconOnly?a.label:void 0,icon:a.busy?i():a.icon,onClick:()=>{a.busy||a.onClick()},children:a.busy&&a.busyLabel?a.busyLabel:m(a.label,a.iconOnly)},a.label)),n&&l.jsx(b,{variant:"ghost",size:"sm","aria-busy":n.busy,"aria-label":n.iconOnly?n.label:void 0,icon:n.busy?i():n.icon,onClick:()=>{if(!n.busy){if(n.confirm){r(!0);return}n.onClick()}},children:n.busy&&n.busyLabel?n.busyLabel:m(n.label,n.iconOnly)})]})}export{p as R};
@@ -1 +1 @@
1
- import{c8 as n,cZ as s,c_ as u,c$ as r}from"./index-B_E2UDsv.js";function f(e){const t=n({warn:e?.router===void 0}),o=e?.router||t;return s(o.stores.__store,u(e,o))}const i="search-scope";function c(e){const t=e.trim().replace(/\s+/g," ").toLowerCase();return/\s/.test(t)?`in:"${t}"`:`in:${t}`}function a(e){const t=r(e);return t!==void 0&&t.list!=="brief"}function l(e){const t=r(e);return t?.list==="mailbox"?t.mailboxId:void 0}function b(e){const t=l(e.matches);return t||(a(e.matches)?e.callerMailboxId:e.callerMailboxId??e.inTokenMailboxId)}function p(e,t){const o=r(e);return o?.list==="flagged"?{kind:"scoped",chip:{id:i,label:"is:starred"}}:o?.list==="outbox"?{kind:"scoped",chip:{id:i,label:"in:outbox"}}:o?.list==="mailbox"?t?{kind:"scoped",chip:{id:i,label:c(t)}}:{kind:"pending"}:{kind:"global"}}function x(e,t,o){return t.kind==="global"?{kind:"global"}:r(e)?.list==="flagged"?{kind:"collection"}:{kind:"folder",...o?{role:o}:{}}}export{i as S,x as a,p as b,a as i,l as r,b as s,f as u};
1
+ import{c8 as n,cZ as s,c_ as u,c$ as r}from"./index-tka6wZr_.js";function f(e){const t=n({warn:e?.router===void 0}),o=e?.router||t;return s(o.stores.__store,u(e,o))}const i="search-scope";function c(e){const t=e.trim().replace(/\s+/g," ").toLowerCase();return/\s/.test(t)?`in:"${t}"`:`in:${t}`}function a(e){const t=r(e);return t!==void 0&&t.list!=="brief"}function l(e){const t=r(e);return t?.list==="mailbox"?t.mailboxId:void 0}function b(e){const t=l(e.matches);return t||(a(e.matches)?e.callerMailboxId:e.callerMailboxId??e.inTokenMailboxId)}function p(e,t){const o=r(e);return o?.list==="flagged"?{kind:"scoped",chip:{id:i,label:"is:starred"}}:o?.list==="outbox"?{kind:"scoped",chip:{id:i,label:"in:outbox"}}:o?.list==="mailbox"?t?{kind:"scoped",chip:{id:i,label:c(t)}}:{kind:"pending"}:{kind:"global"}}function x(e,t,o){return t.kind==="global"?{kind:"global"}:r(e)?.list==="flagged"?{kind:"collection"}:{kind:"folder",...o?{role:o}:{}}}export{i as S,x as a,p as b,a as i,l as r,b as s,f as u};
@@ -1 +1 @@
1
- import{c as A,r as u,j as m,g as V,b as I,cM as z,X as G,K as N,D as j,l as $,t as X,v as F,w as q,z as W,E as J,p as Y,o as Z,cn as R}from"./index-B_E2UDsv.js";import{u as ee,b as te,S as ne}from"./search-scope-5RASGpum.js";import{u as L}from"./use-match-media-oLZSDQbf.js";import{D as oe}from"./layout-breakpoints-BWjiUQKh.js";const Ie=A("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);const Ne=A("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),re=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function Te(e){return re.filter(t=>e[t.action]!==void 0)}const se=[{title:"Navigation",hints:[{action:"focusNext",keys:["j"],description:"Focus next message"},{action:"focusPrevious",keys:["k"],description:"Focus previous message"},{action:"focusNext",keys:["↓"],description:"Focus next message"},{action:"focusPrevious",keys:["↑"],description:"Focus previous message"},{action:"focusFirst",keys:["Home"],description:"Focus first"},{action:"focusLast",keys:["End"],description:"Focus last"},{action:"openFocused",keys:["Enter"],description:"Open focused thread"},{action:"back",keys:["Esc"],description:"Back / close overlay"}]},{title:"Selection",hints:[{action:"toggleSelect",keys:["x"],description:"Toggle select"},{action:"toggleSelect",keys:["Space"],description:"Toggle select"},{action:"extendSelectDown",keys:["Shift","j"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","k"],description:"Extend selection up"},{action:"extendSelectDown",keys:["Shift","↓"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","↑"],description:"Extend selection up"},{action:"selectAll",keys:["⌘","A"],description:"Select all"}]},{title:"Actions",hints:[{action:"reply",keys:["r"],description:"Reply"},{action:"replyAll",keys:["a"],description:"Reply all"},{action:"forward",keys:["f"],description:"Forward"},{action:"delete",keys:["#"],description:"Delete"},{action:"toggleStar",keys:["s"],description:"Star / unstar"},{action:"toggleRead",keys:["u"],description:"Toggle read / unread"}]},{title:"Sender",hints:[{action:"muteSender",keys:["m"],description:"Mute sender"},{action:"blockSender",keys:["b"],description:"Block sender"},{action:"vipSender",keys:["v"],description:"VIP sender"},{action:"markJunk",keys:["!"],description:"Mark junk"}]},{title:"Go to",hints:[{action:"goBrief",keys:["g","b"],description:"Daily brief"},{action:"goInbox",keys:["g","i"],description:"Inbox"},{action:"goSent",keys:["g","s"],description:"Sent"},{action:"goFlagged",keys:["g","f"],description:"Starred"},{action:"goSettings",keys:["g",","],description:"Settings"}]},{title:"View & global",hints:[{action:"toggleIntelligence",keys:["i"],description:"Toggle intelligence"},{action:"toggleDensity",keys:["d"],description:"Toggle density"},{action:"focusSearch",keys:["/"],description:"Focus search"},{action:"compose",keys:["c"],description:"Compose"},{action:"compose",keys:["⌘","N"],description:"Compose"},{action:"help",keys:["?"],description:"Shortcut help"}]}];function ie(e){for(const t of se){const n=t.hints.find(r=>r.action===e);if(n)return n.keys}}function ae(e){const t=ie(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function De(e){const t=ae(e);return t===""?"":`(${t})`}const b={action:null,nextPrefix:null,preventDefault:!1},ce={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},le={j:{action:"focusNext"},k:{action:"focusPrevious"},arrowdown:{action:"focusNext"},arrowup:{action:"focusPrevious"},home:{action:"focusFirst"},end:{action:"focusLast"},enter:{action:"openFocused"}," ":{action:"toggleSelect"},delete:{action:"delete"},backspace:{action:"delete"},u:{action:"toggleRead"},x:{action:"toggleSelect"},r:{action:"reply"},a:{action:"replyAll"},f:{action:"forward"},"#":{action:"delete"},s:{action:"toggleStar"},m:{action:"muteSender"},b:{action:"blockSender"},v:{action:"vipSender"},"!":{action:"markJunk"},i:{action:"toggleIntelligence"},d:{action:"toggleDensity"},"/":{action:"focusSearch"},c:{action:"compose"},"?":{action:"help"}};function ue(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...b,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...b,nextPrefix:t==="g"?null:t};if(r&&n==="n")return{action:"compose",nextPrefix:null,preventDefault:!0};if(r&&n==="a")return{action:"selectAll",nextPrefix:null,preventDefault:!0};if(r)return{...b,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const a=ce[n===","?",":n]??null;return{action:a,nextPrefix:null,preventDefault:a!==null}}if(n==="g"&&!e.shiftKey)return{action:null,nextPrefix:"g",preventDefault:!0};if(e.shiftKey){const s=n==="j"||n==="arrowdown";if(s||(n==="k"||n==="arrowup"))return{action:s?"extendSelectDown":"extendSelectUp",nextPrefix:null,preventDefault:!0}}const o=le[n];if(o){const s=o.requireShift===!0,a=n.length===1&&!/[a-z0-9]/.test(n);return!s&&e.shiftKey&&!a?b:{action:o.action,nextPrefix:null,preventDefault:!0}}return b}function fe(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const de="data-message-row",pe='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function me(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(pe);return t?!t.hasAttribute(de):!1}function he({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:r,hasValue:o,chipCount:s}){const a=s-1;return e==="Escape"?o?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?s===0?{type:"none"}:{type:"focusChip",index:a}:e==="Backspace"||e==="ArrowLeft"?!r||s===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:a}:{type:"none"}}function ye({key:e,repeat:t=!1,index:n,chipCount:r}){return e==="Backspace"||e==="Delete"?t?{type:"none"}:{type:"removeChip",index:n}:e==="ArrowLeft"?n===0?{type:"none"}:{type:"focusChip",index:n-1}:e==="ArrowRight"?n>=r-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function ge(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const xe=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,be=({chips:e=[],onRemoveChip:t,value:n,onChange:r,onClear:o,onClearQuery:s,placeholder:a="Search mail...",globalFocusKey:c=!0,showClearButton:f=!0,size:h="sm",inputId:p,suggest:d,className:x})=>{const O=u.useId(),T=p??O,k=u.useRef(null),D=u.useRef([]),P=s??o,[K,w]=u.useState(null),C=u.useRef(void 0),[B,H]=u.useState(""),E=e.length>0;u.useEffect(()=>{w(i=>i!==null&&i>=e.length?null:i)},[e.length]),u.useEffect(()=>{const i=C.current;if(i!==void 0){if(C.current=void 0,i===null){k.current?.focus();return}D.current[i]?.focus()}});const M=u.useRef(void 0);u.useEffect(()=>{const i=d?.caret;if(!i||i===M.current)return;M.current=i;const l=k.current;!l||l.ownerDocument.activeElement!==l||(l.setSelectionRange(i.cursor,i.cursor),d?.onCaretChange(i.cursor))});const S=i=>{d?.onCaretChange(i.selectionStart??i.value.length)},y=u.useCallback(i=>{w(i),C.current=i},[]),v=u.useCallback(i=>{const l=e[i];l&&t&&(y(ge(i,e.length)),H(`${l.label} removed`),t(l.id))},[e,t,y]),_=u.useCallback(()=>{y(null),o()},[o,y]),U=u.useCallback(i=>{const l=i.currentTarget;if(d?.onKeyDown(i))return;const g=he({key:i.key,shiftKey:i.shiftKey,repeat:i.repeat,caretAtStart:l.selectionStart===0&&l.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(g.type){case"focusChip":i.preventDefault(),y(g.index);return;case"clearQuery":P();return;case"blur":l.blur();return;case"none":return}},[e.length,n,P,y,d]),Q=u.useCallback(i=>l=>{const g=ye({key:l.key,repeat:l.repeat,index:i,chipCount:e.length});switch(g.type!=="none"&&l.preventDefault(),g.type){case"removeChip":v(g.index);return;case"focusChip":y(g.index);return;case"focusInput":y(null);return;case"activateChip":return;case"none":return}},[e,v,y]);return u.useEffect(()=>{if(!c)return;const i=l=>{l.key!=="/"||l.metaKey||l.ctrlKey||l.altKey||xe(l.target)||(l.preventDefault(),k.current?.focus())};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[c]),m.jsxs("label",{htmlFor:T,className:I("flex w-full items-center gap-1.5 text-sm","bg-surface-sunken/50 border border-transparent","focus-within:bg-canvas focus-within:border-line focus-within:ring-2 focus-within:ring-ring","transition-colors",h==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",x),children:[m.jsx(V,{className:I("shrink-0 text-fg-muted pointer-events-none",h==="lg"?"size-5":"size-4")}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[E&&m.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((i,l)=>m.jsx(z,{ref:g=>{D.current[l]=g},label:i.label,tone:i.tone,focused:K===l,onFocusLabel:()=>w(l),onKeyDown:Q(l),onRemove:()=>v(l)},i.id))}),m.jsx("input",{ref:k,id:T,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:K===null?0:-1,onChange:i=>{r(i.target.value),S(i.target)},onKeyDown:U,onKeyUp:i=>S(i.currentTarget),onClick:i=>S(i.currentTarget),onFocus:i=>{w(null),d?.onFocusChange?.(!0),S(i.currentTarget)},onBlur:()=>d?.onFocusChange?.(!1),...d?.comboboxProps,placeholder:E?void 0:a,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||E)&&f&&m.jsx("button",{type:"button",onClick:_,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:m.jsx(G,{className:I("text-fg-muted",h==="lg"?"size-5":"size-4")})}),m.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:B})]})},Pe=({value:e,onChange:t,onClear:n,onClearQuery:r,chips:o,onRemoveChip:s,placeholder:a="Search mail...",globalFocusKey:c=!0,showClearButton:f=!0,size:h,inputId:p,suggest:d,className:x})=>m.jsx(be,{value:e,onChange:t,onClear:n,onClearQuery:r,chips:o,onRemoveChip:s,placeholder:a,globalFocusKey:c,showClearButton:f,size:h,inputId:p,suggest:d,className:x});function Ke({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:r=1e3}){const o=u.useRef(e);o.current=e;const s=u.useRef(null),a=u.useRef(null);u.useEffect(()=>{if(!t)return;const c=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},f=p=>{const d=ue({key:p.key,shiftKey:p.shiftKey,metaKey:p.metaKey,ctrlKey:p.ctrlKey,altKey:p.altKey,inEditable:fe(p.target),onControl:me(p.target)},s.current);if(c(),s.current=d.nextPrefix,d.nextPrefix!==null&&(a.current=setTimeout(()=>{s.current=null,a.current=null},r)),d.action===null)return;const x=o.current[d.action];x&&(d.preventDefault&&p.preventDefault(),x())},h=n===void 0?window:n;if(h!==null)return h.addEventListener("keydown",f),()=>{h.removeEventListener("keydown",f),c(),s.current=null}},[t,r,n])}const Me=({trigger:e,children:t,align:n="right"})=>{const[r,o]=u.useState(!1),s=u.useRef(null),a=u.useCallback(f=>{s.current&&!s.current.contains(f.target)&&o(!1)},[]),c=u.useCallback(f=>{f.key==="Escape"&&o(!1)},[]);return u.useEffect(()=>(r&&(document.addEventListener("mousedown",a),document.addEventListener("keydown",c)),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",c)}),[r,a,c]),m.jsxs("div",{ref:s,className:"relative",children:[m.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),o(!r)},className:N("p-1.5 min-h-11 min-w-11 inline-flex items-center justify-center rounded-md transition-colors","hover:bg-surface-raised text-fg-muted hover:text-fg"),children:e}),r&&m.jsx("div",{className:N("absolute z-50 mt-1 min-w-[180px] py-1","bg-surface border border-line rounded-md shadow-lg",n==="right"?"right-0":"left-0"),children:t})]})},Re=({onClick:e,disabled:t,destructive:n,children:r})=>m.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),t||e()},disabled:t,className:N("w-full px-3 py-2 text-left text-sm transition-colors","flex items-center gap-2",t&&"opacity-50 cursor-not-allowed",!t&&"hover:bg-surface-raised",n&&"text-danger hover:text-danger"),children:r}),Le=()=>m.jsx("div",{className:"my-1 h-px bg-line"}),ke=({accounts:e})=>{const t=j({strict:!1}),n=$(),r=t.mailboxId,{t:o}=X("mail",{useSuspense:!1}),s=u.useCallback((c,f)=>o(c,{defaultValue:f}),[o]),a=F({queries:e.map(c=>({...q({path:{accountId:c.accountId}}),staleTime:1/0}))});if(n.pathname.startsWith("/mail/outbox"))return"Outbox";if(!r)return null;for(let c=0;c<e.length;c++){const f=a[c]?.data?.items;if(!f)continue;const h=f.find(d=>d.mailboxId===r);if(!h)continue;const p=W(e[c].folderAppointments);return J(h,p.get(r),s)}return null},Ae=({accounts:e})=>{const n=j({strict:!1}).mailboxId,r=F({queries:e.map(o=>({...q({path:{accountId:o.accountId}}),staleTime:1/0}))});if(!n)return null;for(const o of r){const s=o.data?.items;if(!s)continue;const a=s.find(c=>c.mailboxId===n);if(a)return a.unseenCount}return null};function je(e){const t=Y(),{searchInput:n}=Z(),r=ke({accounts:e}),o=ee({select:c=>c.matches}),s=te(o,r),a=u.useCallback(c=>{c===ne&&t({to:"/mail/brief",search:{q:n||void 0}})},[t,n]);return{scope:s,clearScope:a}}const Fe=({enabled:e=!0,bindings:t,capture:n=!1})=>{const r=u.useCallback(o=>{const s=o.target;if(!(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.isContentEditable))for(const a of t){if(!(o.key.toLowerCase()===a.key.toLowerCase())||a.requireShift!==void 0&&a.requireShift!==o.shiftKey)continue;const f=o.ctrlKey||o.metaKey;if(a.requireMeta!==void 0){if(a.requireMeta!==f)continue}else{const h=a.noModifiers??!0,p=f||o.altKey||a.requireShift===void 0&&o.shiftKey;if(h&&p)continue}a.preventDefault&&o.preventDefault(),a.stopPropagation&&(o.stopPropagation(),o.stopImmediatePropagation()),a.handler(o);return}},[t]);u.useEffect(()=>{if(e)return window.addEventListener("keydown",r,n),()=>window.removeEventListener("keydown",r,n)},[e,r,n])},we=768,qe=e=>e!=="desktop",Oe=()=>{const e=L(`(min-width: ${we}px)`);return L(oe)?"desktop":e?"tablet":"phone"};function Be(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase(),o=r.split("@")[0];o&&!t.has(o)&&t.set(o,n.accountId),t.has(r)||t.set(r,n.accountId)}return t}function He(e){const t=new Map;for(const n of e)for(const r of n){const o=r.fullPath?.toLowerCase();if(!o)continue;const s=o.split("/").pop();t.has(o)||t.set(o,r.mailboxId),s&&!t.has(s)&&t.set(s,r.mailboxId)}return t}function _e(e,t=[]){const n=e.flat().filter(s=>s.fullPath),r=new Map;for(const s of n){const a=R(s.fullPath).toLowerCase();r.set(a,(r.get(a)??0)+1)}const o=new Map(t.map(s=>[s.accountId,s.email]));return n.map(s=>{const a=R(s.fullPath),c=r.get(a.toLowerCase())===1,f=t.length>1?o.get(s.accountId):void 0;return{value:c?a:s.fullPath,label:s.displayNameOverride?.trim()||a,...f?{hint:f}:{}}})}function Ue(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase().split("@")[0]??"";t.set(r,(t.get(r)??0)+1)}return e.map(n=>{const r=n.email.split("@")[0]??n.email,o=t.get(r.toLowerCase())===1,s=n.displayName?.trim();return{value:o?r:n.email,label:s||n.email,...s?{hint:n.email}:{}}})}export{Ie as B,Me as D,se as K,Ne as R,Pe as S,Le as a,Re as b,He as c,Oe as d,Fe as e,Ke as f,Be as g,ke as h,qe as i,Ae as j,re as k,Te as l,de as m,_e as n,Ue as o,ae as s,De as t,je as u};
1
+ import{c as A,r as u,j as m,g as V,b as I,cM as z,X as G,K as N,D as j,l as $,t as X,v as F,w as q,z as W,E as J,p as Y,o as Z,cn as R}from"./index-tka6wZr_.js";import{u as ee,b as te,S as ne}from"./search-scope-By6SdCOd.js";import{u as L}from"./use-match-media-BrJFrufZ.js";import{D as oe}from"./layout-breakpoints-BWjiUQKh.js";const Ie=A("BellOff",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]);const Ne=A("RefreshCw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]),re=[{action:"focusNext",keys:["j","k"],label:"navigate"},{action:"muteSender",keys:["m"],label:"mute"},{action:"help",keys:["?"],label:"all shortcuts"}];function Te(e){return re.filter(t=>e[t.action]!==void 0)}const se=[{title:"Navigation",hints:[{action:"focusNext",keys:["j"],description:"Focus next message"},{action:"focusPrevious",keys:["k"],description:"Focus previous message"},{action:"focusNext",keys:["↓"],description:"Focus next message"},{action:"focusPrevious",keys:["↑"],description:"Focus previous message"},{action:"focusFirst",keys:["Home"],description:"Focus first"},{action:"focusLast",keys:["End"],description:"Focus last"},{action:"openFocused",keys:["Enter"],description:"Open focused thread"},{action:"back",keys:["Esc"],description:"Back / close overlay"}]},{title:"Selection",hints:[{action:"toggleSelect",keys:["x"],description:"Toggle select"},{action:"toggleSelect",keys:["Space"],description:"Toggle select"},{action:"extendSelectDown",keys:["Shift","j"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","k"],description:"Extend selection up"},{action:"extendSelectDown",keys:["Shift","↓"],description:"Extend selection down"},{action:"extendSelectUp",keys:["Shift","↑"],description:"Extend selection up"},{action:"selectAll",keys:["⌘","A"],description:"Select all"}]},{title:"Actions",hints:[{action:"reply",keys:["r"],description:"Reply"},{action:"replyAll",keys:["a"],description:"Reply all"},{action:"forward",keys:["f"],description:"Forward"},{action:"delete",keys:["#"],description:"Delete"},{action:"toggleStar",keys:["s"],description:"Star / unstar"},{action:"toggleRead",keys:["u"],description:"Toggle read / unread"}]},{title:"Sender",hints:[{action:"muteSender",keys:["m"],description:"Mute sender"},{action:"blockSender",keys:["b"],description:"Block sender"},{action:"vipSender",keys:["v"],description:"VIP sender"},{action:"markJunk",keys:["!"],description:"Mark junk"}]},{title:"Go to",hints:[{action:"goBrief",keys:["g","b"],description:"Daily brief"},{action:"goInbox",keys:["g","i"],description:"Inbox"},{action:"goSent",keys:["g","s"],description:"Sent"},{action:"goFlagged",keys:["g","f"],description:"Starred"},{action:"goSettings",keys:["g",","],description:"Settings"}]},{title:"View & global",hints:[{action:"toggleIntelligence",keys:["i"],description:"Toggle intelligence"},{action:"toggleDensity",keys:["d"],description:"Toggle density"},{action:"focusSearch",keys:["/"],description:"Focus search"},{action:"compose",keys:["c"],description:"Compose"},{action:"compose",keys:["⌘","N"],description:"Compose"},{action:"help",keys:["?"],description:"Shortcut help"}]}];function ie(e){for(const t of se){const n=t.hints.find(r=>r.action===e);if(n)return n.keys}}function ae(e){const t=ie(e);return!t||t.length===0?"":t.length===1?t[0]??"":t[0]==="g"?t.join(" then "):t.join("")}function De(e){const t=ae(e);return t===""?"":`(${t})`}const b={action:null,nextPrefix:null,preventDefault:!1},ce={b:"goBrief",i:"goInbox",s:"goSent",f:"goFlagged",",":"goSettings"},le={j:{action:"focusNext"},k:{action:"focusPrevious"},arrowdown:{action:"focusNext"},arrowup:{action:"focusPrevious"},home:{action:"focusFirst"},end:{action:"focusLast"},enter:{action:"openFocused"}," ":{action:"toggleSelect"},delete:{action:"delete"},backspace:{action:"delete"},u:{action:"toggleRead"},x:{action:"toggleSelect"},r:{action:"reply"},a:{action:"replyAll"},f:{action:"forward"},"#":{action:"delete"},s:{action:"toggleStar"},m:{action:"muteSender"},b:{action:"blockSender"},v:{action:"vipSender"},"!":{action:"markJunk"},i:{action:"toggleIntelligence"},d:{action:"toggleDensity"},"/":{action:"focusSearch"},c:{action:"compose"},"?":{action:"help"}};function ue(e,t){const n=e.key.toLowerCase(),r=e.metaKey||e.ctrlKey;if(e.inEditable)return{...b,nextPrefix:t==="g"?null:t};if(e.onControl&&(n==="enter"||n===" "))return{...b,nextPrefix:t==="g"?null:t};if(r&&n==="n")return{action:"compose",nextPrefix:null,preventDefault:!0};if(r&&n==="a")return{action:"selectAll",nextPrefix:null,preventDefault:!0};if(r)return{...b,nextPrefix:t==="g"?null:t};if(n==="escape")return{action:"back",nextPrefix:null,preventDefault:!1};if(t==="g"){const a=ce[n===","?",":n]??null;return{action:a,nextPrefix:null,preventDefault:a!==null}}if(n==="g"&&!e.shiftKey)return{action:null,nextPrefix:"g",preventDefault:!0};if(e.shiftKey){const s=n==="j"||n==="arrowdown";if(s||(n==="k"||n==="arrowup"))return{action:s?"extendSelectDown":"extendSelectUp",nextPrefix:null,preventDefault:!0}}const o=le[n];if(o){const s=o.requireShift===!0,a=n.length===1&&!/[a-z0-9]/.test(n);return!s&&e.shiftKey&&!a?b:{action:o.action,nextPrefix:null,preventDefault:!0}}return b}function fe(e){if(!(e instanceof HTMLElement))return!1;const t=e.tagName;return t==="INPUT"||t==="TEXTAREA"||t==="SELECT"||e.isContentEditable}const de="data-message-row",pe='button, a[href], summary, [role="button"], [role="menuitem"], [role="tab"], [role="switch"], [role="checkbox"]';function me(e){if(!(e instanceof HTMLElement))return!1;const t=e.closest(pe);return t?!t.hasAttribute(de):!1}function he({key:e,shiftKey:t=!1,repeat:n=!1,caretAtStart:r,hasValue:o,chipCount:s}){const a=s-1;return e==="Escape"?o?{type:"clearQuery"}:{type:"blur"}:e==="Tab"&&t?s===0?{type:"none"}:{type:"focusChip",index:a}:e==="Backspace"||e==="ArrowLeft"?!r||s===0?{type:"none"}:n?{type:"none"}:{type:"focusChip",index:a}:{type:"none"}}function ye({key:e,repeat:t=!1,index:n,chipCount:r}){return e==="Backspace"||e==="Delete"?t?{type:"none"}:{type:"removeChip",index:n}:e==="ArrowLeft"?n===0?{type:"none"}:{type:"focusChip",index:n-1}:e==="ArrowRight"?n>=r-1?{type:"focusInput"}:{type:"focusChip",index:n+1}:e==="Enter"||e===" "?{type:"activateChip",index:n}:e==="Escape"?{type:"focusInput"}:{type:"none"}}function ge(e,t){const n=t-1;return n<=0?null:e<n?e:n-1}const xe=e=>e instanceof HTMLElement?e.tagName==="INPUT"||e.tagName==="TEXTAREA"||e.isContentEditable:!1,be=({chips:e=[],onRemoveChip:t,value:n,onChange:r,onClear:o,onClearQuery:s,placeholder:a="Search mail...",globalFocusKey:c=!0,showClearButton:f=!0,size:h="sm",inputId:p,suggest:d,className:x})=>{const O=u.useId(),T=p??O,k=u.useRef(null),D=u.useRef([]),P=s??o,[K,w]=u.useState(null),C=u.useRef(void 0),[B,H]=u.useState(""),E=e.length>0;u.useEffect(()=>{w(i=>i!==null&&i>=e.length?null:i)},[e.length]),u.useEffect(()=>{const i=C.current;if(i!==void 0){if(C.current=void 0,i===null){k.current?.focus();return}D.current[i]?.focus()}});const M=u.useRef(void 0);u.useEffect(()=>{const i=d?.caret;if(!i||i===M.current)return;M.current=i;const l=k.current;!l||l.ownerDocument.activeElement!==l||(l.setSelectionRange(i.cursor,i.cursor),d?.onCaretChange(i.cursor))});const S=i=>{d?.onCaretChange(i.selectionStart??i.value.length)},y=u.useCallback(i=>{w(i),C.current=i},[]),v=u.useCallback(i=>{const l=e[i];l&&t&&(y(ge(i,e.length)),H(`${l.label} removed`),t(l.id))},[e,t,y]),_=u.useCallback(()=>{y(null),o()},[o,y]),U=u.useCallback(i=>{const l=i.currentTarget;if(d?.onKeyDown(i))return;const g=he({key:i.key,shiftKey:i.shiftKey,repeat:i.repeat,caretAtStart:l.selectionStart===0&&l.selectionEnd===0,hasValue:n.length>0,chipCount:e.length});switch(g.type){case"focusChip":i.preventDefault(),y(g.index);return;case"clearQuery":P();return;case"blur":l.blur();return;case"none":return}},[e.length,n,P,y,d]),Q=u.useCallback(i=>l=>{const g=ye({key:l.key,repeat:l.repeat,index:i,chipCount:e.length});switch(g.type!=="none"&&l.preventDefault(),g.type){case"removeChip":v(g.index);return;case"focusChip":y(g.index);return;case"focusInput":y(null);return;case"activateChip":return;case"none":return}},[e,v,y]);return u.useEffect(()=>{if(!c)return;const i=l=>{l.key!=="/"||l.metaKey||l.ctrlKey||l.altKey||xe(l.target)||(l.preventDefault(),k.current?.focus())};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[c]),m.jsxs("label",{htmlFor:T,className:I("flex w-full items-center gap-1.5 text-sm","bg-surface-sunken/50 border border-transparent","focus-within:bg-canvas focus-within:border-line focus-within:ring-2 focus-within:ring-ring","transition-colors",h==="lg"?"rounded-xl px-4 py-2":"rounded-md px-2.5 py-1",x),children:[m.jsx(V,{className:I("shrink-0 text-fg-muted pointer-events-none",h==="lg"?"size-5":"size-4")}),m.jsxs("div",{className:"flex min-w-0 flex-1 flex-wrap items-center gap-1",children:[E&&m.jsx("div",{role:"grid","aria-label":"Search filters",className:"flex min-w-0 flex-wrap items-center gap-1",children:e.map((i,l)=>m.jsx(z,{ref:g=>{D.current[l]=g},label:i.label,tone:i.tone,focused:K===l,onFocusLabel:()=>w(l),onKeyDown:Q(l),onRemove:()=>v(l)},i.id))}),m.jsx("input",{ref:k,id:T,name:"q",type:"text","aria-label":"Search mail",autoComplete:"off",value:n,tabIndex:K===null?0:-1,onChange:i=>{r(i.target.value),S(i.target)},onKeyDown:U,onKeyUp:i=>S(i.currentTarget),onClick:i=>S(i.currentTarget),onFocus:i=>{w(null),d?.onFocusChange?.(!0),S(i.currentTarget)},onBlur:()=>d?.onFocusChange?.(!1),...d?.comboboxProps,placeholder:E?void 0:a,className:"min-w-24 flex-1 bg-transparent text-fg outline-none placeholder:text-fg-muted"})]}),(n||E)&&f&&m.jsx("button",{type:"button",onClick:_,className:"shrink-0 rounded p-0.5 hover:bg-surface-raised transition-colors","aria-label":"Clear search",children:m.jsx(G,{className:I("text-fg-muted",h==="lg"?"size-5":"size-4")})}),m.jsx("span",{role:"status","aria-live":"polite",className:"sr-only",children:B})]})},Pe=({value:e,onChange:t,onClear:n,onClearQuery:r,chips:o,onRemoveChip:s,placeholder:a="Search mail...",globalFocusKey:c=!0,showClearButton:f=!0,size:h,inputId:p,suggest:d,className:x})=>m.jsx(be,{value:e,onChange:t,onClear:n,onClearQuery:r,chips:o,onRemoveChip:s,placeholder:a,globalFocusKey:c,showClearButton:f,size:h,inputId:p,suggest:d,className:x});function Ke({handlers:e,enabled:t=!0,target:n,sequenceTimeoutMs:r=1e3}){const o=u.useRef(e);o.current=e;const s=u.useRef(null),a=u.useRef(null);u.useEffect(()=>{if(!t)return;const c=()=>{a.current!==null&&(clearTimeout(a.current),a.current=null)},f=p=>{const d=ue({key:p.key,shiftKey:p.shiftKey,metaKey:p.metaKey,ctrlKey:p.ctrlKey,altKey:p.altKey,inEditable:fe(p.target),onControl:me(p.target)},s.current);if(c(),s.current=d.nextPrefix,d.nextPrefix!==null&&(a.current=setTimeout(()=>{s.current=null,a.current=null},r)),d.action===null)return;const x=o.current[d.action];x&&(d.preventDefault&&p.preventDefault(),x())},h=n===void 0?window:n;if(h!==null)return h.addEventListener("keydown",f),()=>{h.removeEventListener("keydown",f),c(),s.current=null}},[t,r,n])}const Me=({trigger:e,children:t,align:n="right"})=>{const[r,o]=u.useState(!1),s=u.useRef(null),a=u.useCallback(f=>{s.current&&!s.current.contains(f.target)&&o(!1)},[]),c=u.useCallback(f=>{f.key==="Escape"&&o(!1)},[]);return u.useEffect(()=>(r&&(document.addEventListener("mousedown",a),document.addEventListener("keydown",c)),()=>{document.removeEventListener("mousedown",a),document.removeEventListener("keydown",c)}),[r,a,c]),m.jsxs("div",{ref:s,className:"relative",children:[m.jsx("button",{type:"button",onClick:f=>{f.stopPropagation(),o(!r)},className:N("p-1.5 min-h-11 min-w-11 inline-flex items-center justify-center rounded-md transition-colors","hover:bg-surface-raised text-fg-muted hover:text-fg"),children:e}),r&&m.jsx("div",{className:N("absolute z-50 mt-1 min-w-[180px] py-1","bg-surface border border-line rounded-md shadow-lg",n==="right"?"right-0":"left-0"),children:t})]})},Re=({onClick:e,disabled:t,destructive:n,children:r})=>m.jsx("button",{type:"button",onClick:o=>{o.stopPropagation(),t||e()},disabled:t,className:N("w-full px-3 py-2 text-left text-sm transition-colors","flex items-center gap-2",t&&"opacity-50 cursor-not-allowed",!t&&"hover:bg-surface-raised",n&&"text-danger hover:text-danger"),children:r}),Le=()=>m.jsx("div",{className:"my-1 h-px bg-line"}),ke=({accounts:e})=>{const t=j({strict:!1}),n=$(),r=t.mailboxId,{t:o}=X("mail",{useSuspense:!1}),s=u.useCallback((c,f)=>o(c,{defaultValue:f}),[o]),a=F({queries:e.map(c=>({...q({path:{accountId:c.accountId}}),staleTime:1/0}))});if(n.pathname.startsWith("/mail/outbox"))return"Outbox";if(!r)return null;for(let c=0;c<e.length;c++){const f=a[c]?.data?.items;if(!f)continue;const h=f.find(d=>d.mailboxId===r);if(!h)continue;const p=W(e[c].folderAppointments);return J(h,p.get(r),s)}return null},Ae=({accounts:e})=>{const n=j({strict:!1}).mailboxId,r=F({queries:e.map(o=>({...q({path:{accountId:o.accountId}}),staleTime:1/0}))});if(!n)return null;for(const o of r){const s=o.data?.items;if(!s)continue;const a=s.find(c=>c.mailboxId===n);if(a)return a.unseenCount}return null};function je(e){const t=Y(),{searchInput:n}=Z(),r=ke({accounts:e}),o=ee({select:c=>c.matches}),s=te(o,r),a=u.useCallback(c=>{c===ne&&t({to:"/mail/brief",search:{q:n||void 0}})},[t,n]);return{scope:s,clearScope:a}}const Fe=({enabled:e=!0,bindings:t,capture:n=!1})=>{const r=u.useCallback(o=>{const s=o.target;if(!(s.tagName==="INPUT"||s.tagName==="TEXTAREA"||s.isContentEditable))for(const a of t){if(!(o.key.toLowerCase()===a.key.toLowerCase())||a.requireShift!==void 0&&a.requireShift!==o.shiftKey)continue;const f=o.ctrlKey||o.metaKey;if(a.requireMeta!==void 0){if(a.requireMeta!==f)continue}else{const h=a.noModifiers??!0,p=f||o.altKey||a.requireShift===void 0&&o.shiftKey;if(h&&p)continue}a.preventDefault&&o.preventDefault(),a.stopPropagation&&(o.stopPropagation(),o.stopImmediatePropagation()),a.handler(o);return}},[t]);u.useEffect(()=>{if(e)return window.addEventListener("keydown",r,n),()=>window.removeEventListener("keydown",r,n)},[e,r,n])},we=768,qe=e=>e!=="desktop",Oe=()=>{const e=L(`(min-width: ${we}px)`);return L(oe)?"desktop":e?"tablet":"phone"};function Be(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase(),o=r.split("@")[0];o&&!t.has(o)&&t.set(o,n.accountId),t.has(r)||t.set(r,n.accountId)}return t}function He(e){const t=new Map;for(const n of e)for(const r of n){const o=r.fullPath?.toLowerCase();if(!o)continue;const s=o.split("/").pop();t.has(o)||t.set(o,r.mailboxId),s&&!t.has(s)&&t.set(s,r.mailboxId)}return t}function _e(e,t=[]){const n=e.flat().filter(s=>s.fullPath),r=new Map;for(const s of n){const a=R(s.fullPath).toLowerCase();r.set(a,(r.get(a)??0)+1)}const o=new Map(t.map(s=>[s.accountId,s.email]));return n.map(s=>{const a=R(s.fullPath),c=r.get(a.toLowerCase())===1,f=t.length>1?o.get(s.accountId):void 0;return{value:c?a:s.fullPath,label:s.displayNameOverride?.trim()||a,...f?{hint:f}:{}}})}function Ue(e){const t=new Map;for(const n of e){const r=n.email.toLowerCase().split("@")[0]??"";t.set(r,(t.get(r)??0)+1)}return e.map(n=>{const r=n.email.split("@")[0]??n.email,o=t.get(r.toLowerCase())===1,s=n.displayName?.trim();return{value:o?r:n.email,label:s||n.email,...s?{hint:n.email}:{}}})}export{Ie as B,Me as D,se as K,Ne as R,Pe as S,Le as a,Re as b,He as c,Oe as d,Fe as e,Ke as f,Be as g,ke as h,qe as i,Ae as j,re as k,Te as l,de as m,_e as n,Ue as o,ae as s,De as t,je as u};
@@ -1 +1 @@
1
- import{r as c,j as a,a4 as i,a5 as u,a6 as v}from"./index-B_E2UDsv.js";const p=c.createContext(null),x=({chrome:r,children:n})=>a.jsx(p.Provider,{value:r,children:n});function h({phone:r,list:n,reading:t,intelligence:o,hasThread:s=!1}){const e=c.useContext(p);if(!e)return a.jsx(i,{});const l={nav:e.nav,overlay:e.overlay,skeleton:a.jsx(i,{}),isLoading:e.isLoading,navOpen:e.navOpen,onOpenNav:e.onOpenNav,onCloseNav:e.onCloseNav};return e.isSinglePane?a.jsx(u,{...l,list:r,intelligenceOpen:e.intelligenceOpen}):a.jsx(u,{...l,topBar:e.topBar,list:n,reading:t,intelligence:o,intelligenceOpen:e.intelligenceOpen,hasThread:s})}function O(r,n,t){if(r!==n)return t}function S(r,n){return r===""?"":n}function d({searchInput:r,committedQuery:n,urlQuery:t,pathname:o,listPath:s}){return!v(o,s)||n!==r?!1:n!==t}export{x as M,h as a,d as b,S as c,O as s};
1
+ import{r as c,j as a,a4 as i,a5 as u,a6 as v}from"./index-tka6wZr_.js";const p=c.createContext(null),x=({chrome:r,children:n})=>a.jsx(p.Provider,{value:r,children:n});function h({phone:r,list:n,reading:t,intelligence:o,hasThread:s=!1}){const e=c.useContext(p);if(!e)return a.jsx(i,{});const l={nav:e.nav,overlay:e.overlay,skeleton:a.jsx(i,{}),isLoading:e.isLoading,navOpen:e.navOpen,onOpenNav:e.onOpenNav,onCloseNav:e.onCloseNav};return e.isSinglePane?a.jsx(u,{...l,list:r,intelligenceOpen:e.intelligenceOpen}):a.jsx(u,{...l,topBar:e.topBar,list:n,reading:t,intelligence:o,intelligenceOpen:e.intelligenceOpen,hasThread:s})}function O(r,n,t){if(r!==n)return t}function S(r,n){return r===""?"":n}function d({searchInput:r,committedQuery:n,urlQuery:t,pathname:o,listPath:s}){return!v(o,s)||n!==r?!1:n!==t}export{x as M,h as a,d as b,S as c,O as s};
@@ -1 +1 @@
1
- import{j as e,b as N,p as T,r as c,az as L,al as O,g as $,aD as q,x as I,b8 as A,s as k,af as C,b9 as M,ba as P,B as S,a as R,bb as B,X as G}from"./index-B_E2UDsv.js";import{K as m}from"./kbd-BCoy2IeN.js";import{S as Q,a as E}from"./settings-screen-t6UPYsh-.js";import{E as V}from"./ErrorState-Xgz5SZ1i.js";import{u as D}from"./useDebouncedValue-BFQNA4LE.js";import{a as K}from"./format-De9HZKjg.js";import"./avatar-sJ32b2ZB.js";import"./menu-CyQNIqgm.js";import"./circle-help-DNaIbW9w.js";function _({options:t,active:r,onSelect:x}){return e.jsx("div",{role:"tablist",className:N("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(a=>{const d=a.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>x(a.id),className:N("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:a.label}),e.jsx("span",{className:N("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:a.count??"—"})]},a.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"},F=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"VIP"})," senders get priority surface in the daily brief and notification escalation, even when an account is quiet."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Muted"})," senders never notify and stay out of the brief. Their mail still syncs and stays searchable."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Blocked"})," senders never load images and go straight to junk."]}),e.jsxs("p",{children:["Tip: flag from the keyboard on any message — ",e.jsx(m,{children:"v"})," VIP,"," ",e.jsx(m,{children:"m"})," mute, ",e.jsx(m,{children:"b"})," block. Every rule an automation creates shows up here and can be removed."]})]});function H({query:t,onCount:r}){const{data:x,isPending:a,isError:d,error:b}=I(A()),h=k(),i=C({...P(),onSettled:()=>{h.invalidateQueries({queryKey:M()})}}),l=x?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(n=>(n.displayName??"").toLowerCase().includes(p)||n.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),a?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(m,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(n=>e.jsx(E,{name:n.displayName??n.normalizedEmail,email:n.normalizedEmail,meta:n.replyCount>0?`${n.inboundCount} received · you replied ${n.replyCount}×`:`${n.inboundCount} received · you've never replied`,trailing:e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(R,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:n.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},n.addressId))]})}function U({group:t,query:r,onCount:x}){const a=D(r.trim(),300),d=k(),[b,h]=c.useState(null),i=a.length>=2,l=B({query:{q:a,limit:50}}),{data:p,isPending:u,isError:n,error:j}=I({...l,enabled:i}),g=C({...P(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),f=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{x?.(i?f.length:0,null)},[x,i,f.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):n?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Search failed",error:j})}):f.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",a,"”."]}):e.jsx(e.Fragment,{children:f.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&K(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=g.isPending&&g.variables?.path.addressId===s.addressId,z=g.isError&&b===s.addressId;return e.jsx(E,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:z?e.jsx(S,{variant:"secondary",size:"sm",onClick:()=>{h(s.addressId),g.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}})},children:"Retry"}):e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(G,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(h(s.addressId),g.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(m,{children:"m"})," on any message to mute its sender; ",e.jsx(m,{children:"b"})," to block."]})]})}function ae(){const t=T(),[r,x]=c.useState("vip"),[a,d]=c.useState(""),[b,h]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),n=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),g=p[r],f=s=>{const o=q[s];o&&t({to:o})};return e.jsx(Q,{items:L,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:F,helpOpen:b,onToggleHelp:()=>h(s=>!s),onSelect:f,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(_,{active:r,onSelect:s=>{x(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx(O,{icon:e.jsx($,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:a,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:a,onCount:n}):e.jsx(U,{group:r,query:a,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:g!=null?`${i} of ${g} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(m,{children:"j"})," ",e.jsx(m,{children:"k"})," navigate · ",e.jsx(m,{children:"⌫"})," remove flag"]})]})]})]})})}export{ae as component};
1
+ import{j as e,b as N,p as T,r as c,az as L,al as O,g as $,aD as q,x as I,b8 as A,s as k,af as C,b9 as M,ba as P,B as S,a as R,bb as B,X as G}from"./index-tka6wZr_.js";import{K as m}from"./kbd-Dt_vzEGr.js";import{S as Q,a as E}from"./settings-screen-ClWEZnOS.js";import{E as V}from"./ErrorState-9wFdKXpo.js";import{u as D}from"./useDebouncedValue-DiRlxnWS.js";import{a as K}from"./format-De9HZKjg.js";import"./avatar-BvDbtKy6.js";import"./menu-DAXEVDbj.js";import"./circle-help-BK_hzj_i.js";function _({options:t,active:r,onSelect:x}){return e.jsx("div",{role:"tablist",className:N("flex shrink-0 gap-1 overflow-x-auto border-b border-line p-2","lg:w-44 lg:flex-col lg:gap-0 lg:overflow-visible lg:border-r lg:border-b-0 lg:py-2 lg:pr-2 lg:pl-3"),children:t.map(a=>{const d=a.id===r;return e.jsxs("button",{type:"button",role:"tab","aria-selected":d,onClick:()=>x(a.id),className:N("flex min-h-11 shrink-0 items-center gap-2 rounded-md px-3 text-left text-sm transition-colors lg:min-h-0 lg:px-2 lg:py-1",d?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface-sunken hover:text-fg"),children:[e.jsx("span",{className:"flex-1 truncate",children:a.label}),e.jsx("span",{className:N("text-2xs tabular-nums",d?"text-accent-2":"text-fg-subtle"),children:a.count??"—"})]},a.id)})})}const v={vip:"VIPs",muted:"Muted",blocked:"Blocked"},F=e.jsxs("div",{className:"space-y-3",children:[e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"VIP"})," senders get priority surface in the daily brief and notification escalation, even when an account is quiet."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Muted"})," senders never notify and stay out of the brief. Their mail still syncs and stays searchable."]}),e.jsxs("p",{children:[e.jsx("strong",{className:"text-fg",children:"Blocked"})," senders never load images and go straight to junk."]}),e.jsxs("p",{children:["Tip: flag from the keyboard on any message — ",e.jsx(m,{children:"v"})," VIP,"," ",e.jsx(m,{children:"m"})," mute, ",e.jsx(m,{children:"b"})," block. Every rule an automation creates shows up here and can be removed."]})]});function H({query:t,onCount:r}){const{data:x,isPending:a,isError:d,error:b}=I(A()),h=k(),i=C({...P(),onSettled:()=>{h.invalidateQueries({queryKey:M()})}}),l=x?.suggestions??[],p=t.trim().toLowerCase(),u=p?l.filter(n=>(n.displayName??"").toLowerCase().includes(p)||n.normalizedEmail.toLowerCase().includes(p)):l;return c.useEffect(()=>{r?.(u.length,l.length)},[r,u.length,l.length]),a?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Loading VIP suggestions…"}):d?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Couldn't load VIP suggestions",error:b})}):l.length===0?e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIP suggestions yet. As you reply to senders, they'll appear here. Press ",e.jsx(m,{children:"v"})," on any message to promote a sender to VIP."]}):u.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No VIPs match “",t,"”."]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-row-inset py-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Suggested — promote to VIP"}),u.map(n=>e.jsx(E,{name:n.displayName??n.normalizedEmail,email:n.normalizedEmail,meta:n.replyCount>0?`${n.inboundCount} received · you replied ${n.replyCount}×`:`${n.inboundCount} received · you've never replied`,trailing:e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(R,{className:"size-3.5"}),"aria-busy":i.isPending,onClick:()=>{i.isPending||i.mutate({path:{addressId:n.addressId},body:{flags:{vip:{value:!0,setAt:Date.now(),setBy:"user"}}}})},children:"Add VIP"})},n.addressId))]})}function U({group:t,query:r,onCount:x}){const a=D(r.trim(),300),d=k(),[b,h]=c.useState(null),i=a.length>=2,l=B({query:{q:a,limit:50}}),{data:p,isPending:u,isError:n,error:j}=I({...l,enabled:i}),g=C({...P(),onSuccess:()=>{d.invalidateQueries({queryKey:l.queryKey})}}),f=(p?.items??[]).filter(s=>t==="muted"?s.flags?.muted?.value??!1:s.flags?.blocked?.value??!1);return c.useEffect(()=>{x?.(i?f.length:0,null)},[x,i,f.length]),i?u?e.jsx("div",{className:"px-row-inset py-3 text-sm text-fg-subtle animate-pulse",children:"Searching…"}):n?e.jsx("div",{className:"px-row-inset py-3",children:e.jsx(V,{variant:"inline",title:"Search failed",error:j})}):f.length===0?e.jsxs("p",{className:"px-row-inset py-5 text-sm text-fg-subtle",children:["No ",v[t].toLowerCase()," senders matching “",a,"”."]}):e.jsx(e.Fragment,{children:f.map(s=>{const o=t==="muted"?s.flags?.muted:s.flags?.blocked,y=o?[`${t}`,o.setAt&&K(o.setAt,{month:"short",year:"numeric"})||null,o.reason?`— ${o.reason}`:null].filter(Boolean).join(" "):t,w=g.isPending&&g.variables?.path.addressId===s.addressId,z=g.isError&&b===s.addressId;return e.jsx(E,{name:s.displayName??s.normalizedEmail,email:s.normalizedEmail,danger:t==="blocked",meta:y,trailing:z?e.jsx(S,{variant:"secondary",size:"sm",onClick:()=>{h(s.addressId),g.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}})},children:"Retry"}):e.jsx(S,{variant:"ghost",size:"sm",icon:e.jsx(G,{className:"size-3.5"}),"aria-busy":w,"aria-label":`Remove ${t} flag`,onClick:()=>{w||(h(s.addressId),g.mutate({path:{addressId:s.addressId},body:{flags:{[t]:null}}}))}})},s.addressId)})}):e.jsxs("div",{className:"px-row-inset py-5 text-sm text-fg-subtle space-y-2",children:[e.jsxs("p",{children:["Type 2+ characters to search ",v[t].toLowerCase()," ","senders by name or address."]}),e.jsxs("p",{className:"text-2xs text-fg-subtle",children:["Note: a dedicated flagged-address list endpoint is in the backlog. Press ",e.jsx(m,{children:"m"})," on any message to mute its sender; ",e.jsx(m,{children:"b"})," to block."]})]})}function ae(){const t=T(),[r,x]=c.useState("vip"),[a,d]=c.useState(""),[b,h]=c.useState(!0),[i,l]=c.useState(0),[p,u]=c.useState({vip:0,muted:null,blocked:null}),n=c.useCallback((s,o)=>{l(s),u(y=>({...y,vip:o}))},[]),j=c.useCallback((s,o)=>{l(s),u(y=>({...y,[r]:s}))},[r]),g=p[r],f=s=>{const o=q[s];o&&t({to:o})};return e.jsx(Q,{items:L,activeId:"senders",title:"Senders & Rules",description:"Per-sender preferences — set with one key from any message, managed here.",flush:!0,help:F,helpOpen:b,onToggleHelp:()=>h(s=>!s),onSelect:f,onBackToMail:()=>{t({to:"/mail"})},children:e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col lg:flex-row",children:[e.jsx(_,{active:r,onSelect:s=>{x(s),d("")},options:["vip","muted","blocked"].map(s=>({id:s,label:v[s],count:p[s]}))}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsx("div",{className:"border-b border-line px-row-inset py-2",children:e.jsx(O,{icon:e.jsx($,{className:"size-4"}),placeholder:`Filter ${v[r].toLowerCase()} by name or address`,className:"h-8 max-w-sm",value:a,onChange:s=>d(s.target.value)})}),e.jsx("div",{className:"min-h-0 flex-1 divide-y divide-line overflow-y-auto",children:r==="vip"?e.jsx(H,{query:a,onCount:n}):e.jsx(U,{group:r,query:a,onCount:j})}),e.jsxs("footer",{className:"flex items-center justify-between border-t border-line px-row-inset py-1 text-2xs text-fg-subtle",children:[e.jsx("span",{children:g!=null?`${i} of ${g} flagged senders`:`${i} flagged senders`}),e.jsxs("span",{children:[e.jsx(m,{children:"j"})," ",e.jsx(m,{children:"k"})," navigate · ",e.jsx(m,{children:"⌫"})," remove flag"]})]})]})]})})}export{ae as component};
@@ -0,0 +1 @@
1
+ import{j as t,a0 as o}from"./index-tka6wZr_.js";const n=()=>t.jsx(o,{});export{n as component};
@@ -1 +1 @@
1
- import{c as z,r as j,j as e,b as f,B as i,X as N,aB as S}from"./index-B_E2UDsv.js";import{A as w}from"./avatar-sJ32b2ZB.js";import{M as B}from"./menu-CyQNIqgm.js";import{C as v}from"./circle-help-DNaIbW9w.js";const h=z("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function F({items:l,activeId:t,title:c,description:n,children:r,help:s,helpOpen:d=!0,flush:o,onSelect:k,onToggleHelp:u,onBackToMail:m}){const[y,x]=j.useState(!1),[b,C]=j.useState(!1),p=!!s&&d,g=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Settings"}),e.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-1",children:l.map(a=>e.jsxs("button",{type:"button",onClick:()=>{k?.(a.id),x(!1)},className:f("flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors lg:min-h-0",a.id===t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg"),children:[a.icon&&e.jsx("span",{className:f("shrink-0",a.id===t?"text-accent-2":"text-fg-subtle"),children:a.icon}),a.label]},a.id))})]});return e.jsxs("div",{className:"safe-area-frame flex h-dvh w-full overflow-hidden bg-canvas font-sans text-fg",children:[e.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col border-r border-line bg-surface-sunken lg:flex",children:[e.jsx("div",{className:"flex h-pane-header shrink-0 items-center border-b border-line px-2",children:e.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]})}),g]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",children:[e.jsx("button",{type:"button","aria-label":"Close menu",className:"absolute inset-0 bg-canvas/60",onClick:()=>x(!1)}),e.jsxs("aside",{className:"safe-area-frame relative flex w-72 max-w-[85%] flex-col border-r border-line bg-surface-sunken",children:[e.jsxs("div",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-2",children:[e.jsxs("button",{type:"button",onClick:()=>{m?.(),x(!1)},className:"flex items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),onClick:()=>x(!1),"aria-label":"Close menu"})]}),g]})]}),e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-3 border-b border-line px-3 lg:px-5",children:[m&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(h,{className:"size-4"}),className:"-ml-1 lg:hidden",onClick:m,"aria-label":"Back to mail"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-4"}),className:"lg:hidden",onClick:()=>x(!0),"aria-label":"Open settings menu"}),e.jsx("h1",{className:"text-md font-semibold text-fg",children:c}),n&&e.jsx("p",{className:"hidden min-w-0 truncate text-xs text-fg-subtle lg:block",children:n}),s&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"ml-auto lg:hidden",onClick:()=>C(a=>!a),"aria-label":"Tips","aria-expanded":b}),s&&!p&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"hidden ml-auto lg:inline-flex",onClick:u,"aria-label":"Show tips"})]}),s&&b&&e.jsx("div",{className:"border-b border-line bg-surface-sunken px-row-inset py-3 text-xs leading-relaxed text-fg-muted lg:hidden",children:s}),o?e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"max-w-2xl px-3 py-5 lg:px-5",children:e.jsx("div",{className:"space-y-5",children:r})})})]}),p&&e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-l border-line bg-surface-sunken lg:flex",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-row-inset",children:[e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Tips & tricks"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-3.5"}),onClick:u,"aria-label":"Collapse tips"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-row-inset py-3 text-xs leading-relaxed text-fg-muted",children:s})]})]})}function R({name:l,email:t,meta:c,caption:n,danger:r,trailing:s}){return e.jsxs("div",{className:"flex items-center gap-3 px-row-inset py-2 hover:bg-surface-sunken",children:[e.jsx("span",{className:f(r&&"rounded-full ring-2 ring-danger/40"),children:e.jsx(w,{name:l,email:t,size:"sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:items-baseline sm:gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-fg",children:l}),e.jsx("span",{className:"truncate text-2xs text-fg-subtle",children:t})]}),e.jsxs("div",{className:"text-xs text-fg-subtle",children:[c,n&&e.jsxs("span",{className:"text-fg-muted",children:[" · ",n]})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}const O={healthy:{tone:"positive",label:"healthy"},error:{tone:"danger",label:"error"},muted:{tone:"neutral",label:"muted"}};function X({label:l,email:t,connector:c,syncLabel:n,state:r,errorDetail:s,trailing:d}){const o=O[r];return e.jsxs("div",{className:f("rounded-sm border border-line bg-surface",r==="muted"&&"opacity-65"),children:[e.jsxs("div",{className:"flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx(w,{name:l,email:t,size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:l}),e.jsx(S,{tone:o.tone,dot:!0,children:o.label})]}),e.jsxs("div",{className:"truncate text-xs text-fg-subtle",children:[t," · ",c," · ",n]})]})]}),d&&e.jsx("div",{className:"shrink-0",children:d})]}),s&&e.jsx("div",{className:"border-t border-line px-row-inset py-2",children:e.jsx("code",{className:"block rounded-xs bg-danger-soft px-2 py-1 text-2xs text-danger",children:s})})]})}export{X as A,F as S,R as a};
1
+ import{c as z,r as j,j as e,b as f,B as i,X as N,aB as S}from"./index-tka6wZr_.js";import{A as w}from"./avatar-BvDbtKy6.js";import{M as B}from"./menu-DAXEVDbj.js";import{C as v}from"./circle-help-BK_hzj_i.js";const h=z("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);function F({items:l,activeId:t,title:c,description:n,children:r,help:s,helpOpen:d=!0,flush:o,onSelect:k,onToggleHelp:u,onBackToMail:m}){const[y,x]=j.useState(!1),[b,C]=j.useState(!1),p=!!s&&d,g=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"px-3 pt-3 pb-1 text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Settings"}),e.jsx("nav",{className:"flex-1 overflow-y-auto px-2 py-1",children:l.map(a=>e.jsxs("button",{type:"button",onClick:()=>{k?.(a.id),x(!1)},className:f("flex min-h-11 w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm transition-colors lg:min-h-0",a.id===t?"bg-accent-2-soft font-medium text-accent-2":"text-fg-muted hover:bg-surface hover:text-fg"),children:[a.icon&&e.jsx("span",{className:f("shrink-0",a.id===t?"text-accent-2":"text-fg-subtle"),children:a.icon}),a.label]},a.id))})]});return e.jsxs("div",{className:"safe-area-frame flex h-dvh w-full overflow-hidden bg-canvas font-sans text-fg",children:[e.jsxs("aside",{className:"hidden w-60 shrink-0 flex-col border-r border-line bg-surface-sunken lg:flex",children:[e.jsx("div",{className:"flex h-pane-header shrink-0 items-center border-b border-line px-2",children:e.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]})}),g]}),y&&e.jsxs("div",{className:"fixed inset-0 z-50 flex lg:hidden",children:[e.jsx("button",{type:"button","aria-label":"Close menu",className:"absolute inset-0 bg-canvas/60",onClick:()=>x(!1)}),e.jsxs("aside",{className:"safe-area-frame relative flex w-72 max-w-[85%] flex-col border-r border-line bg-surface-sunken",children:[e.jsxs("div",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-2",children:[e.jsxs("button",{type:"button",onClick:()=>{m?.(),x(!1)},className:"flex items-center gap-2 rounded-md px-2 py-1 text-left text-sm text-fg-muted hover:bg-surface hover:text-fg",children:[e.jsx(h,{className:"size-4 text-fg-subtle"}),"Back to mail"]}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-4"}),onClick:()=>x(!1),"aria-label":"Close menu"})]}),g]})]}),e.jsxs("main",{className:"flex min-w-0 flex-1 flex-col",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center gap-3 border-b border-line px-3 lg:px-5",children:[m&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(h,{className:"size-4"}),className:"-ml-1 lg:hidden",onClick:m,"aria-label":"Back to mail"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(B,{className:"size-4"}),className:"lg:hidden",onClick:()=>x(!0),"aria-label":"Open settings menu"}),e.jsx("h1",{className:"text-md font-semibold text-fg",children:c}),n&&e.jsx("p",{className:"hidden min-w-0 truncate text-xs text-fg-subtle lg:block",children:n}),s&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"ml-auto lg:hidden",onClick:()=>C(a=>!a),"aria-label":"Tips","aria-expanded":b}),s&&!p&&e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(v,{className:"size-4"}),className:"hidden ml-auto lg:inline-flex",onClick:u,"aria-label":"Show tips"})]}),s&&b&&e.jsx("div",{className:"border-b border-line bg-surface-sunken px-row-inset py-3 text-xs leading-relaxed text-fg-muted lg:hidden",children:s}),o?e.jsx("div",{className:"flex min-h-0 flex-1 flex-col",children:r}):e.jsx("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e.jsx("div",{className:"max-w-2xl px-3 py-5 lg:px-5",children:e.jsx("div",{className:"space-y-5",children:r})})})]}),p&&e.jsxs("aside",{className:"hidden w-64 shrink-0 flex-col border-l border-line bg-surface-sunken lg:flex",children:[e.jsxs("header",{className:"flex h-pane-header shrink-0 items-center justify-between border-b border-line px-row-inset",children:[e.jsx("span",{className:"text-2xs font-semibold uppercase tracking-wider text-fg-subtle",children:"Tips & tricks"}),e.jsx(i,{variant:"ghost",size:"sm",icon:e.jsx(N,{className:"size-3.5"}),onClick:u,"aria-label":"Collapse tips"})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-row-inset py-3 text-xs leading-relaxed text-fg-muted",children:s})]})]})}function R({name:l,email:t,meta:c,caption:n,danger:r,trailing:s}){return e.jsxs("div",{className:"flex items-center gap-3 px-row-inset py-2 hover:bg-surface-sunken",children:[e.jsx("span",{className:f(r&&"rounded-full ring-2 ring-danger/40"),children:e.jsx(w,{name:l,email:t,size:"sm"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex flex-col gap-0 sm:flex-row sm:items-baseline sm:gap-2",children:[e.jsx("span",{className:"truncate text-sm font-medium text-fg",children:l}),e.jsx("span",{className:"truncate text-2xs text-fg-subtle",children:t})]}),e.jsxs("div",{className:"text-xs text-fg-subtle",children:[c,n&&e.jsxs("span",{className:"text-fg-muted",children:[" · ",n]})]})]}),s&&e.jsx("div",{className:"shrink-0",children:s})]})}const O={healthy:{tone:"positive",label:"healthy"},error:{tone:"danger",label:"error"},muted:{tone:"neutral",label:"muted"}};function X({label:l,email:t,connector:c,syncLabel:n,state:r,errorDetail:s,trailing:d}){const o=O[r];return e.jsxs("div",{className:f("rounded-sm border border-line bg-surface",r==="muted"&&"opacity-65"),children:[e.jsxs("div",{className:"flex flex-col gap-3 px-row-inset py-3 sm:flex-row sm:items-center",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-3",children:[e.jsx(w,{name:l,email:t,size:"md"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate text-sm font-semibold text-fg",children:l}),e.jsx(S,{tone:o.tone,dot:!0,children:o.label})]}),e.jsxs("div",{className:"truncate text-xs text-fg-subtle",children:[t," · ",c," · ",n]})]})]}),d&&e.jsx("div",{className:"shrink-0",children:d})]}),s&&e.jsx("div",{className:"border-t border-line px-row-inset py-2",children:e.jsx("code",{className:"block rounded-xs bg-danger-soft px-2 py-1 text-2xs text-danger",children:s})})]})}export{X as A,F as S,R as a};
@@ -1 +1 @@
1
- import{c as e}from"./index-B_E2UDsv.js";const c=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);export{c as S};
1
+ import{c as e}from"./index-tka6wZr_.js";const c=e("ShieldCheck",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);export{c as S};
@@ -1 +1 @@
1
- import{j as t,a7 as e}from"./index-B_E2UDsv.js";const o=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{o as component};
1
+ import{j as t,a7 as e}from"./index-tka6wZr_.js";const o=()=>t.jsx(e,{to:"/settings/senders",replace:!0});export{o as component};
@@ -1 +1 @@
1
- import{r as d}from"./index-B_E2UDsv.js";const r=e=>{const[i,n]=d.useState(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches);return d.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const t=window.matchMedia(e);n(t.matches);const a=s=>n(s.matches);return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e]),i};export{r as u};
1
+ import{r as d}from"./index-tka6wZr_.js";const r=e=>{const[i,n]=d.useState(()=>typeof window>"u"||!window.matchMedia?!1:window.matchMedia(e).matches);return d.useEffect(()=>{if(typeof window>"u"||!window.matchMedia)return;const t=window.matchMedia(e);n(t.matches);const a=s=>n(s.matches);return t.addEventListener("change",a),()=>t.removeEventListener("change",a)},[e]),i};export{r as u};
@@ -1 +1 @@
1
- import{r as o}from"./index-B_E2UDsv.js";const n=(e,t)=>{const[r,u]=o.useState(e);return o.useEffect(()=>{const s=setTimeout(()=>u(e),t);return()=>clearTimeout(s)},[e,t]),r};export{n as u};
1
+ import{r as o}from"./index-tka6wZr_.js";const n=(e,t)=>{const[r,u]=o.useState(e);return o.useEffect(()=>{const s=setTimeout(()=>u(e),t);return()=>clearTimeout(s)},[e,t]),r};export{n as u};
@@ -1 +1 @@
1
- import{r as m,af as b,cQ as E,x as C,cR as D,cz as x,cS as F,s as M,cT as P,cU as N,cV as z,cW as L}from"./index-B_E2UDsv.js";import{u as T}from"./use-match-media-oLZSDQbf.js";import{D as w}from"./layout-breakpoints-BWjiUQKh.js";const G=()=>T(w),X=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},Z=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},O=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",c=Math.abs(o),l=String(Math.floor(c/60)).padStart(2,"0"),f=String(c%60).padStart(2,"0"),u=p=>String(p).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${l}:${f}`},h="None",ee=e=>!e.literalClauses.some(t=>t.field==="HasWords"),y=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),te=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",re=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?O(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),_=new Set(["Complete","Failed"]),v=e=>e!==void 0&&_.has(e),R=1e3,k=15e3,J=e=>{const t=Math.max(0,e),r=R*2**t;return Math.min(r,k)},$=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},se=e=>{const[t,r]=m.useState(),a=b({...E(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...D({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const I=g.state.data?.state;return v(I)?!1:J(g.state.dataUpdateCount)}}),s=m.useCallback(g=>{e&&i({path:{accountId:e},body:y(g)})},[e,i]),{refetch:o}=n,d=m.useCallback(()=>{o()},[o]),c=n.data,l=a.isPending?void 0:c,f=l?.state??a.data?.state,u=v(l?.state),p={state:f,matchedCount:l?.matchedCount??0,appliedCount:l?.appliedCount??0,failedCount:l?.failedCount??0,errorMessage:l?.errorMessage??""};return{start:s,refreshStatus:d,progress:p,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:$(a.error,n.error,!!c)}},ae=["From","Subject","HasWords","ListId","FromDomain"],U=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ne=(e,t)=>e==="ListId"?U(t):t.trim(),Q=e=>e==="all"?"And":"Or",W=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:Q(e.matchOperator),literalClauses:a}},j=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),q=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),ie=(e,t)=>{const r=W(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?O(e.until??""):void 0}},H=(e,t)=>e.error!==void 0&&e.errorSignature===t?{status:"error",reason:e.error}:e.count===void 0?{status:"loading"}:e.previewedSignature===t?{status:"ready",count:e.count}:{status:"ready",count:e.count,stale:!0},K=350,oe=(e,t,r)=>{const a=b(x()),{mutateAsync:i}=a,n=q(t),[s,o]=m.useState(()=>({})),d=m.useRef(t);d.current=t;const c=m.useRef(n),l=j(t);return m.useEffect(()=>{if(!e||!l||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;c.current=u,i({path:{accountId:e},body:y({...d.current})}).then(p=>{c.current===u&&o({count:p.matchedCount,matchedIds:p.messageIds,previewedSignature:u})}).catch(p=>{c.current===u&&o(g=>({...g,error:p instanceof Error?p.message:"Couldn't count matches.",errorSignature:u}))})},K);return()=>clearTimeout(f)},[e,l,n,s.previewedSignature,s.errorSignature,i]),l?{count:H(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:F},matchedIds:[]}},A=e=>N({path:{accountId:e}}),ue=e=>{const t=C({...z({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ce=e=>{const t=M(),r=b({...P(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=m.useCallback((o,d,c)=>{e&&a({path:{accountId:e},body:S(o,d,c)})},[e,a]),s=m.useCallback(async(o,d,c)=>e?i({path:{accountId:e},body:S(o,d,c)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},le=e=>{const t=M(),r=b({...L(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:m.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,ae as S,se as a,A as b,ie as c,G as d,Z as e,X as f,ue as g,le as h,y as i,ce as j,re as k,ee as l,ne as n,te as o,O as p,W as r,oe as u};
1
+ import{r as m,af as b,cQ as E,x as C,cR as D,cz as x,cS as F,s as M,cT as P,cU as N,cV as z,cW as L}from"./index-tka6wZr_.js";import{u as T}from"./use-match-media-BrJFrufZ.js";import{D as w}from"./layout-breakpoints-BWjiUQKh.js";const G=()=>T(w),X=(e,t)=>{if(e.state==="Expired")return"Expired";if(e.scope!=="Temporary"||!e.expiresAt)return"Active";const r=Date.parse(e.expiresAt);return Number.isNaN(r)?"Active":r<=t?"Expired":"Active"},Z=e=>{if(!e)return;const t=Date.parse(e);if(!Number.isNaN(t))return new Date(t).toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})},O=(e,t=new Date)=>{if(!e)return;const r=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!r)return;const[,a,i,n]=r,s=new Date(Number(a),Number(i)-1,Number(n),23,59,59,0);if(Number.isNaN(s.getTime()))return;const o=-t.getTimezoneOffset(),d=o>=0?"+":"-",c=Math.abs(o),l=String(Math.floor(c/60)).padStart(2,"0"),f=String(c%60).padStart(2,"0"),u=p=>String(p).padStart(2,"0");return`${s.getFullYear()}-${u(s.getMonth()+1)}-${u(s.getDate())}T${u(s.getHours())}:${u(s.getMinutes())}:${u(s.getSeconds())}${d}${l}:${f}`},h="None",ee=e=>!e.literalClauses.some(t=>t.field==="HasWords"),y=e=>({...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h}),te=({mode:e,ruleScope:t})=>t==="standing"?"standing":t==="until"?"temporary":e==="selected"?"just-these":"all-like-these",re=({mode:e,ruleScope:t,anchorMessageId:r,clauses:a,matchOperator:i,moveMailboxId:n,until:s})=>({...e==="similar"&&r?{anchorMessageId:r}:{},matchOperator:i==="all"?"And":"Or",literalClauses:a.map(o=>({field:o.field,value:o.value})),moveMailboxId:n,expiresAt:t==="until"?O(s??""):void 0}),S=(e,t,r)=>({name:r,scope:t==="standing"?"Standing":"Temporary",...t==="temporary"&&e.expiresAt?{expiresAt:e.expiresAt}:{},matchOperator:e.matchOperator,literalClauses:e.literalClauses,actionLabelId:e.labelId??h,actionMailboxId:e.moveMailboxId??h,...e.anchorMessageId?{anchorMessageId:e.anchorMessageId}:{}}),_=new Set(["Complete","Failed"]),v=e=>e!==void 0&&_.has(e),R=1e3,k=15e3,J=e=>{const t=Math.max(0,e),r=R*2**t;return Math.min(r,k)},$=(e,t,r)=>{if(e)return{kind:r?"restartFailed":"startFailed",error:e};if(t)return{kind:"statusUnreadable",error:t}},se=e=>{const[t,r]=m.useState(),a=b({...E(),onSuccess:g=>r(g.organizeJobId)}),{mutate:i}=a,n=C({...D({path:{accountId:e??"",organizeJobId:t??""}}),enabled:!!e&&!!t,refetchInterval:g=>{const I=g.state.data?.state;return v(I)?!1:J(g.state.dataUpdateCount)}}),s=m.useCallback(g=>{e&&i({path:{accountId:e},body:y(g)})},[e,i]),{refetch:o}=n,d=m.useCallback(()=>{o()},[o]),c=n.data,l=a.isPending?void 0:c,f=l?.state??a.data?.state,u=v(l?.state),p={state:f,matchedCount:l?.matchedCount??0,appliedCount:l?.appliedCount??0,failedCount:l?.failedCount??0,errorMessage:l?.errorMessage??""};return{start:s,refreshStatus:d,progress:p,isStarting:a.isPending,isRunning:!!t&&!u,isDone:u,failure:$(a.error,n.error,!!c)}},ae=["From","Subject","HasWords","ListId","FromDomain"],U=e=>{const t=e.trim(),r=t.match(/<([^>]+)>/);return(r?r[1]:t).trim().toLowerCase()},ne=(e,t)=>e==="ListId"?U(t):t.trim(),Q=e=>e==="all"?"And":"Or",W=(e,t)=>{const r=e.widen!==void 0&&!e.widen.inactive,a=e.clauses.map(i=>({field:i.field,value:i.value}));return{...r&&t?{anchorMessageId:t}:{},matchOperator:Q(e.matchOperator),literalClauses:a}},j=e=>e.anchorMessageId!==void 0||!e.literalClauses.some(t=>t.field==="HasWords"),q=e=>JSON.stringify({anchor:e.anchorMessageId??null,operator:e.matchOperator,clauses:e.literalClauses.map(t=>`${t.field} ${t.value}`)}),ie=(e,t)=>{const r=W(e,t);return{...r.anchorMessageId?{anchorMessageId:r.anchorMessageId}:{},matchOperator:r.matchOperator,literalClauses:r.literalClauses,moveMailboxId:e.moveMailboxId,labelId:e.labelId,expiresAt:e.scope==="until"?O(e.until??""):void 0}},H=(e,t)=>e.error!==void 0&&e.errorSignature===t?{status:"error",reason:e.error}:e.count===void 0?{status:"loading"}:e.previewedSignature===t?{status:"ready",count:e.count}:{status:"ready",count:e.count,stale:!0},K=350,oe=(e,t,r)=>{const a=b(x()),{mutateAsync:i}=a,n=q(t),[s,o]=m.useState(()=>({})),d=m.useRef(t);d.current=t;const c=m.useRef(n),l=j(t);return m.useEffect(()=>{if(!e||!l||n===s.previewedSignature||n===s.errorSignature)return;const f=setTimeout(()=>{const u=n;c.current=u,i({path:{accountId:e},body:y({...d.current})}).then(p=>{c.current===u&&o({count:p.matchedCount,matchedIds:p.messageIds,previewedSignature:u})}).catch(p=>{c.current===u&&o(g=>({...g,error:p instanceof Error?p.message:"Couldn't count matches.",errorSignature:u}))})},K);return()=>clearTimeout(f)},[e,l,n,s.previewedSignature,s.errorSignature,i]),l?{count:H(s,n),matchedIds:s.previewedSignature===n?s.matchedIds??[]:[]}:{count:{status:"error",reason:F},matchedIds:[]}},A=e=>N({path:{accountId:e}}),ue=e=>{const t=C({...z({path:{accountId:e??""}}),enabled:!!e});return{filters:t.data?.items??[],isPending:t.isPending,isError:t.isError,error:t.error,refetch:t.refetch}},ce=e=>{const t=M(),r=b({...P(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a,mutateAsync:i}=r,n=m.useCallback((o,d,c)=>{e&&a({path:{accountId:e},body:S(o,d,c)})},[e,a]),s=m.useCallback(async(o,d,c)=>e?i({path:{accountId:e},body:S(o,d,c)}).then(()=>!0,()=>!1):!1,[e,i]);return{createFilter:n,createFilterAsync:s,isPending:r.isPending,isSuccess:r.isSuccess,isError:r.isError,error:r.error,reset:r.reset}},le=e=>{const t=M(),r=b({...L(),onSuccess:()=>{e&&t.invalidateQueries({queryKey:A(e)})}}),{mutate:a}=r;return{deleteFilter:m.useCallback(n=>{e&&a({path:{accountId:e,filterId:n}})},[e,a]),isPending:r.isPending,deletingFilterId:r.isPending?r.variables?.path.filterId:void 0}};export{h as N,ae as S,se as a,A as b,ie as c,G as d,Z as e,X as f,ue as g,le as h,y as i,ce as j,re as k,ee as l,ne as n,te as o,O as p,W as r,oe as u};
@@ -1 +1 @@
1
- import{x as L,bA as p,s as n,af as l,bB as d,r as o,bC as y,bD as c,bE as g}from"./index-B_E2UDsv.js";const u=e=>y({path:{accountId:e}}),P=e=>{const s=L({...p({path:{accountId:e??""}}),enabled:!!e});return{labels:s.data?.items??[],isPending:s.isPending,isError:s.isError,error:s.error,refetch:s.refetch}},m=e=>{const s=n(),t=l({...d(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:r}=t;return{createLabel:o.useCallback((a,i="Default")=>e?r({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,r]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},C=e=>{const s=n(),t=l({...c(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{updateLabel:o.useCallback((a,i)=>{e&&r({path:{accountId:e,labelId:a},body:i})},[e,r]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},h=e=>{const s=n(),t=l({...g(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{deleteLabel:o.useCallback(a=>{e&&r({path:{accountId:e,labelId:a}})},[e,r]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{P as a,C as b,h as c,m as u};
1
+ import{x as L,bA as p,s as n,af as l,bB as d,r as o,bC as y,bD as c,bE as g}from"./index-tka6wZr_.js";const u=e=>y({path:{accountId:e}}),P=e=>{const s=L({...p({path:{accountId:e??""}}),enabled:!!e});return{labels:s.data?.items??[],isPending:s.isPending,isError:s.isError,error:s.error,refetch:s.refetch}},m=e=>{const s=n(),t=l({...d(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutateAsync:r}=t;return{createLabel:o.useCallback((a,i="Default")=>e?r({path:{accountId:e},body:{name:a,color:i}}):Promise.reject(new Error("No account")),[e,r]),isPending:t.isPending,isError:t.isError,error:t.error,reset:t.reset}},C=e=>{const s=n(),t=l({...c(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{updateLabel:o.useCallback((a,i)=>{e&&r({path:{accountId:e,labelId:a},body:i})},[e,r]),isPending:t.isPending,updatingLabelId:t.isPending?t.variables?.path.labelId:void 0}},h=e=>{const s=n(),t=l({...g(),onSuccess:()=>{e&&s.invalidateQueries({queryKey:u(e)})}}),{mutate:r}=t;return{deleteLabel:o.useCallback(a=>{e&&r({path:{accountId:e,labelId:a}})},[e,r]),isPending:t.isPending,deletingLabelId:t.isPending?t.variables?.path.labelId:void 0}};export{P as a,C as b,h as c,m as u};
@@ -1 +1 @@
1
- import{j as E,e as q,b as j,B as D,r as i,v as C,aF as R,s as P,o as K,a2 as Q,Q as A,P as $,R as z,U as B}from"./index-B_E2UDsv.js";import{C as G}from"./circle-check-big-D3RJmZBi.js";import{R as H}from"./search-token-index-C4Fe_kHI.js";function oe({state:e,onRefresh:t,label:s,errorMessage:a,hasUpdate:n,size:u="sm",className:c}){const o=e==="refreshing",f=e==="error",h=e==="success",g=f?E.jsx(q,{className:"size-4 text-danger"}):h?E.jsx(G,{className:"size-4 text-positive"}):E.jsx(H,{className:j("size-4",o&&"animate-spin")}),y=f?`${s} — failed: ${a??"try again"}`:o?`${s} — refreshing`:h?`${s} — up to date`:n?`${s} — new mail`:s;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(D,{variant:"ghost",size:u,icon:g,onClick:t,disabled:o,"aria-label":y,"aria-busy":o||void 0,title:f?a:s,className:c}),e==="idle"&&n&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const U=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function F(e){return!!e&&U.has(e)}const N=3e3,W=N*2,v={syncing:!1,resolved:!1,synced:0,total:0};function ie(e,t){const s=e.join(","),[a,n]=i.useState(!1),[u,c]=i.useState(!1);i.useEffect(()=>{n(!1),c(!1)},[s,t]),i.useEffect(()=>{if(!t)return;const r=setTimeout(()=>c(!0),W);return()=>clearTimeout(r)},[s,t]);const o=C({queries:e.map(r=>({...R({path:{accountId:r}}),enabled:t&&!a,refetchInterval:N,meta:{softError:!0}}))}),f=o.every(r=>r.isSuccess||r.isError),h=o.length===0||f||u;let g=!1,y=0,w=0;for(const r of o)if(F(r.data?.syncPhase)){g=!0;for(const l of r.data?.mailboxes??[])y+=l.messagesSynced,w+=l.messagesTotal}const S=t&&h&&!g;return i.useEffect(()=>{S&&n(!0)},[S]),!t||!h?v:{syncing:g,resolved:!0,synced:y,total:w}}const M=6e4,I=new Set(["sent","drafts","trash","archive"]),k=(e,t)=>{const s=new Map;for(const a of e){const n=t.get(a.mailboxId)?.role;n&&I.has(n)||s.set(a.mailboxId,a.messagesTotal)}return s},X=(e,t)=>{for(const[s,a]of t)if(a>(e.get(s)??0))return!0;return!1},_=i.createContext(null),J=()=>{const e=i.useContext(_);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function ce({accountIds:e,children:t}){const s=P(),{resultFolderIndex:a}=K(),n=i.useRef(new Map),u=i.useRef(new Set),[c,o]=i.useState(new Set),f=C({queries:e.map(r=>({...R({path:{accountId:r}}),refetchInterval:M,staleTime:M,meta:{softError:!0}}))}),h=f.map(r=>r.dataUpdatedAt).join(","),g=e.join(",");i.useEffect(()=>{let r=!1;const l=new Set(c);e.forEach((d,x)=>{const p=f[x]?.data;if(!p)return;const m=k(p.mailboxes??[],a);if(!u.current.has(d)){u.current.add(d),n.current.set(d,m);return}if(l.has(d))return;const T=n.current.get(d)??new Map;X(T,m)&&(l.add(d),r=!0)}),r&&o(l)},[g,h]);const y=i.useCallback(r=>r.some(l=>c.has(l)),[c]),w=i.useCallback(r=>{o(l=>{if(r.every(x=>!l.has(x)))return l;const d=new Set(l);for(const x of r)d.delete(x);return d});for(const l of r){const d=s.getQueryData(R({path:{accountId:l}}).queryKey);n.current.set(l,k(d?.mailboxes??[],a)),u.current.add(l)}},[s,a]),S=i.useMemo(()=>({hasNewMail:y,acknowledge:w}),[y,w]);return E.jsx(_.Provider,{value:S,children:t})}const V=2e3,Y=45e3,Z=e=>new Promise(t=>setTimeout(t,e)),b=e=>e instanceof Error&&e.message?e.message:"Something went wrong",ee=e=>{z(e,{softError:!0})&&B(e)},L=e=>e.reduce((t,s)=>Math.max(t,s.lastSyncedAt??0),0),O=(e,t)=>e.fetchQuery({...R({path:{accountId:t}}),staleTime:0}),se=async(e,t,s,a)=>{let n=!1;for(;;){const u=await O(e,t).then(f=>({ok:!0,data:f})).catch(f=>({ok:!1,error:f}));if(!u.ok)return{accountId:t,message:b(u.error)};const{syncPhase:c,mailboxes:o}=u.data;if(F(c))n=!0;else if(n||L(o??[])>s)return c==="error"?{accountId:t,message:"Sync failed for this account"}:void 0;if(Date.now()>=a)return{accountId:t,message:"Refresh is taking longer than usual"};await Z(V)}},te=async(e,t,s,a)=>{const n=await O(e,s).then(o=>({ok:!0,maxLastSynced:L(o.mailboxes??[])})).catch(o=>({ok:!1,error:o}));if(!n.ok)return{accountId:s,enqueued:!1,ok:!1,message:b(n.error)};const u=await $({path:{accountId:s},throwOnError:!0}).then(()=>({ok:!0})).catch(o=>({ok:!1,error:o}));if(!u.ok)return ee(u.error),{accountId:s,enqueued:!1,ok:!1,message:b(u.error)};t.recordEvent("sync.triggered");const c=await se(e,s,n.maxLastSynced,a);return c?{accountId:s,enqueued:!0,ok:!1,message:c.message}:{accountId:s,enqueued:!0,ok:!0}},ue=(e,t={})=>{const s=P(),a=Q(),{acknowledge:n}=J(),[u,c]=i.useState("idle"),[o,f]=i.useState(),h=i.useRef(0),g=i.useRef(e);g.current=e;const y=i.useRef(t);y.current=t,i.useEffect(()=>{if(u!=="success")return;const S=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(S)},[u]);const w=i.useCallback(()=>{const S=g.current;if(S.length===0){c("error"),f("Nothing to refresh yet");return}const r=++h.current;c("refreshing"),f(void 0),(async()=>{const l=Date.now()+Y,d=await Promise.all(S.map(m=>te(s,a,m,l)));if(h.current!==r)return;const x=d.filter(m=>m.enqueued).map(m=>m.accountId);for(const m of x)s.invalidateQueries({queryKey:A({path:{accountId:m}})});x.length>0&&(y.current.onSettled?.(),n(x));const p=d.filter(m=>!m.ok);p.length===0?c("success"):(c("error"),f(p[0]?.message))})()},[n,s,a]);return{state:u,errorMessage:o,refresh:w}};export{ce as M,oe as R,ue as a,ie as b,F as i,J as u};
1
+ import{j as E,e as q,b as j,B as D,r as i,v as C,aF as R,s as P,o as K,a2 as Q,Q as A,P as $,R as z,U as B}from"./index-tka6wZr_.js";import{C as G}from"./circle-check-big-CjzecMB6.js";import{R as H}from"./search-token-index-Bw0eYLiL.js";function oe({state:e,onRefresh:t,label:s,errorMessage:a,hasUpdate:n,size:u="sm",className:c}){const o=e==="refreshing",f=e==="error",h=e==="success",g=f?E.jsx(q,{className:"size-4 text-danger"}):h?E.jsx(G,{className:"size-4 text-positive"}):E.jsx(H,{className:j("size-4",o&&"animate-spin")}),y=f?`${s} — failed: ${a??"try again"}`:o?`${s} — refreshing`:h?`${s} — up to date`:n?`${s} — new mail`:s;return E.jsxs("div",{className:"relative inline-flex",children:[E.jsx(D,{variant:"ghost",size:u,icon:g,onClick:t,disabled:o,"aria-label":y,"aria-busy":o||void 0,title:f?a:s,className:c}),e==="idle"&&n&&E.jsx("span",{"aria-hidden":"true",className:"absolute right-1 top-1 size-1.5 rounded-full bg-accent-2"})]})}const U=new Set(["discovering_mailboxes","syncing_inbox","syncing_others"]);function F(e){return!!e&&U.has(e)}const N=3e3,W=N*2,v={syncing:!1,resolved:!1,synced:0,total:0};function ie(e,t){const s=e.join(","),[a,n]=i.useState(!1),[u,c]=i.useState(!1);i.useEffect(()=>{n(!1),c(!1)},[s,t]),i.useEffect(()=>{if(!t)return;const r=setTimeout(()=>c(!0),W);return()=>clearTimeout(r)},[s,t]);const o=C({queries:e.map(r=>({...R({path:{accountId:r}}),enabled:t&&!a,refetchInterval:N,meta:{softError:!0}}))}),f=o.every(r=>r.isSuccess||r.isError),h=o.length===0||f||u;let g=!1,y=0,w=0;for(const r of o)if(F(r.data?.syncPhase)){g=!0;for(const l of r.data?.mailboxes??[])y+=l.messagesSynced,w+=l.messagesTotal}const S=t&&h&&!g;return i.useEffect(()=>{S&&n(!0)},[S]),!t||!h?v:{syncing:g,resolved:!0,synced:y,total:w}}const M=6e4,I=new Set(["sent","drafts","trash","archive"]),k=(e,t)=>{const s=new Map;for(const a of e){const n=t.get(a.mailboxId)?.role;n&&I.has(n)||s.set(a.mailboxId,a.messagesTotal)}return s},X=(e,t)=>{for(const[s,a]of t)if(a>(e.get(s)??0))return!0;return!1},_=i.createContext(null),J=()=>{const e=i.useContext(_);if(!e)throw new Error("useMailFreshness must be used inside <MailFreshnessProvider>");return e};function ce({accountIds:e,children:t}){const s=P(),{resultFolderIndex:a}=K(),n=i.useRef(new Map),u=i.useRef(new Set),[c,o]=i.useState(new Set),f=C({queries:e.map(r=>({...R({path:{accountId:r}}),refetchInterval:M,staleTime:M,meta:{softError:!0}}))}),h=f.map(r=>r.dataUpdatedAt).join(","),g=e.join(",");i.useEffect(()=>{let r=!1;const l=new Set(c);e.forEach((d,x)=>{const p=f[x]?.data;if(!p)return;const m=k(p.mailboxes??[],a);if(!u.current.has(d)){u.current.add(d),n.current.set(d,m);return}if(l.has(d))return;const T=n.current.get(d)??new Map;X(T,m)&&(l.add(d),r=!0)}),r&&o(l)},[g,h]);const y=i.useCallback(r=>r.some(l=>c.has(l)),[c]),w=i.useCallback(r=>{o(l=>{if(r.every(x=>!l.has(x)))return l;const d=new Set(l);for(const x of r)d.delete(x);return d});for(const l of r){const d=s.getQueryData(R({path:{accountId:l}}).queryKey);n.current.set(l,k(d?.mailboxes??[],a)),u.current.add(l)}},[s,a]),S=i.useMemo(()=>({hasNewMail:y,acknowledge:w}),[y,w]);return E.jsx(_.Provider,{value:S,children:t})}const V=2e3,Y=45e3,Z=e=>new Promise(t=>setTimeout(t,e)),b=e=>e instanceof Error&&e.message?e.message:"Something went wrong",ee=e=>{z(e,{softError:!0})&&B(e)},L=e=>e.reduce((t,s)=>Math.max(t,s.lastSyncedAt??0),0),O=(e,t)=>e.fetchQuery({...R({path:{accountId:t}}),staleTime:0}),se=async(e,t,s,a)=>{let n=!1;for(;;){const u=await O(e,t).then(f=>({ok:!0,data:f})).catch(f=>({ok:!1,error:f}));if(!u.ok)return{accountId:t,message:b(u.error)};const{syncPhase:c,mailboxes:o}=u.data;if(F(c))n=!0;else if(n||L(o??[])>s)return c==="error"?{accountId:t,message:"Sync failed for this account"}:void 0;if(Date.now()>=a)return{accountId:t,message:"Refresh is taking longer than usual"};await Z(V)}},te=async(e,t,s,a)=>{const n=await O(e,s).then(o=>({ok:!0,maxLastSynced:L(o.mailboxes??[])})).catch(o=>({ok:!1,error:o}));if(!n.ok)return{accountId:s,enqueued:!1,ok:!1,message:b(n.error)};const u=await $({path:{accountId:s},throwOnError:!0}).then(()=>({ok:!0})).catch(o=>({ok:!1,error:o}));if(!u.ok)return ee(u.error),{accountId:s,enqueued:!1,ok:!1,message:b(u.error)};t.recordEvent("sync.triggered");const c=await se(e,s,n.maxLastSynced,a);return c?{accountId:s,enqueued:!0,ok:!1,message:c.message}:{accountId:s,enqueued:!0,ok:!0}},ue=(e,t={})=>{const s=P(),a=Q(),{acknowledge:n}=J(),[u,c]=i.useState("idle"),[o,f]=i.useState(),h=i.useRef(0),g=i.useRef(e);g.current=e;const y=i.useRef(t);y.current=t,i.useEffect(()=>{if(u!=="success")return;const S=setTimeout(()=>c("idle"),2e3);return()=>clearTimeout(S)},[u]);const w=i.useCallback(()=>{const S=g.current;if(S.length===0){c("error"),f("Nothing to refresh yet");return}const r=++h.current;c("refreshing"),f(void 0),(async()=>{const l=Date.now()+Y,d=await Promise.all(S.map(m=>te(s,a,m,l)));if(h.current!==r)return;const x=d.filter(m=>m.enqueued).map(m=>m.accountId);for(const m of x)s.invalidateQueries({queryKey:A({path:{accountId:m}})});x.length>0&&(y.current.onSettled?.(),n(x));const p=d.filter(m=>!m.ok);p.length===0?c("success"):(c("error"),f(p[0]?.message))})()},[n,s,a]);return{state:u,errorMessage:o,refresh:w}};export{ce as M,oe as R,ue as a,ie as b,F as i,J as u};
@@ -1 +1 @@
1
- import{p as y,o as d,W as x,r as p}from"./index-B_E2UDsv.js";import{u as Q}from"./search-scope-5RASGpum.js";import{b as v}from"./search-view-DMyiUtsQ.js";function M(o){const a=y(),{searchInput:c,searchQuery:r}=d(),{q:i=""}=x({from:"/mail"}),n=Q({select:l=>l.location.pathname}),s=p.useRef(i);s.current=i;const{to:e}=o,t="params"in o?o.params.mailboxId:void 0,m=t?`/mail/${t}`:e;p.useEffect(()=>{if(!v({searchInput:c,committedQuery:r,urlQuery:s.current,pathname:n,listPath:m}))return;const f=!!r&&s.current!==r,u=h=>({...h,q:r||void 0});if(!f){a({to:".",search:u,replace:!0});return}if(e==="/mail/$mailboxId"){if(!t)return;a({to:e,params:{mailboxId:t},search:u,replace:!0});return}a({to:e,search:u,replace:!0})},[c,r,a,e,t,m,n])}export{M as u};
1
+ import{p as y,o as d,W as x,r as p}from"./index-tka6wZr_.js";import{u as Q}from"./search-scope-By6SdCOd.js";import{b as v}from"./search-view-Cv6MXaNP.js";function M(o){const a=y(),{searchInput:c,searchQuery:r}=d(),{q:i=""}=x({from:"/mail"}),n=Q({select:l=>l.location.pathname}),s=p.useRef(i);s.current=i;const{to:e}=o,t="params"in o?o.params.mailboxId:void 0,m=t?`/mail/${t}`:e;p.useEffect(()=>{if(!v({searchInput:c,committedQuery:r,urlQuery:s.current,pathname:n,listPath:m}))return;const f=!!r&&s.current!==r,u=h=>({...h,q:r||void 0});if(!f){a({to:".",search:u,replace:!0});return}if(e==="/mail/$mailboxId"){if(!t)return;a({to:e,params:{mailboxId:t},search:u,replace:!0});return}a({to:e,search:u,replace:!0})},[c,r,a,e,t,m,n])}export{M as u};
@@ -1,4 +1,4 @@
1
- import{c2 as X,r as h,j as a,b as B,I as Y,a2 as Z,n as P,s as W,x as J,cq as H,cp as ee,ad as te,af as se,ag as re,ba as ne,e as ae,X as oe,K as C,o as ie}from"./index-B_E2UDsv.js";import{K as L}from"./kbd-BCoy2IeN.js";import{u as ce}from"./use-match-media-oLZSDQbf.js";import{M as Q}from"./enums-CCxx0t2v.js";import{u as le,i as de}from"./search-scope-5RASGpum.js";const ue=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},fe=()=>`
1
+ import{c2 as X,r as h,j as a,b as B,I as Y,a2 as Z,n as P,s as W,x as J,cq as H,cp as ee,ad as te,af as se,ag as re,ba as ne,e as ae,X as oe,K as C,o as ie}from"./index-tka6wZr_.js";import{K as L}from"./kbd-Dt_vzEGr.js";import{u as ce}from"./use-match-media-BrJFrufZ.js";import{M as Q}from"./enums-CCxx0t2v.js";import{u as le,i as de}from"./search-scope-By6SdCOd.js";const ue=(e,t)=>{const r=e==="newsletter"||e==="marketing"||t;return{framed:r,isPlain:!r}},fe=()=>`
2
2
  /* Zero the UA default body margin and clamp the document to the iframe width so
3
3
  wide author markup can't push the body (and the page) past the viewport. */
4
4
  html, body {
@@ -1 +1 @@
1
- import{s as L,ad as C,af as k,bu as I,bv as E,r as x,j as p,bw as h,bx as A,by as j,o as R,x as Q,bz as z}from"./index-B_E2UDsv.js";import{aj as D,ak as O,al as _,am as N,an as P}from"./MailListHeader-XjtEHsNb.js";import{a as q}from"./useLabels-C_RuDPDr.js";import{M as w}from"./enums-CCxx0t2v.js";import{u as U,s as B}from"./search-scope-5RASGpum.js";import{n as F}from"./search-query-Cr_ZXBCp.js";import{u as G,p as K}from"./useSearchTokenContext-DFAPyUzs.js";const V=t=>{const{mailboxId:s,messages:i}=t,l=L(),{pushError:c}=C(),{mutateAsync:r,isPending:a}=k({...E(),onError:(o,u)=>{c({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:I(o),error:o})},onSettled:(o,u,m)=>{D(l,O(_(m.body.messageIds??[],i??[],s)))}});return{applyLabel:x.useCallback((o,u,m)=>{o.length!==0&&N(o,d=>r({body:{messageIds:d,labelId:u,action:m}}))},[r]),isPending:a}};function oe({accountId:t,mailboxId:s,messageIds:i}){const{labels:l}=q(t),{applyLabel:c}=V({mailboxId:s}),r=x.useMemo(()=>l.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${A(a.color)?h[a.color]:h.Default}`}),onSelect:()=>c(i,a.labelId,"Apply")})),[l,i,c]);return r.length===0?null:p.jsx(P,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(j,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:r,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const $=20,H=new Set(Object.values(w)),J=t=>t!==void 0&&H.has(t)?t:void 0,W=t=>{if(t.some(s=>s.type==="isUnread"))return!1;if(t.some(s=>s.type==="isRead"))return!0};function ne({mailboxId:t,filterCategory:s}={}){const{searchQuery:i}=R(),l=G(),c=U({select:e=>e.matches}),r=F(i),{freeText:a,tokens:n}=K(r,l),o=a.length>0,u=n.find(e=>e.type==="category"),m=J(s)??u?.category,d=n.some(e=>e.type==="hasAttachment")?!0:void 0,y=n.some(e=>e.type==="isStarred")?!0:void 0,b=W(n),f=n.find(e=>e.type==="after"),g=n.find(e=>e.type==="before"),S=n.find(e=>e.type==="in"),v=B({matches:c,callerMailboxId:t,inTokenMailboxId:S?.mailboxId}),{data:M,isLoading:T}=Q({...z({query:{query:a,mailboxId:v,limit:$,...m!==void 0?{category:m}:{},...d!==void 0?{hasAttachment:d}:{},...y!==void 0?{hasStars:y}:{},...b!==void 0?{isRead:b}:{},...f?{sentDateFrom:f.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:o,staleTime:6e4});return{hits:M?.items??[],isLoading:o&&T}}export{oe as L,ne as u};
1
+ import{s as L,ad as C,af as k,bu as I,bv as E,r as x,j as p,bw as h,bx as A,by as j,o as R,x as Q,bz as z}from"./index-tka6wZr_.js";import{aj as D,ak as O,al as _,am as N,an as P}from"./MailListHeader-CA5lvtZs.js";import{a as q}from"./useLabels-Dg_FXfB1.js";import{M as w}from"./enums-CCxx0t2v.js";import{u as U,s as B}from"./search-scope-By6SdCOd.js";import{n as F}from"./search-query-Cr_ZXBCp.js";import{u as G,p as K}from"./useSearchTokenContext-B60LlfMs.js";const V=t=>{const{mailboxId:s,messages:i}=t,l=L(),{pushError:c}=C(),{mutateAsync:r,isPending:a}=k({...E(),onError:(o,u)=>{c({title:u.body.action==="Remove"?"Couldn't remove label":"Couldn't apply label",detail:I(o),error:o})},onSettled:(o,u,m)=>{D(l,O(_(m.body.messageIds??[],i??[],s)))}});return{applyLabel:x.useCallback((o,u,m)=>{o.length!==0&&N(o,d=>r({body:{messageIds:d,labelId:u,action:m}}))},[r]),isPending:a}};function oe({accountId:t,mailboxId:s,messageIds:i}){const{labels:l}=q(t),{applyLabel:c}=V({mailboxId:s}),r=x.useMemo(()=>l.map(a=>({key:a.labelId,label:a.name,icon:p.jsx("span",{className:`size-2.5 rounded-full ${A(a.color)?h[a.color]:h.Default}`}),onSelect:()=>c(i,a.labelId,"Apply")})),[l,i,c]);return r.length===0?null:p.jsx(P,{triggerLabel:"Apply label to selected messages",triggerIcon:p.jsx(j,{className:"size-4 text-fg-subtle"}),triggerText:"Apply label",items:r,align:"start",nested:!0,touch:!1,triggerClassName:"min-h-11 w-full justify-start gap-3 px-4 py-2.5 text-sm font-normal text-fg"})}const $=20,H=new Set(Object.values(w)),J=t=>t!==void 0&&H.has(t)?t:void 0,W=t=>{if(t.some(s=>s.type==="isUnread"))return!1;if(t.some(s=>s.type==="isRead"))return!0};function ne({mailboxId:t,filterCategory:s}={}){const{searchQuery:i}=R(),l=G(),c=U({select:e=>e.matches}),r=F(i),{freeText:a,tokens:n}=K(r,l),o=a.length>0,u=n.find(e=>e.type==="category"),m=J(s)??u?.category,d=n.some(e=>e.type==="hasAttachment")?!0:void 0,y=n.some(e=>e.type==="isStarred")?!0:void 0,b=W(n),f=n.find(e=>e.type==="after"),g=n.find(e=>e.type==="before"),S=n.find(e=>e.type==="in"),v=B({matches:c,callerMailboxId:t,inTokenMailboxId:S?.mailboxId}),{data:M,isLoading:T}=Q({...z({query:{query:a,mailboxId:v,limit:$,...m!==void 0?{category:m}:{},...d!==void 0?{hasAttachment:d}:{},...y!==void 0?{hasStars:y}:{},...b!==void 0?{isRead:b}:{},...f?{sentDateFrom:f.epochSeconds}:{},...g?{sentDateTo:g.epochSeconds}:{}}}),enabled:o,staleTime:6e4});return{hits:M?.items??[],isLoading:o&&T}}export{oe as L,ne as u};
@@ -1 +1 @@
1
- import{s as c,ad as f,x as p,Z as m,r,af as y,ag as T,a1 as x,ah as E}from"./index-B_E2UDsv.js";const i={html:"",plainText:""},h=e=>{const u=c(),{pushError:o}=f(),{data:n}=p({...m(),staleTime:1/0}),g=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(s=>s.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),a=y({...E(),onSuccess:()=>{u.invalidateQueries({queryKey:x()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),l=r.useCallback((t,s)=>{e&&a.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:s}})},[e,a]);return{signature:g,setSignature:l,isSaving:a.isPending}};export{h as u};
1
+ import{s as c,ad as f,x as p,Z as m,r,af as y,ag as T,a1 as x,ah as E}from"./index-tka6wZr_.js";const i={html:"",plainText:""},h=e=>{const u=c(),{pushError:o}=f(),{data:n}=p({...m(),staleTime:1/0}),g=r.useMemo(()=>{if(!e||!n)return i;const t=n.accounts.find(s=>s.accountId===e);return t?{html:t.signatureHtml??"",plainText:t.signaturePlainText??""}:i},[e,n]),a=y({...E(),onSuccess:()=>{u.invalidateQueries({queryKey:x()})},onError:t=>{o(T("Couldn't save signature","The signature wasn't saved.",t))}}),l=r.useCallback((t,s)=>{e&&a.mutate({path:{accountId:e},body:{signatureHtml:t,signaturePlainText:s}})},[e,a]);return{signature:g,setSignature:l,isSaving:a.isPending}};export{h as u};
package/index.html CHANGED
@@ -38,7 +38,7 @@
38
38
  } catch (_) {}
39
39
  })();
40
40
  </script>
41
- <script type="module" crossorigin src="/assets/index-B_E2UDsv.js"></script>
41
+ <script type="module" crossorigin src="/assets/index-tka6wZr_.js"></script>
42
42
  <link rel="stylesheet" crossorigin href="/assets/index-DUKJ-tDb.css">
43
43
  </head>
44
44
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remit/web-client-dist",
3
- "version": "0.0.330",
3
+ "version": "0.0.331",
4
4
  "description": "Built Remit web client — static assets and the default runtime config.",
5
5
  "files": [
6
6
  "**/*"
@@ -1 +0,0 @@
1
- import{a3 as m,j as o,a0 as p}from"./index-B_E2UDsv.js";import{a}from"./search-view-DMyiUtsQ.js";import{M as r}from"./MailboxPane-zOiUq9W3.js";import{u as e}from"./useSearchMirror-4nvtBo0Y.js";import"./nav-link-D2neGN8U.js";import{u as s}from"./MailListHeader-XjtEHsNb.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./MailViewChrome-DzdQIg9X.js";import"./avatar-sJ32b2ZB.js";import"./account-form-helpers-Buy_HBYK.js";import"./menu-CyQNIqgm.js";import"./ErrorState-Xgz5SZ1i.js";import"./useFilters-Ch0Rz-QY.js";import"./confirm-dialog-tg4IO863.js";import"./format-De9HZKjg.js";import"./NavMenuButton-DoGvk8wx.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";import"./shield-check-CdGNmVbB.js";import"./bottom-sheet-Du7lm3N2.js";import"./circle-help-DNaIbW9w.js";import"./circle-check-B0efcy-K.js";import"./move-options-BDhHrsb6.js";import"./intelligence-pref-C6lFpj6U.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./download-CZYAEXR3.js";import"./clock-CAIXj_wn.js";function Q(){const{mailboxId:t}=m.useParams(),i=s();return e({to:"/mail/$mailboxId",params:{mailboxId:t}}),o.jsx(r,{mailboxId:t,thread:i,children:o.jsx(a,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(p,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!i})})}export{Q as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{M as r}from"./MailboxPane-zOiUq9W3.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./MailListHeader-XjtEHsNb.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";import"./NavMenuButton-DoGvk8wx.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Du7lm3N2.js";import"./circle-help-DNaIbW9w.js";import"./circle-check-B0efcy-K.js";import"./intelligence-pref-C6lFpj6U.js";function I(){return o.jsx(r.Reading,{})}export{I as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{F as r}from"./FlaggedPane-CHjYkYPa.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";function v(){return o.jsx(r.Reading,{})}export{v as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-B_E2UDsv.js";import{B as o}from"./BriefPane-C1eqvaCk.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";function A(){return r.jsx(o.Reading,{})}export{A as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{O as t}from"./OutboxPane-CAD8JF4k.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./circle-check-big-D3RJmZBi.js";import"./clock-CAIXj_wn.js";import"./row-actions-D5tHz-Kt.js";import"./rotate-ccw-CJ6ZyB3Y.js";import"./NavMenuButton-DoGvk8wx.js";import"./menu-CyQNIqgm.js";import"./format-De9HZKjg.js";import"./outbox-status-CPfNHfUQ.js";import"./search-query-Cr_ZXBCp.js";function R(){return o.jsx(t.Reading,{})}export{R as component};
@@ -1 +0,0 @@
1
- import{a0 as o}from"./index-B_E2UDsv.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{a0 as o}from"./index-B_E2UDsv.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{a0 as o}from"./index-B_E2UDsv.js";const n=o;export{n as component};
@@ -1 +0,0 @@
1
- import{j as r,a0 as i}from"./index-B_E2UDsv.js";import{a as m}from"./search-view-DMyiUtsQ.js";import{B as o}from"./BriefPane-C1eqvaCk.js";import{u as p}from"./useSearchMirror-4nvtBo0Y.js";import"./nav-link-D2neGN8U.js";import{u as e}from"./MailListHeader-XjtEHsNb.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./useLabels-C_RuDPDr.js";import"./useFilters-Ch0Rz-QY.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";function D(){const t=e();return p({to:"/mail/brief"}),r.jsx(o,{thread:t,children:r.jsx(m,{phone:r.jsx(o.Phone,{}),list:r.jsx(o.List,{}),reading:r.jsx(i,{}),intelligence:r.jsx(o.Intelligence,{}),hasThread:!!t})})}export{D as component};
@@ -1 +0,0 @@
1
- import{j as o,a0 as i}from"./index-B_E2UDsv.js";import{a as m}from"./search-view-DMyiUtsQ.js";import{F as r}from"./FlaggedPane-CHjYkYPa.js";import{u as p}from"./useSearchMirror-4nvtBo0Y.js";import"./nav-link-D2neGN8U.js";import{u as e}from"./MailListHeader-XjtEHsNb.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailViewChrome-DzdQIg9X.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./avatar-sJ32b2ZB.js";import"./account-form-helpers-Buy_HBYK.js";import"./menu-CyQNIqgm.js";import"./ErrorState-Xgz5SZ1i.js";import"./useFilters-Ch0Rz-QY.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./format-De9HZKjg.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";function v(){const t=e();return p({to:"/mail/flagged"}),o.jsx(r,{thread:t,children:o.jsx(m,{phone:o.jsx(r.Phone,{}),list:o.jsx(r.List,{}),reading:o.jsx(i,{}),intelligence:o.jsx(r.Intelligence,{}),hasThread:!!t})})}export{v as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-B_E2UDsv.js";import{B as o}from"./BriefPane-C1eqvaCk.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";function C(){return r.jsx(o.Reading,{})}export{C as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{M as i}from"./MailboxPane-zOiUq9W3.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./MailListHeader-XjtEHsNb.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";import"./NavMenuButton-DoGvk8wx.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Du7lm3N2.js";import"./circle-help-DNaIbW9w.js";import"./circle-check-B0efcy-K.js";import"./intelligence-pref-C6lFpj6U.js";function I(){return o.jsx(i.Reading,{})}export{I as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{M as r}from"./MailboxPane-zOiUq9W3.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./MailListHeader-XjtEHsNb.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";import"./NavMenuButton-DoGvk8wx.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";import"./bottom-sheet-Du7lm3N2.js";import"./circle-help-DNaIbW9w.js";import"./circle-check-B0efcy-K.js";import"./intelligence-pref-C6lFpj6U.js";function H(){return o.jsx(r.Reading,{})}export{H as component};
@@ -1 +0,0 @@
1
- import{j as t,a7 as o}from"./index-B_E2UDsv.js";const n=()=>t.jsx(o,{to:"/settings/accounts"});export{n as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{F as r}from"./FlaggedPane-CHjYkYPa.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";function v(){return o.jsx(r.Reading,{})}export{v as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{F as r}from"./FlaggedPane-CHjYkYPa.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./MailViewChrome-DzdQIg9X.js";function w(){return o.jsx(r.Reading,{})}export{w as component};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-B_E2UDsv.js";import{B as o}from"./BriefPane-C1eqvaCk.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./MailListHeader-XjtEHsNb.js";import"./search-token-index-C4Fe_kHI.js";import"./layout-breakpoints-BWjiUQKh.js";import"./account-form-helpers-Buy_HBYK.js";import"./avatar-sJ32b2ZB.js";import"./useSignature-CUY9s-pk.js";import"./useDebouncedValue-BFQNA4LE.js";import"./useFilters-Ch0Rz-QY.js";import"./ErrorState-Xgz5SZ1i.js";import"./format-De9HZKjg.js";import"./nav-link-D2neGN8U.js";import"./download-CZYAEXR3.js";import"./shield-check-CdGNmVbB.js";import"./move-options-BDhHrsb6.js";import"./confirm-dialog-tg4IO863.js";import"./clock-CAIXj_wn.js";import"./menu-CyQNIqgm.js";import"./useRefreshControl-B5Wc-mkG.js";import"./circle-check-big-D3RJmZBi.js";import"./useLabels-C_RuDPDr.js";import"./useSemanticSearch-DpJZep87.js";import"./search-query-Cr_ZXBCp.js";function A(){return r.jsx(o.Reading,{})}export{A as component};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-B_E2UDsv.js";import{O as t}from"./OutboxPane-CAD8JF4k.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./circle-check-big-D3RJmZBi.js";import"./clock-CAIXj_wn.js";import"./row-actions-D5tHz-Kt.js";import"./rotate-ccw-CJ6ZyB3Y.js";import"./NavMenuButton-DoGvk8wx.js";import"./menu-CyQNIqgm.js";import"./format-De9HZKjg.js";import"./outbox-status-CPfNHfUQ.js";import"./search-query-Cr_ZXBCp.js";function d(){return o.jsx(t.Reading,{})}export{d as component};
@@ -1 +0,0 @@
1
- import{D as i,j as o,a0 as s}from"./index-B_E2UDsv.js";import{a as m}from"./search-view-DMyiUtsQ.js";import{O as t}from"./OutboxPane-CAD8JF4k.js";import{u as a}from"./useSearchMirror-4nvtBo0Y.js";import"./nav-link-D2neGN8U.js";import"./useSearchTokenContext-DFAPyUzs.js";import"./kbd-BCoy2IeN.js";import"./use-match-media-oLZSDQbf.js";import"./enums-CCxx0t2v.js";import"./search-scope-5RASGpum.js";import"./circle-check-big-D3RJmZBi.js";import"./clock-CAIXj_wn.js";import"./row-actions-D5tHz-Kt.js";import"./rotate-ccw-CJ6ZyB3Y.js";import"./NavMenuButton-DoGvk8wx.js";import"./menu-CyQNIqgm.js";import"./format-De9HZKjg.js";import"./outbox-status-CPfNHfUQ.js";import"./search-query-Cr_ZXBCp.js";function e(){return i({from:"/mail/outbox/draft/$outboxMessageId",shouldThrow:!1})?.outboxMessageId}function w(){const r=e();return a({to:"/mail/outbox"}),o.jsx(t,{outboxMessageId:r,children:o.jsx(m,{phone:o.jsx(t.Phone,{}),list:o.jsx(t.List,{}),reading:o.jsx(s,{})})})}export{w as component};