@cline/cli-darwin-x64 3.0.40 → 3.0.41
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/bin/cline +0 -0
- package/cline-hub/webview/assets/Chat-DFkihmj3.js +201 -0
- package/cline-hub/webview/assets/{abnfDiagram-VRR7QNED-Bnj4QJTn.js → abnfDiagram-VRR7QNED-Bsa0GvXq.js} +1 -1
- package/cline-hub/webview/assets/{architectureDiagram-ZJ3FMSHR-C7E4F6FP.js → architectureDiagram-ZJ3FMSHR-CirFjqV8.js} +1 -1
- package/cline-hub/webview/assets/{blockDiagram-677ZJIJ3-2BmIt81d.js → blockDiagram-677ZJIJ3-Bgx07RSG.js} +2 -2
- package/cline-hub/webview/assets/{c4Diagram-LMCZKHZV-BLqZyTQG.js → c4Diagram-LMCZKHZV-DusdoWbF.js} +2 -2
- package/cline-hub/webview/assets/channel-BG5JifJZ.js +1 -0
- package/cline-hub/webview/assets/{chunk-32BRIVSS-DvgtUMjH.js → chunk-32BRIVSS-DcTOo6mM.js} +1 -1
- package/cline-hub/webview/assets/{chunk-52WLFC77-Bc3oUjd3.js → chunk-52WLFC77-DecE__Wj.js} +1 -1
- package/cline-hub/webview/assets/{chunk-BO2N2NFS-DGgewybA.js → chunk-BO2N2NFS-DcQiUdyg.js} +37 -37
- package/cline-hub/webview/assets/{chunk-C7G6YPKG-B8eWs7WC.js → chunk-C7G6YPKG-1gmEsK5n.js} +1 -1
- package/cline-hub/webview/assets/{chunk-EX3LRPZG-D1GtIwqs.js → chunk-EX3LRPZG-0qwrBjji.js} +2 -2
- package/cline-hub/webview/assets/{chunk-FWX5IMBZ-pb5aM7v8.js → chunk-FWX5IMBZ-BDGaoqE2.js} +2 -2
- package/cline-hub/webview/assets/{chunk-HOUHSVGY-DZv73_1N.js → chunk-HOUHSVGY-iyGLrN4q.js} +1 -1
- package/cline-hub/webview/assets/{chunk-ICXQ74PX-BLkwAJRS.js → chunk-ICXQ74PX-DSqxbabL.js} +1 -1
- package/cline-hub/webview/assets/{chunk-MOJQB5TN-BDIrf06r.js → chunk-MOJQB5TN-CaujZjtS.js} +1 -1
- package/cline-hub/webview/assets/{chunk-OGEWGWER-DC6ZHIaO.js → chunk-OGEWGWER-Bh9UEh0b.js} +1 -1
- package/cline-hub/webview/assets/{chunk-PUDLZKDR-B3QvWDCN.js → chunk-PUDLZKDR-z9IQ2sZF.js} +3 -3
- package/cline-hub/webview/assets/{chunk-Q4XR5HBZ-BrcuBWmp.js → chunk-Q4XR5HBZ-CTHlrKV0.js} +1 -1
- package/cline-hub/webview/assets/{chunk-RYQCIY6F-BdKtCk_D.js → chunk-RYQCIY6F-L4N6kLKj.js} +1 -1
- package/cline-hub/webview/assets/{chunk-V7JOEXUC-ORex7Wci.js → chunk-V7JOEXUC-CZW_7A-O.js} +2 -2
- package/cline-hub/webview/assets/{chunk-VAUOI2AC-9UwoaXaF.js → chunk-VAUOI2AC-DO-y1Sts.js} +1 -1
- package/cline-hub/webview/assets/{chunk-VR4S4FIN-CxpxBT1R.js → chunk-VR4S4FIN-BhW0eoq_.js} +1 -1
- package/cline-hub/webview/assets/{chunk-WYO6CB5R-s6qbtyS5.js → chunk-WYO6CB5R-CpPlQqhq.js} +3 -3
- package/cline-hub/webview/assets/{chunk-ZGVPDNZ5-CJkTHIbj.js → chunk-ZGVPDNZ5-Bk8bKdWq.js} +1 -1
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-BDw8QIZ6.js +1 -0
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-BDw8QIZ6.js +1 -0
- package/cline-hub/webview/assets/{cose-bilkent-JH36ORCC-o75EFMYq.js → cose-bilkent-JH36ORCC-Ovgghq0g.js} +1 -1
- package/cline-hub/webview/assets/{cynefinDiagram-TSTJHNR4-Bxj5jfDv.js → cynefinDiagram-TSTJHNR4-C4NW8BBt.js} +1 -1
- package/cline-hub/webview/assets/{dagre-VKFMJZFB-8O7vc2EM.js → dagre-VKFMJZFB-BuoSYyMA.js} +1 -1
- package/cline-hub/webview/assets/{diagram-FQU43EPY-3nNW41L5.js → diagram-FQU43EPY-CdIXKJVm.js} +1 -1
- package/cline-hub/webview/assets/{diagram-G47NLZAW-PoM_buCM.js → diagram-G47NLZAW-COo1AYD_.js} +1 -1
- package/cline-hub/webview/assets/{diagram-NH7WQ7WH-ulhavK3B.js → diagram-NH7WQ7WH-B4Xz3tV7.js} +1 -1
- package/cline-hub/webview/assets/{diagram-OA4YK3LP-q-oLT4Q4.js → diagram-OA4YK3LP-Coy5WYDV.js} +1 -1
- package/cline-hub/webview/assets/{diagram-WEI45ONY-DxbP_qr6.js → diagram-WEI45ONY-yHmA8B1y.js} +1 -1
- package/cline-hub/webview/assets/{ebnfDiagram-CCIWWBDH-DOMIwyXA.js → ebnfDiagram-CCIWWBDH-WfzkjXXZ.js} +1 -1
- package/cline-hub/webview/assets/{erDiagram-Q63AITRT-4IazwZPI.js → erDiagram-Q63AITRT-eWqiAyfl.js} +2 -2
- package/cline-hub/webview/assets/{extensions-view-CF_Ep99S.js → extensions-view-C9x4fWco.js} +1 -1
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-DUGss4bz.js +1 -0
- package/cline-hub/webview/assets/{ganttDiagram-NO4QXBWP-CUoaBp7f.js → ganttDiagram-NO4QXBWP-CmuBLU-c.js} +2 -2
- package/cline-hub/webview/assets/{gitGraphDiagram-IHSO6WYX-o8p04hK8.js → gitGraphDiagram-IHSO6WYX-C-CXCXs3.js} +1 -1
- package/cline-hub/webview/assets/{highlighted-body-OFNGDK62-C7gtB-Ji.js → highlighted-body-OFNGDK62-BUOpVHKS.js} +1 -1
- package/cline-hub/webview/assets/{index-CO0VcJuC.js → index-Be3XXOcN.js} +2 -2
- package/cline-hub/webview/assets/{infoDiagram-FWYZ7A6U-CkjroFJc.js → infoDiagram-FWYZ7A6U-D4PnOJSW.js} +1 -1
- package/cline-hub/webview/assets/{ishikawaDiagram-FXEZZL3T-OLGuTzHp.js → ishikawaDiagram-FXEZZL3T-DqPkC_EL.js} +2 -2
- package/cline-hub/webview/assets/{journeyDiagram-5HDEW3XC-CKpZM-zW.js → journeyDiagram-5HDEW3XC-vsHpPeDj.js} +2 -2
- package/cline-hub/webview/assets/{kanban-definition-HUTT4EX6-DR-Yk3T8.js → kanban-definition-HUTT4EX6-DLtiwVMB.js} +2 -2
- package/cline-hub/webview/assets/label-CCEM15lD.js +1 -0
- package/cline-hub/webview/assets/{line-iHvrbOzL.js → line-DoVmuMN-.js} +1 -1
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-DH_-CBJ1.js +1 -0
- package/cline-hub/webview/assets/{mermaid-layout-mnuPOLAR.js → mermaid-layout-BClsMEZU.js} +1 -1
- package/cline-hub/webview/assets/mermaid-layout-CQFVGiJu.js +321 -0
- package/cline-hub/webview/assets/{mermaid-layout-BHCYVOmF.js → mermaid-layout-D67Npcks.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-layout-Dqd4g2mK.js → mermaid-layout-Gej8MFKI.js} +1 -1
- package/cline-hub/webview/assets/mermaid-layout-mOwqmNjF.js +1 -0
- package/cline-hub/webview/assets/{mermaid-markup-DxHYj2el.js → mermaid-markup-Cz_j3z-l.js} +1 -1
- package/cline-hub/webview/assets/mermaid-parser-0bma_2tB.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-Cvf3sTYp.js → mermaid-parser-B1PyAFXY.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-CY_uQclF.js → mermaid-parser-B5HHdaKy.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-CTYjzP1x.js → mermaid-parser-BDUXySIN.js} +1 -1
- package/cline-hub/webview/assets/mermaid-parser-BaBV8uvS.js +1 -0
- package/cline-hub/webview/assets/mermaid-parser-BzOFf4CL.js +1 -0
- package/cline-hub/webview/assets/{mermaid-parser-B9zpCB84.js → mermaid-parser-CsKqUYKE.js} +1 -1
- package/cline-hub/webview/assets/{mermaid-parser-B5nDuK1i.js → mermaid-parser-D-F2CbSp.js} +2 -2
- package/cline-hub/webview/assets/{mermaid-parser-BfrZ3jm6.js → mermaid-parser-Dj-OpFgW.js} +4 -4
- package/cline-hub/webview/assets/{mermaid.core-B1yAI6DJ.js → mermaid.core-vIcIBdkR.js} +3 -3
- package/cline-hub/webview/assets/{mindmap-definition-LN4V7U3C-BUPLTHRx.js → mindmap-definition-LN4V7U3C-Ds1Mzevt.js} +2 -2
- package/cline-hub/webview/assets/{pegDiagram-2B236MQR-CqCUMPkJ.js → pegDiagram-2B236MQR-Dgcsy-A5.js} +1 -1
- package/cline-hub/webview/assets/{pieDiagram-ENE6RG2P-C1AZq6_4.js → pieDiagram-ENE6RG2P-Bg2YSuda.js} +1 -1
- package/cline-hub/webview/assets/{quadrantDiagram-ABIIQ3AL-CQ6-Nh1S.js → quadrantDiagram-ABIIQ3AL-DjsK2RwR.js} +2 -2
- package/cline-hub/webview/assets/{railroadDiagram-RFXS5EU6-CihPS5zZ.js → railroadDiagram-RFXS5EU6-C06hcnii.js} +1 -1
- package/cline-hub/webview/assets/{requirementDiagram-TGXJPOKE-DqSnTPUm.js → requirementDiagram-TGXJPOKE-C5eUBqqZ.js} +2 -2
- package/cline-hub/webview/assets/{sankeyDiagram-HTMAVEWB-BPrP9qMr.js → sankeyDiagram-HTMAVEWB-7aBGm83M.js} +2 -2
- package/cline-hub/webview/assets/{sequenceDiagram-DBY2YBRQ-vNDq7H85.js → sequenceDiagram-DBY2YBRQ-BD2MHS2t.js} +3 -3
- package/cline-hub/webview/assets/{settings-view-Du_-RFo0.js → settings-view-Bszv9NJJ.js} +1 -1
- package/cline-hub/webview/assets/{stateDiagram-2N3HPSRC-BhZeX4AV.js → stateDiagram-2N3HPSRC-BA0U1_Ks.js} +1 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-J0XEuQJt.js +1 -0
- package/cline-hub/webview/assets/swimlanes-5IMT3BWC-C19hb1RN.js +2 -0
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-BmmvxkNK.js +8 -0
- package/cline-hub/webview/assets/{timeline-definition-FHXFAJF6-CCjLKk-6.js → timeline-definition-FHXFAJF6-CWZftM9d.js} +2 -2
- package/cline-hub/webview/assets/{vennDiagram-L72KCM5P-CTW_BgiG.js → vennDiagram-L72KCM5P-Dl6htnd2.js} +2 -2
- package/cline-hub/webview/assets/{wardleyDiagram-EHGQE667-BeIO74o9.js → wardleyDiagram-EHGQE667-D15CZnh6.js} +1 -1
- package/cline-hub/webview/assets/{xychartDiagram-FW5EYKEG-QjSpx4am.js → xychartDiagram-FW5EYKEG-De0yi34G.js} +2 -2
- package/cline-hub/webview/index.html +1 -1
- package/package.json +1 -1
- package/cline-hub/webview/assets/Chat-CMV63kzb.js +0 -201
- package/cline-hub/webview/assets/channel-lcB16PBt.js +0 -1
- package/cline-hub/webview/assets/classDiagram-OUVF2IWQ-cNXfBUZQ.js +0 -1
- package/cline-hub/webview/assets/classDiagram-v2-EOCWNBFH-cNXfBUZQ.js +0 -1
- package/cline-hub/webview/assets/flowDiagram-23GEKE2U-hdDBVE6S.js +0 -1
- package/cline-hub/webview/assets/label-BslraTWB.js +0 -1
- package/cline-hub/webview/assets/mermaid-GHXKKRXX-CMmEDVDX.js +0 -1
- package/cline-hub/webview/assets/mermaid-layout-B3I8pqwA.js +0 -321
- package/cline-hub/webview/assets/mermaid-layout-OD00zOyc.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-BBCGbbKs.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-CZjLeXFT.js +0 -1
- package/cline-hub/webview/assets/mermaid-parser-CyY34pyG.js +0 -1
- package/cline-hub/webview/assets/stateDiagram-v2-6OUMAXLB-DSblVTf_.js +0 -1
- package/cline-hub/webview/assets/swimlanes-5IMT3BWC-CBgarXiN.js +0 -2
- package/cline-hub/webview/assets/swimlanesDiagram-G3AALYLV-BLE3IPK-.js +0 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cz8bXOH0.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,s as u,v as d,w as f,x as p,y as m}from"./chunk-WYO6CB5R-s6qbtyS5.js";import{g as h,i as g,m as _}from"./chunk-ICXQ74PX-BLkwAJRS.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser-B5nDuK1i.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=l.gitGraph,S=e(()=>g({...ee,...c().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return _({length:7})}e(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e(T,`uniqBy`);var te=e(function(e){C.records.direction=e},`setDirection`),ne=e(function(e){t.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){t.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=e(function(){return C.records.options},`getOptions`),ie=e(function(e){let n=e.msg,r=e.id,i=e.type,a=e.tags;t.info(`commit`,n,r,i,a),t.debug(`Entering commit:`,n,r,i,a);let o=S();r=u.sanitizeText(r,o),n=u.sanitizeText(n,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:n,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,t.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&t.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),t.debug(`in pushCommit `+s.id)},`commit`),ae=e(function(e){let n=e.name,r=e.order;if(n=u.sanitizeText(n,S()),C.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);C.records.branches.set(n,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(n,{name:n,order:r}),E(n),t.debug(`in createBranch`)},`branch`),oe=e(e=>{let n=e.branch,r=e.id,i=e.type,a=e.tags,o=S();n=u.sanitizeText(n,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(n),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(C.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!C.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${n} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),t.debug(C.records.branches),t.debug(`in mergeBranch`)},`merge`),se=e(function(e){let n=e.id,r=e.targetId,i=e.tags,a=e.parent;t.debug(`Entering cherryPick:`,n,r,i);let o=S();if(n=u.sanitizeText(n,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!n||!C.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),t.debug(C.records.branches),t.debug(`in cherryPick`)}},`cherryPick`),E=e(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e(D,`upsert`);function O(e){let n=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in C.records.branches)C.records.branches.get(e)===n.id&&i.push(e);if(t.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let t=C.records.commits.get(n.parents[0]);D(e,n,t),n.parents[1]&&e.push(C.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let t=C.records.commits.get(n.parents[0]);D(e,n,t)}e=T(e,e=>e.id),O(e)}e(O,`prettyPrintCommitHistory`);var ce=e(function(){t.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=e(function(){C.reset(),s()},`clear`),ue=e(function(){return[...C.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`),de=e(function(){return C.records.branches},`getBranches`),fe=e(function(){return C.records.commits},`getCommits`),k=e(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){t.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:e(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:e(function(){return C.records.direction},`getDirection`),getHead:e(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:f},pe=e((e,t)=>{v(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=e((n,r)=>{let i={Commit:e(e=>r.commit(he(e)),`Commit`),Branch:e(e=>r.branch(ge(e)),`Branch`),Merge:e(e=>r.merge(_e(e)),`Merge`),Checkout:e(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:e(e=>r.cherryPick(ye(e)),`CherryPicking`)}[n.$type];i?i(n):t.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),he=e(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=e(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=e(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=e(e=>e.branch,`parseCheckout`),ye=e(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:e(async e=>{let n=await y(`gitGraph`,e);t.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=e((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=e(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=e(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=e(t=>{let n,r,i;return K===`BT`?(r=e((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Se=e(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=e((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=e(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=e(e=>we(e)+M,`calculateCommitPosition`),Ee=e((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=e((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=e((e,t,n,r,i,a)=>{let{theme:o}=p(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),ke=e((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Ae=e((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
1
|
+
import{n as e}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as t,p as n}from"./src-Cz8bXOH0.js";import{H as r,K as i,U as a,Y as o,a as s,b as c,f as l,s as u,v as d,w as f,x as p,y as m}from"./chunk-WYO6CB5R-CpPlQqhq.js";import{g as h,i as g,m as _}from"./chunk-ICXQ74PX-DSqxbabL.js";import{t as v}from"./chunk-JWPE2WC7-DVXcaiue.js";import{n as y}from"./mermaid-parser-D-F2CbSp.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=l.gitGraph,S=e(()=>g({...ee,...c().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return _({length:7})}e(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}e(T,`uniqBy`);var te=e(function(e){C.records.direction=e},`setDirection`),ne=e(function(e){t.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){t.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=e(function(){return C.records.options},`getOptions`),ie=e(function(e){let n=e.msg,r=e.id,i=e.type,a=e.tags;t.info(`commit`,n,r,i,a),t.debug(`Entering commit:`,n,r,i,a);let o=S();r=u.sanitizeText(r,o),n=u.sanitizeText(n,o),a=a?.map(e=>u.sanitizeText(e,o));let s={id:r||C.records.seq+`-`+w(),message:n,seq:C.records.seq++,type:i??x.NORMAL,tags:a??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,t.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&t.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),t.debug(`in pushCommit `+s.id)},`commit`),ae=e(function(e){let n=e.name,r=e.order;if(n=u.sanitizeText(n,S()),C.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);C.records.branches.set(n,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(n,{name:n,order:r}),E(n),t.debug(`in createBranch`)},`branch`),oe=e(e=>{let n=e.branch,r=e.id,i=e.type,a=e.tags,o=S();n=u.sanitizeText(n,o),r&&=u.sanitizeText(r,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(n),l=s?C.records.commits.get(s):void 0,d=c?C.records.commits.get(c):void 0;if(l&&d&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(C.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!C.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(d===void 0||!d){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===d){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&C.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${C.records.seq}-${w()}`,message:`merged branch ${n} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,f],branch:C.records.currBranch,type:x.MERGE,customType:i,customId:!!r,tags:a??[]};C.records.head=p,C.records.commits.set(p.id,p),C.records.branches.set(C.records.currBranch,p.id),t.debug(C.records.branches),t.debug(`in mergeBranch`)},`merge`),se=e(function(e){let n=e.id,r=e.targetId,i=e.tags,a=e.parent;t.debug(`Entering cherryPick:`,n,r,i);let o=S();if(n=u.sanitizeText(n,o),r=u.sanitizeText(r,o),i=i?.map(e=>u.sanitizeText(e,o)),a=u.sanitizeText(a,o),!n||!C.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!C.records.commits.has(r)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${a}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),t.debug(C.records.branches),t.debug(`in cherryPick`)}},`cherryPick`),E=e(function(e){if(e=u.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}e(D,`upsert`);function O(e){let n=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),r=``;e.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in C.records.branches)C.records.branches.get(e)===n.id&&i.push(e);if(t.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let t=C.records.commits.get(n.parents[0]);D(e,n,t),n.parents[1]&&e.push(C.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let t=C.records.commits.get(n.parents[0]);D(e,n,t)}e=T(e,e=>e.id),O(e)}e(O,`prettyPrintCommitHistory`);var ce=e(function(){t.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=e(function(){C.reset(),s()},`clear`),ue=e(function(){return[...C.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`),de=e(function(){return C.records.branches},`getBranches`),fe=e(function(){return C.records.commits},`getCommits`),k=e(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){t.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:e(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:e(function(){return C.records.direction},`getDirection`),getHead:e(function(){return C.records.head},`getHead`),setAccTitle:a,getAccTitle:m,getAccDescription:d,setAccDescription:r,setDiagramTitle:i,getDiagramTitle:f},pe=e((e,t)=>{v(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=e((n,r)=>{let i={Commit:e(e=>r.commit(he(e)),`Commit`),Branch:e(e=>r.branch(ge(e)),`Branch`),Merge:e(e=>r.merge(_e(e)),`Merge`),Checkout:e(e=>r.checkout(ve(e)),`Checkout`),CherryPicking:e(e=>r.cherryPick(ye(e)),`CherryPicking`)}[n.$type];i?i(n):t.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),he=e(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=e(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=e(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=e(e=>e.branch,`parseCheckout`),ye=e(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:e(async e=>{let n=await y(`gitGraph`,e);t.debug(n),pe(n,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=e((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,q=e(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),J=e(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),Y=e(t=>{let n,r,i;return K===`BT`?(r=e((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=e((e,t)=>e>=t,`comparisonFunc`),i=0),t.forEach(e=>{let t=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),Se=e(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),Ce=e((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Te(n),i=Math.max(r,i)):a.push(n),Ee(n,r)}),r=i,a.forEach(e=>{De(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Se(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),we=e(e=>{let t=Y(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Te=e(e=>we(e)+M,`calculateCommitPosition`),Ee=e((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),De=e((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),Oe=e((e,t,n,r,i,a)=>{let{theme:o}=p(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),ke=e((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Ae=e((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
2
2
|
${r-a/2-N/2},${l+P}
|
|
3
3
|
${r-a/2-N/2},${l-P}
|
|
4
4
|
${n.posWithOffset-a/2-N},${l-s-P}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n}from"./bundle-mjs-D3mlU5Wg.js";import{i as r,n as i,t as a}from"./chunk-BO2N2NFS-
|
|
1
|
+
import{a as e}from"./rolldown-runtime-CNC7AqOf.js";import{i as t,r as n}from"./bundle-mjs-D3mlU5Wg.js";import{i as r,n as i,t as a}from"./chunk-BO2N2NFS-DcQiUdyg.js";var o=e(t(),1),s=n(),c=({code:e,language:t,raw:n,className:c,startLine:l,lineNumbers:u,...d})=>{let{shikiTheme:f}=(0,o.useContext)(r),p=i(),[m,h]=(0,o.useState)(n);return(0,o.useEffect)(()=>{if(!p){h(n);return}let r=p.highlight({code:e,language:t,themes:f},e=>{h(e)});r&&h(r)},[e,t,f,p,n]),(0,s.jsx)(a,{className:c,language:t,lineNumbers:u,result:m,startLine:l,...d})};export{c as HighlightedCodeBlockBody};
|