orcaq 1.1.8 → 1.1.10
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/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{Cqk0ImDE.js → -WSV_TU1.js} +1 -1
- package/.output/public/_nuxt/0U50G6dt.js +1 -0
- package/.output/public/_nuxt/{mcYTISF7.js → 0yW2dL-K.js} +1 -1
- package/.output/public/_nuxt/{CXQ2zrsE.js → 1V1SIDI5.js} +1 -1
- package/.output/public/_nuxt/{Bu6ybm3Z.js → 24W1ftax.js} +1 -1
- package/.output/public/_nuxt/339BCoyy.js +1 -0
- package/.output/public/_nuxt/{XjywAggc.js → 9PqzQzi0.js} +1 -1
- package/.output/public/_nuxt/{DG9CsZCx.js → 9Skr9Ccw.js} +1 -1
- package/.output/public/_nuxt/{D8egDyEO.js → 9eKRx5AF.js} +1 -1
- package/.output/public/_nuxt/{FmHWbXNk.js → 9vfu7pKH.js} +1 -1
- package/.output/public/_nuxt/B79M7zD1.js +1 -0
- package/.output/public/_nuxt/{BsCPQnkm.js → BDw-ivE-.js} +1 -1
- package/.output/public/_nuxt/{DgxTwFGe.js → BFOjhnLA.js} +2 -2
- package/.output/public/_nuxt/{BWTTrGtY.js → BFYNB1ok.js} +2 -2
- package/.output/public/_nuxt/BFlFdtcI.js +12 -0
- package/.output/public/_nuxt/{BXMKgn-J.js → BIBdWmGh.js} +1 -1
- package/.output/public/_nuxt/{_uLivI44.js → BIDVPCgr.js} +1 -1
- package/.output/public/_nuxt/{BuTCm7Bo.js → BJMwGHo7.js} +1 -1
- package/.output/public/_nuxt/{BHr4_sbs.js → BKh6DDUh.js} +1 -1
- package/.output/public/_nuxt/{5450EsIE.js → BLDVl9Iw.js} +1 -1
- package/.output/public/_nuxt/{Cd_fVKDw.js → BNgGNFV2.js} +1 -1
- package/.output/public/_nuxt/BP-G5cXp.js +1 -0
- package/.output/public/_nuxt/{DkX74xDd.js → BS966b0P.js} +1 -1
- package/.output/public/_nuxt/{BQm1mt0O.js → B_Oy26qU.js} +1 -1
- package/.output/public/_nuxt/Bdou58NY.js +1 -0
- package/.output/public/_nuxt/Bg0K-n53.js +18 -0
- package/.output/public/_nuxt/{BO3FEgXG.js → BjfaOtB-.js} +1 -1
- package/.output/public/_nuxt/{BalNYDR1.js → BlngscFe.js} +1 -1
- package/.output/public/_nuxt/{DHXwq7wT.js → BsXv3P9A.js} +1 -1
- package/.output/public/_nuxt/{C-e53AuW.js → Buh85F8i.js} +1 -1
- package/.output/public/_nuxt/{CU5cwnUW.js → Bvi2huT8.js} +1 -1
- package/.output/public/_nuxt/{LxqkguPP.js → BxlUlYz1.js} +1 -1
- package/.output/public/_nuxt/ByJGqBjE.js +1 -0
- package/.output/public/_nuxt/{DCewvWOu.js → C-M7J4rh.js} +1 -1
- package/.output/public/_nuxt/{D_kY6P5P.js → C04-ICJx.js} +1 -1
- package/.output/public/_nuxt/{f6XRRKUb.js → C2Czrs1u.js} +1 -1
- package/.output/public/_nuxt/{CuXTA7ZW.js → C5Feel6b.js} +1 -1
- package/.output/public/_nuxt/CAVSZeVY.js +1 -0
- package/.output/public/_nuxt/{7iCr9_qw.js → CAcViJl9.js} +3 -3
- package/.output/public/_nuxt/CBge6eLY.js +1 -0
- package/.output/public/_nuxt/{BK-6CJ0A.js → CC8wYgAN.js} +1 -1
- package/.output/public/_nuxt/{WGDY9i_Q.js → CEIpXOz0.js} +1 -1
- package/.output/public/_nuxt/CI85gLx4.js +1 -0
- package/.output/public/_nuxt/{Dpkaavgs.js → CJeCcjmd.js} +1 -1
- package/.output/public/_nuxt/{CMDq7o88.js → CJuYfiL1.js} +1 -1
- package/.output/public/_nuxt/CNErkSjF.js +1 -0
- package/.output/public/_nuxt/COII6plA.js +31 -0
- package/.output/public/_nuxt/{R04uZjs6.js → CRCn6mdA.js} +1 -1
- package/.output/public/_nuxt/{tc7vkD0J.js → CUtdecax.js} +2 -2
- package/.output/public/_nuxt/{Dtry_3Qa.js → CYm7TuhP.js} +1 -1
- package/.output/public/_nuxt/{CMnjMfEQ.js → CbkolJXg.js} +1 -1
- package/.output/public/_nuxt/{CMI-3q_e.js → CeA2-eDW.js} +1 -1
- package/.output/public/_nuxt/CgY96xS_.js +1 -0
- package/.output/public/_nuxt/{JxgekUqn.js → Ch9kUYU-.js} +1 -1
- package/.output/public/_nuxt/{CCC5u9Ni.js → Ch_iEFHi.js} +1 -1
- package/.output/public/_nuxt/{DZ4xLzJg.js → Co6sZiuo.js} +1 -1
- package/.output/public/_nuxt/Cu7zvuYQ.js +1 -0
- package/.output/public/_nuxt/CwcaMelw.js +1 -0
- package/.output/public/_nuxt/CxFAImHj.js +1 -0
- package/.output/public/_nuxt/{jtwYTq7X.js → D-yya4MN.js} +32 -32
- package/.output/public/_nuxt/{D4DMGxvZ.js → D0NZRXnm.js} +1 -1
- package/.output/public/_nuxt/{vP25tZUh.js → D6XDbGbI.js} +1 -1
- package/.output/public/_nuxt/{BNh4NY7v.js → D8JEzGOU.js} +1 -1
- package/.output/public/_nuxt/{C874itvn.js → D8wbEppA.js} +1 -1
- package/.output/public/_nuxt/D9h-2lVu.js +1 -0
- package/.output/public/_nuxt/{D5Oboajo.js → DANeHzIE.js} +1 -1
- package/.output/public/_nuxt/{CyKRjZZo.js → DBku6oAz.js} +1 -1
- package/.output/public/_nuxt/{DJXrgohw.js → DDXEeq1n.js} +2 -2
- package/.output/public/_nuxt/DESxUB7o.js +1 -0
- package/.output/public/_nuxt/{CAjVwGyz.js → DHG-KJyJ.js} +1 -1
- package/.output/public/_nuxt/DHXbNYui.js +1 -0
- package/.output/public/_nuxt/{Dopm1f4X.js → DI0LPDTd.js} +1 -1
- package/.output/public/_nuxt/{BmfnP4qD.js → DKSZP8GP.js} +1 -1
- package/.output/public/_nuxt/DL1qmlP8.js +1 -0
- package/.output/public/_nuxt/{BMVgfiQu.js → DN4-koTG.js} +1 -1
- package/.output/public/_nuxt/{BRzWRTTF.js → DO1jmufl.js} +1 -1
- package/.output/public/_nuxt/{DpsqSAMo.js → DOuNj3Jn.js} +1 -1
- package/.output/public/_nuxt/DPUO8R7l.js +1 -0
- package/.output/public/_nuxt/{C0jXhwNq.js → DahDvheq.js} +1 -1
- package/.output/public/_nuxt/{BRCvv3op.js → DbHH7dzg.js} +1 -1
- package/.output/public/_nuxt/{C6teO48Y.js → DbehhcO7.js} +76 -76
- package/.output/public/_nuxt/{CQFANjzf.js → DeTqfKUd.js} +1 -1
- package/.output/public/_nuxt/{B6N_D8QI.js → Df85byjM.js} +1 -1
- package/.output/public/_nuxt/{B0gkARnK.js → DizXDCtS.js} +1 -1
- package/.output/public/_nuxt/{WZQ8mcv9.js → DjKlFOO8.js} +1 -1
- package/.output/public/_nuxt/{CCCJ2fw7.js → DjLd7E2v.js} +1 -1
- package/.output/public/_nuxt/{DXVrM3CN.js → DnBjpGBx.js} +1 -1
- package/.output/public/_nuxt/DnQ4Mwo_.js +1 -0
- package/.output/public/_nuxt/{Cw1HIv3s.js → DqYakCiF.js} +1 -1
- package/.output/public/_nuxt/{DBSV6YXN.js → DqunUhPG.js} +1 -1
- package/.output/public/_nuxt/{CFi6G8Aj.js → Dr1ZFb1n.js} +2 -2
- package/.output/public/_nuxt/Dsis422h.js +1 -0
- package/.output/public/_nuxt/{DwPmcz47.js → Du_4PNZI.js} +1 -1
- package/.output/public/_nuxt/{7H5y5euK.js → DvTZ16yM.js} +1 -1
- package/.output/public/_nuxt/{CyEOtFwE.js → Dvt9REJL.js} +1 -1
- package/.output/public/_nuxt/{DQRyK9Io.js → DxMpy-ot.js} +1 -1
- package/.output/public/_nuxt/{BRWis86L.js → DyLnyCs4.js} +1 -1
- package/.output/public/_nuxt/{DmnufEYq.js → FakvzamF.js} +1 -1
- package/.output/public/_nuxt/LcPL138_.js +1 -0
- package/.output/public/_nuxt/{CXbrqQhC.js → P7T0pdFZ.js} +1 -1
- package/.output/public/_nuxt/{LU_a7qLd.js → Rhi-lAfN.js} +1 -1
- package/.output/public/_nuxt/S7ftI9sn.js +1 -0
- package/.output/public/_nuxt/T01BrTsW.js +1 -0
- package/.output/public/_nuxt/WqpfmT0s.js +1 -0
- package/.output/public/_nuxt/XhSVj1eQ.js +16 -0
- package/.output/public/_nuxt/{vEHvfalB.js → _fXjN5Pd.js} +1 -1
- package/.output/public/_nuxt/agpUpIJe.js +1 -0
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/39c2c89f-bb28-470e-b95a-b7776149dc9f.json +1 -0
- package/.output/public/_nuxt/{CvbYm0uB.js → dDyWVWO8.js} +1 -1
- package/.output/public/_nuxt/entry.BeX6Jkel.css +1 -0
- package/.output/public/_nuxt/{DrkGD_bQ.js → f6qCSD-K.js} +1 -1
- package/.output/public/_nuxt/{zndqWf9s.js → goG5gpyv.js} +1 -1
- package/.output/public/_nuxt/{soHTUlpn.js → hbGkF-4Z.js} +1 -1
- package/.output/public/_nuxt/{CKlMKmo6.js → jDSo3fNb.js} +1 -1
- package/.output/public/_nuxt/{BzNEuLKx.js → k4d17TZz.js} +1 -1
- package/.output/public/_nuxt/m4Dxzyfa.js +2 -0
- package/.output/public/_nuxt/{BJvJ0Hlu.js → ndyknmtb.js} +4 -4
- package/.output/public/_nuxt/{C6K-C4_d.js → vIV0z0PD.js} +1 -1
- package/.output/public/_nuxt/{BzqjH2-H.js → wTs8ybMd.js} +1 -1
- package/.output/public/_nuxt/{BYaoWfSN.js → ymlmmOzU.js} +1 -1
- package/.output/server/chunks/_/tables.factory.mjs +133 -43
- package/.output/server/chunks/_/tables.factory.mjs.map +1 -1
- package/.output/server/chunks/build/client.manifest.mjs +837 -788
- package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
- package/.output/server/chunks/nitro/nitro.mjs +697 -669
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/-7uW7YTy.js +0 -1
- package/.output/public/_nuxt/6mVUr42b.js +0 -1
- package/.output/public/_nuxt/B21nC2NZ.js +0 -1
- package/.output/public/_nuxt/B232GDut.js +0 -2
- package/.output/public/_nuxt/B7C8fo37.js +0 -1
- package/.output/public/_nuxt/BC82eJHt.js +0 -1
- package/.output/public/_nuxt/Bn6_QGSK.js +0 -1
- package/.output/public/_nuxt/BuzCyLCh.js +0 -1
- package/.output/public/_nuxt/BzNNFvTW.js +0 -1
- package/.output/public/_nuxt/C8ZJ2pm_.js +0 -1
- package/.output/public/_nuxt/CA3O4M9L.js +0 -1
- package/.output/public/_nuxt/CZXyfpHW.js +0 -1
- package/.output/public/_nuxt/CZgTP5wX.js +0 -1
- package/.output/public/_nuxt/CeXnSKvd.js +0 -1
- package/.output/public/_nuxt/Chw5tFzx.js +0 -1
- package/.output/public/_nuxt/CkLSGVwV.js +0 -1
- package/.output/public/_nuxt/Cv9v5fHN.js +0 -1
- package/.output/public/_nuxt/D5GonnbJ.js +0 -1
- package/.output/public/_nuxt/DH2V7e8U.js +0 -1
- package/.output/public/_nuxt/DZIoL4RO.js +0 -1
- package/.output/public/_nuxt/DyjsVMbv.js +0 -1
- package/.output/public/_nuxt/KoGK2wLb.js +0 -1
- package/.output/public/_nuxt/Q8x88Gcd.js +0 -1
- package/.output/public/_nuxt/So0hX8V0.js +0 -31
- package/.output/public/_nuxt/builds/meta/30582efd-125a-4f88-bd89-20a7b2ba8697.json +0 -1
- package/.output/public/_nuxt/eQskTKIU.js +0 -1
- package/.output/public/_nuxt/ecWNT6PZ.js +0 -1
- package/.output/public/_nuxt/entry.BcHy7sxf.css +0 -1
- package/.output/public/_nuxt/mcfKrWU-.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aP as _,aQ as E}from"./
|
|
1
|
+
import{aP as _,aQ as E}from"./DbehhcO7.js";const A="#",S="_____#",T="isNewRow",b=[S,T],R=35,p=(e,s=!1)=>e.map(t=>{const o={...t};return s&&Object.keys(o).forEach(n=>{const r=o[n];r!==null&&typeof r=="object"&&!(r instanceof Date)&&(o[n]=JSON.stringify(r))}),b.forEach(n=>{delete o[n]}),o}),I=e=>e==null?"NULL":typeof e=="boolean"?e?"TRUE":"FALSE":typeof e=="number"||typeof e=="bigint"?String(e):typeof e=="string"?`'${e.replace(/'/g,"''")}'`:e instanceof Date?`'${e.toISOString().slice(0,19).replace("T"," ")}'`:`'${JSON.stringify(e).replace(/'/g,"''")}'`,g=(e,s,t,o)=>{if(e.length===0)return"";const n=Object.keys(e[0]),r=o?`"${o}"."${s}"`:`"${s}"`,c=e.map(i=>`(${n.map(f=>I(i[f])).join(", ")})`);return`-- ${t} ${e.length} rows on ${new Date().toLocaleString()}
|
|
2
2
|
-- Table: ${o?`${o}.`:""}${s}
|
|
3
3
|
|
|
4
4
|
INSERT INTO ${r} (${n.map(i=>`"${i}"`).join(", ")})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as R,a as W,S as N}from"./BRWis86L.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./BJvJ0Hlu.js";import{G as O}from"./qsFoMdT2.js";import{l as J}from"./CQb_mUBo.js";import"./BsCPQnkm.js";import"./BO3FEgXG.js";import"./C6teO48Y.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram};
|
|
1
|
+
import{s as R,a as W,S as N}from"./DyLnyCs4.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,a9 as _,aa as U,a6 as C,u as F}from"./ndyknmtb.js";import{G as O}from"./qsFoMdT2.js";import{l as J}from"./CQb_mUBo.js";import"./BDw-ivE-.js";import"./BjfaOtB-.js";import"./DbehhcO7.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(g,B,m){const E=g.append("tspan").attr("x",2*t().state.padding).text(B);m||E.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,x=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(g){a||(d(x,g,s),s=!1),a=!1});const w=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),p=x.node().getBBox(),o=Math.max(p.width,n.width);return w.attr("x2",o+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",o+2*t().state.padding).attr("height",p.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),x=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),p=s.node().getBBox().width+n;let o=Math.max(p,x);o===x&&(o=o+n);let g;const B=e.node().getBBox();i.doc,g=a-c,p>x&&(g=(x-o)/2+c),Math.abs(a-B.x)<c&&p>x&&(g=a-(p-x)/2);const m=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",g).attr("y",m).attr("class",d?"alt-composit":"composit").attr("width",o).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",g+c),p<=x&&s.attr("x",a+(o-n)/2-p/2+c),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",g).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",o).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let x=e.replace(/\r\n/g,"<br/>");x=x.replace(/\n/g,"<br/>");const a=x.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const w of a){const p=w.trim();if(p.length>0){const o=l.append("tspan");if(o.text(p),s===0){const g=o.node().getBBox();s+=g.height}n+=s,o.attr("x",i+t().state.noteMargin),o.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),A=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),x=e.append("path").attr("d",l(n)).attr("id","edge"+A).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),x.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:w,y:p}=F.calcLabelPosition(i.points),o=z.getRows(d.title);let g=0;const B=[];let m=0,E=0;for(let u=0;u<=o.length;u++){const h=s.append("text").attr("text-anchor","middle").text(o[u]).attr("x",w).attr("y",p+g),y=h.node().getBBox();m=Math.max(m,y.width),E=Math.min(E,y.x),S.info(y.x,w,p+g),g===0&&(g=h.node().getBBox().height,S.info("Title height",g,p)),B.push(h)}let k=g*o.length;if(o.length>1){const u=(o.length-1)*g*.5;B.forEach((h,y)=>h.attr("y",p+y*g-u)),k=g*o.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",w-m/2-t().state.padding/2).attr("y",p-k/2-t().state.padding/2-3.5).attr("width",m+t().state.padding).attr("height",k+t().state.padding),S.info(r)}A++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const x=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=x.select(`[id='${i}']`);tt(s);const w=c.db.getRootDoc();G(w,s,void 0,!1,x,a,c);const p=b.padding,o=s.node().getBBox(),g=o.width+p*2,B=o.height+p*2,m=g*1.75;P(s,B,m,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+g+" "+B)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),G=f((e,i,d,c,n,l,x)=>{const a=new O({compound:!0,multigraph:!0});let s,w=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){w=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:w?1:b.edgeLengthFactor,nodeSep:w?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const p=x.db.getStates(),o=x.db.getRelations(),g=Object.keys(p);for(const r of g){const u=p[r];d&&(u.parentId=d);let h;if(u.doc){let y=i.append("g").attr("id",u.id).attr("class","stateGroup");h=G(u.doc,y,u.id,!c,n,l,x);{y=$(y,u,c);let v=y.node().getBBox();h.width=v.width,h.height=v.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const y={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},v=L(i,y,a);u.note.position==="left of"?(a.setNode(h.id+"-note",v),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",v)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;o.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const m=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+m.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+m.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+m.id+" #"+r+" .divider").forEach(h=>{const y=h.parentElement;let v=0,M=0;y&&(y.parentElement&&(v=y.parentElement.getBBox().width),M=parseInt(y.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",v-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let E=m.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),E=m.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=E.width+2*b.padding,k.height=E.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},lt={parser:W,get db(){return new N(1)},renderer:it,styles:R,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{lt as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as V}from"./CXQ2zrsE.js";import{I as X}from"./CQFANjzf.js";import{_ as $,t as J,q as Q,s as Z,g as rr,a as er,b as tr,l as m,d as ar,u as sr,F as nr,A as or,k as E,G as cr,H as ir,I as dr,K as hr}from"./BJvJ0Hlu.js";import{p as lr}from"./DmnufEYq.js";import"./C6teO48Y.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},$r=dr.gitGraph,q=$(()=>cr({...$r,...ir().gitGraph}),"getConfig"),i=new X(()=>{const t=q(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function z(){return hr({length:7})}$(z,"getID");function W(t,r){const a=Object.create(null);return t.reduce((n,e)=>{const s=r(e);return a[s]||(a[s]=!0,n.push(e)),n},[])}$(W,"uniqBy");var fr=$(function(t){i.records.direction=t},"setDirection"),yr=$(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),gr=$(function(){return i.records.options},"getOptions"),xr=$(function(t){let r=t.msg,a=t.id;const n=t.type;let e=t.tags;m.info("commit",r,a,n,e),m.debug("Entering commit:",r,a,n,e);const s=q();a=E.sanitizeText(a,s),r=E.sanitizeText(r,s),e=e==null?void 0:e.map(c=>E.sanitizeText(c,s));const o={id:a||i.records.seq+"-"+z(),message:r,seq:i.records.seq++,type:n??p.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,m.info("main branch",s.mainBranchName),i.records.commits.has(o.id)&&m.warn(`Commit ID ${o.id} already exists`),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),m.debug("in pushCommit "+o.id)},"commit"),ur=$(function(t){let r=t.name;const a=t.order;if(r=E.sanitizeText(r,q()),i.records.branches.has(r))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 ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),S(r),m.debug("in createBranch")},"branch"),pr=$(t=>{let r=t.branch,a=t.id;const n=t.type,e=t.tags,s=q();r=E.sanitizeText(r,s),a&&(a=E.sanitizeText(a,s));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(r),d=o?i.records.commits.get(o):void 0,h=c?i.records.commits.get(c):void 0;if(d&&h&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(d===void 0||!d){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},l}if(!i.records.branches.has(r)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},l}if(h===void 0||!h){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},l}if(d===h){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(a&&i.records.commits.has(a)){const l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw l.hash={text:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${e==null?void 0:e.join(" ")}`]},l}const f=c||"",y={id:a||`${i.records.seq}-${z()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:p.MERGE,customType:n,customId:!!a,tags:e??[]};i.records.head=y,i.records.commits.set(y.id,y),i.records.branches.set(i.records.currBranch,y.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),br=$(function(t){let r=t.id,a=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,n);const s=q();if(r=E.sanitizeText(r,s),a=E.sanitizeText(a,s),n=n==null?void 0:n.map(d=>E.sanitizeText(d,s)),e=E.sanitizeText(e,s),!r||!i.records.commits.has(r)){const d=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw d.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},d}const o=i.records.commits.get(r);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(o.parents)&&o.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const d=i.records.branches.get(i.records.currBranch);if(d===void 0||!d){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const h=i.records.commits.get(d);if(h===void 0||!h){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const f={id:i.records.seq+"-"+z(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===p.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),S=$(function(t){if(t=E.sanitizeText(t,q()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,a){const n=t.indexOf(r);n===-1?t.push(a):t.splice(n,1,a)}$(D,"upsert");function F(t){const r=t.reduce((e,s)=>e.seq>s.seq?e:s,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const n=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);D(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);D(t,r,e)}}t=W(t,e=>e.id),F(t)}$(F,"prettyPrintCommitHistory");var mr=$(function(){m.debug(i.records.commits);const t=j()[0];F([t])},"prettyPrint"),wr=$(function(){i.reset(),or()},"clear"),vr=$(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Cr=$(function(){return i.records.branches},"getBranches"),Er=$(function(){return i.records.commits},"getCommits"),j=$(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Br=$(function(){return i.records.currBranch},"getCurrentBranch"),Tr=$(function(){return i.records.direction},"getDirection"),Lr=$(function(){return i.records.head},"getHead"),K={commitType:p,getConfig:q,setDirection:fr,setOptions:yr,getOptions:gr,commit:xr,branch:ur,merge:pr,cherryPick:br,checkout:S,prettyPrint:mr,clear:wr,getBranchesAsObjArray:vr,getBranches:Cr,getCommits:Er,getCommitsArray:j,getCurrentBranch:Br,getDirection:Tr,getHead:Lr,setAccTitle:tr,getAccTitle:er,getAccDescription:rr,setAccDescription:Z,setDiagramTitle:Q,getDiagramTitle:J},kr=$((t,r)=>{V(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)Mr(a,r)},"populate"),Mr=$((t,r)=>{const n={Commit:$(e=>r.commit(Ir(e)),"Commit"),Branch:$(e=>r.branch(Rr(e)),"Branch"),Merge:$(e=>r.merge(Gr(e)),"Merge"),Checkout:$(e=>r.checkout(Or(e)),"Checkout"),CherryPicking:$(e=>r.cherryPick(qr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ir=$(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),Rr=$(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=$(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Or=$(t=>t.branch,"parseCheckout"),qr=$(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Ar={parse:$(async t=>{const r=await lr("gitGraph",t);m.debug(r),kr(r,K)},"parse")},I=10,R=40,B=4,L=2,O=8,v=new Map,C=new Map,P=30,A=new Map,_=[],M=0,x="LR",Hr=$(()=>{v.clear(),C.clear(),A.clear(),M=0,_=[],x="LR"},"clear"),Y=$(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const 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=n.trim(),r.appendChild(e)}),r},"drawText"),U=$(t=>{let r,a,n;return x==="BT"?(a=$((e,s)=>e<=s,"comparisonFunc"),n=1/0):(a=$((e,s)=>e>=s,"comparisonFunc"),n=0),t.forEach(e=>{var o,c;const s=x==="TB"||x=="BT"?(o=C.get(e))==null?void 0:o.y:(c=C.get(e))==null?void 0:c.x;s!==void 0&&a(s,n)&&(r=e,n=s)}),r},"findClosestParent"),Pr=$(t=>{let r="",a=1/0;return t.forEach(n=>{const e=C.get(n).y;e<=a&&(r=n,a=e)}),r||void 0},"findClosestParentBT"),_r=$((t,r,a)=>{let n=a,e=a;const s=[];t.forEach(o=>{const c=r.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(n=Dr(c),e=Math.max(n,e)):s.push(c),Fr(c,n)}),n=e,s.forEach(o=>{Nr(o,n,a)}),t.forEach(o=>{const c=r.get(o);if(c!=null&&c.parents.length){const d=Pr(c.parents);n=C.get(d).y-R,n<=e&&(e=n);const h=v.get(c.branch).pos,f=n-I;C.set(c.id,{x:h,y:f})}})},"setParallelBTPos"),zr=$(t=>{var n;const r=U(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(n=C.get(r))==null?void 0:n.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Dr=$(t=>zr(t)+R,"calculateCommitPosition"),Fr=$((t,r)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const n=a.pos,e=r+I;return C.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),Nr=$((t,r,a)=>{const n=v.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,s=n.pos;C.set(t.id,{x:s,y:e})},"setRootPosition"),Wr=$((t,r,a,n,e,s)=>{if(s===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${n}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${n}-inner`);else if(s===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",r.type===p.MERGE?9:10),o.attr("class",`commit ${r.id} commit${e%O}`),s===p.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${n} ${r.id} commit${e%O}`)}s===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Sr=$((t,r,a,n,e)=>{var s;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&e.showCommitLabel){const o=t.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),d=o.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),h=(s=d.node())==null?void 0:s.getBBox();if(h&&(c.attr("x",a.posWithOffset-h.width/2-L).attr("y",a.y+13.5).attr("width",h.width+2*L).attr("height",h.height+2*L),x==="TB"||x==="BT"?(c.attr("x",a.x-(h.width+4*B+5)).attr("y",a.y-12),d.attr("x",a.x-(h.width+4*B)).attr("y",a.y+h.height-12)):d.attr("x",a.posWithOffset-h.width/2),e.rotateCommitLabel))if(x==="TB"||x==="BT")d.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const f=-7.5-(h.width+10)/25*9.5,y=10+h.width/25*8.5;o.attr("transform","translate("+f+", "+y+") rotate(-45, "+n+", "+a.y+")")}}},"drawCommitLabel"),jr=$((t,r,a,n)=>{var e;if(r.tags.length>0){let s=0,o=0,c=0;const d=[];for(const h of r.tags.reverse()){const f=t.insert("polygon"),y=t.append("circle"),l=t.append("text").attr("y",a.y-16-s).attr("class","tag-label").text(h),g=(e=l.node())==null?void 0:e.getBBox();if(!g)throw new Error("Tag bbox not found");o=Math.max(o,g.width),c=Math.max(c,g.height),l.attr("x",a.posWithOffset-g.width/2),d.push({tag:l,hole:y,rect:f,yOffset:s}),s+=20}for(const{tag:h,hole:f,rect:y,yOffset:l}of d){const g=c/2,u=a.y-19.2-l;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
import{p as V}from"./1V1SIDI5.js";import{I as X}from"./DeTqfKUd.js";import{_ as $,t as J,q as Q,s as Z,g as rr,a as er,b as tr,l as m,d as ar,u as sr,F as nr,A as or,k as E,G as cr,H as ir,I as dr,K as hr}from"./ndyknmtb.js";import{p as lr}from"./FakvzamF.js";import"./DbehhcO7.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},$r=dr.gitGraph,q=$(()=>cr({...$r,...ir().gitGraph}),"getConfig"),i=new X(()=>{const t=q(),r=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:a}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function z(){return hr({length:7})}$(z,"getID");function W(t,r){const a=Object.create(null);return t.reduce((n,e)=>{const s=r(e);return a[s]||(a[s]=!0,n.push(e)),n},[])}$(W,"uniqBy");var fr=$(function(t){i.records.direction=t},"setDirection"),yr=$(function(t){m.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{i.records.options=JSON.parse(t)}catch(r){m.error("error while parsing gitGraph options",r.message)}},"setOptions"),gr=$(function(){return i.records.options},"getOptions"),xr=$(function(t){let r=t.msg,a=t.id;const n=t.type;let e=t.tags;m.info("commit",r,a,n,e),m.debug("Entering commit:",r,a,n,e);const s=q();a=E.sanitizeText(a,s),r=E.sanitizeText(r,s),e=e==null?void 0:e.map(c=>E.sanitizeText(c,s));const o={id:a||i.records.seq+"-"+z(),message:r,seq:i.records.seq++,type:n??p.NORMAL,tags:e??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=o,m.info("main branch",s.mainBranchName),i.records.commits.has(o.id)&&m.warn(`Commit ID ${o.id} already exists`),i.records.commits.set(o.id,o),i.records.branches.set(i.records.currBranch,o.id),m.debug("in pushCommit "+o.id)},"commit"),ur=$(function(t){let r=t.name;const a=t.order;if(r=E.sanitizeText(r,q()),i.records.branches.has(r))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 ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:a}),S(r),m.debug("in createBranch")},"branch"),pr=$(t=>{let r=t.branch,a=t.id;const n=t.type,e=t.tags,s=q();r=E.sanitizeText(r,s),a&&(a=E.sanitizeText(a,s));const o=i.records.branches.get(i.records.currBranch),c=i.records.branches.get(r),d=o?i.records.commits.get(o):void 0,h=c?i.records.commits.get(c):void 0;if(d&&h&&d.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(d===void 0||!d){const l=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},l}if(!i.records.branches.has(r)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},l}if(h===void 0||!h){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},l}if(d===h){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},l}if(a&&i.records.commits.has(a)){const l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw l.hash={text:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,token:`merge ${r} ${a} ${n} ${e==null?void 0:e.join(" ")}`,expected:[`merge ${r} ${a}_UNIQUE ${n} ${e==null?void 0:e.join(" ")}`]},l}const f=c||"",y={id:a||`${i.records.seq}-${z()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,f],branch:i.records.currBranch,type:p.MERGE,customType:n,customId:!!a,tags:e??[]};i.records.head=y,i.records.commits.set(y.id,y),i.records.branches.set(i.records.currBranch,y.id),m.debug(i.records.branches),m.debug("in mergeBranch")},"merge"),br=$(function(t){let r=t.id,a=t.targetId,n=t.tags,e=t.parent;m.debug("Entering cherryPick:",r,a,n);const s=q();if(r=E.sanitizeText(r,s),a=E.sanitizeText(a,s),n=n==null?void 0:n.map(d=>E.sanitizeText(d,s)),e=E.sanitizeText(e,s),!r||!i.records.commits.has(r)){const d=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw d.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},d}const o=i.records.commits.get(r);if(o===void 0||!o)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(e&&!(Array.isArray(o.parents)&&o.parents.includes(e)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=o.branch;if(o.type===p.MERGE&&!e)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!i.records.commits.has(a)){if(c===i.records.currBranch){const y=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const d=i.records.branches.get(i.records.currBranch);if(d===void 0||!d){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const h=i.records.commits.get(d);if(h===void 0||!h){const y=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw y.hash={text:`cherryPick ${r} ${a}`,token:`cherryPick ${r} ${a}`,expected:["cherry-pick abc"]},y}const f={id:i.records.seq+"-"+z(),message:`cherry-picked ${o==null?void 0:o.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,o.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${o.id}${o.type===p.MERGE?`|parent:${e}`:""}`]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),m.debug(i.records.branches),m.debug("in cherryPick")}},"cherryPick"),S=$(function(t){if(t=E.sanitizeText(t,q()),i.records.branches.has(t)){i.records.currBranch=t;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}},"checkout");function D(t,r,a){const n=t.indexOf(r);n===-1?t.push(a):t.splice(n,1,a)}$(D,"upsert");function F(t){const r=t.reduce((e,s)=>e.seq>s.seq?e:s,t[0]);let a="";t.forEach(function(e){e===r?a+=" *":a+=" |"});const n=[a,r.id,r.seq];for(const e in i.records.branches)i.records.branches.get(e)===r.id&&n.push(e);if(m.debug(n.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const e=i.records.commits.get(r.parents[0]);D(t,r,e),r.parents[1]&&t.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const e=i.records.commits.get(r.parents[0]);D(t,r,e)}}t=W(t,e=>e.id),F(t)}$(F,"prettyPrintCommitHistory");var mr=$(function(){m.debug(i.records.commits);const t=j()[0];F([t])},"prettyPrint"),wr=$(function(){i.reset(),or()},"clear"),vr=$(function(){return[...i.records.branchConfig.values()].map((r,a)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${a}`)}).sort((r,a)=>(r.order??0)-(a.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),Cr=$(function(){return i.records.branches},"getBranches"),Er=$(function(){return i.records.commits},"getCommits"),j=$(function(){const t=[...i.records.commits.values()];return t.forEach(function(r){m.debug(r.id)}),t.sort((r,a)=>r.seq-a.seq),t},"getCommitsArray"),Br=$(function(){return i.records.currBranch},"getCurrentBranch"),Tr=$(function(){return i.records.direction},"getDirection"),Lr=$(function(){return i.records.head},"getHead"),K={commitType:p,getConfig:q,setDirection:fr,setOptions:yr,getOptions:gr,commit:xr,branch:ur,merge:pr,cherryPick:br,checkout:S,prettyPrint:mr,clear:wr,getBranchesAsObjArray:vr,getBranches:Cr,getCommits:Er,getCommitsArray:j,getCurrentBranch:Br,getDirection:Tr,getHead:Lr,setAccTitle:tr,getAccTitle:er,getAccDescription:rr,setAccDescription:Z,setDiagramTitle:Q,getDiagramTitle:J},kr=$((t,r)=>{V(t,r),t.dir&&r.setDirection(t.dir);for(const a of t.statements)Mr(a,r)},"populate"),Mr=$((t,r)=>{const n={Commit:$(e=>r.commit(Ir(e)),"Commit"),Branch:$(e=>r.branch(Rr(e)),"Branch"),Merge:$(e=>r.merge(Gr(e)),"Merge"),Checkout:$(e=>r.checkout(Or(e)),"Checkout"),CherryPicking:$(e=>r.cherryPick(qr(e)),"CherryPicking")}[t.$type];n?n(t):m.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),Ir=$(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?p[t.type]:p.NORMAL,tags:t.tags??void 0}),"parseCommit"),Rr=$(t=>({name:t.name,order:t.order??0}),"parseBranch"),Gr=$(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?p[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),Or=$(t=>t.branch,"parseCheckout"),qr=$(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),Ar={parse:$(async t=>{const r=await lr("gitGraph",t);m.debug(r),kr(r,K)},"parse")},I=10,R=40,B=4,L=2,O=8,v=new Map,C=new Map,P=30,A=new Map,_=[],M=0,x="LR",Hr=$(()=>{v.clear(),C.clear(),A.clear(),M=0,_=[],x="LR"},"clear"),Y=$(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(n=>{const 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=n.trim(),r.appendChild(e)}),r},"drawText"),U=$(t=>{let r,a,n;return x==="BT"?(a=$((e,s)=>e<=s,"comparisonFunc"),n=1/0):(a=$((e,s)=>e>=s,"comparisonFunc"),n=0),t.forEach(e=>{var o,c;const s=x==="TB"||x=="BT"?(o=C.get(e))==null?void 0:o.y:(c=C.get(e))==null?void 0:c.x;s!==void 0&&a(s,n)&&(r=e,n=s)}),r},"findClosestParent"),Pr=$(t=>{let r="",a=1/0;return t.forEach(n=>{const e=C.get(n).y;e<=a&&(r=n,a=e)}),r||void 0},"findClosestParentBT"),_r=$((t,r,a)=>{let n=a,e=a;const s=[];t.forEach(o=>{const c=r.get(o);if(!c)throw new Error(`Commit not found for key ${o}`);c.parents.length?(n=Dr(c),e=Math.max(n,e)):s.push(c),Fr(c,n)}),n=e,s.forEach(o=>{Nr(o,n,a)}),t.forEach(o=>{const c=r.get(o);if(c!=null&&c.parents.length){const d=Pr(c.parents);n=C.get(d).y-R,n<=e&&(e=n);const h=v.get(c.branch).pos,f=n-I;C.set(c.id,{x:h,y:f})}})},"setParallelBTPos"),zr=$(t=>{var n;const r=U(t.parents.filter(e=>e!==null));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(n=C.get(r))==null?void 0:n.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Dr=$(t=>zr(t)+R,"calculateCommitPosition"),Fr=$((t,r)=>{const a=v.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const n=a.pos,e=r+I;return C.set(t.id,{x:n,y:e}),{x:n,y:e}},"setCommitPosition"),Nr=$((t,r,a)=>{const n=v.get(t.branch);if(!n)throw new Error(`Branch not found for commit ${t.id}`);const e=r+a,s=n.pos;C.set(t.id,{x:s,y:e})},"setRootPosition"),Wr=$((t,r,a,n,e,s)=>{if(s===p.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${r.id} commit-highlight${e%O} ${n}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${r.id} commit${e%O} ${n}-inner`);else if(s===p.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${r.id} ${n}`);else{const o=t.append("circle");if(o.attr("cx",a.x),o.attr("cy",a.y),o.attr("r",r.type===p.MERGE?9:10),o.attr("class",`commit ${r.id} commit${e%O}`),s===p.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${n} ${r.id} commit${e%O}`)}s===p.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${n} ${r.id} commit${e%O}`)}},"drawCommitBullet"),Sr=$((t,r,a,n,e)=>{var s;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&e.showCommitLabel){const o=t.append("g"),c=o.insert("rect").attr("class","commit-label-bkg"),d=o.append("text").attr("x",n).attr("y",a.y+25).attr("class","commit-label").text(r.id),h=(s=d.node())==null?void 0:s.getBBox();if(h&&(c.attr("x",a.posWithOffset-h.width/2-L).attr("y",a.y+13.5).attr("width",h.width+2*L).attr("height",h.height+2*L),x==="TB"||x==="BT"?(c.attr("x",a.x-(h.width+4*B+5)).attr("y",a.y-12),d.attr("x",a.x-(h.width+4*B)).attr("y",a.y+h.height-12)):d.attr("x",a.posWithOffset-h.width/2),e.rotateCommitLabel))if(x==="TB"||x==="BT")d.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),c.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const f=-7.5-(h.width+10)/25*9.5,y=10+h.width/25*8.5;o.attr("transform","translate("+f+", "+y+") rotate(-45, "+n+", "+a.y+")")}}},"drawCommitLabel"),jr=$((t,r,a,n)=>{var e;if(r.tags.length>0){let s=0,o=0,c=0;const d=[];for(const h of r.tags.reverse()){const f=t.insert("polygon"),y=t.append("circle"),l=t.append("text").attr("y",a.y-16-s).attr("class","tag-label").text(h),g=(e=l.node())==null?void 0:e.getBBox();if(!g)throw new Error("Tag bbox not found");o=Math.max(o,g.width),c=Math.max(c,g.height),l.attr("x",a.posWithOffset-g.width/2),d.push({tag:l,hole:y,rect:f,yOffset:s}),s+=20}for(const{tag:h,hole:f,rect:y,yOffset:l}of d){const g=c/2,u=a.y-19.2-l;if(y.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${n-o/2-B/2},${u+L}
|
|
3
3
|
${n-o/2-B/2},${u-L}
|
|
4
4
|
${a.posWithOffset-o/2-B},${u-g-L}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{_ as c}from"./BS966b0P.js";import{_}from"./CBge6eLY.js";import{d as g,c as d,a as e,b as x,e as n,w as a,t as m,f as s,u as i,o as p,_ as v}from"./DbehhcO7.js";import{_ as r}from"./339BCoyy.js";const b={class:"p-2 flex flex-col items-center justify-center h-full"},k={key:0,class:"font-medium text-xl pt-2"},B={class:"text-muted-foreground text-sm"},C={class:"flex items-center pt-3 text-muted-foreground gap-0.5 text-sm"},y={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},N={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},V={class:"flex items-center pt-1 text-muted-foreground gap-0.5 text-sm"},A=g({__name:"WorkspaceEmptyState",props:{title:{default:void 0},description:{default:"Click on a database table from the sidebar to begin"}},setup(w){return(l,t)=>{const f=_,u=c,o=v;return p(),d("div",b,[e(u,{class:"rounded-2xl size-40"},{default:a(()=>[e(f,{src:"/logo.png",alt:"@unovue"})]),_:1}),l.title?(p(),d("div",k,m(l.title),1)):x("",!0),n("div",B,[s(m(l.description)+" ",1),e(o,{name:"hugeicons:artificial-intelligence-08",class:"size-4 min-w-4"})]),n("div",C,[e(o,{name:"hugeicons:settings-01"}),t[1]||(t[1]=s(" Open setting ")),e(i(r),{class:"pl-2"},{default:a(()=>t[0]||(t[0]=[s("(⌘,)")])),_:1})]),n("div",y,[e(o,{name:"hugeicons:command"}),t[3]||(t[3]=s(" Command Palette ")),e(i(r),{class:"pl-2"},{default:a(()=>t[2]||(t[2]=[s("(⌘K or ⌘P)")])),_:1})]),n("div",N,[e(o,{name:"hugeicons:sidebar-left"}),t[5]||(t[5]=s(" Toggle left sidebar ")),e(i(r),{class:"pl-2"},{default:a(()=>t[4]||(t[4]=[s("(⌘B)")])),_:1})]),n("div",V,[e(o,{name:"hugeicons:sidebar-right"}),t[7]||(t[7]=s(" Toggle right sidebar ")),e(i(r),{class:"pl-2"},{default:a(()=>t[6]||(t[6]=[s("(⌘⌥B)")])),_:1})])])}}});export{A as _};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as r,a0 as
|
|
1
|
+
import{d as r,a0 as d,aa as i,r as p,q as o,o as l,w as n,E as u,u as e,ab as _,n as c,p as f}from"./DbehhcO7.js";const[R,v]=i("AvatarRoot");var h=r({__name:"AvatarRoot",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){return d(),v({imageLoadingStatus:p("idle")}),(a,t)=>(l(),o(e(_),{"as-child":a.asChild,as:a.as},{default:n(()=>[u(a.$slots,"default")]),_:3},8,["as-child","as"]))}}),m=h;const x=r({__name:"Avatar",props:{class:{}},setup(s){const a=s;return(t,C)=>(l(),o(e(m),{"data-slot":"avatar",class:c(e(f)("relative flex size-8 shrink-0 overflow-hidden rounded-full",a.class))},{default:n(()=>[u(t.$slots,"default")]),_:3},8,["class"]))}});export{x as _,R as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{S as ee,d as ne,
|
|
1
|
+
import{S as ee,d as ne,c as O,o as v,n as ve,e as f,q as S,b as q,a as n,w as t,u as e,J as k,N as pe,f as u,_ as b,L as R,O as P,V as ge,a$ as _e,ad as Ce,r as c,i as C,G as Q,b0 as be,b1 as Se,b2 as ye,b3 as he,b4 as we,b5 as $e,b6 as xe,b7 as ke,l as K,b8 as A,b9 as G,ba as H,t as Re,bb as j,bc as J,bd as Y,be as Z,bf as Pe,bg as W,ae as ze,bh as De,F as Te,K as qe}from"./DbehhcO7.js";import{_ as Fe}from"./DL1qmlP8.js";import{s as Oe}from"./CYm7TuhP.js";import{g as F,a as X}from"./COAycMg4.js";import{_ as Me,f as Ne}from"./DOuNj3Jn.js";import{_ as Ue}from"./339BCoyy.js";import{m as Be}from"./ymlmmOzU.js";import{u as Ee}from"./dDyWVWO8.js";import"./BKh6DDUh.js";import"./BJMwGHo7.js";const Ie=w=>ee.of([{key:"Ctrl-s",mac:"Cmd-s",run:g=>{const m=g.state.doc.toString();return w(m),!0},preventDefault:!0}]),Le={class:ve(["flex items-center justify-between p-1 rounded-md bg-muted"])},Ve={class:"flex items-center gap-1"},Qe={key:0,class:"text-xs text-muted-foreground"},Ke=ne({__name:"FunctionControlBar",props:{hasChanges:{type:Boolean},isSaving:{type:Boolean}},emits:["onPreview","onSave","onDiscard","onReload"],setup(w,{emit:g}){const m=g;return(d,s)=>{const i=pe,_=Ue;return v(),O("div",Le,[f("div",Ve,[d.hasChanges?(v(),S(e(P),{key:0},{default:t(()=>[n(e(k),{"as-child":""},{default:t(()=>[f("div",null,[n(i,{variant:"outline",size:"xxs",disabled:d.isSaving,onClick:s[0]||(s[0]=r=>m("onPreview"))},{default:t(()=>[n(e(b),{name:"lucide:file-search",class:"size-4"}),s[4]||(s[4]=u(" Preview changes "))]),_:1},8,["disabled"])])]),_:1}),n(e(R),null,{default:t(()=>s[5]||(s[5]=[f("p",null,"Preview SQL changes before saving",-1)])),_:1})]),_:1})):q("",!0),n(e(P),null,{default:t(()=>[n(e(k),{"as-child":""},{default:t(()=>[f("div",null,[n(i,{variant:"outline",size:"xxs",disabled:!d.hasChanges||d.isSaving,onClick:s[1]||(s[1]=r=>m("onSave"))},{default:t(()=>[d.isSaving?(v(),S(e(b),{key:0,name:"hugeicons:loading-03",class:"size-4 animate-spin"})):(v(),S(e(b),{key:1,name:"lucide:save",class:"size-4"})),s[7]||(s[7]=u(" Save ")),n(_,null,{default:t(()=>s[6]||(s[6]=[u("⌘S")])),_:1})]),_:1},8,["disabled"])])]),_:1}),n(e(R),null,{default:t(()=>[s[8]||(s[8]=f("p",null,"Save routine changes",-1)),d.hasChanges?q("",!0):(v(),O("p",Qe," No changes to save "))]),_:1})]),_:1}),n(e(P),null,{default:t(()=>[n(e(k),{"as-child":""},{default:t(()=>[f("div",null,[n(i,{variant:"outline",size:"xxs",disabled:d.isSaving,onClick:s[2]||(s[2]=r=>m("onReload"))},{default:t(()=>[n(e(b),{name:"lucide:refresh-cw",class:"size-4"}),s[10]||(s[10]=u(" Reload ")),n(_,null,{default:t(()=>s[9]||(s[9]=[u("⌘R")])),_:1})]),_:1},8,["disabled"])])]),_:1}),n(e(R),null,{default:t(()=>s[11]||(s[11]=[f("p",null,"Reload latest version from database",-1)])),_:1})]),_:1}),d.hasChanges?(v(),S(e(P),{key:1},{default:t(()=>[n(e(k),{"as-child":""},{default:t(()=>[f("div",null,[n(i,{variant:"outline",size:"xxs",disabled:d.isSaving,onClick:s[3]||(s[3]=r=>m("onDiscard"))},{default:t(()=>[n(e(b),{name:"lucide:undo-2",class:"size-4"}),s[12]||(s[12]=u(" discard changes "))]),_:1},8,["disabled"])])]),_:1}),n(e(R),null,{default:t(()=>s[13]||(s[13]=[f("p",null,"Discard changes",-1)])),_:1})]),_:1})):q("",!0)])])}}}),Ae={class:"flex flex-col h-full p-1"},Ge={class:"flex flex-col h-full border rounded-md"},He={class:"h-full flex flex-col overflow-y-auto relative"},sn=ne({__name:"FunctionDetail",props:{functionId:{},connectionId:{}},setup(w){const g=w,m=ge(),d=_e(),{activeSchema:s}=Ce(d),i=c(""),_=c(""),r=c(!1),M=c(""),N=c("Query error!"),$=c(!1),y=c(!1),h=c(""),ae=C(()=>F(i.value)),te=C(()=>F(_.value)),z=C(()=>ae.value!==te.value),se=C(()=>{const o=X(h.value);return o?`${o} update preview`:"Routine update preview"}),oe=C(()=>{var o;return Be({schemas:d.activeSchemas,defaultSchemaName:(o=s.value)==null?void 0:o.name})}),le=new be,U=C(()=>g.connectionId?m.connections.find(o=>o.id===g.connectionId):m.selectedConnection),B=C(()=>({functionId:g.functionId,...Q(U.value)})),{status:ie,refresh:E}=Ee("/api/functions/definition",{method:"POST",body:B,onResponse:o=>{if(typeof o.response._data=="string"){const a=o.response._data||"";i.value=a,_.value=a}},watch:[B]},"$cS7qZacQ7d"),D=(o,a)=>{N.value=o,M.value=a,$.value=!0},I=()=>{if(!z.value){D("No changes to save","The routine definition already matches the loaded version.");return}const o=F(i.value);if(!X(o)){D("Invalid routine definition","Preview requires a valid CREATE OR REPLACE FUNCTION or PROCEDURE statement.");return}return o},ue=()=>{if(r.value)return;const o=I();o&&(h.value=o,y.value=!0)},L=async(o=h.value)=>{var a;if(!(!o||r.value)){r.value=!0;try{const l=await $fetch("/api/functions/update",{method:"POST",body:{...Q(U.value),functionDefinition:o}});_.value=i.value,y.value=!1,qe.success("Routine saved",{description:`Updated successfully in ${(l==null?void 0:l.queryTime)??0}ms`})}catch(l){y.value=!1,D("Save failed",((a=l==null?void 0:l.data)==null?void 0:a.message)||(l==null?void 0:l.message)||"Failed to save routine.")}finally{r.value=!1}}},V=async()=>{if(r.value)return;const o=I();o&&(h.value=o,await L(o))},re=()=>{i.value=_.value},x=c(!1),T=async()=>{z.value?x.value=!0:await E()},de=async()=>{x.value=!1,await E()},fe=[Ie(o=>{i.value=o,V()}),Oe(o=>Ne(o,{language:"postgresql",keywordCase:"upper"})),ee.of([{key:"Mod-i",run:he},{key:"Tab",run:we},{key:"Mod-r",mac:"Cmd-r",run:()=>(T(),!0),preventDefault:!0},{key:"F5",run:()=>(T(),!0),preventDefault:!0}]),le.of($e({dialect:xe.PostgreSQLHighlightDialect,upperCaseKeywords:!0,keywordCompletion:ke,schema:oe.value.schema})),...Se(),ye];return(o,a)=>{const l=b,me=Fe,ce=ze;return v(),O(Te,null,[n(Me,{open:e($),"onUpdate:open":a[0]||(a[0]=p=>K($)?$.value=p:null),title:e(N),message:e(M)},null,8,["open","title","message"]),n(e(W),{open:e(y),"onUpdate:open":a[2]||(a[2]=p=>y.value=p)},{default:t(()=>[n(e(A),{size:"preview"},{default:t(()=>[n(e(G),null,{default:t(()=>[n(e(H),{class:"flex items-center text-base font-medium"},{default:t(()=>[n(l,{name:"lucide:file-search",class:"size-4 mr-2"}),u(" "+Re(e(se)),1)]),_:1}),n(e(j),null,{default:t(()=>a[5]||(a[5]=[u(" Review the exact SQL that will be submitted. The routine is not updated until you confirm this save. ")])),_:1})]),_:1}),n(me,{code:e(h),"show-copy-button":"","max-height":"24rem"},null,8,["code"]),n(e(J),null,{default:t(()=>[n(e(Y),{disabled:e(r)},{default:t(()=>a[6]||(a[6]=[u("Cancel")])),_:1},8,["disabled"]),n(e(Z),{class:"gap-2",onClick:a[1]||(a[1]=Pe(p=>L(),["prevent"]))},{default:t(()=>[e(r)?(v(),S(l,{key:0,name:"hugeicons:loading-03",class:"size-4 animate-spin"})):(v(),S(l,{key:1,name:"lucide:save",class:"size-4"})),a[7]||(a[7]=u(" Save to database "))]),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),n(e(W),{open:e(x),"onUpdate:open":a[3]||(a[3]=p=>x.value=p)},{default:t(()=>[n(e(A),null,{default:t(()=>[n(e(G),null,{default:t(()=>[n(e(H),{class:"flex items-center text-base font-medium text-destructive"},{default:t(()=>[n(l,{name:"lucide:alert-triangle",class:"size-5 mr-2"}),a[8]||(a[8]=u(" Discard Unsaved Changes? "))]),_:1}),n(e(j),null,{default:t(()=>a[9]||(a[9]=[u(" You have unsaved changes in your editor. Reloading will fetch the latest definition from the database and discard all your local modifications. This action cannot be undone. ")])),_:1})]),_:1}),n(e(J),null,{default:t(()=>[n(e(Y),null,{default:t(()=>a[10]||(a[10]=[u("Cancel")])),_:1}),n(e(Z),{variant:"destructive",onClick:de},{default:t(()=>a[11]||(a[11]=[u(" Reload and Discard ")])),_:1})]),_:1})]),_:1})]),_:1},8,["open"]),f("div",Ae,[f("div",Ge,[n(Ke,{"has-changes":e(z),"is-saving":e(r),onOnPreview:ue,onOnSave:V,onOnDiscard:re,onOnReload:T},null,8,["has-changes","is-saving"]),f("div",He,[n(ce,{visible:e(ie)==="pending"||e(r)},null,8,["visible"]),n(De,{modelValue:e(i),"onUpdate:modelValue":a[4]||(a[4]=p=>K(i)?i.value=p:null),extensions:fe,disabled:!1},null,8,["modelValue"])])])])],64)}}});export{sn as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as e,b as r,a,S as s}from"./DyLnyCs4.js";import{_ as i}from"./ndyknmtb.js";import"./BDw-ivE-.js";import"./BjfaOtB-.js";import"./DbehhcO7.js";var p={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{p as diagram};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const t=`---
|
|
2
|
+
version: '1.1.9'
|
|
3
|
+
date: '2026-06-23'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# 🎉 v1.1.9 Changelog
|
|
7
|
+
|
|
8
|
+
## ✨ New Features
|
|
9
|
+
|
|
10
|
+
- **Tab Keyboard Shortcuts**: Added keyboard shortcut support to easily manage tabs:
|
|
11
|
+
- Press \`⌘W\` (or \`Ctrl+W\`) to close the active tab.
|
|
12
|
+
- Press \`⌘⌥T\` (or \`Ctrl+Alt+T\`) to close all other tabs.
|
|
13
|
+
- **Tab Context Menu Polish**: Updated shortcut hints in the tab context menu, mapping "Close other" to the new \`⌘⌥T\` shortcut.
|
|
14
|
+
|
|
15
|
+
## 🔧 Improvements & Fixes
|
|
16
|
+
|
|
17
|
+
- **Toggle Right Sidebar Shortcut**: Updated the shortcut to toggle the right sidebar from \`⌘⇧B\` to \`⌘⌥B\` to avoid potential browser/system conflict and ensure layout consistency.
|
|
18
|
+
`;export{t as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{_ as a,e as w,l as x}from"./
|
|
1
|
+
import{_ as a,e as w,l as x}from"./ndyknmtb.js";var d=a((e,t,i,o)=>{e.attr("class",i);const{width:r,height:h,x:n,y:c}=u(e,t);w(e,h,r,o);const s=l(n,c,r,h,t);e.attr("viewBox",s),x.debug(`viewBox configured: ${s} with padding: ${t}`)},"setupViewPortForSVG"),u=a((e,t)=>{var o;const i=((o=e.node())==null?void 0:o.getBBox())||{width:0,height:0,x:0,y:0};return{width:i.width+t*2,height:i.height+t*2,x:i.x,y:i.y}},"calculateDimensionsWithPadding"),l=a((e,t,i,o,r)=>`${e-r} ${t-r} ${i} ${o}`,"createViewBox");export{d as s};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as t,U as a,t as s,
|
|
1
|
+
import{d as t,U as a,t as s,u as n}from"./DbehhcO7.js";const c=t({__name:"index",setup(r){const e=a();return(o,i)=>s(n(e).activeTab)}});export{c as default};
|