@burdenoff/microfe-security 2026.624.1 → 2026.624.2

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.
@@ -3,16 +3,17 @@ import { cn as t } from "../utils/cn.js";
3
3
  import { PageLayout as n } from "../components/PageLayout.js";
4
4
  import { Badge as r, Button as i, Card as a } from "../components/ui.js";
5
5
  import { ConfirmDialog as o } from "../components/ConfirmDialog.js";
6
- import { useDeleteIntegration as s, useTriggerSync as c, useVaultIntegrations as l, useVaultSyncLogs as u } from "../hooks/useProviderQueries.js";
7
- import { getProviderTypeInfo as d } from "../constants/providers.js";
8
- import { nativeConfirm as f, nativeImpact as p, nativeNotify as m } from "../../utils/nativeBridge.js";
9
- import { useState as h } from "react";
10
- import { useNavigate as g, useParams as _ } from "react-router-dom";
11
- import { jsx as v, jsxs as y } from "react/jsx-runtime";
12
- import { AlertTriangle as b, ArrowLeft as x, CheckCircle as S, Clock as C, Cloud as w, Info as T, Loader2 as E, RefreshCw as D, Trash2 as O, XCircle as k } from "lucide-react";
6
+ import { useDeleteIntegration as s, useTriggerSync as c, useVaultIntegrations as ee, useVaultSyncLogs as l } from "../hooks/useProviderQueries.js";
7
+ import { getProviderTypeInfo as u } from "../constants/providers.js";
8
+ import { nativeConfirm as d, nativeImpact as f, nativeNotify as p } from "../../utils/nativeBridge.js";
9
+ import { useState as m } from "react";
10
+ import { useNavigate as h, useParams as g } from "react-router-dom";
11
+ import { jsx as _, jsxs as v } from "react/jsx-runtime";
12
+ import { AlertTriangle as y, ArrowLeft as b, CheckCircle as x, Clock as S, Cloud as C, Info as w, Loader2 as T, RefreshCw as E, Trash2 as D, XCircle as O } from "lucide-react";
13
+ import { ResponsiveTable as k } from "@burdenoff/fe-libs/ui";
13
14
  //#region src/security/pages/ProviderDetailPage.tsx
14
15
  function A() {
15
- let { vaultId: A, providerId: j } = _(), { basePath: M = "/", navigate: N } = e(), P = g(), { data: F, loading: I, error: L } = l(A), R = (F?.getVaultIntegrations?.items ?? []).find((e) => e.id === j), { data: z, loading: B } = u(j), V = z?.getVaultSyncLogs?.items ?? [], [H, { loading: U }] = s(), [W, { loading: G }] = c(), [K, q] = h(!1), J = (e) => {
16
+ let { vaultId: A, providerId: j } = g(), { basePath: M = "/", navigate: N } = e(), P = h(), { data: F, loading: I, error: L } = ee(A), R = (F?.getVaultIntegrations?.items ?? []).find((e) => e.id === j), { data: z, loading: B } = l(j), V = z?.getVaultSyncLogs?.items ?? [], [H, { loading: U }] = s(), [W, { loading: G }] = c(), [K, q] = m(!1), J = (e) => {
16
17
  N ? N(e) : P(e);
17
18
  }, Y = () => J(`${M}/providers`), X = async () => {
18
19
  if (j) try {
@@ -22,13 +23,13 @@ function A() {
22
23
  }
23
24
  }, Z = async () => {
24
25
  if (j) try {
25
- await H({ variables: { id: j } }), m("success"), Y();
26
+ await H({ variables: { id: j } }), p("success"), Y();
26
27
  } catch (e) {
27
- console.error("Delete failed:", e), m("error");
28
+ console.error("Delete failed:", e), p("error");
28
29
  }
29
30
  }, Q = async () => {
30
- p("medium");
31
- let e = await f({
31
+ f("medium");
32
+ let e = await d({
32
33
  title: "Delete Provider",
33
34
  message: "Delete this provider? This cannot be undone.",
34
35
  okButtonTitle: "Delete",
@@ -40,7 +41,7 @@ function A() {
40
41
  }
41
42
  e && await Z();
42
43
  };
43
- if (I && !R) return /* @__PURE__ */ v(n, {
44
+ if (I && !R) return /* @__PURE__ */ _(n, {
44
45
  title: "Loading...",
45
46
  breadcrumbs: [{
46
47
  label: "Security",
@@ -49,12 +50,12 @@ function A() {
49
50
  label: "Providers",
50
51
  path: `${M}/providers`
51
52
  }],
52
- children: /* @__PURE__ */ v("div", {
53
+ children: /* @__PURE__ */ _("div", {
53
54
  className: "flex items-center justify-center py-16",
54
- children: /* @__PURE__ */ v(E, { className: "size-8 animate-spin text-primary" })
55
+ children: /* @__PURE__ */ _(T, { className: "size-8 animate-spin text-primary" })
55
56
  })
56
57
  });
57
- if (L || !I && !R) return /* @__PURE__ */ v(n, {
58
+ if (L || !I && !R) return /* @__PURE__ */ _(n, {
58
59
  title: "Error",
59
60
  breadcrumbs: [{
60
61
  label: "Security",
@@ -63,32 +64,32 @@ function A() {
63
64
  label: "Providers",
64
65
  path: `${M}/providers`
65
66
  }],
66
- children: /* @__PURE__ */ v(a, {
67
+ children: /* @__PURE__ */ _(a, {
67
68
  className: "p-6",
68
- children: /* @__PURE__ */ y("div", {
69
+ children: /* @__PURE__ */ v("div", {
69
70
  className: "flex items-start gap-4",
70
- children: [/* @__PURE__ */ v(b, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ y("div", { children: [
71
- /* @__PURE__ */ v("h3", {
71
+ children: [/* @__PURE__ */ _(y, { className: "size-6 text-status-error-text" }), /* @__PURE__ */ v("div", { children: [
72
+ /* @__PURE__ */ _("h3", {
72
73
  className: "font-semibold text-status-error-text",
73
74
  children: "Provider not found"
74
75
  }),
75
- /* @__PURE__ */ v("p", {
76
+ /* @__PURE__ */ _("p", {
76
77
  className: "text-sm text-text-secondary mt-1",
77
78
  children: L?.message ?? "The requested provider could not be found."
78
79
  }),
79
- /* @__PURE__ */ y(i, {
80
+ /* @__PURE__ */ v(i, {
80
81
  variant: "outline",
81
82
  size: "sm",
82
83
  className: "mt-4",
83
84
  onClick: Y,
84
- children: [/* @__PURE__ */ v(x, { className: "size-4" }), "Back to Providers"]
85
+ children: [/* @__PURE__ */ _(b, { className: "size-4" }), "Back to Providers"]
85
86
  })
86
87
  ] })]
87
88
  })
88
89
  })
89
90
  });
90
- let $ = d(R.providerType);
91
- return /* @__PURE__ */ y(n, {
91
+ let $ = u(R.providerType);
92
+ return /* @__PURE__ */ v(n, {
92
93
  title: R.displayName || $.label,
93
94
  description: $.description,
94
95
  breadcrumbs: [
@@ -102,202 +103,186 @@ function A() {
102
103
  },
103
104
  { label: R.displayName || $.label }
104
105
  ],
105
- actions: /* @__PURE__ */ y("div", {
106
+ actions: /* @__PURE__ */ v("div", {
106
107
  className: "flex items-center gap-2",
107
108
  children: [
108
- /* @__PURE__ */ y(i, {
109
+ /* @__PURE__ */ v(i, {
109
110
  variant: "outline",
110
111
  size: "sm",
111
112
  onClick: Y,
112
- children: [/* @__PURE__ */ v(x, { className: "size-4" }), /* @__PURE__ */ v("span", {
113
+ children: [/* @__PURE__ */ _(b, { className: "size-4" }), /* @__PURE__ */ _("span", {
113
114
  className: "hidden sm:inline",
114
115
  children: "Back"
115
116
  })]
116
117
  }),
117
- /* @__PURE__ */ y(i, {
118
+ /* @__PURE__ */ v(i, {
118
119
  variant: "outline",
119
120
  size: "sm",
120
121
  onClick: X,
121
122
  disabled: G,
122
- children: [/* @__PURE__ */ v(D, { className: t("size-4", G && "animate-spin") }), G ? "Syncing..." : "Sync Now"]
123
+ children: [/* @__PURE__ */ _(E, { className: t("size-4", G && "animate-spin") }), G ? "Syncing..." : "Sync Now"]
123
124
  }),
124
- /* @__PURE__ */ y(i, {
125
+ /* @__PURE__ */ v(i, {
125
126
  variant: "destructive",
126
127
  size: "sm",
127
128
  onClick: () => void Q(),
128
129
  disabled: U,
129
- children: [/* @__PURE__ */ v(O, { className: "size-4" }), /* @__PURE__ */ v("span", {
130
+ children: [/* @__PURE__ */ _(D, { className: "size-4" }), /* @__PURE__ */ _("span", {
130
131
  className: "hidden sm:inline",
131
132
  children: "Remove"
132
133
  })]
133
134
  })
134
135
  ]
135
136
  }),
136
- children: [/* @__PURE__ */ y("div", {
137
+ children: [/* @__PURE__ */ v("div", {
137
138
  className: "space-y-6",
138
- children: [/* @__PURE__ */ y(a, {
139
+ children: [/* @__PURE__ */ v(a, {
139
140
  className: "p-6",
140
- children: [/* @__PURE__ */ y("div", {
141
+ children: [/* @__PURE__ */ v("div", {
141
142
  className: "flex items-center gap-2 mb-6",
142
- children: [/* @__PURE__ */ v("div", {
143
+ children: [/* @__PURE__ */ _("div", {
143
144
  className: "p-2 rounded-lg bg-action-primary-bg/10 text-primary",
144
- children: /* @__PURE__ */ v(w, { className: "size-5" })
145
- }), /* @__PURE__ */ v("h2", {
145
+ children: /* @__PURE__ */ _(C, { className: "size-5" })
146
+ }), /* @__PURE__ */ _("h2", {
146
147
  className: "text-lg font-bold text-text-primary",
147
148
  children: "Integration Settings"
148
149
  })]
149
- }), /* @__PURE__ */ y("div", {
150
+ }), /* @__PURE__ */ v("div", {
150
151
  className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm",
151
152
  children: [
152
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
153
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
153
154
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
154
155
  children: "Provider Type"
155
- }), /* @__PURE__ */ v("p", {
156
+ }), /* @__PURE__ */ _("p", {
156
157
  className: "font-semibold text-text-primary",
157
158
  children: $.label
158
159
  })] }),
159
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
160
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
160
161
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
161
162
  children: "Sync Direction"
162
- }), /* @__PURE__ */ v("p", {
163
+ }), /* @__PURE__ */ _("p", {
163
164
  className: "font-semibold text-text-primary capitalize",
164
165
  children: R.syncDirection ?? "bidirectional"
165
166
  })] }),
166
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
167
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
167
168
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
168
169
  children: "Status"
169
- }), /* @__PURE__ */ v(r, {
170
+ }), /* @__PURE__ */ _(r, {
170
171
  variant: R.syncEnabled ? "success" : "outline",
171
172
  children: R.syncEnabled ? "Enabled" : "Disabled"
172
173
  })] }),
173
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
174
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
174
175
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
175
176
  children: "Sync Interval"
176
- }), /* @__PURE__ */ y("p", {
177
+ }), /* @__PURE__ */ v("p", {
177
178
  className: "font-semibold text-text-primary",
178
179
  children: [R.syncIntervalMinutes ?? 0, " minutes"]
179
180
  })] }),
180
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
181
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
181
182
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
182
183
  children: "Added On"
183
- }), /* @__PURE__ */ v("p", {
184
+ }), /* @__PURE__ */ _("p", {
184
185
  className: "font-semibold text-text-primary",
185
186
  children: new Date(R.createdAt).toLocaleDateString()
186
187
  })] }),
187
- R.lastSyncAt && /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
188
+ R.lastSyncAt && /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
188
189
  className: "text-xs font-medium text-text-secondary uppercase tracking-wider mb-1",
189
190
  children: "Last Successful Sync"
190
- }), /* @__PURE__ */ y("div", {
191
+ }), /* @__PURE__ */ v("div", {
191
192
  className: "flex items-center gap-1.5 font-semibold text-text-primary",
192
- children: [/* @__PURE__ */ v(S, { className: "size-3.5 text-status-success-text" }), new Date(R.lastSyncAt).toLocaleString()]
193
+ children: [/* @__PURE__ */ _(x, { className: "size-3.5 text-status-success-text" }), new Date(R.lastSyncAt).toLocaleString()]
193
194
  })] })
194
195
  ]
195
196
  })]
196
- }), /* @__PURE__ */ y(a, {
197
+ }), /* @__PURE__ */ v(a, {
197
198
  className: "p-6 shadow-sm border-border-subtle/60",
198
- children: [/* @__PURE__ */ y("div", {
199
+ children: [/* @__PURE__ */ v("div", {
199
200
  className: "flex items-center justify-between mb-6",
200
- children: [/* @__PURE__ */ y("div", {
201
+ children: [/* @__PURE__ */ v("div", {
201
202
  className: "flex items-center gap-2",
202
- children: [/* @__PURE__ */ v(C, { className: "size-5 text-primary" }), /* @__PURE__ */ v("h2", {
203
+ children: [/* @__PURE__ */ _(S, { className: "size-5 text-primary" }), /* @__PURE__ */ _("h2", {
203
204
  className: "text-lg font-bold text-text-primary",
204
205
  children: "Sync History"
205
206
  })]
206
- }), /* @__PURE__ */ y(r, {
207
+ }), /* @__PURE__ */ v(r, {
207
208
  variant: "outline",
208
209
  className: "bg-bg-sunken",
209
210
  children: [V.length, " runs"]
210
211
  })]
211
- }), B ? /* @__PURE__ */ v("div", {
212
+ }), B ? /* @__PURE__ */ _("div", {
212
213
  className: "flex justify-center py-12",
213
- children: /* @__PURE__ */ v(E, { className: "size-8 animate-spin text-primary/40" })
214
- }) : V.length > 0 ? /* @__PURE__ */ v("div", {
215
- className: "overflow-x-auto border border-border-subtle/60 rounded-lg",
216
- children: /* @__PURE__ */ y("table", {
217
- className: "w-full text-sm",
218
- children: [/* @__PURE__ */ v("thead", { children: /* @__PURE__ */ y("tr", {
219
- className: "bg-bg-sunken/30 border-b border-border-subtle",
220
- children: [
221
- /* @__PURE__ */ v("th", {
222
- className: "text-left py-3 px-4 font-semibold text-text-secondary",
223
- children: "Time"
224
- }),
225
- /* @__PURE__ */ v("th", {
226
- className: "text-left py-3 px-4 font-semibold text-text-secondary",
227
- children: "Status"
228
- }),
229
- /* @__PURE__ */ v("th", {
230
- className: "text-left py-3 px-4 font-semibold text-text-secondary",
231
- children: "Synced"
232
- }),
233
- /* @__PURE__ */ v("th", {
234
- className: "text-left py-3 px-4 font-semibold text-text-secondary",
235
- children: "Duration"
236
- }),
237
- /* @__PURE__ */ v("th", {
238
- className: "text-left py-3 px-4 font-semibold text-text-secondary",
239
- children: "Errors"
240
- })
241
- ]
242
- }) }), /* @__PURE__ */ v("tbody", {
243
- className: "divide-y divide-border/40",
244
- children: V.map((e) => /* @__PURE__ */ y("tr", {
245
- className: "hover:bg-bg-sunken/20 transition-colors",
246
- children: [
247
- /* @__PURE__ */ v("td", {
248
- className: "py-3 px-4 whitespace-nowrap",
249
- children: new Date(e.startedAt).toLocaleString()
250
- }),
251
- /* @__PURE__ */ v("td", {
252
- className: "py-3 px-4",
253
- children: /* @__PURE__ */ v(r, {
254
- variant: e.status === "COMPLETED" ? "success" : e.status === "FAILED" ? "destructive" : "warning",
255
- className: "text-[10px] uppercase",
256
- children: e.status
257
- })
258
- }),
259
- /* @__PURE__ */ v("td", {
260
- className: "py-3 px-4 font-medium text-text-primary",
261
- children: e.secretsSynced
262
- }),
263
- /* @__PURE__ */ v("td", {
264
- className: "py-3 px-4 text-text-secondary",
265
- children: e.durationMs ? `${e.durationMs}ms` : "-"
266
- }),
267
- /* @__PURE__ */ v("td", {
268
- className: "py-3 px-4",
269
- children: e.errorMessage ? /* @__PURE__ */ y("div", {
270
- className: "flex items-center gap-1.5 text-status-error-text max-w-xs truncate",
271
- children: [/* @__PURE__ */ v(k, { className: "size-3.5" }), /* @__PURE__ */ v("span", {
272
- className: "truncate",
273
- title: e.errorMessage,
274
- children: e.errorMessage
275
- })]
276
- }) : /* @__PURE__ */ v("span", {
277
- className: "text-text-secondary",
278
- children: "-"
279
- })
280
- })
281
- ]
282
- }, e.id))
283
- })]
284
- })
285
- }) : /* @__PURE__ */ y("div", {
214
+ children: /* @__PURE__ */ _(T, { className: "size-8 animate-spin text-primary/40" })
215
+ }) : V.length > 0 ? /* @__PURE__ */ _(k, {
216
+ className: "border border-border-subtle/60 rounded-lg",
217
+ data: V,
218
+ rowKey: (e) => e.id,
219
+ columns: [
220
+ {
221
+ key: "time",
222
+ header: "Time",
223
+ priority: "primary",
224
+ cell: (e) => /* @__PURE__ */ _("span", {
225
+ className: "whitespace-nowrap",
226
+ children: new Date(e.startedAt).toLocaleString()
227
+ })
228
+ },
229
+ {
230
+ key: "status",
231
+ header: "Status",
232
+ cell: (e) => /* @__PURE__ */ _(r, {
233
+ variant: e.status === "COMPLETED" ? "success" : e.status === "FAILED" ? "destructive" : "warning",
234
+ className: "text-[10px] uppercase",
235
+ children: e.status
236
+ })
237
+ },
238
+ {
239
+ key: "synced",
240
+ header: "Synced",
241
+ cell: (e) => /* @__PURE__ */ _("span", {
242
+ className: "font-medium text-text-primary tabular-nums",
243
+ children: e.secretsSynced
244
+ })
245
+ },
246
+ {
247
+ key: "duration",
248
+ header: "Duration",
249
+ cell: (e) => /* @__PURE__ */ _("span", {
250
+ className: "text-text-secondary tabular-nums",
251
+ children: e.durationMs ? `${e.durationMs}ms` : "-"
252
+ })
253
+ },
254
+ {
255
+ key: "errors",
256
+ header: "Errors",
257
+ cell: (e) => e.errorMessage ? /* @__PURE__ */ v("div", {
258
+ className: "flex items-center gap-1.5 text-status-error-text max-w-xs truncate",
259
+ children: [/* @__PURE__ */ _(O, { className: "size-3.5" }), /* @__PURE__ */ _("span", {
260
+ className: "truncate",
261
+ title: e.errorMessage,
262
+ children: e.errorMessage
263
+ })]
264
+ }) : /* @__PURE__ */ _("span", {
265
+ className: "text-text-secondary",
266
+ children: "-"
267
+ })
268
+ }
269
+ ]
270
+ }) : /* @__PURE__ */ v("div", {
286
271
  className: "text-center py-12 border-2 border-dashed border-border-subtle/40 rounded-xl bg-bg-sunken/10",
287
272
  children: [
288
- /* @__PURE__ */ v(T, { className: "size-12 text-text-secondary/30 mx-auto mb-3" }),
289
- /* @__PURE__ */ v("p", {
273
+ /* @__PURE__ */ _(w, { className: "size-12 text-text-secondary/30 mx-auto mb-3" }),
274
+ /* @__PURE__ */ _("p", {
290
275
  className: "text-sm text-text-secondary font-medium",
291
276
  children: "No sync logs found."
292
277
  }),
293
- /* @__PURE__ */ v("p", {
278
+ /* @__PURE__ */ _("p", {
294
279
  className: "text-xs text-text-secondary mt-1",
295
280
  children: "Sync history will appear here after the first synchronization run."
296
281
  })
297
282
  ]
298
283
  })]
299
284
  })]
300
- }), /* @__PURE__ */ v(o, {
285
+ }), /* @__PURE__ */ _(o, {
301
286
  isOpen: K,
302
287
  onClose: () => q(!1),
303
288
  onConfirm: Z,
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderDetailPage.js","names":[],"sources":["../../../src/security/pages/ProviderDetailPage.tsx"],"sourcesContent":["import { useParams, useNavigate } from 'react-router-dom';\nimport {\n ArrowLeft,\n RefreshCw,\n Trash2,\n Cloud,\n Loader2,\n AlertTriangle,\n CheckCircle,\n Clock,\n XCircle,\n Info,\n} from 'lucide-react';\nimport { PageLayout } from '../components/PageLayout';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useVaultIntegrations,\n useDeleteIntegration,\n useTriggerSync,\n useVaultSyncLogs,\n} from '../hooks/useProviderQueries';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { getProviderTypeInfo } from '../constants/providers';\nimport { useState } from 'react';\nimport { cn } from '../utils/cn';\nimport type { ProviderType } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\nexport function ProviderDetailPage() {\n const { vaultId, providerId } = useParams<{ vaultId: string; providerId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n\n const { data, loading, error } = useVaultIntegrations(vaultId);\n const providers = data?.getVaultIntegrations?.items ?? [];\n const provider = providers.find((p: any) => p.id === providerId);\n\n const { data: logsData, loading: logsLoading } = useVaultSyncLogs(providerId);\n const syncLogs = logsData?.getVaultSyncLogs?.items ?? [];\n\n const [deleteProvider, { loading: deleting }] = useDeleteIntegration();\n const [triggerSync, { loading: syncing }] = useTriggerSync();\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => handleNavigate(`${basePath}/providers`);\n\n const handleSync = async () => {\n if (!providerId) return;\n try {\n await triggerSync({ variables: { integrationId: providerId } });\n } catch (err) {\n console.error('Sync failed:', err);\n }\n };\n\n const handleDelete = async () => {\n if (!providerId) return;\n try {\n await deleteProvider({ variables: { id: providerId } });\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Delete failed:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Provider',\n message: 'Delete this provider? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n if (loading && !provider) {\n return (\n <PageLayout\n title=\"Loading...\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || (!loading && !provider)) {\n return (\n <PageLayout\n title=\"Error\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">Provider not found</h3>\n <p className=\"text-sm text-text-secondary mt-1\">\n {error?.message ?? 'The requested provider could not be found.'}\n </p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n Back to Providers\n </Button>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const typeInfo = getProviderTypeInfo(provider.providerType as ProviderType);\n\n return (\n <PageLayout\n title={(provider.displayName as string) || typeInfo.label}\n description={typeInfo.description}\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n { label: (provider.displayName as string) || typeInfo.label },\n ]}\n actions={\n <div className=\"flex items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Back</span>\n </Button>\n <Button variant=\"outline\" size=\"sm\" onClick={handleSync} disabled={syncing}>\n <RefreshCw className={cn('size-4', syncing && 'animate-spin')} />\n {syncing ? 'Syncing...' : 'Sync Now'}\n </Button>\n <Button\n variant=\"destructive\"\n size=\"sm\"\n onClick={() => void requestDelete()}\n disabled={deleting}\n >\n <Trash2 className=\"size-4\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </Button>\n </div>\n }\n >\n <div className=\"space-y-6\">\n {/* Configuration */}\n <Card className=\"p-6\">\n <div className=\"flex items-center gap-2 mb-6\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10 text-primary\">\n <Cloud className=\"size-5\" />\n </div>\n <h2 className=\"text-lg font-bold text-text-primary\">Integration Settings</h2>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Provider Type\n </p>\n <p className=\"font-semibold text-text-primary\">{typeInfo.label}</p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Direction\n </p>\n <p className=\"font-semibold text-text-primary capitalize\">\n {(provider.syncDirection as string) ?? 'bidirectional'}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Status\n </p>\n <Badge variant={provider.syncEnabled ? 'success' : 'outline'}>\n {provider.syncEnabled ? 'Enabled' : 'Disabled'}\n </Badge>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Interval\n </p>\n <p className=\"font-semibold text-text-primary\">\n {(provider.syncIntervalMinutes as number) ?? 0} minutes\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Added On\n </p>\n <p className=\"font-semibold text-text-primary\">\n {new Date(provider.createdAt as string).toLocaleDateString()}\n </p>\n </div>\n {provider.lastSyncAt && (\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Last Successful Sync\n </p>\n <div className=\"flex items-center gap-1.5 font-semibold text-text-primary\">\n <CheckCircle className=\"size-3.5 text-status-success-text\" />\n {new Date(provider.lastSyncAt as string).toLocaleString()}\n </div>\n </div>\n )}\n </div>\n </Card>\n\n {/* Sync History */}\n <Card className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-primary\" />\n <h2 className=\"text-lg font-bold text-text-primary\">Sync History</h2>\n </div>\n <Badge variant=\"outline\" className=\"bg-bg-sunken\">\n {syncLogs.length} runs\n </Badge>\n </div>\n\n {logsLoading ? (\n <div className=\"flex justify-center py-12\">\n <Loader2 className=\"size-8 animate-spin text-primary/40\" />\n </div>\n ) : syncLogs.length > 0 ? (\n <div className=\"overflow-x-auto border border-border-subtle/60 rounded-lg\">\n <table className=\"w-full text-sm\">\n <thead>\n <tr className=\"bg-bg-sunken/30 border-b border-border-subtle\">\n <th className=\"text-left py-3 px-4 font-semibold text-text-secondary\">\n Time\n </th>\n <th className=\"text-left py-3 px-4 font-semibold text-text-secondary\">\n Status\n </th>\n <th className=\"text-left py-3 px-4 font-semibold text-text-secondary\">\n Synced\n </th>\n <th className=\"text-left py-3 px-4 font-semibold text-text-secondary\">\n Duration\n </th>\n <th className=\"text-left py-3 px-4 font-semibold text-text-secondary\">\n Errors\n </th>\n </tr>\n </thead>\n <tbody className=\"divide-y divide-border/40\">\n {syncLogs.map((log: any) => (\n <tr key={log.id} className=\"hover:bg-bg-sunken/20 transition-colors\">\n <td className=\"py-3 px-4 whitespace-nowrap\">\n {new Date(log.startedAt).toLocaleString()}\n </td>\n <td className=\"py-3 px-4\">\n <Badge\n variant={\n log.status === 'COMPLETED'\n ? 'success'\n : log.status === 'FAILED'\n ? 'destructive'\n : 'warning'\n }\n className=\"text-[10px] uppercase\"\n >\n {log.status}\n </Badge>\n </td>\n <td className=\"py-3 px-4 font-medium text-text-primary\">{log.secretsSynced}</td>\n <td className=\"py-3 px-4 text-text-secondary\">\n {log.durationMs ? `${log.durationMs}ms` : '-'}\n </td>\n <td className=\"py-3 px-4\">\n {log.errorMessage ? (\n <div className=\"flex items-center gap-1.5 text-status-error-text max-w-xs truncate\">\n <XCircle className=\"size-3.5\" />\n <span className=\"truncate\" title={log.errorMessage}>\n {log.errorMessage}\n </span>\n </div>\n ) : (\n <span className=\"text-text-secondary\">-</span>\n )}\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n ) : (\n <div className=\"text-center py-12 border-2 border-dashed border-border-subtle/40 rounded-xl bg-bg-sunken/10\">\n <Info className=\"size-12 text-text-secondary/30 mx-auto mb-3\" />\n <p className=\"text-sm text-text-secondary font-medium\">No sync logs found.</p>\n <p className=\"text-xs text-text-secondary mt-1\">\n Sync history will appear here after the first synchronization run.\n </p>\n </div>\n )}\n </Card>\n </div>\n\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title=\"Remove Provider\"\n description={`Are you sure you want to remove this ${typeInfo.label} connection? Synced secrets will remain but will no longer auto-update.`}\n confirmLabel={deleting ? 'Removing...' : 'Remove Provider'}\n variant=\"destructive\"\n />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AA6BA,SAAgB,IAAqB;CACnC,IAAM,EAAE,YAAS,kBAAe,GAAoD,EAC9E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,IAAiB,GAAa,EAE9B,EAAE,SAAM,YAAS,aAAU,EAAqB,EAAQ,EAExD,KADY,GAAM,sBAAsB,SAAS,EAAE,EAC9B,MAAM,MAAW,EAAE,OAAO,EAAW,EAE1D,EAAE,MAAM,GAAU,SAAS,MAAgB,EAAiB,EAAW,EACvE,IAAW,GAAU,kBAAkB,SAAS,EAAE,EAElD,CAAC,GAAgB,EAAE,SAAS,OAAc,GAAsB,EAChE,CAAC,GAAa,EAAE,SA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A;WAER,WAAU;qBAET,EAAI;WACC,CAAA;UACL,CAAA;SACL,kBAAC,MAAD;UAAI,WAAU;oBAA2C,EAAI;UAAmB,CAAA;SAChF,kBAAC,MAAD;UAAI,WAAU;oBACX,EAAI,aAAa,GAAG,EAAI,WAAW,MAAM;UACvC,CAAA;SACL,kBAAC,MAAD;UAAI,WAAU;oBACX,EAAI,eACH,kBAAC,OAAD;WAAK,WAAU;qBAAf,CACE,kBAAC,GAAD,EAAS,WAAU,YAAa,CAAA,EAChC,kBAAC,QAAD;YAAM,WAAU;YAAW,OAAO,EAAI;sBACnC,EAAI;YACA,CAAA,CACH;eAEN,kBAAC,QAAD;WAAM,WAAU;qBAAsB;WAAQ,CAAA;UAE7C,CAAA;SACF;UAlCI,EAAI,GAkCR,CACL;OACI,CAAA,CACF;;KACJ,CAAA,GAEN,kBAAC,OAAD;KAAK,WAAU;eAAf;MACE,kBAAC,GAAD,EAAM,WAAU,+CAAgD,CAAA;MAChE,kBAAC,KAAD;OAAG,WAAU;iBAA0C;OAAuB,CAAA;MAC9E,kBAAC,KAAD;OAAG,WAAU;iBAAmC;OAE5C,CAAA;MACA;OAEH;MACH;MAEN,kBAAC,GAAD;GACE,QAAQ;GACR,eAAe,EAAqB,GAAM;GAC1C,WAAW;GACX,OAAM;GACN,aAAa,wCAAwC,EAAS,MAAM;GACpE,cAAc,IAAW,gBAAgB;GACzC,SAAQ;GACR,CAAA,CACS"}
1
+ {"version":3,"file":"ProviderDetailPage.js","names":[],"sources":["../../../src/security/pages/ProviderDetailPage.tsx"],"sourcesContent":["import { useParams, useNavigate } from 'react-router-dom';\nimport {\n ArrowLeft,\n RefreshCw,\n Trash2,\n Cloud,\n Loader2,\n AlertTriangle,\n CheckCircle,\n Clock,\n XCircle,\n Info,\n} from 'lucide-react';\nimport {\n ResponsiveTable,\n type ResponsiveTableColumn,\n} from '@burdenoff/fe-libs/ui';\nimport { PageLayout } from '../components/PageLayout';\nimport { ConfirmDialog } from '../components/ConfirmDialog';\nimport { Button, Card, Badge } from '../components/ui';\nimport {\n useVaultIntegrations,\n useDeleteIntegration,\n useTriggerSync,\n useVaultSyncLogs,\n} from '../hooks/useProviderQueries';\nimport { useSecurity } from '../providers/SecurityProvider';\nimport { getProviderTypeInfo } from '../constants/providers';\nimport { useState } from 'react';\nimport { cn } from '../utils/cn';\nimport type { ProviderType } from '../types';\nimport { nativeConfirm, nativeImpact, nativeNotify } from '../../utils/nativeBridge';\n\nexport function ProviderDetailPage() {\n const { vaultId, providerId } = useParams<{ vaultId: string; providerId: string }>();\n const { basePath = '/', navigate: shellNavigate } = useSecurity();\n const routerNavigate = useNavigate();\n\n const { data, loading, error } = useVaultIntegrations(vaultId);\n const providers = data?.getVaultIntegrations?.items ?? [];\n const provider = providers.find((p: any) => p.id === providerId);\n\n const { data: logsData, loading: logsLoading } = useVaultSyncLogs(providerId);\n const syncLogs = logsData?.getVaultSyncLogs?.items ?? [];\n\n const [deleteProvider, { loading: deleting }] = useDeleteIntegration();\n const [triggerSync, { loading: syncing }] = useTriggerSync();\n const [showDeleteConfirm, setShowDeleteConfirm] = useState(false);\n\n const handleNavigate = (path: string) => {\n if (shellNavigate) {\n shellNavigate(path);\n } else {\n routerNavigate(path);\n }\n };\n\n const handleBack = () => handleNavigate(`${basePath}/providers`);\n\n const handleSync = async () => {\n if (!providerId) return;\n try {\n await triggerSync({ variables: { integrationId: providerId } });\n } catch (err) {\n console.error('Sync failed:', err);\n }\n };\n\n const handleDelete = async () => {\n if (!providerId) return;\n try {\n await deleteProvider({ variables: { id: providerId } });\n void nativeNotify('success');\n handleBack();\n } catch (err) {\n console.error('Delete failed:', err);\n void nativeNotify('error');\n }\n };\n\n const requestDelete = async () => {\n void nativeImpact('medium');\n const result = await nativeConfirm({\n title: 'Delete Provider',\n message: 'Delete this provider? This cannot be undone.',\n okButtonTitle: 'Delete',\n cancelButtonTitle: 'Cancel',\n });\n if (result === null) {\n setShowDeleteConfirm(true);\n return;\n }\n if (result) {\n await handleDelete();\n }\n };\n\n if (loading && !provider) {\n return (\n <PageLayout\n title=\"Loading...\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <div className=\"flex items-center justify-center py-16\">\n <Loader2 className=\"size-8 animate-spin text-primary\" />\n </div>\n </PageLayout>\n );\n }\n\n if (error || (!loading && !provider)) {\n return (\n <PageLayout\n title=\"Error\"\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n ]}\n >\n <Card className=\"p-6\">\n <div className=\"flex items-start gap-4\">\n <AlertTriangle className=\"size-6 text-status-error-text\" />\n <div>\n <h3 className=\"font-semibold text-status-error-text\">Provider not found</h3>\n <p className=\"text-sm text-text-secondary mt-1\">\n {error?.message ?? 'The requested provider could not be found.'}\n </p>\n <Button variant=\"outline\" size=\"sm\" className=\"mt-4\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n Back to Providers\n </Button>\n </div>\n </div>\n </Card>\n </PageLayout>\n );\n }\n\n const typeInfo = getProviderTypeInfo(provider.providerType as ProviderType);\n\n return (\n <PageLayout\n title={(provider.displayName as string) || typeInfo.label}\n description={typeInfo.description}\n breadcrumbs={[\n { label: 'Security', path: basePath },\n { label: 'Providers', path: `${basePath}/providers` },\n { label: (provider.displayName as string) || typeInfo.label },\n ]}\n actions={\n <div className=\"flex items-center gap-2\">\n <Button variant=\"outline\" size=\"sm\" onClick={handleBack}>\n <ArrowLeft className=\"size-4\" />\n <span className=\"hidden sm:inline\">Back</span>\n </Button>\n <Button variant=\"outline\" size=\"sm\" onClick={handleSync} disabled={syncing}>\n <RefreshCw className={cn('size-4', syncing && 'animate-spin')} />\n {syncing ? 'Syncing...' : 'Sync Now'}\n </Button>\n <Button\n variant=\"destructive\"\n size=\"sm\"\n onClick={() => void requestDelete()}\n disabled={deleting}\n >\n <Trash2 className=\"size-4\" />\n <span className=\"hidden sm:inline\">Remove</span>\n </Button>\n </div>\n }\n >\n <div className=\"space-y-6\">\n {/* Configuration */}\n <Card className=\"p-6\">\n <div className=\"flex items-center gap-2 mb-6\">\n <div className=\"p-2 rounded-lg bg-action-primary-bg/10 text-primary\">\n <Cloud className=\"size-5\" />\n </div>\n <h2 className=\"text-lg font-bold text-text-primary\">Integration Settings</h2>\n </div>\n\n <div className=\"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-6 text-sm\">\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Provider Type\n </p>\n <p className=\"font-semibold text-text-primary\">{typeInfo.label}</p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Direction\n </p>\n <p className=\"font-semibold text-text-primary capitalize\">\n {(provider.syncDirection as string) ?? 'bidirectional'}\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Status\n </p>\n <Badge variant={provider.syncEnabled ? 'success' : 'outline'}>\n {provider.syncEnabled ? 'Enabled' : 'Disabled'}\n </Badge>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Sync Interval\n </p>\n <p className=\"font-semibold text-text-primary\">\n {(provider.syncIntervalMinutes as number) ?? 0} minutes\n </p>\n </div>\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Added On\n </p>\n <p className=\"font-semibold text-text-primary\">\n {new Date(provider.createdAt as string).toLocaleDateString()}\n </p>\n </div>\n {provider.lastSyncAt && (\n <div>\n <p className=\"text-xs font-medium text-text-secondary uppercase tracking-wider mb-1\">\n Last Successful Sync\n </p>\n <div className=\"flex items-center gap-1.5 font-semibold text-text-primary\">\n <CheckCircle className=\"size-3.5 text-status-success-text\" />\n {new Date(provider.lastSyncAt as string).toLocaleString()}\n </div>\n </div>\n )}\n </div>\n </Card>\n\n {/* Sync History */}\n <Card className=\"p-6 shadow-sm border-border-subtle/60\">\n <div className=\"flex items-center justify-between mb-6\">\n <div className=\"flex items-center gap-2\">\n <Clock className=\"size-5 text-primary\" />\n <h2 className=\"text-lg font-bold text-text-primary\">Sync History</h2>\n </div>\n <Badge variant=\"outline\" className=\"bg-bg-sunken\">\n {syncLogs.length} runs\n </Badge>\n </div>\n\n {logsLoading ? (\n <div className=\"flex justify-center py-12\">\n <Loader2 className=\"size-8 animate-spin text-primary/40\" />\n </div>\n ) : syncLogs.length > 0 ? (\n <ResponsiveTable<any>\n className=\"border border-border-subtle/60 rounded-lg\"\n data={syncLogs}\n rowKey={(log) => log.id}\n columns={\n [\n {\n key: 'time',\n header: 'Time',\n priority: 'primary',\n cell: (log) => (\n <span className=\"whitespace-nowrap\">\n {new Date(log.startedAt).toLocaleString()}\n </span>\n ),\n },\n {\n key: 'status',\n header: 'Status',\n cell: (log) => (\n <Badge\n variant={\n log.status === 'COMPLETED'\n ? 'success'\n : log.status === 'FAILED'\n ? 'destructive'\n : 'warning'\n }\n className=\"text-[10px] uppercase\"\n >\n {log.status}\n </Badge>\n ),\n },\n {\n key: 'synced',\n header: 'Synced',\n cell: (log) => (\n <span className=\"font-medium text-text-primary tabular-nums\">\n {log.secretsSynced}\n </span>\n ),\n },\n {\n key: 'duration',\n header: 'Duration',\n cell: (log) => (\n <span className=\"text-text-secondary tabular-nums\">\n {log.durationMs ? `${log.durationMs}ms` : '-'}\n </span>\n ),\n },\n {\n key: 'errors',\n header: 'Errors',\n cell: (log) =>\n log.errorMessage ? (\n <div className=\"flex items-center gap-1.5 text-status-error-text max-w-xs truncate\">\n <XCircle className=\"size-3.5\" />\n <span className=\"truncate\" title={log.errorMessage}>\n {log.errorMessage}\n </span>\n </div>\n ) : (\n <span className=\"text-text-secondary\">-</span>\n ),\n },\n ] satisfies ResponsiveTableColumn<any>[]\n }\n />\n ) : (\n <div className=\"text-center py-12 border-2 border-dashed border-border-subtle/40 rounded-xl bg-bg-sunken/10\">\n <Info className=\"size-12 text-text-secondary/30 mx-auto mb-3\" />\n <p className=\"text-sm text-text-secondary font-medium\">No sync logs found.</p>\n <p className=\"text-xs text-text-secondary mt-1\">\n Sync history will appear here after the first synchronization run.\n </p>\n </div>\n )}\n </Card>\n </div>\n\n <ConfirmDialog\n isOpen={showDeleteConfirm}\n onClose={() => setShowDeleteConfirm(false)}\n onConfirm={handleDelete}\n title=\"Remove Provider\"\n description={`Are you sure you want to remove this ${typeInfo.label} connection? Synced secrets will remain but will no longer auto-update.`}\n confirmLabel={deleting ? 'Removing...' : 'Remove Provider'}\n variant=\"destructive\"\n />\n </PageLayout>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;AAiCA,SAAgB,IAAqB;CACnC,IAAM,EAAE,YAAS,kBAAe,GAAoD,EAC9E,EAAE,cAAW,KAAK,UAAU,MAAkB,GAAa,EAC3D,IAAiB,GAAa,EAE9B,EAAE,SAAM,YAAS,aAAU,GAAqB,EAAQ,EAExD,KADY,GAAM,sBAAsB,SAAS,EAAE,EAC9B,MAAM,MAAW,EAAE,OAAO,EAAW,EAE1D,EAAE,MAAM,GAAU,SAAS,MAAgB,EAAiB,EAAW,EACvE,IAAW,GAAU,kBAAkB,SAAS,EAAE,EAElD,CAAC,GAAgB,EAAE,SAAS,OAAc,GAAsB,EAChE,CAAC,GAAa,EAAE,SAAS,OAAa,GAAgB,EACtD,CAAC,GAAmB,KAAwB,EAAS,GAAM,EAE3D,KAAkB,MAAiB;AACvC,EAAI,IACF,EAAc,EAAK,GAEnB,EAAe,EAAK;IAIlB,UAAmB,EAAe,GAAG,EAAS,YAAY,EAE1D,IAAa,YAAY;AACxB,QACL,KAAI;AACF,SAAM,EAAY,EAAE,WAAW,EAAE,eAAe,GAAY,EAAE,CAAC;WACxD,GAAK;AACZ,WAAQ,MAAM,gBAAgB,EAAI;;IAIhC,IAAe,YAAY;AAC1B,QACL,KAAI;AAGF,GAFA,MAAM,EAAe,EAAE,WAAW,EAAE,IAAI,GAAY,EAAE,CAAC,EAClD,EAAa,UAAU,EAC5B,GAAY;WACL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