@inkeep/open-knowledge 0.0.0-dev-20260424205527 → 0.0.0-dev-20260424235440
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/assets/skills/open-knowledge/SKILL.md +5 -0
- package/dist/cli.mjs +64 -61
- package/dist/constants-Bp2eH26E.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-i7vPAWv4.mjs → init-0LxWJ-6l.mjs} +2 -2
- package/dist/init-CQtHg31y.mjs +1 -0
- package/dist/init-CUmfZczR.mjs +5 -0
- package/dist/init-EmyViDSm.mjs +1 -0
- package/dist/{loader-CEfLKIxb.mjs → loader-5fUYhvT7.mjs} +2 -2
- package/dist/loader-CLKYIpRM.mjs +1 -0
- package/dist/paths-Bmv6OTgc.mjs +1 -0
- package/dist/{paths-BN0gQKmX.mjs → paths-D7eyE9c-.mjs} +2 -2
- package/dist/preview-Bwvil0xG.mjs +1 -0
- package/dist/{preview-BmSvc-WZ.mjs → preview-DW48ZUVb.mjs} +2 -2
- package/dist/public/assets/ActivityModeContent-DER5Nogg.js +2 -0
- package/dist/public/assets/ActivityPanelDiffView-DVyTW-J7.js +13 -0
- package/dist/public/assets/ActivityPanelDiffView-legcy4jI.css +1 -0
- package/dist/public/assets/DocumentContext--jj-O3yz.js +5 -0
- package/dist/public/assets/GraphPanel-CBqnoz3m.js +46 -0
- package/dist/public/assets/McpConsentDialogBody-D_7y-PBs.js +1 -0
- package/dist/public/assets/{panel-jSlO39XJ.js → PageListContext-DdGQSVEJ.js} +76 -76
- package/dist/public/assets/SourceEditor-C2oyeI25.js +3 -0
- package/dist/public/assets/agent-presence-BQu9C0ej.js +1 -0
- package/dist/public/assets/button-B1XQHQcX.js +1 -0
- package/dist/public/assets/clipboard-DRhtxu43.js +32 -0
- package/dist/public/assets/compiler-runtime-Y11fyRVL.js +1 -0
- package/dist/public/assets/dialog-xzAlDsHy.js +45 -0
- package/dist/public/assets/{dist-Crc5NE1l.js → dist-BqO6NfD-.js} +1 -1
- package/dist/public/assets/{dist-DRn8lLJe.js → dist-CgLbXgrr.js} +1 -1
- package/dist/public/assets/{dist-BCB7v76S.js → dist-D2wwoXzm.js} +1 -1
- package/dist/public/assets/{dist-DF16X4DB.js → dist-DR1MrLJC.js} +1 -1
- package/dist/public/assets/{dist-Dx3W_u4i.js → dist-DeDgmJv2.js} +1 -1
- package/dist/public/assets/{dist-CjujjdB3.js → dist-DlS42TIP.js} +1 -1
- package/dist/public/assets/{dist-CDhLtkvx.js → dist-GlH2KPqY.js} +1 -1
- package/dist/public/assets/index-CIIADYsi.css +1 -0
- package/dist/public/assets/index-D_7iKKj-.js +27 -0
- package/dist/public/assets/panel-rtdrPcLu.js +1 -0
- package/dist/public/assets/{telemetry-impl-D_lLX0fS.js → telemetry-impl-BTqkcpTj.js} +2 -2
- package/dist/public/assets/toggle-group-B86VAmbm.js +1 -0
- package/dist/public/assets/tooltip-C2q723j6.js +1 -0
- package/dist/public/index.html +16 -11
- package/dist/src-CO-0JWV1.mjs +1 -0
- package/dist/src-DNH9XQcP.mjs +1 -0
- package/dist/{src-DBQiBMMB.mjs → src-H34RCSr9.mjs} +28 -18
- package/dist/start-D22sG9zf.mjs +1 -0
- package/dist/{start-J6AfuX7h.mjs → start-DbI7KgzR.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-Dqmeg2oi.mjs +0 -2
- package/dist/init-3UxRGVAs.mjs +0 -1
- package/dist/init-AmgsVReV.mjs +0 -1
- package/dist/init-DIbZ0Udv.mjs +0 -5
- package/dist/loader-CQUrJ6T-.mjs +0 -1
- package/dist/paths-HWNY8fZl.mjs +0 -1
- package/dist/preview-DzHGOZjd.mjs +0 -1
- package/dist/public/assets/GraphPanel-CMj_CKRD.js +0 -46
- package/dist/public/assets/McpConsentDialogBody-BpxsNx0A.js +0 -1
- package/dist/public/assets/SourceEditor-BSUZdSkZ.js +0 -3
- package/dist/public/assets/button-D7O9FEkM.js +0 -1
- package/dist/public/assets/clipboard-B0g7jEdf.js +0 -36
- package/dist/public/assets/dialog-DzmWgC4p.js +0 -45
- package/dist/public/assets/index-Bnp3jcJM.js +0 -27
- package/dist/public/assets/index-tR5M38z1.css +0 -1
- package/dist/public/assets/toggle-group-D0c1wSh_.js +0 -1
- package/dist/src-DjVVQCyp.mjs +0 -1
- package/dist/src-zcKwR9RH.mjs +0 -1
- package/dist/start-Dta5BSHL.mjs +0 -1
- /package/dist/public/assets/{__vite-browser-external-BFtnoaxY.js → __vite-browser-external-Dz2JgTKm.js} +0 -0
- /package/dist/public/assets/{go-BL7jA4zR.js → go-DatQmDtN.js} +0 -0
- /package/dist/public/assets/{shell-DKDblpGA.js → shell-7yok6dsz.js} +0 -0
- /package/dist/public/assets/{w3c-keyname-B56rf6AD.js → w3c-keyname-CSlwavrd.js} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e,i as t,l as n,o as r,s as i,t as a}from"./init-
|
|
1
|
+
import{c as e,i as t,l as n,o as r,s as i,t as a}from"./init-CUmfZczR.mjs";import{n as o,r as s}from"./loader-5fUYhvT7.mjs";import"./src-DNH9XQcP.mjs";export{e as ALL_EDITOR_IDS,s as ConfigSchema,n as EDITOR_TARGETS,a as detectInstalledEditors,o as loadConfig,t as readExistingMcpEntry,r as writeEditorMcpConfig,i as writeUserMcpConfigs};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e,t}from"./constants-
|
|
1
|
+
import{n as e,t}from"./constants-Bp2eH26E.mjs";import{O as n}from"./src-CB-sXsMW.mjs";import{existsSync as r,mkdirSync as i,readFileSync as a,writeFileSync as o}from"node:fs";import{join as s,resolve as c}from"node:path";const l=`# Open Knowledge — workspace configuration
|
|
2
2
|
#
|
|
3
3
|
# This file overrides built-in defaults for this workspace. Every key below
|
|
4
4
|
# is commented out and shows its current default value. Uncomment any key
|
|
@@ -117,4 +117,4 @@ import{n as e,t}from"./constants-Dqmeg2oi.mjs";import{O as n}from"./src-CB-sXsMW
|
|
|
117
117
|
|
|
118
118
|
`)?`
|
|
119
119
|
`:``}${i}`,`utf-8`),`appended`)}const f=[{name:`.gitignore`,content:`${t}/\nserver.lock\nui.lock\nsync-state.json\n`},{name:e,content:l}];function p(e){let r=c(e,n),a=[],o=[];i(r,{recursive:!0}),i(s(r,t),{recursive:!0});for(let e of f)u(s(r,e.name),e.content)?a.push(e.name):o.push(e.name);return{created:a,skipped:o}}export{p as n,d as t};
|
|
120
|
-
//# sourceMappingURL=init-
|
|
120
|
+
//# sourceMappingURL=init-0LxWJ-6l.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e,i as t,n,o as r,r as i,s as a,t as o}from"./init-CUmfZczR.mjs";export{o as detectInstalledEditors,n as formatInitResult,i as initCommand,t as readExistingMcpEntry,e as runInit,r as writeEditorMcpConfig,a as writeUserMcpConfigs};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{r as e}from"./constants-Bp2eH26E.mjs";import{O as t}from"./src-CB-sXsMW.mjs";import{i as n,n as r,r as i,t as a}from"./src-H34RCSr9.mjs";import{n as o}from"./init-0LxWJ-6l.mjs";import{t as s}from"./preview-DW48ZUVb.mjs";import{s as c,t as l}from"./colors-Cmha5EZJ.mjs";import{t as u}from"./is-object-7k010cEq.mjs";import{Command as d}from"commander";import{existsSync as f,mkdirSync as p,readFileSync as m,writeFileSync as h}from"node:fs";import{homedir as g}from"node:os";import{basename as _,dirname as v,join as y,posix as b,relative as x,resolve as S,sep as C,win32 as w}from"node:path";import{parse as ee,stringify as te}from"smol-toml";const T=[`claude`,`claude-desktop`,`cursor`,`vscode`,`windsurf`,`codex`],ne=[`@inkeep/open-knowledge`,`mcp`],re={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`};function E(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=S(e);if(_(t)===`cli.mjs`&&_(v(t))===`dist`)return t;let n=t.split(C),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return y(i.length===0?C:i.join(C),`packages`,`cli`,`dist`,`cli.mjs`)}function D(e={}){return e.cliPath?{command:e.cliPath,args:[`mcp`]}:e.mode===`dev`?{command:`node`,args:[E(e.cliEntryPath),`mcp`],env:{...re}}:{command:`npx`,args:[...ne]}}function O(e){return e===`win32`?w:b}function k(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env,i=O(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function A(e={}){let t=e.platformName??process.platform,n=e.home??g();return O(t).join(n,`.claude.json`)}function j(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env;if(t===`darwin`)return b.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??w.join(n,`AppData`,`Roaming`);return w.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function M(e={}){let t=e.platformName??process.platform,n=e.home??g();return O(t).join(n,`.cursor`,`mcp.json`)}function N(e={}){return O(e.platformName??process.platform).join(k(e),`Code`,`User`,`mcp.json`)}function P(e={}){let t=e.platformName??process.platform,n=e.home??g();return O(t).join(n,`.codeium`,`windsurf`,`mcp_config.json`)}function F(e={}){let t=e.platformName??process.platform,n=e.home??g();return(e.env??process.env).CODEX_HOME??O(t).join(n,`.codex`)}function I(e={}){return O(e.platformName??process.platform).join(F(e),`config.toml`)}function L(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t))return e.length===t.length&&e.every((e,n)=>L(e,t[n]));if(u(e)&&u(t)){let n=Object.keys(e).sort(),r=Object.keys(t).sort();return n.length===r.length&&n.every((e,t)=>e===r[t])&&n.every(n=>L(e[n],t[n]))}return!1}function R(e,t){return Object.entries(t).every(([t,n])=>L(e[t],n))}function ie(e,t){return{...e,...t}}function z(e){return{...e,isCompatible(t,n,r){return R(t,e.buildEntry(n,r))},mergeManagedFields(t,n,r){return ie(t,e.buildEntry(n,r))}}}const B={claude:z({id:`claude`,label:`Claude Code`,configPath:(e,t)=>A({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>e,buildEntry:(e,t)=>D(t),scope:`global`,detectPath:(e,t)=>y(t??g(),`.claude`),legacyProjectConfigPath:e=>y(e,`.mcp.json`)}),"claude-desktop":z({id:`claude-desktop`,label:`Claude Desktop`,configPath:(e,t)=>j({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>e,buildEntry:(e,t)=>D(t),scope:`global`,detectPath:(e,t)=>v(j({home:t}))}),cursor:z({id:`cursor`,label:`Cursor`,configPath:(e,t)=>M({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>e,buildEntry:(e,t)=>D(t),scope:`global`,detectPath:(e,t)=>v(M({home:t})),legacyProjectConfigPath:e=>y(e,`.cursor`,`mcp.json`)}),vscode:z({id:`vscode`,label:`VS Code`,configPath:(e,t)=>N({home:t}),format:`json`,topLevelKey:`servers`,serverName:()=>e,buildEntry:(e,t)=>({type:`stdio`,...D(t)}),scope:`global`,detectPath:(e,t)=>v(N({home:t})),legacyProjectConfigPath:e=>y(e,`.vscode`,`mcp.json`)}),windsurf:z({id:`windsurf`,label:`Windsurf`,configPath:(e,t)=>P({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>e,buildEntry:(e,t)=>D(t),scope:`global`,detectPath:(e,t)=>v(P({home:t}))}),codex:z({id:`codex`,label:`Codex`,configPath:(e,t)=>I({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>e,buildEntry:(e,t)=>D(t),scope:`global`,detectPath:(e,t)=>v(I({home:t})),legacyProjectConfigPath:e=>y(e,`.codex`,`config.toml`)})};function V(e){let t=e.filter(e=>!(e in B));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${T.join(`, `)}`);return e.map(e=>B[e])}function H(e){if(!f(e))return{};let t=m(e,`utf-8`).trim();if(t===``)return{};try{let n=JSON.parse(t);if(u(n))return n;throw Error(`${e} root must be a JSON object`)}catch(t){throw t instanceof SyntaxError?Error(`${e} contains invalid JSON: ${t.message}`):t}}function U(e){if(!f(e))return{};let t=m(e,`utf-8`).trim();if(t===``)return{};try{let n=ee(t);if(u(n))return n;throw Error(`${e} root must be a TOML table`)}catch(t){throw Error(`${e} contains invalid TOML: ${t instanceof Error?t.message:String(t)}`)}}function W(e,t){p(v(e),{recursive:!0}),h(e,`${JSON.stringify(t,null,2)}\n`,`utf-8`)}function G(e,t){p(v(e),{recursive:!0});let n=te(t);h(e,n.endsWith(`
|
|
2
|
+
`)?n:`${n}\n`,`utf-8`)}const K=`0.0.1`,q=`open-knowledge-ui`;function J(e,t={}){let n=y(e,`.claude`,`launch.json`),r=t.mode===`dev`?{name:q,runtimeExecutable:`node`,runtimeArgs:[E(t.cliEntryPath),`ui`],port:3e3}:{name:q,runtimeExecutable:`npx`,runtimeArgs:[`@inkeep/open-knowledge`,`ui`],port:3e3};try{if(!f(n))return p(v(n),{recursive:!0}),h(n,`${JSON.stringify({version:K,configurations:[r]},null,2)}\n`,`utf-8`),{action:`created`,configPath:n};let e=m(n,`utf-8`).trim(),t=e?JSON.parse(e):{};if(!u(t))return{action:`failed`,configPath:n,error:`launch.json root is not an object`};let i=Array.isArray(t.configurations)?t.configurations:[],a=i.findIndex(e=>u(e)&&e.name===q);a>=0?i[a]=r:i.push(r);let o={...t,version:t.version??K,configurations:i};return h(n,`${JSON.stringify(o,null,2)}\n`,`utf-8`),{action:a>=0?`merged`:`created`,configPath:n}}catch(e){return{action:`failed`,configPath:n,error:e instanceof Error?e.message:String(e)}}}function Y(e,t,n){try{return f(e.detectPath?.(t,n)??v(e.configPath(t,n)))}catch{return!1}}function X(e,t,n,r){let i=e.serverName(t),a;try{a=e.configPath(t,r)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:``,serverName:i,error:t instanceof Error?t.message:String(t)}}if(!n.skipAvailabilityCheck&&!Y(e,t,r))return{editorId:e.id,label:e.label,action:`skipped-missing`,configPath:a,serverName:i};let o;try{o=e.format===`toml`?U(a):H(a)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}let s=o[e.topLevelKey]??{},c=s[i],l;try{l=e.buildEntry(t,n)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}let u={...o,[e.topLevelKey]:{...s,[i]:l}};try{e.format===`toml`?G(a,u):W(a,u)}catch(t){return{editorId:e.id,label:e.label,action:`failed`,configPath:a,serverName:i,error:t instanceof Error?t.message:String(t)}}return{editorId:e.id,label:e.label,action:c===void 0?`written`:`overwritten`,configPath:a,serverName:i}}function ae(e,t){let n=e.legacyProjectConfigPath?.(t);if(!(!n||!f(n)))return{editorId:e.id,label:e.label,path:n}}async function oe(e){let t=V(e.editors),n={mode:`published`,cliPath:e.cliPath,skipAvailabilityCheck:!0};return t.map(t=>X(t,``,n,e.home))}function se(e,t,n){let r;try{r=e.configPath(t,n)}catch{return null}let i;try{i=e.format===`toml`?U(r):H(r)}catch{return null}let a=i[e.topLevelKey];if(!u(a))return null;let o=a[e.serverName(t)];return u(o)?o:null}async function Z(e={}){let t=S(e.cwd??process.cwd()),r={mode:e.devMcp?`dev`:`published`,cliEntryPath:e.cliEntryPath},s=await i(t),c;try{c=o(t)}catch(n){let r=B.claude.configPath(t,e.home);return{contentCreated:[],contentSkipped:[],editors:[],legacyProjectConfigs:[],didGitInit:s.didInit,claudeDesktopDetected:!1,mcpAction:`failed`,mcpPath:r,mcpError:`Content scaffolding failed: ${n instanceof Error?n.message:String(n)}`}}let l=V(e.editors??$(t,e.home)),u=l.filter(n=>Y(n,t,e.home)),d=[];for(let n of l){if(e.mcp===!1){let r=``;try{r=n.configPath(t,e.home)}catch{}d.push({editorId:n.id,label:n.label,action:`skipped-flag`,configPath:r,serverName:n.serverName(t)});continue}d.push(X(n,t,r,e.home))}let f=e.mcp===!1?[]:u.map(e=>ae(e,t)).filter(e=>e!==void 0),p=u.some(e=>e.id===`claude`)&&e.mcp!==!1?J(t,r):void 0,m=await(e.installUserSkill??a)({home:e.home}),h=n({home:e.home}),g=e.mcp===!1?`skipped-flag`:`skipped-missing`,_=d.find(e=>e.editorId===`claude`)??d[0]??{action:g,configPath:B.claude.configPath(t,e.home)};return{contentCreated:c.created,contentSkipped:c.skipped,editors:d,legacyProjectConfigs:f,launchJson:p,skillInstall:m,didGitInit:s.didInit,claudeDesktopDetected:h,mcpAction:_.action,mcpPath:_.configPath,mcpError:`error`in _?_.error:void 0}}function Q(e,n){let r=[],i=e.editors.some(e=>e.action===`written`||e.action===`overwritten`),a=e.editors.some(e=>e.action===`failed`),o=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-flag`),u=e.editors.length>0&&e.editors.every(e=>e.action===`skipped-missing`),d=e=>{let t=e.configPath.startsWith(n)?x(n,e.configPath):e.configPath;switch(e.action){case`created`:return` app preview server ${t} configured for Claude Code Desktop embedded browser`;case`merged`:return` app preview server ${t} updated for Claude Code Desktop embedded browser`;case`failed`:return` app preview server ${t} FAILED: ${e.error}`}};e.didGitInit&&r.push(`Initialized git repo at ${n}/.git/ (default branch: main)`);let f=y(n,t);if(e.contentCreated.length>0?(r.push(`Content scaffolded at ${f}/`),r.push(` Created: ${e.contentCreated.join(`, `)}`)):r.push(`Content already present at ${f}/`),e.contentSkipped.length>0&&r.push(` Skipped (already exist): ${e.contentSkipped.join(`, `)}`),r.push(``),e.mcpError&&e.editors.length===0)r.push(`Warning: ${e.mcpError}`);else if(e.editors.length===0)r.push(`MCP server configuration:`),r.push(e.mcpAction===`skipped-flag`?` MCP config not written — use without --no-mcp to configure editors`:` No supported editor config directories detected; skipped MCP registration`);else if(o)r.push(`MCP config not written — use without --no-mcp to configure editors`);else if(u)r.push(`MCP server configuration:`),r.push(` No supported editor config directories detected; skipped MCP registration`);else{r.push(`MCP server configuration:`);for(let t of e.editors){let i=t.configPath.startsWith(n)?x(n,t.configPath):t.configPath.replace(/^\/Users\/[^/]+/,`~`),a=t.serverName===`open-knowledge`?``:` (${t.serverName})`,o=` `.repeat(Math.max(1,14-t.label.length)),s=t.editorId===`claude-desktop`&&(t.action===`written`||t.action===`overwritten`)?` — quit and relaunch Claude Desktop to activate`:``;switch(t.action){case`written`:r.push(` ${t.label}${o}${i} registered${a}${s}`);break;case`overwritten`:r.push(` ${t.label}${o}${i} updated${a}${s}`);break;case`skipped-missing`:r.push(` ${t.label}${o}${i} config root missing; skipped`);break;case`failed`:r.push(` ${t.label}${o}${i} FAILED: ${t.error}`);break;case`skipped-flag`:break}t.editorId===`claude`&&e.launchJson&&r.push(d(e.launchJson))}}if(a&&(r.push(``),r.push(`For failed editors, add the MCP server entry manually. See:`),r.push(` https://github.com/inkeep/open-knowledge#mcp-setup`)),e.legacyProjectConfigs.length>0){r.push(``),r.push(`Legacy project MCP configs detected:`);for(let t of e.legacyProjectConfigs)r.push(` ${t.label} ${x(n,t.path)}`);r.push(` These project-local files may override the new global config. Remove them if you want fully user-scoped MCP setup in this project.`)}if(e.skillInstall)switch(r.push(``),r.push(`User-global skill:`),e.skillInstall){case`installed`:r.push(" open-knowledge installed to detected agent hosts via `npx skills`");break;case`skip-current`:r.push(` open-knowledge already installed at current version`);break;case`failed`:r.push(` ${c(`open-knowledge install failed — MCP still configured; run manually:`)}`),r.push(` ${c(` npx skills@~1.5.0 add <bundled-path> --agent '*' -g -y --copy`)}`);break}if(e.claudeDesktopDetected&&(r.push(``),r.push(`Claude Desktop App detected. To enable in Claude Chat & Cowork, run: ${l(`ok install-skill`)}`)),e.preview?(r.push(``),r.push(s(e.preview,n))):e.previewWarning&&(r.push(``),r.push(`Content preview unavailable: ${e.previewWarning}`)),i){let t=e.editors.filter(e=>e.action===`written`||e.action===`overwritten`).map(e=>e.label);r.push(``),r.push(`Next steps:`),r.push(` 1. Open your editor (${t.join(` / `)})`),r.push(` 2. Approve the MCP server when prompted`),r.push(` 3. (Optional) scaffold the starter knowledge-base structure:`),r.push(` - ok seed`),r.push(` 4. Use the three MCP workflow tools as you build the wiki:`),r.push(` - mcp__open-knowledge__ingest — capture an external source`),r.push(` - mcp__open-knowledge__research — gather sources and write findings`),r.push(` - mcp__open-knowledge__consolidate — promote research to canonical articles`)}return r.join(`
|
|
3
|
+
`)}function $(e,t){let n=[];for(let r of T)Y(B[r],e,t)&&n.push(r);return n}function ce(){return new d(`init`).description(`Scaffold ${t}/ in the current directory and register the MCP server for your editor(s)`).option(`--mcp`,`Register the MCP server for selected editors (default: true)`,!0).option(`--no-mcp`,`Scaffold the ${t}/ directory but do not touch MCP config`).option(`--dev-mcp`,`Register a local dev MCP entry using node + packages/cli/dist/cli.mjs with debug logging`).action(async e=>{let t=process.cwd(),n;try{n=await Z({cwd:t,mcp:e.mcp,devMcp:e.devMcp})}catch(e){if(e instanceof r){process.stderr.write(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.
|
|
4
|
+
`),e.stderr&&process.stderr.write(`${e.stderr.trim()}\n`),process.exitCode=1;return}throw e}try{let{previewContent:e}=await import(`./preview-Bwvil0xG.mjs`),{loadConfig:r}=await import(`./loader-CLKYIpRM.mjs`),{resolveContentDir:i}=await import(`./paths-Bmv6OTgc.mjs`),{config:a}=r(t),o=i(a,t);n.preview=e({projectDir:t,contentDir:o,include:a.content.include,exclude:a.content.exclude})}catch(e){n.previewWarning=e instanceof Error?e.message:String(e)}process.stdout.write(`${Q(n,t)}\n`),(n.editors.some(e=>e.action===`failed`)||n.mcpAction===`failed`)&&(process.exitCode=1)})}export{Z as a,T as c,se as i,B as l,Q as n,X as o,ce as r,oe as s,$ as t};
|
|
5
|
+
//# sourceMappingURL=init-CUmfZczR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./init-0LxWJ-6l.mjs";export{t as ensureOkGitignoredAtRoot,e as initContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{n as e}from"./constants-
|
|
1
|
+
import{n as e}from"./constants-Bp2eH26E.mjs";import{O as t}from"./src-CB-sXsMW.mjs";import{t as n}from"./is-object-7k010cEq.mjs";import{existsSync as r,readFileSync as i}from"node:fs";import{homedir as a}from"node:os";import{resolve as o}from"node:path";import{parse as s}from"yaml";import{realpath as c}from"node:fs/promises";import{z as l}from"zod";async function u(e){let t=o(e);try{return await c(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}const d=l.object({title:l.string().optional(),description:l.string().optional(),tags:l.array(l.string()).optional()}).strict(),f=l.object({match:l.string().min(1,"`match` must be a non-empty glob pattern (e.g. 'specs/**' or 'reports/*/**')"),frontmatter:d}).strict(),p=l.object({content:l.object({dir:l.string().default(`.`),include:l.array(l.string()).min(1).default([`**/*.md`,`**/*.mdx`]),exclude:l.array(l.string()).default([])}).default({dir:`.`,include:[`**/*.md`,`**/*.mdx`],exclude:[]}),github:l.object({oauthAppClientId:l.string().default(`Ov23liqlSd0V1MwR6rhI`)}).default({oauthAppClientId:`Ov23liqlSd0V1MwR6rhI`}),sync:l.object({enabled:l.boolean().optional(),pushIntervalSeconds:l.number().int().min(1).default(60),pullIntervalSeconds:l.number().int().min(1).default(30),autoCommit:l.boolean().default(!0),autoPush:l.boolean().default(!0),autoPull:l.boolean().default(!0),commitMessage:l.string().default(`auto`)}).default({pushIntervalSeconds:60,pullIntervalSeconds:30,autoCommit:!0,autoPush:!0,autoPull:!0,commitMessage:`auto`}),server:l.object({port:l.number().int().min(0).max(65535).default(0),host:l.string().regex(/^[\w.\-:]+$/,`Invalid hostname`).default(`localhost`),openOnAgentEdit:l.boolean().default(!1)}).default({port:0,host:`localhost`,openOnAgentEdit:!1}),persistence:l.object({debounceMs:l.number().int().min(0).default(2e3),maxDebounceMs:l.number().int().min(0).default(1e4)}).default({debounceMs:2e3,maxDebounceMs:1e4}),preview:l.object({baseUrl:l.url().optional()}).default({}),folders:l.array(f).default([]),mcp:l.object({autoStart:l.boolean().default(!0),tools:l.object({read_document:l.object({historyDepth:l.number().int().min(0).default(5)}).default({historyDepth:5}),search:l.object({maxResults:l.number().int().min(1).default(50)}).default({maxResults:50})}).default({read_document:{historyDepth:5},search:{maxResults:50}})}).default({autoStart:!0,tools:{read_document:{historyDepth:5},search:{maxResults:50}}})});function m(e,t){let r={...e};for(let i of Object.keys(t)){let a=e[i],o=t[i];n(o)&&n(a)?r[i]=m(a,o):o!==void 0&&(r[i]=o)}return r}function h(e){if(!r(e))return null;try{let t=s(i(e,`utf-8`));return n(t)?t:null}catch(t){return console.warn(`[config] Failed to parse ${e}: ${t instanceof Error?t.message:t}`),null}}function g(n){let r=n??process.cwd(),i=[],s=o(a(),t,e),c={},l=h(s);l&&(c=m(c,l),i.push(s));let u=o(r,t,e),d=h(u);d&&(c=m(c,d),i.push(u));let f=p.safeParse(c);if(!f.success){let e=f.error.issues.map(e=>` ${e.path.join(`.`)}: ${e.message}`);throw Error(`Invalid configuration:\n${e.join(`
|
|
2
2
|
`)}`)}return{config:f.data,sources:i}}function _(e,t=process.env){let n=e;return t.PORT&&(n={...n,server:{...n.server,port:Number(t.PORT)}}),t.HOST&&(n={...n,server:{...n.server,host:t.HOST}}),n}function v(e){let t=e.env??process.env,n=e.cacheMs??1e3,r=e.loadConfigFn??g,i=new Map,a=new Map,o=u(e.startupCwd);return async s=>{let c=await u(s??e.startupCwd),l=Date.now(),d=i.get(c);if(d&&d.expiresAt>l)return d.config;let f=a.get(c);if(f)return await f;let p=(async()=>{if(c===await o){let r=_(e.startupConfig,t);return i.set(c,{config:r,expiresAt:Date.now()+n}),r}let a=_(r(c).config,t);return i.set(c,{config:a,expiresAt:Date.now()+n}),a})();a.set(c,p);try{return await p}finally{a.delete(c)}}}export{u as i,g as n,p as r,v as t};
|
|
3
|
-
//# sourceMappingURL=loader-
|
|
3
|
+
//# sourceMappingURL=loader-5fUYhvT7.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-5fUYhvT7.mjs";export{e as loadConfig};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./paths-D7eyE9c-.mjs";export{t as resolveContentDir,e as resolveLockDir};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./constants-
|
|
2
|
-
//# sourceMappingURL=paths-
|
|
1
|
+
import"./constants-Bp2eH26E.mjs";import{O as e}from"./src-CB-sXsMW.mjs";import{resolve as t}from"node:path";function n(e,n){return t(n,e.content.dir)}function r(n){return t(n,e)}export{r as n,n as t};
|
|
2
|
+
//# sourceMappingURL=paths-D7eyE9c-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-DW48ZUVb.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import"./constants-
|
|
1
|
+
import"./constants-Bp2eH26E.mjs";import{O as e}from"./src-CB-sXsMW.mjs";import{y as t}from"./src-H34RCSr9.mjs";import{existsSync as n,lstatSync as r,readdirSync as i,realpathSync as a,statSync as o}from"node:fs";import{join as s,relative as c}from"node:path";function l(e){let{projectDir:n,contentDir:l,include:u,exclude:d,sampleCap:f=5}=e,p=[],m=[];try{r(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,include:u,exclude:d,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let h;try{h=t({projectDir:n,contentDir:l,includePatterns:u,excludePatterns:d})}catch(e){return{totalCount:0,sample:[],contentDir:l,include:u,exclude:d,warnings:[e instanceof Error?e.message:String(e)]}}function g(e){let t;try{t=i(e,{withFileTypes:!0})}catch(t){let n=t instanceof Error?t.message:String(t);p.push(`could not read directory ${c(l,e)||`.`}: ${n}`);return}for(let n of t){let t=s(e,n.name);if(n.isSymbolicLink()){let e;try{e=a(t)}catch(e){let n=e.code;n===`ENOENT`||n===`ELOOP`?p.push(`broken or cyclic symlink: ${c(l,t)}`):p.push(`cannot resolve symlink ${c(l,t)}: ${n??`unknown error`}`);continue}let n;try{n=o(e)}catch{continue}if(n.isDirectory()){let e=c(l,t);if(h.isDirExcluded(e))continue;g(t)}else if(n.isFile()){let e=c(l,t);if(h.isExcluded(e))continue;m.push(e)}}else if(n.isDirectory()){let e=c(l,t);if(h.isDirExcluded(e))continue;g(t)}else if(n.isFile()){let e=c(l,t);if(h.isExcluded(e))continue;m.push(e)}}}return g(l),{totalCount:m.length,sample:m.slice(0,f),contentDir:l,include:u,exclude:d,warnings:p}}function u(t,r){let i=[],a=c(r,t.contentDir),o=a===``?`./`:`./${a}`;i.push(`Content:`),i.push(` Found ${t.totalCount} markdown files in ${o}`);let l=t.include.join(`, `),u=t.exclude.length>0?t.exclude.join(`, `):`(none)`;if(i.push(` Scope: include=${l} exclude=${u}`),t.sample.length>0){let e=t.sample.join(`, `),n=t.totalCount>t.sample.length?`, …`:``;i.push(` Sample: ${e}${n}`)}if(t.warnings.length>0)for(let e of t.warnings)i.push(` Warning: ${e}`);return i.push(``),n(s(r,`.open-knowledge`,`config.yml`))?(i.push(` To adjust, edit ${e}/config.yml:`),i.push(` content:`),i.push(` include: ${JSON.stringify(t.include)}`),i.push(` exclude: ${JSON.stringify(t.exclude)}`)):(i.push(" Run `open-knowledge init` to scaffold config, then adjust:"),i.push(` ${e}/config.yml → content.include / content.exclude`)),i.push(``),i.push(` Re-check anytime: open-knowledge preview`),i.join(`
|
|
2
2
|
`)}export{l as n,u as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-DW48ZUVb.mjs.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ActivityPanelDiffView-DVyTW-J7.js","assets/chunk-DECur_0Z.js","assets/compiler-runtime-Y11fyRVL.js","assets/ActivityPanelDiffView-legcy4jI.css"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e}from"./chunk-DECur_0Z.js";import{d as t}from"./propagation-api-CQodqriD.js";import{n,r,t as i}from"./compiler-runtime-Y11fyRVL.js";import{t as a,x as o}from"./button-B1XQHQcX.js";import{d as s,f as c,p as l,r as u,t as d}from"./agent-presence-BQu9C0ej.js";import{n as f,r as p,st as m,vt as h}from"./DocumentContext--jj-O3yz.js";import{C as g,a as _,i as v,o as y,r as b,s as x,t as S}from"./dialog-xzAlDsHy.js";import{i as C,n as w,t as T}from"./tooltip-C2q723j6.js";import{i as E}from"./PageListContext-DdGQSVEJ.js";var D=o(`rewind`,[[`path`,{d:`M12 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 12 18z`,key:`2a1g8i`}],[`path`,{d:`M22 6a2 2 0 0 0-3.414-1.414l-6 6a2 2 0 0 0 0 2.828l6 6A2 2 0 0 0 22 18z`,key:`rg3s36`}]]),O=o(`undo-2`,[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]),k=i(),A=e(n(),1),j=500,M=64,ee=class{map=new Map;get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}set(e,t){for(this.map.has(e)&&this.map.delete(e),this.map.set(e,t);this.map.size>M;){let e=this.map.keys().next().value;if(e===void 0)break;this.map.delete(e)}}clear(){this.map.clear()}get size(){return this.map.size}};async function te(e){let t=`/api/agent-activity?agentId=${encodeURIComponent(e)}`,n=await fetch(t);if(!n.ok)throw Error(`agent-activity fetch failed: HTTP ${n.status}`);let r=await n.json();if(!r.ok)throw Error(r.error??`agent-activity fetch not ok`);return{sessionAlive:r.sessionAlive??!1,agent:r.agent??null,files:r.files??[]}}async function N(e,t,n){let r=`/api/agent-burst-diff?agentId=${encodeURIComponent(e)}&docName=${encodeURIComponent(t)}&stackIndex=${n}`,i=await fetch(r);if(!i.ok)throw Error(`agent-burst-diff fetch failed: HTTP ${i.status}`);let a=await i.json();if(!a.ok)throw Error(a.error??`agent-burst-diff fetch not ok`);return a.diff??``}function ne(e){let t=(0,k.c)(23),{systemProvider:n}=f(),[r,i]=(0,A.useState)(null),[a,o]=(0,A.useState)(`idle`),[s,c]=(0,A.useState)(null),l;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(l=new ee,t[0]=l):l=t[0];let u=(0,A.useRef)(l),d=(0,A.useRef)(0),p;t[1]===n?p=t[2]:(p=e=>{let t=d.current+=1;o(`loading`),c(null),te(e).then(r=>{if(d.current!==t)return;let a=ie(n,e);i({...r,writingDocs:a}),o(`ready`)}).catch(e=>{d.current===t&&(c(e instanceof Error?e.message:String(e)),o(`error`))})},t[1]=n,t[2]=p);let m=p,h;t[3]!==e||t[4]!==m?(h=()=>{if(!e){d.current+=1,i(null),o(`idle`),c(null),u.current.clear();return}u.current.clear(),m(e);let t=null,n=E(n=>{n.includes(`session-activity`)&&(t&&clearTimeout(t),t=setTimeout(()=>{t=null,m(e)},j))});return()=>{t&&clearTimeout(t),n()}},t[3]=e,t[4]=m,t[5]=h):h=t[5];let g;t[6]===e?g=t[7]:(g=[e],t[6]=e,t[7]=g),(0,A.useEffect)(h,g);let _,v;t[8]!==e||t[9]!==n?(_=()=>{if(!e||!n)return;let t=()=>{if(!n.awareness)return;let t=ie(n,e);i(e=>!e||re(e.writingDocs,t)?e:{...e,writingDocs:t})},r=n.awareness;if(!r||typeof r.on!=`function`){t();return}r.on(`update`,t),t();let a=setInterval(t,1e3);return()=>{clearInterval(a),typeof r.off==`function`&&r.off(`update`,t)}},v=[e,n],t[8]=e,t[9]=n,t[10]=_,t[11]=v):(_=t[10],v=t[11]),(0,A.useEffect)(_,v);let y;t[12]===e?y=t[13]:(y=async(t,n)=>{if(!e)return``;let r=`${t}\0${n}`,i=u.current.get(r);if(i!==void 0)return i;let a=await N(e,t,n);return u.current.set(r,a),a},t[12]=e,t[13]=y);let b=y,x;t[14]!==e||t[15]!==m?(x=()=>{e&&m(e)},t[14]=e,t[15]=m,t[16]=x):x=t[16];let S=x,C;return t[17]!==r||t[18]!==s||t[19]!==b||t[20]!==S||t[21]!==a?(C={data:r,status:a,error:s,reload:S,fetchBurstDiff:b},t[17]=r,t[18]=s,t[19]=b,t[20]=S,t[21]=a,t[22]=C):C=t[22],C}function re(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function ie(e,t){let n=new Set;if(!e)return n;let r=e.awareness;if(!d(r))return n;let i=[t,t.startsWith(`agent-`)?t.slice(6):`agent-${t}`];for(let e of r.getStates().values()){let t=e.agentPresence;if(t)for(let e of i){let r=t[e];r&&r.mode===`writing`&&r.currentDoc&&n.add(r.currentDoc)}}return n}var P=r(),ae=(0,A.lazy)(async()=>({default:(await t(()=>import(`./ActivityPanelDiffView-DVyTW-J7.js`),__vite__mapDeps([0,1,2,3]))).ActivityPanelDiffView}));function oe(e,t){let n=Math.max(0,t-e);return n<6e4?`${Math.round(n/1e3)}s ago`:n<36e5?`${Math.round(n/6e4)}m ago`:new Date(e).toLocaleTimeString(void 0,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`})}function se(e){let t=(0,k.c)(38),{burst:n,docName:r,fetchBurstDiff:i}=e,[a,o]=(0,A.useState)(!1),[l,u]=(0,A.useState)(null),[d,f]=(0,A.useState)(null),[p,m]=(0,A.useState)(!1),[h,g]=(0,A.useState)(ce),_,v;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(_=()=>{let e=setInterval(()=>g(Date.now()),3e4);return()=>clearInterval(e)},v=[],t[0]=_,t[1]=v):(_=t[0],v=t[1]),(0,A.useEffect)(_,v);let y;t[2]!==n.stackIndex||t[3]!==l||t[4]!==r||t[5]!==a||t[6]!==i||t[7]!==p?(y=()=>{let e=!a;o(e),e&&l===null&&!p&&(m(!0),f(null),i(r,n.stackIndex).then(e=>{u(e),m(!1)}).catch(e=>{f(e instanceof Error?e.message:String(e)),m(!1)}))},t[2]=n.stackIndex,t[3]=l,t[4]=r,t[5]=a,t[6]=i,t[7]=p,t[8]=y):y=t[8];let b=y,x=`${a?`Collapse`:`Expand`} burst ${n.stackIndex+1} diff`,S;t[9]===a?S=t[10]:(S=a?(0,P.jsx)(c,{className:`size-3 shrink-0`,"aria-hidden":`true`}):(0,P.jsx)(s,{className:`size-3 shrink-0`,"aria-hidden":`true`}),t[9]=a,t[10]=S);let C;t[11]!==n.ts||t[12]!==h?(C=oe(n.ts,h),t[11]=n.ts,t[12]=h,t[13]=C):C=t[13];let w;t[14]===C?w=t[15]:(w=(0,P.jsx)(`span`,{className:`font-mono`,children:C}),t[14]=C,t[15]=w);let T;t[16]===n.additions?T=t[17]:(T=(0,P.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additions]}),t[16]=n.additions,t[17]=T);let E;t[18]===n.deletions?E=t[19]:(E=(0,P.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletions]}),t[18]=n.deletions,t[19]=E);let D;t[20]!==T||t[21]!==E?(D=(0,P.jsxs)(`span`,{className:`ml-auto font-mono`,children:[T,` `,E]}),t[20]=T,t[21]=E,t[22]=D):D=t[22];let O;t[23]!==a||t[24]!==D||t[25]!==x||t[26]!==S||t[27]!==w||t[28]!==b?(O=(0,P.jsxs)(`button`,{type:`button`,onClick:b,className:`flex w-full items-center gap-2 px-4 py-1.5 text-xs text-muted-foreground hover:bg-muted/40`,"aria-expanded":a,"aria-label":x,children:[S,w,D]}),t[23]=a,t[24]=D,t[25]=x,t[26]=S,t[27]=w,t[28]=b,t[29]=O):O=t[29];let j;t[30]!==l||t[31]!==a||t[32]!==d||t[33]!==p?(j=a?(0,P.jsx)(`div`,{className:`bg-muted/20`,children:p?(0,P.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`Loading diff…`}):d?(0,P.jsxs)(`div`,{className:`px-4 py-2 text-xs text-destructive`,children:[`Failed: `,d]}):l===null?(0,P.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`No diff.`}):(0,P.jsx)(A.Suspense,{fallback:(0,P.jsx)(`div`,{className:`px-4 py-2 text-xs text-muted-foreground italic`,children:`Loading diff…`}),children:(0,P.jsx)(ae,{diff:l})})}):null,t[30]=l,t[31]=a,t[32]=d,t[33]=p,t[34]=j):j=t[34];let M;return t[35]!==O||t[36]!==j?(M=(0,P.jsxs)(`div`,{className:`border-t border-border/50`,children:[O,j]}),t[35]=O,t[36]=j,t[37]=M):M=t[37],M}function ce(){return Date.now()}function le(e,t){let n=Math.max(0,t-e);return n<6e4?`${Math.round(n/1e3)}s ago`:n<36e5?`${Math.round(n/6e4)}m ago`:`${Math.round(n/36e5)}h ago`}function ue(e){let t=(0,k.c)(93),{file:n,sessionAlive:r,isWriting:i,onNavigate:o,onUndoLast:l,onUndoAll:u,fetchBurstDiff:d}=e,[f,p]=(0,A.useState)(!1),[m,h]=(0,A.useState)(!1),[g,E]=(0,A.useState)(!1),[j,M]=(0,A.useState)(fe),ee,te;if(t[0]===Symbol.for(`react.memo_cache_sentinel`)?(ee=()=>{let e=setInterval(()=>M(Date.now()),3e4);return()=>clearInterval(e)},te=[],t[0]=ee,t[1]=te):(ee=t[0],te=t[1]),(0,A.useEffect)(ee,te),n.bursts.length===0)return null;let N=!r||n.bursts.length===0||g,ne=r?n.bursts.length===0?`Nothing to undo on this file`:null:`Session ended — undo unavailable`,re;t[2]!==N||t[3]!==n.docName||t[4]!==l?(re=e=>{e.stopPropagation(),!N&&(E(!0),Promise.resolve(l(n.docName)).finally(()=>E(!1)))},t[2]=N,t[3]=n.docName,t[4]=l,t[5]=re):re=t[5];let ie=re,ae;t[6]===N?ae=t[7]:(ae=e=>{e.stopPropagation(),!N&&h(!0)},t[6]=N,t[7]=ae);let oe=ae,ce;t[8]!==N||t[9]!==n.docName||t[10]!==u?(ce=()=>{h(!1),!N&&(E(!0),Promise.resolve(u(n.docName)).finally(()=>E(!1)))},t[8]=N,t[9]=n.docName,t[10]=u,t[11]=ce):ce=t[11];let ue=ce,F;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(F=()=>p(de),t[12]=F):F=t[12];let pe=f?`Collapse ${n.docName}`:`Expand ${n.docName}`,I;t[13]===f?I=t[14]:(I=f?(0,P.jsx)(c,{className:`size-4`,"aria-hidden":`true`}):(0,P.jsx)(s,{className:`size-4`,"aria-hidden":`true`}),t[13]=f,t[14]=I);let L;t[15]!==f||t[16]!==pe||t[17]!==I?(L=(0,P.jsx)(`button`,{type:`button`,onClick:F,className:`flex size-5 shrink-0 items-center justify-center rounded hover:bg-muted`,"aria-expanded":f,"aria-label":pe,"data-testid":`activity-panel-file-row-carrot`,children:I}),t[15]=f,t[16]=pe,t[17]=I,t[18]=L):L=t[18];let R;t[19]!==n.docName||t[20]!==o?(R=()=>o(n.docName),t[19]=n.docName,t[20]=o,t[21]=R):R=t[21];let me=`Navigate to ${n.docName}`,z;t[22]!==n.docName||t[23]!==R||t[24]!==me?(z=(0,P.jsx)(`button`,{type:`button`,onClick:R,className:`min-w-0 flex-1 truncate text-left text-foreground hover:underline focus-visible:outline-ring`,"aria-label":me,"data-testid":`activity-panel-file-row-filename`,title:n.docName,children:n.docName}),t[22]=n.docName,t[23]=R,t[24]=me,t[25]=z):z=t[25];let he=`Undo last edit on ${n.docName}`,ge;t[26]===Symbol.for(`react.memo_cache_sentinel`)?(ge=(0,P.jsx)(O,{className:`size-3.5`,"aria-hidden":`true`}),t[26]=ge):ge=t[26];let B;t[27]!==N||t[28]!==ie||t[29]!==he?(B=(0,P.jsx)(C,{asChild:!0,children:(0,P.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0`,onClick:ie,disabled:N,"aria-label":he,"data-testid":`activity-panel-undo-last`,children:ge})}),t[27]=N,t[28]=ie,t[29]=he,t[30]=B):B=t[30];let _e=ne??`Undo last edit`,V;t[31]===_e?V=t[32]:(V=(0,P.jsx)(w,{side:`bottom`,children:_e}),t[31]=_e,t[32]=V);let H;t[33]!==B||t[34]!==V?(H=(0,P.jsxs)(T,{children:[B,V]}),t[33]=B,t[34]=V,t[35]=H):H=t[35];let ve=`Undo all edits on ${n.docName}`,ye;t[36]===Symbol.for(`react.memo_cache_sentinel`)?(ye=(0,P.jsx)(D,{className:`size-3.5`,"aria-hidden":`true`}),t[36]=ye):ye=t[36];let be;t[37]!==N||t[38]!==oe||t[39]!==ve?(be=(0,P.jsx)(C,{asChild:!0,children:(0,P.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,className:`size-6 shrink-0`,onClick:oe,disabled:N,"aria-label":ve,"data-testid":`activity-panel-undo-all`,children:ye})}),t[37]=N,t[38]=oe,t[39]=ve,t[40]=be):be=t[40];let xe=ne??`Undo all edits`,U;t[41]===xe?U=t[42]:(U=(0,P.jsx)(w,{side:`bottom`,children:xe}),t[41]=xe,t[42]=U);let W;t[43]!==be||t[44]!==U?(W=(0,P.jsxs)(T,{children:[be,U]}),t[43]=be,t[44]=U,t[45]=W):W=t[45];let G;t[46]===n.additionsTotal?G=t[47]:(G=(0,P.jsxs)(`span`,{className:`text-green-600 dark:text-green-400`,children:[`+`,n.additionsTotal]}),t[46]=n.additionsTotal,t[47]=G);let K;t[48]===n.deletionsTotal?K=t[49]:(K=(0,P.jsxs)(`span`,{className:`text-red-600 dark:text-red-400`,children:[`−`,n.deletionsTotal]}),t[48]=n.deletionsTotal,t[49]=K);let q;t[50]!==G||t[51]!==K?(q=(0,P.jsxs)(`span`,{className:`shrink-0 font-mono text-xs`,children:[G,` `,K]}),t[50]=G,t[51]=K,t[52]=q):q=t[52];let J;t[53]!==n.lastTs||t[54]!==j?(J=le(n.lastTs,j),t[53]=n.lastTs,t[54]=j,t[55]=J):J=t[55];let Y;t[56]===J?Y=t[57]:(Y=(0,P.jsx)(`span`,{className:`shrink-0 font-mono text-[11px] text-muted-foreground`,children:J}),t[56]=J,t[57]=Y);let X;t[58]===i?X=t[59]:(X=i?(0,P.jsx)(`span`,{className:`shrink-0 text-[11px] text-primary animate-pulse`,role:`status`,children:`writing…`}):null,t[58]=i,t[59]=X);let Z;t[60]!==z||t[61]!==H||t[62]!==W||t[63]!==q||t[64]!==Y||t[65]!==X||t[66]!==L?(Z=(0,P.jsxs)(`div`,{className:`flex items-center gap-2 px-3 py-2 text-sm`,children:[L,z,H,W,q,Y,X]}),t[60]=z,t[61]=H,t[62]=W,t[63]=q,t[64]=Y,t[65]=X,t[66]=L,t[67]=Z):Z=t[67];let Q;t[68]!==f||t[69]!==d||t[70]!==n.bursts||t[71]!==n.docName?(Q=f?(0,P.jsx)(`div`,{children:n.bursts.map(e=>(0,P.jsx)(se,{burst:e,docName:n.docName,fetchBurstDiff:d},`${n.docName}:${e.stackIndex}`))}):null,t[68]=f,t[69]=d,t[70]=n.bursts,t[71]=n.docName,t[72]=Q):Q=t[72];let Se;t[73]===Symbol.for(`react.memo_cache_sentinel`)?(Se=(0,P.jsx)(x,{children:`Undo all edits on this file?`}),t[73]=Se):Se=t[73];let Ce;t[74]===n.docName?Ce=t[75]:(Ce=(0,P.jsx)(`span`,{className:`font-mono text-foreground`,children:n.docName}),t[74]=n.docName,t[75]=Ce);let we=n.bursts.length===1?``:`s`,Te;t[76]!==n.bursts.length||t[77]!==Ce||t[78]!==we?(Te=(0,P.jsxs)(y,{children:[Se,(0,P.jsxs)(v,{children:[`This will revert every change this agent has made to`,` `,Ce,` in their current session (`,n.bursts.length,` burst`,we,`). Other files and other writers are not affected.`]})]}),t[76]=n.bursts.length,t[77]=Ce,t[78]=we,t[79]=Te):Te=t[79];let Ee;t[80]===Symbol.for(`react.memo_cache_sentinel`)?(Ee=(0,P.jsx)(a,{type:`button`,variant:`outline`,onClick:()=>h(!1),"data-testid":`activity-panel-undo-all-cancel`,children:`Cancel`}),t[80]=Ee):Ee=t[80];let De;t[81]===ue?De=t[82]:(De=(0,P.jsxs)(_,{children:[Ee,(0,P.jsx)(a,{type:`button`,variant:`destructive`,onClick:ue,"data-testid":`activity-panel-undo-all-confirm`,children:`Undo all`})]}),t[81]=ue,t[82]=De);let Oe;t[83]!==Te||t[84]!==De?(Oe=(0,P.jsxs)(b,{className:`sm:max-w-md`,children:[Te,De]}),t[83]=Te,t[84]=De,t[85]=Oe):Oe=t[85];let $;t[86]!==m||t[87]!==Oe?($=(0,P.jsx)(S,{open:m,onOpenChange:h,children:Oe}),t[86]=m,t[87]=Oe,t[88]=$):$=t[88];let ke;return t[89]!==Z||t[90]!==Q||t[91]!==$?(ke=(0,P.jsxs)(`div`,{className:`border-b border-border`,"data-testid":`activity-panel-file-row`,children:[Z,Q,$]}),t[89]=Z,t[90]=Q,t[91]=$,t[92]=ke):ke=t[92],ke}function de(e){return!e}function fe(){return Date.now()}async function F(e){let t=await fetch(`/api/agent-undo`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({...e,agentId:e.connectionId})});if(!t.ok)throw Error(`agent-undo failed: HTTP ${t.status}`)}function pe(e){return`#/${e.split(`/`).map(e=>encodeURIComponent(e)).join(`/`)}`}function I(e){typeof window>`u`||(window.location.hash=pe(e))}function L(){let e=(0,k.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsxs)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,role:`status`,"aria-busy":`true`,children:[(0,P.jsx)(m,{className:`mr-2 size-4 animate-spin`,"aria-hidden":`true`}),(0,P.jsx)(`span`,{className:`text-sm`,children:`Loading agent activity…`})]}),e[0]=t):t=e[0],t}function R(e){let t=(0,k.c)(9),{error:n,onRetry:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,P.jsx)(h,{className:`size-6 text-destructive`,"aria-hidden":`true`}),t[0]=i):i=t[0];let o;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,P.jsx)(`p`,{className:`text-sm font-medium`,children:`Failed to load activity`}),t[1]=o):o=t[1];let s;t[2]===n?s=t[3]:(s=(0,P.jsxs)(`div`,{className:`space-y-1`,children:[o,(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n})]}),t[2]=n,t[3]=s);let c;t[4]===r?c=t[5]:(c=(0,P.jsx)(a,{type:`button`,variant:`outline`,size:`sm`,onClick:r,children:`Retry`}),t[4]=r,t[5]=c);let l;return t[6]!==s||t[7]!==c?(l=(0,P.jsxs)(`div`,{className:`flex flex-col items-center gap-3 p-6 text-center`,role:`alert`,"data-testid":`activity-panel-error`,children:[i,s,c]}),t[6]=s,t[7]=c,t[8]=l):l=t[8],l}function me(){let e=(0,k.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,P.jsx)(`div`,{className:`flex h-full items-center justify-center p-6 text-muted-foreground`,"data-testid":`activity-panel-empty`,children:(0,P.jsx)(`p`,{className:`text-sm italic`,children:`No edits yet.`})}),e[0]=t):t=e[0],t}function z(e){let t=(0,k.c)(8),{onExit:n}=e,r;t[0]===n?r=t[1]:(r=(0,P.jsx)(he,{onClick:n}),t[0]=n,t[1]=r);let i;t[2]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,P.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:`Agent activity`}),t[2]=i):i=t[2];let a;t[3]===r?a=t[4]:(a=(0,P.jsxs)(`div`,{className:`flex shrink-0 flex-row items-center gap-2 border-b border-border px-3 py-2`,children:[r,i]}),t[3]=r,t[4]=a);let o;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,P.jsx)(`div`,{className:`flex flex-1 items-center justify-center p-6 text-muted-foreground`,children:(0,P.jsx)(`p`,{className:`text-center text-sm italic`,children:`Click an agent's avatar in the presence bar to view their session.`})}),t[5]=o):o=t[5];let s;return t[6]===a?s=t[7]:(s=(0,P.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel-no-agent`,"aria-label":`Agent activity`,children:[a,o]}),t[6]=a,t[7]=s),s}function he(e){let t=(0,k.c)(6),{onClick:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,P.jsx)(l,{}),t[0]=r):r=t[0];let i;t[1]===n?i=t[2]:(i=(0,P.jsx)(C,{asChild:!0,children:(0,P.jsx)(a,{type:`button`,variant:`ghost`,size:`icon`,className:`size-7 shrink-0`,onClick:n,"aria-label":`Back to document view`,"data-testid":`docpanel-exit-agent-mode`,children:r})}),t[1]=n,t[2]=i);let o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,P.jsx)(w,{side:`bottom`,children:`Back to document view`}),t[3]=o):o=t[3];let s;return t[4]===i?s=t[5]:(s=(0,P.jsxs)(T,{children:[i,o]}),t[4]=i,t[5]=s),s}function ge(e){let t=(0,k.c)(9),{lastTs:n}=e,[r]=(0,A.useState)(B),i;t[0]!==n||t[1]!==r?(i=n?_e(r-n):null,t[0]=n,t[1]=r,t[2]=i):i=t[2];let a=i,o;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,P.jsx)(`span`,{className:`font-medium`,children:`Session ended`}),t[3]=o):o=t[3];let s;t[4]===a?s=t[5]:(s=a?(0,P.jsxs)(`span`,{children:[` · `,a]}):null,t[4]=a,t[5]=s);let c;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,P.jsx)(`div`,{className:`mt-1 opacity-80`,children:`Undo buttons are disabled — per-session state has been garbage-collected.`}),t[6]=c):c=t[6];let l;return t[7]===s?l=t[8]:(l=(0,P.jsxs)(`div`,{className:`border-b border-border bg-muted/40 px-4 py-3 text-xs text-muted-foreground`,"data-testid":`activity-panel-session-ended`,children:[o,s,c]}),t[7]=s,t[8]=l),l}function B(){return Date.now()}function _e(e){let t=Math.max(0,e);return t<6e4?`${Math.round(t/1e3)}s ago`:t<36e5?`${Math.round(t/6e4)}m ago`:`${Math.round(t/36e5)}h ago`}function V(e){let t=(0,k.c)(10),{agent:n,size:r}=e,i=r===void 0?28:r,a;t[0]!==n.color||t[1]!==i?(a={backgroundColor:n.color,width:i,height:i},t[0]=n.color,t[1]=i,t[2]=a):a=t[2];let o=i*.57,s=i*.57,c;t[3]!==n.icon||t[4]!==o||t[5]!==s?(c=(0,P.jsx)(u,{icon:n.icon,width:o,height:s}),t[3]=n.icon,t[4]=o,t[5]=s,t[6]=c):c=t[6];let l;return t[7]!==a||t[8]!==c?(l=(0,P.jsx)(`span`,{className:`inline-flex shrink-0 items-center justify-center rounded-full text-white ring-2 ring-background`,style:a,"aria-hidden":`true`,children:c}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function H(e){let t=(0,k.c)(20),{data:n,status:r,error:i,reload:a,fetchBurstDiff:o,onExit:s,onNavigate:c,onUndoLast:l,onUndoAll:u}=e,d=n?.files?.[0]?.lastTs??null,f;t[0]===s?f=t[1]:(f=(0,P.jsx)(he,{onClick:s}),t[0]=s,t[1]=f);let p;t[2]===n?p=t[3]:(p=n?.agent?(0,P.jsxs)(P.Fragment,{children:[(0,P.jsx)(V,{agent:n.agent}),(0,P.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,P.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:n.agent.displayName}),(0,P.jsxs)(`p`,{className:`truncate text-xs text-muted-foreground`,children:[n.sessionAlive?`Active`:`Ended`,n.files.length>0?` · ${n.files.length} file${n.files.length===1?``:`s`}`:``]})]})]}):(0,P.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,P.jsx)(`h2`,{className:`truncate text-sm font-medium`,children:`Agent activity`})}),t[2]=n,t[3]=p);let m;t[4]!==f||t[5]!==p?(m=(0,P.jsxs)(`div`,{className:`flex flex-row items-center gap-2 border-b border-border px-3 py-2 shrink-0`,children:[f,p]}),t[4]=f,t[5]=p,t[6]=m):m=t[6];let h;t[7]!==n||t[8]!==i||t[9]!==o||t[10]!==d||t[11]!==c||t[12]!==u||t[13]!==l||t[14]!==a||t[15]!==r?(h=(0,P.jsx)(`div`,{className:`flex-1 overflow-y-auto`,"data-testid":`activity-panel-body`,children:r===`loading`&&n===null?(0,P.jsx)(L,{}):r===`error`&&i?(0,P.jsx)(R,{error:i,onRetry:a}):n===null?(0,P.jsx)(me,{}):(0,P.jsxs)(P.Fragment,{children:[n.sessionAlive?null:(0,P.jsx)(ge,{lastTs:d}),n.files.length===0?(0,P.jsx)(me,{}):n.files.map(e=>(0,P.jsx)(ue,{file:e,sessionAlive:n.sessionAlive,isWriting:n.writingDocs.has(e.docName),onNavigate:c,onUndoLast:l,onUndoAll:u,fetchBurstDiff:o},e.docName))]})}),t[7]=n,t[8]=i,t[9]=o,t[10]=d,t[11]=c,t[12]=u,t[13]=l,t[14]=a,t[15]=r,t[16]=h):h=t[16];let g;return t[17]!==m||t[18]!==h?(g=(0,P.jsxs)(`section`,{className:`flex h-full min-h-0 flex-col`,"data-testid":`activity-panel`,"aria-label":`Agent activity`,children:[m,h]}),t[17]=m,t[18]=h,t[19]=g):g=t[19],g}function ve(){let e=(0,k.c)(22),{docPanelAgentId:t,closeActivityPanel:n}=f(),{openDocumentTransition:r}=p(),{data:i,status:a,error:o,reload:s,fetchBurstDiff:c}=ne(t);if(t===null){let t;return e[0]===n?t=e[1]:(t=(0,P.jsx)(z,{onExit:n}),e[0]=n,e[1]=t),t}let l;e[2]===r?l=e[3]:(l=e=>{r(e),I(e)},e[2]=r,e[3]=l);let u=l,d;e[4]!==i||e[5]!==t||e[6]!==s?(d=async e=>{try{await F({connectionId:t,docName:e,scope:`last`,agentName:i?.agent?.displayName}),s()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);g.error(`Undo failed: ${n}`),s()}},e[4]=i,e[5]=t,e[6]=s,e[7]=d):d=e[7];let m=d,h;e[8]!==i||e[9]!==t||e[10]!==s?(h=async e=>{try{await F({connectionId:t,docName:e,scope:`file`,agentName:i?.agent?.displayName}),g.success(`Undone all edits on ${e}`),s()}catch(e){let t=e,n=t instanceof Error?t.message:String(t);g.error(`Undo all failed: ${n}`),s()}},e[8]=i,e[9]=t,e[10]=s,e[11]=h):h=e[11];let _=h,v;return e[12]!==n||e[13]!==i||e[14]!==o||e[15]!==c||e[16]!==u||e[17]!==_||e[18]!==m||e[19]!==s||e[20]!==a?(v=(0,P.jsx)(H,{data:i,status:a,error:o,reload:s,fetchBurstDiff:c,onExit:n,onNavigate:u,onUndoLast:m,onUndoAll:_}),e[12]=n,e[13]=i,e[14]=o,e[15]=c,e[16]=u,e[17]=_,e[18]=m,e[19]=s,e[20]=a,e[21]=v):v=e[21],v}export{ve as ActivityModeContent};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";var i=r(),a=n(),o=e(t());function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?s(Object(n),!0).forEach((function(t){l(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function l(e,t,n){return(t=function(e){var t=function(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}(e,`string`);return typeof t==`symbol`?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function u(e,t){if(e==null)return{};var n,r,i=function(e,t){if(e==null)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function d(e,t){return p(e)||function(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;c=!1}else for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}(e,t)||h(e,t)||_()}function f(e){return function(e){if(Array.isArray(e))return g(e)}(e)||m(e)||h(e)||function(){throw TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}()}function p(e){if(Array.isArray(e))return e}function m(e){if(typeof Symbol<`u`&&e[Symbol.iterator]!=null||e[`@@iterator`]!=null)return Array.from(e)}function h(e,t){if(e){if(typeof e==`string`)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?g(e,t):void 0}}function g(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function v(e,t){var n=typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(!n){if(Array.isArray(e)||(n=h(e))||t&&e&&typeof e.length==`number`){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
4
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var a,o=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||n.return==null||n.return()}finally{if(s)throw a}}}}var y=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function b(e,t){return e(t={exports:{}},t.exports),t.exports}var x=b((function(e){(function(){var t={}.hasOwnProperty;function n(){for(var e=[],r=0;r<arguments.length;r++){var i=arguments[r];if(i){var a=typeof i;if(a===`string`||a===`number`)e.push(i);else if(Array.isArray(i)){if(i.length){var o=n.apply(null,i);o&&e.push(o)}}else if(a===`object`){if(i.toString!==Object.prototype.toString&&!i.toString.toString().includes(`[native code]`)){e.push(i.toString());continue}for(var s in i)t.call(i,s)&&i[s]&&e.push(s)}}}return e.join(` `)}e.exports?(n.default=n,e.exports=n):window.classNames=n})()})),S={hunkClassName:``,lineClassName:``,gutterClassName:``,codeClassName:``,monotonous:!1,gutterType:`default`,viewType:`split`,widgets:{},hideGutter:!1,selectedChanges:[],generateAnchorID:function(){},generateLineClassName:function(){},renderGutter:function(e){var t=e.renderDefault;return(0,e.wrapInAnchor)(t())},codeEvents:{},gutterEvents:{}},C=(0,o.createContext)(S),w=C.Provider,T=function(){return(0,o.useContext)(C)},E=b((function(e,t){(function(t){function n(e){var t=e.slice(11),n=null,r=null;switch(t.indexOf(`"`)){case-1:n=(o=t.split(` `))[0].slice(2),r=o[1].slice(2);break;case 0:var i=t.indexOf(`"`,2);n=t.slice(3,i);var a=t.indexOf(`"`,i+1);r=a<0?t.slice(i+4):t.slice(a+3,-1);break;default:var o;n=(o=t.split(` `))[0].slice(2),r=o[1].slice(3,-1)}return{oldPath:n,newPath:r}}e.exports={parse:function(e){for(var t,r,i,a,o,s=[],c=2,l=e.split(`
|
|
5
|
+
`),u=l.length,d=0;d<u;){var f=l[d];if(f.indexOf(`diff --git`)===0){t={hunks:[],oldEndingNewLine:!0,newEndingNewLine:!0,oldPath:(o=n(f)).oldPath,newPath:o.newPath},s.push(t);var p,m=null;simiLoop:for(;p=l[++d];){var h=p.indexOf(` `),g=h>-1?p.slice(0,h):g;switch(g){case`diff`:d--;break simiLoop;case`deleted`:case`new`:var _=p.slice(h+1);_.indexOf(`file mode`)===0&&(t[g===`new`?`newMode`:`oldMode`]=_.slice(10));break;case`similarity`:t.similarity=parseInt(p.split(` `)[2],10);break;case`index`:var v=p.slice(h+1).split(` `),y=v[0].split(`..`);t.oldRevision=y[0],t.newRevision=y[1],v[1]&&(t.oldMode=t.newMode=v[1]);break;case`copy`:case`rename`:var b=p.slice(h+1);b.indexOf(`from`)===0?t.oldPath=b.slice(5):t.newPath=b.slice(3),m=g;break;case`---`:var x=p.slice(h+1),S=l[++d].slice(4);x===`/dev/null`?(S=S.slice(2),m=`add`):S===`/dev/null`?(x=x.slice(2),m=`delete`):(m=`modify`,x=x.slice(2),S=S.slice(2)),x&&(t.oldPath=x),S&&(t.newPath=S),c=5;break simiLoop}}t.type=m||`modify`}else if(f.indexOf(`Binary`)===0)t.isBinary=!0,t.type=f.indexOf(`/dev/null and`)>=0?`add`:f.indexOf(`and /dev/null`)>=0?`delete`:`modify`,c=2,t=null;else if(c===5)if(f.indexOf(`@@`)===0){var C=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(f);r={content:f,oldStart:C[1]-0,newStart:C[4]-0,oldLines:C[3]-0||1,newLines:C[6]-0||1,changes:[]},t.hunks.push(r),i=r.oldStart,a=r.newStart}else{var w=f.slice(0,1),T={content:f.slice(1)};switch(w){case`+`:T.type=`insert`,T.isInsert=!0,T.lineNumber=a,a++;break;case`-`:T.type=`delete`,T.isDelete=!0,T.lineNumber=i,i++;break;case` `:T.type=`normal`,T.isNormal=!0,T.oldLineNumber=i,T.newLineNumber=a,i++,a++;break;case`\\`:var E=r.changes[r.changes.length-1];E.isDelete||(t.newEndingNewLine=!1),E.isInsert||(t.oldEndingNewLine=!1)}T.type&&r.changes.push(T)}d++}return s}}})()}));function D(e){return e.type===`insert`}function O(e){return e.type===`delete`}function k(e){return e.type===`normal`}function A(e,t){var n=t.nearbySequences===`zip`?function(e){return d(e.reduce((function(e,t,n){var r=d(e,3),i=r[0],a=r[1],o=r[2];return a?D(t)&&o>=0?(i.splice(o+1,0,t),[i,t,o+2]):(i.push(t),[i,t,O(t)&&O(a)?o:n]):(i.push(t),[i,t,O(t)?n:-1])}),[[],null,-1]),1)[0]}(e.changes):e.changes;return c(c({},e),{},{isPlain:!1,changes:n})}function j(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=function(e){if(e.startsWith(`diff --git`))return e;var t=e.indexOf(`
|
|
6
|
+
`),n=e.indexOf(`
|
|
7
|
+
`,t+1),r=e.slice(0,t),i=e.slice(t+1,n),a=r.split(` `).slice(1,-3).join(` `),o=i.split(` `).slice(1,-3).join(` `);return[`diff --git a/${a} b/${o}`,`index 1111111..2222222 100644`,`--- a/${a}`,`+++ b/${o}`,e.slice(n+1)].join(`
|
|
8
|
+
`)}(e.trimStart());return E.parse(n).map((function(e){return function(e,t){var n=e.hunks.map((function(e){return A(e,t)}));return c(c({},e),{},{hunks:n})}(e,t)}))}function M(e){return e[0]}function N(e){return e[e.length-1]}function P(e){return[`${e}Start`,`${e}Lines`]}function F(e){return e===`old`?function(e){return D(e)?-1:k(e)?e.oldLineNumber:e.lineNumber}:function(e){return O(e)?-1:k(e)?e.newLineNumber:e.lineNumber}}function I(e,t){return function(n,r){var i=n[e],a=i+n[t];return r>=i&&r<a}}function ee(e,t){return function(n,r,i){var a=n[e]+n[t],o=r[e];return i>=a&&i<o}}function te(e){var t=F(e),n=function(e){var t=d(P(e),2),n=I(t[0],t[1]);return function(e,t){return e.find((function(e){return n(e,t)}))}}(e);return function(e,r){var i=n(e,r);if(i)return i.changes.find((function(e){return t(e)===r}))}}function ne(e){var t=e===`old`?`new`:`old`,n=d(P(e),2),r=n[0],i=n[1],a=d(P(t),2),o=a[0],s=a[1],c=F(e),l=F(t),u=I(r,i),f=ee(r,i);return function(e,t){var n=M(e);if(t<n[r]){var a=n[r]-t;return n[o]-a}var d=N(e);if(d[r]+d[i]<=t){var p=t-d[r]-d[i];return d[o]+d[s]+p}for(var m=0;m<e.length;m++){var h=e[m],g=e[m+1];if(u(h,t)){var _=h.changes.findIndex((function(e){return c(e)===t})),v=h.changes[_];if(k(v))return l(v);var y=O(v)?_+1:_-1,b=h.changes[y];if(!b)return-1;var x=D(v)?`delete`:`insert`;return b.type===x?l(b):-1}if(f(h,g,t)){var S=t-h[r]-h[i];return h[o]+h[s]+S}}throw Error(`Unexpected line position ${t}`)}}var re=function(){this.__data__=[],this.size=0},ie=function(e,t){return e===t||e!=e&&t!=t},L=function(e,t){for(var n=e.length;n--;)if(ie(e[n][0],t))return n;return-1},ae=Array.prototype.splice,R=function(e){var t=this.__data__,n=L(t,e);return!(n<0)&&(n==t.length-1?t.pop():ae.call(t,n,1),--this.size,!0)},z=function(e){var t=this.__data__,n=L(t,e);return n<0?void 0:t[n][1]},oe=function(e){return L(this.__data__,e)>-1},se=function(e,t){var n=this.__data__,r=L(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this};function B(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}B.prototype.clear=re,B.prototype.delete=R,B.prototype.get=z,B.prototype.has=oe,B.prototype.set=se;var ce=B,le=function(){this.__data__=new ce,this.size=0},ue=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},de=function(e){return this.__data__.get(e)},fe=function(e){return this.__data__.has(e)},pe=typeof y==`object`&&y&&y.Object===Object&&y,me=typeof self==`object`&&self&&self.Object===Object&&self,V=pe||me||Function(`return this`)(),H=V.Symbol,he=Object.prototype,ge=he.hasOwnProperty,_e=he.toString,ve=H?H.toStringTag:void 0,ye=function(e){var t=ge.call(e,ve),n=e[ve];try{e[ve]=void 0;var r=!0}catch{}var i=_e.call(e);return r&&(t?e[ve]=n:delete e[ve]),i},be=Object.prototype.toString,xe=function(e){return be.call(e)},Se=H?H.toStringTag:void 0,U=function(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Se&&Se in Object(e)?ye(e):xe(e)},Ce=function(e){var t=typeof e;return e!=null&&(t==`object`||t==`function`)},we=function(e){if(!Ce(e))return!1;var t=U(e);return t==`[object Function]`||t==`[object GeneratorFunction]`||t==`[object AsyncFunction]`||t==`[object Proxy]`},Te=V[`__core-js_shared__`],Ee=function(){var e=/[^.]+$/.exec(Te&&Te.keys&&Te.keys.IE_PROTO||``);return e?`Symbol(src)_1.`+e:``}(),De=function(e){return!!Ee&&Ee in e},Oe=Function.prototype.toString,W=function(e){if(e!=null){try{return Oe.call(e)}catch{}try{return e+``}catch{}}return``},ke=/^\[object .+?Constructor\]$/,Ae=Function.prototype,je=Object.prototype,Me=Ae.toString,Ne=je.hasOwnProperty,Pe=RegExp(`^`+Me.call(Ne).replace(/[\\^$.*+?()[\]{}|]/g,`\\$&`).replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,`$1.*?`)+`$`),Fe=function(e){return!(!Ce(e)||De(e))&&(we(e)?Pe:ke).test(W(e))},Ie=function(e,t){return e?.[t]},G=function(e,t){var n=Ie(e,t);return Fe(n)?n:void 0},Le=G(V,`Map`),Re=G(Object,`create`),ze=function(){this.__data__=Re?Re(null):{},this.size=0},Be=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=+!!t,t},Ve=Object.prototype.hasOwnProperty,He=function(e){var t=this.__data__;if(Re){var n=t[e];return n===`__lodash_hash_undefined__`?void 0:n}return Ve.call(t,e)?t[e]:void 0},Ue=Object.prototype.hasOwnProperty,We=function(e){var t=this.__data__;return Re?t[e]!==void 0:Ue.call(t,e)},Ge=function(e,t){var n=this.__data__;return this.size+=+!this.has(e),n[e]=Re&&t===void 0?`__lodash_hash_undefined__`:t,this};function K(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}K.prototype.clear=ze,K.prototype.delete=Be,K.prototype.get=He,K.prototype.has=We,K.prototype.set=Ge;var Ke=K,qe=function(){this.size=0,this.__data__={hash:new Ke,map:new(Le||ce),string:new Ke}},Je=function(e){var t=typeof e;return t==`string`||t==`number`||t==`symbol`||t==`boolean`?e!==`__proto__`:e===null},Ye=function(e,t){var n=e.__data__;return Je(t)?n[typeof t==`string`?`string`:`hash`]:n.map},Xe=function(e){var t=Ye(this,e).delete(e);return this.size-=+!!t,t},Ze=function(e){return Ye(this,e).get(e)},Qe=function(e){return Ye(this,e).has(e)},$e=function(e,t){var n=Ye(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this};function q(e){var t=-1,n=e==null?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}q.prototype.clear=qe,q.prototype.delete=Xe,q.prototype.get=Ze,q.prototype.has=Qe,q.prototype.set=$e;var et=q,tt=function(e,t){var n=this.__data__;if(n instanceof ce){var r=n.__data__;if(!Le||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new et(r)}return n.set(e,t),this.size=n.size,this};function J(e){this.size=(this.__data__=new ce(e)).size}J.prototype.clear=le,J.prototype.delete=ue,J.prototype.get=de,J.prototype.has=fe,J.prototype.set=tt;var nt=J,rt=function(e){return this.__data__.set(e,`__lodash_hash_undefined__`),this},it=function(e){return this.__data__.has(e)};function at(e){var t=-1,n=e==null?0:e.length;for(this.__data__=new et;++t<n;)this.add(e[t])}at.prototype.add=at.prototype.push=rt,at.prototype.has=it;var ot=at,st=function(e,t){for(var n=-1,r=e==null?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1},ct=function(e,t){return e.has(t)},lt=function(e,t,n,r,i,a){var o=1&n,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var d=-1,f=!0,p=2&n?new ot:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var m=e[d],h=t[d];if(r)var g=o?r(h,m,d,t,e,a):r(m,h,d,e,t,a);if(g!==void 0){if(g)continue;f=!1;break}if(p){if(!st(t,(function(e,t){if(!ct(p,t)&&(m===e||i(m,e,n,r,a)))return p.push(t)}))){f=!1;break}}else if(m!==h&&!i(m,h,n,r,a)){f=!1;break}}return a.delete(e),a.delete(t),f},ut=V.Uint8Array,dt=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n},ft=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n},pt=H?H.prototype:void 0,mt=pt?pt.valueOf:void 0,ht=function(e,t,n,r,i,a,o){switch(n){case`[object DataView]`:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case`[object ArrayBuffer]`:return!(e.byteLength!=t.byteLength||!a(new ut(e),new ut(t)));case`[object Boolean]`:case`[object Date]`:case`[object Number]`:return ie(+e,+t);case`[object Error]`:return e.name==t.name&&e.message==t.message;case`[object RegExp]`:case`[object String]`:return e==t+``;case`[object Map]`:var s=dt;case`[object Set]`:var c=1&r;if(s||=ft,e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=lt(s(e),s(t),r,i,a,o);return o.delete(e),u;case`[object Symbol]`:if(mt)return mt.call(e)==mt.call(t)}return!1},gt=function(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e},Y=Array.isArray,_t=function(e,t,n){var r=t(e);return Y(e)?r:gt(r,n(e))},vt=function(e,t){for(var n=-1,r=e==null?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a},yt=function(){return[]},bt=Object.prototype.propertyIsEnumerable,xt=Object.getOwnPropertySymbols,St=xt?function(e){return e==null?[]:(e=Object(e),vt(xt(e),(function(t){return bt.call(e,t)})))}:yt,Ct=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r},X=function(e){return typeof e==`object`&&!!e},wt=function(e){return X(e)&&U(e)==`[object Arguments]`},Tt=Object.prototype,Et=Tt.hasOwnProperty,Dt=Tt.propertyIsEnumerable,Ot=wt(function(){return arguments}())?wt:function(e){return X(e)&&Et.call(e,`callee`)&&!Dt.call(e,`callee`)},kt=function(){return!1},At=b((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n?V.Buffer:void 0;e.exports=(i?i.isBuffer:void 0)||kt})),jt=/^(?:0|[1-9]\d*)$/,Mt=function(e,t){var n=typeof e;return!!(t??=9007199254740991)&&(n==`number`||n!=`symbol`&&jt.test(e))&&e>-1&&e%1==0&&e<t},Nt=function(e){return typeof e==`number`&&e>-1&&e%1==0&&e<=9007199254740991},Z={};Z[`[object Float32Array]`]=Z[`[object Float64Array]`]=Z[`[object Int8Array]`]=Z[`[object Int16Array]`]=Z[`[object Int32Array]`]=Z[`[object Uint8Array]`]=Z[`[object Uint8ClampedArray]`]=Z[`[object Uint16Array]`]=Z[`[object Uint32Array]`]=!0,Z[`[object Arguments]`]=Z[`[object Array]`]=Z[`[object ArrayBuffer]`]=Z[`[object Boolean]`]=Z[`[object DataView]`]=Z[`[object Date]`]=Z[`[object Error]`]=Z[`[object Function]`]=Z[`[object Map]`]=Z[`[object Number]`]=Z[`[object Object]`]=Z[`[object RegExp]`]=Z[`[object Set]`]=Z[`[object String]`]=Z[`[object WeakMap]`]=!1;var Pt=function(e){return X(e)&&Nt(e.length)&&!!Z[U(e)]},Ft=function(e){return function(t){return e(t)}},It=b((function(e,t){var n=t&&!t.nodeType&&t,r=n&&e&&!e.nodeType&&e,i=r&&r.exports===n&&pe.process;e.exports=function(){try{return r&&r.require&&r.require(`util`).types||i&&i.binding&&i.binding(`util`)}catch{}}()})),Lt=It&&It.isTypedArray,Rt=Lt?Ft(Lt):Pt,zt=Object.prototype.hasOwnProperty,Bt=function(e,t){var n=Y(e),r=!n&&Ot(e),i=!n&&!r&&At(e),a=!n&&!r&&!i&&Rt(e),o=n||r||i||a,s=o?Ct(e.length,String):[],c=s.length;for(var l in e)!t&&!zt.call(e,l)||o&&(l==`length`||i&&(l==`offset`||l==`parent`)||a&&(l==`buffer`||l==`byteLength`||l==`byteOffset`)||Mt(l,c))||s.push(l);return s},Vt=Object.prototype,Ht=function(e){var t=e&&e.constructor;return e===(typeof t==`function`&&t.prototype||Vt)},Ut=function(e,t){return function(n){return e(t(n))}}(Object.keys,Object),Wt=Object.prototype.hasOwnProperty,Gt=function(e){if(!Ht(e))return Ut(e);var t=[];for(var n in Object(e))Wt.call(e,n)&&n!=`constructor`&&t.push(n);return t},Kt=function(e){return e!=null&&Nt(e.length)&&!we(e)},qt=function(e){return Kt(e)?Bt(e):Gt(e)},Jt=function(e){return _t(e,qt,St)},Yt=Object.prototype.hasOwnProperty,Xt=function(e,t,n,r,i,a){var o=1&n,s=Jt(e),c=s.length;if(c!=Jt(t).length&&!o)return!1;for(var l=c;l--;){var u=s[l];if(!(o?u in t:Yt.call(t,u)))return!1}var d=a.get(e),f=a.get(t);if(d&&f)return d==t&&f==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++l<c;){var h=e[u=s[l]],g=t[u];if(r)var _=o?r(g,h,u,t,e,a):r(h,g,u,e,t,a);if(!(_===void 0?h===g||i(h,g,n,r,a):_)){p=!1;break}m||=u==`constructor`}if(p&&!m){var v=e.constructor,y=t.constructor;v==y||!(`constructor`in e)||!(`constructor`in t)||typeof v==`function`&&v instanceof v&&typeof y==`function`&&y instanceof y||(p=!1)}return a.delete(e),a.delete(t),p},Zt=G(V,`DataView`),Qt=G(V,`Promise`),$t=G(V,`Set`),en=G(V,`WeakMap`),tn=W(Zt),nn=W(Le),rn=W(Qt),an=W($t),on=W(en),Q=U;(Zt&&Q(new Zt(new ArrayBuffer(1)))!=`[object DataView]`||Le&&Q(new Le)!=`[object Map]`||Qt&&Q(Qt.resolve())!=`[object Promise]`||$t&&Q(new $t)!=`[object Set]`||en&&Q(new en)!=`[object WeakMap]`)&&(Q=function(e){var t=U(e),n=t==`[object Object]`?e.constructor:void 0,r=n?W(n):``;if(r)switch(r){case tn:return`[object DataView]`;case nn:return`[object Map]`;case rn:return`[object Promise]`;case an:return`[object Set]`;case on:return`[object WeakMap]`}return t});var sn=Q,cn=`[object Object]`,ln=Object.prototype.hasOwnProperty,un=function(e,t,n,r,i,a){var o=Y(e),s=Y(t),c=o?`[object Array]`:sn(e),l=s?`[object Array]`:sn(t),u=(c=c==`[object Arguments]`?cn:c)==cn,d=(l=l==`[object Arguments]`?cn:l)==cn,f=c==l;if(f&&At(e)){if(!At(t))return!1;o=!0,u=!1}if(f&&!u)return a||=new nt,o||Rt(e)?lt(e,t,n,r,i,a):ht(e,t,c,n,r,i,a);if(!(1&n)){var p=u&&ln.call(e,`__wrapped__`),m=d&&ln.call(t,`__wrapped__`);if(p||m){var h=p?e.value():e,g=m?t.value():t;return a||=new nt,i(h,g,n,r,a)}}return!!f&&(a||=new nt,Xt(e,t,n,r,i,a))},dn=function e(t,n,r,i,a){return t===n||(t==null||n==null||!X(t)&&!X(n)?t!=t&&n!=n:un(t,n,r,i,e,a))},fn=function(e,t,n,r){var i=n.length,a=i,o=!r;if(e==null)return!a;for(e=Object(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],u=s[1];if(o&&s[2]){if(l===void 0&&!(c in e))return!1}else{var d=new nt;if(r)var f=r(l,u,c,e,t,d);if(!(f===void 0?dn(u,l,3,r,d):f))return!1}}return!0},pn=function(e){return e==e&&!Ce(e)},mn=function(e){for(var t=qt(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,pn(i)]}return t},hn=function(e,t){return function(n){return n!=null&&n[e]===t&&(t!==void 0||e in Object(n))}},gn=function(e){var t=mn(e);return t.length==1&&t[0][2]?hn(t[0][0],t[0][1]):function(n){return n===e||fn(n,e,t)}},_n=function(e){return typeof e==`symbol`||X(e)&&U(e)==`[object Symbol]`},vn=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,yn=/^\w*$/,bn=function(e,t){if(Y(e))return!1;var n=typeof e;return!(n!=`number`&&n!=`symbol`&&n!=`boolean`&&e!=null&&!_n(e))||yn.test(e)||!vn.test(e)||t!=null&&e in Object(t)};function xn(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);var n=function(){var r=arguments,i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(xn.Cache||et),n}xn.Cache=et;var Sn=xn,Cn=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,wn=/\\(\\)?/g,Tn=function(e){var t=Sn(e,(function(e){return n.size===500&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return e.charCodeAt(0)===46&&t.push(``),e.replace(Cn,(function(e,n,r,i){t.push(r?i.replace(wn,`$1`):n||e)})),t})),En=function(e,t){for(var n=-1,r=e==null?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i},Dn=H?H.prototype:void 0,On=Dn?Dn.toString:void 0,kn=function e(t){if(typeof t==`string`)return t;if(Y(t))return En(t,e)+``;if(_n(t))return On?On.call(t):``;var n=t+``;return n==`0`&&1/t==-1/0?`-0`:n},An=function(e){return e==null?``:kn(e)},jn=function(e,t){return Y(e)?e:bn(e,t)?[e]:Tn(An(e))},Mn=function(e){if(typeof e==`string`||_n(e))return e;var t=e+``;return t==`0`&&1/e==-1/0?`-0`:t},Nn=function(e,t){for(var n=0,r=(t=jn(t,e)).length;e!=null&&n<r;)e=e[Mn(t[n++])];return n&&n==r?e:void 0},Pn=function(e,t,n){var r=e==null?void 0:Nn(e,t);return r===void 0?n:r},Fn=function(e,t){return e!=null&&t in Object(e)},In=function(e,t,n){for(var r=-1,i=(t=jn(t,e)).length,a=!1;++r<i;){var o=Mn(t[r]);if(!(a=e!=null&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=e==null?0:e.length)&&Nt(i)&&Mt(o,i)&&(Y(e)||Ot(e))},Ln=function(e,t){return e!=null&&In(e,t,Fn)},Rn=function(e,t){return bn(e)&&pn(t)?hn(Mn(e),t):function(n){var r=Pn(n,e);return r===void 0&&r===t?Ln(n,e):dn(t,r,3)}},zn=function(e){return e},Bn=function(e){return function(t){return t?.[e]}},Vn=function(e){return function(t){return Nn(t,e)}},Hn=function(e){return bn(e)?Bn(Mn(e)):Vn(e)},Un=function(e){return typeof e==`function`?e:e==null?zn:typeof e==`object`?Y(e)?Rn(e[0],e[1]):gn(e):Hn(e)};function $(e){if(!e)throw Error(`change is not provided`);return k(e)?`N${e.oldLineNumber}`:`${D(e)?`I`:`D`}${e.lineNumber}`}ne(`old`);var Wn=F(`old`),Gn=F(`new`);te(`old`),te(`new`),ne(`new`),ne(`old`);var Kn=function(){try{var e=G(Object,`defineProperty`);return e({},``,{}),e}catch{}}(),qn=function(e,t,n){t==`__proto__`&&Kn?Kn(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n},Jn=function(e){return function(t,n,r){for(var i=-1,a=Object(t),o=r(t),s=o.length;s--;){var c=o[e?s:++i];if(!1===n(a[c],c,a))break}return t}}(),Yn=function(e,t){return e&&Jn(e,t,qt)},Xn=function(e,t){var n={};return t=Un(t),Yn(e,(function(e,r,i){qn(n,r,t(e,r,i))})),n},Zn=[`changeKey`,`text`,`tokens`,`renderToken`],Qn=function e(t,n){var r=t.type,i=t.value,o=t.markType,s=t.properties,c=t.className,l=t.children,u=function(t){return(0,a.jsx)(`span`,{className:t,children:i||l&&l.map(e)},n)};switch(r){case`text`:return i;case`mark`:return u(`diff-code-mark diff-code-mark-${o}`);case`edit`:return u(`diff-code-edit`);default:var d=s&&s.className;return u(x(c||d))}};function $n(e){if(!Array.isArray(e))return!0;if(e.length>1)return!1;if(e.length===1){var t=d(e,1)[0];return t.type===`text`&&!t.value}return!0}function er(e){var t=e.changeKey,n=e.text,r=e.tokens,i=e.renderToken,o=u(e,Zn),s=i?function(e,t){return i(e,Qn,t)}:Qn;return(0,a.jsx)(`td`,c(c({},o),{},{"data-change-key":t,children:r?$n(r)?` `:r.map(s):n||` `}))}var tr=(0,o.memo)(er);function nr(e,t){return function(){var n=t===`old`?Wn(e):Gn(e);return n===-1?void 0:n}}function rr(e,t){return function(n){return e&&n?(0,a.jsx)(`a`,{href:t?`#`+t:void 0,children:n}):n}}function ir(e,t){return t?function(n){e(),t(n)}:e}function ar(e,t,n,r){return(0,o.useMemo)((function(){var i=Xn(e,(function(e){return function(n){return e&&e(t,n)}}));return i.onMouseEnter=ir(n,i.onMouseEnter),i.onMouseLeave=ir(r,i.onMouseLeave),i}),[e,n,r,t])}function or(e,t,n,r,i,o,s,l,u){var d={change:t,side:r,inHoverState:l,renderDefault:nr(t,r),wrapInAnchor:rr(i,o)};return(0,a.jsx)(`td`,c(c({className:e},s),{},{"data-change-key":n,children:u(d)}))}function sr(e){var t,n,r,i=e.change,s=e.selected,l=e.tokens,u=e.className,f=e.generateLineClassName,p=e.gutterClassName,m=e.codeClassName,h=e.gutterEvents,g=e.codeEvents,_=e.hideGutter,v=e.gutterAnchor,y=e.generateAnchorID,b=e.renderToken,S=e.renderGutter,C=i.type,w=i.content,T=$(i),E=d((t=d((0,o.useState)(!1),2),n=t[0],r=t[1],[n,(0,o.useCallback)((function(){return r(!0)}),[]),(0,o.useCallback)((function(){return r(!1)}),[])]),3),D=E[0],O=E[1],k=E[2],A=(0,o.useMemo)((function(){return{change:i}}),[i]),j=ar(h,A,O,k),M=ar(g,A,O,k),N=y(i),P=f({changes:[i],defaultGenerate:function(){return u}}),F=x(`diff-gutter`,`diff-gutter-${C}`,p,{"diff-gutter-selected":s}),I=x(`diff-code`,`diff-code-${C}`,m,{"diff-code-selected":s});return(0,a.jsxs)(`tr`,{id:N,className:x(`diff-line`,P),children:[!_&&or(F,i,T,`old`,v,N,j,D,S),!_&&or(F,i,T,`new`,v,N,j,D,S),(0,a.jsx)(tr,c({className:I,changeKey:T,text:w,tokens:l,renderToken:b},M))]})}var cr=(0,o.memo)(sr);function lr(e){var t=e.hideGutter,n=e.element;return(0,a.jsx)(`tr`,{className:`diff-widget`,children:(0,a.jsx)(`td`,{colSpan:t?1:3,className:`diff-widget-content`,children:n})})}var ur=[`hideGutter`,`selectedChanges`,`tokens`,`lineClassName`],dr=[`hunk`,`widgets`,`className`];function fr(e){var t=e.hunk,n=e.widgets,r=e.className,i=u(e,dr),o=function(e,t){return e.reduce((function(e,n){var r=$(n);e.push([`change`,r,n]);var i=t[r];return i&&e.push([`widget`,r,i]),e}),[])}(t.changes,n);return(0,a.jsx)(`tbody`,{className:x(`diff-hunk`,r),children:o.map((function(e){return function(e,t){var n=d(e,3),r=n[0],i=n[1],o=n[2],s=t.hideGutter,l=t.selectedChanges,f=t.tokens,p=t.lineClassName,m=u(t,ur);if(r===`change`){var h=O(o)?`old`:`new`,g=O(o)?Wn(o):Gn(o),_=f?f[h][g-1]:null;return(0,a.jsx)(cr,c({className:p,change:o,hideGutter:s,selected:l.includes(i),tokens:_},m),`change${i}`)}return r===`widget`?(0,a.jsx)(lr,{hideGutter:s,element:o},`widget${i}`):null}(e,i)}))})}var pr=0;function mr(e,t,n,r){var i=(0,o.useCallback)((function(){return t(e)}),[e,t]),a=(0,o.useCallback)((function(){return t(``)}),[t]);return(0,o.useMemo)((function(){var t=Xn(r,(function(t){return function(r){return t&&t({side:e,change:n},r)}}));return t.onMouseEnter=ir(i,t.onMouseEnter),t.onMouseLeave=ir(a,t.onMouseLeave),t}),[n,r,i,e,a])}function hr(e){var t=e.change,n=e.side,r=e.selected,i=e.tokens,o=e.gutterClassName,s=e.codeClassName,u=e.gutterEvents,d=e.codeEvents,f=e.anchorID,p=e.gutterAnchor,m=e.gutterAnchorTarget,h=e.hideGutter,g=e.hover,_=e.renderToken,v=e.renderGutter;if(!t){var y=x(`diff-gutter`,`diff-gutter-omit`,o),b=x(`diff-code`,`diff-code-omit`,s);return[!h&&(0,a.jsx)(`td`,{className:y},`gutter`),(0,a.jsx)(`td`,{className:b},`code`)]}var S=t.type,C=t.content,w=$(t),T=n===pr?`old`:`new`,E=c({id:f||void 0,className:x(`diff-gutter`,`diff-gutter-${S}`,l({"diff-gutter-selected":r},`diff-line-hover-`+T,g),o),children:v({change:t,side:T,inHoverState:g,renderDefault:nr(t,T),wrapInAnchor:rr(p,m)})},u),D=x(`diff-code`,`diff-code-${S}`,l({"diff-code-selected":r},`diff-line-hover-`+T,g),s);return[!h&&(0,a.jsx)(`td`,c(c({},E),{},{"data-change-key":w}),`gutter`),(0,a.jsx)(tr,c({className:D,changeKey:w,text:C,tokens:i,renderToken:_},d),`code`)]}function gr(e){var t=e.className,n=e.oldChange,r=e.newChange,i=e.oldSelected,s=e.newSelected,l=e.oldTokens,u=e.newTokens,f=e.monotonous,p=e.gutterClassName,m=e.codeClassName,h=e.gutterEvents,g=e.codeEvents,_=e.hideGutter,v=e.generateAnchorID,y=e.generateLineClassName,b=e.gutterAnchor,S=e.renderToken,C=e.renderGutter,w=d((0,o.useState)(``),2),T=w[0],E=w[1],D=mr(`old`,E,n,h),O=mr(`new`,E,r,h),k=mr(`old`,E,n,g),A=mr(`new`,E,r,g),j=n&&v(n),M=r&&v(r),N=y({changes:[n,r],defaultGenerate:function(){return t}}),P={monotonous:f,hideGutter:_,gutterClassName:p,codeClassName:m,gutterEvents:h,codeEvents:g,renderToken:S,renderGutter:C},F=c(c({},P),{},{change:n,side:pr,selected:i,tokens:l,gutterEvents:D,codeEvents:k,anchorID:j,gutterAnchor:b,gutterAnchorTarget:j,hover:T===`old`}),I=c(c({},P),{},{change:r,side:1,selected:s,tokens:u,gutterEvents:O,codeEvents:A,anchorID:n===r?null:M,gutterAnchor:b,gutterAnchorTarget:n===r?j:M,hover:T===`new`});return f?(0,a.jsx)(`tr`,{className:x(`diff-line`,N),children:hr(n?F:I)}):(0,a.jsxs)(`tr`,{className:x(`diff-line`,function(e,t){return e&&!t?`diff-line-old-only`:!e&&t?`diff-line-new-only`:e===t?`diff-line-normal`:`diff-line-compare`}(n,r),N),children:[hr(F),hr(I)]})}var _r=(0,o.memo)(gr);function vr(e){var t=e.hideGutter,n=e.oldElement,r=e.newElement;return e.monotonous?(0,a.jsx)(`tr`,{className:`diff-widget`,children:(0,a.jsx)(`td`,{colSpan:t?1:2,className:`diff-widget-content`,children:n||r})}):n===r?(0,a.jsx)(`tr`,{className:`diff-widget`,children:(0,a.jsx)(`td`,{colSpan:t?2:4,className:`diff-widget-content`,children:n})}):(0,a.jsxs)(`tr`,{className:`diff-widget`,children:[(0,a.jsx)(`td`,{colSpan:t?1:2,className:`diff-widget-content`,children:n}),(0,a.jsx)(`td`,{colSpan:t?1:2,className:`diff-widget-content`,children:r})]})}var yr=[`selectedChanges`,`monotonous`,`hideGutter`,`tokens`,`lineClassName`],br=[`hunk`,`widgets`,`className`];function xr(e,t){return(e?$(e):`00`)+(t?$(t):`00`)}function Sr(e){var t=e.hunk,n=e.widgets,r=e.className,i=u(e,br),o=function(e,t){for(var n=function(e){return e&&t[$(e)]||null},r=[],i=0;i<e.length;i++){var a=e[i];if(k(a))r.push([`change`,xr(a,a),a,a]);else if(O(a)){var o=e[i+1];o&&D(o)?(i+=1,r.push([`change`,xr(a,o),a,o])):r.push([`change`,xr(a,null),a,null])}else r.push([`change`,xr(null,a),null,a]);var s=r[r.length-1],c=n(s[2]),l=n(s[3]);if(c||l){var u=s[1];r.push([`widget`,u,c,l])}}return r}(t.changes,n);return(0,a.jsx)(`tbody`,{className:x(`diff-hunk`,r),children:o.map((function(e){return function(e,t){var n=d(e,4),r=n[0],i=n[1],o=n[2],s=n[3],l=t.selectedChanges,f=t.monotonous,p=t.hideGutter,m=t.tokens,h=t.lineClassName,g=u(t,yr);return r===`change`?(0,a.jsx)(_r,c({className:h,oldChange:o,newChange:s,monotonous:f,hideGutter:p,oldSelected:!!o&&l.includes($(o)),newSelected:!!s&&l.includes($(s)),oldTokens:o&&m?m.old[Wn(o)-1]:null,newTokens:s&&m?m.new[Gn(s)-1]:null},g),`change${i}`):r===`widget`?(0,a.jsx)(vr,{monotonous:f,hideGutter:p,oldElement:o,newElement:s},`widget${i}`):null}(e,i)}))})}var Cr=[`gutterType`,`hunkClassName`];function wr(e){var t=e.hunk,n=T(),r=n.gutterType,i=n.hunkClassName,o=u(n,Cr),s=r===`none`,l=r===`anchor`;return(0,a.jsx)(o.viewType===`unified`?fr:Sr,c(c({},o),{},{hunk:t,hideGutter:s,gutterAnchor:l,className:i}))}function Tr(){}function Er(e,t){var n=t?`auto`:`none`;e instanceof HTMLElement&&e.style.userSelect!==n&&(e.style.userSelect=n)}function Dr(e){return e.map((function(e){return(0,a.jsx)(wr,{hunk:e},function(e){return`-${e.oldStart},${e.oldLines} +${e.newStart},${e.newLines}`}(e))}))}function Or(e){var t=e.diffType,n=e.hunks,r=e.optimizeSelection,i=e.className,s=e.hunkClassName,c=s===void 0?S.hunkClassName:s,l=e.lineClassName,u=l===void 0?S.lineClassName:l,d=e.generateLineClassName,p=d===void 0?S.generateLineClassName:d,m=e.gutterClassName,h=m===void 0?S.gutterClassName:m,g=e.codeClassName,_=g===void 0?S.codeClassName:g,y=e.gutterType,b=y===void 0?S.gutterType:y,C=e.viewType,T=C===void 0?S.viewType:C,E=e.gutterEvents,D=E===void 0?S.gutterEvents:E,O=e.codeEvents,k=O===void 0?S.codeEvents:O,A=e.generateAnchorID,j=A===void 0?S.generateAnchorID:A,M=e.selectedChanges,N=M===void 0?S.selectedChanges:M,P=e.widgets,F=P===void 0?S.widgets:P,I=e.renderGutter,ee=I===void 0?S.renderGutter:I,te=e.tokens,ne=e.renderToken,re=e.children,ie=re===void 0?Dr:re,L=(0,o.useRef)(null),ae=(0,o.useCallback)((function(e){var t=e.target;if(e.button===0){var n=function(e,t){for(var n=e;n&&n!==document.documentElement&&!n.classList.contains(t);)n=n.parentElement;return n===document.documentElement?null:n}(t,`diff-code`);if(n&&n.parentElement){var r=window.getSelection();r&&r.removeAllRanges();var i=f(n.parentElement.children).indexOf(n);if(i===1||i===3){var a,o=v(L.current?L.current.querySelectorAll(`.diff-line`):[]);try{for(o.s();!(a=o.n()).done;){var s=a.value.children;Er(s[1],i===1),Er(s[3],i===3)}}catch(e){o.e(e)}finally{o.f()}}}}}),[]),R=b===`none`,z=t===`add`||t===`delete`,oe=T===`split`&&!z&&r?ae:Tr,se=(0,o.useMemo)((function(){return(0,a.jsxs)(`colgroup`,T===`unified`?{children:[!R&&(0,a.jsx)(`col`,{className:`diff-gutter-col`}),!R&&(0,a.jsx)(`col`,{className:`diff-gutter-col`}),(0,a.jsx)(`col`,{})]}:z?{children:[!R&&(0,a.jsx)(`col`,{className:`diff-gutter-col`}),(0,a.jsx)(`col`,{})]}:{children:[!R&&(0,a.jsx)(`col`,{className:`diff-gutter-col`}),(0,a.jsx)(`col`,{}),!R&&(0,a.jsx)(`col`,{className:`diff-gutter-col`}),(0,a.jsx)(`col`,{})]})}),[T,z,R]);return(0,a.jsx)(w,{value:(0,o.useMemo)((function(){return{hunkClassName:c,lineClassName:u,generateLineClassName:p,gutterClassName:h,codeClassName:_,monotonous:z,hideGutter:R,viewType:T,gutterType:b,codeEvents:k,gutterEvents:D,generateAnchorID:j,selectedChanges:N,widgets:F,renderGutter:ee,tokens:te,renderToken:ne}}),[_,k,j,h,D,b,R,c,u,p,z,ee,ne,N,te,T,F]),children:(0,a.jsxs)(`table`,{ref:L,className:x(`diff`,`diff-${T}`,i),onMouseDown:oe,children:[se,ie(n)]})})}var kr=(0,o.memo)(Or);(function(e,t){return function(n,r){if(n==null)return n;if(!Kt(n))return e(n,r);for(var i=n.length,a=t?i:-1,o=Object(n);(t?a--:++a<i)&&!1!==r(o[a],a,o););return n}})(Yn),H&&H.isConcatSpreadable;var Ar=b((function(e){var t=function(){this.Diff_Timeout=1,this.Diff_EditCost=4,this.Match_Threshold=.5,this.Match_Distance=1e3,this.Patch_DeleteThreshold=.5,this.Patch_Margin=4,this.Match_MaxBits=32};t.Diff=function(e,t){return[e,t]},t.prototype.diff_main=function(e,n,r,i){i===void 0&&(i=this.Diff_Timeout<=0?Number.MAX_VALUE:new Date().getTime()+1e3*this.Diff_Timeout);var a=i;if(e==null||n==null)throw Error(`Null input. (diff_main)`);if(e==n)return e?[new t.Diff(0,e)]:[];r===void 0&&(r=!0);var o=r,s=this.diff_commonPrefix(e,n),c=e.substring(0,s);e=e.substring(s),n=n.substring(s),s=this.diff_commonSuffix(e,n);var l=e.substring(e.length-s);e=e.substring(0,e.length-s),n=n.substring(0,n.length-s);var u=this.diff_compute_(e,n,o,a);return c&&u.unshift(new t.Diff(0,c)),l&&u.push(new t.Diff(0,l)),this.diff_cleanupMerge(u),u},t.prototype.diff_compute_=function(e,n,r,i){var a;if(!e)return[new t.Diff(1,n)];if(!n)return[new t.Diff(-1,e)];var o=e.length>n.length?e:n,s=e.length>n.length?n:e,c=o.indexOf(s);if(c!=-1)return a=[new t.Diff(1,o.substring(0,c)),new t.Diff(0,s),new t.Diff(1,o.substring(c+s.length))],e.length>n.length&&(a[0][0]=a[2][0]=-1),a;if(s.length==1)return[new t.Diff(-1,e),new t.Diff(1,n)];var l=this.diff_halfMatch_(e,n);if(l){var u=l[0],d=l[1],f=l[2],p=l[3],m=l[4],h=this.diff_main(u,f,r,i),g=this.diff_main(d,p,r,i);return h.concat([new t.Diff(0,m)],g)}return r&&e.length>100&&n.length>100?this.diff_lineMode_(e,n,i):this.diff_bisect_(e,n,i)},t.prototype.diff_lineMode_=function(e,n,r){var i=this.diff_linesToChars_(e,n);e=i.chars1,n=i.chars2;var a=i.lineArray,o=this.diff_main(e,n,!1,r);this.diff_charsToLines_(o,a),this.diff_cleanupSemantic(o),o.push(new t.Diff(0,``));for(var s=0,c=0,l=0,u=``,d=``;s<o.length;){switch(o[s][0]){case 1:l++,d+=o[s][1];break;case-1:c++,u+=o[s][1];break;case 0:if(c>=1&&l>=1){o.splice(s-c-l,c+l),s=s-c-l;for(var f=this.diff_main(u,d,!1,r),p=f.length-1;p>=0;p--)o.splice(s,0,f[p]);s+=f.length}l=0,c=0,u=``,d=``}s++}return o.pop(),o},t.prototype.diff_bisect_=function(e,n,r){for(var i=e.length,a=n.length,o=Math.ceil((i+a)/2),s=o,c=2*o,l=Array(c),u=Array(c),d=0;d<c;d++)l[d]=-1,u[d]=-1;l[s+1]=0,u[s+1]=0;for(var f=i-a,p=f%2!=0,m=0,h=0,g=0,_=0,v=0;v<o&&!(new Date().getTime()>r);v++){for(var y=-v+m;y<=v-h;y+=2){for(var b=s+y,x=(E=y==-v||y!=v&&l[b-1]<l[b+1]?l[b+1]:l[b-1]+1)-y;E<i&&x<a&&e.charAt(E)==n.charAt(x);)E++,x++;if(l[b]=E,E>i)h+=2;else if(x>a)m+=2;else if(p&&(w=s+f-y)>=0&&w<c&&u[w]!=-1&&E>=(C=i-u[w]))return this.diff_bisectSplit_(e,n,E,x,r)}for(var S=-v+g;S<=v-_;S+=2){for(var C,w=s+S,T=(C=S==-v||S!=v&&u[w-1]<u[w+1]?u[w+1]:u[w-1]+1)-S;C<i&&T<a&&e.charAt(i-C-1)==n.charAt(a-T-1);)C++,T++;if(u[w]=C,C>i)_+=2;else if(T>a)g+=2;else if(!p&&(b=s+f-S)>=0&&b<c&&l[b]!=-1){var E;if(x=s+(E=l[b])-b,E>=(C=i-C))return this.diff_bisectSplit_(e,n,E,x,r)}}}return[new t.Diff(-1,e),new t.Diff(1,n)]},t.prototype.diff_bisectSplit_=function(e,t,n,r,i){var a=e.substring(0,n),o=t.substring(0,r),s=e.substring(n),c=t.substring(r),l=this.diff_main(a,o,!1,i),u=this.diff_main(s,c,!1,i);return l.concat(u)},t.prototype.diff_linesToChars_=function(e,t){var n=[],r={};function i(e){for(var t=``,i=0,o=-1,s=n.length;o<e.length-1;){(o=e.indexOf(`
|
|
9
|
+
`,i))==-1&&(o=e.length-1);var c=e.substring(i,o+1);(r.hasOwnProperty?r.hasOwnProperty(c):r[c]!==void 0)?t+=String.fromCharCode(r[c]):(s==a&&(c=e.substring(i),o=e.length),t+=String.fromCharCode(s),r[c]=s,n[s++]=c),i=o+1}return t}n[0]=``;var a=4e4,o=i(e);return a=65535,{chars1:o,chars2:i(t),lineArray:n}},t.prototype.diff_charsToLines_=function(e,t){for(var n=0;n<e.length;n++){for(var r=e[n][1],i=[],a=0;a<r.length;a++)i[a]=t[r.charCodeAt(a)];e[n][1]=i.join(``)}},t.prototype.diff_commonPrefix=function(e,t){if(!e||!t||e.charAt(0)!=t.charAt(0))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(a,i)==t.substring(a,i)?a=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonSuffix=function(e,t){if(!e||!t||e.charAt(e.length-1)!=t.charAt(t.length-1))return 0;for(var n=0,r=Math.min(e.length,t.length),i=r,a=0;n<i;)e.substring(e.length-i,e.length-a)==t.substring(t.length-i,t.length-a)?a=n=i:r=i,i=Math.floor((r-n)/2+n);return i},t.prototype.diff_commonOverlap_=function(e,t){var n=e.length,r=t.length;if(n==0||r==0)return 0;n>r?e=e.substring(n-r):n<r&&(t=t.substring(0,n));var i=Math.min(n,r);if(e==t)return i;for(var a=0,o=1;;){var s=e.substring(i-o),c=t.indexOf(s);if(c==-1)return a;o+=c,c!=0&&e.substring(i-o)!=t.substring(0,o)||(a=o,o++)}},t.prototype.diff_halfMatch_=function(e,t){if(this.Diff_Timeout<=0)return null;var n=e.length>t.length?e:t,r=e.length>t.length?t:e;if(n.length<4||2*r.length<n.length)return null;var i=this;function a(e,t,n){for(var r,a,o,s,c=e.substring(n,n+Math.floor(e.length/4)),l=-1,u=``;(l=t.indexOf(c,l+1))!=-1;){var d=i.diff_commonPrefix(e.substring(n),t.substring(l)),f=i.diff_commonSuffix(e.substring(0,n),t.substring(0,l));u.length<f+d&&(u=t.substring(l-f,l)+t.substring(l,l+d),r=e.substring(0,n-f),a=e.substring(n+d),o=t.substring(0,l-f),s=t.substring(l+d))}return 2*u.length>=e.length?[r,a,o,s,u]:null}var o,s,c,l,u,d=a(n,r,Math.ceil(n.length/4)),f=a(n,r,Math.ceil(n.length/2));return d||f?(o=f?d&&d[4].length>f[4].length?d:f:d,e.length>t.length?(s=o[0],c=o[1],l=o[2],u=o[3]):(l=o[0],u=o[1],s=o[2],c=o[3]),[s,c,l,u,o[4]]):null},t.prototype.diff_cleanupSemantic=function(e){for(var n=!1,r=[],i=0,a=null,o=0,s=0,c=0,l=0,u=0;o<e.length;)e[o][0]==0?(r[i++]=o,s=l,c=u,l=0,u=0,a=e[o][1]):(e[o][0]==1?l+=e[o][1].length:u+=e[o][1].length,a&&a.length<=Math.max(s,c)&&a.length<=Math.max(l,u)&&(e.splice(r[i-1],0,new t.Diff(-1,a)),e[r[i-1]+1][0]=1,i--,o=--i>0?r[i-1]:-1,s=0,c=0,l=0,u=0,a=null,n=!0)),o++;for(n&&this.diff_cleanupMerge(e),this.diff_cleanupSemanticLossless(e),o=1;o<e.length;){if(e[o-1][0]==-1&&e[o][0]==1){var d=e[o-1][1],f=e[o][1],p=this.diff_commonOverlap_(d,f),m=this.diff_commonOverlap_(f,d);p>=m?(p>=d.length/2||p>=f.length/2)&&(e.splice(o,0,new t.Diff(0,f.substring(0,p))),e[o-1][1]=d.substring(0,d.length-p),e[o+1][1]=f.substring(p),o++):(m>=d.length/2||m>=f.length/2)&&(e.splice(o,0,new t.Diff(0,d.substring(0,m))),e[o-1][0]=1,e[o-1][1]=f.substring(0,f.length-m),e[o+1][0]=-1,e[o+1][1]=d.substring(m),o++),o++}o++}},t.prototype.diff_cleanupSemanticLossless=function(e){function n(e,n){if(!e||!n)return 6;var r=e.charAt(e.length-1),i=n.charAt(0),a=r.match(t.nonAlphaNumericRegex_),o=i.match(t.nonAlphaNumericRegex_),s=a&&r.match(t.whitespaceRegex_),c=o&&i.match(t.whitespaceRegex_),l=s&&r.match(t.linebreakRegex_),u=c&&i.match(t.linebreakRegex_),d=l&&e.match(t.blanklineEndRegex_),f=u&&n.match(t.blanklineStartRegex_);return d||f?5:l||u?4:a&&!s&&c?3:s||c?2:a||o?1:0}for(var r=1;r<e.length-1;){if(e[r-1][0]==0&&e[r+1][0]==0){var i=e[r-1][1],a=e[r][1],o=e[r+1][1],s=this.diff_commonSuffix(i,a);if(s){var c=a.substring(a.length-s);i=i.substring(0,i.length-s),a=c+a.substring(0,a.length-s),o=c+o}for(var l=i,u=a,d=o,f=n(i,a)+n(a,o);a.charAt(0)===o.charAt(0);){i+=a.charAt(0),a=a.substring(1)+o.charAt(0),o=o.substring(1);var p=n(i,a)+n(a,o);p>=f&&(f=p,l=i,u=a,d=o)}e[r-1][1]!=l&&(l?e[r-1][1]=l:(e.splice(r-1,1),r--),e[r][1]=u,d?e[r+1][1]=d:(e.splice(r+1,1),r--))}r++}},t.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/,t.whitespaceRegex_=/\s/,t.linebreakRegex_=/[\r\n]/,t.blanklineEndRegex_=/\n\r?\n$/,t.blanklineStartRegex_=/^\r?\n\r?\n/,t.prototype.diff_cleanupEfficiency=function(e){for(var n=!1,r=[],i=0,a=null,o=0,s=!1,c=!1,l=!1,u=!1;o<e.length;)e[o][0]==0?(e[o][1].length<this.Diff_EditCost&&(l||u)?(r[i++]=o,s=l,c=u,a=e[o][1]):(i=0,a=null),l=u=!1):(e[o][0]==-1?u=!0:l=!0,a&&(s&&c&&l&&u||a.length<this.Diff_EditCost/2&&s+c+l+u==3)&&(e.splice(r[i-1],0,new t.Diff(-1,a)),e[r[i-1]+1][0]=1,i--,a=null,s&&c?(l=u=!0,i=0):(o=--i>0?r[i-1]:-1,l=u=!1),n=!0)),o++;n&&this.diff_cleanupMerge(e)},t.prototype.diff_cleanupMerge=function(e){e.push(new t.Diff(0,``));for(var n,r=0,i=0,a=0,o=``,s=``;r<e.length;)switch(e[r][0]){case 1:a++,s+=e[r][1],r++;break;case-1:i++,o+=e[r][1],r++;break;case 0:i+a>1?(i!==0&&a!==0&&((n=this.diff_commonPrefix(s,o))!==0&&(r-i-a>0&&e[r-i-a-1][0]==0?e[r-i-a-1][1]+=s.substring(0,n):(e.splice(0,0,new t.Diff(0,s.substring(0,n))),r++),s=s.substring(n),o=o.substring(n)),(n=this.diff_commonSuffix(s,o))!==0&&(e[r][1]=s.substring(s.length-n)+e[r][1],s=s.substring(0,s.length-n),o=o.substring(0,o.length-n))),r-=i+a,e.splice(r,i+a),o.length&&(e.splice(r,0,new t.Diff(-1,o)),r++),s.length&&(e.splice(r,0,new t.Diff(1,s)),r++),r++):r!==0&&e[r-1][0]==0?(e[r-1][1]+=e[r][1],e.splice(r,1)):r++,a=0,i=0,o=``,s=``}e[e.length-1][1]===``&&e.pop();var c=!1;for(r=1;r<e.length-1;)e[r-1][0]==0&&e[r+1][0]==0&&(e[r][1].substring(e[r][1].length-e[r-1][1].length)==e[r-1][1]?(e[r][1]=e[r-1][1]+e[r][1].substring(0,e[r][1].length-e[r-1][1].length),e[r+1][1]=e[r-1][1]+e[r+1][1],e.splice(r-1,1),c=!0):e[r][1].substring(0,e[r+1][1].length)==e[r+1][1]&&(e[r-1][1]+=e[r+1][1],e[r][1]=e[r][1].substring(e[r+1][1].length)+e[r+1][1],e.splice(r+1,1),c=!0)),r++;c&&this.diff_cleanupMerge(e)},t.prototype.diff_xIndex=function(e,t){var n,r=0,i=0,a=0,o=0;for(n=0;n<e.length&&(e[n][0]!==1&&(r+=e[n][1].length),e[n][0]!==-1&&(i+=e[n][1].length),!(r>t));n++)a=r,o=i;return e.length!=n&&e[n][0]===-1?o:o+(t-a)},t.prototype.diff_prettyHtml=function(e){for(var t=[],n=/&/g,r=/</g,i=/>/g,a=/\n/g,o=0;o<e.length;o++){var s=e[o][0],c=e[o][1].replace(n,`&`).replace(r,`<`).replace(i,`>`).replace(a,`¶<br>`);switch(s){case 1:t[o]=`<ins style="background:#e6ffe6;">`+c+`</ins>`;break;case-1:t[o]=`<del style="background:#ffe6e6;">`+c+`</del>`;break;case 0:t[o]=`<span>`+c+`</span>`}}return t.join(``)},t.prototype.diff_text1=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==1&&(t[n]=e[n][1]);return t.join(``)},t.prototype.diff_text2=function(e){for(var t=[],n=0;n<e.length;n++)e[n][0]!==-1&&(t[n]=e[n][1]);return t.join(``)},t.prototype.diff_levenshtein=function(e){for(var t=0,n=0,r=0,i=0;i<e.length;i++){var a=e[i][0],o=e[i][1];switch(a){case 1:n+=o.length;break;case-1:r+=o.length;break;case 0:t+=Math.max(n,r),n=0,r=0}}return t+=Math.max(n,r)},t.prototype.diff_toDelta=function(e){for(var t=[],n=0;n<e.length;n++)switch(e[n][0]){case 1:t[n]=`+`+encodeURI(e[n][1]);break;case-1:t[n]=`-`+e[n][1].length;break;case 0:t[n]=`=`+e[n][1].length}return t.join(` `).replace(/%20/g,` `)},t.prototype.diff_fromDelta=function(e,n){for(var r=[],i=0,a=0,o=n.split(/\t/g),s=0;s<o.length;s++){var c=o[s].substring(1);switch(o[s].charAt(0)){case`+`:try{r[i++]=new t.Diff(1,decodeURI(c))}catch{throw Error(`Illegal escape in diff_fromDelta: `+c)}break;case`-`:case`=`:var l=parseInt(c,10);if(isNaN(l)||l<0)throw Error(`Invalid number in diff_fromDelta: `+c);var u=e.substring(a,a+=l);o[s].charAt(0)==`=`?r[i++]=new t.Diff(0,u):r[i++]=new t.Diff(-1,u);break;default:if(o[s])throw Error(`Invalid diff operation in diff_fromDelta: `+o[s])}}if(a!=e.length)throw Error(`Delta length (`+a+`) does not equal source text length (`+e.length+`).`);return r},t.prototype.match_main=function(e,t,n){if(e==null||t==null||n==null)throw Error(`Null input. (match_main)`);return n=Math.max(0,Math.min(n,e.length)),e==t?0:e.length?e.substring(n,n+t.length)==t?n:this.match_bitap_(e,t,n):-1},t.prototype.match_bitap_=function(e,t,n){if(t.length>this.Match_MaxBits)throw Error(`Pattern too long for this browser.`);var r=this.match_alphabet_(t),i=this;function a(e,r){var a=e/t.length,o=Math.abs(n-r);return i.Match_Distance?a+o/i.Match_Distance:o?1:a}var o=this.Match_Threshold,s=e.indexOf(t,n);s!=-1&&(o=Math.min(a(0,s),o),(s=e.lastIndexOf(t,n+t.length))!=-1&&(o=Math.min(a(0,s),o)));var c,l,u=1<<t.length-1;s=-1;for(var d,f=t.length+e.length,p=0;p<t.length;p++){for(c=0,l=f;c<l;)a(p,n+l)<=o?c=l:f=l,l=Math.floor((f-c)/2+c);f=l;var m=Math.max(1,n-l+1),h=Math.min(n+l,e.length)+t.length,g=Array(h+2);g[h+1]=(1<<p)-1;for(var _=h;_>=m;_--){var v=r[e.charAt(_-1)];if(g[_]=p===0?(g[_+1]<<1|1)&v:(g[_+1]<<1|1)&v|(d[_+1]|d[_])<<1|1|d[_+1],g[_]&u){var y=a(p,_-1);if(y<=o){if(o=y,!((s=_-1)>n))break;m=Math.max(1,2*n-s)}}}if(a(p+1,n)>o)break;d=g}return s},t.prototype.match_alphabet_=function(e){for(var t={},n=0;n<e.length;n++)t[e.charAt(n)]=0;for(n=0;n<e.length;n++)t[e.charAt(n)]|=1<<e.length-n-1;return t},t.prototype.patch_addContext_=function(e,n){if(n.length!=0){if(e.start2===null)throw Error(`patch not initialized`);for(var r=n.substring(e.start2,e.start2+e.length1),i=0;n.indexOf(r)!=n.lastIndexOf(r)&&r.length<this.Match_MaxBits-this.Patch_Margin-this.Patch_Margin;)i+=this.Patch_Margin,r=n.substring(e.start2-i,e.start2+e.length1+i);i+=this.Patch_Margin;var a=n.substring(e.start2-i,e.start2);a&&e.diffs.unshift(new t.Diff(0,a));var o=n.substring(e.start2+e.length1,e.start2+e.length1+i);o&&e.diffs.push(new t.Diff(0,o)),e.start1-=a.length,e.start2-=a.length,e.length1+=a.length+o.length,e.length2+=a.length+o.length}},t.prototype.patch_make=function(e,n,r){var i,a;if(typeof e==`string`&&typeof n==`string`&&r===void 0)i=e,(a=this.diff_main(i,n,!0)).length>2&&(this.diff_cleanupSemantic(a),this.diff_cleanupEfficiency(a));else if(e&&typeof e==`object`&&n===void 0&&r===void 0)a=e,i=this.diff_text1(a);else if(typeof e==`string`&&n&&typeof n==`object`&&r===void 0)i=e,a=n;else{if(typeof e!=`string`||typeof n!=`string`||!r||typeof r!=`object`)throw Error(`Unknown call format to patch_make.`);i=e,a=r}if(a.length===0)return[];for(var o=[],s=new t.patch_obj,c=0,l=0,u=0,d=i,f=i,p=0;p<a.length;p++){var m=a[p][0],h=a[p][1];switch(c||m===0||(s.start1=l,s.start2=u),m){case 1:s.diffs[c++]=a[p],s.length2+=h.length,f=f.substring(0,u)+h+f.substring(u);break;case-1:s.length1+=h.length,s.diffs[c++]=a[p],f=f.substring(0,u)+f.substring(u+h.length);break;case 0:h.length<=2*this.Patch_Margin&&c&&a.length!=p+1?(s.diffs[c++]=a[p],s.length1+=h.length,s.length2+=h.length):h.length>=2*this.Patch_Margin&&c&&(this.patch_addContext_(s,d),o.push(s),s=new t.patch_obj,c=0,d=f,l=u)}m!==1&&(l+=h.length),m!==-1&&(u+=h.length)}return c&&(this.patch_addContext_(s,d),o.push(s)),o},t.prototype.patch_deepCopy=function(e){for(var n=[],r=0;r<e.length;r++){var i=e[r],a=new t.patch_obj;a.diffs=[];for(var o=0;o<i.diffs.length;o++)a.diffs[o]=new t.Diff(i.diffs[o][0],i.diffs[o][1]);a.start1=i.start1,a.start2=i.start2,a.length1=i.length1,a.length2=i.length2,n[r]=a}return n},t.prototype.patch_apply=function(e,t){if(e.length==0)return[t,[]];e=this.patch_deepCopy(e);var n=this.patch_addPadding(e);t=n+t+n,this.patch_splitMax(e);for(var r=0,i=[],a=0;a<e.length;a++){var o,s,c=e[a].start2+r,l=this.diff_text1(e[a].diffs),u=-1;if(l.length>this.Match_MaxBits?(o=this.match_main(t,l.substring(0,this.Match_MaxBits),c))!=-1&&((u=this.match_main(t,l.substring(l.length-this.Match_MaxBits),c+l.length-this.Match_MaxBits))==-1||o>=u)&&(o=-1):o=this.match_main(t,l,c),o==-1)i[a]=!1,r-=e[a].length2-e[a].length1;else if(i[a]=!0,r=o-c,l==(s=u==-1?t.substring(o,o+l.length):t.substring(o,u+this.Match_MaxBits)))t=t.substring(0,o)+this.diff_text2(e[a].diffs)+t.substring(o+l.length);else{var d=this.diff_main(l,s,!1);if(l.length>this.Match_MaxBits&&this.diff_levenshtein(d)/l.length>this.Patch_DeleteThreshold)i[a]=!1;else{this.diff_cleanupSemanticLossless(d);for(var f,p=0,m=0;m<e[a].diffs.length;m++){var h=e[a].diffs[m];h[0]!==0&&(f=this.diff_xIndex(d,p)),h[0]===1?t=t.substring(0,o+f)+h[1]+t.substring(o+f):h[0]===-1&&(t=t.substring(0,o+f)+t.substring(o+this.diff_xIndex(d,p+h[1].length))),h[0]!==-1&&(p+=h[1].length)}}}}return[t=t.substring(n.length,t.length-n.length),i]},t.prototype.patch_addPadding=function(e){for(var n=this.Patch_Margin,r=``,i=1;i<=n;i++)r+=String.fromCharCode(i);for(i=0;i<e.length;i++)e[i].start1+=n,e[i].start2+=n;var a=e[0],o=a.diffs;if(o.length==0||o[0][0]!=0)o.unshift(new t.Diff(0,r)),a.start1-=n,a.start2-=n,a.length1+=n,a.length2+=n;else if(n>o[0][1].length){var s=n-o[0][1].length;o[0][1]=r.substring(o[0][1].length)+o[0][1],a.start1-=s,a.start2-=s,a.length1+=s,a.length2+=s}return(o=(a=e[e.length-1]).diffs).length==0||o[o.length-1][0]!=0?(o.push(new t.Diff(0,r)),a.length1+=n,a.length2+=n):n>o[o.length-1][1].length&&(s=n-o[o.length-1][1].length,o[o.length-1][1]+=r.substring(0,s),a.length1+=s,a.length2+=s),r},t.prototype.patch_splitMax=function(e){for(var n=this.Match_MaxBits,r=0;r<e.length;r++)if(!(e[r].length1<=n)){var i=e[r];e.splice(r--,1);for(var a=i.start1,o=i.start2,s=``;i.diffs.length!==0;){var c=new t.patch_obj,l=!0;for(c.start1=a-s.length,c.start2=o-s.length,s!==``&&(c.length1=c.length2=s.length,c.diffs.push(new t.Diff(0,s)));i.diffs.length!==0&&c.length1<n-this.Patch_Margin;){var u=i.diffs[0][0],d=i.diffs[0][1];u===1?(c.length2+=d.length,o+=d.length,c.diffs.push(i.diffs.shift()),l=!1):u===-1&&c.diffs.length==1&&c.diffs[0][0]==0&&d.length>2*n?(c.length1+=d.length,a+=d.length,l=!1,c.diffs.push(new t.Diff(u,d)),i.diffs.shift()):(d=d.substring(0,n-c.length1-this.Patch_Margin),c.length1+=d.length,a+=d.length,u===0?(c.length2+=d.length,o+=d.length):l=!1,c.diffs.push(new t.Diff(u,d)),d==i.diffs[0][1]?i.diffs.shift():i.diffs[0][1]=i.diffs[0][1].substring(d.length))}s=(s=this.diff_text2(c.diffs)).substring(s.length-this.Patch_Margin);var f=this.diff_text1(i.diffs).substring(0,this.Patch_Margin);f!==``&&(c.length1+=f.length,c.length2+=f.length,c.diffs.length!==0&&c.diffs[c.diffs.length-1][0]===0?c.diffs[c.diffs.length-1][1]+=f:c.diffs.push(new t.Diff(0,f))),l||e.splice(++r,0,c)}}},t.prototype.patch_toText=function(e){for(var t=[],n=0;n<e.length;n++)t[n]=e[n];return t.join(``)},t.prototype.patch_fromText=function(e){var n=[];if(!e)return n;for(var r=e.split(`
|
|
10
|
+
`),i=0,a=/^@@ -(\d+),?(\d*) \+(\d+),?(\d*) @@$/;i<r.length;){var o=r[i].match(a);if(!o)throw Error(`Invalid patch string: `+r[i]);var s=new t.patch_obj;for(n.push(s),s.start1=parseInt(o[1],10),o[2]===``?(s.start1--,s.length1=1):o[2]==`0`?s.length1=0:(s.start1--,s.length1=parseInt(o[2],10)),s.start2=parseInt(o[3],10),o[4]===``?(s.start2--,s.length2=1):o[4]==`0`?s.length2=0:(s.start2--,s.length2=parseInt(o[4],10)),i++;i<r.length;){var c=r[i].charAt(0);try{var l=decodeURI(r[i].substring(1))}catch{throw Error(`Illegal escape in patch_fromText: `+l)}if(c==`-`)s.diffs.push(new t.Diff(-1,l));else if(c==`+`)s.diffs.push(new t.Diff(1,l));else if(c==` `)s.diffs.push(new t.Diff(0,l));else{if(c==`@`)break;if(c!==``)throw Error(`Invalid patch mode "`+c+`" in: `+l)}i++}}return n},(t.patch_obj=function(){this.diffs=[],this.start1=null,this.start2=null,this.length1=0,this.length2=0}).prototype.toString=function(){for(var e,t=[`@@ -`+(this.length1===0?this.start1+`,0`:this.length1==1?this.start1+1:this.start1+1+`,`+this.length1)+` +`+(this.length2===0?this.start2+`,0`:this.length2==1?this.start2+1:this.start2+1+`,`+this.length2)+` @@
|
|
11
|
+
`],n=0;n<this.diffs.length;n++){switch(this.diffs[n][0]){case 1:e=`+`;break;case-1:e=`-`;break;case 0:e=` `}t[n+1]=e+encodeURI(this.diffs[n][1])+`
|
|
12
|
+
`}return t.join(``).replace(/%20/g,` `)},e.exports=t,e.exports.diff_match_patch=t,e.exports.DIFF_DELETE=-1,e.exports.DIFF_INSERT=1,e.exports.DIFF_EQUAL=0}));Ar.DIFF_EQUAL,Ar.DIFF_DELETE,Ar.DIFF_INSERT;function jr(e){let t=e.indexOf(`
|
|
13
|
+
--- `);return t>=0?e.slice(t+1):e}function Mr(e){let t=(0,i.c)(10),{diff:n}=e;if(!n.trim()){let e;return t[0]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,a.jsx)(`div`,{className:`activity-panel-diff px-3 py-2 text-xs text-muted-foreground italic`,children:`No changes`}),t[0]=e):e=t[0],e}let r,o,s,c;if(t[1]!==n){c=Symbol.for(`react.early_return_sentinel`);bb0:{try{r=j(jr(n))}catch{c=(0,a.jsx)(`pre`,{className:`activity-panel-diff font-mono text-xs whitespace-pre-wrap px-3 py-2`,children:n});break bb0}if(r.length===0){let e;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(e=(0,a.jsx)(`div`,{className:`activity-panel-diff px-3 py-2 text-xs text-muted-foreground italic`,children:`No changes`}),t[6]=e):e=t[6],c=e;break bb0}o=`activity-panel-diff`,s=r.map(Nr)}t[1]=n,t[2]=o,t[3]=s,t[4]=c,t[5]=r}else o=t[2],s=t[3],c=t[4],r=t[5];if(c!==Symbol.for(`react.early_return_sentinel`))return c;let l;return t[7]!==o||t[8]!==s?(l=(0,a.jsx)(`div`,{className:o,children:s}),t[7]=o,t[8]=s,t[9]=l):l=t[9],l}function Nr(e){return(0,a.jsx)(kr,{viewType:`unified`,diffType:e.type,hunks:e.hunks,children:Pr},`${e.oldPath??`a`}→${e.newPath??`b`}`)}function Pr(e){return e.map(Fr)}function Fr(e){return(0,a.jsx)(wr,{hunk:e},e.content)}export{Mr as ActivityPanelDiffView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}
|