@burdenoff/microfe-vibecontrols 2026.610.7 → 2026.610.8

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.
@@ -0,0 +1,232 @@
1
+ import { useCreateSessionShareLinkMutation as e, useGetSessionShareLinksQuery as t, useRevokeSessionShareLinkMutation as n } from "../../generated/wspace-operations.js";
2
+ import { LoadingState as r } from "../shared/LoadingState.js";
3
+ import { ErrorState as i } from "../shared/ErrorState.js";
4
+ import { SessionSharePermission as a } from "../../generated/wspace-types.js";
5
+ import "../shared/index.js";
6
+ import { notify as o } from "../../lib/toast.js";
7
+ import { useState as s } from "react";
8
+ import { useI18n as c } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
9
+ import { Check as l, Copy as u, Eye as d, Keyboard as f, Link2 as p, Lock as m, Plus as h, Trash2 as g, X as _ } from "lucide-react";
10
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
11
+ //#region src/components/sessions/SessionPublicLinkPanel.tsx
12
+ var x = [
13
+ {
14
+ label: "1 hour",
15
+ hours: 1
16
+ },
17
+ {
18
+ label: "4 hours",
19
+ hours: 4
20
+ },
21
+ {
22
+ label: "24 hours",
23
+ hours: 24
24
+ },
25
+ {
26
+ label: "No expiry",
27
+ hours: 0
28
+ }
29
+ ], S = ({ sessionId: S, sessionName: w, onClose: T }) => {
30
+ let { t: E } = c(), D = (e, t) => {
31
+ let n = E(e);
32
+ return n === e ? t : n;
33
+ }, { data: O, loading: k, error: A, refetch: j } = t({
34
+ variables: { sessionId: S },
35
+ fetchPolicy: "cache-and-network"
36
+ }), [M, { loading: N }] = e(), [P] = n(), [F, I] = s(!1), [L, R] = s(4), [z, B] = s(""), [V, H] = s(""), [U, W] = s(null), G = O?.sessionShareLinks ?? [], K = G.filter((e) => e.status === "ACTIVE"), q = async (e, t) => {
37
+ try {
38
+ await navigator.clipboard.writeText(e), W(t), o.success(D("sessLink.copied", "Link copied")), window.setTimeout(() => W(null), 1500);
39
+ } catch {
40
+ o.error(D("sessLink.copyFailed", "Could not copy — copy it manually"), e);
41
+ }
42
+ }, J = async (e) => {
43
+ e.preventDefault();
44
+ let t = V.trim() ? Number.parseInt(V.trim(), 10) : null;
45
+ if (t !== null && (!Number.isFinite(t) || t < 1)) {
46
+ o.error(D("sessLink.badMax", "Max uses must be a positive number"));
47
+ return;
48
+ }
49
+ try {
50
+ let e = await M({ variables: { input: {
51
+ sessionId: S,
52
+ permission: F ? a.Interact : a.View,
53
+ expiresInHours: L > 0 ? L : null,
54
+ password: z.trim() ? z.trim() : null,
55
+ maxUses: t
56
+ } } });
57
+ await j();
58
+ let n = e.data?.createSessionShareLink.shareUrl;
59
+ n && await q(n, e.data?.createSessionShareLink.id ?? "new"), o.success(D("sessLink.created", "Share link created"), F ? D("sessLink.createdInteract", "Recipient can request keyboard control") : D("sessLink.createdView", "Recipient can watch the terminal (view-only)")), B(""), H("");
60
+ } catch (e) {
61
+ o.error(D("sessLink.createFailed", "Could not create link"), e.message);
62
+ }
63
+ }, Y = async (e) => {
64
+ try {
65
+ await P({ variables: { id: e } }), await j(), o.success(D("sessLink.revoked", "Link revoked — it no longer works"));
66
+ } catch (e) {
67
+ o.error(D("sessLink.revokeFailed", "Could not revoke"), e.message);
68
+ }
69
+ };
70
+ return /* @__PURE__ */ y("div", {
71
+ className: "fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4",
72
+ onClick: T,
73
+ children: /* @__PURE__ */ b("div", {
74
+ className: "w-full max-w-lg rounded-lg border border-border-default bg-bg-surface p-5 shadow-lg",
75
+ onClick: (e) => e.stopPropagation(),
76
+ children: [
77
+ /* @__PURE__ */ b("div", {
78
+ className: "mb-4 flex items-start justify-between",
79
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ b("h3", {
80
+ className: "flex items-center gap-2 text-lg font-semibold text-text-primary",
81
+ children: [/* @__PURE__ */ y(p, { className: "size-5" }), D("sessLink.title", "Share link")]
82
+ }), /* @__PURE__ */ y("p", {
83
+ className: "mt-0.5 text-sm text-text-secondary",
84
+ children: w
85
+ })] }), /* @__PURE__ */ y("button", {
86
+ type: "button",
87
+ onClick: T,
88
+ className: "p-1 text-text-tertiary hover:text-text-primary",
89
+ "aria-label": D("common.close", "Close"),
90
+ children: /* @__PURE__ */ y(_, { className: "size-5" })
91
+ })]
92
+ }),
93
+ /* @__PURE__ */ y("div", {
94
+ className: "mb-4 space-y-2",
95
+ children: k && G.length === 0 ? /* @__PURE__ */ y(r, {}) : A ? /* @__PURE__ */ y(i, {
96
+ message: A.message,
97
+ onRetry: () => void j()
98
+ }) : K.length === 0 ? /* @__PURE__ */ y("p", {
99
+ className: "text-sm text-text-secondary",
100
+ children: D("sessLink.none", "No share links yet. Create one below.")
101
+ }) : /* @__PURE__ */ y("ul", {
102
+ className: "space-y-2",
103
+ children: K.map((e) => /* @__PURE__ */ b("li", {
104
+ className: "flex items-center gap-2 rounded-md border border-border-default px-3 py-2",
105
+ children: [
106
+ /* @__PURE__ */ y(C, { children: e.permission === a.Interact ? /* @__PURE__ */ b(v, { children: [
107
+ /* @__PURE__ */ y(f, { className: "size-3" }),
108
+ " ",
109
+ D("sessLink.interact", "Interactive")
110
+ ] }) : /* @__PURE__ */ b(v, { children: [
111
+ /* @__PURE__ */ y(d, { className: "size-3" }),
112
+ " ",
113
+ D("sessLink.view", "View")
114
+ ] }) }),
115
+ e.hasPassword && /* @__PURE__ */ y(m, {
116
+ className: "size-3.5 text-text-tertiary",
117
+ "aria-label": "password"
118
+ }),
119
+ /* @__PURE__ */ y("span", {
120
+ className: "flex-1 truncate font-mono text-xs text-text-secondary",
121
+ children: e.shareUrl
122
+ }),
123
+ /* @__PURE__ */ b("span", {
124
+ className: "shrink-0 text-xs text-text-tertiary",
125
+ children: [
126
+ e.useCount,
127
+ e.maxUses ? `/${e.maxUses}` : "",
128
+ " ",
129
+ D("sessLink.uses", "uses")
130
+ ]
131
+ }),
132
+ /* @__PURE__ */ y("button", {
133
+ type: "button",
134
+ onClick: () => void q(e.shareUrl, e.id),
135
+ className: "p-1 text-text-secondary hover:text-text-primary",
136
+ "aria-label": D("common.copy", "Copy"),
137
+ children: U === e.id ? /* @__PURE__ */ y(l, { className: "size-4 text-status-success-text" }) : /* @__PURE__ */ y(u, { className: "size-4" })
138
+ }),
139
+ /* @__PURE__ */ y("button", {
140
+ type: "button",
141
+ onClick: () => void Y(e.id),
142
+ className: "p-1 text-text-secondary hover:text-action-danger-text",
143
+ "aria-label": D("common.revoke", "Revoke"),
144
+ children: /* @__PURE__ */ y(g, { className: "size-4" })
145
+ })
146
+ ]
147
+ }, e.id))
148
+ })
149
+ }),
150
+ /* @__PURE__ */ b("form", {
151
+ onSubmit: (e) => void J(e),
152
+ className: "space-y-3 border-t border-border-default pt-4",
153
+ children: [
154
+ /* @__PURE__ */ b("label", {
155
+ className: "flex cursor-pointer items-center gap-2 text-sm text-text-primary",
156
+ children: [
157
+ /* @__PURE__ */ y("input", {
158
+ type: "checkbox",
159
+ checked: F,
160
+ onChange: (e) => I(e.target.checked),
161
+ className: "rounded border-border-default"
162
+ }),
163
+ /* @__PURE__ */ y(f, { className: "size-3.5" }),
164
+ D("sessLink.allowInteract", "Allow interactive control (recipient can request the keyboard)")
165
+ ]
166
+ }),
167
+ /* @__PURE__ */ b("div", {
168
+ className: "flex flex-col gap-3 sm:flex-row",
169
+ children: [/* @__PURE__ */ b("label", {
170
+ className: "flex-1",
171
+ children: [/* @__PURE__ */ y("span", {
172
+ className: "text-sm text-text-secondary",
173
+ children: D("sessLink.expiry", "Expires")
174
+ }), /* @__PURE__ */ y("select", {
175
+ value: L,
176
+ onChange: (e) => R(Number(e.target.value)),
177
+ className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary",
178
+ children: x.map((e) => /* @__PURE__ */ y("option", {
179
+ value: e.hours,
180
+ children: e.label
181
+ }, e.label))
182
+ })]
183
+ }), /* @__PURE__ */ b("label", {
184
+ className: "flex-1",
185
+ children: [/* @__PURE__ */ y("span", {
186
+ className: "text-sm text-text-secondary",
187
+ children: D("sessLink.maxUses", "Max uses (optional)")
188
+ }), /* @__PURE__ */ y("input", {
189
+ value: V,
190
+ onChange: (e) => H(e.target.value),
191
+ inputMode: "numeric",
192
+ placeholder: D("sessLink.unlimited", "unlimited"),
193
+ className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
194
+ })]
195
+ })]
196
+ }),
197
+ /* @__PURE__ */ b("label", {
198
+ className: "block",
199
+ children: [/* @__PURE__ */ y("span", {
200
+ className: "text-sm text-text-secondary",
201
+ children: D("sessLink.password", "Password (optional)")
202
+ }), /* @__PURE__ */ y("input", {
203
+ value: z,
204
+ onChange: (e) => B(e.target.value),
205
+ type: "password",
206
+ autoComplete: "new-password",
207
+ placeholder: D("sessLink.noPassword", "no password"),
208
+ className: "mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary"
209
+ })]
210
+ }),
211
+ /* @__PURE__ */ y("div", {
212
+ className: "flex justify-end",
213
+ children: /* @__PURE__ */ b("button", {
214
+ type: "submit",
215
+ disabled: N,
216
+ className: "flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm text-action-primary-text hover:opacity-90 disabled:opacity-50",
217
+ children: [/* @__PURE__ */ y(h, { className: "size-4" }), D("sessLink.create", "Create share link")]
218
+ })
219
+ })
220
+ ]
221
+ })
222
+ ]
223
+ })
224
+ });
225
+ }, C = ({ children: e }) => /* @__PURE__ */ y("span", {
226
+ className: "inline-flex shrink-0 items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-primary",
227
+ children: e
228
+ });
229
+ //#endregion
230
+ export { S as SessionPublicLinkPanel };
231
+
232
+ //# sourceMappingURL=SessionPublicLinkPanel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SessionPublicLinkPanel.js","names":[],"sources":["../../../src/components/sessions/SessionPublicLinkPanel.tsx"],"sourcesContent":["import type { FC, FormEvent, ReactNode } from 'react';\nimport { useState } from 'react';\nimport { Link2, Keyboard, Eye, Lock, Copy, Trash2, Plus, X, Check } from 'lucide-react';\n\nimport { LoadingState, ErrorState } from '@/components/shared';\nimport { notify } from '@/lib/toast';\nimport { useI18n } from '@burdenoff/fe-libs/shared/providers/shell/I18nProvider';\nimport {\n useGetSessionShareLinksQuery,\n useCreateSessionShareLinkMutation,\n useRevokeSessionShareLinkMutation,\n type SessionShareLinkFieldsFragment,\n} from '@/generated/wspace-operations';\nimport { SessionSharePermission } from '@/generated/wspace-types';\n\ninterface SessionPublicLinkPanelProps {\n sessionId: string;\n sessionName: string;\n onClose: () => void;\n}\n\nconst EXPIRY_OPTIONS = [\n { label: '1 hour', hours: 1 },\n { label: '4 hours', hours: 4 },\n { label: '24 hours', hours: 24 },\n { label: 'No expiry', hours: 0 },\n];\n\n/**\n * SessionPublicLinkPanel — create and manage expiring share links to a live terminal session, with\n * the controls the live-session-share story promises but the generic member-share dialog dropped:\n * viewer vs interactive permission, an **expiry**, an optional **password**, and an optional\n * **usage limit**. Links point at the live `share/:token` page (the real collaborative terminal,\n * not an auth'd accept page). Backed by the existing `createSessionShareLink` mutation — no backend\n * change.\n */\nexport const SessionPublicLinkPanel: FC<SessionPublicLinkPanelProps> = ({\n sessionId,\n sessionName,\n onClose,\n}) => {\n const { t } = useI18n();\n const tr = (key: string, fallback: string): string => {\n const v = t(key);\n return v === key ? fallback : v;\n };\n\n const { data, loading, error, refetch } = useGetSessionShareLinksQuery({\n variables: { sessionId },\n fetchPolicy: 'cache-and-network',\n });\n const [createLink, { loading: creating }] = useCreateSessionShareLinkMutation();\n const [revokeLink] = useRevokeSessionShareLinkMutation();\n\n const [interactive, setInteractive] = useState(false);\n const [expiryHours, setExpiryHours] = useState(4);\n const [password, setPassword] = useState('');\n const [maxUses, setMaxUses] = useState('');\n const [copiedId, setCopiedId] = useState<string | null>(null);\n\n const links: SessionShareLinkFieldsFragment[] = data?.sessionShareLinks ?? [];\n const activeLinks = links.filter((l) => l.status === 'ACTIVE');\n\n const copy = async (url: string, id: string): Promise<void> => {\n try {\n await navigator.clipboard.writeText(url);\n setCopiedId(id);\n notify.success(tr('sessLink.copied', 'Link copied'));\n window.setTimeout(() => setCopiedId(null), 1500);\n } catch {\n notify.error(tr('sessLink.copyFailed', 'Could not copy — copy it manually'), url);\n }\n };\n\n const handleCreate = async (e: FormEvent): Promise<void> => {\n e.preventDefault();\n const parsedMax = maxUses.trim() ? Number.parseInt(maxUses.trim(), 10) : null;\n if (parsedMax !== null && (!Number.isFinite(parsedMax) || parsedMax < 1)) {\n notify.error(tr('sessLink.badMax', 'Max uses must be a positive number'));\n return;\n }\n try {\n const res = await createLink({\n variables: {\n input: {\n sessionId,\n permission: interactive ? SessionSharePermission.Interact : SessionSharePermission.View,\n expiresInHours: expiryHours > 0 ? expiryHours : null,\n password: password.trim() ? password.trim() : null,\n maxUses: parsedMax,\n },\n },\n });\n await refetch();\n const url = res.data?.createSessionShareLink.shareUrl;\n if (url) await copy(url, res.data?.createSessionShareLink.id ?? 'new');\n notify.success(\n tr('sessLink.created', 'Share link created'),\n interactive\n ? tr('sessLink.createdInteract', 'Recipient can request keyboard control')\n : tr('sessLink.createdView', 'Recipient can watch the terminal (view-only)')\n );\n setPassword('');\n setMaxUses('');\n } catch (err) {\n notify.error(tr('sessLink.createFailed', 'Could not create link'), (err as Error).message);\n }\n };\n\n const handleRevoke = async (id: string): Promise<void> => {\n try {\n await revokeLink({ variables: { id } });\n await refetch();\n notify.success(tr('sessLink.revoked', 'Link revoked — it no longer works'));\n } catch (err) {\n notify.error(tr('sessLink.revokeFailed', 'Could not revoke'), (err as Error).message);\n }\n };\n\n return (\n <div\n className=\"fixed inset-0 z-50 flex items-center justify-center bg-black/40 p-4\"\n onClick={onClose}\n >\n <div\n className=\"w-full max-w-lg rounded-lg border border-border-default bg-bg-surface p-5 shadow-lg\"\n onClick={(e) => e.stopPropagation()}\n >\n <div className=\"mb-4 flex items-start justify-between\">\n <div>\n <h3 className=\"flex items-center gap-2 text-lg font-semibold text-text-primary\">\n <Link2 className=\"size-5\" />\n {tr('sessLink.title', 'Share link')}\n </h3>\n <p className=\"mt-0.5 text-sm text-text-secondary\">{sessionName}</p>\n </div>\n <button\n type=\"button\"\n onClick={onClose}\n className=\"p-1 text-text-tertiary hover:text-text-primary\"\n aria-label={tr('common.close', 'Close')}\n >\n <X className=\"size-5\" />\n </button>\n </div>\n\n <div className=\"mb-4 space-y-2\">\n {loading && links.length === 0 ? (\n <LoadingState />\n ) : error ? (\n <ErrorState message={error.message} onRetry={() => void refetch()} />\n ) : activeLinks.length === 0 ? (\n <p className=\"text-sm text-text-secondary\">\n {tr('sessLink.none', 'No share links yet. Create one below.')}\n </p>\n ) : (\n <ul className=\"space-y-2\">\n {activeLinks.map((l) => (\n <li\n key={l.id}\n className=\"flex items-center gap-2 rounded-md border border-border-default px-3 py-2\"\n >\n <Badge>\n {l.permission === SessionSharePermission.Interact ? (\n <>\n <Keyboard className=\"size-3\" /> {tr('sessLink.interact', 'Interactive')}\n </>\n ) : (\n <>\n <Eye className=\"size-3\" /> {tr('sessLink.view', 'View')}\n </>\n )}\n </Badge>\n {l.hasPassword && (\n <Lock className=\"size-3.5 text-text-tertiary\" aria-label=\"password\" />\n )}\n <span className=\"flex-1 truncate font-mono text-xs text-text-secondary\">\n {l.shareUrl}\n </span>\n <span className=\"shrink-0 text-xs text-text-tertiary\">\n {l.useCount}\n {l.maxUses ? `/${l.maxUses}` : ''} {tr('sessLink.uses', 'uses')}\n </span>\n <button\n type=\"button\"\n onClick={() => void copy(l.shareUrl, l.id)}\n className=\"p-1 text-text-secondary hover:text-text-primary\"\n aria-label={tr('common.copy', 'Copy')}\n >\n {copiedId === l.id ? (\n <Check className=\"size-4 text-status-success-text\" />\n ) : (\n <Copy className=\"size-4\" />\n )}\n </button>\n <button\n type=\"button\"\n onClick={() => void handleRevoke(l.id)}\n className=\"p-1 text-text-secondary hover:text-action-danger-text\"\n aria-label={tr('common.revoke', 'Revoke')}\n >\n <Trash2 className=\"size-4\" />\n </button>\n </li>\n ))}\n </ul>\n )}\n </div>\n\n <form\n onSubmit={(e) => void handleCreate(e)}\n className=\"space-y-3 border-t border-border-default pt-4\"\n >\n <label className=\"flex cursor-pointer items-center gap-2 text-sm text-text-primary\">\n <input\n type=\"checkbox\"\n checked={interactive}\n onChange={(e) => setInteractive(e.target.checked)}\n className=\"rounded border-border-default\"\n />\n <Keyboard className=\"size-3.5\" />\n {tr(\n 'sessLink.allowInteract',\n 'Allow interactive control (recipient can request the keyboard)'\n )}\n </label>\n <div className=\"flex flex-col gap-3 sm:flex-row\">\n <label className=\"flex-1\">\n <span className=\"text-sm text-text-secondary\">\n {tr('sessLink.expiry', 'Expires')}\n </span>\n <select\n value={expiryHours}\n onChange={(e) => setExpiryHours(Number(e.target.value))}\n className=\"mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n >\n {EXPIRY_OPTIONS.map((o) => (\n <option key={o.label} value={o.hours}>\n {o.label}\n </option>\n ))}\n </select>\n </label>\n <label className=\"flex-1\">\n <span className=\"text-sm text-text-secondary\">\n {tr('sessLink.maxUses', 'Max uses (optional)')}\n </span>\n <input\n value={maxUses}\n onChange={(e) => setMaxUses(e.target.value)}\n inputMode=\"numeric\"\n placeholder={tr('sessLink.unlimited', 'unlimited')}\n className=\"mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </label>\n </div>\n <label className=\"block\">\n <span className=\"text-sm text-text-secondary\">\n {tr('sessLink.password', 'Password (optional)')}\n </span>\n <input\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n type=\"password\"\n autoComplete=\"new-password\"\n placeholder={tr('sessLink.noPassword', 'no password')}\n className=\"mt-1 w-full rounded-md border border-border-default bg-bg-surface px-3 py-2 text-sm text-text-primary\"\n />\n </label>\n <div className=\"flex justify-end\">\n <button\n type=\"submit\"\n disabled={creating}\n className=\"flex items-center gap-1.5 rounded-md bg-action-primary-bg px-3 py-2 text-sm text-action-primary-text hover:opacity-90 disabled:opacity-50\"\n >\n <Plus className=\"size-4\" />\n {tr('sessLink.create', 'Create share link')}\n </button>\n </div>\n </form>\n </div>\n </div>\n );\n};\n\nconst Badge: FC<{ children: ReactNode }> = ({ children }) => (\n <span className=\"inline-flex shrink-0 items-center gap-1 rounded-full bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-primary\">\n {children}\n </span>\n);\n"],"mappings":";;;;;;;;;;;AAqBA,IAAM,IAAiB;CACrB;EAAE,OAAO;EAAU,OAAO;EAAG;CAC7B;EAAE,OAAO;EAAW,OAAO;EAAG;CAC9B;EAAE,OAAO;EAAY,OAAO;EAAI;CAChC;EAAE,OAAO;EAAa,OAAO;EAAG;CACjC,EAUY,KAA2D,EACtE,cACA,gBACA,iBACI;CACJ,IAAM,EAAE,SAAM,GAAS,EACjB,KAAM,GAAa,MAA6B;EACpD,IAAM,IAAI,EAAE,EAAI;AAChB,SAAO,MAAM,IAAM,IAAW;IAG1B,EAAE,SAAM,YAAS,UAAO,eAAY,EAA6B;EACrE,WAAW,EAAE,cAAW;EACxB,aAAa;EACd,CAAC,EACI,CAAC,GAAY,EAAE,SAAS,OAAc,GAAmC,EACzE,CAAC,KAAc,GAAmC,EAElD,CAAC,GAAa,KAAkB,EAAS,GAAM,EAC/C,CAAC,GAAa,KAAkB,EAAS,EAAE,EAC3C,CAAC,GAAU,KAAe,EAAS,GAAG,EACtC,CAAC,GAAS,KAAc,EAAS,GAAG,EACpC,CAAC,GAAU,KAAe,EAAwB,KAAK,EAEvD,IAA0C,GAAM,qBAAqB,EAAE,EACvE,IAAc,EAAM,QAAQ,MAAM,EAAE,WAAW,SAAS,EAExD,IAAO,OAAO,GAAa,MAA8B;AAC7D,MAAI;AAIF,GAHA,MAAM,UAAU,UAAU,UAAU,EAAI,EACxC,EAAY,EAAG,EACf,EAAO,QAAQ,EAAG,mBA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