@inkeep/open-knowledge 0.58.0-beta.11 → 0.58.0-beta.13
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/{acp-harness-probe-BEeqLM1e.mjs → acp-harness-probe-Dfv_uQNP.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-e1BSt71N.mjs +2 -0
- package/dist/index.d.mts +17 -17
- package/dist/index.mjs +11 -11
- package/dist/{init-DTgyXqMA.mjs → init-FvfqNSOd.mjs} +3 -3
- package/dist/init-cfMv0WeA.mjs +1 -0
- package/dist/{launch-json-removal-Bup49Sx1.mjs → launch-json-removal-B6WDLjiv.mjs} +2 -2
- package/dist/loader-CZpJwuV6.mjs +1 -0
- package/dist/{loader-DOVe5HC9.mjs → loader-ShWmrYui.mjs} +2 -2
- package/dist/{open-browser-y7HA6bX8.mjs → open-browser-XCXpL8oR.mjs} +2 -2
- package/dist/{preview-CPQM3RYG.mjs → preview-2-v6P1hO.mjs} +2 -2
- package/dist/preview-DFgeB8zI.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-B7vQuqrR.js → ActivityModeContent-D7_xgv7P.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DGxVIMVq.js → AgentDiffPane-DHKJVpBK.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-CGK6hmpN.js → CodeMirrorPropInput-DXR5-JFo.js} +1 -1
- package/dist/public/assets/{DocumentContext-CinbQ92j.js → DocumentContext-Br_dSI9H.js} +20 -20
- package/dist/public/assets/{EditorModeToggle-BoyqVhHR.js → EditorModeToggle-CANd5c2J.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-Ciji3GZn.js → EnableSyncConfirmDialog-BAOzmcZq.js} +1 -1
- package/dist/public/assets/{ExcalidrawDocEditor-ChOFZn7i.js → ExcalidrawDocEditor-Cvc6wabb.js} +1 -1
- package/dist/public/assets/FeedbackForm-D2mhxqam.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-tV6aPKk7.js → ImportSkillDialog-B6tXjot5.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DuA-NXIS.js → LintConfigEditor-Cw_PGYRz.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-DXHfhBzn.js → ManagedArtifactProperties-BInM0KSe.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-jmbtLGDS.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-B-QzuF1n.js → MermaidDocEditor-3FqhD9lF.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-BuyrHRje.js → PropertyDisplayRow-CtBxU1Ak.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-CkL-e25Z.js → SchemaConfigEditor-DhyxzCmv.js} +1 -1
- package/dist/public/assets/{SessionsHost-BPH09tZz.js → SessionsHost-CB0yLBVw.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-L6N4LxUC.js → SettingsDialogBody-DZR4EUUX.js} +3 -3
- package/dist/public/assets/{ShareReceiveMissDialog-_wXX_j_p.js → ShareReceiveMissDialog-bQE-yeQ6.js} +1 -1
- package/dist/public/assets/{SkillInstallMenu-B4kN_NL-.js → SkillInstallMenu-Df58OcE7.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-nOQsvkPG.js → SkillToolbarControls-DhzDa8xm.js} +1 -1
- package/dist/public/assets/{SourceEditor-MTZsjUlQ.js → SourceEditor-DAiuKGfG.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-hxIJ8MZN.js → TerminalWindowApp-BtmxrE8e.js} +1 -1
- package/dist/public/assets/{TextDocEditor-C9AJuPKq.js → TextDocEditor-CE4yndXU.js} +1 -1
- package/dist/public/assets/{ThreadView-Bwvzn-7R.js → ThreadView-CweBhNmN.js} +5 -5
- package/dist/public/assets/{TimelineDiffPane-BI6MR1YA.js → TimelineDiffPane-DDdiKvM5.js} +1 -1
- package/dist/public/assets/{agent-diff-store-COGZ0vEh.js → agent-diff-store-pclUz0aI.js} +1 -1
- package/dist/public/assets/{auth-state-cache-BM2pwWxf.js → auth-state-cache-D6Tks0Xw.js} +3 -3
- package/dist/public/assets/{client-version-C6rd6p9V.js → client-version-DDQ9xEIT.js} +1 -1
- package/dist/public/assets/{comment-chips-j_tvalF0.js → comment-chips-dIt1vXQ_.js} +1 -1
- package/dist/public/assets/{config-provider-sF-r6DD2.js → config-provider-tHkdYhw-.js} +3 -3
- package/dist/public/assets/{follow-file-D0cc7Tog.js → follow-file-JEQI8xw4.js} +1 -1
- package/dist/public/assets/{globals-BIkjmIKR.css → globals-tRU8O5cm.css} +1 -1
- package/dist/public/assets/i18n-C2uEep4d.js +1 -0
- package/dist/public/assets/index-627Ovxlz.js +2096 -0
- package/dist/public/assets/messages-BHDcBKgv.js +1 -0
- package/dist/public/assets/messages-BJnM3Dga.js +1 -0
- package/dist/public/assets/messages-BUGfzfF2.js +1 -0
- package/dist/public/assets/messages-BaKdNrlr.js +1 -0
- package/dist/public/assets/messages-BzpyYTFC.js +1 -0
- package/dist/public/assets/messages-C972mg8q.js +1 -0
- package/dist/public/assets/{messages-D1T06mzm.js → messages-CuqqiR9b.js} +1 -1
- package/dist/public/assets/messages-D81XOcCT.js +1 -0
- package/dist/public/assets/messages-DAEEmDbT.js +1 -0
- package/dist/public/assets/messages-DX5v9pJd.js +1 -0
- package/dist/public/assets/messages-DagLatIQ.js +1 -0
- package/dist/public/assets/messages-z-ne5Pbu.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-B1PhEPxI.js → pending-receive-nav-store-CD1tgq0g.js} +1 -1
- package/dist/public/assets/{selection-context-DDDwmdw6.js → selection-context-D2Mghtd2.js} +1 -1
- package/dist/public/assets/{skill-actions-CanhwMVw.js → skill-actions-XyB8ZE4l.js} +1 -1
- package/dist/public/assets/{src-nI94K4Jv.js → src-CVjDuNGv.js} +1 -1
- package/dist/public/assets/{telemetry-impl-DDjYKppL.js → telemetry-impl-Dz1N6oIK.js} +1 -1
- package/dist/public/assets/{telemetry-startup-ujb1QPqT.js → telemetry-startup-hWX5HNgA.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-C71jkGN_.js → typing-burst-detector-DAuaPW3s.js} +2 -2
- package/dist/public/assets/{uninstall-DA1901LS.js → uninstall-DqWW2ke7.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BY16reWV.js → use-activity-panel-BQS8YgFm.js} +1 -1
- package/dist/public/assets/{use-open-skill-DbxWL28h.js → use-open-skill-BN_i8Eku.js} +1 -1
- package/dist/public/assets/{use-popular-skills-C2eU3yPp.js → use-popular-skills-BAd04Q2w.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-G7X3-68G.js → use-terminal-enabled-DCAIeUQs.js} +1 -1
- package/dist/public/assets/use-timeline-entry-diff-Dhao_9vO.js +6 -0
- package/dist/public/index.html +24 -24
- package/dist/public/uninstall.html +5 -5
- package/dist/{repair-launch-json-C7cMsX_u.mjs → repair-launch-json-BYSX4lZ4.mjs} +2 -2
- package/dist/{repair-mcp-configs-ClGfTJpT.mjs → repair-mcp-configs-BXIuvoqd.mjs} +2 -2
- package/dist/repair-skills-CS14x_hO.mjs +1 -0
- package/dist/{repair-skills-IyM2RV1-.mjs → repair-skills-DltCY6z2.mjs} +2 -2
- package/dist/server-lock-CnbGjeVA.mjs +2 -0
- package/dist/server-lock-DCiTFRYj.mjs +1 -0
- package/dist/{skill-teardown-Cn7cfIYa.mjs → skill-teardown-DhZjMVeU.mjs} +2 -2
- package/dist/{src-vHdNPukY.mjs → src-5XnFzMUO.mjs} +1 -1
- package/dist/src-B4cqEhZL.mjs +1 -0
- package/dist/{src-D356u9An.mjs → src-DVlcBUL2.mjs} +24 -24
- package/dist/{src-CrHWeR5-.mjs → src-OuxJ-RtG.mjs} +3 -3
- package/dist/start-CScrvLcu.mjs +1 -0
- package/dist/{start-B3LinnWE.mjs → start-D1YfTqhe.mjs} +4 -4
- package/dist/{ui-Bl8Rbh53.mjs → ui-CNdWjnA7.mjs} +3 -3
- package/dist/{write-project-skill-BPDDCXLT.mjs → write-project-skill-GQSmUhGW.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-DVdmH8pu.mjs +0 -2
- package/dist/init-BuB3fuLV.mjs +0 -1
- package/dist/loader-31xqf1Zs.mjs +0 -1
- package/dist/preview-CDR7hjND.mjs +0 -1
- package/dist/public/assets/FeedbackForm-DRZsrnQ9.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-ElNATzsn.js +0 -1
- package/dist/public/assets/i18n-3MuYBaiE.js +0 -1
- package/dist/public/assets/index-CzPE3ZH9.js +0 -2096
- package/dist/public/assets/messages-BnRcVtqj.js +0 -1
- package/dist/public/assets/messages-C00eLNs7.js +0 -1
- package/dist/public/assets/messages-C5bmYd43.js +0 -1
- package/dist/public/assets/messages-Cd0YMp5L.js +0 -1
- package/dist/public/assets/messages-D-pqY9SX.js +0 -1
- package/dist/public/assets/messages-DV9j-Nuy.js +0 -1
- package/dist/public/assets/messages-DdkGPpV2.js +0 -1
- package/dist/public/assets/messages-Dh5RFQKD.js +0 -1
- package/dist/public/assets/messages-Np0xKUyO.js +0 -1
- package/dist/public/assets/messages-fHg_QLx1.js +0 -1
- package/dist/public/assets/messages-zHVeim4Y.js +0 -1
- package/dist/public/assets/use-timeline-entry-diff-6-XXpuwT.js +0 -6
- package/dist/repair-skills-Deon-PUG.mjs +0 -1
- package/dist/server-lock-BmpC4xda.mjs +0 -2
- package/dist/server-lock-CSpIbtA5.mjs +0 -1
- package/dist/src-DYu0cH0G.mjs +0 -1
- package/dist/start-COUGziKD.mjs +0 -1
- /package/dist/public/assets/{globals-CZErGZFp.js → globals-B6ItdNTJ.js} +0 -0
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{o as e,t}from"./chunk-CYidjpOJ.js";import{t as n}from"./jsx-runtime-BUgB2tll.js";import{In as r,_ as i,a}from"./DocumentContext-CinbQ92j.js";import{t as o}from"./react-f2sANaYj.js";import{n as s,r as c}from"./dist-Nvb76hAm.js";import{t as l}from"./react-dom-DPxgxlDT.js";import{t as u}from"./compiler-runtime-BfE3aGVn.js";import{c as d}from"./local-menu-action-bus-CIYp0C2E.js";import{T as f,et as p,q as m}from"./CodeMirrorPropInput-CGK6hmpN.js";import{Ga as h,Ja as g,K as _,Na as v,Pa as y,Ra as b,Ro as x,So as S,Ua as ee,Ya as te,ca as ne,ir as re,qa as C,xa as ie,za as ae}from"./dist-B2PYdf6L.js";import{i as oe,l as se,m as w,n as ce,t as le}from"./PropertyDisplayRow-BuyrHRje.js";import{t as ue}from"./minus-CeGy7JpL.js";import{t as de}from"./libesm-CHno8Gdp.js";var T=u(),E=n(),D=200;function fe(e){let t=(0,T.c)(27),{delta:n,open:r,onOpenChange:i}=e;if(n.unparseable!==null){let e;return t[0]===n.unparseable?e=t[1]:(e=(0,E.jsx)(_e,{regions:n.unparseable}),t[0]=n.unparseable,t[1]=e),e}if(n.changes.length===0)return null;let a,o,c,l,u,d,f,p,m;if(t[2]!==n.changes||t[3]!==i||t[4]!==r){let e=n.changes.slice(0,50);o=n.changes.length-e.length,a=ce,t[14]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,E.jsx)(s,{id:`l_UFPv`}),t[14]=c):c=t[14],l=n.changes.length,u=`property-diff-block`,d=`border-b border-border py-3`,f=r,p=i,m=e.map(pe),t[2]=n.changes,t[3]=i,t[4]=r,t[5]=a,t[6]=o,t[7]=c,t[8]=l,t[9]=u,t[10]=d,t[11]=f,t[12]=p,t[13]=m}else a=t[5],o=t[6],c=t[7],l=t[8],u=t[9],d=t[10],f=t[11],p=t[12],m=t[13];let h;t[15]===o?h=t[16]:(h=o>0&&(0,E.jsx)(`p`,{className:`px-2 pt-1 text-xs text-muted-foreground italic`,children:(0,E.jsx)(s,{id:`6qFchx`,values:{omitted:o}})}),t[15]=o,t[16]=h);let g;return t[17]!==a||t[18]!==c||t[19]!==l||t[20]!==u||t[21]!==d||t[22]!==f||t[23]!==p||t[24]!==m||t[25]!==h?(g=(0,E.jsxs)(a,{title:c,count:l,testId:u,className:d,open:f,onOpenChange:p,children:[m,h]}),t[17]=a,t[18]=c,t[19]=l,t[20]=u,t[21]=d,t[22]=f,t[23]=p,t[24]=m,t[25]=h,t[26]=g):g=t[26],g}function pe(e){return(0,E.jsx)(me,{change:e},`${e.kind}-${e.key}`)}function me(e){let t=(0,T.c)(22),{change:n}=e,{_:i}=c(),a=se[S(n.kind===`removed`?n.before:n.after)],o;t[0]!==i||t[1]!==n.kind?(o=n.kind===`added`?{KindIcon:d,kindLabel:i({id:`hp8OtS`})}:n.kind===`removed`?{KindIcon:ue,kindLabel:i({id:`eps54V`})}:{KindIcon:r,kindLabel:i({id:`cNsIJf`})},t[0]=i,t[1]=n.kind,t[2]=o):o=t[2];let{KindIcon:s,kindLabel:l}=o,u;t[3]===s?u=t[4]:(u=(0,E.jsx)(s,{"aria-hidden":`true`,className:`size-3.5`}),t[3]=s,t[4]=u);let f;t[5]===l?f=t[6]:(f=(0,E.jsx)(`span`,{className:`sr-only`,children:l}),t[5]=l,t[6]=f);let p;t[7]!==u||t[8]!==f?(p=(0,E.jsxs)(`span`,{className:`flex size-7 shrink-0 items-center justify-center text-muted-foreground`,children:[u,f]}),t[7]=u,t[8]=f,t[9]=p):p=t[9];let m;t[10]===a?m=t[11]:(m=(0,E.jsx)(a,{"aria-hidden":`true`,className:`size-3.5`}),t[10]=a,t[11]=m);let h;t[12]===n?h=t[13]:(h=(0,E.jsx)(he,{change:n}),t[12]=n,t[13]=h);let g;t[14]!==n.key||t[15]!==m||t[16]!==h?(g=(0,E.jsx)(`div`,{className:`min-w-0 flex-1`,children:(0,E.jsx)(le,{icon:m,label:n.key,dataKey:n.key,children:h})}),t[14]=n.key,t[15]=m,t[16]=h,t[17]=g):g=t[17];let _;return t[18]!==n.key||t[19]!==p||t[20]!==g?(_=(0,E.jsxs)(`div`,{"data-property-change":``,"data-key":n.key,"data-testid":`property-diff-row`,className:`flex items-start gap-1`,children:[p,g]}),t[18]=n.key,t[19]=p,t[20]=g,t[21]=_):_=t[21],_}function he(e){let t=(0,T.c)(17),{change:n}=e;if(n.kind===`added`){let e;return t[0]!==n.after||t[1]!==n.key?(e=(0,E.jsx)(O,{value:n.after,keyName:n.key}),t[0]=n.after,t[1]=n.key,t[2]=e):e=t[2],e}if(n.kind===`removed`){let e;return t[3]!==n.before||t[4]!==n.key?(e=(0,E.jsx)(O,{value:n.before,keyName:n.key,removed:!0}),t[3]=n.before,t[4]=n.key,t[5]=e):e=t[5],e}let r=w(n.before)||w(n.after)?`flex flex-col gap-1`:`flex flex-wrap items-center gap-1.5`,i;t[6]!==n.before||t[7]!==n.key?(i=(0,E.jsx)(O,{value:n.before,keyName:n.key,removed:!0}),t[6]=n.before,t[7]=n.key,t[8]=i):i=t[8];let a;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,E.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted-foreground`,children:`→`}),t[9]=a):a=t[9];let o;t[10]!==n.after||t[11]!==n.key?(o=(0,E.jsx)(O,{value:n.after,keyName:n.key}),t[10]=n.after,t[11]=n.key,t[12]=o):o=t[12];let s;return t[13]!==r||t[14]!==i||t[15]!==o?(s=(0,E.jsxs)(`div`,{className:r,"data-testid":`property-diff-change-pair`,children:[i,a,o]}),t[13]=r,t[14]=i,t[15]=o,t[16]=s):s=t[16],s}function O(e){let t=(0,T.c)(17),{value:n,keyName:r,removed:i}=e,a=i===void 0?!1:i;if(w(n)){let e=a?`opacity-70`:void 0,i;t[0]!==r||t[1]!==n?(i=(0,E.jsx)(oe,{keyName:r,value:n}),t[0]=r,t[1]=n,t[2]=i):i=t[2];let o;return t[3]!==e||t[4]!==i?(o=(0,E.jsx)(`div`,{className:e,children:i}),t[3]=e,t[4]=i,t[5]=o):o=t[5],o}let o,s,c,l;if(t[6]!==a||t[7]!==n){let e=Array.isArray(n)?n.filter(ge).join(`, `):String(n),r=e.length>D;o=a?`px-1 text-sm break-words text-muted-foreground line-through`:`px-1 text-sm break-words`,s=r?e:void 0,c=`property-diff-value`,l=r?`${e.slice(0,D)}…`:e,t[6]=a,t[7]=n,t[8]=o,t[9]=s,t[10]=c,t[11]=l}else o=t[8],s=t[9],c=t[10],l=t[11];let u;return t[12]!==o||t[13]!==s||t[14]!==c||t[15]!==l?(u=(0,E.jsx)(`span`,{className:o,title:s,"data-testid":c,children:l}),t[12]=o,t[13]=s,t[14]=c,t[15]=l,t[16]=u):u=t[16],u}function ge(e){return typeof e==`string`}function _e(e){let t=(0,T.c)(10),{regions:n}=e,r;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,E.jsx)(`p`,{className:`text-xs text-muted-foreground italic`,children:(0,E.jsx)(s,{id:`wFyXOW`})}),t[0]=r):r=t[0];let i;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,E.jsx)(s,{id:`EmSrGB`}),t[1]=i):i=t[1];let a;t[2]===n.before?a=t[3]:(a=(0,E.jsx)(k,{label:i,text:n.before}),t[2]=n.before,t[3]=a);let o;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,E.jsx)(s,{id:`NawEr2`}),t[4]=o):o=t[4];let c;t[5]===n.after?c=t[6]:(c=(0,E.jsx)(k,{label:o,text:n.after}),t[5]=n.after,t[6]=c);let l;return t[7]!==a||t[8]!==c?(l=(0,E.jsxs)(`div`,{className:`border-b border-border px-4 py-3`,"data-testid":`property-diff-unparseable`,"data-property-change":``,children:[r,(0,E.jsxs)(`div`,{className:`mt-2 grid gap-2 sm:grid-cols-2`,children:[a,c]})]}),t[7]=a,t[8]=c,t[9]=l):l=t[9],l}function k(e){let t=(0,T.c)(7),{label:n,text:r}=e,i;t[0]===n?i=t[1]:(i=(0,E.jsx)(`p`,{className:`mb-1 text-xs font-medium text-muted-foreground`,children:n}),t[0]=n,t[1]=i);let a=r===``?`—`:r,o;t[2]===a?o=t[3]:(o=(0,E.jsx)(`pre`,{className:`overflow-x-auto rounded-md bg-muted px-2 py-1.5 font-mono text-xs whitespace-pre-wrap`,children:a}),t[2]=a,t[3]=o);let s;return t[4]!==i||t[5]!==o?(s=(0,E.jsxs)(`div`,{children:[i,o]}),t[4]=i,t[5]=o,t[6]=s):s=t[6],s}var A=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.unescapeToken=t,e.escapeToken=n;function t(e){return e.replace(/~1/g,`/`).replace(/~0/g,`~`)}function n(e){return e.replace(/~/g,`~0`).replace(/\//g,`~1`)}e.Pointer=function(){function e(e){e===void 0&&(e=[``]),this.tokens=e}return e.fromJSON=function(n){var r=n.split(`/`).map(t);if(r[0]!==``)throw Error(`Invalid JSON Pointer: ${n}`);return new e(r)},e.prototype.toString=function(){return this.tokens.map(n).join(`/`)},e.prototype.evaluate=function(e){for(var t=null,n=``,r=e,i=1,a=this.tokens.length;i<a;i++)t=r,n=this.tokens[i],!(n==`__proto__`||n==`constructor`||n==`prototype`)&&(r=(t||{})[n]);return{parent:t,key:n,value:r}},e.prototype.get=function(e){return this.evaluate(e).value},e.prototype.set=function(e,t){var n=this.evaluate(e);n.parent&&(n.parent[n.key]=t)},e.prototype.push=function(e){this.tokens.push(e)},e.prototype.add=function(t){return new e(this.tokens.concat(String(t)))},e.prototype.parent=function(){return new e(this.tokens.length>1?this.tokens.slice(0,-1):[``])},e}()})),j=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.hasOwnProperty=void 0,e.objectType=t,e.clone=r,e.hasOwnProperty=Object.prototype.hasOwnProperty;function t(e){return e===void 0?`undefined`:e===null?`null`:Array.isArray(e)?`array`:typeof e}function n(e){return typeof e==`object`&&!!e}function r(t){if(!n(t))return t;if(t.constructor==Array){for(var i=t.length,a=Array(i),o=0;o<i;o++)a[o]=r(t[o]);return a}if(t.constructor==Date)return new Date(+t);var s={};for(var c in t)e.hasOwnProperty.call(t,c)&&(s[c]=r(t[c]));return s}})),M=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.isDestructive=n,e.subtract=r,e.intersection=i,e.diffArrays=l,e.diffObjects=u,e.diffAny=d;var t=j();function n(e){var t=e.op;return t===`remove`||t===`replace`||t===`copy`||t===`move`}function r(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&!(t.hasOwnProperty.call(n,i)&&n[i]!==void 0)&&r.push(i);return r}function i(e){for(var n=e.length,r={},i=0;i<n;i++){var a=e[i];for(var o in a)t.hasOwnProperty.call(a,o)&&a[o]!==void 0&&(r[o]=(r[o]||0)+1)}for(var o in r)r[o]<n&&delete r[o];return Object.keys(r)}function a(e,n){var r=[];for(var i in e)t.hasOwnProperty.call(e,i)&&e[i]!==void 0&&t.hasOwnProperty.call(n,i)&&n[i]!==void 0&&r.push(i);return r}function o(e){return e.op===`add`}function s(e){return e.op===`remove`}function c(e,t){return{operations:e.operations.concat(t),cost:e.cost+1}}function l(e,t,n,r){r===void 0&&(r=d);var i=Math.max(e.length,t.length),a=new Map([[0,{operations:[],cost:0}]]);function l(o,s){var u=o*i+s,d=a.get(u);if(d===void 0){if(o>0&&s>0&&!r(e[o-1],t[s-1],n.add(String(o-1))).length)d=l(o-1,s-1);else{var f=[];if(o>0){var p=l(o-1,s),m={op:`remove`,index:o-1};f.push(c(p,m))}if(s>0){var h=l(o,s-1),g={op:`add`,index:o-1,value:t[s-1]};f.push(c(h,g))}if(o>0&&s>0){var _=l(o-1,s-1),v={op:`replace`,index:o-1,original:e[o-1],value:t[s-1]};f.push(c(_,v))}d=f.sort(function(e,t){return e.cost-t.cost})[0]}a.set(u,d)}return d}var u=isNaN(e.length)||e.length<=0?0:e.length;return l(u,isNaN(t.length)||t.length<=0?0:t.length).operations.reduce(function(e,t){var i=e[0],a=e[1];if(o(t)){var c=t.index+1+a,l=c<u+a?String(c):`-`,d={op:t.op,path:n.add(l).toString(),value:t.value};return[i.concat(d),a+1]}else if(s(t)){var d={op:t.op,path:n.add(String(t.index+a)).toString()};return[i.concat(d),a-1]}else{var f=n.add(String(t.index+a)),p=r(t.original,t.value,f);return[i.concat.apply(i,p),a]}},[[],0])[0]}function u(e,t,n,i){i===void 0&&(i=d);var o=[];return r(e,t).forEach(function(e){o.push({op:`remove`,path:n.add(e).toString()})}),r(t,e).forEach(function(e){o.push({op:`add`,path:n.add(e).toString(),value:t[e]})}),a(e,t).forEach(function(r){o.push.apply(o,i(e[r],t[r],n.add(r)))}),o}function d(e,n,r,i){if(i===void 0&&(i=d),e===n)return[];var a=(0,t.objectType)(e),o=(0,t.objectType)(n);return a==`array`&&o==`array`?l(e,n,r,i):a==`object`&&o==`object`?u(e,n,r,i):[{op:`replace`,path:r.toString(),value:n}]}})),ve=t((e=>{var t=e&&e.__extends||(function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if(typeof n!=`function`&&n!==null)throw TypeError(`Class extends value `+String(n)+` is not a constructor or null`);e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}})();Object.defineProperty(e,`__esModule`,{value:!0}),e.InvalidOperationError=e.TestError=e.MissingError=void 0,e.add=l,e.remove=u,e.replace=d,e.move=f,e.copy=p,e.test=m,e.apply=g;var n=A(),r=j(),i=M(),a=function(e){t(n,e);function n(t){var n=e.call(this,`Value required at path: ${t}`)||this;return n.path=t,n.name=`MissingError`,n}return n}(Error);e.MissingError=a;var o=function(e){t(n,e);function n(t,n){var r=e.call(this,`Test failed: ${t} != ${n}`)||this;return r.actual=t,r.expected=n,r.name=`TestError`,r}return n}(Error);e.TestError=o;function s(e,t,n){if(Array.isArray(e))if(t==`-`)e.push(n);else{var r=parseInt(t,10);e.splice(r,0,n)}else e[t]=n}function c(e,t){if(Array.isArray(e)){var n=parseInt(t,10);e.splice(n,1)}else delete e[t]}function l(e,t,i){var o=n.Pointer.fromJSON(t.path);if(i?.implicitArrayCreation&&o.tokens[o.tokens.length-1]===`-`){var c=o.parent().evaluate(e);c.value===void 0&&(0,r.objectType)(c.parent)===`object`&&(c.parent[c.key]=[])}var l=o.evaluate(e);return l.parent===void 0||i?.implicitArrayCreation&&l.key===`-`&&!Array.isArray(l.parent)?new a(t.path):(s(l.parent,l.key,(0,r.clone)(t.value)),null)}function u(e,t,r){var i=n.Pointer.fromJSON(t.path).evaluate(e);return i.value===void 0?new a(t.path):(c(i.parent,i.key),null)}function d(e,t,i){var o=n.Pointer.fromJSON(t.path).evaluate(e);if(o.parent===null)return new a(t.path);if(Array.isArray(o.parent)){if(parseInt(o.key,10)>=o.parent.length)return new a(t.path)}else if(o.value===void 0)return new a(t.path);return o.parent[o.key]=(0,r.clone)(t.value),null}function f(e,t,r){var i=n.Pointer.fromJSON(t.from).evaluate(e);if(i.value===void 0)return new a(t.from);var o=n.Pointer.fromJSON(t.path).evaluate(e);return o.parent===void 0?new a(t.path):(c(i.parent,i.key),s(o.parent,o.key,i.value),null)}function p(e,t,i){var o=n.Pointer.fromJSON(t.from).evaluate(e);if(o.value===void 0)return new a(t.from);var c=n.Pointer.fromJSON(t.path).evaluate(e);return c.parent===void 0?new a(t.path):(s(c.parent,c.key,(0,r.clone)(o.value)),null)}function m(e,t,r){var a=n.Pointer.fromJSON(t.path).evaluate(e);return(0,i.diffAny)(a.value,t.value,new n.Pointer).length?new o(a.value,t.value):null}var h=function(e){t(n,e);function n(t){var n=e.call(this,`Invalid operation: ${t.op}`)||this;return n.operation=t,n.name=`InvalidOperationError`,n}return n}(Error);e.InvalidOperationError=h;function g(e,t,n){switch(t.op){case`add`:return l(e,t,n);case`remove`:return u(e,t,n);case`replace`:return d(e,t,n);case`move`:return f(e,t,n);case`copy`:return p(e,t,n);case`test`:return m(e,t,n)}return new h(t)}})),ye=t((e=>{Object.defineProperty(e,`__esModule`,{value:!0}),e.Pointer=void 0,e.applyPatch=i,e.createPatch=o;var t=A();Object.defineProperty(e,`Pointer`,{enumerable:!0,get:function(){return t.Pointer}});var n=ve(),r=M();function i(e,t,r){return t.map(function(t){return(0,n.apply)(e,t,r)})}function a(e){function t(n,i,a){var o=e(n,i,a);return Array.isArray(o)?o:(0,r.diffAny)(n,i,a,t)}return t}function o(e,n,i){var o=new t.Pointer;return(i?a(i):r.diffAny)(e,n,o)}})),N=e(o(),1),be=e(l(),1),P=ye();function F(){}F.prototype={diff:function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n.callback;typeof n==`function`&&(r=n,n={}),this.options=n;var i=this;function a(e){return r?(setTimeout(function(){r(void 0,e)},0),!0):e}e=this.castInput(e),t=this.castInput(t),e=this.removeEmpty(this.tokenize(e)),t=this.removeEmpty(this.tokenize(t));var o=t.length,s=e.length,c=1,l=o+s;n.maxEditLength&&(l=Math.min(l,n.maxEditLength));var u=n.timeout??1/0,d=Date.now()+u,f=[{oldPos:-1,lastComponent:void 0}],p=this.extractCommon(f[0],t,e,0);if(f[0].oldPos+1>=s&&p+1>=o)return a([{value:this.join(t),count:t.length}]);var m=-1/0,h=1/0;function g(){for(var n=Math.max(m,-c);n<=Math.min(h,c);n+=2){var r=void 0,l=f[n-1],u=f[n+1];l&&(f[n-1]=void 0);var d=!1;if(u){var g=u.oldPos-n;d=u&&0<=g&&g<o}var _=l&&l.oldPos+1<s;if(!d&&!_){f[n]=void 0;continue}if(r=!_||d&&l.oldPos+1<u.oldPos?i.addToPath(u,!0,void 0,0):i.addToPath(l,void 0,!0,1),p=i.extractCommon(r,t,e,n),r.oldPos+1>=s&&p+1>=o)return a(xe(i,r.lastComponent,t,e,i.useLongestToken));f[n]=r,r.oldPos+1>=s&&(h=Math.min(h,n-1)),p+1>=o&&(m=Math.max(m,n+1))}c++}if(r)(function e(){setTimeout(function(){if(c>l||Date.now()>d)return r();g()||e()},0)})();else for(;c<=l&&Date.now()<=d;){var _=g();if(_)return _}},addToPath:function(e,t,n,r){var i=e.lastComponent;return i&&i.added===t&&i.removed===n?{oldPos:e.oldPos+r,lastComponent:{count:i.count+1,added:t,removed:n,previousComponent:i.previousComponent}}:{oldPos:e.oldPos+r,lastComponent:{count:1,added:t,removed:n,previousComponent:i}}},extractCommon:function(e,t,n,r){for(var i=t.length,a=n.length,o=e.oldPos,s=o-r,c=0;s+1<i&&o+1<a&&this.equals(t[s+1],n[o+1]);)s++,o++,c++;return c&&(e.lastComponent={count:c,previousComponent:e.lastComponent}),e.oldPos=o,s},equals:function(e,t){return this.options.comparator?this.options.comparator(e,t):e===t||this.options.ignoreCase&&e.toLowerCase()===t.toLowerCase()},removeEmpty:function(e){for(var t=[],n=0;n<e.length;n++)e[n]&&t.push(e[n]);return t},castInput:function(e){return e},tokenize:function(e){return e.split(``)},join:function(e){return e.join(``)}};function xe(e,t,n,r,i){for(var a=[],o;t;)a.push(t),o=t.previousComponent,delete t.previousComponent,t=o;a.reverse();for(var s=0,c=a.length,l=0,u=0;s<c;s++){var d=a[s];if(!d.removed){if(!d.added&&i){var f=n.slice(l,l+d.count);f=f.map(function(e,t){var n=r[u+t];return n.length>e.length?n:e}),d.value=e.join(f)}else d.value=e.join(n.slice(l,l+d.count));l+=d.count,d.added||(u+=d.count)}else if(d.value=e.join(r.slice(u,u+d.count)),u+=d.count,s&&a[s-1].added){var p=a[s-1];a[s-1]=a[s],a[s]=p}}var m=a[c-1];return c>1&&typeof m.value==`string`&&(m.added||m.removed)&&e.equals(``,m.value)&&(a[c-2].value+=m.value,a.pop()),a}var Se=new F;function Ce(e,t,n){return Se.diff(e,t,n)}var I=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,L=/\S/,R=new F;R.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!L.test(e)&&!L.test(t)},R.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),n=0;n<t.length-1;n++)!t[n+1]&&t[n+2]&&I.test(t[n])&&I.test(t[n+2])&&(t[n]+=t[n+2],t.splice(n+1,2),n--);return t};function we(e,t,n){return R.diff(e,t,n)}var z=new F;z.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
2
|
-
`));var t=[],n=e.split(/(\n|\r\n)/);n[n.length-1]||n.pop();for(var r=0;r<n.length;r++){var i=n[r];r%2&&!this.options.newlineIsToken?t[t.length-1]+=i:(this.options.ignoreWhitespace&&(i=i.trim()),t.push(i))}return t};var Te=new F;Te.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var Ee=new F;Ee.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function B(e){"@babel/helpers - typeof";return B=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},B(e)}var De=Object.prototype.toString,V=new F;V.useLongestToken=!0,V.tokenize=z.tokenize,V.castInput=function(e){var t=this.options,n=t.undefinedReplacement,r=t.stringifyReplacer,i=r===void 0?function(e,t){return t===void 0?n:t}:r;return typeof e==`string`?e:JSON.stringify(H(e,null,null,i),i,` `)},V.equals=function(e,t){return F.prototype.equals.call(V,e.replace(/,([\r\n])/g,`$1`),t.replace(/,([\r\n])/g,`$1`))};function H(e,t,n,r,i){t||=[],n||=[],r&&(e=r(i,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return n[a];var o;if(De.call(e)===`[object Array]`){for(t.push(e),o=Array(e.length),n.push(o),a=0;a<e.length;a+=1)o[a]=H(e[a],t,n,r,i);return t.pop(),n.pop(),o}if(e&&e.toJSON&&(e=e.toJSON()),B(e)===`object`&&e!==null){t.push(e),o={},n.push(o);var s=[],c;for(c in e)e.hasOwnProperty(c)&&s.push(c);for(s.sort(),a=0;a<s.length;a+=1)c=s[a],o[c]=H(e[c],t,n,r,c);t.pop(),n.pop()}else o=e;return o}var U=new F;U.tokenize=function(e){return e.slice()},U.join=U.removeEmpty=function(e){return e};function W(e,t){let n=t.content.findDiffStart(e.content);if(n===null)return!1;let{a:r,b:i}=t.content.findDiffEnd(e.content),a=n-Math.min(r,i);return a>0&&(e.resolve(n-a).depth<t.resolve(r+a).depth?n-=a:(r+=a,i+=a)),new C(n,i,t.slice(n,r))}function Oe(e){if(!e.steps.length)return;let t=new g(e.docs[0]),n=e.steps.slice();for(;n.length;){let e=n.shift();for(;n.length&&e.merge(n[0]);){let r=n.shift();e=e instanceof C&&r instanceof C?W(t.doc,r.apply(e.apply(t.doc).doc).doc):e.merge(r)}t.step(e)}return t}function G(e){let t=new g(e);return t.removeMark(0,e.nodeSize-2),t.doc}function ke(e,t){let n=t.split(`/`);for(n.shift();n.length;){if(typeof e!=`object`)throw Error();let t=n.shift();e=e[t]}return e}function K(e){return JSON.parse(JSON.stringify(e))}var Ae=class{fromDoc;toDoc;complexSteps;wordDiffs;simplifyDiff;schema;tr;currentJSON;finalJSON;ops;constructor(e,t,n={}){let r={complexSteps:!0,wordDiffs:!1,simplifyDiff:!0,...n};this.fromDoc=e,this.toDoc=t,this.complexSteps=r.complexSteps,this.wordDiffs=r.wordDiffs,this.simplifyDiff=r.simplifyDiff,this.schema=e.type.schema,this.tr=new g(e),this.currentJSON={},this.finalJSON={},this.ops=[]}init(){return this.complexSteps?(this.currentJSON=G(this.fromDoc).toJSON(),this.finalJSON=G(this.toDoc).toJSON(),this.ops=(0,P.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps(),this.recreateChangeMarkSteps()):(this.currentJSON=this.fromDoc.toJSON(),this.finalJSON=this.toDoc.toJSON(),this.ops=(0,P.createPatch)(this.currentJSON,this.finalJSON),this.recreateChangeContentSteps()),this.simplifyDiff&&(this.tr=Oe(this.tr)||this.tr),this.tr}recreateChangeContentSteps(){let e=[];for(;this.ops.length;){let t=this.ops.shift();e.push(t);let n,r=K(this.currentJSON),i=t.path.split(`/`);for(;n==null;){(0,P.applyPatch)(r,[t]);try{n=this.schema.nodeFromJSON(r),n.check()}catch{if(n=null,this.ops.length>0)t=this.ops.shift(),e.push(t);else throw Error(`No valid diff possible applying ${t.path}`)}}this.complexSteps&&e.length===1&&(i.includes(`attrs`)||i.includes(`type`))?(this.addSetNodeMarkup(),e=[]):e.length===1&&t.op===`replace`&&i[i.length-1]===`text`?(this.addReplaceTextSteps(t,r),e=[]):this.addReplaceStep(n,r)&&(e=[])}}addSetNodeMarkup(){let e=this.schema.nodeFromJSON(this.currentJSON),t=this.schema.nodeFromJSON(this.finalJSON),n=t.content.findDiffStart(e.content),r=e.nodeAt(n),i=t.nodeAt(n);if(n!=null){let e=r.type===i.type?null:i.type;try{this.tr.setNodeMarkup(n,e,i.attrs,i.marks)}catch(t){if(e&&t.message.includes(`Invalid content`))this.tr.replaceWith(n,n+r.nodeSize,i);else throw t}return this.currentJSON=G(this.tr.doc).toJSON(),this.ops=(0,P.createPatch)(this.currentJSON,this.finalJSON),!0}return!1}recreateChangeMarkSteps(){this.toDoc.descendants((e,t)=>{if(!e.isInline)return!0;this.tr.doc.nodesBetween(t,t+e.nodeSize,(n,r)=>{if(!n.isInline)return!0;let i=Math.max(t,r),a=Math.min(t+e.nodeSize,r+n.nodeSize);n.marks.forEach(t=>{t.isInSet(e.marks)||this.tr.removeMark(i,a,t)}),e.marks.forEach(e=>{e.isInSet(n.marks)||this.tr.addMark(i,a,e)})})})}addReplaceStep(e,t){let n=W(this.schema.nodeFromJSON(this.currentJSON),e);if(!n)return!1;if(!this.tr.maybeStep(n).failed)return this.currentJSON=t,!0;throw Error(`No valid step found.`)}addReplaceTextSteps(e,t){let n={...e,value:`xx`},r={...e,value:`yy`},i=K(this.currentJSON),a=K(this.currentJSON);(0,P.applyPatch)(i,[n]),(0,P.applyPatch)(a,[r]);let o=this.schema.nodeFromJSON(i),s=this.schema.nodeFromJSON(a),c=e.value,l=ke(this.currentJSON,e.path),u=this.wordDiffs?we(l,c):Ce(l,c),d=o.content.findDiffStart(s.content),f=o.resolve(d+1).marks();for(;u.length;){let e=u.shift();if(e.added){let t=this.schema.nodeFromJSON({type:`text`,text:e.value}).mark(f);if(u.length&&u[0].removed){let e=u.shift();this.tr.replaceWith(d,d+e.value.length,t)}else this.tr.insert(d,t);d+=e.value.length}else if(e.removed)if(u.length&&u[0].added){let t=u.shift(),n=this.schema.nodeFromJSON({type:`text`,text:t.value}).mark(f);this.tr.replaceWith(d,d+e.value.length,n),d+=t.value.length}else this.tr.delete(d,d+e.value.length);else d+=e.value.length}this.currentJSON=t}};function je(e,t,n={}){return new Ae(e,t,n).init()}var Me=new Set([`list`,`bulletList`,`orderedList`,`taskList`]);function q(e){let t=[];return e.forEach((e,n)=>{if(Me.has(e.type.name)){let r=n+1,i=0;e.forEach(e=>{let n=r+i;t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`}),i+=e.nodeSize})}else t.push({from:n,to:n+e.nodeSize,key:`${e.type.name}:${e.textContent}`})}),t}function Ne(e,t){let n=e.length,r=t.length,i=Array.from({length:n+1},()=>Array(r+1).fill(0));for(let a=n-1;a>=0;a--)for(let n=r-1;n>=0;n--)i[a][n]=e[a].key===t[n].key?i[a+1][n+1]+1:Math.max(i[a+1][n],i[a][n+1]);let a=[],o=0,s=0;for(;o<n&&s<r;)e[o].key===t[s].key?(a.push({type:`same`,b:t[s]}),o++,s++):i[o+1][s]>=i[o][s+1]?(a.push({type:`del`,a:e[o]}),o++):(a.push({type:`ins`,b:t[s]}),s++);for(;o<n;)a.push({type:`del`,a:e[o++]});for(;s<r;)a.push({type:`ins`,b:t[s++]});return a}function Pe(e,t){let n=Ne(q(e),q(t)),r=[],i=0;for(let e of n)e.type===`same`?i=e.b.to:e.type===`ins`?(r.push({fromA:0,toA:0,fromB:e.b.from,toB:e.b.to}),i=e.b.to):r.push({fromA:e.a.from,toA:e.a.to,fromB:i,toB:i});return r}var Fe=400;function J(e,t,n){return t.nodeFromJSON(e.parseWithFallback(n))}function Ie(e,t){let n=t.filter(e=>e.toB>e.fromB),r=[];return e.steps.forEach((t,i)=>{let a=t instanceof ee?`add`:t instanceof h?`remove`:null;if(a===null)return;let o=t,s=e.mapping.slice(i+1),c=s.map(o.from,-1),l=s.map(o.to,1);if(l<=c||n.some(e=>e.fromB<=c&&l<=e.toB))return;let u=e.mapping.slice(0,i).invert(),d=u.map(o.from),f=u.map(o.to);f<=d||r.push({fromA:d,toA:f,fromB:c,toB:l,markName:o.mark.type.name,kind:a})}),r}function Le(e,t,n,r){if(e.length>2e5||t.length>2e5)return{ok:!1,reason:`ceiling`};let i,a;try{i=J(r,n,e),a=J(r,n,t)}catch{return{ok:!1,reason:`parse`}}let o=a,s=null;try{s=je(i,a,{complexSteps:!0,wordDiffs:!0,simplifyDiff:!0}),o=s.doc}catch{}let c=Pe(i,o),l=s?Ie(s,c):[];return c.length+l.length>Fe?{ok:!1,reason:`ceiling`}:{ok:!0,afterDoc:o,beforeDoc:i,changes:c,markChanges:l}}var Re=`.ok-diff-ins, .ok-diff-ins-block, [data-diff-deleted]`;function ze(e){return e.changes.length+2*e.markChanges.length}function Y(e){let t=!1;return e.forEach(e=>{e.isBlock&&(t=!0)}),t}function Be(e){if(e.childCount===0)return!1;let t=!0;return e.forEach(e=>{e.type.name!==`listItem`&&e.type.name!==`taskItem`&&(t=!1)}),t}function X(e,t,n){let r=document.createElement(n?`div`:`span`);r.className=n?`ok-diff-del ok-diff-del-block`:`ok-diff-del`,r.setAttribute(`data-diff-deleted`,``);let i=e.serializeFragment(t);if(n&&Be(t)){let e=document.createElement(`ul`);e.appendChild(i),r.appendChild(e)}else r.appendChild(i);return r}function Ve(e,t,n,r,i){let a=te.fromSchema(i),o=[];for(let e of r){let n=t.slice(e.fromA,e.toA),r=Y(n.content);o.push(v.widget(e.fromB,()=>X(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]})),o.push(v.inline(e.fromB,e.toB,{class:`ok-diff-ins`},{inclusiveEnd:!0}))}for(let e of n)if(e.toB>e.fromB&&o.push(v.node(e.fromB,e.toB,{class:`ok-diff-ins-block`})),e.toA>e.fromA){let n=t.slice(e.fromA,e.toA),r=Y(n.content);o.push(v.widget(e.fromB,()=>X(a,n.content,r),{side:-1,ignoreSelection:!0,marks:[]}))}return y.create(e,o)}var He=new Set([`slashCommand`,`blockDragHandle`,`blockMover`,`tableInsertControls`,`fileHandler`,`gfmAutolink`,`inlineLinkInputRule`,`keyboardNav`,`tiptapFindReplace`,`selectionState`,`sourceDirtyObserver`,`tabFocusTrap`]),Z=i.filter(e=>!He.has(e.name)).map(e=>e.name===`jsxComponent`?_:e),Q=ie(Z);function Ue(e,t){return Le(e,t,Q,f())}var We=ne.create({name:`renderedDiffDecorations`,addOptions(){return{decorations:y.empty}},addProseMirrorPlugins(){let e=this.options.decorations;return[new b({key:new ae(`renderedDiffDecorations`),props:{decorations:()=>e}})]}});function Ge(e){let t=(0,T.c)(31),{diff:n}=e,r,i,a,o;if(t[0]!==n.afterDoc||t[1]!==n.beforeDoc||t[2]!==n.changes||t[3]!==n.markChanges){let e=Ve(n.afterDoc,n.beforeDoc,n.changes,n.markChanges,Q);o=p,a=!1,r=Z,i=We.configure({decorations:e}),t[0]=n.afterDoc,t[1]=n.beforeDoc,t[2]=n.changes,t[3]=n.markChanges,t[4]=r,t[5]=i,t[6]=a,t[7]=o}else r=t[4],i=t[5],a=t[6],o=t[7];let s;t[8]!==r||t[9]!==i?(s=[...r,i],t[8]=r,t[9]=i,t[10]=s):s=t[10];let c;t[11]===n.afterDoc?c=t[12]:(c=n.afterDoc.toJSON(),t[11]=n.afterDoc,t[12]=c);let l;t[13]===Symbol.for(`react.memo_cache_sentinel`)?(l={attributes:{class:`pt-4`}},t[13]=l):l=t[13];let u;t[14]!==a||t[15]!==s||t[16]!==c?(u={editable:a,extensions:s,content:c,editorProps:l},t[14]=a,t[15]=s,t[16]=c,t[17]=u):u=t[17];let d;t[18]===n?d=t[19]:(d=[n],t[18]=n,t[19]=d);let f=o(u,d),[h]=(0,N.useState)(Ke),g=(0,N.useRef)(null),_,v;t[20]===h?(_=t[21],v=t[22]):(_=()=>{let e=g.current;if(e)return e.appendChild(h),()=>{h.parentNode===e&&e.removeChild(h)}},v=[h],t[20]=h,t[21]=_,t[22]=v),(0,N.useLayoutEffect)(_,v);let y;t[23]===Symbol.for(`react.memo_cache_sentinel`)?(y=(0,E.jsx)(`div`,{className:`tiptap-editor`,children:(0,E.jsx)(`div`,{ref:g,style:{display:`contents`}})}),t[23]=y):y=t[23];let b;t[24]===f?b=t[25]:(b=(0,E.jsx)(m,{editor:f,className:`tiptap-editor-portal-content`}),t[24]=f,t[25]=b);let x;t[26]!==h||t[27]!==b?(x=(0,be.createPortal)(b,h),t[26]=h,t[27]=b,t[28]=x):x=t[28];let S;return t[29]===x?S=t[30]:(S=(0,E.jsxs)(`div`,{className:`editor-doc-scroll min-h-0 flex-1`,"data-testid":`rendered-diff-view`,children:[y,x]}),t[29]=x,t[30]=S),S}function Ke(){let e=document.createElement(`div`);return e.style.display=`contents`,e}var qe=`[data-property-change]`;function Je(e){let t=0,n=!1;for(let r of e.split(`
|
|
3
|
-
`)){let e=r.startsWith(`+`)&&!r.startsWith(`+++`)||r.startsWith(`-`)&&!r.startsWith(`---`);e&&!n&&(t+=1),n=e}return t}function Ye(e){let t=Array.from(e.querySelectorAll(`.diff-code-insert, .diff-code-delete`)),n=[],r=null;for(let e of t){let t=e.closest(`tr`);t&&((r===null||t.previousElementSibling!==r)&&n.push(e),r=t)}return n}function $(e){let t=0,n=0;for(let r of e.split(`
|
|
4
|
-
`))r.startsWith(`+`)&&!r.startsWith(`+++`)?t++:r.startsWith(`-`)&&!r.startsWith(`---`)&&n++;return{additions:t,deletions:n}}function Xe(e,t){return`${e}\u0000${t}`}function Ze(e,t,n){let r=x(e).body,i=x(t).body;return r===i?``:de(n,r,i,``,``,{context:Math.max(r.split(`
|
|
5
|
-
`).length,i.split(`
|
|
6
|
-
`).length)})}function Qe(e,t,n,r,i){let o=(0,T.c)(10),s=r===void 0?`vs-live`:r,c=i===void 0?null:i,{activeProvider:l}=a(),u;o[0]===Symbol.for(`react.memo_cache_sentinel`)?(u={status:`idle`,diff:null},o[0]=u):u=o[0];let[d,f]=(0,N.useState)(u),p=(0,N.useRef)(l),m;o[1]===l?m=o[2]:(m=()=>{p.current=l},o[1]=l,o[2]=m),(0,N.useEffect)(m);let h,g;return o[3]!==n||o[4]!==t||o[5]!==s||o[6]!==c||o[7]!==e?(h=()=>{if(!e){f({status:`idle`,diff:null});return}let r=e,i=!1;f({status:`loading`,diff:null});let a=async function(e){let r=Xe(t,e),i=n.get(r);if(i!==void 0)return i;let a=await fetch(`/api/history/${e}?docName=${encodeURIComponent(t)}`);if(!a.ok)return console.error(`[timeline-diff] history fetch returned non-ok response`,{sha:e,docName:t,status:a.status}),null;let o=(await a.json()).content??``;return n.set(r,o),o};return(async function(){try{let e=await a(r);if(i)return;if(e===null){f({status:`error`,diff:null});return}let n,o;if(s===`vs-parent`){let t=c?await a(c):``;if(i)return;if(t===null){f({status:`error`,diff:null});return}n=t,o=e}else n=e,o=p.current?.document.getText(`source`).toString()??``;let l=x(n).body,u=x(o).body,d=Ze(n,o,t),m=re(n,o);if(i)return;let{additions:h,deletions:g}=$(d);f({status:`ready`,diff:d,additions:h,deletions:g,before:l,after:u,properties:m})}catch(e){i||(console.error(`[timeline-diff] failed to load entry diff`,{sha:r,docName:t,mode:s,err:e}),f({status:`error`,diff:null}))}})(),()=>{i=!0}},g=[e,t,n,s,c],o[3]=n,o[4]=t,o[5]=s,o[6]=c,o[7]=e,o[8]=h,o[9]=g):(h=o[8],g=o[9]),(0,N.useEffect)(h,g),d}export{Je as a,Re as c,Ye as i,ze as l,Qe as n,Ge as o,qe as r,Ue as s,$ as t,fe as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-IyM2RV1-.mjs";export{e as repairSkills};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"./src-C1ipB-PD.mjs";import{r as e}from"./logger-DFxEUjvj.mjs";import{dirname as t,join as n,resolve as r}from"node:path";import{fileURLToPath as i}from"node:url";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c,readFileSync as l,unlinkSync as u,writeFileSync as d,writeSync as f}from"node:fs";import{homedir as p,hostname as m}from"node:os";import{randomUUID as h}from"node:crypto";function g(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function _(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}function v(e){return new URL(e.url??``,`http://localhost`).searchParams}function y(e){let t=e?.code;return typeof t==`string`?t:void 0}const b=/^[A-Za-z0-9-]{8,64}$/;let x=null;function S(e){return n(e??p(),`.ok`,`machine-id`)}function C(n){if(n===void 0&&x!==null)return x;let r=S(n),i=null;try{let e=l(r,`utf-8`).trim();b.test(e)&&(i=e)}catch{}if(i===null){i=h();try{s(t(r),{recursive:!0}),d(r,`${i}\n`,{encoding:`utf-8`,mode:384})}catch(t){e(`machine-id`).warn({path:r,err:t},`Failed to persist ${r} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${t instanceof Error?t.message:String(t)}`)}}return n===void 0&&(x=i),i}function w(){try{let e=r(t(i(import.meta.url)),`..`,`package.json`),n=JSON.parse(l(e,`utf-8`));if(typeof n.version==`string`&&n.version.length>0)return n.version}catch{}return`0.0.0-unknown`}const T=w(),E=1,D=e(`process-lock`);var O=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`OpenKnowledge ${n} already running at ${e.url??`port ${e.port}`} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function k(e,t){return r(e,`${t}.lock`)}const A=new Map;function j(e){A.set(e,(A.get(e)??0)+1)}function M(e){let t=A.get(e);return t===void 0||t<=1?(A.delete(e),!0):(A.set(e,t-1),!1)}function N(e){return typeof e.machineId==`string`?e.machineId===C():e.hostname===m()}const P=new Set;let F=!1;function I(e){P.add(e),!F&&(F=!0,process.on(`exit`,()=>{for(let e of P)try{let t=JSON.parse(l(e,`utf-8`));if(t?.pid!==process.pid||typeof t.machineId==`string`&&t.machineId!==C()||t.machineId===void 0&&typeof t.hostname==`string`&&t.hostname!==m())continue;u(e)}catch{}}))}function L(e,t){try{let n=JSON.parse(l(e,`utf-8`));return n&&typeof n==`object`&&_(n.pid)?n:(D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null}}function R(e){let{lockName:t,lockDir:n,metadata:r}=e,i=`[${t}-lock]`;s(n,{recursive:!0});let l=k(n,t),p={pid:process.pid,hostname:m(),port:r.port,...r.url!==void 0&&{url:r.url},startedAt:new Date().toISOString(),worktreeRoot:r.worktreeRoot,machineId:C(),...r.kind!==void 0&&{kind:r.kind},...r.parentPid!==void 0&&{parentPid:r.parentPid},...r.capabilities!==void 0&&{capabilities:r.capabilities},protocolVersion:r.protocolVersion??1,runtimeVersion:r.runtimeVersion??T},h=JSON.stringify(p,null,2);for(let e=0;e<3;e++){if(!o(l))try{let e=c(l,`wx`,384);try{f(e,h)}finally{a(e)}return j(l),I(l),z({lockName:t,lockDir:n,lockPath:l})}catch(e){if(y(e)!==`EEXIST`)throw e}let e=L(l,i);if(e){if(N(e)&&e.pid===process.pid)return d(l,h,{encoding:`utf-8`,mode:384}),j(l),I(l),z({lockName:t,lockDir:n,lockPath:l});if(g(e.pid))throw new O(e,l,t);D.warn({pid:e.pid,host:e.hostname},`${i} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{u(l)}catch{}}throw Error(`${i} Failed to acquire ${l} after 3 attempts (concurrent acquire contention).`)}function z(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>q({lockName:t,lockDir:n}),updatePort:(e,r)=>H({lockName:t,lockDir:n,port:e,url:r})}}function B(e){let t;try{t=new URL(e)}catch{return null}if(t.protocol!==`http:`&&t.protocol!==`https:`)return null;let n=t.hostname;return n===`localhost`||n===`[::1]`||/^127\.\d{1,3}\.\d{1,3}\.\d{1,3}$/.test(n)?t.origin:null}function V(e,t){if(typeof e.url==`string`&&e.url.length>0){let t=B(e.url);if(t!==null)return t}if(e.port>0){let n=t?.fallbackHost??`localhost`;return`http://${n===`0.0.0.0`||n===`::`?`localhost`:n.includes(`:`)&&!n.startsWith(`[`)?`[${n}]`:n}:${e.port}`}return null}function H(e){let{lockName:t,lockDir:n,port:r,url:i}=e,a=`[${t}-lock]`,s=k(n,t);if(!o(s)){D.warn({lockPath:s},`${a} Lock file missing at ${s} during port update — skipping`);return}let c;try{let e=JSON.parse(l(s,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:s},`${a} Corrupt lock at ${s} during port update — skipping`);return}c=e}catch{D.warn({lockPath:s},`${a} Unreadable lock at ${s} during port update — skipping`);return}if(c.pid===process.pid&&N(c)){c.port=r,i===void 0?delete c.url:c.url=i;try{d(s,JSON.stringify(c,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:s,err:e},`${a} Failed to update port in ${s}: ${e instanceof Error?e.message:String(e)}`)}}}function U(e){let{lockName:t,lockDir:n}=e,r=`[${t}-lock]`,i=k(n,t);if((A.get(i)??0)>1)return;let a;try{let e=JSON.parse(l(i,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:i},`${r} Corrupt lock at ${i} during draining mark — skipping`);return}a=e}catch(e){y(e)!==`ENOENT`&&D.warn({lockPath:i,err:e},`${r} Unreadable lock at ${i} during draining mark — skipping: ${e instanceof Error?e.message:String(e)}`);return}if(a.pid===process.pid&&N(a)&&a.draining!==!0){a.draining=!0;try{d(i,JSON.stringify(a,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:i,err:e},`${r} Failed to mark ${i} draining: ${e instanceof Error?e.message:String(e)}`)}}}function W(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return null;let i;try{let e=JSON.parse(l(r,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid))return null;i=e}catch{return null}if(!N(i))return null;if(!g(i.pid)){try{u(r)}catch{}return null}return i}function G(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return{status:`absent`};let i;try{i=JSON.parse(l(r,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!i||typeof i!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:i};let a=i;if(!_(a.pid)||typeof a.hostname!=`string`||typeof a.port!=`number`||typeof a.startedAt!=`string`||typeof a.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:i};let s={pid:a.pid,hostname:a.hostname,port:a.port,url:typeof a.url==`string`?a.url:void 0,startedAt:a.startedAt,worktreeRoot:a.worktreeRoot,machineId:typeof a.machineId==`string`?a.machineId:void 0,draining:a.draining===!0?!0:void 0,capabilities:Array.isArray(a.capabilities)&&a.capabilities.every(e=>typeof e==`string`)?a.capabilities:void 0,protocolVersion:typeof a.protocolVersion==`number`?a.protocolVersion:void 0,runtimeVersion:typeof a.runtimeVersion==`string`?a.runtimeVersion:void 0};if(!N(s))return{status:`stale`,lock:s};if(!g(s.pid)){try{u(r)}catch{}return{status:`stale`,lock:s}}return s.protocolVersion===void 0||s.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:i}:{status:`live`,lock:s}}async function K(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>W({lockName:t,lockDir:n})),o=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a();if(s===null||s.draining!==!0)return`no-drain`;let c=Date.now()+r;for(;Date.now()<c;){await o(i);let e=a();if(e===null)return`released`;if(e.draining!==!0)return`no-drain`}return`timeout`}function q(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,a=k(n,t);if(M(a)){if(r){U({lockName:t,lockDir:n});return}if(o(a))try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||!N(e))return;u(a),P.delete(a)}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to release ${a}: ${e instanceof Error?e.message:String(e)}`)}}}var J=class extends O{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function Y(e,t){try{return R({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof O&&e.lockName===`server`?new J(e.existing,e.lockPath):e}}function X(e,t,n){H({lockName:`server`,lockDir:e,port:t,url:n})}function Z(e){return W({lockName:`server`,lockDir:e})}function Q(e,t){q({lockName:`server`,lockDir:e,...t})}function $(e){U({lockName:`server`,lockDir:e})}function ee(e,t){return K({lockName:`server`,lockDir:e,...t})}export{_ as C,g as S,T as _,Q as a,y as b,O as c,k as d,U as f,H as g,q as h,Z as i,R as l,G as m,Y as n,X as o,W as p,$ as r,ee as s,J as t,V as u,E as v,v as x,C as y};
|
|
2
|
-
//# sourceMappingURL=server-lock-BmpC4xda.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,o as t,r as n}from"./server-lock-BmpC4xda.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
|
package/dist/src-DYu0cH0G.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./src-C1ipB-PD.mjs";import"./write-project-skill-BPDDCXLT.mjs";import"./src-CrHWeR5-.mjs";import"./acp-harness-probe-BEeqLM1e.mjs";import"./init-DTgyXqMA.mjs";import{n as e}from"./loader-DOVe5HC9.mjs";import"./skill-teardown-Cn7cfIYa.mjs";import"./preview-CPQM3RYG.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
|
package/dist/start-COUGziKD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as e,_ as t,m as n,n as r}from"./start-B3LinnWE.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};
|
|
File without changes
|