@runfusion/fusion 0.70.0 → 0.70.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +68 -41
- package/dist/client/.vite/manifest.json +249 -249
- package/dist/client/assets/{AgentDetailView-UcyGK_vC.js → AgentDetailView-BHnJqo2r.js} +1 -1
- package/dist/client/assets/{AgentPermissionPolicyEditor-DVcgvRjw.js → AgentPermissionPolicyEditor-CLnVN1V8.js} +1 -1
- package/dist/client/assets/{AgentsView-BE-HTsa2.js → AgentsView-C2mpl-F-.js} +3 -3
- package/dist/client/assets/{ChatView-ChA7lPMm.js → ChatView-DO5uqh7X.js} +1 -1
- package/dist/client/assets/{CommandCenter-B_6bfWsl.js → CommandCenter-D4_mJL1B.js} +1 -1
- package/dist/client/assets/{DevServerView-B9D8g_ut.js → DevServerView-Cmwv4QOO.js} +1 -1
- package/dist/client/assets/{DirectoryPicker-D6EbSzd1.js → DirectoryPicker-DLuDx_eK.js} +1 -1
- package/dist/client/assets/{DocumentsView-DRfEB1Lf.js → DocumentsView-CBifAhxj.js} +1 -1
- package/dist/client/assets/{EvalsView-BlMBpGr-.js → EvalsView-BjlDIWu3.js} +1 -1
- package/dist/client/assets/{ExperimentalAgentOnboardingModal-DB_bRWMS.js → ExperimentalAgentOnboardingModal-CrTPfgfP.js} +1 -1
- package/dist/client/assets/{GoalsView-C5s1QHy6.js → GoalsView-udCtfe8K.js} +1 -1
- package/dist/client/assets/{InsightsView-0Gyc7f0s.js → InsightsView-6kIswvAp.js} +1 -1
- package/dist/client/assets/{MemoryView-iCNmMJJS.js → MemoryView-BVHIG2Cw.js} +1 -1
- package/dist/client/assets/{PiExtensionsManager-DeOI2FkF.js → PiExtensionsManager-Q88P1dg_.js} +1 -1
- package/dist/client/assets/{PluginManager-DhPlSlzY.js → PluginManager-lE99At6D.js} +1 -1
- package/dist/client/assets/{PullRequestView-DUvemdMr.js → PullRequestView-BOKSbrgG.js} +1 -1
- package/dist/client/assets/{ResearchView-B0VUmdp-.js → ResearchView-X8nkEU65.js} +1 -1
- package/dist/client/assets/{SecretsView-JSCYGBv7.js → SecretsView-BDj6wR01.js} +1 -1
- package/dist/client/assets/{SessionTerminal-DHyiQAjY.js → SessionTerminal-CoePyx-a.js} +1 -1
- package/dist/client/assets/{SettingsModal-DBmFSHcS.js → SettingsModal-BoQyi1uT.js} +3 -3
- package/dist/client/assets/{SettingsModal-CAAE8x4y.js → SettingsModal-CECrEryw.js} +1 -1
- package/dist/client/assets/{SettingsTextareaRow-Bepf8u_T.js → SettingsTextareaRow-DV_0_v_J.js} +1 -1
- package/dist/client/assets/{SetupWizardModal-DBougliS.js → SetupWizardModal-B482Mabf.js} +2 -2
- package/dist/client/assets/{SkillsView-Do_RCxwg.js → SkillsView-Cp7jNXEV.js} +1 -1
- package/dist/client/assets/{ThemeDropdown-BZL3YFeV.js → ThemeDropdown-ChrT7lhT.js} +1 -1
- package/dist/client/assets/{TodoView-DUttsF_y.js → TodoView-HZw9-AQI.js} +1 -1
- package/dist/client/assets/{WorkflowNodeEditor-5V-ag8di.js → WorkflowNodeEditor-DeV9dfn3.js} +1 -1
- package/dist/client/assets/app-BLTqCjPk.js +13 -0
- package/dist/client/assets/app-BwKqEIVs.js +13 -0
- package/dist/client/assets/app-Bx4Tg9WL.js +13 -0
- package/dist/client/assets/app-bX7Aarj6.js +13 -0
- package/dist/client/assets/app-gasJpw6T.js +13 -0
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-Btn4zvDG.js → architectureDiagram-3BPJPVTR-tnFguX8z.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-BD9pvlM8.js → blockDiagram-GPEHLZMM-BKPZ6LQx.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-DoKUglr6.js → c4Diagram-AAUBKEIU-DSObk7BW.js} +1 -1
- package/dist/client/assets/channel-BU3NN8kT.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-CcrYik1W.js → chunk-2J33WTMH-CnJlEes6.js} +1 -1
- package/dist/client/assets/{chunk-4BX2VUAB-DPBkmhox.js → chunk-4BX2VUAB-s6CMovw_.js} +1 -1
- package/dist/client/assets/{chunk-55IACEB6-BKgW-ZME.js → chunk-55IACEB6-NEIqJT7j.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-BwHZ89kV.js → chunk-727SXJPM-C1CQZVzb.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-D9u2wbjN.js → chunk-AQP2D5EJ-6gMoMdGb.js} +1 -1
- package/dist/client/assets/{chunk-FMBD7UC4-CnCKrO3d.js → chunk-FMBD7UC4-DmPr6Fr6.js} +1 -1
- package/dist/client/assets/{chunk-ND2GUHAM-C9U4i51P.js → chunk-ND2GUHAM-DdT6_Vir.js} +1 -1
- package/dist/client/assets/{chunk-QZHKN3VN-CfPCe-_9.js → chunk-QZHKN3VN-X6wAiHwG.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-CCnXAfXJ.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-CCnXAfXJ.js +1 -0
- package/dist/client/assets/{cose-bilkent-S5V4N54A-DtwCEQs8.js → cose-bilkent-S5V4N54A-DiYJ_SGs.js} +1 -1
- package/dist/client/assets/{dagre-BM42HDAG-7af6SNqt.js → dagre-BM42HDAG-DbK9iSU6.js} +1 -1
- package/dist/client/assets/{dashboard-view-BedVE0Ih.js → dashboard-view-BuYhP1Cp.js} +1 -1
- package/dist/client/assets/{dashboard-view-DxJ37rW2.js → dashboard-view-C3f_CnQ1.js} +1 -1
- package/dist/client/assets/{dashboard-view-CVo9Y-Mr.js → dashboard-view-CUyQsgCx.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-POCtmGz8.js → diagram-2AECGRRQ-DzRxhbFR.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-i5K8mqYD.js → diagram-5GNKFQAL-CTMHqhQS.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-Sn06yZUj.js → diagram-KO2AKTUF-BuzYjBIv.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-C2fWgirp.js → diagram-LMA3HP47-DNo7IO4h.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-Bt2bFUl9.js → diagram-OG6HWLK6-BDCorOru.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BghBGlaT.js → erDiagram-TEJ5UH35-Cz0hE7uE.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-wSa-kKJr.js → flowDiagram-I6XJVG4X-Kb2I0MOg.js} +1 -1
- package/dist/client/assets/{folder-open-DNSbtgHO.js → folder-open-LzyyHcib.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-DWBQrRfD.js → ganttDiagram-6RSMTGT7--M8kpndX.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-DF3OeXPN.js → gitGraphDiagram-PVQCEYII-BvyviZo2.js} +1 -1
- package/dist/client/assets/{index-E8N-nvEr.js → index-BH5aIwaM.js} +285 -285
- package/dist/client/assets/index-Co20nJU4.css +1 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA--C0rwWUk.js → infoDiagram-5YYISTIA-Bgm5nKut.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-DbOOTJuV.js → ishikawaDiagram-YF4QCWOH-DWW_Prtm.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-B-9JjpPp.js → journeyDiagram-JHISSGLW-BOfifstC.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-qZZGQNnO.js → kanban-definition-UN3LZRKU-V8JEMLyb.js} +1 -1
- package/dist/client/assets/{mermaid.core-CeXW1p4f.js → mermaid.core-DDpO_pvZ.js} +4 -4
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-BXRCpP2x.js → mindmap-definition-RKZ34NQL-BLI9JHhu.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-47zFHuRm.js → pieDiagram-4H26LBE5-BL5eUgb4.js} +1 -1
- package/dist/client/assets/{puzzle-BNhvAyID.js → puzzle-BOqqcjsU.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-DUKmccO0.js → quadrantDiagram-W4KKPZXB-CtvzPtau.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-BOJ_6eOW.js → requirementDiagram-4Y6WPE33-Co2--lq9.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-BHUv0akC.js → sankeyDiagram-5OEKKPKP-DaAXgU9Y.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-1EV1Z4wU.js → sequenceDiagram-3UESZ5HK-zdmQqra5.js} +1 -1
- package/dist/client/assets/{shield-alert-fp6442hB.js → shield-alert-DfIgeeR0.js} +1 -1
- package/dist/client/assets/{standing-instructions-template-BuvHfp3C.js → standing-instructions-template-B5GKUe8V.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-gl5trnu3.js → stateDiagram-AJRCARHV-CXK0Nj1C.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-BHNVJYJU-BZTcdF3O.js → stateDiagram-v2-BHNVJYJU-BDtUdqu0.js} +1 -1
- package/dist/client/assets/{timeline-definition-PNZ67QCA-tWTH8fak.js → timeline-definition-PNZ67QCA-C2VA4hrS.js} +1 -1
- package/dist/client/assets/{upload-Qz1855iO.js → upload-DVSzPAp1.js} +1 -1
- package/dist/client/assets/{users-BQK7rz20.js → users-Bi9t1Jl7.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-CFYaMPIr.js → vennDiagram-CIIHVFJN-3r5bGzbL.js} +1 -1
- package/dist/client/assets/{wardley-L42UT6IY-L-s3D5go.js → wardley-L42UT6IY-B8CM4294.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-Bnr2mimd.js → wardleyDiagram-YWT4CUSO-nzJ6haZ4.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-Bkx54Q3q.js → xychartDiagram-2RQKCTM6-CWUTnMyY.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/version.json +1 -1
- package/dist/extension.js +38 -32
- package/package.json +1 -1
- package/dist/client/assets/app-B3aUA71e.js +0 -13
- package/dist/client/assets/app-CKMMlwBM.js +0 -13
- package/dist/client/assets/app-CM_EbIz5.js +0 -13
- package/dist/client/assets/app-D5nFfAtx.js +0 -13
- package/dist/client/assets/app-DSo_fHWv.js +0 -13
- package/dist/client/assets/channel-DgUBVYLb.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-zHoYgXgS.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-zHoYgXgS.js +0 -1
- package/dist/client/assets/index-Bxrp0IKg.css +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as lr}from"./chunk-4BX2VUAB-DPBkmhox.js";import{I as hr}from"./chunk-QZHKN3VN-CfPCe-_9.js";import{q as $r,p as fr,s as gr,g as ur,a as yr,b as xr,_ as h,E as J,l as w,c as W,u as mr,F as pr,z as br,j as B,G as wr,H as kr,I as vr}from"./mermaid.core-CeXW1p4f.js";import{p as Cr}from"./wardley-L42UT6IY-L-s3D5go.js";import{s as Er}from"./vendor-reactflow-9C3XTE7_.js";import"./index-E8N-nvEr.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Br=kr.gitGraph,S=h(()=>wr({...Br,...J().gitGraph}),"getConfig"),d=new hr(()=>{const r=S(),e=r.mainBranchName,t=r.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function Y(){return vr({length:7})}h(Y,"getID");function tr(r,e){const t=Object.create(null);return r.reduce((s,o)=>{const i=e(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(tr,"uniqBy");var Tr=h(function(r){d.records.direction=r},"setDirection"),Lr=h(function(r){w.debug("options str",r),r=r?.trim(),r=r||"{}";try{d.records.options=JSON.parse(r)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),Mr=h(function(){return d.records.options},"getOptions"),Ir=h(function(r){let e=r.msg,t=r.id;const s=r.type;let o=r.tags;w.info("commit",e,t,s,o),w.debug("Entering commit:",e,t,s,o);const i=S();t=B.sanitizeText(t,i),e=B.sanitizeText(e,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:e,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Rr=h(function(r){let e=r.name;const t=r.order;if(e=B.sanitizeText(e,S()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:t}),ar(e),w.debug("in createBranch")},"branch"),Or=h(r=>{let e=r.branch,t=r.id;const s=r.type,o=r.tags,i=S();e=B.sanitizeText(e,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(e),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},c}if(!d.records.branches.has(e)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${e} ${t} ${s} ${o?.join(" ")}`,token:`merge ${e} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${e} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_r=h(function(r){let e=r.id,t=r.targetId,s=r.tags,o=r.parent;w.debug("Entering cherryPick:",e,t,s);const i=S();if(e=B.sanitizeText(e,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!e||!d.records.commits.has(e)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(e);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ar=h(function(r){if(r=B.sanitizeText(r,S()),d.records.branches.has(r)){d.records.currBranch=r;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw e.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},e}},"checkout");function V(r,e,t){const s=r.indexOf(e);s===-1?r.push(t):r.splice(s,1,t)}h(V,"upsert");function Q(r){const e=r.reduce((o,i)=>o.seq>i.seq?o:i,r[0]);let t="";r.forEach(function(o){o===e?t+=" *":t+=" |"});const s=[t,e.id,e.seq];for(const o in d.records.branches)d.records.branches.get(o)===e.id&&s.push(o);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const o=d.records.commits.get(e.parents[0]);V(r,e,o),e.parents[1]&&r.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const o=d.records.commits.get(e.parents[0]);V(r,e,o)}}r=tr(r,o=>o.id),Q(r)}h(Q,"prettyPrintCommitHistory");var Gr=h(function(){w.debug(d.records.commits);const r=nr()[0];Q([r])},"prettyPrint"),Hr=h(function(){d.reset(),br()},"clear"),Sr=h(function(){return[...d.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Ar=h(function(){return d.records.branches},"getBranches"),Dr=h(function(){return d.records.commits},"getCommits"),nr=h(function(){const r=[...d.records.commits.values()];return r.forEach(function(e){w.debug(e.id)}),r.sort((e,t)=>e.seq-t.seq),r},"getCommitsArray"),qr=h(function(){return d.records.currBranch},"getCurrentBranch"),Pr=h(function(){return d.records.direction},"getDirection"),Wr=h(function(){return d.records.head},"getHead"),sr={commitType:m,getConfig:S,setDirection:Tr,setOptions:Lr,getOptions:Mr,commit:Ir,branch:Rr,merge:Or,cherryPick:_r,checkout:ar,prettyPrint:Gr,clear:Hr,getBranchesAsObjArray:Sr,getBranches:Ar,getCommits:Dr,getCommitsArray:nr,getCurrentBranch:qr,getDirection:Pr,getHead:Wr,setAccTitle:xr,getAccTitle:yr,getAccDescription:ur,setAccDescription:gr,setDiagramTitle:fr,getDiagramTitle:$r},Nr=h((r,e)=>{lr(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)Fr(t,e)},"populate"),Fr=h((r,e)=>{const s={Commit:h(o=>e.commit(zr(o)),"Commit"),Branch:h(o=>e.branch(Yr(o)),"Branch"),Merge:h(o=>e.merge(jr(o)),"Merge"),Checkout:h(o=>e.checkout(Ur(o)),"Checkout"),CherryPicking:h(o=>e.cherryPick(Kr(o)),"CherryPicking")}[r.$type];s?s(r):w.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),zr=h(r=>({id:r.id,msg:r.message??"",type:r.type!==void 0?m[r.type]:m.NORMAL,tags:r.tags??void 0}),"parseCommit"),Yr=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),jr=h(r=>({branch:r.branch,id:r.id??"",type:r.type!==void 0?m[r.type]:void 0,tags:r.tags??void 0}),"parseMerge"),Ur=h(r=>r.branch,"parseCheckout"),Kr=h(r=>({id:r.id,targetId:"",tags:r.tags?.length===0?void 0:r.tags,parent:r.parent}),"parseCherryPicking"),Vr={parse:h(async r=>{const e=await Cr("gitGraph",r);w.debug(e),Nr(e,sr)},"parse")},O=10,_=40,L=4,I=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xr=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((r,e,t=!1)=>t&&r>0?(r-1)%(e-1)+1:r%e,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],R=0,y="LR",Jr=h(()=>{C.clear(),E.clear(),q.clear(),R=0,z=[],y="LR"},"clear"),or=h(r=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),e.appendChild(o)}),e},"drawText"),cr=h(r=>{let e,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),r.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(e=o,s=i)}),e},"findClosestParent"),Qr=h(r=>{let e="",t=1/0;return r.forEach(s=>{const o=E.get(s).y;o<=t&&(e=s,t=o)}),e||void 0},"findClosestParentBT"),Zr=h((r,e,t)=>{let s=t,o=t;const i=[];r.forEach(n=>{const a=e.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=ee(a),o=Math.max(s,o)):i.push(a),te(a,s)}),s=o,i.forEach(n=>{ae(n,s,t)}),r.forEach(n=>{const a=e.get(n);if(a?.parents.length){const l=Qr(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),re=h(r=>{const e=cr(r.parents.filter(s=>s!==null));if(!e)throw new Error(`Closest parent not found for commit ${r.id}`);const t=E.get(e)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${r.id}`);return t},"findClosestParentPos"),ee=h(r=>re(r)+_,"calculateCommitPosition"),te=h((r,e)=>{const t=C.get(r.branch);if(!t)throw new Error(`Branch not found for commit ${r.id}`);const s=t.pos,o=e+O;return E.set(r.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ae=h((r,e,t)=>{const s=C.get(r.branch);if(!s)throw new Error(`Branch not found for commit ${r.id}`);const o=e+t,i=s.pos;E.set(r.id,{x:i,y:o})},"setRootPosition"),ne=h((r,e,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xr.has(n??"");if(i===m.HIGHLIGHT)r.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${e.id} commit-highlight${H(o,G,l)} ${s}-outer`),r.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${e.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)r.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`);else{const g=r.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${e.id} commit${H(o,G,l)}`),i===m.MERGE){const $=r.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=r.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),se=h((r,e,t,s,o)=>{if(e.type!==m.CHERRY_PICK&&(e.customId&&e.type===m.MERGE||e.type!==m.MERGE)&&o.showCommitLabel){const i=r.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(e.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),oe=h((r,e,t,s)=>{if(e.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of e.tags.reverse()){const f=r.insert("polygon"),g=r.append("circle"),$=r.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{p as lr}from"./chunk-4BX2VUAB-s6CMovw_.js";import{I as hr}from"./chunk-QZHKN3VN-X6wAiHwG.js";import{q as $r,p as fr,s as gr,g as ur,a as yr,b as xr,_ as h,E as J,l as w,c as W,u as mr,F as pr,z as br,j as B,G as wr,H as kr,I as vr}from"./mermaid.core-DDpO_pvZ.js";import{p as Cr}from"./wardley-L42UT6IY-B8CM4294.js";import{s as Er}from"./vendor-reactflow-9C3XTE7_.js";import"./index-BH5aIwaM.js";import"./vendor-react-SZ_qB27O.js";import"./vendor-i18n-GF3RlKbq.js";import"./vendor-codemirror-jBKmHyH0.js";import"./vendor-xterm-BNq00GSj.js";import"./step-yuy0qJer.js";var m={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Br=kr.gitGraph,S=h(()=>wr({...Br,...J().gitGraph}),"getConfig"),d=new hr(()=>{const r=S(),e=r.mainBranchName,t=r.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:t}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function Y(){return vr({length:7})}h(Y,"getID");function tr(r,e){const t=Object.create(null);return r.reduce((s,o)=>{const i=e(o);return t[i]||(t[i]=!0,s.push(o)),s},[])}h(tr,"uniqBy");var Tr=h(function(r){d.records.direction=r},"setDirection"),Lr=h(function(r){w.debug("options str",r),r=r?.trim(),r=r||"{}";try{d.records.options=JSON.parse(r)}catch(e){w.error("error while parsing gitGraph options",e.message)}},"setOptions"),Mr=h(function(){return d.records.options},"getOptions"),Ir=h(function(r){let e=r.msg,t=r.id;const s=r.type;let o=r.tags;w.info("commit",e,t,s,o),w.debug("Entering commit:",e,t,s,o);const i=S();t=B.sanitizeText(t,i),e=B.sanitizeText(e,i),o=o?.map(a=>B.sanitizeText(a,i));const n={id:t||d.records.seq+"-"+Y(),message:e,seq:d.records.seq++,type:s??m.NORMAL,tags:o??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=n,w.info("main branch",i.mainBranchName),d.records.commits.has(n.id)&&w.warn(`Commit ID ${n.id} already exists`),d.records.commits.set(n.id,n),d.records.branches.set(d.records.currBranch,n.id),w.debug("in pushCommit "+n.id)},"commit"),Rr=h(function(r){let e=r.name;const t=r.order;if(e=B.sanitizeText(e,S()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:t}),ar(e),w.debug("in createBranch")},"branch"),Or=h(r=>{let e=r.branch,t=r.id;const s=r.type,o=r.tags,i=S();e=B.sanitizeText(e,i),t&&(t=B.sanitizeText(t,i));const n=d.records.branches.get(d.records.currBranch),a=d.records.branches.get(e),l=n?d.records.commits.get(n):void 0,f=a?d.records.commits.get(a):void 0;if(l&&f&&l.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},c}if(!d.records.branches.has(e)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},c}if(f===void 0||!f){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},c}if(l===f){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},c}if(t&&d.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${e} ${t} ${s} ${o?.join(" ")}`,token:`merge ${e} ${t} ${s} ${o?.join(" ")}`,expected:[`merge ${e} ${t}_UNIQUE ${s} ${o?.join(" ")}`]},c}const g=a||"",$={id:t||`${d.records.seq}-${Y()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,g],branch:d.records.currBranch,type:m.MERGE,customType:s,customId:!!t,tags:o??[]};d.records.head=$,d.records.commits.set($.id,$),d.records.branches.set(d.records.currBranch,$.id),w.debug(d.records.branches),w.debug("in mergeBranch")},"merge"),_r=h(function(r){let e=r.id,t=r.targetId,s=r.tags,o=r.parent;w.debug("Entering cherryPick:",e,t,s);const i=S();if(e=B.sanitizeText(e,i),t=B.sanitizeText(t,i),s=s?.map(l=>B.sanitizeText(l,i)),o=B.sanitizeText(o,i),!e||!d.records.commits.has(e)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},l}const n=d.records.commits.get(e);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(n.parents)&&n.parents.includes(o)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===m.MERGE&&!o)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!d.records.commits.has(t)){if(a===d.records.currBranch){const $=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const l=d.records.branches.get(d.records.currBranch);if(l===void 0||!l){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const f=d.records.commits.get(l);if(f===void 0||!f){const $=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw $.hash={text:`cherryPick ${e} ${t}`,token:`cherryPick ${e} ${t}`,expected:["cherry-pick abc"]},$}const g={id:d.records.seq+"-"+Y(),message:`cherry-picked ${n?.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,n.id],branch:d.records.currBranch,type:m.CHERRY_PICK,tags:s?s.filter(Boolean):[`cherry-pick:${n.id}${n.type===m.MERGE?`|parent:${o}`:""}`]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),w.debug(d.records.branches),w.debug("in cherryPick")}},"cherryPick"),ar=h(function(r){if(r=B.sanitizeText(r,S()),d.records.branches.has(r)){d.records.currBranch=r;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${r}")`);throw e.hash={text:`checkout ${r}`,token:`checkout ${r}`,expected:[`branch ${r}`]},e}},"checkout");function V(r,e,t){const s=r.indexOf(e);s===-1?r.push(t):r.splice(s,1,t)}h(V,"upsert");function Q(r){const e=r.reduce((o,i)=>o.seq>i.seq?o:i,r[0]);let t="";r.forEach(function(o){o===e?t+=" *":t+=" |"});const s=[t,e.id,e.seq];for(const o in d.records.branches)d.records.branches.get(o)===e.id&&s.push(o);if(w.debug(s.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const o=d.records.commits.get(e.parents[0]);V(r,e,o),e.parents[1]&&r.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const o=d.records.commits.get(e.parents[0]);V(r,e,o)}}r=tr(r,o=>o.id),Q(r)}h(Q,"prettyPrintCommitHistory");var Gr=h(function(){w.debug(d.records.commits);const r=nr()[0];Q([r])},"prettyPrint"),Hr=h(function(){d.reset(),br()},"clear"),Sr=h(function(){return[...d.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),Ar=h(function(){return d.records.branches},"getBranches"),Dr=h(function(){return d.records.commits},"getCommits"),nr=h(function(){const r=[...d.records.commits.values()];return r.forEach(function(e){w.debug(e.id)}),r.sort((e,t)=>e.seq-t.seq),r},"getCommitsArray"),qr=h(function(){return d.records.currBranch},"getCurrentBranch"),Pr=h(function(){return d.records.direction},"getDirection"),Wr=h(function(){return d.records.head},"getHead"),sr={commitType:m,getConfig:S,setDirection:Tr,setOptions:Lr,getOptions:Mr,commit:Ir,branch:Rr,merge:Or,cherryPick:_r,checkout:ar,prettyPrint:Gr,clear:Hr,getBranchesAsObjArray:Sr,getBranches:Ar,getCommits:Dr,getCommitsArray:nr,getCurrentBranch:qr,getDirection:Pr,getHead:Wr,setAccTitle:xr,getAccTitle:yr,getAccDescription:ur,setAccDescription:gr,setDiagramTitle:fr,getDiagramTitle:$r},Nr=h((r,e)=>{lr(r,e),r.dir&&e.setDirection(r.dir);for(const t of r.statements)Fr(t,e)},"populate"),Fr=h((r,e)=>{const s={Commit:h(o=>e.commit(zr(o)),"Commit"),Branch:h(o=>e.branch(Yr(o)),"Branch"),Merge:h(o=>e.merge(jr(o)),"Merge"),Checkout:h(o=>e.checkout(Ur(o)),"Checkout"),CherryPicking:h(o=>e.cherryPick(Kr(o)),"CherryPicking")}[r.$type];s?s(r):w.error(`Unknown statement type: ${r.$type}`)},"parseStatement"),zr=h(r=>({id:r.id,msg:r.message??"",type:r.type!==void 0?m[r.type]:m.NORMAL,tags:r.tags??void 0}),"parseCommit"),Yr=h(r=>({name:r.name,order:r.order??0}),"parseBranch"),jr=h(r=>({branch:r.branch,id:r.id??"",type:r.type!==void 0?m[r.type]:void 0,tags:r.tags??void 0}),"parseMerge"),Ur=h(r=>r.branch,"parseCheckout"),Kr=h(r=>({id:r.id,targetId:"",tags:r.tags?.length===0?void 0:r.tags,parent:r.parent}),"parseCherryPicking"),Vr={parse:h(async r=>{const e=await Cr("gitGraph",r);w.debug(e),Nr(e,sr)},"parse")},O=10,_=40,L=4,I=2,G=8,j=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),X=12,Z=new Set(["redux-color","redux-dark-color"]),Xr=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),H=h((r,e,t=!1)=>t&&r>0?(r-1)%(e-1)+1:r%e,"calcColorIndex"),C=new Map,E=new Map,F=30,q=new Map,z=[],R=0,y="LR",Jr=h(()=>{C.clear(),E.clear(),q.clear(),R=0,z=[],y="LR"},"clear"),or=h(r=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof r=="string"?r.split(/\\n|\n|<br\s*\/?>/gi):r).forEach(s=>{const o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),o.setAttribute("class","row"),o.textContent=s.trim(),e.appendChild(o)}),e},"drawText"),cr=h(r=>{let e,t,s;return y==="BT"?(t=h((o,i)=>o<=i,"comparisonFunc"),s=1/0):(t=h((o,i)=>o>=i,"comparisonFunc"),s=0),r.forEach(o=>{const i=y==="TB"||y=="BT"?E.get(o)?.y:E.get(o)?.x;i!==void 0&&t(i,s)&&(e=o,s=i)}),e},"findClosestParent"),Qr=h(r=>{let e="",t=1/0;return r.forEach(s=>{const o=E.get(s).y;o<=t&&(e=s,t=o)}),e||void 0},"findClosestParentBT"),Zr=h((r,e,t)=>{let s=t,o=t;const i=[];r.forEach(n=>{const a=e.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(s=ee(a),o=Math.max(s,o)):i.push(a),te(a,s)}),s=o,i.forEach(n=>{ae(n,s,t)}),r.forEach(n=>{const a=e.get(n);if(a?.parents.length){const l=Qr(a.parents);s=E.get(l).y-_,s<=o&&(o=s);const f=C.get(a.branch).pos,g=s-O;E.set(a.id,{x:f,y:g})}})},"setParallelBTPos"),re=h(r=>{const e=cr(r.parents.filter(s=>s!==null));if(!e)throw new Error(`Closest parent not found for commit ${r.id}`);const t=E.get(e)?.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${r.id}`);return t},"findClosestParentPos"),ee=h(r=>re(r)+_,"calculateCommitPosition"),te=h((r,e)=>{const t=C.get(r.branch);if(!t)throw new Error(`Branch not found for commit ${r.id}`);const s=t.pos,o=e+O;return E.set(r.id,{x:s,y:o}),{x:s,y:o}},"setCommitPosition"),ae=h((r,e,t)=>{const s=C.get(r.branch);if(!s)throw new Error(`Branch not found for commit ${r.id}`);const o=e+t,i=s.pos;E.set(r.id,{x:i,y:o})},"setRootPosition"),ne=h((r,e,t,s,o,i)=>{const{theme:n}=W(),a=j.has(n??""),l=Z.has(n??""),f=Xr.has(n??"");if(i===m.HIGHLIGHT)r.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${e.id} commit-highlight${H(o,G,l)} ${s}-outer`),r.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${e.id} commit${H(o,G,l)} ${s}-inner`);else if(i===m.CHERRY_PICK)r.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`),r.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",f?"#000000":"#fff").attr("class",`commit ${e.id} ${s}`);else{const g=r.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${e.id} commit${H(o,G,l)}`),i===m.MERGE){const $=r.append("circle");$.attr("cx",t.x),$.attr("cy",t.y),$.attr("r",a?5:6),$.attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}if(i===m.REVERSE){const $=r.append("path"),c=a?4:5;$.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${s} ${e.id} commit${H(o,G,l)}`)}}},"drawCommitBullet"),se=h((r,e,t,s,o)=>{if(e.type!==m.CHERRY_PICK&&(e.customId&&e.type===m.MERGE||e.type!==m.MERGE)&&o.showCommitLabel){const i=r.append("g"),n=i.insert("rect").attr("class","commit-label-bkg"),a=i.append("text").attr("x",s).attr("y",t.y+25).attr("class","commit-label").text(e.id),l=a.node()?.getBBox();if(l&&(n.attr("x",t.posWithOffset-l.width/2-I).attr("y",t.y+13.5).attr("width",l.width+2*I).attr("height",l.height+2*I),y==="TB"||y==="BT"?(n.attr("x",t.x-(l.width+4*L+5)).attr("y",t.y-12),a.attr("x",t.x-(l.width+4*L)).attr("y",t.y+l.height-12)):a.attr("x",t.posWithOffset-l.width/2),o.rotateCommitLabel))if(y==="TB"||y==="BT")a.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),n.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const f=-7.5-(l.width+10)/25*9.5,g=10+l.width/25*8.5;i.attr("transform","translate("+f+", "+g+") rotate(-45, "+s+", "+t.y+")")}}},"drawCommitLabel"),oe=h((r,e,t,s)=>{if(e.tags.length>0){let o=0,i=0,n=0;const a=[];for(const l of e.tags.reverse()){const f=r.insert("polygon"),g=r.append("circle"),$=r.append("text").attr("y",t.y-16-o).attr("class","tag-label").text(l),c=$.node()?.getBBox();if(!c)throw new Error("Tag bbox not found");i=Math.max(i,c.width),n=Math.max(n,c.height),$.attr("x",t.posWithOffset-c.width/2),a.push({tag:$,hole:g,rect:f,yOffset:o}),o+=20}for(const{tag:l,hole:f,rect:g,yOffset:$}of a){const c=n/2,x=t.y-19.2-$;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${s-i/2-L/2},${x+I}
|
|
3
3
|
${s-i/2-L/2},${x-I}
|
|
4
4
|
${t.posWithOffset-i/2-L},${x-c-I}
|