isorite 0.16.0 → 0.18.0

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 (109) hide show
  1. package/dist/main.js +1634 -62
  2. package/package.json +4 -1
  3. package/web/_app/immutable/assets/0.BGpjfMlq.css +1 -0
  4. package/web/_app/immutable/assets/4.Dn5sJ8uq.css +1 -0
  5. package/web/_app/immutable/assets/5.DJhOSn7C.css +1 -0
  6. package/web/_app/immutable/assets/NoteList.Wxp_AH0Y.css +1 -0
  7. package/web/_app/immutable/chunks/{BQeONalw.js → -_CDfwKC.js} +1 -1
  8. package/web/_app/immutable/chunks/{BtcGx-KQ.js → -oRvYXNk.js} +1 -1
  9. package/web/_app/immutable/chunks/0qd6IUbO.js +1 -0
  10. package/web/_app/immutable/chunks/{DbtvzL7r.js → 7faei0hL.js} +1 -1
  11. package/web/_app/immutable/chunks/{zasx25UV.js → BArcFmbE.js} +3 -3
  12. package/web/_app/immutable/chunks/BF1TezEe.js +1 -0
  13. package/web/_app/immutable/chunks/{Kem7IXj7.js → BF3mdiSX.js} +1 -1
  14. package/web/_app/immutable/chunks/BFOLKM4z.js +1 -0
  15. package/web/_app/immutable/chunks/{BPpUSQ2Y.js → BezGs1Zj.js} +1 -1
  16. package/web/_app/immutable/chunks/Bg-39frG.js +1 -0
  17. package/web/_app/immutable/chunks/BleKqNM1.js +1 -0
  18. package/web/_app/immutable/chunks/{e7GRa0yc.js → BpHE30PI.js} +1 -1
  19. package/web/_app/immutable/chunks/{DAVMwq6b.js → BtF1frCE.js} +1 -1
  20. package/web/_app/immutable/chunks/{0B47b24t.js → BuNfZSU6.js} +1 -1
  21. package/web/_app/immutable/chunks/{BAVnZFPa.js → BubCsN15.js} +1 -1
  22. package/web/_app/immutable/chunks/{CcE14TDI.js → BvhVny3O.js} +1 -1
  23. package/web/_app/immutable/chunks/{C9Qdslk3.js → Bvs-JCN-.js} +1 -1
  24. package/web/_app/immutable/chunks/{DFo4P1vU.js → C-F98t31.js} +1 -1
  25. package/web/_app/immutable/chunks/{Cpjqsnqr.js → C1OaBy7n.js} +1 -1
  26. package/web/_app/immutable/chunks/{C8FxuPry.js → C4SqDe8e.js} +1 -1
  27. package/web/_app/immutable/chunks/{D9uNsgxP.js → C74H8jNb.js} +1 -1
  28. package/web/_app/immutable/chunks/{CUNetmvQ.js → C7bouMY8.js} +1 -1
  29. package/web/_app/immutable/chunks/{BiHyHFlW.js → C8IrXs1w.js} +1 -1
  30. package/web/_app/immutable/chunks/{MrW4zd8l.js → CGGjDDVZ.js} +1 -1
  31. package/web/_app/immutable/chunks/{Wv-ICQRy.js → CL9QeiGC.js} +85 -85
  32. package/web/_app/immutable/chunks/{BLzZIf7l.js → CMAnq3x6.js} +1 -1
  33. package/web/_app/immutable/chunks/{OG9GsKke.js → CMe14KUo.js} +1 -1
  34. package/web/_app/immutable/chunks/{DW5uy3Jw.js → CXc9Iibq.js} +1 -1
  35. package/web/_app/immutable/chunks/Cb-KPahQ.js +1 -0
  36. package/web/_app/immutable/chunks/{DWwu8a1P.js → Cf13Ew0A.js} +1 -1
  37. package/web/_app/immutable/chunks/CkSjC-iE.js +9 -0
  38. package/web/_app/immutable/chunks/{DY0M2GMn.js → Cn8Mg7_E.js} +1 -1
  39. package/web/_app/immutable/chunks/{f7mFVWQS.js → CoeYsgbS.js} +1 -1
  40. package/web/_app/immutable/chunks/{CZSmkKvQ.js → CrqOdm1D.js} +1 -1
  41. package/web/_app/immutable/chunks/{CVqwkR8N.js → CyJXJYoE.js} +1 -1
  42. package/web/_app/immutable/chunks/{AnnzTlE8.js → Cz6kYWmu.js} +1 -1
  43. package/web/_app/immutable/chunks/{ZTEErEOd.js → CzbFy3_5.js} +1 -1
  44. package/web/_app/immutable/chunks/{Ih6r6QR2.js → D-9suc4b.js} +1 -1
  45. package/web/_app/immutable/chunks/{BZX8cNYL.js → D37hxBaz.js} +1 -1
  46. package/web/_app/immutable/chunks/D7yT4F_8.js +517 -0
  47. package/web/_app/immutable/chunks/{DxRGLDbV.js → DNs5kWvM.js} +1 -1
  48. package/web/_app/immutable/chunks/DQp-M3XN.js +1 -0
  49. package/web/_app/immutable/chunks/{D7jLdCNu.js → DR5d84Z7.js} +1 -1
  50. package/web/_app/immutable/chunks/{DH_19--P.js → DaEL1AOW.js} +1 -1
  51. package/web/_app/immutable/chunks/{CSKABQj2.js → Dazeexma.js} +1 -1
  52. package/web/_app/immutable/chunks/{mhWk5y4o.js → Dc2_04md.js} +1 -1
  53. package/web/_app/immutable/chunks/{1j--pDqt.js → Dcjgv4h2.js} +1 -1
  54. package/web/_app/immutable/chunks/{CSTv2fL0.js → DgI3Vj5v.js} +1 -1
  55. package/web/_app/immutable/chunks/{B7LnLClC.js → Dgko1xMH.js} +1 -1
  56. package/web/_app/immutable/chunks/{DEQsS4Ez.js → DlgOmQ_G.js} +1 -1
  57. package/web/_app/immutable/chunks/{BLe29cGh.js → DmS5Qyvl.js} +1 -1
  58. package/web/_app/immutable/chunks/{CglDFp51.js → DqnDX3G8.js} +1 -1
  59. package/web/_app/immutable/chunks/{CTuuQ66F.js → DyZdoKBK.js} +1 -1
  60. package/web/_app/immutable/chunks/{CUB9vnd0.js → DzAOHjhV.js} +1 -1
  61. package/web/_app/immutable/chunks/{DJT73ARj.js → Iqegk1SI.js} +1 -1
  62. package/web/_app/immutable/chunks/{Mwr1r9aw.js → ONqdwA3r.js} +1 -1
  63. package/web/_app/immutable/chunks/{Bytzbt5l.js → Oikibjm2.js} +1 -1
  64. package/web/_app/immutable/chunks/{C1FDDux-.js → T3u7Skc8.js} +1 -1
  65. package/web/_app/immutable/chunks/{Ch5Z7cbP.js → cWWhqL1F.js} +1 -1
  66. package/web/_app/immutable/chunks/{CwHHpacD.js → fRXyV4Ec.js} +1 -1
  67. package/web/_app/immutable/chunks/{CWc-mNzo.js → jAC4YCqW.js} +1 -1
  68. package/web/_app/immutable/chunks/{hjSZ041d.js → kFEqmLql.js} +1 -1
  69. package/web/_app/immutable/chunks/{BtYMl4bD.js → y0C1JQ1v.js} +1 -1
  70. package/web/_app/immutable/chunks/{DJQ6favH.js → yvD4_bP8.js} +1 -1
  71. package/web/_app/immutable/entry/app.CyEmP0i2.js +2 -0
  72. package/web/_app/immutable/entry/start.BxCHvKWL.js +1 -0
  73. package/web/_app/immutable/nodes/0.Bkbiw_sA.js +11 -0
  74. package/web/_app/immutable/nodes/1.kdx6h8ts.js +1 -0
  75. package/web/_app/immutable/nodes/2.CtK7BGB8.js +1 -0
  76. package/web/_app/immutable/nodes/3.D5PZa2kH.js +1 -0
  77. package/web/_app/immutable/nodes/4.DzS8oPUH.js +3 -0
  78. package/web/_app/immutable/nodes/5.B-1BDKsL.js +19 -0
  79. package/web/_app/immutable/nodes/6.DDT1DtCg.js +1 -0
  80. package/web/_app/immutable/nodes/7.CCNCaItj.js +1 -0
  81. package/web/_app/immutable/workers/worker-C_nKscAW.js +1 -0
  82. package/web/_app/version.json +1 -1
  83. package/web/fonts/LythMono-LICENSE.md +112 -0
  84. package/web/fonts/lyth-mono-latin-bold.woff2 +0 -0
  85. package/web/fonts/lyth-mono-latin-bolditalic.woff2 +0 -0
  86. package/web/fonts/lyth-mono-latin-italic.woff2 +0 -0
  87. package/web/fonts/lyth-mono-latin-regular.woff2 +0 -0
  88. package/web/index.html +19 -17
  89. package/web/_app/immutable/assets/0.BEFtmzIh.css +0 -1
  90. package/web/_app/immutable/assets/4.LR47AJKA.css +0 -1
  91. package/web/_app/immutable/assets/NoteList.C2GYAaLW.css +0 -1
  92. package/web/_app/immutable/chunks/BHORylQC.js +0 -1
  93. package/web/_app/immutable/chunks/BMijTvgG.js +0 -1
  94. package/web/_app/immutable/chunks/C7qBBO-i.js +0 -1
  95. package/web/_app/immutable/chunks/CA-rzUq8.js +0 -524
  96. package/web/_app/immutable/chunks/DtEVmiYo.js +0 -1
  97. package/web/_app/immutable/chunks/Qej0SEux.js +0 -1
  98. package/web/_app/immutable/chunks/TmxIGCN3.js +0 -1
  99. package/web/_app/immutable/entry/app.B9TPZNFw.js +0 -2
  100. package/web/_app/immutable/entry/start.WU9HKeyT.js +0 -1
  101. package/web/_app/immutable/nodes/0.C9NFEqJd.js +0 -3
  102. package/web/_app/immutable/nodes/1.B5PJwWOG.js +0 -1
  103. package/web/_app/immutable/nodes/2.DRtC7zjs.js +0 -1
  104. package/web/_app/immutable/nodes/3.EEMisvUL.js +0 -1
  105. package/web/_app/immutable/nodes/4.DthmsFQC.js +0 -19
  106. package/web/_app/immutable/nodes/5.CEu0DlpQ.js +0 -1
  107. package/web/_app/immutable/nodes/6.DzvF0ZPt.js +0 -1
  108. package/web/_app/immutable/workers/worker-CWkpeSVG.js +0 -1
  109. /package/web/_app/immutable/assets/{6.C00vyVPo.css → 7.C00vyVPo.css} +0 -0
@@ -1,2 +1,2 @@
1
- import{_ as e,a as t,f as n,i as r,o as i,s as a,u as o,x as s}from"./DEQsS4Ez.js";import{n as c,r as l}from"./DciMwFJ1.js";import{PeleError as u,c as d,d as f,g as p,i as m,s as h,u as g}from"./zasx25UV.js";var _=class{type=`sankey`;nodes=[];links=[];title;accTitle;accDescr;lookup=new Map;findOrCreateNode(e){let t=this.lookup.get(e);return t===void 0&&(t={id:e,index:this.nodes.length},this.lookup.set(e,t),this.nodes.push(t)),t}addLink(e,t,n){this.links.push({source:e,target:t,value:n})}},v=[`$end`,`STUCK`,`SANKEY`,`NEWLINE`,`COMMA`,`DQUOTE`,`NON_ESCAPED_TEXT`,`ESCAPED_TEXT`,`EOF`];function y(e){return e>=32&&e<=126&&e!==34&&e!==44||e>=160&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}function b(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},l=t=>e.slice(s,s+t.length).toLowerCase()===t&&!p(e.charCodeAt(s+t.length));for(;s<t;){let u=e.charCodeAt(s),d=s,f=s;if(o===2){if(u===34&&e.charCodeAt(s+1)!==34){a.length>0&&(o=a.pop()),c(5,s,s+1);continue}for(;f<t;){let t=e.codePointAt(f);if(y(t)||t===44||t===13||t===10)f+=t>65535?2:1;else if(t===34&&e.charCodeAt(f+1)===34)f+=2;else break}c(7,s,f)}else{if(o===0&&(u|32)==115){let e=l(`sankey-beta`)?11:l(`sankey`)?6:0;if(e>0){a.push(o),o=1,c(2,s,s+e);continue}}if(u===10||u===13&&e.charCodeAt(s+1)===10){c(3,s,u===10?s+1:s+2);continue}if(u===44){c(4,s,s+1);continue}if(u===34){a.push(o),o=2,c(5,s,s+1);continue}for(;f<t;){let t=e.codePointAt(f);if(!y(t))break;f+=t>65535?2:1}c(6,s,f)}if(f===d)return c(1,s,s),{types:n,texts:r,starts:i}}return c(o===2?7:8,t,t),c(0,t,t),{types:n,texts:r,starts:i}}var x=/[\n\r]+/g,S=/[\x00-\x08\x0b\x0c\x0e-\x1f\ud800-\udfff\ufffe\uffff]/u;function C(e){return e===10||e===13?!1:e<128?e===32||e===9||e===11||e===12:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function w(e,t){let n=0,r=e.length;for(;n<r&&C(e.charCodeAt(n));)n++;for(;r>n&&C(e.charCodeAt(r-1));)r--;let i=e.slice(n,r),a=i.replace(x,`
1
+ import{_ as e,a as t,f as n,i as r,o as i,s as a,u as o,x as s}from"./DlgOmQ_G.js";import{n as c,r as l}from"./DciMwFJ1.js";import{PeleError as u,c as d,d as f,g as p,i as m,s as h,u as g}from"./BArcFmbE.js";var _=class{type=`sankey`;nodes=[];links=[];title;accTitle;accDescr;lookup=new Map;findOrCreateNode(e){let t=this.lookup.get(e);return t===void 0&&(t={id:e,index:this.nodes.length},this.lookup.set(e,t),this.nodes.push(t)),t}addLink(e,t,n){this.links.push({source:e,target:t,value:n})}},v=[`$end`,`STUCK`,`SANKEY`,`NEWLINE`,`COMMA`,`DQUOTE`,`NON_ESCAPED_TEXT`,`ESCAPED_TEXT`,`EOF`];function y(e){return e>=32&&e<=126&&e!==34&&e!==44||e>=160&&e<=55295||e>=57344&&e<=65533||e>=65536&&e<=1114111}function b(e){let t=e.length,n=[],r=[],i=[],a=[],o=0,s=0,c=(t,a,o)=>{n.push(t),r.push(e.slice(a,o)),i.push(a),s=o},l=t=>e.slice(s,s+t.length).toLowerCase()===t&&!p(e.charCodeAt(s+t.length));for(;s<t;){let u=e.charCodeAt(s),d=s,f=s;if(o===2){if(u===34&&e.charCodeAt(s+1)!==34){a.length>0&&(o=a.pop()),c(5,s,s+1);continue}for(;f<t;){let t=e.codePointAt(f);if(y(t)||t===44||t===13||t===10)f+=t>65535?2:1;else if(t===34&&e.charCodeAt(f+1)===34)f+=2;else break}c(7,s,f)}else{if(o===0&&(u|32)==115){let e=l(`sankey-beta`)?11:l(`sankey`)?6:0;if(e>0){a.push(o),o=1,c(2,s,s+e);continue}}if(u===10||u===13&&e.charCodeAt(s+1)===10){c(3,s,u===10?s+1:s+2);continue}if(u===44){c(4,s,s+1);continue}if(u===34){a.push(o),o=2,c(5,s,s+1);continue}for(;f<t;){let t=e.codePointAt(f);if(!y(t))break;f+=t>65535?2:1}c(6,s,f)}if(f===d)return c(1,s,s),{types:n,texts:r,starts:i}}return c(o===2?7:8,t,t),c(0,t,t),{types:n,texts:r,starts:i}}var x=/[\n\r]+/g,S=/[\x00-\x08\x0b\x0c\x0e-\x1f\ud800-\udfff\ufffe\uffff]/u;function C(e){return e===10||e===13?!1:e<128?e===32||e===9||e===11||e===12:e===160||e===5760||e>=8192&&e<=8202||e===8232||e===8233||e===8239||e===8287||e===12288||e===65279}function w(e,t){let n=0,r=e.length;for(;n<r&&C(e.charCodeAt(n));)n++;for(;r>n&&C(e.charCodeAt(r-1));)r--;let i=e.slice(n,r),a=i.replace(x,`
2
2
  `),o=a.trim();if(t!==void 0){let s=a.length-a.trimStart().length;t.push([[0,n,0],[r,e.length,0]],d(i,x,1),[[0,s,0],[s+o.length,a.length,0]])}return o}function T(e,t,n=e){let{types:r,texts:i,starts:a}=b(e),o=0,s=(t,r)=>{let i=[];n!==e&&w(n,i);let a=t>0&&t>=e.length?m(i,e.length-1)+1:m(i,t);return h(`sankey`,n,a,r)},c=e=>{let t=r[o],n=t===1?v[r[o-1]]:v[t];throw s(a[o],`Expecting ${e}, got '${n}'`)},l=(e,t=``)=>{r[o]!==e&&c(`'${v[e]}'${t}`),o++},u=()=>{if(r[o]===6)return i[o++];r[o]!==5&&c(`'DQUOTE', 'NON_ESCAPED_TEXT'`),o++,r[o]!==7&&c(`'ESCAPED_TEXT'`);let e=i[o++];return l(5),e},d=()=>{let e=a[o],t=u().trim().replaceAll(`""`,`"`);if(S.test(f(t)))throw s(e,`Invalid XML character in node name`);return t};for(l(2),l(3);;){let e=d();l(4,`, 'NEWLINE', 'EOF'`);let n=d();l(4,`, 'NEWLINE', 'EOF'`);let i=a[o],c=parseFloat(u());if(!Number.isFinite(c))throw s(i,`Expecting a number`);let f=t.findOrCreateNode(e),p=t.findOrCreateNode(n);if(t.addLink(f,p,c),r[o]!==3)break;o++}r[o]===8&&o++,r[o]!==0&&c(`'NEWLINE', 'EOF'`)}var ee=6;function E(e,t){if(e.length>8)e.sort(t);else for(let n=1;n<e.length;n++){let r=e[n],i=n-1;for(;i>=0&&t(e[i],r)>0;)e[i+1]=e[i],i--;e[i+1]=r}}function D(e,t){let n=e.nodes.length,r=e.links.map(e=>({source:e.source.index,target:e.target.index,value:Number.isFinite(e.value)&&e.value>0?e.value:0,thickness:0,sourceY:0,targetY:0})),i=[],a=[];for(let e=0;e<n;e++)i.push([]),a.push([]);r.forEach((e,t)=>{i[e.source].push(t),a[e.target].push(t)});let o=new Int32Array(n),s=new Int32Array(n),c=[];for(let e=0;e<n;e++)s[e]=a[e].length,s[e]===0&&c.push(e);for(let e=0;e<c.length;e++){let t=c[e];for(let e of i[t]){let n=r[e].target;o[n]<o[t]+1&&(o[n]=o[t]+1),--s[n]===0&&c.push(n)}}if(c.length<n){let t=0;for(;s[t]===0;)t++;let i=new Uint8Array(n);for(;i[t]===0;){i[t]=1;for(let e of a[t])if(s[r[e].source]>0){t=r[e].source;break}}throw new u(`Sankey diagrams cannot have circular links, and "${e.nodes[t].id}" is part of one.`,`semantic`,{type:`sankey`})}let l=1;for(let e=0;e<n;e++)o[e]+1>l&&(l=o[e]+1);let d=new Int32Array(n);for(let e=n-1;e>=0;e--){let t=c[e];for(let e of i[t])d[t]<d[r[e].target]+1&&(d[t]=d[r[e].target]+1)}let f=0;for(let e of r)e.value>f&&(f=e.value);let p=f>0?1/f:0,m=[],h=new Float64Array(n),g=[];for(let e=0;e<l;e++)g.push([]);let _=l>1?(t.width-t.nodeWidth)/(l-1):0;for(let e=0;e<n;e++){let n;if(t.alignment===`left`)n=o[e];else if(t.alignment===`right`)n=l-1-d[e];else if(t.alignment===`center`){if(n=o[e],a[e].length===0&&i[e].length>0){n=l;for(let t of i[e])o[r[t].target]-1<n&&(n=o[r[t].target]-1)}}else n=i[e].length>0?o[e]:l-1;let s=0,c=0,u=0,f=0;for(let t of a[e])s+=r[t].value*p,u+=r[t].value;for(let t of i[e])c+=r[t].value*p,f+=r[t].value;h[e]=Math.max(s,c),m.push({layer:n,value:Math.max(u,f),x:n*_,y:0,height:0}),g[n].push(e)}let v=1;for(let e of g)e.length>v&&(v=e.length);let y=v>1?Math.min(t.nodePadding,t.height/(v-1)):t.nodePadding,b=1/0;for(let e of g){let n=0;for(let t of e)n+=h[t];n>0&&(b=Math.min(b,(t.height-(e.length-1)*y)/n))}(!Number.isFinite(b)||b<0)&&(b=0);let x=Math.max(0,t.labelHeight-y),S=e=>{for(let n of g){let r=(n.length-1)*y;for(let t of n)r+=Math.max(h[t]*e,x);if(r>t.height+1e-6)return!1}return!0};if(x>0&&!S(b)){if(S(0)){let e=0;for(let t=0;t<40;t++){let t=(e+b)/2;S(t)?e=t:b=t}b=e}else x=0}let C=new Float64Array(n);for(let e of r)e.thickness=e.value*p*b;for(let e of g){let n=0;for(let t of e)m[t].height=h[t]*b,C[t]=Math.max(0,x-m[t].height)/2,m[t].y=n+C[t],n+=m[t].height+2*C[t]+y;let r=(t.height-n+y)/(e.length+1);e.forEach((e,t)=>m[e].y+=r*(t+1))}let w=e=>m[e].y+m[e].height/2,T=new Float64Array(r.length),D=new Float64Array(r.length),O=(e,t)=>w(r[e].target)-w(r[t].target)||e-t,k=(e,t)=>w(r[e].source)-w(r[t].source)||e-t,te=(e,t)=>w(e)-w(t)||e-t,A=e=>{let t=0;E(i[e],O);for(let n of i[e])T[n]=t+r[n].thickness/2,t+=r[n].thickness},j=e=>{let t=0;E(a[e],k);for(let n of a[e])D[n]=t+r[n].thickness/2,t+=r[n].thickness},M=()=>{for(let e=0;e<n;e++)A(e),j(e)},N=(e,n,o)=>{for(let t of e){let e=o?a[t]:i[t];if(e.length===0)continue;o?j(t):A(t);let s=0,c=0,l=0;for(let n of e){let e=o?m[r[n].source].y+T[n]-D[n]:m[r[n].target].y+D[n]-T[n];s+=e*r[n].thickness,c+=r[n].thickness,l+=w(o?r[n].source:r[n].target)-m[t].height/2}let u=c>0?s/c:l/e.length;m[t].y+=(u-m[t].y)*n}E(e,te);let s=0;for(let t of e)m[t].y-C[t]<s&&(m[t].y=s+C[t]),s=m[t].y+m[t].height+C[t]+y;s=t.height;for(let t=e.length-1;t>=0;t--){let n=e[t];m[n].y+m[n].height+C[n]>s&&(m[n].y=s-m[n].height-C[n]),s=m[n].y-C[n]-y}};M();for(let e=0;e<ee;e++){let t=.99**e;for(let e=l-2;e>=0;e--)N(g[e],t,!1);M();for(let e=1;e<l;e++)N(g[e],t,!0);M()}for(let e=0;e<r.length;e++)r[e].sourceY=m[r[e].source].y+T[e],r[e].targetY=m[r[e].target].y+D[e];return{nodes:m,links:r}}var O=6,k=15,te=1.8,A=300;function j(e){let t=2166136261,n=5381;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r);t=Math.imul(t^i,16777619),n=Math.imul(n,33)+i|0}return(t>>>0).toString(36)+(n>>>0).toString(36)}function M(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function N(e,t,n,r,i){let a=e[t];return typeof a==`number`&&a>=r?Math.min(a,i):n}function ne(e,t){let n=e[t];return typeof n==`string`||typeof n==`number`&&Number.isFinite(n)?String(n):``}function re(e){return Math.abs(e)<0x38d7ea4c68000?Math.round(e*100)/100:e}function ie(e){return typeof e==`string`?a([`fill:${e}`]).shape:``}function P(e,t,n){let r=M(t.sankey)?t.sankey:{},i=N(r,`width`,600,1,1e4);return c(n,i,160,t=>F(e,r,n,t,i))}function F(a,c,u,d,p){let m=u.fontSize??16,h=Math.round(m*.625),_=Math.max(h,Math.round(m*.875*Math.min(1,d/p))),v=u.measurer??g(u.fontFamily,u.fontFamilyMono),y=u.padding??8,b=N(c,`height`,400,1,1e4),x=Math.min(N(c,`nodeWidth`,10,1,200),d),S=c.showValues!==!1,C=f(ne(c,`prefix`)),w=f(ne(c,`suffix`)),T=c.labelStyle===`outlined`,ee=c.nodeAlignment===`left`||c.nodeAlignment===`right`||c.nodeAlignment===`center`?c.nodeAlignment:`justify`,E=typeof c.linkColor==`string`?c.linkColor:`gradient`,P=e=>D(a,{width:d,height:b,nodeWidth:x,nodePadding:N(c,`nodePadding`,12,0,200)+(S?k:0),labelHeight:e*1.15,alignment:ee}),F=P(_),I=new Map,L=1;for(let e of F.nodes){let t=(I.get(e.layer)??0)+1;I.set(e.layer,t),t>L&&(L=t)}let R=Math.max(h,Math.round(b/L/te));R<_&&(_=R,F=P(_));let{nodes:z,links:ae}=F,B=_*1.5,V=new Map;if(M(c.nodeColors))for(let[e,t]of Object.entries(c.nodeColors)){let n=ie(t);n&&V.set(e,n)}let H=e=>V.get(a.nodes[e].id)??``,U=e=>/^ style="fill:(.*);"$/.exec(H(e))?.[1]??n(e),W=0,G=0;z.forEach(e=>{e.value>G&&(G=e.value,W=e.layer)});let K=0,q=d,J=0,Y=b,oe=z.map((e,t)=>{let n=f(a.nodes[t].id),r=S?`${C}${re(e.value)}${w}`:``,i=v.width(r?`${n} ${r}`:n,_,0),o=T?e.layer>=W:e.x<d/2,s=o?e.x+x+O:e.x-O,c=e.y+e.height/2;return K=Math.min(K,o?s:s-i),q=Math.max(q,o?s+i:s),J=Math.min(J,c-_*.75),Y=Math.max(Y,c+_*.75),{value:r,width:i,after:o,left:o?s:s-i,y:c}}),X=new Map;if(z.length<=A)for(let e of oe){let t=Math.floor(e.y/B);for(let n of[t-2,t-1,t,t+1,t+2]){let t=X.get(n);t?t.push(e):X.set(n,[e])}}let se=``,ce=``;z.forEach((e,i)=>{let o=a.nodes[i].id,c=f(o),l=Math.max(e.height,1);ce+=`<rect class="pele-sankey-node" data-id="${r(o)}" x="${s(e.x)}" y="${s(e.y)}" width="${s(x)}" height="${s(l)}" rx="${s(Math.min(2,l/2))}" fill="${n(i)}"${H(i)}/>`;let u=oe[i],d=(e,t)=>(X.get(Math.floor(t/B))??[]).some(n=>n!==u&&Math.abs(n.y-t)<B&&e<n.left+n.width+O&&e+u.width>n.left-O);if(z.length<=A&&d(u.left,u.y))e:for(let t of[0,-B,B])for(let n of[u.after,!u.after]){let r=n?e.x+x+O:e.x-O-u.width,a=u.y+t;if(d(r,a)||r<K||r+u.width>q||a-_*.75<J||a+_*.75>Y||z.some((e,t)=>t!==i&&r<e.x+x+O&&r+u.width>e.x-O&&a-_*.75<e.y+e.height&&a+_*.75>e.y))continue;let o=Math.max(0,e.y-a,a-e.y-e.height);if(!z.some((t,n)=>n!==i&&t.x===e.x&&Math.max(0,t.y-a,a-t.y-t.height)<=o)){u.left=r,u.y=a,u.after=n;break e}}let{value:p,after:m,y:h}=u,g=m?e.x+x+O:e.x-O,v=` x="${s(g)}" y="${s(h+_*.35)}" text-anchor="${m?`start`:`end`}"`,y=t(c)+(p?` <tspan class="pele-sankey-value" fill="var(--_m)">${t(p)}</tspan>`:``);se+=`<g class="pele-label" data-id="${r(o)}">`+(T?`<text${v} fill="none" stroke="var(--_bg)" stroke-width="3" stroke-linejoin="round">${t(c)}${p?` `+t(p):``}</text>`:``)+`<text${v}>${y}</text></g>`});let le=E===`gradient`||E===`source`||E===`target`?``:ie(E),ue=u.idPrefix??``,de=E===`gradient`&&/^[\w-]+$/.test(ue),Z=new Map,fe=``;for(let e of ae){let i=E===`target`?e.target:e.source,o=Math.max(e.thickness,1)/2,c=z[e.source].x+x,l=z[e.target].x,u=`fill="${n(i)}"${le||H(i)}`;if(de){let t=`x1="${s(c)}" x2="${s(l)}"><stop offset="0" stop-color="${U(e.source)}"/><stop offset="1" stop-color="${U(e.target)}"/>`,n=`${ue}-sankey-${j(t)}`;Z.set(n,`<linearGradient id="${n}" gradientUnits="userSpaceOnUse" ${t}</linearGradient>`),u=`fill="url(#${n}) ${U(e.source)}"`}let d=s((c+l)/2),f=r(a.nodes[e.source].id),p=r(a.nodes[e.target].id);fe+=`<path class="pele-sankey-link" data-id="${f}-&gt;${p}" d="M${s(c)},${s(e.sourceY-o)}C${d},${s(e.sourceY-o)} ${d},${s(e.targetY-o)} ${s(l)},${s(e.targetY-o)}L${s(l)},${s(e.targetY+o)}C${d},${s(e.targetY+o)} ${d},${s(e.sourceY+o)} ${s(c)},${s(e.sourceY+o)}Z" ${u}><title>${f} → ${p}: ${t(C)}${re(e.value)}${t(w)}</title></path>`}let Q=o(a.title,!1,v,m,l(u),1),pe=Q.height>0?Q.height+12:0,me=Math.max(q-K,Q.width),he=y-K+(me-(q-K))/2,ge=y+pe-J,$=Math.ceil(me+2*y),_e=Math.ceil(Y-J+pe+2*y);return{svg:e(`sankey`,$,_e,m,u,a,i(Q,$/2,y+Q.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${s(he)},${s(ge)})">`+(Z.size>0?`<defs>${[...Z.values()].join(``)}</defs>`:``)+`<g class="pele-sankey-links" fill-opacity="0.4">${fe}</g><g class="pele-sankey-nodes">${ce}</g><g class="pele-labels" font-size="${_}">${se}</g></g>`),width:$,height:_e,links:[]}}var I={type:`sankey`,parse(e,t,n){let r=new _;return n&&(r.title=n),T(w(e),r,e),r},render:P};export{I as sankey};
@@ -1,2 +1,2 @@
1
- import{_ as e,f as t,i as n,o as r,u as i,x as a}from"./DEQsS4Ez.js";import{n as o}from"./BZX8cNYL.js";import{t as s}from"./DciMwFJ1.js";import{a as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C}from"./CWc-mNzo.js";import{PeleError as ee,u as te}from"./zasx25UV.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4};function T(e){throw new ee(e,`semantic`,{type:`gitGraph`})}function E(e){return e===`REVERSE`?w.REVERSE:e===`HIGHLIGHT`?w.HIGHLIGHT:w.NORMAL}function D(e,t){e.dir&&t.setDirection(e.dir);for(let n of e.statements)O(n,t)}function O(e,t){switch(e.$type){case`Commit`:t.commit({id:e.id,msg:e.message??``,type:e.type===void 0?w.NORMAL:E(e.type),tags:e.tags??void 0});break;case`Branch`:t.branch({name:e.name,order:e.order??0});break;case`Merge`:t.merge({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:E(e.type),tags:e.tags??void 0});break;case`Checkout`:t.checkout(e.branch);break;case`CherryPicking`:t.cherryPick({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent})}}function k(e,t,n){let r=t.gitGraph,i=typeof r?.mainBranchName==`string`?r.mainBranchName:`main`,a=typeof r?.mainBranchOrder==`number`?r.mainBranchOrder:0,o=new Map,s=new Map([[i,null]]),c=new Map([[i,a]]),l=[],u=null,d=i,f=`LR`,p=0,m=()=>{for(let e=p+1;;e+=2654435761){let t=`${p}-${(Math.imul(e,2654435761)>>>0).toString(16).padStart(8,`0`).slice(0,7)}`;if(!o.has(t))return t}},h=e=>{u=e,o.set(e.id,e),s.set(d,e.id)},g=e=>{s.has(e)||T(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`),d=e;let t=s.get(e);u=t?o.get(t)??null:null};D(e,{setDirection(e){f=e},commit({msg:e,id:t,type:n,tags:r}){let i={id:t||m(),message:e,seq:p++,type:n??w.NORMAL,tags:r?[...r]:[],parents:u===null?[]:[u.id],branch:d};o.has(i.id)&&l.push(`Commit ID ${i.id} already exists`),h(i)},branch({name:e,order:t}){s.has(e)&&T(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`),s.set(e,u===null?null:u.id),c.set(e,t),g(e)},merge({branch:e,id:t,type:n,tags:r}){let i=s.get(d),a=s.get(e),c=i?o.get(i):void 0,l=a?o.get(a):void 0;c&&l&&c.branch===e&&T(`Cannot merge branch '${e}' into itself.`),d===e&&T(`Incorrect usage of "merge". Cannot merge a branch to itself`),c===void 0&&T(`Incorrect usage of "merge". Current branch (${d})has no commits`),s.has(e)||T(`Incorrect usage of "merge". Branch to be merged (${e}) does not exist`),l===void 0&&T(`Incorrect usage of "merge". Branch to be merged (${e}) has no commits`),c===l&&T(`Incorrect usage of "merge". Both branches have same head`),t&&o.has(t)&&T(`Incorrect usage of "merge". Commit with id:${t} already exists, use different custom id`),h({id:t||m(),message:`merged branch ${e} into ${d}`,seq:p++,parents:u===null?[]:[u.id,a||``],branch:d,type:w.MERGE,customType:n,customId:!!t,tags:r?[...r]:[]})},cherryPick({id:e,targetId:t,tags:n,parent:r}){let i=e?o.get(e):void 0;if(i===void 0&&T(`Incorrect usage of "cherryPick". Source commit id should exist and provided`),r&&!i.parents.includes(r)&&T(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`),i.type===w.MERGE&&!r&&T(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`),t&&o.has(t))return;i.branch===d&&T(`Incorrect usage of "cherryPick". Source commit is already on current branch`);let a=s.get(d);(!a||!o.has(a))&&T(`Incorrect usage of "cherry-pick". Current branch (${d})has no commits`),h({id:m(),message:`cherry-picked ${i.message} into ${d}`,seq:p++,parents:u===null?[]:[u.id,i.id],branch:d,type:w.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${i.id}${i.type===w.MERGE?`|parent:${r}`:``}`]})},checkout:g});let _=[...c].map(([e,t],n)=>({name:e,order:t??parseFloat(`0.${n}`)})).sort((e,t)=>e.order-t.order).map(e=>e.name);return{type:`gitGraph`,title:e.title||n,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
1
+ import{_ as e,f as t,i as n,o as r,u as i,x as a}from"./DlgOmQ_G.js";import{n as o}from"./D37hxBaz.js";import{t as s}from"./DciMwFJ1.js";import{a as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C}from"./jAC4YCqW.js";import{PeleError as ee,u as te}from"./BArcFmbE.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4};function T(e){throw new ee(e,`semantic`,{type:`gitGraph`})}function E(e){return e===`REVERSE`?w.REVERSE:e===`HIGHLIGHT`?w.HIGHLIGHT:w.NORMAL}function D(e,t){e.dir&&t.setDirection(e.dir);for(let n of e.statements)O(n,t)}function O(e,t){switch(e.$type){case`Commit`:t.commit({id:e.id,msg:e.message??``,type:e.type===void 0?w.NORMAL:E(e.type),tags:e.tags??void 0});break;case`Branch`:t.branch({name:e.name,order:e.order??0});break;case`Merge`:t.merge({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:E(e.type),tags:e.tags??void 0});break;case`Checkout`:t.checkout(e.branch);break;case`CherryPicking`:t.cherryPick({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent})}}function k(e,t,n){let r=t.gitGraph,i=typeof r?.mainBranchName==`string`?r.mainBranchName:`main`,a=typeof r?.mainBranchOrder==`number`?r.mainBranchOrder:0,o=new Map,s=new Map([[i,null]]),c=new Map([[i,a]]),l=[],u=null,d=i,f=`LR`,p=0,m=()=>{for(let e=p+1;;e+=2654435761){let t=`${p}-${(Math.imul(e,2654435761)>>>0).toString(16).padStart(8,`0`).slice(0,7)}`;if(!o.has(t))return t}},h=e=>{u=e,o.set(e.id,e),s.set(d,e.id)},g=e=>{s.has(e)||T(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`),d=e;let t=s.get(e);u=t?o.get(t)??null:null};D(e,{setDirection(e){f=e},commit({msg:e,id:t,type:n,tags:r}){let i={id:t||m(),message:e,seq:p++,type:n??w.NORMAL,tags:r?[...r]:[],parents:u===null?[]:[u.id],branch:d};o.has(i.id)&&l.push(`Commit ID ${i.id} already exists`),h(i)},branch({name:e,order:t}){s.has(e)&&T(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`),s.set(e,u===null?null:u.id),c.set(e,t),g(e)},merge({branch:e,id:t,type:n,tags:r}){let i=s.get(d),a=s.get(e),c=i?o.get(i):void 0,l=a?o.get(a):void 0;c&&l&&c.branch===e&&T(`Cannot merge branch '${e}' into itself.`),d===e&&T(`Incorrect usage of "merge". Cannot merge a branch to itself`),c===void 0&&T(`Incorrect usage of "merge". Current branch (${d})has no commits`),s.has(e)||T(`Incorrect usage of "merge". Branch to be merged (${e}) does not exist`),l===void 0&&T(`Incorrect usage of "merge". Branch to be merged (${e}) has no commits`),c===l&&T(`Incorrect usage of "merge". Both branches have same head`),t&&o.has(t)&&T(`Incorrect usage of "merge". Commit with id:${t} already exists, use different custom id`),h({id:t||m(),message:`merged branch ${e} into ${d}`,seq:p++,parents:u===null?[]:[u.id,a||``],branch:d,type:w.MERGE,customType:n,customId:!!t,tags:r?[...r]:[]})},cherryPick({id:e,targetId:t,tags:n,parent:r}){let i=e?o.get(e):void 0;if(i===void 0&&T(`Incorrect usage of "cherryPick". Source commit id should exist and provided`),r&&!i.parents.includes(r)&&T(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`),i.type===w.MERGE&&!r&&T(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`),t&&o.has(t))return;i.branch===d&&T(`Incorrect usage of "cherryPick". Source commit is already on current branch`);let a=s.get(d);(!a||!o.has(a))&&T(`Incorrect usage of "cherry-pick". Current branch (${d})has no commits`),h({id:m(),message:`cherry-picked ${i.message} into ${d}`,seq:p++,parents:u===null?[]:[u.id,i.id],branch:d,type:w.CHERRY_PICK,tags:n?n.filter(Boolean):[`cherry-pick:${i.id}${i.type===w.MERGE?`|parent:${r}`:``}`]})},checkout:g});let _=[...c].map(([e,t],n)=>({name:e,order:t??parseFloat(`0.${n}`)})).sort((e,t)=>e.order-t.order).map(e=>e.name);return{type:`gitGraph`,title:e.title||n,accTitle:e.accTitle?e.accTitle.replace(/^\s+/g,``):void 0,accDescr:e.accDescr?e.accDescr.replace(/\n\s+/g,`
2
2
  `):void 0,direction:f,commits:o,branches:s,lanes:_,currentBranch:d,head:u,warnings:l}}var A={name:`REFERENCE`,pattern:/\w([-\./\w]*[-\w])?/y},j=[A];function M(e){return{name:e,pattern:e,longer:j}}var N=[M(`cherry-pick`),{name:`gitGraph:`,pattern:`gitGraph:`},M(`HIGHLIGHT`),{...m(`gitGraph`),longer:j},M(`checkout`),M(`REVERSE`),{name:`parent:`,pattern:`parent:`},M(`commit`),M(`NORMAL`),M(`branch`),{name:`order:`,pattern:`order:`},M(`switch`),{name:`type:`,pattern:`type:`},M(`merge`),{name:`msg:`,pattern:`msg:`},{name:`tag:`,pattern:`tag:`},{name:`id:`,pattern:`id:`},M(`LR`),M(`TB`),M(`BT`),{name:`:`,pattern:`:`},{...c,opener:/[\t ]*accDescr\s*{/y},S,y,{name:`INT`,pattern:/0|[1-9][0-9]*(?!\.)/y},g,h,C,b,v,x,A];function P(e){let t=new p(_(e,N,`gitGraph`),N,`gitGraph`),n={$type:`GitGraph`,statements:[]},r=()=>{if(t.kind!==-1)for(t.kind!==26&&t.fail(`a line break or the end of input`);t.kind===26;)t.i++},i=()=>t.kind===31?t.take():t.kind===25?d(t.take()):t.fail(`a branch name`),a=()=>d(t.expect(25)),o=()=>(t.kind!==8&&t.kind!==5&&t.kind!==2&&t.fail(`NORMAL, REVERSE, or HIGHLIGHT`),t.take());for(;t.kind===26;)t.i++;if(!t.accept(1)){t.expect(3);let e=t.kinds[t.i+1];(t.kind===17||t.kind===18||t.kind===19)&&e===20?(n.$type=`Direction`,n.dir=t.take(),t.i++):t.accept(20)}for(;t.kind!==-1;)switch(t.kind){case 26:t.i++;break;case 21:n.accDescr=l(t.take()),r();break;case 22:n.accTitle=f(t.take()),r();break;case 23:n.title=u(t.take()),r();break;case 7:{t.i++;let e={$type:`Commit`,tags:[]};for(;;)if(t.accept(16))e.id=a();else if(t.accept(15))e.tags.push(a());else if(t.accept(12))e.type=o();else if(t.accept(14)||t.kinds[t.i]===25)e.message=a();else break;r(),n.statements.push(e);break}case 9:{t.i++;let e={$type:`Branch`,name:i()};t.accept(10)&&(e.order=parseInt(t.expect(24))),r(),n.statements.push(e);break}case 13:{t.i++;let e={$type:`Merge`,branch:i(),tags:[]};for(;;)if(t.accept(16))e.id=a();else if(t.accept(15))e.tags.push(a());else if(t.accept(12))e.type=o();else break;r(),n.statements.push(e);break}case 4:case 11:{t.i++;let e={$type:`Checkout`,branch:i()};r(),n.statements.push(e);break}case 0:{t.i++;let e={$type:`CherryPicking`,tags:[]};for(;;)if(t.accept(16))e.id=a();else if(t.accept(15))e.tags.push(a());else if(t.accept(6))e.parent=a();else break;r(),n.statements.push(e);break}default:t.fail(`a statement, a title, or a line break`)}return n}var F=7,ne=44,re=44,I=36,L=8,R=20,z=20,B=7,ie=6,V=Math.SQRT1_2,ae=[`normal`,`reverse`,`highlight`,`merge`,`cherry-pick`];function H(e,t,n){let r=e.gitGraph?.[t];return typeof r==`boolean`?r:n}function oe(e){return B+4+e.width+6}function se(e,t,n,r){let i=`cx="${a(t)}" cy="${a(n)}"`;if(e===w.HIGHLIGHT)return`<rect x="${a(t-F-1)}" y="${a(n-F-1)}" width="${2*F+2}" height="${2*F+2}" rx="2" fill="${r}"/>`;if(e===w.MERGE)return`<circle ${i} r="${F-1}" fill="var(--_bg)" stroke="${r}" stroke-width="2"/><circle ${i} r="2.5" fill="${r}"/>`;let o=`<circle ${i} r="${F}" fill="${r}"/>`;return e===w.REVERSE?o+`<path d="M${a(t-3)},${a(n-3)}l6,6M${a(t-3)},${a(n+3)}l6,-6" fill="none" stroke="var(--_bg)" stroke-width="1.5" stroke-linecap="round"/>`:e===w.CHERRY_PICK?o+`<path d="M${a(t-2.6)},${a(n+1)}L${a(t+.8)},${a(n-4.2)}L${a(t+2.6)},${a(n+1)}" fill="none" stroke="var(--_bg)" stroke-linejoin="round"/><circle cx="${a(t-2.6)}" cy="${a(n+2.2)}" r="1.8" fill="var(--_bg)"/><circle cx="${a(t+2.6)}" cy="${a(n+2.2)}" r="1.8" fill="var(--_bg)"/>`:o}function U(e,t,n){return e.direction===`LR`?s(n,r=>W(e,t,n,r?`TB`:`LR`)):W(e,t,n,e.direction)}function W(s,c,l,u){let d=l.fontSize??16,f=Math.round(d*.75),p=l.measurer??te(l.fontFamily,l.fontFamilyMono),m=l.padding??8,h=H(c,`showBranches`,!0),g=H(c,`showCommitLabel`,!0),_=H(c,`rotateCommitLabel`,!0),v=H(c,`parallelCommits`,!1),y=u!==`LR`,b=u===`BT`,x=new Map;s.lanes.forEach((e,t)=>x.set(e,t));let S=s.lanes.length,C=Math.round(d*.875),ee=s.lanes.map(e=>o(h?e:``,p,C,4e3)),T=[],E=new Map;for(let e of[...s.commits.values()].sort((e,t)=>e.seq-t.seq)){let t=g&&e.type!==w.CHERRY_PICK&&(e.type!==w.MERGE||e.customId===!0),n=[];for(let t of e.tags){let e=o(t,p,f,4e3);e.lines.length>0&&n.push(e)}let r={commit:e,index:T.length,lane:x.get(e.branch)??0,m:0,label:t?o(e.id,p,f,4e3):void 0,tags:n};T.push(r),E.set(e.id,r)}let D=new Float64Array(T.length),O=new Float64Array(T.length),k=new Float64Array(S).fill(F),A=new Float64Array(S).fill(F);T.forEach((e,t)=>{let{label:n,tags:r}=e,i=0,a=0;for(let e of r){let t=oe(e);y?(i=Math.max(i,e.height),a+=t+4):(i=Math.max(i,t),a+=e.height+3)}let o=0,s=0;n!==void 0&&n.lines.length>0&&(_?s=3+V*(n.width+n.height):(o=y?n.height:n.width,s=6+(y?n.width:n.height))),D[t]=Math.max(F,i/2,o/2),O[t]=i/2;let c=F+(r.length>0?ie+a:0),l=F+s,u=e.lane;k[u]=Math.max(k[u],y?l:c),A[u]=Math.max(A[u],y?c:l)});let j=new Float64Array(T.length);y||T.forEach((e,t)=>{if(O[t]!==0)for(let n of e.commit.parents){let r=E.get(n);r!==void 0&&r.lane<e.lane&&(j[t]=O[t]+4)}});let M=(e,t)=>Math.max(ne,D[e]+D[t]+L,j[t]>0?D[e]+I+j[t]:0);T.forEach((e,t)=>{if(!v){e.m=t===0?0:T[t-1].m+M(t-1,t);return}let n=0;for(let r of e.commit.parents){let e=E.get(r);e===void 0||e.index>=t||(n=Math.max(n,e.m+M(e.index,t)))}e.m=n});let N=0;for(let e of T)N=Math.max(N,e.m);let P=new Float64Array(S);for(let e=0;e<S;e++){let t=ee[e],n=t.lines.length===0?0:y?t.width/2+8:t.height/2+2;k[e]=Math.max(k[e],n),A[e]=Math.max(A[e],n),e>0&&(P[e]=P[e-1]+Math.max(re,A[e-1]+k[e]+L))}let U=(e,t)=>y?t:e,W=(e,t)=>y?b?-e:e:t,G=(e,t)=>`${a(U(e,t))},${a(W(e,t))}`,K=1/0,q=1/0,J=-1/0,Y=-1/0,X=(e,t,n,r)=>{e<K&&(K=e),t<q&&(q=t),n>J&&(J=n),r>Y&&(Y=r)},Z=``;if(h)for(let e=0;e<S;e++){let i=ee[e],o=t(e),c=P[e],l=i.width+16,u=i.height+4,d=i.lines.length===0?-R:-R-(y?u:l),f=U(d+(y?u:l)/2,c),p=W(d+(y?u:l)/2,c);X(U(-R,c),W(-R,c),U(-R,c),W(-R,c)),X(U(N+z,c),W(N+z,c),U(N+z,c),W(N+z,c)),Z+=`<g class="pele-branch" data-id="${n(s.lanes[e])}"><path class="pele-lane" d="M${G(-R,c)}L${G(N+z,c)}" stroke="${o}" stroke-dasharray="2 4"/>`,i.lines.length>0&&(X(f-l/2,p-u/2,f+l/2,p+u/2),Z+=`<rect x="${a(f-l/2)}" y="${a(p-u/2)}" width="${a(l)}" height="${a(u)}" fill="${o}" style="rx:var(--_r)"/>`+r(i,f,p,` class="pele-label" fill="var(--_bg)"`)),Z+=`</g>`}let ce=Array.from({length:S},()=>[]);for(let e of T)ce[e.lane].push(e.m);if(v)for(let e of ce)e.sort((e,t)=>e-t);let le=(e,t,n)=>{let r=ce[e],i=0,a=r.length;for(;i<a;){let e=i+a>>1;r[e]<=t?i=e+1:a=e}return i<r.length&&r[i]<n},ue=``,Q=``;for(let e of T){let{commit:n}=e,r=P[e.lane],i=e.m;for(let a=0;a<n.parents.length;a++){let o=E.get(n.parents[a]);if(o===void 0||o===e)continue;let s=P[o.lane],c=o.m;if(o.lane===e.lane){Q+=`<path class="pele-edge" d="M${G(c,s)}L${G(i,r)}" stroke="${t(e.lane)}"/>`;continue}let l=a>0&&n.type===w.MERGE,u=a>0&&!l,d=`M${G(c,s)}`;if(i<=c){let e=(c+i)/2;d+=`C${G(e,s)} ${G(e,r)} ${G(i,r)}`}else if(!l&&!le(e.lane,c,i)){let e=Math.min(I,i-c);d+=`C${G(c+e/2,s)} ${G(c+e/2,r)} ${G(c+e,r)}L${G(i,r)}`}else{let t=o.lane<e.lane&&i-j[e.index]>c?i-j[e.index]:i,n=Math.min(I,t-c),a=s;(!l||le(o.lane,c,i))&&(a=s>r?r+A[e.lane]+L/2:r-k[e.lane]-L/2,n=Math.min(I,(t-c)/2),d+=`C${G(c+n/2,s)} ${G(c+n/2,a)} ${G(c+n,a)}`),d+=`L${G(t-n,a)}C${G(t-n/2,a)} ${G(t-n/2,r)} ${G(t,r)}`,t<i&&(d+=`L${G(i,r)}`)}ue+=`<path class="pele-edge${l?` pele-edge-merge`:u?` pele-edge-cherry-pick`:``}" d="${d}" stroke="${t(l?o.lane:e.lane)}"${u?` stroke-dasharray="4 3"`:``}/>`}}let de=``;for(let e of T){let{commit:i,label:o,tags:s}=e,c=U(e.m,P[e.lane]),l=W(e.m,P[e.lane]),u=i.customType??i.type;X(c-F-1,l-F-1,c+F+1,l+F+1);let d=i.type<w.MERGE&&i.message!==``?`<title>${n(i.message)}</title>`:``;if(d+=se(u,c,l,t(e.lane)),o!==void 0&&o.lines.length>0){let e=o.width,t=o.height,n=(n,r)=>`<rect x="${a(n-e/2-2)}" y="${a(r-t/2+2)}" width="${a(e+4)}" height="${a(t-4)}" rx="3" fill="var(--_bg)"/>`;if(_){let i=V*t/2,s=y?c-F-3-i:c+3,u=y?l:l+F+3+i,f=V*e+i;X(s-f,b?u-f:u-i,s+i,b?u+i:u+f),d+=`<g class="pele-commit-label" transform="rotate(${b?45:-45} ${a(s)} ${a(u)})">`+n(s-e/2,u)+r(o,s-e/2,u,``)+`</g>`}else{let i=y?c-F-6-e/2:c,a=y?l:l+F+6+t/2;X(i-e/2,a-t/2,i+e/2,a+t/2),d+=`<g class="pele-commit-label">${n(i,a)}${r(o,i,a,``)}</g>`}}let f=F+ie;for(let e=y?0:s.length-1;e>=0&&e<s.length;e+=y?1:-1){let t=s[e],n=oe(t),i=t.height,o=y?c+f:c-n/2,u=y?l:l-f-i/2;f+=y?n+4:i+3,X(o,u-i/2,o+n,u+i/2),d+=`<g class="pele-tag"><path d="M${a(o)},${a(u)}L${a(o+B)},${a(u-i/2)}H${a(o+n)}V${a(u+i/2)}H${a(o+B)}Z" fill="var(--_s)" stroke="var(--_b)" stroke-linejoin="round"/><circle cx="${a(o+B)}" cy="${a(u)}" r="1.5" fill="var(--_b)"/>`+r(t,o+B+4+t.width/2,u,` fill="var(--_fg)"`)+`</g>`}let p=i.type===w.MERGE&&u!==w.MERGE?` pele-commit-merge`:``;de+=`<g class="pele-commit pele-commit-${ae[u]??ae[0]}${p}" data-id="${n(i.id)}">${d}</g>`}K>J&&X(0,0,0,0);let $=i(s.title,!1,p,d,4e3,1),fe=$.height>0?$.height+16:0,pe=Math.max(J-K,$.width),me=Math.ceil(pe+2*m),he=Math.ceil(Y-q+fe+2*m),ge=m-K+(pe-(J-K))/2,_e=m+fe-q,ve=r($,me/2,m+$.height/2,` class="pele-title" font-weight="var(--_tw)"`)+`<g transform="translate(${a(ge)},${a(_e)})">`+(Z?`<g class="pele-branches" fill="none" font-size="${C}">${Z}</g>`:``)+(ue||Q?`<g class="pele-edges" fill="none" stroke-width="2" stroke-linecap="round">${ue}${Q}</g>`:``)+(de?`<g class="pele-commits" font-size="${f}" fill="var(--_m)">${de}</g>`:``)+`</g>`;return{svg:e(`gitGraph`,me,he,d,l,s,ve),width:me,height:he,links:[]}}var G={type:`gitGraph`,parse:(e,t,n)=>k(P(e),t,n),render:U};export{G as gitGraph};
@@ -1,2 +1,2 @@
1
- import{u as e}from"./DEQsS4Ez.js";var t=/<(?!br\s*\/?>)/gi,n=/:fa-/g,r=/<br\s*\/?>|fl°°?\w+¶ß|&#?\w+;|[\ud800-\udbff][\udc00-\udfff]|[\s\S]/gi;function i(r,i,a,o,s=0){let c=r;return c!==void 0&&(c.includes(`<`)&&(c=c.replace(t,`&lt;`)),c.includes(`:fa-`)&&(c=c.replace(n,`&colon;fa-`))),e(c,!1,i,a,o,s)}function a(e,t,n,a,o=0){let s=i(e,t,n,a,o);if(e===void 0||s.width<=a)return s;let c=``,l=0;for(let i of e.match(r)??[]){if(i.trim()===``||i.length>2&&i[0]===`<`)l=0;else{let e=t.width(i.length>2?`x`:i,n,o);l>0&&l+e>a&&(c+=`
1
+ import{u as e}from"./DlgOmQ_G.js";var t=/<(?!br\s*\/?>)/gi,n=/:fa-/g,r=/<br\s*\/?>|fl°°?\w+¶ß|&#?\w+;|[\ud800-\udbff][\udc00-\udfff]|[\s\S]/gi;function i(r,i,a,o,s=0){let c=r;return c!==void 0&&(c.includes(`<`)&&(c=c.replace(t,`&lt;`)),c.includes(`:fa-`)&&(c=c.replace(n,`&colon;fa-`))),e(c,!1,i,a,o,s)}function a(e,t,n,a,o=0){let s=i(e,t,n,a,o);if(e===void 0||s.width<=a)return s;let c=``,l=0;for(let i of e.match(r)??[]){if(i.trim()===``||i.length>2&&i[0]===`<`)l=0;else{let e=t.width(i.length>2?`x`:i,n,o);l>0&&l+e>a&&(c+=`
2
2
  `,l=0),l+=e}c+=i}return i(c,t,n,a,o)}export{i as n,a as t};