1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3150],{57038:function(t,c,e){function r(t,c){var e,r,o;t.accDescr&&(null===(e=c.setAccDescription)||void 0===e||e.call(c,t.accDescr)),t.accTitle&&(null===(r=c.setAccTitle)||void 0===r||r.call(c,t.accTitle)),t.title&&(null===(o=c.setDiagramTitle)||void 0===o||o.call(c,t.title))}e.d(c,{A:function(){return r}}),(0,e(99573).eW)(r,"populateCommonDb")},69537:function(t,c,e){e.d(c,{A:function(){return n}});var r,o=e(99573),n=(r=class{reset(){this.records=this.init()}constructor(t){this.init=t,this.records=this.init()}},(0,o.eW)(r,"ImperativeState"),r)},63150:function(t,c,e){e.d(c,{diagram:function(){return tT}});var r=e(57038),o=e(69537),n=e(42877),a=e(66764),i=e(99573),s=e(18442),l=e(53082),d={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},h=a.vZ.gitGraph,m=(0,i.eW)(()=>(0,n.Rb)({...h,...(0,a.iE)().gitGraph}),"getConfig"),g=new o.A(()=>{let t=m(),c=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:c,commits:new Map,head:null,branchConfig:new Map([[c,{name:c,order:e}]]),branches:new Map([[c,null]]),currBranch:c,direction:"LR",seq:0,options:{}}});function u(){return(0,n.MX)({length:7})}function f(t,c){let e=Object.create(null);return t.reduce((t,r)=>{let o=c(r);return e[o]||(e[o]=!0,t.push(r)),t},[])}(0,i.eW)(u,"getID"),(0,i.eW)(f,"uniqBy");var p=(0,i.eW)(function(t){g.records.direction=t},"setDirection"),y=(0,i.eW)(function(t){i.cM.debug("options str",t),t=(t=null==t?void 0:t.trim())||"{}";try{g.records.options=JSON.parse(t)}catch(t){i.cM.error("error while parsing gitGraph options",t.message)}},"setOptions"),x=(0,i.eW)(function(){return g.records.options},"getOptions"),b=(0,i.eW)(function(t){let c=t.msg,e=t.id,r=t.type,o=t.tags;i.cM.info("commit",c,e,r,o),i.cM.debug("Entering commit:",c,e,r,o);let n=m();e=a.SY.sanitizeText(e,n),c=a.SY.sanitizeText(c,n),o=null==o?void 0:o.map(t=>a.SY.sanitizeText(t,n));let s={id:e||g.records.seq+"-"+u(),message:c,seq:g.records.seq++,type:null!=r?r:d.NORMAL,tags:null!=o?o:[],parents:null==g.records.head?[]:[g.records.head.id],branch:g.records.currBranch};g.records.head=s,i.cM.info("main branch",n.mainBranchName),g.records.commits.has(s.id)&&i.cM.warn("Commit ID ".concat(s.id," already exists")),g.records.commits.set(s.id,s),g.records.branches.set(g.records.currBranch,s.id),i.cM.debug("in pushCommit "+s.id)},"commit"),k=(0,i.eW)(function(t){let c=t.name,e=t.order;if(c=a.SY.sanitizeText(c,m()),g.records.branches.has(c))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 '.concat(c,'")'));g.records.branches.set(c,null!=g.records.head?g.records.head.id:null),g.records.branchConfig.set(c,{name:c,order:e}),B(c),i.cM.debug("in createBranch")},"branch"),v=(0,i.eW)(t=>{let c=t.branch,e=t.id,r=t.type,o=t.tags,n=m();c=a.SY.sanitizeText(c,n),e&&(e=a.SY.sanitizeText(e,n));let s=g.records.branches.get(g.records.currBranch),l=g.records.branches.get(c),h=s?g.records.commits.get(s):void 0,f=l?g.records.commits.get(l):void 0;if(h&&f&&h.branch===c)throw Error("Cannot merge branch '".concat(c,"' into itself."));if(g.records.currBranch===c){let t=Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:"merge ".concat(c),token:"merge ".concat(c),expected:["branch abc"]},t}if(void 0===h||!h){let t=Error('Incorrect usage of "merge". Current branch ('.concat(g.records.currBranch,")has no commits"));throw t.hash={text:"merge ".concat(c),token:"merge ".concat(c),expected:["commit"]},t}if(!g.records.branches.has(c)){let t=Error('Incorrect usage of "merge". Branch to be merged ('+c+") does not exist");throw t.hash={text:"merge ".concat(c),token:"merge ".concat(c),expected:["branch ".concat(c)]},t}if(void 0===f||!f){let t=Error('Incorrect usage of "merge". Branch to be merged ('+c+") has no commits");throw t.hash={text:"merge ".concat(c),token:"merge ".concat(c),expected:['"commit"']},t}if(h===f){let t=Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:"merge ".concat(c),token:"merge ".concat(c),expected:["branch abc"]},t}if(e&&g.records.commits.has(e)){let t=Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:"merge ".concat(c," ").concat(e," ").concat(r," ").concat(null==o?void 0:o.join(" ")),token:"merge ".concat(c," ").concat(e," ").concat(r," ").concat(null==o?void 0:o.join(" ")),expected:["merge ".concat(c," ").concat(e,"_UNIQUE ").concat(r," ").concat(null==o?void 0:o.join(" "))]},t}let p={id:e||"".concat(g.records.seq,"-").concat(u()),message:"merged branch ".concat(c," into ").concat(g.records.currBranch),seq:g.re
1cords.seq++,parents:null==g.records.head?[]:[g.records.head.id,l||""],branch:g.records.currBranch,type:d.MERGE,customType:r,customId:!!e,tags:null!=o?o:[]};g.records.head=p,g.records.commits.set(p.id,p),g.records.branches.set(g.records.currBranch,p.id),i.cM.debug(g.records.branches),i.cM.debug("in mergeBranch")},"merge"),w=(0,i.eW)(function(t){let c=t.id,e=t.targetId,r=t.tags,o=t.parent;i.cM.debug("Entering cherryPick:",c,e,r);let n=m();if(c=a.SY.sanitizeText(c,n),e=a.SY.sanitizeText(e,n),r=null==r?void 0:r.map(t=>a.SY.sanitizeText(t,n)),o=a.SY.sanitizeText(o,n),!c||!g.records.commits.has(c)){let t=Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:"cherryPick ".concat(c," ").concat(e),token:"cherryPick ".concat(c," ").concat(e),expected:["cherry-pick abc"]},t}let s=g.records.commits.get(c);if(void 0===s||!s)throw Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(o&&!(Array.isArray(s.parents)&&s.parents.includes(o)))throw Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");let l=s.branch;if(s.type===d.MERGE&&!o)throw Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!g.records.commits.has(e)){if(l===g.records.currBranch){let t=Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:"cherryPick ".concat(c," ").concat(e),token:"cherryPick ".concat(c," ").concat(e),expected:["cherry-pick abc"]},t}let t=g.records.branches.get(g.records.currBranch);if(void 0===t||!t){let t=Error('Incorrect usage of "cherry-pick". Current branch ('.concat(g.records.currBranch,")has no commits"));throw t.hash={text:"cherryPick ".concat(c," ").concat(e),token:"cherryPick ".concat(c," ").concat(e),expected:["cherry-pick abc"]},t}let n=g.records.commits.get(t);if(void 0===n||!n){let t=Error('Incorrect usage of "cherry-pick". Current branch ('.concat(g.records.currBranch,")has no commits"));throw t.hash={text:"cherryPick ".concat(c," ").concat(e),token:"cherryPick ".concat(c," ").concat(e),expected:["cherry-pick abc"]},t}let a={id:g.records.seq+"-"+u(),message:"cherry-picked ".concat(null==s?void 0:s.message," into ").concat(g.records.currBranch),seq:g.records.seq++,parents:null==g.records.head?[]:[g.records.head.id,s.id],branch:g.records.currBranch,type:d.CHERRY_PICK,tags:r?r.filter(Boolean):["cherry-pick:".concat(s.id).concat(s.type===d.MERGE?"|parent:".concat(o):"")]};g.records.head=a,g.records.commits.set(a.id,a),g.records.branches.set(g.records.currBranch,a.id),i.cM.debug(g.records.branches),i.cM.debug("in cherryPick")}},"cherryPick"),B=(0,i.eW)(function(t){if(t=a.SY.sanitizeText(t,m()),g.records.branches.has(t)){g.records.currBranch=t;let e=g.records.branches.get(g.records.currBranch);if(void 0!==e&&e){var c;g.records.head=null!==(c=g.records.commits.get(e))&&void 0!==c?c:null}else g.records.head=null}else{let c=Error('Trying to checkout branch which is not yet created. (Help try using "branch '.concat(t,'")'));throw c.hash={text:"checkout ".concat(t),token:"checkout ".concat(t),expected:["branch ".concat(t)]},c}},"checkout");function E(t,c,e){let r=t.indexOf(c);-1===r?t.push(e):t.splice(r,1,e)}function M(t){let c=t.reduce((t,c)=>t.seq>c.seq?t:c,t[0]),e="";t.forEach(function(t){t===c?e+=" *":e+=" |"});let r=[e,c.id,c.seq];for(let t in g.records.branches)g.records.branches.get(t)===c.id&&r.push(t);if(i.cM.debug(r.join(" ")),c.parents&&2==c.parents.length&&c.parents[0]&&c.parents[1]){let e=g.records.commits.get(c.parents[0]);E(t,c,e),c.parents[1]&&t.push(g.records.commits.get(c.parents[1]))}else if(0==c.parents.length)return;else if(c.parents[0]){let e=g.records.commits.get(c.parents[0]);E(t,c,e)}M(t=f(t,t=>t.id))}(0,i.eW)(E,"upsert"),(0,i.eW)(M,"prettyPrintCommitHistory");var W=(0,i.eW)(function(){i.cM.debug(g.records.commits),M([R()[0]])},"prettyPrint"),C=(0,i.eW)(function(){g.reset(),(0,a.ZH)()},"clear"),T=(0,i.eW)(function(){return[...g.records.branchConfig.values()].map((t,c)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat("0.".concat(c))}).sort((t,c)=>{var e,r;return(null!==(e=t.order)&&void 0!==e?e:0)-(null!==(r=c.order)&&void 0!==r?r:0)}).map(t=>{let{name:c}=t;return{name:c}})},"getBranchesAsObjArray"),L=(0,i.eW)(function(){return g.records.branches},"getBranches"),I=(0,i.eW)(function(){return g.records.commits},"getCommits"),R=(0,i.eW)(function(){let t=[...g.records.commits.values()];return t.forEach(function(t){i.cM.debug(t.id)}),t.sort((t,c)=>t.seq-c.seq),t},"getCommitsArray"),P={commitType:d,getConfig:m,setDirection:p,setOptions:y,getOptions:x,commit:b,branch:k,merge:v,cherryPick:w,checkout:B,prettyPrint:W,clear:C,getBranchesAsObjArray:T,getBranches:L,getCommits:I,getCommitsArray:R,getCurrentBranch:(0,i.eW)(function(){return g.records.currBranch},"getCurrentBranch"),getDirection:(0,i.eW)(function(){return g.records.direction},"getDirection"),getHead:(0,i.eW)(function(){return g.records.head},"getHead"),setAccTitle:a.GN,getAccTitle:a.eu,getAccDescription:a.Mx,setAccDescription:a.U$,setDiagramTitle:a.g2,getDiagramTitle:a.Kr},A=(0,i.eW)((t,c)=>{for(let e of((0,r.A)(t,c),t.dir&&c.setDirection(t.dir),t.statements))S(e,c)},"populate"),S=(0,i.eW)((t,c)=>{let e={Commit:(0,i.eW)(t=>c.commit(O(t)),"Commit"),Branch:(0,i.eW)(t=>c.branch(G(t)),"Branch"),Merge:(0,i.eW)(t=>
1c.merge(H(t)),"Merge"),Checkout:(0,i.eW)(t=>c.checkout(q(t)),"Checkout"),CherryPicking:(0,i.eW)(t=>c.cherryPick(_(t)),"CherryPicking")}[t.$type];e?e(t):i.cM.error("Unknown statement type: ".concat(t.$type))},"parseStatement"),O=(0,i.eW)(t=>{var c,e;return{id:t.id,msg:null!==(c=t.message)&&void 0!==c?c:"",type:void 0!==t.type?d[t.type]:d.NORMAL,tags:null!==(e=t.tags)&&void 0!==e?e:void 0}},"parseCommit"),G=(0,i.eW)(t=>{var c;return{name:t.name,order:null!==(c=t.order)&&void 0!==c?c:0}},"parseBranch"),H=(0,i.eW)(t=>{var c,e;return{branch:t.branch,id:null!==(c=t.id)&&void 0!==c?c:"",type:void 0!==t.type?d[t.type]:void 0,tags:null!==(e=t.tags)&&void 0!==e?e:void 0}},"parseMerge"),q=(0,i.eW)(t=>t.branch,"parseCheckout"),_=(0,i.eW)(t=>{var c;return{id:t.id,targetId:"",tags:(null===(c=t.tags)||void 0===c?void 0:c.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),D={parse:(0,i.eW)(async t=>{let c=await (0,s.Qc)("gitGraph",t);i.cM.debug(c),A(c,P)},"parse")},z=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),Y=new Set(["redux-color","redux-dark-color"]),N=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),F=(0,i.eW)(function(t,c){let e=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return e&&t>0?(t-1)%(c-1)+1:t%c},"calcColorIndex"),j=new Map,V=new Map,K=new Map,U=[],$=0,Q="LR",X=(0,i.eW)(()=>{j.clear(),V.clear(),K.clear(),$=0,U=[],Q="LR"},"clear"),Z=(0,i.eW)(t=>{let c=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{let e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),c.appendChild(e)}),c},"drawText"),J=(0,i.eW)(t=>{let c,e,r;return"BT"===Q?(e=(0,i.eW)((t,c)=>t<=c,"comparisonFunc"),r=1/0):(e=(0,i.eW)((t,c)=>t>=c,"comparisonFunc"),r=0),t.forEach(t=>{var o,n;let a="TB"===Q||"BT"==Q?null===(o=V.get(t))||void 0===o?void 0:o.y:null===(n=V.get(t))||void 0===n?void 0:n.x;void 0!==a&&e(a,r)&&(c=t,r=a)}),c},"findClosestParent"),tt=(0,i.eW)(t=>{let c="",e=1/0;return t.forEach(t=>{let r=V.get(t).y;r<=e&&(c=t,e=r)}),c||void 0},"findClosestParentBT"),tc=(0,i.eW)((t,c,e)=>{let r=e,o=e,n=[];t.forEach(t=>{let e=c.get(t);if(!e)throw Error("Commit not found for key ".concat(t));e.parents.length?o=Math.max(r=tr(e),o):n.push(e),to(e,r)}),r=o,n.forEach(t=>{tn(t,r,e)}),t.forEach(t=>{let e=c.get(t);if(null==e?void 0:e.parents.length){let t=tt(e.parents);(r=V.get(t).y-40)<=o&&(o=r);let c=j.get(e.branch).pos,n=r-10;V.set(e.id,{x:c,y:n})}})},"setParallelBTPos"),te=(0,i.eW)(t=>{var c;let e=J(t.parents.filter(t=>null!==t));if(!e)throw Error("Closest parent not found for commit ".concat(t.id));let r=null===(c=V.get(e))||void 0===c?void 0:c.y;if(void 0===r)throw Error("Closest parent position not found for commit ".concat(t.id));return r},"findClosestParentPos"),tr=(0,i.eW)(t=>te(t)+40,"calculateCommitPosition"),to=(0,i.eW)((t,c)=>{let e=j.get(t.branch);if(!e)throw Error("Branch not found for commit ".concat(t.id));let r=e.pos,o=c+10;return V.set(t.id,{x:r,y:o}),{x:r,y:o}},"setCommitPosition"),tn=(0,i.eW)((t,c,e)=>{let r=j.get(t.branch);if(!r)throw Error("Branch not found for commit ".concat(t.id));let o=r.pos;V.set(t.id,{x:o,y:c+e})},"setRootPosition"),ta=(0,i.eW)((t,c,e,r,o,n)=>{let{theme:i}=(0,a.nV)(),s=z.has(null!=i?i:""),l=Y.has(null!=i?i:""),h=N.has(null!=i?i:"");if(n===d.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(s?3:0)).attr("y",e.y-10+(s?3:0)).attr("width",s?14:20).attr("height",s?14:20).attr("class","commit ".concat(c.id," commit-highlight").concat(F(o,8,l)," ").concat(r,"-outer")),t.append("rect").attr("x",e.x-6+(s?2:0)).attr("y",e.y-6+(s?2:0)).attr("width",s?8:12).attr("height",s?8:12).attr("class","commit ".concat(c.id," commit").concat(F(o,8,l)," ").concat(r,"-inner"));else if(n===d.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",s?7:10).attr("class","commit ".concat(c.id," ").concat(r)),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",s?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class","commit ".concat(c.id," ").concat(r)),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",s?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class","commit ".concat(c.id," ").concat(r)),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",h?"#000000":"#fff").attr("class","commit ".concat(c.id," ").concat(r)),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",h?"#000000":"#fff").attr("class","commit ".concat(c.id," ").concat(r));else{let a=t.append("circle");if(a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",s?7:10),a.attr("class","commit ".concat(c.id," commit").concat(F(o,8,l))),n===d.MERGE){let n=t.append("circle");n.attr("cx",e.x),n.attr("cy",e.y),n.attr("r",s?5:6),n.attr("class","commit ".concat(r," ").concat(c.id," commit").concat(F(o,8,l)))}if(n===d.REVERSE){let n=t.append("path"),a=s?4:5;n.attr("d","M ".concat(e.x-a,",").concat(e.y-a,"L").concat(e.x+a,",").concat(e.y+a,"M").concat(e.x-a,",").concat(e.y+a,"L").concat(e.x+a,",").concat(e.y-a)).attr("class","commit ".concat(r," ").concat(c.id," commit").concat(F(o,8,l)))}}},"drawCommitBullet"),ti=(0,i.eW)((t,c,e,r,o)=>{if(c.type!==d.CHERRY_PICK&&(c.customId&&c.type===d.MERGE||c.type!==d.MERGE)&&o.showCommitLabel){var n;let a=t.append("g"),i=a.insert("rect").attr("class","commit-label-bkg"),s=a.append("text").attr("x",r).attr("y",e.y+25).attr("class","commit-label").text(c.id),l=null===(n=s.node())||void 0===n?void 0:n.getBBox();if(l&&(i.attr("x",e.posWithOffset-l.width/2-2).attr("y",e.y+13.5).attr("width",l.width+4).attr("height",l.height+4),"TB"===Q||"BT"===Q?(i.attr("x",e.x-(l.width+16+5)).attr("y",e.y-12),s.attr("x",e.x-(l.width+16)).attr("y",e.y+l.height-12)):s.attr("x",e.posWithOffset-l.width/2),o.rotateCommitLabel)){if("TB"===Q||"BT"===Q)s.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),i.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{let t=-7.5-(l.width+10)/25*9.5,c=10+l.width/25*8.5;a.attr("transform","translate("+t+", "+c+") rotate(-45, "+r+", "+e.y+")")}}}},"drawCommitLabel"),ts=(0,i.eW)((t,c,e,r)=>{if(c.tags.length>0){let n=0,a=0,i=0,s=[];for(let r of c.tags.reverse()){var o;let c=t.insert("polygon"),l=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(r),h=null===(o=d.node())||void 0===o?void 0:o.getBBox();if(!h)throw Error("Tag bbox not found");a=Math.max(a,h.width),i=Math.max(i,h.height),d.attr("x",e.posWithOffset-h.width/2),s.push({tag:d,hole:l,rect:c,yOffset:n}),n+=20}for(let{tag:t,hole:c,rect:o,yOffset:n}of s){let s=i/2,l=e.y-19.2-n;if(o.attr("class","tag-label-bkg").attr("points","\n ".concat(r-a/2-2,",").concat(l+2," \n ").concat(r-a/2-2,",").concat(l-2,"\n ").concat(e.posWithOffset-a/2-4,",").concat(l-s-2,"\n ").concat(e.posWithOffset+a/2+4,",").concat(l-s-2,"\n ").concat(e.posWithOffset+a/2+4,",").concat(l+s+2,"\n ").concat(e.posWithOffset-a/2-4,",").concat(l+s+2)),c.attr("cy",l).attr("cx",r-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===Q||"BT"===Q){let i=r+n;o.attr("class","tag-label-bkg").attr("points","\n ".concat(e.x,",").concat(i+2,"\n ").concat(e.x,",").concat(i-2,"\n ").concat(e.x+10,",").concat(i-s-2,"\n ").concat(e.x+10+a+4,",").concat(i-s-2,"\n ").concat(e.x+10+a+4,",").concat(i+s+2,"\n ").concat(e.x+10,",").concat(i+s+2)).attr("transform","translate(12,12) rotate(45, "+e.x+","+r+")"),c.attr("cx",e.x+2).attr("cy",i).attr("transform","translate(12,12) rotate(45, "+e.x+","+r+")"),t.attr("x",e.x+5).attr("y",i+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+r+")")}}}},"drawCommitTags"),tl=(0,i.eW)(t=>{var c;switch(null!==(c=t.customType)&&void 0!==c?c:t.type){case d.NORMAL:return"commit-normal";case d.REVERSE:return"commit-reverse";case d.HIGHLIGHT:return"commit-highlight";case d.MERGE:return"commit-merge";
1case d.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),td=(0,i.eW)((t,c,e,r)=>{var o,n,a;let i={x:0,y:0};if(t.parents.length>0){let e=J(t.parents);if(e){let a=null!==(o=r.get(e))&&void 0!==o?o:i;return"TB"===c?a.y+40:"BT"===c?(null!==(n=r.get(t.id))&&void 0!==n?n:i).y-40:a.x+40}}else{if("TB"===c)return 30;if("BT"===c)return(null!==(a=r.get(t.id))&&void 0!==a?a:i).y-40}return 0},"calculatePosition"),th=(0,i.eW)((t,c,e)=>{var r,o,n;let i="BT"===Q&&e?c:c+10,s=null===(r=j.get(t.branch))||void 0===r?void 0:r.pos,l="TB"===Q||"BT"===Q?null===(o=j.get(t.branch))||void 0===o?void 0:o.pos:i;if(void 0===l||void 0===s)throw Error("Position were undefined for commit ".concat(t.id));let d=z.has(null!==(n=(0,a.nV)().theme)&&void 0!==n?n:"");return{x:l,y:"TB"===Q||"BT"===Q?i:s+(d?7:-2),posWithOffset:i}},"getCommitPosition"),tm=(0,i.eW)((t,c,e,r)=>{var o;let n=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels"),s="TB"===Q||"BT"===Q?30:0,l=[...c.keys()],d=null!==(o=r.parallelCommits)&&void 0!==o&&o,h=l.sort((0,i.eW)((t,e)=>{var r,o;let n=null===(r=c.get(t))||void 0===r?void 0:r.seq,a=null===(o=c.get(e))||void 0===o?void 0:o.seq;return void 0!==n&&void 0!==a?n-a:0},"sortKeys"));"BT"===Q&&(d&&tc(h,c,s),h=h.reverse()),h.forEach(t=>{let o=c.get(t);if(!o)throw Error("Commit not found for key ".concat(t));d&&(s=td(o,Q,s,V));let i=th(o,s,d);if(e){var l,h,m;let t=tl(o),c=null!==(h=o.customType)&&void 0!==h?h:o.type,e=null!==(m=null===(l=j.get(o.branch))||void 0===l?void 0:l.index)&&void 0!==m?m:0;ta(n,o,i,t,e,c),ti(a,o,i,s,r),ts(a,o,i,s)}"TB"===Q||"BT"===Q?V.set(o.id,{x:i.x,y:i.posWithOffset}):V.set(o.id,{x:i.posWithOffset,y:i.y}),(s="BT"===Q&&d?s+40:s+40+10)>$&&($=s)})},"drawCommits"),tg=(0,i.eW)((t,c,e,r,o)=>{let n=("TB"===Q||"BT"===Q?e.x<r.x:e.y<r.y)?c.branch:t.branch,a=(0,i.eW)(t=>t.branch===n,"isOnBranchToGetCurve"),s=(0,i.eW)(e=>e.seq>t.seq&&e.seq<c.seq,"isBetweenCommits");return[...o.values()].some(t=>s(t)&&a(t))},"shouldRerouteArrow"),tu=(0,i.eW)(function(t,c){let e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=t+Math.abs(t-c)/2;if(e>5)return r;if(U.every(t=>Math.abs(t-r)>=10))return U.push(r),r;let o=Math.abs(t-c);return tu(t,c-o/5,e+1)},"findLane"),tf=(0,i.eW)((t,c,e,r)=>{var o,n,i,s,l;let h;let{theme:m}=(0,a.nV)(),g=Y.has(null!=m?m:""),u=V.get(c.id),f=V.get(e.id);if(void 0===u||void 0===f)throw Error("Commit positions not found for commits ".concat(c.id," and ").concat(e.id));let p=tg(c,e,u,f,r),y="",x="",b=0,k=0,v=null===(o=j.get(e.branch))||void 0===o?void 0:o.index;if(e.type===d.MERGE&&c.id!==e.parents[0]&&(v=null===(n=j.get(c.branch))||void 0===n?void 0:n.index),p){y="A 10 10, 0, 0, 0,",x="A 10 10, 0, 0, 1,",b=10,k=10;let t=u.y<f.y?tu(u.y,f.y):tu(f.y,u.y),e=u.x<f.x?tu(u.x,f.x):tu(f.x,u.x);"TB"===Q?u.x<f.x?h="M ".concat(u.x," ").concat(u.y," L ").concat(e-b," ").concat(u.y," ").concat(x," ").concat(e," ").concat(u.y+k," L ").concat(e," ").concat(f.y-b," ").concat(y," ").concat(e+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):(v=null===(i=j.get(c.branch))||void 0===i?void 0:i.index,h="M ".concat(u.x," ").concat(u.y," L ").concat(e+b," ").concat(u.y," ").concat(y," ").concat(e," ").concat(u.y+k," L ").concat(e," ").concat(f.y-b," ").concat(x," ").concat(e-k," ").concat(f.y," L ").concat(f.x," ").concat(f.y)):"BT"===Q?u.x<f.x?h="M ".concat(u.x," ").concat(u.y," L ").concat(e-b," ").concat(u.y," ").concat(y," ").concat(e," ").concat(u.y-k," L ").concat(e," ").concat(f.y+b," ").concat(x," ").concat(e+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):(v=null===(s=j.get(c.branch))||void 0===s?void 0:s.index,h="M ".concat(u.x," ").concat(u.y," L ").concat(e+b," ").concat(u.y," ").concat(x," ").concat(e," ").concat(u.y-k," L ").concat(e," ").concat(f.y+b," ").concat(y," ").concat(e-k," ").concat(f.y," L ").concat(f.x," ").concat(f.y)):u.y<f.y?h="M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(t-b," ").concat(y," ").concat(u.x+k," ").concat(t," L ").concat(f.x-b," ").concat(t," ").concat(x," ").concat(f.x," ").concat(t+k," L ").concat(f.x," ").concat(f.y):(v=null===(l=j.get(c.branch))||void 0===l?void 0:l.index,h="M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(t+b," ").concat(x," ").concat(u.x+k," ").concat(t," L ").concat(f.x-b," ").concat(t," ").concat(y," ").concat(f.x," ").concat(t-k," L ").concat(f.x," ").concat(f.y))}else y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",b=20,k=20,"TB"===Q?(u.x<f.x&&(h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y-b," ").concat(y," ").concat(u.x+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(f.x-b," ").concat(u.y," ").concat(x," ").concat(f.x," ").concat(u.y+k," L ").concat(f.x," ").concat(f.y)),u.x>f.x&&(y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",b=20,k=20,h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y-b," ").concat(x," ").concat(u.x-k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(f.x+b," ").concat(u.y," ").concat(y," ").concat(f.x," ").concat(u.y+k," L ").concat(f.x," ").concat(f.y)),u.x===f.x&&(h="M ".concat(u.x," ").concat(u.y," L ").concat(f.x," ").concat(f.y))):"BT"===Q?(u.x<f.x&&(h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y+b," ").concat(x," ").concat(u.x+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(f.x-b," ").concat(u.y," ").concat(y," ").concat(f.x," ").concat(u.y-k," L ").concat(f.x," ").concat(f.y)),u.x>f.x&&(y="A 20 20, 0, 0, 0,",x="A 20 20, 0, 0, 1,",b=20,k=20,h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y+b," ").concat(y," ").concat(u.x-k," ").concat(f.y," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(f.x+b," ").concat(u.y," ").concat(x," ").concat(f.x," ").concat(u.y-k," L ").concat(f.x," ").concat(f.y)),u.x===f.x&&(h="M ".concat(u.x," ").concat(u.y," L ").concat(f.x," ").concat(f.y))):(u.y<f.y&&(h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(f.x-b," ").concat(u.y," ").concat(x," ").concat(f.x," ").concat(u.y+k," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y-b," ").concat(y," ").concat(u.x+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y)),u.y>f.y&&(h=e.type===d.MERGE&&c.id!==e.parents[0]?"M ".concat(u.x," ").concat(u.y," L ").concat(f.x-b," ").concat(u.y," ").concat(y," ").concat(f.x," ").concat(u.y-k," L ").concat(f.x," ").concat(f.y):"M ".concat(u.x," ").concat(u.y," L ").concat(u.x," ").concat(f.y+b," ").concat(x," ").concat(u.x+k," ").concat(f.y," L ").concat(f.x," ").concat(f.y)),u.y===f.y&&(h="M ".concat(u.x," ").concat(u.y," L ").concat(f.x," ").concat(f.y)));if(void 0===h)throw Error("Line definition not found");t.append("path").attr("d",h).attr("class","arrow arrow"+F(v,8,g))},"drawArrow"),tp=(0,i.eW)((t,c)=>{let e=t.append("g").attr("class","commit-arrows");
1[...c.keys()].forEach(t=>{let r=c.get(t);r.parents&&r.parents.length>0&&r.parents.forEach(t=>{tf(e,c.get(t),r,c)})})},"drawArrows"),ty=(0,i.eW)((t,c,e,r)=>{let{look:o,theme:n,themeVariables:i}=(0,a.nV)(),{dropShadow:s,THEME_COLOR_LIMIT:l}=i,d=z.has(null!=n?n:""),h=Y.has(null!=n?n:""),m=t.append("g");c.forEach((t,c)=>{var n;let a=F(c,d?l:8,h),i=null===(n=j.get(t.name))||void 0===n?void 0:n.pos;if(void 0===i)throw Error("Position not found for branch ".concat(t.name));let g="TB"===Q||"BT"===Q?i:d?i+6+1:i-2,u=m.append("line");u.attr("x1",0),u.attr("y1",g),u.attr("x2",$),u.attr("y2",g),u.attr("class","branch branch"+a),"TB"===Q?(u.attr("y1",30),u.attr("x1",i),u.attr("y2",$),u.attr("x2",i)):"BT"===Q&&(u.attr("y1",$),u.attr("x1",i),u.attr("y2",30),u.attr("x2",i)),U.push(g);let f=Z(t.name),p=m.insert("rect"),y=m.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);y.node().appendChild(f);let x=f.getBBox(),b=d?0:4,k=d?16:0,v=d?12:0;"neo"===o&&p.attr("data-look","neo"),p.attr("class","branchLabelBkg label"+a).attr("style","neo"===o?"filter:".concat(d?"url(#".concat(r,"-drop-shadow)"):s):"").attr("rx",b).attr("ry",b).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+k).attr("height",x.height+4+v),y.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+k/2)+", "+(g-x.height/2-2)+")"),"TB"===Q?(p.attr("x",i-x.width/2-10).attr("y",0),y.attr("transform","translate("+(i-x.width/2-5)+", 0)"),d&&(p.attr("transform","translate(".concat(-k/2-3,", ").concat(-v-10,")")),y.attr("transform","translate("+(i-x.width/2-5)+", "+(-(2*v)+7)+")"))):"BT"===Q?(p.attr("x",i-x.width/2-10).attr("y",$),y.attr("transform","translate("+(i-x.width/2-5)+", "+$+")"),d&&(p.attr("transform","translate(".concat(-k/2-3,", ").concat(v+10,")")),y.attr("transform","translate("+(i-x.width/2-5)+", "+($+2*v+4)+")"))):p.attr("transform","translate(-19, "+(g-12-v/2)+")")})},"drawBranches"),tx=(0,i.eW)(function(t,c,e,r,o){return j.set(t,{pos:c,index:e}),c+=50+(o?40:0)+("TB"===Q||"BT"===Q?r.width/2:0)},"setBranchPosition"),tb=(0,i.eW)(function(t,c,e,r){var o,s;X(),i.cM.debug("in gitgraph renderer",t+"\n","id:",c,e);let d=r.db;if(!d.getConfig){i.cM.error("getConfig method is not available on db");return}let h=d.getConfig(),m=null!==(o=h.rotateCommitLabel)&&void 0!==o&&o;K=d.getCommits();let g=d.getBranchesAsObjArray();Q=d.getDirection();let u=(0,l.Ys)('[id="'.concat(c,'"]')),{look:f,theme:p,themeVariables:y}=(0,a.nV)(),{useGradient:x,gradientStart:b,gradientStop:k,filterColor:v}=y;if(x){let t=u.append("defs").append("linearGradient").attr("id",c+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",b).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",k).attr("stop-opacity",1)}"neo"===f&&z.has(null!=p?p:"")&&u.append("defs").append("filter").attr("id",c+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",v);let w=0;g.forEach((t,c)=>{var e;let r=Z(t.name),o=u.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");null===(e=a.node())||void 0===e||e.appendChild(r);let i=r.getBBox();w=tx(t.name,w,c,i,m),a.remove(),n.remove(),o.remove()}),tm(u,K,!1,h),h.showBranches&&ty(u,g,h,c),tp(u,K),tm(u,K,!0,h),n.w8.insertTitle(u,"gitTitleText",null!==(s=h.titleTopMargin)&&void 0!==s?s:0,d.getDiagramTitle()),(0,a.Rw)(void 0,u,h.diagramPadding,h.useMaxWidth)},"draw"),tk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),tv=new Set(["redux-color","redux-dark-color"]),tw=new Set(["neo","neo-dark"]),tB=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),tE=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),tM=(0,i.eW)(t=>{let{svgId:c}=t,e="";if(t.useGradient&&c)for(let r=0;r<t.THEME_COLOR_LIMIT;r++)e+="\n .label".concat(r," { fill: ").concat(t.mainBkg,"; stroke: url(").concat(c,"-gradient); stroke-width: ").concat(t.strokeWidth,";}\n ");return e},"genGitGraphGradient"),tW=(0,i.eW)(t=>{let{theme:c,themeVariables:e}=(0,a.iE)(),{borderColorArray:r}=e,o=tk.has(c);if(tw.has(c)){let c="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)c+="\n .branch-label".concat(e," { fill: ").concat(t.no
1deBorder,";}\n .commit").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n .commit-highlight").concat(e," { stroke: ").concat(t.nodeBorder,"; fill: ").concat(t.nodeBorder,"; }\n .arrow").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n .commit-bullets { fill: ").concat(t.nodeBorder,"; }\n .commit-cherry-pick").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n ").concat(tM(t));else{let r=e%8;c+="\n .branch-label".concat(e," { fill: ").concat(t["gitBranchLabel"+r],"; }\n .commit").concat(e," { stroke: ").concat(t["git"+r],"; fill: ").concat(t["git"+r],"; }\n .commit-highlight").concat(e," { stroke: ").concat(t["gitInv"+r],"; fill: ").concat(t["gitInv"+r],"; }\n .arrow").concat(e," { stroke: ").concat(t["git"+r],"; }\n ")}return c}if(tv.has(c)){let e="";for(let n=0;n<t.THEME_COLOR_LIMIT;n++)if(0===n)e+="\n .branch-label".concat(n," { fill: ").concat(t.nodeBorder,"; ").concat(o?"font-weight:".concat(t.noteFontWeight):""," }\n .commit").concat(n," { stroke: ").concat(t.nodeBorder,"; }\n .commit-highlight").concat(n," { stroke: ").concat(t.nodeBorder,"; fill: ").concat(t.mainBkg,"; }\n .label").concat(n," { fill: ").concat(t.mainBkg,"; stroke: ").concat(t.nodeBorder,"; stroke-width: ").concat(t.strokeWidth,"; ").concat(o?"font-weight:".concat(t.noteFontWeight):""," }\n .arrow").concat(n," { stroke: ").concat(t.nodeBorder,"; }\n .commit-bullets { fill: ").concat(t.nodeBorder,"; }\n ");else{let a=n%r.length;e+="\n .branch-label".concat(n," { fill: ").concat(t.nodeBorder,"; ").concat(o?"font-weight:".concat(t.noteFontWeight):""," }\n .commit").concat(n," { stroke: ").concat(r[a],"; fill: ").concat(r[a],"; }\n .commit-highlight").concat(n," { stroke: ").concat(r[a],"; fill: ").concat(r[a],"; }\n .label").concat(n," { fill: ").concat(tB.has(c)?t.mainBkg:r[a],"; stroke: ").concat(r[a],"; stroke-width: ").concat(t.strokeWidth,"; }\n .arrow").concat(n," { stroke: ").concat(r[a],"; }\n ")}return e}{let c="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)c+="\n .branch-label".concat(e," { fill: ").concat(t.nodeBorder,"; ").concat(o?"font-weight:".concat(t.noteFontWeight):""," }\n .commit").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n .commit-highlight").concat(e," { stroke: ").concat(t.nodeBorder,"; fill: ").concat(t.nodeBorder,"; }\n .label").concat(e," { fill: ").concat(t.mainBkg,"; stroke: ").concat(t.nodeBorder,"; stroke-width: ").concat(t.strokeWidth,"; ").concat(o?"font-weight:".concat(t.noteFontWeight):"","}\n .arrow").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n .commit-bullets { fill: ").concat(t.nodeBorder,"; }\n .commit-cherry-pick").concat(e," { stroke: ").concat(t.nodeBorder,"; }\n ");return c}},"genColor"),tC=(0,i.eW)(t=>"".concat(Array.from({length:t.THEME_COLOR_LIMIT},(t,c)=>c).map(c=>{let e=c%8;return"\n .branch-label".concat(c," { fill: ").concat(t["gitBranchLabel"+e],"; }\n .commit").concat(c," { stroke: ").concat(t["git"+e],"; fill: ").concat(t["git"+e],"; }\n .commit-highlight").concat(c," { stroke: ").concat(t["gitInv"+e],"; fill: ").concat(t["gitInv"+e],"; }\n .label").concat(c," { fill: ").concat(t["git"+e],"; }\n .arrow").concat(c," { stroke: ").concat(t["git"+e],"; }\n ")}).join("\n")),"normalTheme"),tT={parser:D,db:P,renderer:{draw:tb},styles:(0,i.eW)(t=>{var c;let{theme:e}=(0,a.iE)(),r=tE.has(e);return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ".concat(r?tW(t):tC(t),"\n\n .branch {\n stroke-width: ").concat(t.strokeWidth,";\n stroke: ").concat(null!==(c=t.commitLineColor)&&void 0!==c?c:t.lineColor,";\n stroke-dasharray: ").concat(r?"4 2":"2",";\n }\n .commit-label { font-size: ").concat(t.commitLabelFontSize,"; fill: ").concat(r?t.nodeBorder:t.commitLabelColor,"; ").concat(r?"font-weight:".concat(t.noteFontWeight,";"):"","}\n .commit-label-bkg { font-size: ").concat(t.commitLabelFontSize,";
1 fill: ").concat(r?"transparent":t.commitLabelBackground,"; opacity: ").concat(r?"":.5,"; }\n .tag-label { font-size: ").concat(t.tagLabelFontSize,"; fill: ").concat(t.tagLabelColor,";}\n .tag-label-bkg { fill: ").concat(r?t.mainBkg:t.tagLabelBackground,"; stroke: ").concat(r?t.nodeBorder:t.tagLabelBorder,"; ").concat(r?"filter:".concat(t.dropShadow):""," }\n .tag-hole { fill: ").concat(t.textColor,"; }\n\n .commit-merge {\n stroke: ").concat(r?t.mainBkg:t.primaryColor,";\n fill: ").concat(r?t.mainBkg:t.primaryColor,";\n }\n .commit-reverse {\n stroke: ").concat(r?t.mainBkg:t.primaryColor,";\n fill: ").concat(r?t.mainBkg:t.primaryColor,";\n stroke-width: ").concat(r?t.strokeWidth:3,";\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ").concat(r?t.mainBkg:t.primaryColor,";\n fill: ").concat(r?t.mainBkg:t.primaryColor,";\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ").concat(tk.has(e)?t.strokeWidth:8,";\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor,";\n }\n")},"getStyles")}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.