comfy-ts 2.17.0 → 2.17.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.
- package/dist/{ServeApp-BSA5yzxZ.js → ServeApp-qXcQfdgT.js} +3 -3
- package/dist/ServeApp-qXcQfdgT.js.map +1 -0
- package/dist/cli.js +58 -8
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +37 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +37 -11
- package/dist/index.js.map +1 -1
- package/dist/{run-run-DnaMLCFn.js → run-run-tg82jUIk.js} +3 -3
- package/dist/{run-run-DnaMLCFn.js.map → run-run-tg82jUIk.js.map} +1 -1
- package/dist/{run-serve-CbKxIu6i.js → run-serve-DaXzoVTS.js} +58 -12
- package/dist/run-serve-DaXzoVTS.js.map +1 -0
- package/dist/{run-tui-B0AQWbad.js → run-tui-Bw7BA75d.js} +3 -3
- package/dist/{run-tui-B0AQWbad.js.map → run-tui-Bw7BA75d.js.map} +1 -1
- package/dist/serve-web.js +56 -48
- package/dist/{state-C2oDiQ26.js → state-zTow5ucI.js} +38 -12
- package/dist/state-zTow5ucI.js.map +1 -0
- package/dist/web.js +37 -11
- package/dist/web.js.map +1 -1
- package/package.json +2 -2
- package/src/cli/bunHop.ts +49 -0
- package/src/cli/comfy-ts-cli.ts +4 -4
- package/src/cli/serve/run-serve.ts +51 -13
- package/src/cli/serve/web/components/App.tsx +2 -0
- package/src/cli/serve/web/components/DialogLayer.tsx +55 -0
- package/src/cli/serve/web/components/DraftTabs.tsx +8 -3
- package/src/cli/serve/web/components/PromptEnhancer.tsx +15 -9
- package/src/cli/serve/web/components/SideMenu.tsx +16 -8
- package/src/cli/serve/web/state/WebSt.ts +10 -1
- package/src/cli/serve/web/state/dialog.ts +59 -0
- package/src/cli/serve/web/state/keptLines.ts +1 -1
- package/src/cli/serve/web/styles.ts +8 -0
- package/src/litegraph/convertFlowToLiteGraphJSON.ts +38 -20
- package/src/promptEnhancers.ts +1 -1
- package/dist/ServeApp-BSA5yzxZ.js.map +0 -1
- package/dist/run-serve-CbKxIu6i.js.map +0 -1
- package/dist/state-C2oDiQ26.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-serve-CbKxIu6i.js","names":[],"sources":["../src/cli/serve/byteRange.ts","../src/cli/serve/startupPrint.ts","../src/cli/serve/webBundle.ts","../src/cli/serve/run-serve.ts"],"sourcesContent":["// HTTP byte ranges on binary replies. WebKit (Safari, and a WKWebView app window) plays audio and\n// video only from a server that answers `Range` with 206: without it a flac never starts there\nimport type { ServeReply } from 'src/cli/serve/ServeApp.ts'\n\n/** one range, the only kind media players send: `bytes=a-b`, `bytes=a-`, `bytes=-n` */\nfunction parseRange(header: string, size: number): { start: number; end: number } | 'unsatisfiable' | null {\n const m = /^bytes=(\\d*)-(\\d*)$/.exec(header.trim())\n if (m == null) return null\n const a = m[1] ?? ''\n const b = m[2] ?? ''\n if (a === '' && b === '') return null\n if (a === '') {\n const n = Number(b)\n if (n === 0) return 'unsatisfiable'\n return { start: Math.max(0, size - n), end: size - 1 }\n }\n const start = Number(a)\n const end = b === '' ? size - 1 : Math.min(Number(b), size - 1)\n if (start >= size || start > end) return 'unsatisfiable'\n return { start, end }\n}\n\n/** a whole 200 binary reply gets its length and `accept-ranges`; a range request gets 206 with\n * those bytes, or 416 past the end. Text replies and errors pass through untouched */\nexport function withByteRange(reply: ServeReply, req: { method: string; range?: string }): ServeReply {\n if (req.method !== 'GET' || reply.status !== 200 || typeof reply.body === 'string') return reply\n const size = reply.body.length\n const base = { ...reply.headers, 'accept-ranges': 'bytes' }\n const range = req.range == null ? null : parseRange(req.range, size)\n if (range == null) return { ...reply, headers: { ...base, 'content-length': String(size) } }\n if (range === 'unsatisfiable')\n return {\n status: 416,\n contentType: reply.contentType,\n body: new Uint8Array(0),\n headers: { ...base, 'content-range': `bytes */${size}` },\n }\n return {\n status: 206,\n contentType: reply.contentType,\n body: reply.body.subarray(range.start, range.end + 1),\n headers: {\n ...base,\n 'content-range': `bytes ${range.start}-${range.end}/${size}`,\n 'content-length': String(range.end - range.start + 1),\n },\n }\n}\n","// what `comfy-ts serve` prints on launch. PURE: takes the already-described\n// modules and gives back lines, so tests read the layout without a server and\n// without a tty. Colors are a parameter, never a probe done in here.\nimport { ansi, stripAnsi } from 'src/utils/ansi.ts'\n\nexport type StartupModule = {\n key: string\n hostId: string\n /** the POST routes, ready to print */\n routes: string[]\n /** one line per var (renderDescriptorLine) */\n varLines: string[]\n}\n\nexport type StartupInput = {\n modules: StartupModule[]\n bind: string\n port: number\n /** every address this bind answers on (reachableAddresses) */\n urls: string[]\n color: boolean\n}\n\nconst RULE_WIDTH = 64\n\n/** 100.64.0.0/10 is the CGNAT range tailscale hands out — worth naming, it is the one\n * you want when the phone is not on the same wifi */\nexport function addressNote(addr: string): string {\n const octets = addr.split('.').map(Number)\n const second = octets[1] ?? 0\n if (octets[0] === 100 && second >= 64 && second <= 127) return 'tailnet'\n if (addr === '127.0.0.1' || addr === 'localhost') return 'this machine'\n return ''\n}\n\nfunction paint(color: boolean): {\n title: (s: string) => string\n name: (s: string) => string\n dim: (s: string) => string\n url: (s: string) => string\n warn: (s: string) => string\n} {\n const id = (s: string): string => s\n if (!color) return { title: id, name: id, dim: id, url: id, warn: id }\n return {\n title: (s) => ansi.bold(s),\n name: (s) => ansi.bold.cyan(s),\n dim: (s) => ansi.gray(s),\n url: (s) => ansi.green(s),\n warn: (s) => ansi.yellow(s),\n }\n}\n\n/** a box that stays square whatever the colors do: padding measures the VISIBLE text */\nexport function boxed(lines: string[], p: { color: boolean } = { color: false }): string[] {\n const width = Math.max(...lines.map((l) => stripAnsi(l).length), 0)\n const edge = (l: string, r: string): string => `${l}${'─'.repeat(width + 2)}${r}`\n const border = (s: string): string => (p.color ? ansi.gray(s) : s)\n return [\n border(edge('┌', '┐')),\n ...lines.map((l) => `${border('│')} ${l}${' '.repeat(width - stripAnsi(l).length)} ${border('│')}`),\n border(edge('└', '┘')),\n ]\n}\n\nexport function renderStartupLines(p: StartupInput): string[] {\n const c = paint(p.color)\n const loopback = p.bind === '127.0.0.1' || p.bind === 'localhost' || p.bind === '::1'\n const primary = `http://${p.urls[0] ?? p.bind}:${p.port}/`\n const out: string[] = []\n\n const count = `${p.modules.length} workflow${p.modules.length === 1 ? '' : 's'}`\n out.push(c.title(`comfy-ts serve · ${count} · ${primary}`))\n // said on EVERY launch, loopback included: cross-origin is open, so the exposure is not\n // limited to who can reach the port. any page in your browser can reach 127.0.0.1 too\n out.push(\n c.warn(\n loopback\n ? '⚠️ no auth: this API runs workflows, and any page open in your browser can call it'\n : `⚠️ bound to ${p.bind}, no auth: anyone on this network can run workflows on your ComfyUI host`,\n ),\n )\n\n for (const mod of p.modules) {\n out.push('', c.dim('─'.repeat(RULE_WIDTH)))\n out.push(`${c.name(mod.key)} ${c.dim(`host: ${mod.hostId}`)}`)\n for (const route of mod.routes) out.push(c.dim(` POST ${route}`))\n out.push(...mod.varLines)\n }\n out.push(c.dim('─'.repeat(RULE_WIDTH)), '')\n\n // the box is the last thing on screen: where the ui is, and how to reach it elsewhere\n const box: string[] = [\n `${c.title('web ui')} ${c.url(primary)}`,\n `${c.dim('json api')} ${c.dim(`${primary}drafts`)}`,\n ]\n if (p.urls.length > 1) {\n box.push('', c.dim('also reachable at:'))\n for (const url of p.urls.slice(1)) {\n const note = addressNote(url)\n box.push(` ${c.url(`http://${url}:${p.port}/`)}${note === '' ? '' : c.dim(` (${note})`)}`)\n }\n }\n if (loopback) {\n box.push('', c.dim('to open it from your phone or another machine:'))\n box.push(c.dim(` comfy-ts serve --host 0.0.0.0 (--bind is the same flag)`))\n box.push(c.dim(' every reachable url gets printed here, tailnet included'))\n }\n out.push(...boxed(box, { color: p.color }))\n return out\n}\n","// web ui bundle resolution (architecture item 12, web ui): prebuilt\n// dist/serve-web.js next to the running module, else an in-memory Bun.build\n// from source (src/ ships in the npm tarball), rebuilt when a source file changes,\n// else null — the api must serve without a UI, never crash\nimport { existsSync, readdirSync, readFileSync, statSync } from 'node:fs'\nimport { fileURLToPath } from 'node:url'\nimport { dirname, join } from 'pathe'\n\nconst WEB_ENTRY = 'src/cli/serve/web/main.tsx'\n\n/** nearest dir upward holding a package.json — the comfy-ts package root, from dist/ and src/ alike */\nfunction packageRoot(fromDir: string): string | null {\n let dir = fromDir\n while (true) {\n if (existsSync(join(dir, 'package.json'))) return dir\n const parent = dirname(dir)\n if (parent === dir) return null\n dir = parent\n }\n}\n\n/** bundle the web app to one browser file. Bun.build reads no tsconfig, so the\n * house 'src/...' absolute imports resolve through the same plugin shape as\n * tests/web-bundle.test.ts */\nexport async function buildWebJsText(pkgRoot: string): Promise<string> {\n const result = await Bun.build({\n entrypoints: [join(pkgRoot, WEB_ENTRY)],\n target: 'browser',\n minify: true,\n throw: false,\n define: { 'process.env.NODE_ENV': '\"production\"' },\n plugins: [\n {\n name: 'repo-src-paths',\n setup(build) {\n build.onResolve({ filter: /^src\\// }, (args) => ({ path: join(pkgRoot, args.path) }))\n },\n },\n ],\n })\n if (!result.success || result.outputs[0] == null)\n throw new Error(`web ui bundle failed:\\n${result.logs.map((l) => String(l)).join('\\n')}`)\n return await result.outputs[0].text()\n}\n\n/** changes whenever a file under `dir` is added, removed or rewritten. The web bundle reaches\n * outside web/ (vars, protocol types), so the whole src/ tree is the input: ~300 stats, a few ms */\nexport function sourceSignature(dir: string): string {\n let count = 0\n let newest = 0\n let bytes = 0\n const walk = (d: string): void => {\n for (const entry of readdirSync(d, { withFileTypes: true })) {\n const abs = join(d, entry.name)\n if (entry.isDirectory()) walk(abs)\n else if (entry.isFile()) {\n const st = statSync(abs)\n count += 1\n bytes += st.size\n newest = Math.max(newest, st.mtimeMs)\n }\n }\n }\n walk(dir)\n return `${count}:${bytes}:${newest}`\n}\n\nlet prebuiltJs: string | null = null\nlet fromSource: { signature: string; js: Promise<string | null> } | null = null\n\n/** the runtime resolution chain; every miss logs loud and degrades to api-only. Called on every\n * page load: a prebuilt file is read once, a source build is redone only when src/ changed, so\n * an edited panel shows on refresh under `bun --watch`, which never sees the bundled files */\nexport async function loadOrBuildWebJs(): Promise<string | null> {\n const here = dirname(fileURLToPath(import.meta.url))\n const prebuilt = join(here, 'serve-web.js')\n if (prebuiltJs != null) return prebuiltJs\n if (existsSync(prebuilt)) {\n prebuiltJs = readFileSync(prebuilt, 'utf8')\n return prebuiltJs\n }\n if (typeof Bun === 'undefined') {\n console.error('[serve] 🔴 no serve-web.js next to the cli and not running under bun — api only, no web ui')\n return null\n }\n const pkgRoot = packageRoot(here)\n if (pkgRoot == null || !existsSync(join(pkgRoot, WEB_ENTRY))) {\n console.error(`[serve] 🔴 web ui source not found (looked for ${WEB_ENTRY} above ${here}) — api only, no web ui`)\n return null\n }\n const signature = sourceSignature(join(pkgRoot, 'src'))\n if (fromSource?.signature !== signature) {\n const rebuilt = fromSource != null\n // a failed build stays failed for this signature: logged once, retried on the next edit\n fromSource = {\n signature,\n js: buildWebJsText(pkgRoot).then(\n (js) => {\n if (rebuilt) console.log('[serve] web ui rebuilt from source')\n return js\n },\n (e: unknown) => {\n console.error('[serve] 🔴 web ui bundle failed — api only until the next edit:', e)\n return null\n },\n ),\n }\n }\n return await fromSource.js\n}\n","// `comfy-ts serve [dir | module.cflow.ts] [--port N] [--host ADDR]`\n// drafts as a local HTTP generation API — agent/architecture.md item 12\nimport { statSync } from 'node:fs'\nimport { createServer, type IncomingMessage, type ServerResponse } from 'node:http'\nimport { networkInterfaces } from 'node:os'\nimport { pathToFileURL } from 'node:url'\nimport { dirname, resolve } from 'pathe'\nimport { scanCflowFiles } from 'src/cli/tui/discoverWorkflows.ts'\nimport { findDefinedWorkflow } from 'src/cli/tui/findDefinedWorkflow.ts'\nimport { draftKeyForFile } from 'src/cli/tui/state/DraftsSt.ts'\nimport { describeVar, renderDescriptorLine } from 'src/cli/serve/describeVar.ts'\nimport { ServeApp, type ServeModule } from 'src/cli/serve/ServeApp.ts'\nimport { withByteRange } from 'src/cli/serve/byteRange.ts'\nimport { renderStartupLines } from 'src/cli/serve/startupPrint.ts'\nimport { loadOrBuildWebJs } from 'src/cli/serve/webBundle.ts'\nimport { colorsAvailable } from 'src/utils/ansi.ts'\nimport { extractErrorMessage } from 'src/utils/extractErrorMessage.ts'\n\nconst DEFAULT_PORT = 8288\nconst BODY_CAP = 10_000_000\n/** a video dropped on a media var rides POST /upload as base64 json: ~200 MB of file */\nexport const UPLOAD_BODY_CAP = 280_000_000\n\nexport function parseArgs(args: string[]): { target?: string; port: number; bind: string } | { error: string } {\n let target: string | undefined\n let port = DEFAULT_PORT\n let bind = '127.0.0.1'\n for (let i = 0; i < args.length; i++) {\n const a = args[i]\n if (a === '--port') {\n const n = Number(args[++i])\n if (!Number.isInteger(n) || n <= 0 || n > 65535) return { error: `--port expects 1..65535, got '${args[i]}'` }\n port = n\n } else if (a === '--host' || a === '--bind') {\n // --host is the spelling; --bind stays an alias so an old command line keeps working\n const b = args[++i]\n if (b == null) return { error: `${a} expects an address (0.0.0.0 to reach it from another machine)` }\n bind = b\n } else if (a != null && a.startsWith('--')) return { error: `unknown flag '${a}'` }\n else if (a != null) {\n if (target != null) return { error: `one target only (got '${target}' and '${a}')` }\n target = a\n }\n }\n return { target, port, bind }\n}\n\n/** node:http glue around ServeApp.handle — exported so tests can drive a real socket */\n/** open CORS, because a browser page IS a first-class client here: the web entry runs the\n * library in a tab and rides serve as its bridge to hosts that send no CORS headers\n * (examples/web is on another port by construction). The cost is real and stated at launch:\n * with no auth, any page you visit can drive this api. That is the same trade as the port\n * being open at all, so it is said out loud rather than hidden behind a flag. */\nexport function makeRequestListener(app: ServeApp): (req: IncomingMessage, res: ServerResponse) => void {\n const cors = {\n 'access-control-allow-origin': '*',\n 'access-control-allow-methods': 'GET, POST, PUT, DELETE, OPTIONS',\n 'access-control-allow-headers': 'content-type, accept',\n }\n return (req, res) => {\n const cap = req.method === 'POST' && (req.url ?? '').split('?')[0] === '/upload' ? UPLOAD_BODY_CAP : BODY_CAP\n const chunks: Buffer[] = []\n let size = 0\n let overflow = false\n req.on('error', (e) => console.error(`[serve] request stream error: ${extractErrorMessage(e)}`))\n req.on('data', (c: Buffer) => {\n if (overflow) return\n size += c.length\n if (size > cap) {\n // answer NOW: a destroyed request never emits 'end'\n overflow = true\n res.writeHead(413, { 'content-type': 'application/json', ...cors })\n res.end(JSON.stringify({ error: 'payload too large' }), () => req.destroy())\n } else chunks.push(c)\n })\n req.on('end', () => {\n if (overflow) return\n if (req.method === 'OPTIONS') {\n res.writeHead(204, cors)\n res.end()\n return\n }\n app.handle({\n method: req.method ?? 'GET',\n url: req.url ?? '/',\n accept: req.headers.accept,\n body: Buffer.concat(chunks).toString('utf8'),\n })\n .then((whole) => {\n const range = req.headers.range\n const reply = withByteRange(whole, { method: req.method ?? 'GET', range })\n res.writeHead(reply.status, { 'content-type': reply.contentType, ...reply.headers, ...cors })\n res.end(reply.body)\n })\n .catch((e: unknown) => {\n // handle() catches internally; this guards the response write itself\n console.error(`[serve] response write failed: ${extractErrorMessage(e)}`)\n res.destroy()\n })\n })\n }\n}\n\nexport async function runServe(args: string[]): Promise<number> {\n const parsed = parseArgs(args)\n if ('error' in parsed) {\n console.error(`[comfy-ts serve] ${parsed.error}`)\n return 1\n }\n\n // discovery: explicit file → that module only; dir/no-arg → scan, WITHOUT\n // the bundled examples (serve is for the user's tuned drafts)\n const target = resolve(parsed.target ?? '.')\n let files: string[]\n try {\n files = statSync(target).isDirectory() ? scanCflowFiles(target) : [target]\n } catch {\n console.error(`[comfy-ts serve] no such file or directory: ${target}`)\n return 1\n }\n if (files.length === 0) {\n console.error(`[comfy-ts serve] no *.cflow.ts modules under ${target}`)\n return 1\n }\n\n const modules: ServeModule[] = []\n const loadErrors: Record<string, string> = {}\n for (const file of files) {\n try {\n const mod: Record<string, unknown> = await import(pathToFileURL(file).href)\n const dw = findDefinedWorkflow(mod)\n if (dw == null) throw new Error('exports no DefinedWorkflow')\n const key = draftKeyForFile(file)\n const clash = modules.find((m) => m.key === key)\n if (clash != null) throw new Error(`module key '${key}' already taken by ${clash.file}`)\n modules.push({ key, file, dw })\n } catch (e) {\n loadErrors[file] = extractErrorMessage(e)\n console.error(`[comfy-ts serve] ✗ ${file}: ${loadErrors[file]}`)\n }\n }\n if (modules.length === 0) {\n console.error('[comfy-ts serve] every module failed to load — nothing to serve')\n return 1\n }\n\n const app = new ServeApp(modules, {\n loadErrors,\n webJs: loadOrBuildWebJs,\n // the modules registered comfyts on import: its root holds `.comfy-ts/`\n workspace: typeof comfyts === 'undefined' ? process.cwd() : comfyts.rootPath,\n root: statSync(target).isDirectory() ? target : dirname(target),\n })\n printStartup(app, parsed.bind, parsed.port)\n\n const server = createServer(makeRequestListener(app))\n\n server.on('error', (e) => {\n console.error(`[comfy-ts serve] server error: ${extractErrorMessage(e)}`)\n process.exitCode = 1\n server.close()\n })\n server.listen(parsed.port, parsed.bind)\n\n // stays up until the process is interrupted or the server dies\n return new Promise<number>((resolveExit) => {\n server.on('close', () => resolveExit(typeof process.exitCode === 'number' ? process.exitCode : 0))\n })\n}\n\nexport type Nic = { address: string; family: string | number; internal: boolean }\n\n/** the addresses this bind actually answers on. `0.0.0.0` means every interface, so printing\n * only that back is useless: the LAN ip and the tailnet 100.x are the urls a phone can open */\nexport function reachableAddresses(bind: string, nics: Record<string, Nic[] | undefined>): string[] {\n if (bind !== '0.0.0.0' && bind !== '::') return [bind]\n const found: string[] = []\n for (const list of Object.values(nics)) {\n for (const nic of list ?? []) {\n // node reports family as 'IPv4' or 4 depending on the version\n if (nic.internal || (nic.family !== 'IPv4' && nic.family !== 4)) continue\n found.push(nic.address)\n }\n }\n return ['127.0.0.1', ...found]\n}\n\nfunction printStartup(app: ServeApp, bind: string, port: number): void {\n const base = `http://${bind}:${port}`\n const color = colorsAvailable()\n const lines = renderStartupLines({\n bind,\n port,\n urls: reachableAddresses(bind, networkInterfaces()),\n color,\n modules: app.modules.map((mod) => {\n const entries = mod.dw.entries()\n const nameWidth = Math.max(...entries.map(([n]) => n.length), 4)\n return {\n key: mod.key,\n hostId: mod.dw.host.data.id,\n routes: app\n .draftsFor(mod)\n .map((d) => `${base}/generate/${encodeURIComponent(mod.key)}/${encodeURIComponent(d)}`),\n varLines: entries.map(([name, varDef]) =>\n renderDescriptorLine(name, describeVar(varDef), nameWidth, color),\n ),\n }\n }),\n })\n for (const line of lines) console.log(line)\n}\n"],"mappings":";;;;;;;;;;AAKA,SAAS,WAAW,QAAgB,MAAuE;CACxG,MAAM,IAAI,sBAAsB,KAAK,OAAO,KAAK,CAAC;CAClD,IAAI,KAAK,MAAM,OAAO;CACtB,MAAM,IAAI,EAAE,MAAM;CAClB,MAAM,IAAI,EAAE,MAAM;CAClB,IAAI,MAAM,MAAM,MAAM,IAAI,OAAO;CACjC,IAAI,MAAM,IAAI;EACX,MAAM,IAAI,OAAO,CAAC;EAClB,IAAI,MAAM,GAAG,OAAO;EACpB,OAAO;GAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC;GAAG,KAAK,OAAO;EAAE;CACxD;CACA,MAAM,QAAQ,OAAO,CAAC;CACtB,MAAM,MAAM,MAAM,KAAK,OAAO,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,OAAO,CAAC;CAC9D,IAAI,SAAS,QAAQ,QAAQ,KAAK,OAAO;CACzC,OAAO;EAAE;EAAO;CAAI;AACvB;;;AAIA,SAAgB,cAAc,OAAmB,KAAqD;CACnG,IAAI,IAAI,WAAW,SAAS,MAAM,WAAW,OAAO,OAAO,MAAM,SAAS,UAAU,OAAO;CAC3F,MAAM,OAAO,MAAM,KAAK;CACxB,MAAM,OAAO;EAAE,GAAG,MAAM;EAAS,iBAAiB;CAAQ;CAC1D,MAAM,QAAQ,IAAI,SAAS,OAAO,OAAO,WAAW,IAAI,OAAO,IAAI;CACnE,IAAI,SAAS,MAAM,OAAO;EAAE,GAAG;EAAO,SAAS;GAAE,GAAG;GAAM,kBAAkB,OAAO,IAAI;EAAE;CAAE;CAC3F,IAAI,UAAU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