@burdenoff/microfe-subscriberbot 2026.1103.2 → 2026.1105.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (198) hide show
  1. package/dist/index.js +3 -3
  2. package/dist/stories/Accessibility.stories.d.ts +13 -0
  3. package/dist/stories/Accessibility.stories.d.ts.map +1 -0
  4. package/dist/stories/pages/AgentNewPage.stories.d.ts.map +1 -1
  5. package/dist/stories/pages/BankConnectionsPage.stories.d.ts +1 -0
  6. package/dist/stories/pages/BankConnectionsPage.stories.d.ts.map +1 -1
  7. package/dist/stories/pages/EnterpriseSpendPage.stories.d.ts.map +1 -1
  8. package/dist/stories/pages/InboxPage.stories.d.ts.map +1 -1
  9. package/dist/subscriberbot/admin/AdminDashboardPage.d.ts.map +1 -1
  10. package/dist/subscriberbot/admin/AdminDashboardPage.js +168 -168
  11. package/dist/subscriberbot/admin/AdminDashboardPage.js.map +1 -1
  12. package/dist/subscriberbot/admin/NegotiationDeskPanel.d.ts.map +1 -1
  13. package/dist/subscriberbot/admin/NegotiationDeskPanel.js +116 -116
  14. package/dist/subscriberbot/admin/NegotiationDeskPanel.js.map +1 -1
  15. package/dist/subscriberbot/admin/ProcurementDeskPanel.d.ts.map +1 -1
  16. package/dist/subscriberbot/admin/ProcurementDeskPanel.js +211 -211
  17. package/dist/subscriberbot/admin/ProcurementDeskPanel.js.map +1 -1
  18. package/dist/subscriberbot/components/Modal.d.ts.map +1 -1
  19. package/dist/subscriberbot/components/Modal.js +43 -33
  20. package/dist/subscriberbot/components/Modal.js.map +1 -1
  21. package/dist/subscriberbot/components/PostureOptions.d.ts.map +1 -1
  22. package/dist/subscriberbot/components/PostureOptions.js +10 -10
  23. package/dist/subscriberbot/components/PostureOptions.js.map +1 -1
  24. package/dist/subscriberbot/components/StateViews.d.ts.map +1 -1
  25. package/dist/subscriberbot/components/StateViews.js +45 -37
  26. package/dist/subscriberbot/components/StateViews.js.map +1 -1
  27. package/dist/subscriberbot/components/StatusBadge.d.ts.map +1 -1
  28. package/dist/subscriberbot/components/StatusBadge.js +6 -6
  29. package/dist/subscriberbot/components/StatusBadge.js.map +1 -1
  30. package/dist/subscriberbot/components/decisions/DecisionBanners.js +6 -6
  31. package/dist/subscriberbot/components/decisions/DecisionCard.d.ts.map +1 -1
  32. package/dist/subscriberbot/components/decisions/DecisionCard.js +149 -147
  33. package/dist/subscriberbot/components/decisions/DecisionCard.js.map +1 -1
  34. package/dist/subscriberbot/components/mobile/MobileDashboard.d.ts.map +1 -1
  35. package/dist/subscriberbot/components/mobile/MobileDashboard.js +127 -127
  36. package/dist/subscriberbot/components/mobile/MobileDashboard.js.map +1 -1
  37. package/dist/subscriberbot/components/mobile/MobileRelationshipList.d.ts.map +1 -1
  38. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js +114 -114
  39. package/dist/subscriberbot/components/mobile/MobileRelationshipList.js.map +1 -1
  40. package/dist/subscriberbot/components/mobile/MobileScreen.js +1 -1
  41. package/dist/subscriberbot/components/mobile/MobileScreen.js.map +1 -1
  42. package/dist/subscriberbot/components/negotiations/NegotiationStatusPill.js +4 -4
  43. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.d.ts.map +1 -1
  44. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js +11 -11
  45. package/dist/subscriberbot/components/negotiations/NegotiationTimeline.js.map +1 -1
  46. package/dist/subscriberbot/components/negotiations/OutcomeForm.d.ts.map +1 -1
  47. package/dist/subscriberbot/components/negotiations/OutcomeForm.js +29 -29
  48. package/dist/subscriberbot/components/negotiations/OutcomeForm.js.map +1 -1
  49. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.d.ts.map +1 -1
  50. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js +43 -43
  51. package/dist/subscriberbot/components/procurement/ProcurementOutcomeForm.js.map +1 -1
  52. package/dist/subscriberbot/components/procurement/ProcurementStatusPill.js +4 -4
  53. package/dist/subscriberbot/components/procurement/ProcurementThread.d.ts.map +1 -1
  54. package/dist/subscriberbot/components/procurement/ProcurementThread.js +14 -14
  55. package/dist/subscriberbot/components/procurement/ProcurementThread.js.map +1 -1
  56. package/dist/subscriberbot/components/savings/SavingsCards.d.ts.map +1 -1
  57. package/dist/subscriberbot/components/savings/SavingsCards.js +242 -237
  58. package/dist/subscriberbot/components/savings/SavingsCards.js.map +1 -1
  59. package/dist/subscriberbot/components/viz.d.ts +1 -0
  60. package/dist/subscriberbot/components/viz.d.ts.map +1 -1
  61. package/dist/subscriberbot/components/viz.js +100 -101
  62. package/dist/subscriberbot/components/viz.js.map +1 -1
  63. package/dist/subscriberbot/hooks/index.js +1 -1
  64. package/dist/subscriberbot/hooks/useFormError.d.ts +7 -0
  65. package/dist/subscriberbot/hooks/useFormError.d.ts.map +1 -0
  66. package/dist/subscriberbot/hooks/useFormError.js +28 -0
  67. package/dist/subscriberbot/hooks/useFormError.js.map +1 -0
  68. package/dist/subscriberbot/hooks/useFormatters.d.ts +11 -0
  69. package/dist/subscriberbot/hooks/useFormatters.d.ts.map +1 -0
  70. package/dist/subscriberbot/hooks/useFormatters.js +13 -0
  71. package/dist/subscriberbot/hooks/useFormatters.js.map +1 -0
  72. package/dist/subscriberbot/hooks/useSubscriberBotApi.d.ts.map +1 -1
  73. package/dist/subscriberbot/hooks/useSubscriberBotApi.js +371 -370
  74. package/dist/subscriberbot/hooks/useSubscriberBotApi.js.map +1 -1
  75. package/dist/subscriberbot/hooks/useTr.d.ts.map +1 -1
  76. package/dist/subscriberbot/hooks/useTr.js +1 -1
  77. package/dist/subscriberbot/hooks/useTr.js.map +1 -1
  78. package/dist/subscriberbot/index.js +1 -1
  79. package/dist/subscriberbot/pages/AssetVaultPage.d.ts.map +1 -1
  80. package/dist/subscriberbot/pages/AssetVaultPage.js +124 -124
  81. package/dist/subscriberbot/pages/AssetVaultPage.js.map +1 -1
  82. package/dist/subscriberbot/pages/DashboardPage.d.ts +0 -10
  83. package/dist/subscriberbot/pages/DashboardPage.d.ts.map +1 -1
  84. package/dist/subscriberbot/pages/DashboardPage.js +107 -98
  85. package/dist/subscriberbot/pages/DashboardPage.js.map +1 -1
  86. package/dist/subscriberbot/pages/InboxPage.d.ts +0 -10
  87. package/dist/subscriberbot/pages/InboxPage.d.ts.map +1 -1
  88. package/dist/subscriberbot/pages/InboxPage.js +421 -402
  89. package/dist/subscriberbot/pages/InboxPage.js.map +1 -1
  90. package/dist/subscriberbot/pages/InsightsPage.d.ts.map +1 -1
  91. package/dist/subscriberbot/pages/InsightsPage.js +130 -121
  92. package/dist/subscriberbot/pages/InsightsPage.js.map +1 -1
  93. package/dist/subscriberbot/pages/InvoicesPage.d.ts +0 -12
  94. package/dist/subscriberbot/pages/InvoicesPage.d.ts.map +1 -1
  95. package/dist/subscriberbot/pages/InvoicesPage.js +237 -215
  96. package/dist/subscriberbot/pages/InvoicesPage.js.map +1 -1
  97. package/dist/subscriberbot/pages/RenewalsPage.d.ts.map +1 -1
  98. package/dist/subscriberbot/pages/RenewalsPage.js +303 -295
  99. package/dist/subscriberbot/pages/RenewalsPage.js.map +1 -1
  100. package/dist/subscriberbot/pages/SavingsPage.d.ts.map +1 -1
  101. package/dist/subscriberbot/pages/SavingsPage.js +57 -57
  102. package/dist/subscriberbot/pages/SavingsPage.js.map +1 -1
  103. package/dist/subscriberbot/pages/WorkflowsPage.d.ts +0 -13
  104. package/dist/subscriberbot/pages/WorkflowsPage.d.ts.map +1 -1
  105. package/dist/subscriberbot/pages/WorkflowsPage.js +202 -196
  106. package/dist/subscriberbot/pages/WorkflowsPage.js.map +1 -1
  107. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts +0 -18
  108. package/dist/subscriberbot/pages/agents/AgentDetailPage.d.ts.map +1 -1
  109. package/dist/subscriberbot/pages/agents/AgentDetailPage.js +283 -275
  110. package/dist/subscriberbot/pages/agents/AgentDetailPage.js.map +1 -1
  111. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts +0 -6
  112. package/dist/subscriberbot/pages/agents/AgentNewPage.d.ts.map +1 -1
  113. package/dist/subscriberbot/pages/agents/AgentNewPage.js +85 -77
  114. package/dist/subscriberbot/pages/agents/AgentNewPage.js.map +1 -1
  115. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts +0 -9
  116. package/dist/subscriberbot/pages/agents/AgentsListPage.d.ts.map +1 -1
  117. package/dist/subscriberbot/pages/agents/AgentsListPage.js +136 -136
  118. package/dist/subscriberbot/pages/agents/AgentsListPage.js.map +1 -1
  119. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts +0 -9
  120. package/dist/subscriberbot/pages/banking/BankConnectionsPage.d.ts.map +1 -1
  121. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js +267 -260
  122. package/dist/subscriberbot/pages/banking/BankConnectionsPage.js.map +1 -1
  123. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts +0 -10
  124. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.d.ts.map +1 -1
  125. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js +96 -96
  126. package/dist/subscriberbot/pages/decisions/DecisionDetailPage.js.map +1 -1
  127. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts +0 -11
  128. package/dist/subscriberbot/pages/decisions/DecisionsPage.d.ts.map +1 -1
  129. package/dist/subscriberbot/pages/decisions/DecisionsPage.js +46 -46
  130. package/dist/subscriberbot/pages/decisions/DecisionsPage.js.map +1 -1
  131. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts +0 -11
  132. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.d.ts.map +1 -1
  133. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js +181 -171
  134. package/dist/subscriberbot/pages/enterprise/EnterpriseSpendPage.js.map +1 -1
  135. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts +0 -9
  136. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.d.ts.map +1 -1
  137. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js +164 -164
  138. package/dist/subscriberbot/pages/negotiations/NegotiationDetailPage.js.map +1 -1
  139. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts +0 -9
  140. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.d.ts.map +1 -1
  141. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js +197 -181
  142. package/dist/subscriberbot/pages/negotiations/NegotiationNewPage.js.map +1 -1
  143. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts +0 -8
  144. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.d.ts.map +1 -1
  145. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js +79 -79
  146. package/dist/subscriberbot/pages/negotiations/NegotiationsPage.js.map +1 -1
  147. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts +0 -9
  148. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.d.ts.map +1 -1
  149. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js +147 -147
  150. package/dist/subscriberbot/pages/procurement/ProcurementDetailPage.js.map +1 -1
  151. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts +0 -10
  152. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.d.ts.map +1 -1
  153. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js +204 -188
  154. package/dist/subscriberbot/pages/procurement/ProcurementNewPage.js.map +1 -1
  155. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts +0 -9
  156. package/dist/subscriberbot/pages/procurement/ProcurementPage.d.ts.map +1 -1
  157. package/dist/subscriberbot/pages/procurement/ProcurementPage.js +80 -80
  158. package/dist/subscriberbot/pages/procurement/ProcurementPage.js.map +1 -1
  159. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts +0 -10
  160. package/dist/subscriberbot/pages/providers/ProviderDetailPage.d.ts.map +1 -1
  161. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js +484 -458
  162. package/dist/subscriberbot/pages/providers/ProviderDetailPage.js.map +1 -1
  163. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts +0 -8
  164. package/dist/subscriberbot/pages/providers/ProviderNewPage.d.ts.map +1 -1
  165. package/dist/subscriberbot/pages/providers/ProviderNewPage.js +146 -136
  166. package/dist/subscriberbot/pages/providers/ProviderNewPage.js.map +1 -1
  167. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts +0 -10
  168. package/dist/subscriberbot/pages/providers/ProvidersListPage.d.ts.map +1 -1
  169. package/dist/subscriberbot/pages/providers/ProvidersListPage.js +88 -87
  170. package/dist/subscriberbot/pages/providers/ProvidersListPage.js.map +1 -1
  171. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts +0 -11
  172. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.d.ts.map +1 -1
  173. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js +520 -490
  174. package/dist/subscriberbot/pages/relationships/RelationshipDetailPage.js.map +1 -1
  175. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts +0 -8
  176. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.d.ts.map +1 -1
  177. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js +104 -90
  178. package/dist/subscriberbot/pages/relationships/RelationshipNewPage.js.map +1 -1
  179. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts +0 -8
  180. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.d.ts.map +1 -1
  181. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js +97 -96
  182. package/dist/subscriberbot/pages/relationships/RelationshipsListPage.js.map +1 -1
  183. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.d.ts.map +1 -1
  184. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js +76 -74
  185. package/dist/subscriberbot/pages/workflows/WorkflowBuilderPage.js.map +1 -1
  186. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts +5 -3
  187. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.d.ts.map +1 -1
  188. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js +26 -25
  189. package/dist/subscriberbot/pages/workflows/workflowBuilderGraph.js.map +1 -1
  190. package/dist/subscriberbot/utils/formatters.d.ts +16 -5
  191. package/dist/subscriberbot/utils/formatters.d.ts.map +1 -1
  192. package/dist/subscriberbot/utils/formatters.js +57 -25
  193. package/dist/subscriberbot/utils/formatters.js.map +1 -1
  194. package/dist/subscriberbot/utils/plaidLink.d.ts +2 -1
  195. package/dist/subscriberbot/utils/plaidLink.d.ts.map +1 -1
  196. package/dist/subscriberbot/utils/plaidLink.js +21 -21
  197. package/dist/subscriberbot/utils/plaidLink.js.map +1 -1
  198. package/package.json +1 -1
@@ -1,21 +1,22 @@
1
1
  import { useSubscriberBot as e } from "../context/SubscriberBotContext.js";
2
- import { cn as t } from "../utils/cn.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { formatDateTime as r, formatEnumLabel as i, formatRelativeTime as a } from "../utils/formatters.js";
5
- import { StatusBadge as o } from "../components/StatusBadge.js";
6
- import { EmptyState as s } from "../components/EmptyState.js";
7
- import { Modal as c } from "../components/Modal.js";
8
- import { useTr as l } from "../hooks/useTr.js";
9
- import { ErrorView as u, LoadingView as d, Section as f } from "../components/StateViews.js";
10
- import { MiniProgress as p } from "../components/viz.js";
11
- import { useChannels as m, useCreateChannel as h, useInboxMessages as g, useIngestMessage as _, useMarkMessageRead as v, useMarkMessageUnread as ee, useVerifyChannel as y } from "../hooks/useSubscriberBotApi.js";
12
- import { useRouteSelection as te } from "../hooks/useRouteSelection.js";
13
- import { useRef as ne, useState as b } from "react";
14
- import { AlertTriangle as x, BadgeCheck as S, Bell as C, ChevronRight as w, Hash as T, Inbox as re, Mail as E, MailOpen as D, MessageSquare as O, MessagesSquare as k, MoreHorizontal as A, MousePointerClick as j, Phone as M, Plus as N, Radio as P, Send as F, ShieldAlert as I, Sparkles as L, Webhook as R } from "lucide-react";
15
- import { Fragment as z, jsx as B, jsxs as V } from "react/jsx-runtime";
16
- import { DropdownMenu as H, DropdownMenuContent as U, DropdownMenuItem as W, DropdownMenuTrigger as G, GlassCard as K, PagePurpose as ie } from "@burdenoff/fe-libs/ui";
2
+ import { useTr as t } from "../hooks/useTr.js";
3
+ import { useFormatters as n } from "../hooks/useFormatters.js";
4
+ import { cn as r } from "../utils/cn.js";
5
+ import { PageLayout as i } from "../components/PageLayout.js";
6
+ import { StatusBadge as a } from "../components/StatusBadge.js";
7
+ import { EmptyState as o } from "../components/EmptyState.js";
8
+ import { Modal as s } from "../components/Modal.js";
9
+ import { ErrorView as c, LoadingView as l, Section as u } from "../components/StateViews.js";
10
+ import { MiniProgress as d } from "../components/viz.js";
11
+ import { useChannels as f, useCreateChannel as p, useInboxMessages as m, useIngestMessage as h, useMarkMessageRead as g, useMarkMessageUnread as _, useVerifyChannel as v } from "../hooks/useSubscriberBotApi.js";
12
+ import { useRouteSelection as y } from "../hooks/useRouteSelection.js";
13
+ import { useFormError as b } from "../hooks/useFormError.js";
14
+ import { useRef as x, useState as S } from "react";
15
+ import { AlertTriangle as C, BadgeCheck as w, Bell as T, ChevronRight as E, Hash as D, Inbox as ee, Mail as O, MailOpen as k, MessageSquare as A, MessagesSquare as j, MoreHorizontal as M, MousePointerClick as te, Phone as N, Plus as P, Radio as F, Send as I, ShieldAlert as L, Sparkles as R, Webhook as z } from "lucide-react";
16
+ import { Fragment as B, jsx as V, jsxs as H } from "react/jsx-runtime";
17
+ import { DropdownMenu as U, DropdownMenuContent as W, DropdownMenuItem as G, DropdownMenuTrigger as K, GlassCard as q, PagePurpose as ne } from "@burdenoff/fe-libs/ui";
17
18
  //#region src/subscriberbot/pages/InboxPage.tsx
18
- var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", Y = "mb-1 block text-xs font-medium text-text-secondary", ae = [
19
+ var J = 25, Y = "w-full rounded-lg border border-border-subtle bg-bg-surface px-3 py-2 text-sm text-text-primary placeholder:text-text-secondary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]", X = "mb-1 block text-xs font-medium text-text-secondary", Z = [
19
20
  "BILLING",
20
21
  "RENEWAL",
21
22
  "REQUIRED_ACTION",
@@ -23,7 +24,7 @@ var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
23
24
  "PRODUCT_UPDATE",
24
25
  "MARKETING",
25
26
  "OTHER"
26
- ], oe = [
27
+ ], re = [
27
28
  "EMAIL",
28
29
  "SMS",
29
30
  "SLACK",
@@ -31,7 +32,7 @@ var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
31
32
  "WHATSAPP",
32
33
  "PUSH",
33
34
  "WEBHOOK"
34
- ], X = {
35
+ ], Q = {
35
36
  BILLING: "inbox.categories.billing",
36
37
  RENEWAL: "inbox.categories.renewal",
37
38
  REQUIRED_ACTION: "inbox.categories.requiredAction",
@@ -39,7 +40,7 @@ var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
39
40
  PRODUCT_UPDATE: "inbox.categories.productUpdate",
40
41
  MARKETING: "inbox.categories.marketing",
41
42
  OTHER: "inbox.categories.other"
42
- }, se = [
43
+ }, ie = [
43
44
  {
44
45
  value: "",
45
46
  key: "inbox.categories.all",
@@ -47,40 +48,40 @@ var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
47
48
  },
48
49
  {
49
50
  value: "BILLING",
50
- key: X.BILLING,
51
+ key: Q.BILLING,
51
52
  fallback: "Billing"
52
53
  },
53
54
  {
54
55
  value: "RENEWAL",
55
- key: X.RENEWAL,
56
+ key: Q.RENEWAL,
56
57
  fallback: "Renewals"
57
58
  },
58
59
  {
59
60
  value: "REQUIRED_ACTION",
60
- key: X.REQUIRED_ACTION,
61
+ key: Q.REQUIRED_ACTION,
61
62
  fallback: "Required actions"
62
63
  },
63
64
  {
64
65
  value: "SECURITY_ALERT",
65
- key: X.SECURITY_ALERT,
66
+ key: Q.SECURITY_ALERT,
66
67
  fallback: "Security"
67
68
  },
68
69
  {
69
70
  value: "PRODUCT_UPDATE",
70
- key: X.PRODUCT_UPDATE,
71
+ key: Q.PRODUCT_UPDATE,
71
72
  fallback: "Product updates"
72
73
  },
73
74
  {
74
75
  value: "MARKETING",
75
- key: X.MARKETING,
76
+ key: Q.MARKETING,
76
77
  fallback: "Marketing"
77
78
  },
78
79
  {
79
80
  value: "OTHER",
80
- key: X.OTHER,
81
+ key: Q.OTHER,
81
82
  fallback: "Other"
82
83
  }
83
- ], ce = {
84
+ ], ae = {
84
85
  BILLING: "bg-[var(--color-accent-soft)] text-text-primary",
85
86
  RENEWAL: "bg-status-success-bg-subtle text-status-success-text",
86
87
  REQUIRED_ACTION: "bg-status-warning-bg-subtle text-status-warning-text",
@@ -88,432 +89,449 @@ var q = 25, J = "w-full rounded-lg border border-border-subtle bg-bg-surface px-
88
89
  PRODUCT_UPDATE: "bg-[var(--color-accent-soft)] text-text-primary",
89
90
  MARKETING: "bg-bg-sunken text-text-secondary",
90
91
  OTHER: "bg-bg-sunken text-text-secondary"
91
- }, Z = {
92
- EMAIL: E,
93
- SMS: O,
94
- SLACK: T,
95
- DISCORD: k,
96
- WHATSAPP: M,
97
- PUSH: C,
98
- WEBHOOK: R
92
+ }, oe = {
93
+ EMAIL: O,
94
+ SMS: A,
95
+ SLACK: D,
96
+ DISCORD: j,
97
+ WHATSAPP: N,
98
+ PUSH: T,
99
+ WEBHOOK: z
99
100
  };
100
- function Q({ category: e }) {
101
- return /* @__PURE__ */ B("span", {
102
- className: t("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium", ce[e]),
103
- children: i(e)
101
+ function se({ category: e }) {
102
+ let { formatEnumLabel: t } = n();
103
+ return /* @__PURE__ */ V("span", {
104
+ className: r("inline-flex items-center rounded-full px-2 py-0.5 text-[11px] font-medium", ae[e]),
105
+ children: t(e)
104
106
  });
105
107
  }
106
- function le({ className: e }) {
107
- let n = l();
108
- return /* @__PURE__ */ V("span", {
108
+ function ce({ className: e }) {
109
+ let n = t();
110
+ return /* @__PURE__ */ H("span", {
109
111
  title: n("inbox.message.actionRequiredTitle", "Action required"),
110
- className: t("inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-warning-text", e),
112
+ className: r("inline-flex items-center gap-1 rounded-full bg-status-warning-bg-subtle px-2 py-0.5 text-[10px] font-medium text-status-warning-text", e),
111
113
  children: [
112
- /* @__PURE__ */ B(x, { className: "h-3 w-3" }),
114
+ /* @__PURE__ */ V(C, { className: "h-3 w-3" }),
113
115
  " ",
114
116
  n("inbox.message.actionFlag", "Action")
115
117
  ]
116
118
  });
117
119
  }
118
- function ue({ onClose: e }) {
119
- let t = l(), n = h(), [r, a] = b("EMAIL"), [o, s] = b(""), [u, d] = b(""), [f, p] = b(!0), [m, g] = b(null);
120
- return /* @__PURE__ */ B(c, {
121
- title: t("inbox.addChannelModal.title", "Add channel"),
120
+ function le({ onClose: e }) {
121
+ let { formatEnumLabel: r } = n(), i = t(), a = p(), [o, c] = S("EMAIL"), [l, u] = S(""), [d, f] = S(""), [m, h] = S(!0), [g, _, v, y] = b();
122
+ return /* @__PURE__ */ V(s, {
123
+ title: i("inbox.addChannelModal.title", "Add channel"),
122
124
  onClose: e,
123
125
  maxWidthClassName: "max-w-xl",
124
- children: /* @__PURE__ */ V("form", {
125
- onSubmit: (i) => {
126
- if (i.preventDefault(), g(null), !o.trim()) {
127
- g(t("inbox.addChannelModal.addressRequired", "An address is required."));
126
+ children: /* @__PURE__ */ H("form", {
127
+ onSubmit: (t) => {
128
+ if (t.preventDefault(), _(null), !l.trim()) {
129
+ _(i("inbox.addChannelModal.addressRequired", "An address is required."), "ch-address");
128
130
  return;
129
131
  }
130
- n.mutate({
131
- type: r,
132
- address: o.trim(),
133
- ingestEnabled: f,
134
- ...u.trim() ? { label: u.trim() } : {}
132
+ a.mutate({
133
+ type: o,
134
+ address: l.trim(),
135
+ ingestEnabled: m,
136
+ ...d.trim() ? { label: d.trim() } : {}
135
137
  }, {
136
138
  onSuccess: () => e(),
137
- onError: (e) => g(e instanceof Error ? e.message : t("inbox.addChannelModal.error", "Could not add channel."))
139
+ onError: (e) => _(e instanceof Error ? e.message : i("inbox.addChannelModal.error", "Could not add channel."))
138
140
  });
139
141
  },
140
142
  className: "space-y-4",
141
143
  children: [
142
- m && /* @__PURE__ */ B("div", {
144
+ g && /* @__PURE__ */ V("div", {
145
+ id: y,
146
+ tabIndex: -1,
147
+ role: "alert",
143
148
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
144
- children: m
149
+ children: g
145
150
  }),
146
- /* @__PURE__ */ V("div", {
151
+ /* @__PURE__ */ H("div", {
147
152
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
148
- children: [/* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
153
+ children: [/* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
149
154
  htmlFor: "ch-type",
150
- className: Y,
151
- children: t("inbox.addChannelModal.typeLabel", "Type")
152
- }), /* @__PURE__ */ B("select", {
155
+ className: X,
156
+ children: i("inbox.addChannelModal.typeLabel", "Type")
157
+ }), /* @__PURE__ */ V("select", {
158
+ ...v("ch-type"),
153
159
  id: "ch-type",
154
- value: r,
155
- onChange: (e) => a(e.target.value),
156
- className: J,
157
- children: oe.map((e) => /* @__PURE__ */ B("option", {
160
+ value: o,
161
+ onChange: (e) => c(e.target.value),
162
+ className: Y,
163
+ children: re.map((e) => /* @__PURE__ */ V("option", {
158
164
  value: e,
159
- children: i(e)
165
+ children: r(e)
160
166
  }, e))
161
- })] }), /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
167
+ })] }), /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
162
168
  htmlFor: "ch-label",
163
- className: Y,
164
- children: t("inbox.addChannelModal.labelLabel", "Label")
165
- }), /* @__PURE__ */ B("input", {
169
+ className: X,
170
+ children: i("inbox.addChannelModal.labelLabel", "Label")
171
+ }), /* @__PURE__ */ V("input", {
172
+ ...v("ch-label"),
166
173
  id: "ch-label",
167
174
  type: "text",
168
- value: u,
169
- onChange: (e) => d(e.target.value),
170
- placeholder: t("inbox.addChannelModal.labelPlaceholder", "e.g. Billing inbox"),
171
- className: J
175
+ value: d,
176
+ onChange: (e) => f(e.target.value),
177
+ placeholder: i("inbox.addChannelModal.labelPlaceholder", "e.g. Billing inbox"),
178
+ className: Y
172
179
  })] })]
173
180
  }),
174
- /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ V("label", {
181
+ /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ H("label", {
175
182
  htmlFor: "ch-address",
176
- className: Y,
183
+ className: X,
177
184
  children: [
178
- t("inbox.addChannelModal.addressLabel", "Address"),
185
+ i("inbox.addChannelModal.addressLabel", "Address"),
179
186
  " ",
180
- /* @__PURE__ */ B("span", {
187
+ /* @__PURE__ */ V("span", {
181
188
  className: "text-status-error-text",
182
189
  children: "*"
183
190
  })
184
191
  ]
185
- }), /* @__PURE__ */ B("input", {
192
+ }), /* @__PURE__ */ V("input", {
193
+ ...v("ch-address"),
186
194
  id: "ch-address",
187
195
  type: "text",
188
- value: o,
189
- onChange: (e) => s(e.target.value),
190
- placeholder: t("inbox.addChannelModal.addressPlaceholder", "e.g. billing@acme.com, +1…, a webhook URL"),
191
- className: J,
196
+ value: l,
197
+ onChange: (e) => u(e.target.value),
198
+ placeholder: i("inbox.addChannelModal.addressPlaceholder", "e.g. billing@acme.com, +1…, a webhook URL"),
199
+ className: Y,
192
200
  required: !0
193
201
  })] }),
194
- /* @__PURE__ */ V("label", {
202
+ /* @__PURE__ */ H("label", {
195
203
  className: "flex items-center gap-2 text-sm text-text-primary",
196
- children: [/* @__PURE__ */ B("input", {
204
+ children: [/* @__PURE__ */ V("input", {
197
205
  type: "checkbox",
198
- checked: f,
199
- onChange: (e) => p(e.target.checked),
206
+ checked: m,
207
+ onChange: (e) => h(e.target.checked),
200
208
  className: "size-4 rounded border-border-subtle"
201
- }), t("inbox.addChannelModal.ingestLabel", "Ingest messages from this channel")]
209
+ }), i("inbox.addChannelModal.ingestLabel", "Ingest messages from this channel")]
202
210
  }),
203
- /* @__PURE__ */ V("div", {
211
+ /* @__PURE__ */ H("div", {
204
212
  className: "flex justify-end gap-3",
205
- children: [/* @__PURE__ */ B("button", {
213
+ children: [/* @__PURE__ */ V("button", {
206
214
  type: "button",
207
215
  onClick: e,
208
216
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
209
- children: t("inbox.addChannelModal.cancel", "Cancel")
210
- }), /* @__PURE__ */ B("button", {
217
+ children: i("inbox.addChannelModal.cancel", "Cancel")
218
+ }), /* @__PURE__ */ V("button", {
211
219
  type: "submit",
212
- disabled: n.isPending,
220
+ disabled: a.isPending,
213
221
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
214
- children: n.isPending ? t("inbox.addChannelModal.adding", "Adding…") : t("inbox.addChannelModal.submit", "Add channel")
222
+ children: a.isPending ? i("inbox.addChannelModal.adding", "Adding…") : i("inbox.addChannelModal.submit", "Add channel")
215
223
  })]
216
224
  })
217
225
  ]
218
226
  })
219
227
  });
220
228
  }
221
- function de({ channel: e, onClose: t }) {
222
- let n = l(), r = _(), [a, o] = b(""), [s, u] = b(""), [d, f] = b("OTHER"), [p, m] = b(!1), [h, g] = b(null);
223
- return /* @__PURE__ */ B(c, {
224
- title: n("inbox.logMessageModal.title", "Log test message"),
225
- description: n("inbox.logMessageModal.description", "Simulate an ingested message from {channel}.", { channel: e.label || e.address }),
226
- onClose: t,
227
- children: /* @__PURE__ */ V("form", {
228
- onSubmit: (i) => {
229
- i.preventDefault(), g(null), r.mutate({
229
+ function ue({ channel: e, onClose: r }) {
230
+ let { formatEnumLabel: i } = n(), a = t(), o = h(), [c, l] = S(""), [u, d] = S(""), [f, p] = S("OTHER"), [m, g] = S(!1), [_, v, y, x] = b();
231
+ return /* @__PURE__ */ V(s, {
232
+ title: a("inbox.logMessageModal.title", "Log test message"),
233
+ description: a("inbox.logMessageModal.description", "Simulate an ingested message from {channel}.", { channel: e.label || e.address }),
234
+ onClose: r,
235
+ children: /* @__PURE__ */ H("form", {
236
+ onSubmit: (t) => {
237
+ t.preventDefault(), v(null), o.mutate({
230
238
  channelId: e.id,
231
239
  receivedAt: (/* @__PURE__ */ new Date()).toISOString(),
232
- category: d,
233
- actionRequired: p,
234
- ...a.trim() ? { subject: a.trim() } : {},
235
- ...s.trim() ? { preview: s.trim() } : {}
240
+ category: f,
241
+ actionRequired: m,
242
+ ...c.trim() ? { subject: c.trim() } : {},
243
+ ...u.trim() ? { preview: u.trim() } : {}
236
244
  }, {
237
- onSuccess: () => t(),
238
- onError: (e) => g(e instanceof Error ? e.message : n("inbox.logMessageModal.error", "Could not log the message."))
245
+ onSuccess: () => r(),
246
+ onError: (e) => v(e instanceof Error ? e.message : a("inbox.logMessageModal.error", "Could not log the message."))
239
247
  });
240
248
  },
241
249
  className: "space-y-4",
242
250
  children: [
243
- h && /* @__PURE__ */ B("div", {
251
+ _ && /* @__PURE__ */ V("div", {
252
+ id: x,
253
+ tabIndex: -1,
254
+ role: "alert",
244
255
  className: "rounded-lg border border-status-error-text/30 bg-status-error-bg-subtle px-4 py-2 text-sm text-status-error-text",
245
- children: h
256
+ children: _
246
257
  }),
247
- /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
258
+ /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
248
259
  htmlFor: "msg-subject",
249
- className: Y,
250
- children: n("inbox.logMessageModal.subjectLabel", "Subject")
251
- }), /* @__PURE__ */ B("input", {
260
+ className: X,
261
+ children: a("inbox.logMessageModal.subjectLabel", "Subject")
262
+ }), /* @__PURE__ */ V("input", {
263
+ ...y("msg-subject"),
252
264
  id: "msg-subject",
253
265
  type: "text",
254
- value: a,
255
- onChange: (e) => o(e.target.value),
256
- placeholder: n("inbox.logMessageModal.subjectPlaceholder", "e.g. Your plan renews in 3 days"),
257
- className: J
266
+ value: c,
267
+ onChange: (e) => l(e.target.value),
268
+ placeholder: a("inbox.logMessageModal.subjectPlaceholder", "e.g. Your plan renews in 3 days"),
269
+ className: Y
258
270
  })] }),
259
- /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
271
+ /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
260
272
  htmlFor: "msg-preview",
261
- className: Y,
262
- children: n("inbox.logMessageModal.previewLabel", "Preview")
263
- }), /* @__PURE__ */ B("textarea", {
273
+ className: X,
274
+ children: a("inbox.logMessageModal.previewLabel", "Preview")
275
+ }), /* @__PURE__ */ V("textarea", {
276
+ ...y("msg-preview"),
264
277
  id: "msg-preview",
265
- value: s,
266
- onChange: (e) => u(e.target.value),
278
+ value: u,
279
+ onChange: (e) => d(e.target.value),
267
280
  rows: 2,
268
- className: J
281
+ className: Y
269
282
  })] }),
270
- /* @__PURE__ */ V("div", { children: [/* @__PURE__ */ B("label", {
283
+ /* @__PURE__ */ H("div", { children: [/* @__PURE__ */ V("label", {
271
284
  htmlFor: "msg-category",
272
- className: Y,
273
- children: n("inbox.logMessageModal.categoryLabel", "Category")
274
- }), /* @__PURE__ */ B("select", {
285
+ className: X,
286
+ children: a("inbox.logMessageModal.categoryLabel", "Category")
287
+ }), /* @__PURE__ */ V("select", {
288
+ ...y("msg-category"),
275
289
  id: "msg-category",
276
- value: d,
277
- onChange: (e) => f(e.target.value),
278
- className: J,
279
- children: ae.map((e) => /* @__PURE__ */ B("option", {
290
+ value: f,
291
+ onChange: (e) => p(e.target.value),
292
+ className: Y,
293
+ children: Z.map((e) => /* @__PURE__ */ V("option", {
280
294
  value: e,
281
- children: n(X[e], i(e))
295
+ children: a(Q[e], i(e))
282
296
  }, e))
283
297
  })] }),
284
- /* @__PURE__ */ V("label", {
298
+ /* @__PURE__ */ H("label", {
285
299
  className: "flex items-center gap-2 text-sm text-text-primary",
286
- children: [/* @__PURE__ */ B("input", {
300
+ children: [/* @__PURE__ */ V("input", {
287
301
  type: "checkbox",
288
- checked: p,
289
- onChange: (e) => m(e.target.checked),
302
+ checked: m,
303
+ onChange: (e) => g(e.target.checked),
290
304
  className: "size-4 rounded border-border-subtle"
291
- }), n("inbox.logMessageModal.actionRequired", "Requires action")]
305
+ }), a("inbox.logMessageModal.actionRequired", "Requires action")]
292
306
  }),
293
- /* @__PURE__ */ V("div", {
307
+ /* @__PURE__ */ H("div", {
294
308
  className: "flex justify-end gap-3",
295
- children: [/* @__PURE__ */ B("button", {
309
+ children: [/* @__PURE__ */ V("button", {
296
310
  type: "button",
297
- onClick: t,
311
+ onClick: r,
298
312
  className: "rounded-lg border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary hover:bg-bg-sunken",
299
- children: n("inbox.logMessageModal.cancel", "Cancel")
300
- }), /* @__PURE__ */ B("button", {
313
+ children: a("inbox.logMessageModal.cancel", "Cancel")
314
+ }), /* @__PURE__ */ V("button", {
301
315
  type: "submit",
302
- disabled: r.isPending,
316
+ disabled: o.isPending,
303
317
  className: "rounded-lg bg-action-primary-bg px-4 py-2 text-sm font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
304
- children: r.isPending ? n("inbox.logMessageModal.logging", "Logging…") : n("inbox.logMessageModal.submit", "Log message")
318
+ children: o.isPending ? a("inbox.logMessageModal.logging", "Logging…") : a("inbox.logMessageModal.submit", "Log message")
305
319
  })]
306
320
  })
307
321
  ]
308
322
  })
309
323
  });
310
324
  }
311
- function fe({ channel: e, onVerify: t, verifying: n, onLog: r }) {
312
- let a = l(), s = Z[e.type] ?? P, c = e.status === "VERIFIED";
313
- return /* @__PURE__ */ V(K, {
325
+ function de({ channel: e, onVerify: r, verifying: i, onLog: o }) {
326
+ let { formatEnumLabel: s } = n(), c = t(), l = oe[e.type] ?? F, u = e.status === "VERIFIED";
327
+ return /* @__PURE__ */ H(q, {
314
328
  treatment: "metric",
315
329
  className: "flex flex-col p-4",
316
330
  children: [
317
- /* @__PURE__ */ V("div", {
331
+ /* @__PURE__ */ H("div", {
318
332
  className: "flex items-start justify-between gap-2",
319
- children: [/* @__PURE__ */ V("div", {
333
+ children: [/* @__PURE__ */ H("div", {
320
334
  className: "flex min-w-0 items-center gap-2.5",
321
- children: [/* @__PURE__ */ B("span", {
335
+ children: [/* @__PURE__ */ V("span", {
322
336
  className: "flex size-9 shrink-0 items-center justify-center rounded-lg bg-[var(--color-accent-soft)] text-text-primary",
323
- children: /* @__PURE__ */ B(s, { className: "h-4 w-4" })
324
- }), /* @__PURE__ */ V("div", {
337
+ children: /* @__PURE__ */ V(l, { className: "h-4 w-4" })
338
+ }), /* @__PURE__ */ H("div", {
325
339
  className: "min-w-0",
326
- children: [/* @__PURE__ */ B("p", {
340
+ children: [/* @__PURE__ */ V("p", {
327
341
  className: "truncate text-sm font-semibold text-text-primary",
328
- children: i(e.type)
329
- }), e.label && /* @__PURE__ */ B("p", {
342
+ children: s(e.type)
343
+ }), e.label && /* @__PURE__ */ V("p", {
330
344
  className: "truncate text-xs text-text-secondary",
331
345
  children: e.label
332
346
  })]
333
347
  })]
334
- }), /* @__PURE__ */ B(o, { status: e.status })]
348
+ }), /* @__PURE__ */ V(a, { status: e.status })]
335
349
  }),
336
- /* @__PURE__ */ V("div", {
350
+ /* @__PURE__ */ H("div", {
337
351
  className: "mt-3 border-t border-border-subtle pt-3",
338
- children: [/* @__PURE__ */ B("p", {
352
+ children: [/* @__PURE__ */ V("p", {
339
353
  className: "text-[11px] uppercase tracking-wide text-text-secondary",
340
- children: e.ingestEnabled ? a("inbox.channels.ingestingFrom", "Ingesting from") : a("inbox.channels.ingestPaused", "Ingest paused")
341
- }), /* @__PURE__ */ B("p", {
354
+ children: e.ingestEnabled ? c("inbox.channels.ingestingFrom", "Ingesting from") : c("inbox.channels.ingestPaused", "Ingest paused")
355
+ }), /* @__PURE__ */ V("p", {
342
356
  className: "mt-0.5 truncate text-sm text-text-primary",
343
357
  title: e.address,
344
358
  children: e.address
345
359
  })]
346
360
  }),
347
- /* @__PURE__ */ V("div", {
361
+ /* @__PURE__ */ H("div", {
348
362
  className: "mt-auto flex flex-wrap items-center gap-2 pt-3",
349
363
  children: [
350
- e.status === "PENDING" && /* @__PURE__ */ V("button", {
364
+ e.status === "PENDING" && /* @__PURE__ */ H("button", {
351
365
  type: "button",
352
- disabled: n,
353
- onClick: () => t(e.id),
366
+ disabled: i,
367
+ onClick: () => r(e.id),
354
368
  className: "inline-flex items-center gap-1 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90 disabled:opacity-50",
355
369
  children: [
356
- /* @__PURE__ */ B(S, { className: "h-3.5 w-3.5" }),
370
+ /* @__PURE__ */ V(w, { className: "h-3.5 w-3.5" }),
357
371
  " ",
358
- a("inbox.channels.verify", "Verify")
372
+ c("inbox.channels.verify", "Verify")
359
373
  ]
360
374
  }),
361
- c && e.ingestEnabled && /* @__PURE__ */ V("button", {
375
+ u && e.ingestEnabled && /* @__PURE__ */ H("button", {
362
376
  type: "button",
363
- onClick: () => r(e),
377
+ onClick: () => o(e),
364
378
  className: "inline-flex items-center gap-1 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken",
365
379
  children: [
366
- /* @__PURE__ */ B(F, { className: "h-3.5 w-3.5" }),
380
+ /* @__PURE__ */ V(I, { className: "h-3.5 w-3.5" }),
367
381
  " ",
368
- a("inbox.channels.logTestMessage", "Log test message")
382
+ c("inbox.channels.logTestMessage", "Log test message")
369
383
  ]
370
384
  }),
371
- e.status === "DISABLED" && /* @__PURE__ */ B("span", {
385
+ e.status === "DISABLED" && /* @__PURE__ */ V("span", {
372
386
  className: "text-xs text-text-secondary",
373
- children: a("inbox.channels.disabled", "Channel disabled")
387
+ children: c("inbox.channels.disabled", "Channel disabled")
374
388
  })
375
389
  ]
376
390
  })
377
391
  ]
378
392
  });
379
393
  }
380
- function pe() {
381
- let e = l(), { data: t, isLoading: n, isError: r, refetch: i } = m(), a = y(), [o, c] = b(!1), [p, h] = b(null), g = t ?? [], _ = g.filter((e) => e.status === "VERIFIED").length, v = g.filter((e) => e.status === "PENDING").length;
382
- return /* @__PURE__ */ V(f, {
394
+ function fe() {
395
+ let e = t(), { data: n, isLoading: r, isError: i, refetch: a } = f(), s = v(), [d, p] = S(!1), [m, h] = S(null), g = n ?? [], _ = g.filter((e) => e.status === "VERIFIED").length, y = g.filter((e) => e.status === "PENDING").length;
396
+ return /* @__PURE__ */ H(u, {
383
397
  title: e("inbox.channels.title", "Ingest channels"),
384
398
  description: e("inbox.channels.description", "The sources the Universal Inbox pulls subscription communication from"),
385
- action: /* @__PURE__ */ V("button", {
399
+ action: /* @__PURE__ */ H("button", {
386
400
  type: "button",
387
- onClick: () => c(!0),
401
+ onClick: () => p(!0),
388
402
  className: "inline-flex items-center gap-1.5 rounded-lg bg-action-primary-bg px-3 py-1.5 text-xs font-medium text-action-primary-text hover:opacity-90",
389
403
  children: [
390
- /* @__PURE__ */ B(N, { className: "h-3.5 w-3.5" }),
404
+ /* @__PURE__ */ V(P, { className: "h-3.5 w-3.5" }),
391
405
  " ",
392
406
  e("inbox.channels.add", "Add channel")
393
407
  ]
394
408
  }),
395
409
  children: [
396
- n ? /* @__PURE__ */ B(d, { label: e("inbox.channels.loading", "Loading channels…") }) : r ? /* @__PURE__ */ B(u, {
410
+ r ? /* @__PURE__ */ V(l, { label: e("inbox.channels.loading", "Loading channels…") }) : i ? /* @__PURE__ */ V(c, {
397
411
  message: e("inbox.channels.error", "Could not load channels."),
398
- onRetry: () => void i()
399
- }) : g.length === 0 ? /* @__PURE__ */ B(s, {
412
+ onRetry: () => void a()
413
+ }) : g.length === 0 ? /* @__PURE__ */ V(o, {
400
414
  illustration: "empty-data",
401
- icon: /* @__PURE__ */ B(P, { className: "h-12 w-12" }),
415
+ icon: /* @__PURE__ */ V(F, { className: "h-12 w-12" }),
402
416
  title: e("inbox.channels.emptyTitle", "No channels yet"),
403
417
  description: e("inbox.channels.emptyDescription", "Add an email, SMS, Slack or webhook channel to start ingesting subscription communication.")
404
- }) : /* @__PURE__ */ V(z, { children: [(_ > 0 || v > 0) && /* @__PURE__ */ V("div", {
418
+ }) : /* @__PURE__ */ H(B, { children: [(_ > 0 || y > 0) && /* @__PURE__ */ H("div", {
405
419
  className: "mb-3 flex flex-wrap items-center gap-x-4 gap-y-1 text-xs text-text-secondary",
406
- children: [/* @__PURE__ */ V("span", {
420
+ children: [/* @__PURE__ */ H("span", {
407
421
  className: "inline-flex items-center gap-1.5",
408
- children: [/* @__PURE__ */ B("span", {
422
+ children: [/* @__PURE__ */ V("span", {
409
423
  className: "size-1.5 rounded-full bg-status-success-text",
410
424
  "aria-hidden": !0
411
425
  }), e("inbox.channels.verified", "{{count}} verified", { count: _ })]
412
- }), v > 0 && /* @__PURE__ */ V("span", {
426
+ }), y > 0 && /* @__PURE__ */ H("span", {
413
427
  className: "inline-flex items-center gap-1.5",
414
- children: [/* @__PURE__ */ B("span", {
428
+ children: [/* @__PURE__ */ V("span", {
415
429
  className: "size-1.5 rounded-full bg-status-warning-text",
416
430
  "aria-hidden": !0
417
- }), e("inbox.channels.pending", "{{count}} pending verification", { count: v })]
431
+ }), e("inbox.channels.pending", "{{count}} pending verification", { count: y })]
418
432
  })]
419
- }), /* @__PURE__ */ B("div", {
433
+ }), /* @__PURE__ */ V("div", {
420
434
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3",
421
- children: g.map((e) => /* @__PURE__ */ B(fe, {
435
+ children: g.map((e) => /* @__PURE__ */ V(de, {
422
436
  channel: e,
423
- verifying: a.isPending,
424
- onVerify: (e) => a.mutate(e),
437
+ verifying: s.isPending,
438
+ onVerify: (e) => s.mutate(e),
425
439
  onLog: (e) => h(e)
426
440
  }, e.id))
427
441
  })] }),
428
- o && /* @__PURE__ */ B(ue, { onClose: () => c(!1) }),
429
- p && /* @__PURE__ */ B(de, {
430
- channel: p,
442
+ d && /* @__PURE__ */ V(le, { onClose: () => p(!1) }),
443
+ m && /* @__PURE__ */ V(ue, {
444
+ channel: m,
431
445
  onClose: () => h(null)
432
446
  })
433
447
  ]
434
448
  });
435
449
  }
436
- function me({ message: e, active: n, onSelect: r, onChangeReadState: i, markPending: o, onViewRelationship: s }) {
437
- let c = l(), u = !e.isRead;
438
- return /* @__PURE__ */ V("div", {
439
- role: "button",
440
- tabIndex: 0,
441
- "aria-pressed": n,
442
- "aria-label": c("inbox.message.open", "Open message: {{subject}}", { subject: e.subject || c("inbox.message.noSubject", "(no subject)") }),
443
- onClick: r,
444
- onKeyDown: (e) => {
445
- e.target === e.currentTarget && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), r());
446
- },
447
- className: t("relative flex cursor-pointer items-start gap-3 p-4 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset", n ? "bg-bg-sunken" : u ? "bg-accent-wash" : "hover:bg-bg-sunken/60"),
450
+ function pe({ message: e, active: i, onSelect: a, onChangeReadState: o, markPending: s, onViewRelationship: c }) {
451
+ let { formatRelativeTime: l } = n(), u = t(), d = !e.isRead;
452
+ return /* @__PURE__ */ H("div", {
453
+ "data-inbox-row": !0,
454
+ className: r("relative flex cursor-pointer items-start gap-3 p-4 transition-colors", "focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset", i ? "bg-bg-sunken" : d ? "bg-accent-wash" : "hover:bg-bg-sunken/60"),
448
455
  children: [
449
- u && /* @__PURE__ */ B("span", {
456
+ /* @__PURE__ */ V("button", {
457
+ type: "button",
458
+ "aria-pressed": i,
459
+ "aria-label": u("inbox.message.open", "Open message: {{subject}}", { subject: e.subject || u("inbox.message.noSubject", "(no subject)") }),
460
+ onClick: a,
461
+ className: "absolute inset-0 rounded-lg focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)] focus-visible:ring-inset"
462
+ }),
463
+ d && /* @__PURE__ */ V("span", {
450
464
  "aria-hidden": !0,
451
- className: "absolute inset-y-0 left-0 w-0.5 bg-text-link"
465
+ className: "absolute inset-y-0 start-0 pointer-events-none w-0.5 bg-text-link"
452
466
  }),
453
- /* @__PURE__ */ B("span", {
454
- className: "mt-0.5 shrink-0 text-text-secondary",
455
- children: u ? /* @__PURE__ */ B(E, { className: "h-4 w-4 text-text-link" }) : /* @__PURE__ */ B(D, { className: "h-4 w-4" })
467
+ /* @__PURE__ */ V("span", {
468
+ className: "relative pointer-events-none mt-0.5 shrink-0 text-text-secondary",
469
+ children: d ? /* @__PURE__ */ V(O, { className: "h-4 w-4 text-text-link" }) : /* @__PURE__ */ V(k, { className: "h-4 w-4" })
456
470
  }),
457
- /* @__PURE__ */ V("div", {
458
- className: "min-w-0 flex-1",
471
+ /* @__PURE__ */ H("div", {
472
+ className: "relative pointer-events-none min-w-0 flex-1",
459
473
  children: [
460
- /* @__PURE__ */ V("div", {
474
+ /* @__PURE__ */ H("div", {
461
475
  className: "flex items-center gap-2",
462
476
  children: [
463
- u && /* @__PURE__ */ B("span", {
464
- "aria-label": c("inbox.message.unreadAria", "Unread"),
477
+ d && /* @__PURE__ */ V("span", {
478
+ role: "img",
479
+ "aria-label": u("inbox.message.unreadAria", "Unread"),
465
480
  className: "size-1.5 shrink-0 rounded-full bg-text-link"
466
481
  }),
467
- /* @__PURE__ */ B("p", {
468
- className: t("min-w-0 flex-1 truncate text-sm", u ? "font-semibold text-text-primary" : "font-normal text-text-primary"),
469
- children: e.subject || c("inbox.message.noSubject", "(no subject)")
482
+ /* @__PURE__ */ V("p", {
483
+ className: r("min-w-0 flex-1 truncate text-sm", d ? "font-semibold text-text-primary" : "font-normal text-text-primary"),
484
+ children: e.subject || u("inbox.message.noSubject", "(no subject)")
470
485
  }),
471
- /* @__PURE__ */ B("span", {
486
+ /* @__PURE__ */ V("span", {
472
487
  className: "shrink-0 text-xs tabular-nums text-text-secondary",
473
- children: a(e.receivedAt)
488
+ children: l(e.receivedAt)
474
489
  })
475
490
  ]
476
491
  }),
477
- e.preview && /* @__PURE__ */ B("p", {
492
+ e.preview && /* @__PURE__ */ V("p", {
478
493
  className: "mt-0.5 line-clamp-2 text-xs text-text-secondary",
479
494
  children: e.preview
480
495
  }),
481
- /* @__PURE__ */ V("div", {
496
+ /* @__PURE__ */ H("div", {
482
497
  className: "mt-1.5 flex flex-wrap items-center gap-2",
483
498
  children: [
484
- /* @__PURE__ */ B(Q, { category: e.category }),
485
- e.actionRequired && /* @__PURE__ */ B(le, {}),
486
- s && /* @__PURE__ */ B("button", {
499
+ /* @__PURE__ */ V(se, { category: e.category }),
500
+ e.actionRequired && /* @__PURE__ */ V(ce, {}),
501
+ c && /* @__PURE__ */ V("button", {
487
502
  type: "button",
488
503
  onClick: (e) => {
489
- e.stopPropagation(), s();
504
+ e.stopPropagation(), c();
490
505
  },
491
- className: "text-xs font-medium text-text-link hover:underline",
492
- children: c("inbox.message.viewRelationship", "View relationship")
506
+ className: "pointer-events-auto text-xs font-medium text-text-link hover:underline",
507
+ children: u("inbox.message.viewRelationship", "View relationship")
493
508
  }),
494
- /* @__PURE__ */ V(H, { children: [/* @__PURE__ */ B(G, {
495
- asChild: !0,
496
- children: /* @__PURE__ */ B("button", {
497
- type: "button",
498
- disabled: o,
499
- "aria-label": c("inbox.message.actions", "Message actions for {{subject}}", { subject: e.subject || c("inbox.message.noSubject", "(no subject)") }),
509
+ /* @__PURE__ */ H(U, {
510
+ modal: !1,
511
+ children: [/* @__PURE__ */ V(K, {
512
+ asChild: !0,
513
+ children: /* @__PURE__ */ V("button", {
514
+ type: "button",
515
+ disabled: s,
516
+ "aria-label": u("inbox.message.actions", "Message actions for {{subject}}", { subject: e.subject || u("inbox.message.noSubject", "(no subject)") }),
517
+ onClick: (e) => e.stopPropagation(),
518
+ className: "pointer-events-auto ms-auto shrink-0 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
519
+ children: /* @__PURE__ */ V(M, {
520
+ className: "h-4 w-4",
521
+ "aria-hidden": !0
522
+ })
523
+ })
524
+ }), /* @__PURE__ */ V(W, {
525
+ align: "end",
500
526
  onClick: (e) => e.stopPropagation(),
501
- className: "ml-auto shrink-0 rounded-lg border border-border-subtle px-2.5 py-1 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
502
- children: /* @__PURE__ */ B(A, {
503
- className: "h-4 w-4",
504
- "aria-hidden": !0
527
+ onKeyDown: (e) => e.stopPropagation(),
528
+ children: /* @__PURE__ */ V(G, {
529
+ disabled: s,
530
+ onSelect: o,
531
+ children: d ? u("inbox.message.markRead", "Mark read") : u("inbox.message.markUnread", "Mark unread")
505
532
  })
506
- })
507
- }), /* @__PURE__ */ B(U, {
508
- align: "end",
509
- onClick: (e) => e.stopPropagation(),
510
- onKeyDown: (e) => e.stopPropagation(),
511
- children: /* @__PURE__ */ B(W, {
512
- disabled: o,
513
- onSelect: i,
514
- children: u ? c("inbox.message.markRead", "Mark read") : c("inbox.message.markUnread", "Mark unread")
515
- })
516
- })] })
533
+ })]
534
+ })
517
535
  ]
518
536
  })
519
537
  ]
@@ -521,296 +539,297 @@ function me({ message: e, active: n, onSelect: r, onChangeReadState: i, markPend
521
539
  ]
522
540
  });
523
541
  }
524
- function he({ message: e, channel: t, onChangeReadState: n, markPending: i, onViewRelationship: a }) {
525
- let o = l();
526
- if (!e) return /* @__PURE__ */ V(K, {
542
+ function me({ message: e, channel: r, onChangeReadState: i, markPending: a, onViewRelationship: o }) {
543
+ let { formatDateTime: s } = n(), c = t();
544
+ if (!e) return /* @__PURE__ */ H(q, {
527
545
  treatment: "metric",
528
546
  className: "flex min-h-[20rem] flex-col items-center justify-center p-8 text-center",
529
547
  children: [
530
- /* @__PURE__ */ B(j, { className: "h-10 w-10 text-text-secondary" }),
531
- /* @__PURE__ */ B("p", {
548
+ /* @__PURE__ */ V(te, { className: "h-10 w-10 text-text-secondary" }),
549
+ /* @__PURE__ */ V("p", {
532
550
  className: "mt-3 text-sm font-medium text-text-primary",
533
- children: o("inbox.readingPane.selectTitle", "Select a message")
551
+ children: c("inbox.readingPane.selectTitle", "Select a message")
534
552
  }),
535
- /* @__PURE__ */ B("p", {
553
+ /* @__PURE__ */ V("p", {
536
554
  className: "mt-1 max-w-[16rem] text-xs text-text-secondary",
537
- children: o("inbox.readingPane.selectDescription", "Pick any message from the list to read the full details here.")
555
+ children: c("inbox.readingPane.selectDescription", "Pick any message from the list to read the full details here.")
538
556
  })
539
557
  ]
540
558
  });
541
- let s = t ? Z[t.type] ?? P : P, c = e.categoryConfidence == null ? null : Math.round(Math.max(0, Math.min(1, e.categoryConfidence)) * 100);
542
- return /* @__PURE__ */ V(K, {
559
+ let l = r ? oe[r.type] ?? F : F, u = e.categoryConfidence == null ? null : Math.round(Math.max(0, Math.min(1, e.categoryConfidence)) * 100);
560
+ return /* @__PURE__ */ H(q, {
543
561
  treatment: "metric",
544
562
  className: "flex flex-col p-5",
545
563
  children: [
546
- /* @__PURE__ */ V("div", {
564
+ /* @__PURE__ */ H("div", {
547
565
  className: "flex items-start justify-between gap-3",
548
- children: [/* @__PURE__ */ B("h3", {
566
+ children: [/* @__PURE__ */ V("h3", {
549
567
  className: "text-base font-semibold text-text-primary",
550
- children: e.subject || o("inbox.message.noSubject", "(no subject)")
551
- }), /* @__PURE__ */ B("button", {
568
+ children: e.subject || c("inbox.message.noSubject", "(no subject)")
569
+ }), /* @__PURE__ */ V("button", {
552
570
  type: "button",
553
- disabled: i,
554
- onClick: n,
571
+ disabled: a,
572
+ onClick: i,
555
573
  className: "shrink-0 rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium text-text-primary hover:bg-bg-sunken disabled:opacity-50",
556
- children: i ? o("inbox.message.saving", "Saving…") : e.isRead ? o("inbox.message.markUnread", "Mark unread") : o("inbox.message.markRead", "Mark read")
574
+ children: a ? c("inbox.message.saving", "Saving…") : e.isRead ? c("inbox.message.markUnread", "Mark unread") : c("inbox.message.markRead", "Mark read")
557
575
  })]
558
576
  }),
559
- t && /* @__PURE__ */ V("div", {
577
+ r && /* @__PURE__ */ H("div", {
560
578
  className: "mt-2 flex items-center gap-2 text-sm",
561
- children: [/* @__PURE__ */ B(s, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ B("span", {
579
+ children: [/* @__PURE__ */ V(l, { className: "h-4 w-4 shrink-0 text-text-secondary" }), /* @__PURE__ */ V("span", {
562
580
  className: "truncate text-text-secondary",
563
- title: t.address,
564
- children: t.address
581
+ title: r.address,
582
+ children: r.address
565
583
  })]
566
584
  }),
567
- /* @__PURE__ */ V("div", {
585
+ /* @__PURE__ */ H("div", {
568
586
  className: "mt-3 flex flex-wrap items-center gap-2",
569
587
  children: [
570
- /* @__PURE__ */ B(Q, { category: e.category }),
571
- e.actionRequired && /* @__PURE__ */ B(le, {}),
572
- /* @__PURE__ */ B("span", {
588
+ /* @__PURE__ */ V(se, { category: e.category }),
589
+ e.actionRequired && /* @__PURE__ */ V(ce, {}),
590
+ /* @__PURE__ */ V("span", {
573
591
  className: "text-xs text-text-secondary",
574
- children: r(e.receivedAt)
592
+ children: s(e.receivedAt)
575
593
  })
576
594
  ]
577
595
  }),
578
- c != null && /* @__PURE__ */ V("div", {
596
+ u != null && /* @__PURE__ */ H("div", {
579
597
  className: "mt-4 rounded-lg border border-border-subtle bg-bg-surface p-3",
580
- children: [/* @__PURE__ */ V("div", {
598
+ children: [/* @__PURE__ */ H("div", {
581
599
  className: "flex items-center justify-between text-xs",
582
- children: [/* @__PURE__ */ V("span", {
600
+ children: [/* @__PURE__ */ H("span", {
583
601
  className: "inline-flex items-center gap-1.5 font-medium text-text-primary",
584
602
  children: [
585
- /* @__PURE__ */ B(L, { className: "h-3.5 w-3.5 text-text-link" }),
603
+ /* @__PURE__ */ V(R, { className: "h-3.5 w-3.5 text-text-link" }),
586
604
  " ",
587
- o("inbox.readingPane.aiCategorization", "AI categorization")
605
+ c("inbox.readingPane.aiCategorization", "AI categorization")
588
606
  ]
589
- }), /* @__PURE__ */ B("span", {
607
+ }), /* @__PURE__ */ V("span", {
590
608
  className: "tabular-nums text-text-secondary",
591
- children: o("inbox.readingPane.confidence", "{{pct}}% confidence", { pct: c })
609
+ children: c("inbox.readingPane.confidence", "{{pct}}% confidence", { pct: u })
592
610
  })]
593
- }), /* @__PURE__ */ B(p, {
594
- value: c,
611
+ }), /* @__PURE__ */ V(d, {
612
+ label: c("inbox.message.confidence", "Classification confidence"),
613
+ value: u,
595
614
  max: 100,
596
- tone: c >= 66 ? "positive" : c >= 33 ? "accent" : "warning",
615
+ tone: u >= 66 ? "positive" : u >= 33 ? "accent" : "warning",
597
616
  className: "mt-2"
598
617
  })]
599
618
  }),
600
- /* @__PURE__ */ B("div", {
619
+ /* @__PURE__ */ V("div", {
601
620
  className: "mt-4 border-t border-border-subtle pt-4",
602
- children: e.preview ? /* @__PURE__ */ B("p", {
621
+ children: e.preview ? /* @__PURE__ */ V("p", {
603
622
  className: "whitespace-pre-wrap text-sm leading-relaxed text-text-primary",
604
623
  children: e.preview
605
- }) : /* @__PURE__ */ B("p", {
624
+ }) : /* @__PURE__ */ V("p", {
606
625
  className: "text-sm italic text-text-secondary",
607
- children: o("inbox.readingPane.noPreview", "No preview available for this message.")
626
+ children: c("inbox.readingPane.noPreview", "No preview available for this message.")
608
627
  })
609
628
  }),
610
- e.actionRequired && /* @__PURE__ */ V("div", {
629
+ e.actionRequired && /* @__PURE__ */ H("div", {
611
630
  className: "mt-4 flex items-start gap-2 rounded-lg border border-status-warning-text/30 bg-status-warning-bg-subtle p-3",
612
- children: [/* @__PURE__ */ B(I, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ B("p", {
631
+ children: [/* @__PURE__ */ V(L, { className: "mt-0.5 h-4 w-4 shrink-0 text-status-warning-text" }), /* @__PURE__ */ V("p", {
613
632
  className: "text-xs text-status-warning-text",
614
- children: o("inbox.readingPane.attention", "This message needs your attention — review it before its provider deadline.")
633
+ children: c("inbox.readingPane.attention", "This message needs your attention — review it before its provider deadline.")
615
634
  })]
616
635
  }),
617
- a && /* @__PURE__ */ V("button", {
636
+ o && /* @__PURE__ */ H("button", {
618
637
  type: "button",
619
- onClick: a,
638
+ onClick: o,
620
639
  className: "mt-4 inline-flex items-center gap-1 self-start text-sm font-medium text-text-link hover:underline",
621
640
  children: [
622
- o("inbox.message.viewRelationship", "View relationship"),
641
+ c("inbox.message.viewRelationship", "View relationship"),
623
642
  " ",
624
- /* @__PURE__ */ B(w, { className: "h-4 w-4" })
643
+ /* @__PURE__ */ V(E, { className: "rtl:rotate-180 h-4 w-4" })
625
644
  ]
626
645
  })
627
646
  ]
628
647
  });
629
648
  }
630
- function $({ active: e, onClick: n, children: r, tone: i = "default" }) {
631
- return /* @__PURE__ */ B("button", {
649
+ function $({ active: e, onClick: t, children: n, tone: i = "default" }) {
650
+ return /* @__PURE__ */ V("button", {
632
651
  type: "button",
633
- onClick: n,
652
+ onClick: t,
634
653
  "aria-pressed": e,
635
- className: t("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", e ? i === "warning" ? "border-transparent bg-status-warning-bg-subtle text-status-warning-text" : "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-subtle text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
636
- children: r
654
+ className: r("inline-flex items-center gap-1.5 rounded-full border px-3 py-1.5 text-xs font-medium transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-focus-ring)]", e ? i === "warning" ? "border-transparent bg-status-warning-bg-subtle text-status-warning-text" : "border-transparent bg-action-primary-bg text-action-primary-text" : "border-border-subtle text-text-secondary hover:bg-bg-sunken hover:text-text-primary"),
655
+ children: n
637
656
  });
638
657
  }
639
- function ge() {
640
- let r = l(), { navigateTo: i } = e(), [a, o] = b(0), [c, f] = b(""), [p, h] = b(!1), [_, y] = b(!1), [S, C] = te("inbox"), { data: w, isLoading: T, isError: D, refetch: O, isFetching: k } = g({
641
- category: c || void 0,
642
- unreadOnly: p || void 0,
658
+ function he() {
659
+ let n = t(), { navigateTo: a } = e(), [s, u] = S(0), [d, p] = S(""), [h, v] = S(!1), [b, w] = S(!1), [T, E] = y("inbox"), { data: D, isLoading: k, isError: A, refetch: j, isFetching: M } = m({
660
+ category: d || void 0,
661
+ unreadOnly: h || void 0,
643
662
  pagination: {
644
- limit: q,
645
- offset: a * q
663
+ limit: J,
664
+ offset: s * J
646
665
  }
647
- }), { data: A } = m(), j = v(), M = ee(), N = ne(!1), [P, F] = b(!1), I = j.isPending || M.isPending, L = async (e) => {
648
- if (!N.current) {
649
- N.current = !0, F(!1);
666
+ }), { data: te } = f(), N = g(), P = _(), F = x(!1), [I, L] = S(!1), R = N.isPending || P.isPending, z = async (e) => {
667
+ if (!F.current) {
668
+ F.current = !0, L(!1);
650
669
  try {
651
- await (e.isRead ? M : j).mutateAsync(e.id);
670
+ await (e.isRead ? P : N).mutateAsync(e.id);
652
671
  } catch {
653
- F(!0);
672
+ L(!0);
654
673
  } finally {
655
- N.current = !1;
674
+ F.current = !1;
656
675
  }
657
676
  }
658
- }, R = w?.items ?? [], z = w?.pageInfo.hasMore ?? !1, H = _ ? R.filter((e) => e.actionRequired) : R, U = R.filter((e) => !e.isRead).length, W = R.filter((e) => e.actionRequired).length, G = new Map((A ?? []).map((e) => [e.id, e])), K = H.find((e) => e.id === S) ?? null, J = K ? G.get(K.channelId) : void 0, Y = () => {
659
- o(0), C(null);
677
+ }, B = D?.items ?? [], U = D?.pageInfo.hasMore ?? !1, W = b ? B.filter((e) => e.actionRequired) : B, G = B.filter((e) => !e.isRead).length, K = B.filter((e) => e.actionRequired).length, q = new Map((te ?? []).map((e) => [e.id, e])), Y = W.find((e) => e.id === T) ?? null, X = Y ? q.get(Y.channelId) : void 0, Z = () => {
678
+ u(0), E(null);
660
679
  };
661
- return /* @__PURE__ */ V(n, {
662
- title: r("inbox.title", "Universal Inbox"),
663
- description: r("inbox.description", "Every subscription communication, merged and categorized"),
680
+ return /* @__PURE__ */ H(i, {
681
+ title: n("inbox.title", "Universal Inbox"),
682
+ description: n("inbox.description", "Every subscription communication, merged and categorized"),
664
683
  children: [
665
- /* @__PURE__ */ B(ie, {
684
+ /* @__PURE__ */ V(ne, {
666
685
  className: "mb-4",
667
- children: r("inbox.purpose", "Subscription communication is noisy and scattered. The Universal Inbox merges every channel a provider uses and uses AI to categorize each message so you never miss a renewal, required action or security notice.")
686
+ children: n("inbox.purpose", "Subscription communication is noisy and scattered. The Universal Inbox merges every channel a provider uses and uses AI to categorize each message so you never miss a renewal, required action or security notice.")
668
687
  }),
669
- /* @__PURE__ */ B("div", {
688
+ /* @__PURE__ */ V("div", {
670
689
  className: "-mx-1 flex gap-2 overflow-x-auto px-1 pb-1",
671
- children: se.map((e) => /* @__PURE__ */ B("span", {
690
+ children: ie.map((e) => /* @__PURE__ */ V("span", {
672
691
  className: "shrink-0",
673
- children: /* @__PURE__ */ B($, {
674
- active: c === e.value,
692
+ children: /* @__PURE__ */ V($, {
693
+ active: d === e.value,
675
694
  onClick: () => {
676
- f(e.value), Y();
695
+ p(e.value), Z();
677
696
  },
678
- children: r(e.key, e.fallback)
697
+ children: n(e.key, e.fallback)
679
698
  })
680
699
  }, e.value))
681
700
  }),
682
- /* @__PURE__ */ V("div", {
701
+ /* @__PURE__ */ H("div", {
683
702
  className: "mt-3 flex flex-wrap items-center gap-2",
684
703
  children: [
685
- /* @__PURE__ */ V($, {
686
- active: _,
704
+ /* @__PURE__ */ H($, {
705
+ active: b,
687
706
  tone: "warning",
688
707
  onClick: () => {
689
- y((e) => !e), C(null);
708
+ w((e) => !e), E(null);
690
709
  },
691
710
  children: [
692
- /* @__PURE__ */ B(x, { className: "h-3.5 w-3.5" }),
711
+ /* @__PURE__ */ V(C, { className: "h-3.5 w-3.5" }),
693
712
  " ",
694
- r("inbox.filters.actionRequired", "Action required")
713
+ n("inbox.filters.actionRequired", "Action required")
695
714
  ]
696
715
  }),
697
- /* @__PURE__ */ V($, {
698
- active: p,
716
+ /* @__PURE__ */ H($, {
717
+ active: h,
699
718
  onClick: () => {
700
- h((e) => !e), Y();
719
+ v((e) => !e), Z();
701
720
  },
702
721
  children: [
703
- /* @__PURE__ */ B(E, { className: "h-3.5 w-3.5" }),
722
+ /* @__PURE__ */ V(O, { className: "h-3.5 w-3.5" }),
704
723
  " ",
705
- r("inbox.filters.unreadOnly", "Unread only")
724
+ n("inbox.filters.unreadOnly", "Unread only")
706
725
  ]
707
726
  }),
708
- !T && !D && R.length > 0 && /* @__PURE__ */ V("p", {
709
- className: "ml-auto text-xs text-text-secondary",
727
+ !k && !A && B.length > 0 && /* @__PURE__ */ H("p", {
728
+ className: "ms-auto text-xs text-text-secondary",
710
729
  children: [
711
- r("inbox.filters.unreadCount", "{{count}} unread", { count: U }),
730
+ n("inbox.filters.unreadCount", "{{count}} unread", { count: G }),
712
731
  " · ",
713
- r("inbox.filters.actionCount", "{{count}} need action", { count: W }),
714
- k ? ` · ${r("inbox.filters.refreshing", "refreshing…")}` : ""
732
+ n("inbox.filters.actionCount", "{{count}} need action", { count: K }),
733
+ M ? ` · ${n("inbox.filters.refreshing", "refreshing…")}` : ""
715
734
  ]
716
735
  })
717
736
  ]
718
737
  }),
719
- I && /* @__PURE__ */ B("p", {
738
+ R && /* @__PURE__ */ V("p", {
720
739
  role: "status",
721
740
  className: "mt-3 text-sm text-text-secondary",
722
- children: r("inbox.message.saving", "Saving…")
741
+ children: n("inbox.message.saving", "Saving…")
723
742
  }),
724
- P && /* @__PURE__ */ B("p", {
743
+ I && /* @__PURE__ */ V("p", {
725
744
  role: "alert",
726
745
  className: "mt-3 text-sm text-status-error-text",
727
- children: r("inbox.message.updateError", "Could not update the message. Please try again.")
746
+ children: n("inbox.message.updateError", "Could not update the message. Please try again.")
728
747
  }),
729
- T ? /* @__PURE__ */ B(d, { label: r("inbox.loading", "Loading inbox…") }) : D ? /* @__PURE__ */ B(u, {
730
- message: r("inbox.error", "Could not load the inbox."),
731
- onRetry: () => void O()
732
- }) : R.length === 0 ? /* @__PURE__ */ B("div", {
748
+ k ? /* @__PURE__ */ V(l, { label: n("inbox.loading", "Loading inbox…") }) : A ? /* @__PURE__ */ V(c, {
749
+ message: n("inbox.error", "Could not load the inbox."),
750
+ onRetry: () => void j()
751
+ }) : B.length === 0 ? /* @__PURE__ */ V("div", {
733
752
  className: "mt-6",
734
- children: /* @__PURE__ */ B(s, {
753
+ children: /* @__PURE__ */ V(o, {
735
754
  illustration: "empty-inbox",
736
- icon: /* @__PURE__ */ B(re, { className: "h-12 w-12" }),
737
- title: r("inbox.emptyTitle", "Inbox is empty"),
738
- description: p || c ? r("inbox.emptyDescriptionFiltered", "No messages match these filters.") : r("inbox.emptyDescription", "Merged subscription communications will appear here once channels start ingesting.")
755
+ icon: /* @__PURE__ */ V(ee, { className: "h-12 w-12" }),
756
+ title: n("inbox.emptyTitle", "Inbox is empty"),
757
+ description: h || d ? n("inbox.emptyDescriptionFiltered", "No messages match these filters.") : n("inbox.emptyDescription", "Merged subscription communications will appear here once channels start ingesting.")
739
758
  })
740
- }) : /* @__PURE__ */ V("div", {
759
+ }) : /* @__PURE__ */ H("div", {
741
760
  className: "mt-5 grid grid-cols-1 gap-5 lg:grid-cols-[minmax(0,1fr)_380px]",
742
- children: [/* @__PURE__ */ V("div", {
761
+ children: [/* @__PURE__ */ H("div", {
743
762
  className: "min-w-0",
744
- children: [H.length === 0 ? /* @__PURE__ */ V("div", {
763
+ children: [W.length === 0 ? /* @__PURE__ */ H("div", {
745
764
  className: "rounded-xl border border-border-subtle bg-bg-surface p-8 text-center",
746
765
  children: [
747
- /* @__PURE__ */ B(x, { className: "mx-auto h-8 w-8 text-text-secondary" }),
748
- /* @__PURE__ */ B("p", {
766
+ /* @__PURE__ */ V(C, { className: "mx-auto h-8 w-8 text-text-secondary" }),
767
+ /* @__PURE__ */ V("p", {
749
768
  className: "mt-2 text-sm font-medium text-text-primary",
750
- children: r("inbox.noActionTitle", "No action-required messages on this page")
769
+ children: n("inbox.noActionTitle", "No action-required messages on this page")
751
770
  }),
752
- /* @__PURE__ */ B("p", {
771
+ /* @__PURE__ */ V("p", {
753
772
  className: "mt-1 text-xs text-text-secondary",
754
- children: r("inbox.noActionDescription", "Turn off the “Action required” lens or move to another page.")
773
+ children: n("inbox.noActionDescription", "Turn off the “Action required” lens or move to another page.")
755
774
  })
756
775
  ]
757
- }) : /* @__PURE__ */ B("div", {
776
+ }) : /* @__PURE__ */ V("div", {
758
777
  className: "divide-y divide-border-subtle overflow-hidden rounded-xl border border-border-subtle bg-bg-surface",
759
- children: H.map((e) => /* @__PURE__ */ B(me, {
778
+ children: W.map((e) => /* @__PURE__ */ V(pe, {
760
779
  message: e,
761
- active: e.id === S,
762
- onSelect: () => C(e.id),
763
- onChangeReadState: () => void L(e),
764
- markPending: I,
765
- onViewRelationship: e.relationshipId ? () => i(`/relationships/${e.relationshipId}`) : null
780
+ active: e.id === T,
781
+ onSelect: () => E(e.id),
782
+ onChangeReadState: () => void z(e),
783
+ markPending: R,
784
+ onViewRelationship: e.relationshipId ? () => a(`/relationships/${e.relationshipId}`) : null
766
785
  }, e.id))
767
- }), /* @__PURE__ */ V("div", {
786
+ }), /* @__PURE__ */ H("div", {
768
787
  className: "mt-4 flex items-center justify-between",
769
- children: [/* @__PURE__ */ V("p", {
788
+ children: [/* @__PURE__ */ H("p", {
770
789
  className: "text-xs text-text-secondary",
771
- children: [r("inbox.pagination.page", "Page {{page}}", { page: a + 1 }), k ? ` · ${r("inbox.filters.refreshing", "refreshing…")}` : ""]
772
- }), /* @__PURE__ */ V("div", {
790
+ children: [n("inbox.pagination.page", "Page {{page}}", { page: s + 1 }), M ? ` · ${n("inbox.filters.refreshing", "refreshing…")}` : ""]
791
+ }), /* @__PURE__ */ H("div", {
773
792
  className: "flex gap-2",
774
- children: [/* @__PURE__ */ B("button", {
793
+ children: [/* @__PURE__ */ V("button", {
775
794
  type: "button",
776
- disabled: a === 0,
795
+ disabled: s === 0,
777
796
  onClick: () => {
778
- o((e) => Math.max(0, e - 1)), C(null);
797
+ u((e) => Math.max(0, e - 1)), E(null);
779
798
  },
780
- className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", a === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
781
- children: r("inbox.pagination.previous", "Previous")
782
- }), /* @__PURE__ */ B("button", {
799
+ className: r("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", s === 0 ? "cursor-not-allowed text-text-secondary opacity-50" : "text-text-primary hover:bg-bg-sunken"),
800
+ children: n("inbox.pagination.previous", "Previous")
801
+ }), /* @__PURE__ */ V("button", {
783
802
  type: "button",
784
- disabled: !z,
803
+ disabled: !U,
785
804
  onClick: () => {
786
- o((e) => e + 1), C(null);
805
+ u((e) => e + 1), E(null);
787
806
  },
788
- className: t("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", z ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
789
- children: r("inbox.pagination.next", "Next")
807
+ className: r("rounded-lg border border-border-subtle px-3 py-1.5 text-xs font-medium", U ? "text-text-primary hover:bg-bg-sunken" : "cursor-not-allowed text-text-secondary opacity-50"),
808
+ children: n("inbox.pagination.next", "Next")
790
809
  })]
791
810
  })]
792
811
  })]
793
- }), /* @__PURE__ */ B("aside", {
812
+ }), /* @__PURE__ */ V("aside", {
794
813
  className: "hidden lg:block",
795
- children: /* @__PURE__ */ B("div", {
814
+ children: /* @__PURE__ */ V("div", {
796
815
  className: "lg:sticky lg:top-4",
797
- children: /* @__PURE__ */ B(he, {
798
- message: K,
799
- channel: J,
816
+ children: /* @__PURE__ */ V(me, {
817
+ message: Y,
818
+ channel: X,
800
819
  onChangeReadState: () => {
801
- K && L(K);
820
+ Y && z(Y);
802
821
  },
803
- markPending: I,
804
- onViewRelationship: K?.relationshipId ? () => i(`/relationships/${K.relationshipId}`) : null
822
+ markPending: R,
823
+ onViewRelationship: Y?.relationshipId ? () => a(`/relationships/${Y.relationshipId}`) : null
805
824
  })
806
825
  })
807
826
  })]
808
827
  }),
809
- /* @__PURE__ */ B(pe, {})
828
+ /* @__PURE__ */ V(fe, {})
810
829
  ]
811
830
  });
812
831
  }
813
832
  //#endregion
814
- export { ge as InboxPage };
833
+ export { he as InboxPage };
815
834
 
816
835
  //# sourceMappingURL=InboxPage.js.map