orcaq 1.1.2 → 1.1.3

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.
Files changed (127) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BJCrbji-.js → 5oARMrld.js} +1 -1
  3. package/.output/public/_nuxt/{kvtnkChG.js → 9sDqz0uT.js} +1 -1
  4. package/.output/public/_nuxt/{Bmgr9uz4.js → B-4cXhNx.js} +1 -1
  5. package/.output/public/_nuxt/{DpT8FO1Q.js → BC6CdfCG.js} +1 -1
  6. package/.output/public/_nuxt/{Ca0KO9Xq.js → BCAMWuzu.js} +1 -1
  7. package/.output/public/_nuxt/{Bq47tjcm.js → BG-rJefG.js} +1 -1
  8. package/.output/public/_nuxt/{BpvGVfME.js → BKFPmrcv.js} +1 -1
  9. package/.output/public/_nuxt/{COHOh4Oe.js → BMLhg7hE.js} +1 -1
  10. package/.output/public/_nuxt/{atdCACH-.js → BYOPXIhP.js} +1 -1
  11. package/.output/public/_nuxt/{B46blMXm.js → BYxQJ0gE.js} +1 -1
  12. package/.output/public/_nuxt/{BrNfge84.js → BZ4ThSRp.js} +1 -1
  13. package/.output/public/_nuxt/{Dq1JM9WZ.js → BZmDBfmV.js} +1 -1
  14. package/.output/public/_nuxt/{DHAL8jJG.js → B_ERKujF.js} +4 -4
  15. package/.output/public/_nuxt/{CycELG5y.js → BccuQbKA.js} +1 -1
  16. package/.output/public/_nuxt/{B6MkNyZd.js → BcyZ-eCi.js} +1 -1
  17. package/.output/public/_nuxt/{63YtjFEq.js → BdZsZgcB.js} +1 -1
  18. package/.output/public/_nuxt/{S1qa1a4x.js → BigePTMZ.js} +1 -1
  19. package/.output/public/_nuxt/{BL__uYa3.js → BkN-uAef.js} +1 -1
  20. package/.output/public/_nuxt/{BWZ7atse.js → BmAp-sfn.js} +1 -1
  21. package/.output/public/_nuxt/{BogEzQi9.js → BqHKqsJ5.js} +3 -3
  22. package/.output/public/_nuxt/{DpEV6S2O.js → BseVuOZ1.js} +1 -1
  23. package/.output/public/_nuxt/{B2IKcIj2.js → BtuY54_l.js} +1 -1
  24. package/.output/public/_nuxt/{B8TrrBEb.js → Buh0pI3n.js} +1 -1
  25. package/.output/public/_nuxt/{CAnr3OhD.js → BzVvHKKC.js} +1 -1
  26. package/.output/public/_nuxt/{DuCDilAk.js → BzywwPw6.js} +1 -1
  27. package/.output/public/_nuxt/BzzgEvr9.js +7 -0
  28. package/.output/public/_nuxt/{AymhMj9v.js → C-I81xfB.js} +1 -1
  29. package/.output/public/_nuxt/{DAr5YiBT.js → C-Pa1rIR.js} +1 -1
  30. package/.output/public/_nuxt/{CMkzSwnO.js → C-pX1zRI.js} +1 -1
  31. package/.output/public/_nuxt/{ioXB9E2w.js → C0vscAQB.js} +1 -1
  32. package/.output/public/_nuxt/C4FrpL8k.js +1 -0
  33. package/.output/public/_nuxt/{Cq-MDPLE.js → C4zYnWdF.js} +1 -1
  34. package/.output/public/_nuxt/{C_7gtl40.js → C9kgALYc.js} +1 -1
  35. package/.output/public/_nuxt/{Oe2GG0Lt.js → CCmd8DpQ.js} +1 -1
  36. package/.output/public/_nuxt/{DsmBazLf.js → CGq9Twnj.js} +1 -1
  37. package/.output/public/_nuxt/{BEyCol50.js → CHMlsxJw.js} +1 -1
  38. package/.output/public/_nuxt/{Y1gXUmjt.js → CLQzuV82.js} +1 -1
  39. package/.output/public/_nuxt/{BJVPtt2X.js → CL_1HDtg.js} +1 -1
  40. package/.output/public/_nuxt/{DVnDb6ua.js → CRqiHVA4.js} +1 -1
  41. package/.output/public/_nuxt/{ByibjLZn.js → CS4EJV3B.js} +1 -1
  42. package/.output/public/_nuxt/{Bf6Q3Zl5.js → CSExCj8O.js} +1 -1
  43. package/.output/public/_nuxt/{MeLWmO7R.js → CY_CG0AU.js} +1 -1
  44. package/.output/public/_nuxt/{D-9vaM6z.js → CbHZwHBV.js} +1 -1
  45. package/.output/public/_nuxt/{MW5K_zef.js → Cbo6GmdE.js} +1 -1
  46. package/.output/public/_nuxt/{dWu56FdP.js → Cf460dGA.js} +1 -1
  47. package/.output/public/_nuxt/{DcCF9IZB.js → CfseWBL0.js} +1 -1
  48. package/.output/public/_nuxt/{qzrMNYut.js → Ch0I4juX.js} +1 -1
  49. package/.output/public/_nuxt/Chvs1m1n.js +1 -0
  50. package/.output/public/_nuxt/{CHEpbbGc.js → Chx1IK9D.js} +1 -1
  51. package/.output/public/_nuxt/{ByiJDSw8.js → CjpXgncp.js} +1 -1
  52. package/.output/public/_nuxt/{BpUSbMUb.js → CkjXKCQH.js} +1 -1
  53. package/.output/public/_nuxt/{C3ZBsVV_.js → Ckry8tuC.js} +2 -2
  54. package/.output/public/_nuxt/{CsRSZpa6.js → CmOZ0DCP.js} +1 -1
  55. package/.output/public/_nuxt/{Bq7OeLM1.js → CmjR7OTc.js} +1 -1
  56. package/.output/public/_nuxt/{CDJKw_ak.js → Co7e2XML.js} +1 -1
  57. package/.output/public/_nuxt/{BzvSm28k.js → CqkctA6I.js} +1 -1
  58. package/.output/public/_nuxt/{DEZMnZ2r.js → CtB2-SFY.js} +1 -1
  59. package/.output/public/_nuxt/{dNPwafbq.js → CtCx-4nJ.js} +1 -1
  60. package/.output/public/_nuxt/{xOD4Ev56.js → CtkhwZY7.js} +1 -1
  61. package/.output/public/_nuxt/Cty7uMrC.js +1 -0
  62. package/.output/public/_nuxt/{C2XHqDOf.js → CvFjsYJZ.js} +1 -1
  63. package/.output/public/_nuxt/{D4pAW_0T.js → Czr647QE.js} +1 -1
  64. package/.output/public/_nuxt/{BcsKoAPU.js → D0lW43G8.js} +28 -28
  65. package/.output/public/_nuxt/{DDebxXP-.js → D28ykMUi.js} +1 -1
  66. package/.output/public/_nuxt/{Ci5B19-c.js → DA4Xn6lm.js} +1 -1
  67. package/.output/public/_nuxt/{BWebIWit.js → DChDHsIe.js} +1 -1
  68. package/.output/public/_nuxt/{DSaBCmOg.js → DJBO_9pO.js} +1 -1
  69. package/.output/public/_nuxt/{DPIEiNwW.js → DJXB1Li8.js} +1 -1
  70. package/.output/public/_nuxt/{DJH-4SVI.js → DKLk0T0H.js} +1 -1
  71. package/.output/public/_nuxt/{C6dIAdHr.js → DLBsdU7G.js} +1 -1
  72. package/.output/public/_nuxt/{BtyzMl9p.js → DOAixkpJ.js} +1 -1
  73. package/.output/public/_nuxt/{BoMjapT5.js → DPq8O9CC.js} +1 -1
  74. package/.output/public/_nuxt/{Bmx1kTaZ.js → DQdA5Twt.js} +1 -1
  75. package/.output/public/_nuxt/{DGvAu532.js → DRh-06Hb.js} +1 -1
  76. package/.output/public/_nuxt/{JOg_XIAv.js → DTvJImVU.js} +1 -1
  77. package/.output/public/_nuxt/{C7BQpy74.js → DVkCRFXi.js} +1 -1
  78. package/.output/public/_nuxt/{BjqbQLK3.js → DX8ecA59.js} +1 -1
  79. package/.output/public/_nuxt/DakKehZj.js +1 -0
  80. package/.output/public/_nuxt/{BoIj4dtd.js → Db3rTgnd.js} +1 -1
  81. package/.output/public/_nuxt/{BRFPdiIh.js → DfyynWBR.js} +1 -1
  82. package/.output/public/_nuxt/{B5WGo5x7.js → DgJOougY.js} +1 -1
  83. package/.output/public/_nuxt/DkQCknMw.js +1 -0
  84. package/.output/public/_nuxt/{Sf02B6Pt.js → DpBeiFQV.js} +1 -1
  85. package/.output/public/_nuxt/{sk7V7xQl.js → DrdbRRXx.js} +1 -1
  86. package/.output/public/_nuxt/{CS9hqyP3.js → Dtl3qje7.js} +1 -1
  87. package/.output/public/_nuxt/{DNoTlUiY.js → Du5Ka6uI.js} +1 -1
  88. package/.output/public/_nuxt/{B73IHAoF.js → Dunt8-TF.js} +1 -1
  89. package/.output/public/_nuxt/{CrNLwdoE.js → DvWEWtFg.js} +1 -1
  90. package/.output/public/_nuxt/{DkD29_YA.js → KynNdNgX.js} +1 -1
  91. package/.output/public/_nuxt/{BqU89KuH.js → MWrJVKEf.js} +2 -2
  92. package/.output/public/_nuxt/{DMmjWR_K.js → NYpsF1lW.js} +1 -1
  93. package/.output/public/_nuxt/{L2I3LmpB.js → Nof0nVJ6.js} +1 -1
  94. package/.output/public/_nuxt/{BTYBVtfa.js → Ohrg3hU7.js} +1 -1
  95. package/.output/public/_nuxt/{CerLmMsC.js → Rrce0BXL.js} +3 -3
  96. package/.output/public/_nuxt/{xp7rFxcm.js → VNOocds9.js} +1 -1
  97. package/.output/public/_nuxt/Y-MEKhtd.js +1 -0
  98. package/.output/public/_nuxt/{CSQ0xnqv.js → YdOCcCRS.js} +1 -1
  99. package/.output/public/_nuxt/bYQCSC5-.js +1 -0
  100. package/.output/public/_nuxt/{vhkvHdfO.js → bkzIFcLw.js} +1 -1
  101. package/.output/public/_nuxt/builds/latest.json +1 -1
  102. package/.output/public/_nuxt/builds/meta/ad11b978-8fdd-4bb2-9b38-1d6fe93f994e.json +1 -0
  103. package/.output/public/_nuxt/{FDw04QOj.js → eOeO5uM0.js} +1 -1
  104. package/.output/public/_nuxt/{BPACuoI0.js → g9ZMnTLJ.js} +1 -1
  105. package/.output/public/_nuxt/{Cnfx1zWl.js → hIbRoJ89.js} +1 -1
  106. package/.output/public/_nuxt/{8tyEaimf.js → j23gQsG7.js} +1 -1
  107. package/.output/public/_nuxt/klVlxnpt.js +1 -0
  108. package/.output/public/_nuxt/{DWqOZJe7.js → qRiDKEr7.js} +1 -1
  109. package/.output/public/_nuxt/{iNy-Nl0_.js → syq5mCJi.js} +1 -1
  110. package/.output/public/_nuxt/{COq7mAG7.js → v41yYOa9.js} +1 -1
  111. package/.output/public/_nuxt/{B9uki8o2.js → vaJvtND9.js} +1 -1
  112. package/.output/public/_nuxt/{wRAs0MDn.js → wodl4bLW.js} +1 -1
  113. package/.output/server/chunks/build/client.manifest.mjs +675 -675
  114. package/.output/server/chunks/build/client.manifest.mjs.map +1 -1
  115. package/.output/server/chunks/nitro/nitro.mjs +635 -635
  116. package/.output/server/package.json +1 -1
  117. package/package.json +1 -1
  118. package/.output/public/_nuxt/BS-LtKx4.js +0 -1
  119. package/.output/public/_nuxt/BTheloyh.js +0 -1
  120. package/.output/public/_nuxt/Bj7ctTfH.js +0 -1
  121. package/.output/public/_nuxt/BpLDGvqy.js +0 -1
  122. package/.output/public/_nuxt/CtWq1MER.js +0 -7
  123. package/.output/public/_nuxt/Cww9dXBK.js +0 -1
  124. package/.output/public/_nuxt/DfNTLojg.js +0 -1
  125. package/.output/public/_nuxt/M6bBaUHa.js +0 -1
  126. package/.output/public/_nuxt/_qKPTuua.js +0 -1
  127. package/.output/public/_nuxt/builds/meta/7c171291-8bbd-4c4c-8904-0afae065b82e.json +0 -1
@@ -1,4 +1,4 @@
1
- import{p as V}from"./DJH-4SVI.js";import{I as X}from"./B9uki8o2.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"./DHAL8jJG.js";import{p as lr}from"./MeLWmO7R.js";import"./BcsKoAPU.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"./DKLk0T0H.js";import{I as X}from"./vaJvtND9.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"./B_ERKujF.js";import{p as lr}from"./CY_CG0AU.js";import"./D0lW43G8.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}
@@ -1,4 +1,4 @@
1
- import{g as Ie}from"./Ci5B19-c.js";import{aI as Ne,aJ as Be,aK as Ce,aL as te,aM as ee,aN as Rt,aO as Oe,aP as Ae,aQ as re,aR as kt,aS as ae,aT as dt,aU as Re,aV as ze,aW as Me,aX as je,aY as Fe,aZ as Pe,a_ as We,_ as u,H as lt,d as O,e as Ye,l as v,A as Ke,C as He,c as j,a$ as Ue,a9 as Xe,aa as Ve,a6 as Ge,b0 as Y,az as Tt,b1 as st,at as $e,u as it,k as Ze,b2 as qe,i as zt,b3 as Mt,b4 as Je}from"./DHAL8jJG.js";import{G as Qe}from"./qsFoMdT2.js";import{c as tr}from"./BS-LtKx4.js";import"./BcsKoAPU.js";function er(e,t){for(var a=-1,i=e==null?0:e.length;++a<i&&t(e[a],a,e)!==!1;);return e}function se(e){return Ce(e)?Ne(e):Be(e)}function rr(e,t){return e&&te(t,se(t),e)}function ar(e,t){for(var a=-1,i=e==null?0:e.length,c=0,s=[];++a<i;){var r=e[a];t(r,a,e)&&(s[c++]=r)}return s}function sr(){return[]}var ir=Object.prototype,nr=ir.propertyIsEnumerable,jt=Object.getOwnPropertySymbols,ie=jt?function(e){return e==null?[]:(e=Object(e),ar(jt(e),function(t){return nr.call(e,t)}))}:sr;function cr(e,t){return te(e,ie(e),t)}function lr(e,t){for(var a=-1,i=t.length,c=e.length;++a<i;)e[c+a]=t[a];return e}function or(e,t,a){var i=t(e);return ee(e)?i:lr(i,a(e))}function hr(e){return or(e,se,ie)}var gr=Object.prototype,ur=gr.hasOwnProperty;function dr(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&ur.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function pr(e,t){var a=e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var fr=/\w*$/;function yr(e){var t=new e.constructor(e.source,fr.exec(e));return t.lastIndex=e.lastIndex,t}var Ft=Rt?Rt.prototype:void 0,Pt=Ft?Ft.valueOf:void 0;function xr(e){return Pt?Object(Pt.call(e)):{}}var br="[object Boolean]",wr="[object Date]",mr="[object Map]",Sr="[object Number]",Lr="[object RegExp]",vr="[object Set]",Er="[object String]",_r="[object Symbol]",kr="[object ArrayBuffer]",Tr="[object DataView]",Dr="[object Float32Array]",Ir="[object Float64Array]",Nr="[object Int8Array]",Br="[object Int16Array]",Cr="[object Int32Array]",Or="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Rr="[object Uint16Array]",zr="[object Uint32Array]";function Mr(e,t,a){var i=e.constructor;switch(t){case kr:return Ae(e);case br:case wr:return new i(+e);case Tr:return pr(e);case Dr:case Ir:case Nr:case Br:case Cr:case Or:case Ar:case Rr:case zr:return Oe(e,a);case mr:return new i;case Sr:case Er:return new i(e);case Lr:return yr(e);case vr:return new i;case _r:return xr(e)}}var jr="[object Map]";function Fr(e){return re(e)&&kt(e)==jr}var Wt=dt&&dt.isMap,Pr=Wt?ae(Wt):Fr,Wr="[object Set]";function Yr(e){return re(e)&&kt(e)==Wr}var Yt=dt&&dt.isSet,Kr=Yt?ae(Yt):Yr,Hr=1,ne="[object Arguments]",Ur="[object Array]",Xr="[object Boolean]",Vr="[object Date]",Gr="[object Error]",ce="[object Function]",$r="[object GeneratorFunction]",Zr="[object Map]",qr="[object Number]",le="[object Object]",Jr="[object RegExp]",Qr="[object Set]",ta="[object String]",ea="[object Symbol]",ra="[object WeakMap]",aa="[object ArrayBuffer]",sa="[object DataView]",ia="[object Float32Array]",na="[object Float64Array]",ca="[object Int8Array]",la="[object Int16Array]",oa="[object Int32Array]",ha="[object Uint8Array]",ga="[object Uint8ClampedArray]",ua="[object Uint16Array]",da="[object Uint32Array]",B={};B[ne]=B[Ur]=B[aa]=B[sa]=B[Xr]=B[Vr]=B[ia]=B[na]=B[ca]=B[la]=B[oa]=B[Zr]=B[qr]=B[le]=B[Jr]=B[Qr]=B[ta]=B[ea]=B[ha]=B[ga]=B[ua]=B[da]=!0;B[Gr]=B[ce]=B[ra]=!1;function gt(e,t,a,i,c,s){var r,n=t&Hr;if(r!==void 0)return r;if(!Re(e))return e;var l=ee(e);if(l)return r=dr(e),ze(e,r);var y=kt(e),h=y==ce||y==$r;if(Me(e))return je(e,n);if(y==le||y==ne||h&&!c)return r=h?{}:Fe(e),cr(e,rr(r,e));if(!B[y])return c?e:{};r=Mr(e,y,n),s||(s=new Pe);var f=s.get(e);if(f)return f;s.set(e,r),Kr(e)?e.forEach(function(w){r.add(gt(w,t,a,w,e,s))}):Pr(e)&&e.forEach(function(w,_){r.set(_,gt(w,t,a,_,e,s))});var m=hr,x=l?void 0:m(e);return er(x||e,function(w,_){x&&(_=w,w=e[_]),We(r,_,gt(w,t,a,_,e,s))}),r}var pa=4;function fa(e){return gt(e,pa)}var St=function(){var e=u(function(I,b,d,p){for(d=d||{},p=I.length;p--;d[I[p]]=b);return d},"o"),t=[1,15],a=[1,7],i=[1,13],c=[1,14],s=[1,19],r=[1,16],n=[1,17],l=[1,18],y=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],m=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],S={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(b,d,p,L,E,o,k){var g=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[g-1]),L.setHierarchy(o[g-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[g]),typeof o[g].length=="number"?this.$=o[g]:this.$=[o[g]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[g-1]),this.$=[o[g-1]].concat(o[g]);break;case 14:L.getLogger().debug("Rule: link: ",o[g],b),this.$={edgeTypeStr:o[g],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[g-3],o[g-1],o[g]),this.$={edgeTypeStr:o[g],label:o[g-1]};break;case 18:const T=parseInt(o[g]),D=L.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[g-2],o[g-1],o[g]," typestr: ",o[g-1].edgeTypeStr);const H=L.edgeStrToEdgeData(o[g-1].edgeTypeStr);this.$=[{id:o[g-2].id,label:o[g-2].label,type:o[g-2].type,directions:o[g-2].directions},{id:o[g-2].id+"-"+o[g].id,start:o[g-2].id,end:o[g].id,label:o[g-1].label,type:"edge",directions:o[g].directions,arrowTypeEnd:H,arrowTypeStart:"arrow_open"},{id:o[g].id,label:o[g].label,type:L.typeStr2Type(o[g].typeStr),directions:o[g].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[g-1],o[g]),this.$={id:o[g-1].id,label:o[g-1].label,type:L.typeStr2Type(o[g-1].typeStr),directions:o[g-1].directions,widthInColumns:parseInt(o[g],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[g]),this.$={id:o[g].id,label:o[g].label,type:L.typeStr2Type(o[g].typeStr),directions:o[g].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[g]),this.$={type:"column-setting",columns:o[g]==="auto"?-1:parseInt(o[g])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[g-2],o[g-1]),L.generateId(),this.$={...o[g-2],type:"composite",children:o[g-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[g-2],o[g-1],o[g]);const P=L.generateId();this.$={id:P,type:"composite",label:"",children:o[g-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[g]),this.$={id:o[g]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[g-1],o[g]),this.$={id:o[g-1],label:o[g].label,typeStr:o[g].typeStr,directions:o[g].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[g]),this.$=[o[g]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[g-1],o[g]),this.$=[o[g-1]].concat(o[g]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[g-2],o[g-1],o[g]),this.$={typeStr:o[g-2]+o[g],label:o[g-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[g-3],o[g-2]," #3:",o[g-1],o[g]),this.$={typeStr:o[g-3]+o[g],label:o[g-2],directions:o[g-1]};break;case 35:case 36:this.$={type:"classDef",id:o[g-1].trim(),css:o[g].trim()};break;case 37:this.$={type:"applyClass",id:o[g-1].trim(),styleClass:o[g].trim()};break;case 38:this.$={type:"applyStyles",id:o[g-1].trim(),stylesStr:o[g].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{8:[1,20]},e(y,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:c,31:s,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:f,16:m}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(w,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(y,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:m,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(h,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(b,d){if(d.recoverable)this.trace(b);else{var p=new Error(b);throw p.hash=d,p}},"parseError"),parse:u(function(b){var d=this,p=[0],L=[],E=[null],o=[],k=this.table,g="",T=0,D=0,H=2,P=1,Q=o.slice.call(arguments,1),R=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);R.setInput(b,U.yy),U.yy.lexer=R,U.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var at=R.yylloc;o.push(at);var Te=R.options&&R.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(X){p.length=p.length-2*X,E.length=E.length-X,o.length=o.length-X}u(De,"popStack");function Ot(){var X;return X=L.pop()||R.lex()||P,typeof X!="number"&&(X instanceof Array&&(L=X,X=L.pop()),X=d.symbols_[X]||X),X}u(Ot,"lex");for(var K,tt,G,bt,et={},ot,J,At,ht;;){if(tt=p[p.length-1],this.defaultActions[tt]?G=this.defaultActions[tt]:((K===null||typeof K>"u")&&(K=Ot()),G=k[tt]&&k[tt][K]),typeof G>"u"||!G.length||!G[0]){var wt="";ht=[];for(ot in k[tt])this.terminals_[ot]&&ot>H&&ht.push("'"+this.terminals_[ot]+"'");R.showPosition?wt="Parse error on line "+(T+1)+`:
1
+ import{g as Ie}from"./DA4Xn6lm.js";import{aI as Ne,aJ as Be,aK as Ce,aL as te,aM as ee,aN as Rt,aO as Oe,aP as Ae,aQ as re,aR as kt,aS as ae,aT as dt,aU as Re,aV as ze,aW as Me,aX as je,aY as Fe,aZ as Pe,a_ as We,_ as u,H as lt,d as O,e as Ye,l as v,A as Ke,C as He,c as j,a$ as Ue,a9 as Xe,aa as Ve,a6 as Ge,b0 as Y,az as Tt,b1 as st,at as $e,u as it,k as Ze,b2 as qe,i as zt,b3 as Mt,b4 as Je}from"./B_ERKujF.js";import{G as Qe}from"./qsFoMdT2.js";import{c as tr}from"./bYQCSC5-.js";import"./D0lW43G8.js";function er(e,t){for(var a=-1,i=e==null?0:e.length;++a<i&&t(e[a],a,e)!==!1;);return e}function se(e){return Ce(e)?Ne(e):Be(e)}function rr(e,t){return e&&te(t,se(t),e)}function ar(e,t){for(var a=-1,i=e==null?0:e.length,c=0,s=[];++a<i;){var r=e[a];t(r,a,e)&&(s[c++]=r)}return s}function sr(){return[]}var ir=Object.prototype,nr=ir.propertyIsEnumerable,jt=Object.getOwnPropertySymbols,ie=jt?function(e){return e==null?[]:(e=Object(e),ar(jt(e),function(t){return nr.call(e,t)}))}:sr;function cr(e,t){return te(e,ie(e),t)}function lr(e,t){for(var a=-1,i=t.length,c=e.length;++a<i;)e[c+a]=t[a];return e}function or(e,t,a){var i=t(e);return ee(e)?i:lr(i,a(e))}function hr(e){return or(e,se,ie)}var gr=Object.prototype,ur=gr.hasOwnProperty;function dr(e){var t=e.length,a=new e.constructor(t);return t&&typeof e[0]=="string"&&ur.call(e,"index")&&(a.index=e.index,a.input=e.input),a}function pr(e,t){var a=e.buffer;return new e.constructor(a,e.byteOffset,e.byteLength)}var fr=/\w*$/;function yr(e){var t=new e.constructor(e.source,fr.exec(e));return t.lastIndex=e.lastIndex,t}var Ft=Rt?Rt.prototype:void 0,Pt=Ft?Ft.valueOf:void 0;function xr(e){return Pt?Object(Pt.call(e)):{}}var br="[object Boolean]",wr="[object Date]",mr="[object Map]",Sr="[object Number]",Lr="[object RegExp]",vr="[object Set]",Er="[object String]",_r="[object Symbol]",kr="[object ArrayBuffer]",Tr="[object DataView]",Dr="[object Float32Array]",Ir="[object Float64Array]",Nr="[object Int8Array]",Br="[object Int16Array]",Cr="[object Int32Array]",Or="[object Uint8Array]",Ar="[object Uint8ClampedArray]",Rr="[object Uint16Array]",zr="[object Uint32Array]";function Mr(e,t,a){var i=e.constructor;switch(t){case kr:return Ae(e);case br:case wr:return new i(+e);case Tr:return pr(e);case Dr:case Ir:case Nr:case Br:case Cr:case Or:case Ar:case Rr:case zr:return Oe(e,a);case mr:return new i;case Sr:case Er:return new i(e);case Lr:return yr(e);case vr:return new i;case _r:return xr(e)}}var jr="[object Map]";function Fr(e){return re(e)&&kt(e)==jr}var Wt=dt&&dt.isMap,Pr=Wt?ae(Wt):Fr,Wr="[object Set]";function Yr(e){return re(e)&&kt(e)==Wr}var Yt=dt&&dt.isSet,Kr=Yt?ae(Yt):Yr,Hr=1,ne="[object Arguments]",Ur="[object Array]",Xr="[object Boolean]",Vr="[object Date]",Gr="[object Error]",ce="[object Function]",$r="[object GeneratorFunction]",Zr="[object Map]",qr="[object Number]",le="[object Object]",Jr="[object RegExp]",Qr="[object Set]",ta="[object String]",ea="[object Symbol]",ra="[object WeakMap]",aa="[object ArrayBuffer]",sa="[object DataView]",ia="[object Float32Array]",na="[object Float64Array]",ca="[object Int8Array]",la="[object Int16Array]",oa="[object Int32Array]",ha="[object Uint8Array]",ga="[object Uint8ClampedArray]",ua="[object Uint16Array]",da="[object Uint32Array]",B={};B[ne]=B[Ur]=B[aa]=B[sa]=B[Xr]=B[Vr]=B[ia]=B[na]=B[ca]=B[la]=B[oa]=B[Zr]=B[qr]=B[le]=B[Jr]=B[Qr]=B[ta]=B[ea]=B[ha]=B[ga]=B[ua]=B[da]=!0;B[Gr]=B[ce]=B[ra]=!1;function gt(e,t,a,i,c,s){var r,n=t&Hr;if(r!==void 0)return r;if(!Re(e))return e;var l=ee(e);if(l)return r=dr(e),ze(e,r);var y=kt(e),h=y==ce||y==$r;if(Me(e))return je(e,n);if(y==le||y==ne||h&&!c)return r=h?{}:Fe(e),cr(e,rr(r,e));if(!B[y])return c?e:{};r=Mr(e,y,n),s||(s=new Pe);var f=s.get(e);if(f)return f;s.set(e,r),Kr(e)?e.forEach(function(w){r.add(gt(w,t,a,w,e,s))}):Pr(e)&&e.forEach(function(w,_){r.set(_,gt(w,t,a,_,e,s))});var m=hr,x=l?void 0:m(e);return er(x||e,function(w,_){x&&(_=w,w=e[_]),We(r,_,gt(w,t,a,_,e,s))}),r}var pa=4;function fa(e){return gt(e,pa)}var St=function(){var e=u(function(I,b,d,p){for(d=d||{},p=I.length;p--;d[I[p]]=b);return d},"o"),t=[1,15],a=[1,7],i=[1,13],c=[1,14],s=[1,19],r=[1,16],n=[1,17],l=[1,18],y=[8,30],h=[8,10,21,28,29,30,31,39,43,46],f=[1,23],m=[1,24],x=[8,10,15,16,21,28,29,30,31,39,43,46],w=[8,10,15,16,21,27,28,29,30,31,39,43,46],_=[1,49],S={trace:u(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:u(function(b,d,p,L,E,o,k){var g=o.length-1;switch(E){case 4:L.getLogger().debug("Rule: separator (NL) ");break;case 5:L.getLogger().debug("Rule: separator (Space) ");break;case 6:L.getLogger().debug("Rule: separator (EOF) ");break;case 7:L.getLogger().debug("Rule: hierarchy: ",o[g-1]),L.setHierarchy(o[g-1]);break;case 8:L.getLogger().debug("Stop NL ");break;case 9:L.getLogger().debug("Stop EOF ");break;case 10:L.getLogger().debug("Stop NL2 ");break;case 11:L.getLogger().debug("Stop EOF2 ");break;case 12:L.getLogger().debug("Rule: statement: ",o[g]),typeof o[g].length=="number"?this.$=o[g]:this.$=[o[g]];break;case 13:L.getLogger().debug("Rule: statement #2: ",o[g-1]),this.$=[o[g-1]].concat(o[g]);break;case 14:L.getLogger().debug("Rule: link: ",o[g],b),this.$={edgeTypeStr:o[g],label:""};break;case 15:L.getLogger().debug("Rule: LABEL link: ",o[g-3],o[g-1],o[g]),this.$={edgeTypeStr:o[g],label:o[g-1]};break;case 18:const T=parseInt(o[g]),D=L.generateId();this.$={id:D,type:"space",label:"",width:T,children:[]};break;case 23:L.getLogger().debug("Rule: (nodeStatement link node) ",o[g-2],o[g-1],o[g]," typestr: ",o[g-1].edgeTypeStr);const H=L.edgeStrToEdgeData(o[g-1].edgeTypeStr);this.$=[{id:o[g-2].id,label:o[g-2].label,type:o[g-2].type,directions:o[g-2].directions},{id:o[g-2].id+"-"+o[g].id,start:o[g-2].id,end:o[g].id,label:o[g-1].label,type:"edge",directions:o[g].directions,arrowTypeEnd:H,arrowTypeStart:"arrow_open"},{id:o[g].id,label:o[g].label,type:L.typeStr2Type(o[g].typeStr),directions:o[g].directions}];break;case 24:L.getLogger().debug("Rule: nodeStatement (abc88 node size) ",o[g-1],o[g]),this.$={id:o[g-1].id,label:o[g-1].label,type:L.typeStr2Type(o[g-1].typeStr),directions:o[g-1].directions,widthInColumns:parseInt(o[g],10)};break;case 25:L.getLogger().debug("Rule: nodeStatement (node) ",o[g]),this.$={id:o[g].id,label:o[g].label,type:L.typeStr2Type(o[g].typeStr),directions:o[g].directions,widthInColumns:1};break;case 26:L.getLogger().debug("APA123",this?this:"na"),L.getLogger().debug("COLUMNS: ",o[g]),this.$={type:"column-setting",columns:o[g]==="auto"?-1:parseInt(o[g])};break;case 27:L.getLogger().debug("Rule: id-block statement : ",o[g-2],o[g-1]),L.generateId(),this.$={...o[g-2],type:"composite",children:o[g-1]};break;case 28:L.getLogger().debug("Rule: blockStatement : ",o[g-2],o[g-1],o[g]);const P=L.generateId();this.$={id:P,type:"composite",label:"",children:o[g-1]};break;case 29:L.getLogger().debug("Rule: node (NODE_ID separator): ",o[g]),this.$={id:o[g]};break;case 30:L.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",o[g-1],o[g]),this.$={id:o[g-1],label:o[g].label,typeStr:o[g].typeStr,directions:o[g].directions};break;case 31:L.getLogger().debug("Rule: dirList: ",o[g]),this.$=[o[g]];break;case 32:L.getLogger().debug("Rule: dirList: ",o[g-1],o[g]),this.$=[o[g-1]].concat(o[g]);break;case 33:L.getLogger().debug("Rule: nodeShapeNLabel: ",o[g-2],o[g-1],o[g]),this.$={typeStr:o[g-2]+o[g],label:o[g-1]};break;case 34:L.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",o[g-3],o[g-2]," #3:",o[g-1],o[g]),this.$={typeStr:o[g-3]+o[g],label:o[g-2],directions:o[g-1]};break;case 35:case 36:this.$={type:"classDef",id:o[g-1].trim(),css:o[g].trim()};break;case 37:this.$={type:"applyClass",id:o[g-1].trim(),styleClass:o[g].trim()};break;case 38:this.$={type:"applyStyles",id:o[g-1].trim(),stylesStr:o[g].trim()};break}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:t,11:3,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{8:[1,20]},e(y,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:t,21:a,28:i,29:c,31:s,39:r,43:n,46:l}),e(h,[2,16],{14:22,15:f,16:m}),e(h,[2,17]),e(h,[2,18]),e(h,[2,19]),e(h,[2,20]),e(h,[2,21]),e(h,[2,22]),e(x,[2,25],{27:[1,25]}),e(h,[2,26]),{19:26,26:12,31:s},{10:t,11:27,13:4,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},e(w,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},e(y,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},e(x,[2,24]),{10:t,11:37,13:4,14:22,15:f,16:m,19:5,20:6,21:a,22:8,23:9,24:10,25:11,26:12,28:i,29:c,31:s,39:r,43:n,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},e(w,[2,30]),{18:[1,43]},{18:[1,44]},e(x,[2,23]),{18:[1,45]},{30:[1,46]},e(h,[2,28]),e(h,[2,35]),e(h,[2,36]),e(h,[2,37]),e(h,[2,38]),{36:[1,47]},{33:48,34:_},{15:[1,50]},e(h,[2,27]),e(w,[2,33]),{38:[1,51]},{33:52,34:_,38:[2,31]},{31:[2,15]},e(w,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:u(function(b,d){if(d.recoverable)this.trace(b);else{var p=new Error(b);throw p.hash=d,p}},"parseError"),parse:u(function(b){var d=this,p=[0],L=[],E=[null],o=[],k=this.table,g="",T=0,D=0,H=2,P=1,Q=o.slice.call(arguments,1),R=Object.create(this.lexer),U={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(U.yy[rt]=this.yy[rt]);R.setInput(b,U.yy),U.yy.lexer=R,U.yy.parser=this,typeof R.yylloc>"u"&&(R.yylloc={});var at=R.yylloc;o.push(at);var Te=R.options&&R.options.ranges;typeof U.yy.parseError=="function"?this.parseError=U.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function De(X){p.length=p.length-2*X,E.length=E.length-X,o.length=o.length-X}u(De,"popStack");function Ot(){var X;return X=L.pop()||R.lex()||P,typeof X!="number"&&(X instanceof Array&&(L=X,X=L.pop()),X=d.symbols_[X]||X),X}u(Ot,"lex");for(var K,tt,G,bt,et={},ot,J,At,ht;;){if(tt=p[p.length-1],this.defaultActions[tt]?G=this.defaultActions[tt]:((K===null||typeof K>"u")&&(K=Ot()),G=k[tt]&&k[tt][K]),typeof G>"u"||!G.length||!G[0]){var wt="";ht=[];for(ot in k[tt])this.terminals_[ot]&&ot>H&&ht.push("'"+this.terminals_[ot]+"'");R.showPosition?wt="Parse error on line "+(T+1)+`:
2
2
  `+R.showPosition()+`
3
3
  Expecting `+ht.join(", ")+", got '"+(this.terminals_[K]||K)+"'":wt="Parse error on line "+(T+1)+": Unexpected "+(K==P?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(wt,{text:R.match,token:this.terminals_[K]||K,line:R.yylineno,loc:at,expected:ht})}if(G[0]instanceof Array&&G.length>1)throw new Error("Parse Error: multiple actions possible at state: "+tt+", token: "+K);switch(G[0]){case 1:p.push(K),E.push(R.yytext),o.push(R.yylloc),p.push(G[1]),K=null,D=R.yyleng,g=R.yytext,T=R.yylineno,at=R.yylloc;break;case 2:if(J=this.productions_[G[1]][1],et.$=E[E.length-J],et._$={first_line:o[o.length-(J||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(J||1)].first_column,last_column:o[o.length-1].last_column},Te&&(et._$.range=[o[o.length-(J||1)].range[0],o[o.length-1].range[1]]),bt=this.performAction.apply(et,[g,D,T,U.yy,G[1],E,o].concat(Q)),typeof bt<"u")return bt;J&&(p=p.slice(0,-1*J*2),E=E.slice(0,-1*J),o=o.slice(0,-1*J)),p.push(this.productions_[G[1]][0]),E.push(et.$),o.push(et._$),At=k[p[p.length-2]][p[p.length-1]],p.push(At);break;case 3:return!0}}return!0},"parse")},C=function(){var I={EOF:1,parseError:u(function(d,p){if(this.yy.parser)this.yy.parser.parseError(d,p);else throw new Error(d)},"parseError"),setInput:u(function(b,d){return this.yy=d||this.yy||{},this._input=b,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:u(function(){var b=this._input[0];this.yytext+=b,this.yyleng++,this.offset++,this.match+=b,this.matched+=b;var d=b.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),b},"input"),unput:u(function(b){var d=b.length,p=b.split(/(?:\r\n?|\n)/g);this._input=b+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),p.length-1&&(this.yylineno-=p.length-1);var E=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:p?(p.length===L.length?this.yylloc.first_column:0)+L[L.length-p.length].length-p[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[E[0],E[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:u(function(){return this._more=!0,this},"more"),reject:u(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:u(function(b){this.unput(this.match.slice(b))},"less"),pastInput:u(function(){var b=this.matched.substr(0,this.matched.length-this.match.length);return(b.length>20?"...":"")+b.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:u(function(){var b=this.match;return b.length<20&&(b+=this._input.substr(0,20-b.length)),(b.substr(0,20)+(b.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:u(function(){var b=this.pastInput(),d=new Array(b.length+1).join("-");return b+this.upcomingInput()+`
@@ -1 +1 @@
1
- import{d as r,aa as i,aj as u,r as p,k as o,o as l,w as n,D as d,g as e,ak as _,n as c,j as f}from"./BcsKoAPU.js";const[R,v]=u("AvatarRoot");var h=r({__name:"AvatarRoot",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){return i(),v({imageLoadingStatus:p("idle")}),(a,t)=>(l(),o(e(_),{"as-child":a.asChild,as:a.as},{default:n(()=>[d(a.$slots,"default")]),_:3},8,["as-child","as"]))}}),m=h;const k=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(()=>[d(t.$slots,"default")]),_:3},8,["class"]))}});export{k as _,R as i};
1
+ import{d as r,aa as i,aj as u,r as p,k as o,o as l,w as n,D as d,g as e,ak as _,n as c,j as f}from"./D0lW43G8.js";const[R,v]=u("AvatarRoot");var h=r({__name:"AvatarRoot",props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:"span"}},setup(s){return i(),v({imageLoadingStatus:p("idle")}),(a,t)=>(l(),o(e(_),{"as-child":a.asChild,as:a.as},{default:n(()=>[d(a.$slots,"default")]),_:3},8,["as-child","as"]))}}),m=h;const k=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(()=>[d(t.$slots,"default")]),_:3},8,["class"]))}});export{k as _,R as i};
@@ -1 +1 @@
1
- import{_ as k}from"./63YtjFEq.js";import{d as y,c as p,af as A,ag as C,ah as n,ai as D,b as B,e as a,l as f,m as e,g as s,n as _,j as V,z as g,f as o,w as i,t as z,D as N,F as S,a0 as $,o as l,A as j}from"./BcsKoAPU.js";import{_ as I}from"./xOD4Ev56.js";const q=["data-electron-drag-region"],E={class:"flex items-center space-x-2 pointer-events-none"},F={class:"h-full overflow-y-auto flex flex-col"},L={key:0,class:"flex items-center justify-between border-b border-border py-2 px-2"},M={class:"flex items-center space-x-2"},P=["href"],O=y({__name:"home",setup(T){const r=p(()=>A()&&C()),c=B(),x=async()=>{r.value&&n()&&await window.electronAPI.window.maximize()},d=p(()=>n()||D()),v=c.public.githubLink;return(b,t)=>{const u=I,m=k,h=j,w=$;return l(),a(S,null,[s(d)?(l(),a("div",{key:0,class:_(s(V)("w-full h-10.5 select-none pr-2 bg-sidebar flex justify-center")),onDblclick:x},[e("div",{class:_(["flex w-full items-center gap-3 py-2 pr-2",s(r)?"pl-[4.75rem]":"pl-3"]),"data-electron-drag-region":s(n)()?"":void 0},[e("div",E,[o(m,{class:"rounded-2xl"},{default:i(()=>[o(u,{src:"/logo.png",alt:"@unovue"})]),_:1}),t[0]||(t[0]=e("p",{class:"text-xl font-medium"},"orcaq",-1))]),g(" v"+z(s(c).public.version),1)],10,q)],34)):f("",!0),e("div",F,[s(d)?f("",!0):(l(),a("div",L,[e("div",M,[o(m,{class:"rounded-2xl"},{default:i(()=>[o(u,{src:"/logo.png",alt:"@unovue"})]),_:1}),t[1]||(t[1]=e("p",{class:"text-2xl font-medium"},"orcaq",-1))]),e("div",null,[o(w,{variant:"outline",size:"sm","as-child":""},{default:i(()=>[e("a",{href:s(v),target:"_blank"},[o(h,{name:"hugeicons:github",class:"w-5 h-5"}),t[2]||(t[2]=g(" Star us on GitHub ⭐️ "))],8,P)]),_:1})])])),N(b.$slots,"default")])],64)}}});export{O as default};
1
+ import{_ as k}from"./BdZsZgcB.js";import{d as y,c as p,af as A,ag as C,ah as n,ai as D,b as B,e as a,l as f,m as e,g as s,n as _,j as V,z as g,f as o,w as i,t as z,D as N,F as S,a0 as $,o as l,A as j}from"./D0lW43G8.js";import{_ as I}from"./CtkhwZY7.js";const q=["data-electron-drag-region"],E={class:"flex items-center space-x-2 pointer-events-none"},F={class:"h-full overflow-y-auto flex flex-col"},L={key:0,class:"flex items-center justify-between border-b border-border py-2 px-2"},M={class:"flex items-center space-x-2"},P=["href"],O=y({__name:"home",setup(T){const r=p(()=>A()&&C()),c=B(),x=async()=>{r.value&&n()&&await window.electronAPI.window.maximize()},d=p(()=>n()||D()),v=c.public.githubLink;return(b,t)=>{const u=I,m=k,h=j,w=$;return l(),a(S,null,[s(d)?(l(),a("div",{key:0,class:_(s(V)("w-full h-10.5 select-none pr-2 bg-sidebar flex justify-center")),onDblclick:x},[e("div",{class:_(["flex w-full items-center gap-3 py-2 pr-2",s(r)?"pl-[4.75rem]":"pl-3"]),"data-electron-drag-region":s(n)()?"":void 0},[e("div",E,[o(m,{class:"rounded-2xl"},{default:i(()=>[o(u,{src:"/logo.png",alt:"@unovue"})]),_:1}),t[0]||(t[0]=e("p",{class:"text-xl font-medium"},"orcaq",-1))]),g(" v"+z(s(c).public.version),1)],10,q)],34)):f("",!0),e("div",F,[s(d)?f("",!0):(l(),a("div",L,[e("div",M,[o(m,{class:"rounded-2xl"},{default:i(()=>[o(u,{src:"/logo.png",alt:"@unovue"})]),_:1}),t[1]||(t[1]=e("p",{class:"text-2xl font-medium"},"orcaq",-1))]),e("div",null,[o(w,{variant:"outline",size:"sm","as-child":""},{default:i(()=>[e("a",{href:s(v),target:"_blank"},[o(h,{name:"hugeicons:github",class:"w-5 h-5"}),t[2]||(t[2]=g(" Star us on GitHub ⭐️ "))],8,P)]),_:1})])])),N(b.$slots,"default")])],64)}}});export{O as default};
@@ -1 +1 @@
1
- import{_ as G}from"./C_7gtl40.js";import{d as R,bD as H,e as a,m as d,f as o,bn as U,w as C,g as r,A as j,a0 as K,o as t,z as k,k as V,t as u,l as z,bq as W,r as q,c as M,av as J,F as y,s as T,n as S,j as X,bm as Y,a3 as Z,i as ee,bE as te,bF as se,bG as ne}from"./BcsKoAPU.js";import{_ as oe,a as ae}from"./dNPwafbq.js";import{_ as ie}from"./BWZ7atse.js";import{_ as P}from"./MW5K_zef.js";import{_ as re}from"./Ca0KO9Xq.js";const de={class:"flex flex-col gap-2 rounded-lg border bg-card p-4 sm:flex-row sm:items-end sm:justify-between"},le={class:"flex min-w-0 flex-1 flex-col gap-1.5"},ce={class:"flex h-9 items-center justify-center sm:w-6"},ue={class:"flex min-w-0 flex-1 flex-col gap-1.5"},me=R({__name:"SchemaDiffConnectionSelector",props:{sourceConnection:{},targetConnection:{},connections:{},isLoading:{type:Boolean}},emits:["update:targetConnection","run"],setup(x,{emit:_}){const{workspaceId:p}=H(),l=_;return(n,f)=>{var e,c;const g=U,v=j,w=K;return t(),a("div",de,[d("div",le,[o(g,{class:"text-xs font-medium text-muted-foreground"},{default:C(()=>f[2]||(f[2]=[k("Source")])),_:1}),o(P,{class:"h-9 w-full","workspace-id":r(p)||"","connection-id":((e=n.sourceConnection)==null?void 0:e.id)||"",connection:n.sourceConnection||void 0,connections:n.sourceConnection?[n.sourceConnection]:[],disabled:""},null,8,["workspace-id","connection-id","connection","connections"])]),d("div",ce,[o(v,{name:"hugeicons:arrow-right-02",class:"size-4 text-muted-foreground"})]),d("div",ue,[o(g,{class:"text-xs font-medium text-muted-foreground"},{default:C(()=>f[3]||(f[3]=[k("Target")])),_:1}),o(P,{class:"h-9 w-full","workspace-id":r(p)||"","connection-id":((c=n.targetConnection)==null?void 0:c.id)||"",connection:n.targetConnection||void 0,connections:n.connections,"onUpdate:connectionId":f[0]||(f[0]=$=>l("update:targetConnection",n.connections.find(b=>b.id===$)||null)),"skip-strict-mode-connections":""},null,8,["workspace-id","connection-id","connection","connections"])]),o(w,{disabled:!n.sourceConnection||!n.targetConnection||n.isLoading,size:"sm",onClick:f[1]||(f[1]=$=>l("run"))},{default:C(()=>[n.isLoading?(t(),V(v,{key:0,name:"hugeicons:loading-03",class:"size-4 animate-spin"})):(t(),V(v,{key:1,name:"hugeicons:git-compare",class:"size-4"})),k(" "+u(n.isLoading?"Comparing...":"Run Diff"),1)]),_:1},8,["disabled"])])}}}),fe={class:"flex flex-col gap-3"},pe={class:"flex items-center gap-3"},ge={class:"flex items-center gap-2 text-sm"},xe={class:"text-xs text-muted-foreground"},_e={class:"ml-auto flex items-center gap-2 text-xs"},he={key:0,class:"flex items-center gap-1 rounded-md bg-red-100 px-2 py-1 text-xs text-red-700 dark:bg-red-900/30 dark:text-red-400"},ve={key:0,class:"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300"},ye={key:2,class:"min-h-32 flex items-center justify-center rounded-md border bg-muted/30 p-4 font-mono text-xs text-muted-foreground"},ke=R({__name:"SchemaDiffSqlPanel",props:{sql:{},safeMode:{type:Boolean},statementCount:{},destructiveCount:{}},emits:["update:safeMode"],setup(x,{emit:_}){const p=_;return(l,n)=>{const f=j,g=U,v=W,w=re;return t(),a("div",fe,[d("div",pe,[d("div",ge,[o(f,{name:"hugeicons:code",class:"size-4 text-muted-foreground"}),n[1]||(n[1]=d("span",{class:"font-medium"},"Generated SQL",-1)),d("span",xe,"("+u(l.statementCount)+" statements)",1)]),d("div",_e,[o(g,{for:"safe-mode-toggle",class:"cursor-pointer text-muted-foreground"},{default:C(()=>n[2]||(n[2]=[k(" Safe mode ")])),_:1}),o(v,{id:"safe-mode-toggle","model-value":l.safeMode,"onUpdate:modelValue":n[0]||(n[0]=e=>p("update:safeMode",e))},null,8,["model-value"])]),l.destructiveCount>0&&!l.safeMode?(t(),a("div",he,[o(f,{name:"hugeicons:alert-circle",class:"size-3.5"}),k(" "+u(l.destructiveCount)+" destructive ",1)])):z("",!0)]),l.safeMode?(t(),a("div",ve,[o(f,{name:"hugeicons:shield-01",class:"mt-0.5 size-3.5 shrink-0"}),n[3]||(n[3]=d("span",null,"Safe mode is on — destructive statements (DROP TABLE, DROP COLUMN) are commented out. Disable to include them.",-1))])):z("",!0),l.sql?(t(),V(w,{key:1,code:l.sql,language:"sql","max-height":"400px"},null,8,["code"])):(t(),a("div",ye," No SQL statements generated. "))])}}}),be={class:"space-y-1 font-mono text-sm"},we={class:"mb-3 flex flex-wrap gap-2"},Ce=["onClick"],$e={key:0,class:"divide-y"},Se=["onClick"],ze={class:"flex-1 truncate"},De={class:"flex-1 truncate text-xs"},qe={class:"shrink-0 text-xxs text-muted-foreground"},Le={class:"flex-1 truncate text-xs"},Te={class:"flex-1 truncate"},Me={class:"flex-1 truncate"},Ve={key:0,class:"flex flex-col items-center gap-2 py-12 text-muted-foreground"},Be=R({__name:"SchemaDiffTree",props:{result:{}},setup(x){const _=q(new Set),p=q(new Set),l={added:{label:"Added",class:"text-emerald-600 dark:text-emerald-400",icon:"hugeicons:plus-sign"},removed:{label:"Removed",class:"text-red-600 dark:text-red-400",icon:"hugeicons:minus-sign"},modified:{label:"Modified",class:"text-amber-600 dark:text-amber-400",icon:"hugeicons:edit-02"},unchanged:{label:"Unchanged",class:"text-muted-foreground",icon:"hugeicons:check-01"}},n={added:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-400 rounded-sm",removed:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-400 rounded-sm",modified:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-400 rounded-sm"},f=e=>{_.value.has(e)?_.value.delete(e):_.value.add(e)},g=e=>{p.value.has(e)?p.value.delete(e):p.value.add(e)},v=(e,c)=>`${e}.${c}`,w=M(()=>x.result.schemas.filter(e=>e.tables.some(c=>c.status!=="unchanged")||e.views.some(c=>c.status!=="unchanged")||e.functions.some(c=>c.status!=="unchanged")));return J(()=>{for(const e of w.value)_.value.add(e.name)}),(e,c)=>{const $=Y,b=j;return t(),a("div",be,[d("div",we,[(t(!0),a(y,null,T(e.result.summary,(h,s)=>(t(),a(y,{key:s},[s!=="unchanged"?(t(),V($,{key:0,variant:"outline",class:S(r(X)(n[s],"capitalize border-0"))},{default:C(()=>[k(u(h)+" "+u(s),1)]),_:2},1032,["class"])):z("",!0)],64))),128))]),(t(!0),a(y,null,T(r(w),h=>(t(),a("div",{key:h.name,class:"rounded-md border overflow-hidden"},[d("button",{class:"flex w-full items-center gap-2 bg-muted/50 px-3 py-2 text-left text-xs font-semibold capitalize text-muted-foreground hover:bg-muted",onClick:s=>f(h.name)},[o(b,{name:r(_).has(h.name)?"hugeicons:arrow-down-01":"hugeicons:arrow-right-01",class:"size-3.5 shrink-0"},null,8,["name"]),o(b,{name:"hugeicons:database",class:"size-3.5 shrink-0"}),k(" "+u(h.name),1)],8,Ce),r(_).has(h.name)?(t(),a("div",$e,[(t(!0),a(y,null,T(h.tables.filter(s=>s.status!=="unchanged"),s=>(t(),a(y,{key:s.name},[d("div",{class:S(["flex cursor-pointer items-center gap-2 px-4 py-2 hover:bg-muted/30",l[s.status].class]),onClick:i=>g(v(h.name,s.name))},[o(b,{name:r(p).has(v(h.name,s.name))?"hugeicons:arrow-down-01":"hugeicons:arrow-right-01",class:"size-3 shrink-0 text-muted-foreground"},null,8,["name"]),o(b,{name:"hugeicons:table-01",class:"size-3.5 shrink-0"}),d("span",ze,u(s.name),1),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],10,Se),r(p).has(v(h.name,s.name))?(t(),a(y,{key:0},[(t(!0),a(y,null,T(s.columns.filter(i=>i.status!=="unchanged"),i=>{var D,m,B;return t(),a("div",{key:i.name,class:S(["flex items-center gap-2 py-1.5 pl-10 pr-4",l[i.status].class])},[o(b,{name:"hugeicons:columns-02",class:"size-3 shrink-0 opacity-60"}),d("span",De,u(i.name),1),d("span",qe,[i.status==="added"?(t(),a(y,{key:0},[k(u((D=i.source)==null?void 0:D.type),1)],64)):i.status==="removed"?(t(),a(y,{key:1},[k(u((m=i.target)==null?void 0:m.type),1)],64)):(B=i.changes)!=null&&B.type?(t(),a(y,{key:2},[k(u(i.changes.type.from)+" → "+u(i.changes.type.to),1)],64)):z("",!0)]),d("span",{class:S(["shrink-0 rounded px-1 py-0.5 text-[9px] font-medium capitalize",n[i.status]])},u(i.status),3)],2)}),128)),(t(!0),a(y,null,T(s.foreignKeys.filter(i=>i.status!=="unchanged"),i=>(t(),a("div",{key:i.key,class:S(["flex items-center gap-2 py-1.5 pl-10 pr-4",l[i.status].class])},[o(b,{name:"hugeicons:link-01",class:"size-3 shrink-0 opacity-60"}),d("span",Le,u(i.key),1),d("span",{class:S(["shrink-0 rounded px-1 py-0.5 text-[9px] font-medium capitalize",n[i.status]])},u(i.status),3)],2))),128))],64)):z("",!0)],64))),128)),(t(!0),a(y,null,T(h.views.filter(s=>s.status!=="unchanged"),s=>(t(),a("div",{key:s.name,class:S(["flex items-center gap-2 px-4 py-2",l[s.status].class])},[o(b,{name:"hugeicons:eye",class:"size-3.5 shrink-0"}),d("span",Te,u(s.name),1),c[0]||(c[0]=d("span",{class:"ml-2 shrink-0 text-xxs text-muted-foreground"},"view",-1)),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],2))),128)),(t(!0),a(y,null,T(h.functions.filter(s=>s.status!=="unchanged"),s=>(t(),a("div",{key:s.signature,class:S(["flex items-center gap-2 px-4 py-2",l[s.status].class])},[o(b,{name:"hugeicons:function-of-x",class:"size-3.5 shrink-0"}),d("span",Me,u(s.name),1),c[1]||(c[1]=d("span",{class:"ml-2 shrink-0 text-xxs text-muted-foreground"},"fn",-1)),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],2))),128))])):z("",!0)]))),128)),r(w).length===0?(t(),a("div",Ve,[o(b,{name:"hugeicons:checkmark-circle-02",class:"size-10 text-emerald-500"}),c[2]||(c[2]=d("p",{class:"text-sm font-medium"},"Schemas are identical",-1)),c[3]||(c[3]=d("p",{class:"text-xs"},"No differences detected between source and target.",-1))])):z("",!0)])}}}),Ie={diff:x=>$fetch("/api/schema-diff",{method:"POST",body:x})};function Re(){const x=q(null),_=q(!1),p=q(null),l=q(!0),n=e=>({type:e.type,connectionString:e.connectionString,host:e.host,port:e.port,username:e.username,password:e.password,database:e.database,ssl:e.ssl,ssh:e.ssh}),f=async(e,c)=>{_.value=!0,p.value=null,x.value=null;try{x.value=await Ie.diff({source:n(e),target:n(c),safeMode:l.value})}catch($){p.value=$ instanceof Error?$.message:"Schema diff failed. Check connection details."}finally{_.value=!1}},g=()=>{x.value=null,p.value=null},v=M(()=>x.value?l.value?x.value.sql.safe:x.value.sql.full:""),w=M(()=>{if(!x.value)return!1;const{added:e,removed:c,modified:$}=x.value.summary;return e+c+$>0});return{result:x,isLoading:_,error:p,safeMode:l,currentSql:v,hasDifferences:w,runDiff:f,reset:g}}const je={class:"flex h-full flex-col gap-4 overflow-hidden p-4"},Ne={class:"flex items-center justify-between gap-2"},Pe={key:0,class:"ml-1 rounded-full bg-primary px-1.5 py-0.5 text-xxs text-primary-foreground"},Ue={key:0,class:"ml-1 rounded-full bg-muted px-1.5 py-0.5 text-xxs text-muted-foreground"},Ae={class:"text-xs text-muted-foreground"},Ee={key:0,class:"flex-1 overflow-y-auto"},Fe={key:1,class:"flex-1 overflow-y-auto"},Oe={key:2,class:"flex flex-1 flex-col items-center justify-center gap-3 text-muted-foreground"},Xe=R({__name:"SchemaDiffContainer",props:{sourceConnectionId:{}},setup(x){const _=x,p=Z(),l=M(()=>p.connections.find(D=>D.id===_.sourceConnectionId)??null),n=M(()=>p.connections.filter(D=>D.id!==_.sourceConnectionId)),f=q(null),{result:g,isLoading:v,error:w,safeMode:e,currentSql:c,hasDifferences:$,runDiff:b}=Re(),h=async()=>{!l.value||!f.value||await b(l.value,f.value)},s=M(()=>{var D;return((D=g.value)==null?void 0:D.sql.statements.filter(m=>m.destructive).length)??0}),i=q("diff");return(D,m)=>{const B=G,I=j,A=ie,E=ae,F=oe,N=ne,O=se,Q=te;return t(),a("div",je,[o(B,{icon:"hugeicons:git-compare",title:"Schema Diff",description:"Compare schemas between two database connections and generate sync SQL."}),o(me,{"source-connection":r(l),"target-connection":r(f),connections:r(n),"is-loading":r(v),"onUpdate:targetConnection":m[0]||(m[0]=L=>f.value=L),onRun:h},null,8,["source-connection","target-connection","connections","is-loading"]),r(w)?(t(),V(F,{key:0,class:"border-border bg-muted/30"},{default:C(()=>[o(I,{name:"hugeicons:alert-circle",class:"size-4 text-destructive"}),o(A,{class:"text-destructive"},{default:C(()=>m[5]||(m[5]=[k("Diff Failed")])),_:1}),o(E,{class:"text-muted-foreground"},{default:C(()=>[k(u(r(w)),1)]),_:1})]),_:1})):z("",!0),r(g)?(t(),a(y,{key:1},[d("div",Ne,[o(Q,{modelValue:r(i),"onUpdate:modelValue":m[3]||(m[3]=L=>ee(i)?i.value=L:null),class:"min-w-0 flex-1 gap-0"},{default:C(()=>[o(O,{class:"h-8 max-w-full justify-start! overflow-x-auto"},{default:C(()=>[o(N,{value:"diff",class:"min-w-fit shrink-0 cursor-pointer rounded-sm px-1.5 text-xs",onClick:m[1]||(m[1]=L=>i.value="diff")},{default:C(()=>[o(I,{name:"hugeicons:git-compare",class:"shrink-0 size-3.5"}),m[6]||(m[6]=k(" Diff View ")),r($)?(t(),a("span",Pe,u(r(g).summary.added+r(g).summary.removed+r(g).summary.modified),1)):z("",!0)]),_:1}),o(N,{value:"sql",class:"min-w-fit shrink-0 cursor-pointer rounded-sm px-1.5 text-xs",onClick:m[2]||(m[2]=L=>i.value="sql")},{default:C(()=>[o(I,{name:"hugeicons:code",class:"shrink-0 size-3.5"}),m[7]||(m[7]=k(" SQL ")),r(g).sql.statements.length>0?(t(),a("span",Ue,u(r(g).sql.statements.length),1)):z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),d("div",Ae,u(r(i)==="diff"?"Visualize structural differences":"Review synchronization script"),1)]),r(i)==="diff"?(t(),a("div",Ee,[o(Be,{result:r(g)},null,8,["result"])])):(t(),a("div",Fe,[o(ke,{sql:r(c),"safe-mode":r(e),"statement-count":r(g).sql.statements.length,"destructive-count":r(s),"onUpdate:safeMode":m[4]||(m[4]=L=>e.value=L)},null,8,["sql","safe-mode","statement-count","destructive-count"])]))],64)):r(v)?z("",!0):(t(),a("div",Oe,[o(I,{name:"hugeicons:git-compare",class:"size-14 opacity-30"}),m[8]||(m[8]=d("p",{class:"text-sm"},"Select a target connection and run the diff",-1))]))])}}});export{Xe as _};
1
+ import{_ as G}from"./C9kgALYc.js";import{d as R,bD as H,e as a,m as d,f as o,bn as U,w as C,g as r,A as j,a0 as K,o as t,z as k,k as V,t as u,l as z,bq as W,r as q,c as M,av as J,F as y,s as T,n as S,j as X,bm as Y,a3 as Z,i as ee,bE as te,bF as se,bG as ne}from"./D0lW43G8.js";import{_ as oe,a as ae}from"./CtCx-4nJ.js";import{_ as ie}from"./BmAp-sfn.js";import{_ as P}from"./Cbo6GmdE.js";import{_ as re}from"./BCAMWuzu.js";const de={class:"flex flex-col gap-2 rounded-lg border bg-card p-4 sm:flex-row sm:items-end sm:justify-between"},le={class:"flex min-w-0 flex-1 flex-col gap-1.5"},ce={class:"flex h-9 items-center justify-center sm:w-6"},ue={class:"flex min-w-0 flex-1 flex-col gap-1.5"},me=R({__name:"SchemaDiffConnectionSelector",props:{sourceConnection:{},targetConnection:{},connections:{},isLoading:{type:Boolean}},emits:["update:targetConnection","run"],setup(x,{emit:_}){const{workspaceId:p}=H(),l=_;return(n,f)=>{var e,c;const g=U,v=j,w=K;return t(),a("div",de,[d("div",le,[o(g,{class:"text-xs font-medium text-muted-foreground"},{default:C(()=>f[2]||(f[2]=[k("Source")])),_:1}),o(P,{class:"h-9 w-full","workspace-id":r(p)||"","connection-id":((e=n.sourceConnection)==null?void 0:e.id)||"",connection:n.sourceConnection||void 0,connections:n.sourceConnection?[n.sourceConnection]:[],disabled:""},null,8,["workspace-id","connection-id","connection","connections"])]),d("div",ce,[o(v,{name:"hugeicons:arrow-right-02",class:"size-4 text-muted-foreground"})]),d("div",ue,[o(g,{class:"text-xs font-medium text-muted-foreground"},{default:C(()=>f[3]||(f[3]=[k("Target")])),_:1}),o(P,{class:"h-9 w-full","workspace-id":r(p)||"","connection-id":((c=n.targetConnection)==null?void 0:c.id)||"",connection:n.targetConnection||void 0,connections:n.connections,"onUpdate:connectionId":f[0]||(f[0]=$=>l("update:targetConnection",n.connections.find(b=>b.id===$)||null)),"skip-strict-mode-connections":""},null,8,["workspace-id","connection-id","connection","connections"])]),o(w,{disabled:!n.sourceConnection||!n.targetConnection||n.isLoading,size:"sm",onClick:f[1]||(f[1]=$=>l("run"))},{default:C(()=>[n.isLoading?(t(),V(v,{key:0,name:"hugeicons:loading-03",class:"size-4 animate-spin"})):(t(),V(v,{key:1,name:"hugeicons:git-compare",class:"size-4"})),k(" "+u(n.isLoading?"Comparing...":"Run Diff"),1)]),_:1},8,["disabled"])])}}}),fe={class:"flex flex-col gap-3"},pe={class:"flex items-center gap-3"},ge={class:"flex items-center gap-2 text-sm"},xe={class:"text-xs text-muted-foreground"},_e={class:"ml-auto flex items-center gap-2 text-xs"},he={key:0,class:"flex items-center gap-1 rounded-md bg-red-100 px-2 py-1 text-xs text-red-700 dark:bg-red-900/30 dark:text-red-400"},ve={key:0,class:"flex items-start gap-2 rounded-md border border-amber-200 bg-amber-50 p-3 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-900/20 dark:text-amber-300"},ye={key:2,class:"min-h-32 flex items-center justify-center rounded-md border bg-muted/30 p-4 font-mono text-xs text-muted-foreground"},ke=R({__name:"SchemaDiffSqlPanel",props:{sql:{},safeMode:{type:Boolean},statementCount:{},destructiveCount:{}},emits:["update:safeMode"],setup(x,{emit:_}){const p=_;return(l,n)=>{const f=j,g=U,v=W,w=re;return t(),a("div",fe,[d("div",pe,[d("div",ge,[o(f,{name:"hugeicons:code",class:"size-4 text-muted-foreground"}),n[1]||(n[1]=d("span",{class:"font-medium"},"Generated SQL",-1)),d("span",xe,"("+u(l.statementCount)+" statements)",1)]),d("div",_e,[o(g,{for:"safe-mode-toggle",class:"cursor-pointer text-muted-foreground"},{default:C(()=>n[2]||(n[2]=[k(" Safe mode ")])),_:1}),o(v,{id:"safe-mode-toggle","model-value":l.safeMode,"onUpdate:modelValue":n[0]||(n[0]=e=>p("update:safeMode",e))},null,8,["model-value"])]),l.destructiveCount>0&&!l.safeMode?(t(),a("div",he,[o(f,{name:"hugeicons:alert-circle",class:"size-3.5"}),k(" "+u(l.destructiveCount)+" destructive ",1)])):z("",!0)]),l.safeMode?(t(),a("div",ve,[o(f,{name:"hugeicons:shield-01",class:"mt-0.5 size-3.5 shrink-0"}),n[3]||(n[3]=d("span",null,"Safe mode is on — destructive statements (DROP TABLE, DROP COLUMN) are commented out. Disable to include them.",-1))])):z("",!0),l.sql?(t(),V(w,{key:1,code:l.sql,language:"sql","max-height":"400px"},null,8,["code"])):(t(),a("div",ye," No SQL statements generated. "))])}}}),be={class:"space-y-1 font-mono text-sm"},we={class:"mb-3 flex flex-wrap gap-2"},Ce=["onClick"],$e={key:0,class:"divide-y"},Se=["onClick"],ze={class:"flex-1 truncate"},De={class:"flex-1 truncate text-xs"},qe={class:"shrink-0 text-xxs text-muted-foreground"},Le={class:"flex-1 truncate text-xs"},Te={class:"flex-1 truncate"},Me={class:"flex-1 truncate"},Ve={key:0,class:"flex flex-col items-center gap-2 py-12 text-muted-foreground"},Be=R({__name:"SchemaDiffTree",props:{result:{}},setup(x){const _=q(new Set),p=q(new Set),l={added:{label:"Added",class:"text-emerald-600 dark:text-emerald-400",icon:"hugeicons:plus-sign"},removed:{label:"Removed",class:"text-red-600 dark:text-red-400",icon:"hugeicons:minus-sign"},modified:{label:"Modified",class:"text-amber-600 dark:text-amber-400",icon:"hugeicons:edit-02"},unchanged:{label:"Unchanged",class:"text-muted-foreground",icon:"hugeicons:check-01"}},n={added:"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/40 dark:text-emerald-400 rounded-sm",removed:"bg-red-100 text-red-700 dark:bg-red-900/40 dark:text-red-400 rounded-sm",modified:"bg-amber-100 text-amber-700 dark:bg-amber-900/40 dark:text-amber-400 rounded-sm"},f=e=>{_.value.has(e)?_.value.delete(e):_.value.add(e)},g=e=>{p.value.has(e)?p.value.delete(e):p.value.add(e)},v=(e,c)=>`${e}.${c}`,w=M(()=>x.result.schemas.filter(e=>e.tables.some(c=>c.status!=="unchanged")||e.views.some(c=>c.status!=="unchanged")||e.functions.some(c=>c.status!=="unchanged")));return J(()=>{for(const e of w.value)_.value.add(e.name)}),(e,c)=>{const $=Y,b=j;return t(),a("div",be,[d("div",we,[(t(!0),a(y,null,T(e.result.summary,(h,s)=>(t(),a(y,{key:s},[s!=="unchanged"?(t(),V($,{key:0,variant:"outline",class:S(r(X)(n[s],"capitalize border-0"))},{default:C(()=>[k(u(h)+" "+u(s),1)]),_:2},1032,["class"])):z("",!0)],64))),128))]),(t(!0),a(y,null,T(r(w),h=>(t(),a("div",{key:h.name,class:"rounded-md border overflow-hidden"},[d("button",{class:"flex w-full items-center gap-2 bg-muted/50 px-3 py-2 text-left text-xs font-semibold capitalize text-muted-foreground hover:bg-muted",onClick:s=>f(h.name)},[o(b,{name:r(_).has(h.name)?"hugeicons:arrow-down-01":"hugeicons:arrow-right-01",class:"size-3.5 shrink-0"},null,8,["name"]),o(b,{name:"hugeicons:database",class:"size-3.5 shrink-0"}),k(" "+u(h.name),1)],8,Ce),r(_).has(h.name)?(t(),a("div",$e,[(t(!0),a(y,null,T(h.tables.filter(s=>s.status!=="unchanged"),s=>(t(),a(y,{key:s.name},[d("div",{class:S(["flex cursor-pointer items-center gap-2 px-4 py-2 hover:bg-muted/30",l[s.status].class]),onClick:i=>g(v(h.name,s.name))},[o(b,{name:r(p).has(v(h.name,s.name))?"hugeicons:arrow-down-01":"hugeicons:arrow-right-01",class:"size-3 shrink-0 text-muted-foreground"},null,8,["name"]),o(b,{name:"hugeicons:table-01",class:"size-3.5 shrink-0"}),d("span",ze,u(s.name),1),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],10,Se),r(p).has(v(h.name,s.name))?(t(),a(y,{key:0},[(t(!0),a(y,null,T(s.columns.filter(i=>i.status!=="unchanged"),i=>{var D,m,B;return t(),a("div",{key:i.name,class:S(["flex items-center gap-2 py-1.5 pl-10 pr-4",l[i.status].class])},[o(b,{name:"hugeicons:columns-02",class:"size-3 shrink-0 opacity-60"}),d("span",De,u(i.name),1),d("span",qe,[i.status==="added"?(t(),a(y,{key:0},[k(u((D=i.source)==null?void 0:D.type),1)],64)):i.status==="removed"?(t(),a(y,{key:1},[k(u((m=i.target)==null?void 0:m.type),1)],64)):(B=i.changes)!=null&&B.type?(t(),a(y,{key:2},[k(u(i.changes.type.from)+" → "+u(i.changes.type.to),1)],64)):z("",!0)]),d("span",{class:S(["shrink-0 rounded px-1 py-0.5 text-[9px] font-medium capitalize",n[i.status]])},u(i.status),3)],2)}),128)),(t(!0),a(y,null,T(s.foreignKeys.filter(i=>i.status!=="unchanged"),i=>(t(),a("div",{key:i.key,class:S(["flex items-center gap-2 py-1.5 pl-10 pr-4",l[i.status].class])},[o(b,{name:"hugeicons:link-01",class:"size-3 shrink-0 opacity-60"}),d("span",Le,u(i.key),1),d("span",{class:S(["shrink-0 rounded px-1 py-0.5 text-[9px] font-medium capitalize",n[i.status]])},u(i.status),3)],2))),128))],64)):z("",!0)],64))),128)),(t(!0),a(y,null,T(h.views.filter(s=>s.status!=="unchanged"),s=>(t(),a("div",{key:s.name,class:S(["flex items-center gap-2 px-4 py-2",l[s.status].class])},[o(b,{name:"hugeicons:eye",class:"size-3.5 shrink-0"}),d("span",Te,u(s.name),1),c[0]||(c[0]=d("span",{class:"ml-2 shrink-0 text-xxs text-muted-foreground"},"view",-1)),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],2))),128)),(t(!0),a(y,null,T(h.functions.filter(s=>s.status!=="unchanged"),s=>(t(),a("div",{key:s.signature,class:S(["flex items-center gap-2 px-4 py-2",l[s.status].class])},[o(b,{name:"hugeicons:function-of-x",class:"size-3.5 shrink-0"}),d("span",Me,u(s.name),1),c[1]||(c[1]=d("span",{class:"ml-2 shrink-0 text-xxs text-muted-foreground"},"fn",-1)),d("span",{class:S(["ml-auto shrink-0 rounded px-1.5 py-0.5 text-xxs font-medium capitalize",n[s.status]])},u(s.status),3)],2))),128))])):z("",!0)]))),128)),r(w).length===0?(t(),a("div",Ve,[o(b,{name:"hugeicons:checkmark-circle-02",class:"size-10 text-emerald-500"}),c[2]||(c[2]=d("p",{class:"text-sm font-medium"},"Schemas are identical",-1)),c[3]||(c[3]=d("p",{class:"text-xs"},"No differences detected between source and target.",-1))])):z("",!0)])}}}),Ie={diff:x=>$fetch("/api/schema-diff",{method:"POST",body:x})};function Re(){const x=q(null),_=q(!1),p=q(null),l=q(!0),n=e=>({type:e.type,connectionString:e.connectionString,host:e.host,port:e.port,username:e.username,password:e.password,database:e.database,ssl:e.ssl,ssh:e.ssh}),f=async(e,c)=>{_.value=!0,p.value=null,x.value=null;try{x.value=await Ie.diff({source:n(e),target:n(c),safeMode:l.value})}catch($){p.value=$ instanceof Error?$.message:"Schema diff failed. Check connection details."}finally{_.value=!1}},g=()=>{x.value=null,p.value=null},v=M(()=>x.value?l.value?x.value.sql.safe:x.value.sql.full:""),w=M(()=>{if(!x.value)return!1;const{added:e,removed:c,modified:$}=x.value.summary;return e+c+$>0});return{result:x,isLoading:_,error:p,safeMode:l,currentSql:v,hasDifferences:w,runDiff:f,reset:g}}const je={class:"flex h-full flex-col gap-4 overflow-hidden p-4"},Ne={class:"flex items-center justify-between gap-2"},Pe={key:0,class:"ml-1 rounded-full bg-primary px-1.5 py-0.5 text-xxs text-primary-foreground"},Ue={key:0,class:"ml-1 rounded-full bg-muted px-1.5 py-0.5 text-xxs text-muted-foreground"},Ae={class:"text-xs text-muted-foreground"},Ee={key:0,class:"flex-1 overflow-y-auto"},Fe={key:1,class:"flex-1 overflow-y-auto"},Oe={key:2,class:"flex flex-1 flex-col items-center justify-center gap-3 text-muted-foreground"},Xe=R({__name:"SchemaDiffContainer",props:{sourceConnectionId:{}},setup(x){const _=x,p=Z(),l=M(()=>p.connections.find(D=>D.id===_.sourceConnectionId)??null),n=M(()=>p.connections.filter(D=>D.id!==_.sourceConnectionId)),f=q(null),{result:g,isLoading:v,error:w,safeMode:e,currentSql:c,hasDifferences:$,runDiff:b}=Re(),h=async()=>{!l.value||!f.value||await b(l.value,f.value)},s=M(()=>{var D;return((D=g.value)==null?void 0:D.sql.statements.filter(m=>m.destructive).length)??0}),i=q("diff");return(D,m)=>{const B=G,I=j,A=ie,E=ae,F=oe,N=ne,O=se,Q=te;return t(),a("div",je,[o(B,{icon:"hugeicons:git-compare",title:"Schema Diff",description:"Compare schemas between two database connections and generate sync SQL."}),o(me,{"source-connection":r(l),"target-connection":r(f),connections:r(n),"is-loading":r(v),"onUpdate:targetConnection":m[0]||(m[0]=L=>f.value=L),onRun:h},null,8,["source-connection","target-connection","connections","is-loading"]),r(w)?(t(),V(F,{key:0,class:"border-border bg-muted/30"},{default:C(()=>[o(I,{name:"hugeicons:alert-circle",class:"size-4 text-destructive"}),o(A,{class:"text-destructive"},{default:C(()=>m[5]||(m[5]=[k("Diff Failed")])),_:1}),o(E,{class:"text-muted-foreground"},{default:C(()=>[k(u(r(w)),1)]),_:1})]),_:1})):z("",!0),r(g)?(t(),a(y,{key:1},[d("div",Ne,[o(Q,{modelValue:r(i),"onUpdate:modelValue":m[3]||(m[3]=L=>ee(i)?i.value=L:null),class:"min-w-0 flex-1 gap-0"},{default:C(()=>[o(O,{class:"h-8 max-w-full justify-start! overflow-x-auto"},{default:C(()=>[o(N,{value:"diff",class:"min-w-fit shrink-0 cursor-pointer rounded-sm px-1.5 text-xs",onClick:m[1]||(m[1]=L=>i.value="diff")},{default:C(()=>[o(I,{name:"hugeicons:git-compare",class:"shrink-0 size-3.5"}),m[6]||(m[6]=k(" Diff View ")),r($)?(t(),a("span",Pe,u(r(g).summary.added+r(g).summary.removed+r(g).summary.modified),1)):z("",!0)]),_:1}),o(N,{value:"sql",class:"min-w-fit shrink-0 cursor-pointer rounded-sm px-1.5 text-xs",onClick:m[2]||(m[2]=L=>i.value="sql")},{default:C(()=>[o(I,{name:"hugeicons:code",class:"shrink-0 size-3.5"}),m[7]||(m[7]=k(" SQL ")),r(g).sql.statements.length>0?(t(),a("span",Ue,u(r(g).sql.statements.length),1)):z("",!0)]),_:1})]),_:1})]),_:1},8,["modelValue"]),d("div",Ae,u(r(i)==="diff"?"Visualize structural differences":"Review synchronization script"),1)]),r(i)==="diff"?(t(),a("div",Ee,[o(Be,{result:r(g)},null,8,["result"])])):(t(),a("div",Fe,[o(ke,{sql:r(c),"safe-mode":r(e),"statement-count":r(g).sql.statements.length,"destructive-count":r(s),"onUpdate:safeMode":m[4]||(m[4]=L=>e.value=L)},null,8,["sql","safe-mode","statement-count","destructive-count"])]))],64)):r(v)?z("",!0):(t(),a("div",Oe,[o(I,{name:"hugeicons:git-compare",class:"size-14 opacity-30"}),m[8]||(m[8]=d("p",{class:"text-sm"},"Select a target connection and run the diff",-1))]))])}}});export{Xe as _};
@@ -1 +1 @@
1
- import{d as l,e as i,o as u,n as p,g as c,j as m,D as f,a6 as n}from"./BcsKoAPU.js";const L=l({__name:"AlertTitle",props:{class:{}},setup(e){const t=e;return(a,s)=>(u(),i("h5",{class:p(c(m)("mb-1 font-medium leading-none tracking-tight",t.class))},[f(a.$slots,"default")],2))}}),d={[n.POSTGRES]:{label:"PostgreSQL native backup artifacts",tools:"pg_dump / pg_restore / psql",supported:!0,defaultFormat:"custom",formats:[{format:"custom",extension:".dump",label:"PostgreSQL custom archive (.dump)"},{format:"plain",extension:".sql",label:"PostgreSQL plain SQL script (.sql)"}]},[n.MYSQL]:{label:"MySQL native SQL dump (.sql)",tools:"mysqlpump or mysqldump / mysql",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"MySQL native SQL dump (.sql)"}]},[n.MARIADB]:{label:"MariaDB native SQL dump (.sql)",tools:"mysqlpump or mysqldump / mysql",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"MariaDB native SQL dump (.sql)"}]},[n.SQLITE3]:{label:"SQLite native SQL dump (.sql)",tools:"sqlite3 .dump / sqlite3",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"SQLite native SQL dump (.sql)"}]},[n.ORACLE]:{label:"Oracle Data Pump dump (.dmp)",tools:"expdp / impdp",supported:!1,defaultFormat:"custom",formats:[{format:"custom",extension:".dmp",label:"Oracle Data Pump dump (.dmp)"}],reason:"Oracle native backup is not enabled yet because Data Pump writes files to a server-side DIRECTORY object. HeraQ needs explicit Oracle DIRECTORY and artifact retrieval configuration before this can be offered safely."}};function r(e){switch(e){case n.POSTGRES:return"PostgreSQL";case n.MYSQL:return"MySQL";case n.MARIADB:return"MariaDB";case n.SQLITE3:return"SQLite";case n.ORACLE:return"Oracle";case n.MSSQL:return"SQL Server";case n.REDIS:return"Redis";case n.SNOWFLAKE:return"Snowflake";default:return e||"database"}}function o(e){return e&&d[e]||null}function S(e,t){const a=o(e);return a?!t||t==="native"?a.formats.find(s=>s.format===a.defaultFormat)||a.formats[0]||null:t!=="plain"&&t!=="custom"?null:a.formats.find(s=>s.format===t)||null:null}function Q(e){var t;return!!((t=o(e))!=null&&t.supported)}function b(e){var t;return((t=o(e))==null?void 0:t.formats)||[]}function g(e){var t;return((t=o(e))==null?void 0:t.defaultFormat)||"plain"}function q(e,t){var a;return((a=S(e,t))==null?void 0:a.extension)||".sql"}function B(e){const t=b(e).map(a=>a.extension);return[...new Set(t)].join(",")||".sql"}function k(e){var t;return((t=o(e))==null?void 0:t.tools)||"Native database tools"}function x(e){if(!e)return"Select a connection to open database tools.";const t=o(e);if(!t)return`${r(e)} native backup is not supported in this release.`;if(t.supported){const a=t.formats.map(s=>s.extension).join(" / ");return`${r(e)} native backup supports ${a} via ${t.tools}.`}return t.reason}export{L as _,b as a,k as b,q as c,r as d,x as e,B as f,g,Q as i};
1
+ import{d as l,e as i,o as u,n as p,g as c,j as m,D as f,a6 as n}from"./D0lW43G8.js";const L=l({__name:"AlertTitle",props:{class:{}},setup(e){const t=e;return(a,s)=>(u(),i("h5",{class:p(c(m)("mb-1 font-medium leading-none tracking-tight",t.class))},[f(a.$slots,"default")],2))}}),d={[n.POSTGRES]:{label:"PostgreSQL native backup artifacts",tools:"pg_dump / pg_restore / psql",supported:!0,defaultFormat:"custom",formats:[{format:"custom",extension:".dump",label:"PostgreSQL custom archive (.dump)"},{format:"plain",extension:".sql",label:"PostgreSQL plain SQL script (.sql)"}]},[n.MYSQL]:{label:"MySQL native SQL dump (.sql)",tools:"mysqlpump or mysqldump / mysql",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"MySQL native SQL dump (.sql)"}]},[n.MARIADB]:{label:"MariaDB native SQL dump (.sql)",tools:"mysqlpump or mysqldump / mysql",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"MariaDB native SQL dump (.sql)"}]},[n.SQLITE3]:{label:"SQLite native SQL dump (.sql)",tools:"sqlite3 .dump / sqlite3",supported:!0,defaultFormat:"plain",formats:[{format:"plain",extension:".sql",label:"SQLite native SQL dump (.sql)"}]},[n.ORACLE]:{label:"Oracle Data Pump dump (.dmp)",tools:"expdp / impdp",supported:!1,defaultFormat:"custom",formats:[{format:"custom",extension:".dmp",label:"Oracle Data Pump dump (.dmp)"}],reason:"Oracle native backup is not enabled yet because Data Pump writes files to a server-side DIRECTORY object. HeraQ needs explicit Oracle DIRECTORY and artifact retrieval configuration before this can be offered safely."}};function r(e){switch(e){case n.POSTGRES:return"PostgreSQL";case n.MYSQL:return"MySQL";case n.MARIADB:return"MariaDB";case n.SQLITE3:return"SQLite";case n.ORACLE:return"Oracle";case n.MSSQL:return"SQL Server";case n.REDIS:return"Redis";case n.SNOWFLAKE:return"Snowflake";default:return e||"database"}}function o(e){return e&&d[e]||null}function S(e,t){const a=o(e);return a?!t||t==="native"?a.formats.find(s=>s.format===a.defaultFormat)||a.formats[0]||null:t!=="plain"&&t!=="custom"?null:a.formats.find(s=>s.format===t)||null:null}function Q(e){var t;return!!((t=o(e))!=null&&t.supported)}function b(e){var t;return((t=o(e))==null?void 0:t.formats)||[]}function g(e){var t;return((t=o(e))==null?void 0:t.defaultFormat)||"plain"}function q(e,t){var a;return((a=S(e,t))==null?void 0:a.extension)||".sql"}function B(e){const t=b(e).map(a=>a.extension);return[...new Set(t)].join(",")||".sql"}function k(e){var t;return((t=o(e))==null?void 0:t.tools)||"Native database tools"}function x(e){if(!e)return"Select a connection to open database tools.";const t=o(e);if(!t)return`${r(e)} native backup is not supported in this release.`;if(t.supported){const a=t.formats.map(s=>s.extension).join(" / ");return`${r(e)} native backup supports ${a} via ${t.tools}.`}return t.reason}export{L as _,b as a,k as b,q as c,r as d,x as e,B as f,g,Q as i};