@mcpc-tech/unplugin-dev-inspector-mcp 0.1.28 → 0.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/{PromptParamsDialog-CtCaLYaq.js → PromptParamsDialog-D0TaQM5I.js} +146 -68
- package/client/dist/architecture-U656AL7Q-DLZFIEaG.js +1 -0
- package/client/dist/{architectureDiagram-VXUJARFQ-mTEFN4g1.js → architectureDiagram-VXUJARFQ-DNc0rX0p.js} +1 -1
- package/client/dist/{chunk-76Q3JFCE-naB4GsSN.js → chunk-76Q3JFCE-CAXIRKnn.js} +1 -1
- package/client/dist/chunk-FPAJGGOC-BjlYzVzU.js +80 -0
- package/client/dist/{chunk-FWNWRKHM-DESdnxaO.js → chunk-FWNWRKHM-VOvXoVoT.js} +1 -1
- package/client/dist/{chunk-LBM3YZW2-D1UaPZ0s.js → chunk-LBM3YZW2-CvtIRI2w.js} +1 -1
- package/client/dist/{chunk-LHMN2FUI-DvMeDi1w.js → chunk-LHMN2FUI-Ca-4316E.js} +1 -1
- package/client/dist/{chunk-O7ZBX7Z2-CzEL6GEY.js → chunk-O7ZBX7Z2-CECReL7o.js} +1 -1
- package/client/dist/{chunk-S6J4BHB3-dkKq153Y.js → chunk-S6J4BHB3-BHybUXml.js} +1 -1
- package/client/dist/{chunk-T53DSG4Q-m8YxcxT5.js → chunk-T53DSG4Q-7987HmnS.js} +1 -1
- package/client/dist/{diagram-PSM6KHXK-BxJGiGPe.js → diagram-PSM6KHXK-DTb9CVoz.js} +1 -1
- package/client/dist/{diagram-QEK2KX5R-DYp7ZFqv.js → diagram-QEK2KX5R-B2o1-dFI.js} +1 -1
- package/client/dist/{diagram-S2PKOQOG-DJkha_WW.js → diagram-S2PKOQOG-DPPFE3hr.js} +1 -1
- package/client/dist/gitGraph-F6HP7TQM-l-NE_Osd.js +1 -0
- package/client/dist/{gitGraphDiagram-NY62KEGX-Cr6_VXUM.js → gitGraphDiagram-NY62KEGX-Jp7zkjZT.js} +1 -1
- package/client/dist/info-NVLQJR56-EuF5TjLZ.js +1 -0
- package/client/dist/{infoDiagram-ER5ION4S-CtrGb0So.js → infoDiagram-ER5ION4S-CXN8mVBL.js} +1 -1
- package/client/dist/inspector.js +21 -98
- package/client/dist/{mermaid-parser.core-lVkskdol.js → mermaid-parser.core-B4UmuquT.js} +1 -1
- package/client/dist/{mermaid.core-DfenwpGd.js → mermaid.core-Bb_NaryS.js} +2 -2
- package/client/dist/packet-BFZMPI3H-BeBassQF.js +1 -0
- package/client/dist/pie-7BOR55EZ-CaiOg9Y8.js +1 -0
- package/client/dist/{pieDiagram-ADFJNKIX-10ENr3pD.js → pieDiagram-ADFJNKIX-C2tbuWJp.js} +1 -1
- package/client/dist/radar-NHE76QYJ-Dig7Z189.js +1 -0
- package/client/dist/sidebar.js +1 -1
- package/client/dist/treemap-KMMF4GRG-CTX-6nPT.js +1 -0
- package/dist/cli.cjs +24 -5
- package/dist/cli.js +24 -5
- package/dist/config-updater.cjs +99 -7
- package/dist/config-updater.js +99 -7
- package/dist/react/react.js +28 -1
- package/package.json +2 -2
- package/client/dist/architecture-U656AL7Q-BbnkeEk-.js +0 -1
- package/client/dist/chunk-FPAJGGOC-_ax7LrI6.js +0 -81
- package/client/dist/gitGraph-F6HP7TQM-KAtjK5Ox.js +0 -1
- package/client/dist/info-NVLQJR56-DiZxlu_o.js +0 -1
- package/client/dist/packet-BFZMPI3H-Co0kmFAY.js +0 -1
- package/client/dist/pie-7BOR55EZ-27A0zi3z.js +0 -1
- package/client/dist/radar-NHE76QYJ-BNuOm017.js +0 -1
- package/client/dist/treemap-KMMF4GRG-Cs32ogTY.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,f as t,g as n,h as r,m as i,n as a,p as o,s,t as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{d as e,f as t,g as n,h as r,m as i,n as a,p as o,s,t as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends c{static{t(this,`TreemapTokenBuilder`)}constructor(){super([`treemap`])}},u=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,d=class extends a{static{t(this,`TreemapValueConverter`)}runCustomConverter(e,t,n){if(e.name===`NUMBER2`)return parseFloat(t.replace(/,/g,``));if(e.name===`SEPARATOR`||e.name===`STRING2`)return t.substring(1,t.length-1);if(e.name===`INDENTATION`)return t.length;if(e.name===`ClassDef`){if(typeof t!=`string`)return t;let e=u.exec(t);if(e)return{$type:`ClassDefStatement`,className:e[1],styleText:e[2]||void 0}}}};function f(e){let t=e.validation.TreemapValidator,n=e.validation.ValidationRegistry;if(n){let e={Treemap:t.checkSingleRoot.bind(t)};n.register(e,t)}}t(f,`registerValidationChecks`);var p=class{static{t(this,`TreemapValidator`)}checkSingleRoot(e,t){let n;for(let r of e.TreemapRows)r.item&&(n===void 0&&r.indent===void 0?n=0:(r.indent===void 0||n!==void 0&&n>=parseInt(r.indent,10))&&t(`error`,`Multiple root nodes are not allowed in a treemap.`,{node:r,property:`item`}))}},m={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new d,`ValueConverter`)},validation:{TreemapValidator:t(()=>new p,`TreemapValidator`)}};function h(t=o){let a=i(n(t),s),c=i(r({shared:a}),e,m);return a.ServiceRegistry.register(c),f(c),{shared:a,Treemap:c}}t(h,`createTreemapServices`);export{h as n,m as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,i as r,m as i,o as a,p as o,s,t as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{f as e,g as t,h as n,i as r,m as i,o as a,p as o,s,t as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends c{static{e(this,`InfoTokenBuilder`)}constructor(){super([`info`,`showInfo`])}},u={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new r,`ValueConverter`)}};function d(e=o){let r=i(t(e),s),c=i(n({shared:r}),a,u);return r.ServiceRegistry.register(c),{shared:r,Info:c}}e(d,`createInfoServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,i as r,m as i,p as a,s as o,t as s,u as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{f as e,g as t,h as n,i as r,m as i,p as a,s as o,t as s,u as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends s{static{e(this,`RadarTokenBuilder`)}constructor(){super([`radar-beta`])}},u={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new r,`ValueConverter`)}};function d(e=a){let r=i(t(e),o),s=i(n({shared:r}),c,u);return r.ServiceRegistry.register(s),{shared:r,Radar:s}}e(d,`createRadarServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,m as r,n as i,p as a,r as o,s,t as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{f as e,g as t,h as n,m as r,n as i,p as a,r as o,s,t as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends c{static{e(this,`ArchitectureTokenBuilder`)}constructor(){super([`architecture`])}},u=class extends i{static{e(this,`ArchitectureValueConverter`)}runCustomConverter(e,t,n){if(e.name===`ARCH_ICON`)return t.replace(/[()]/g,``).trim();if(e.name===`ARCH_TEXT_ICON`)return t.replace(/["()]/g,``);if(e.name===`ARCH_TITLE`)return t.replace(/[[\]]/g,``).trim()}},d={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new u,`ValueConverter`)}};function f(e=a){let i=r(t(e),s),c=r(n({shared:i}),o,d);return i.ServiceRegistry.register(c),{shared:i,Architecture:c}}e(f,`createArchitectureServices`);export{f as n,d as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{a as e,f as t,g as n,h as r,i,m as a,p as o,s,t as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends c{static{t(this,`GitGraphTokenBuilder`)}constructor(){super([`gitGraph`])}},u={parser:{TokenBuilder:t(()=>new l,`TokenBuilder`),ValueConverter:t(()=>new i,`ValueConverter`)}};function d(t=o){let i=a(n(t),s),c=a(r({shared:i}),e,u);return i.ServiceRegistry.register(c),{shared:i,GitGraph:c}}t(d,`createGitGraphServices`);export{d as n,u as t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{f as e,g as t,h as n,l as r,m as i,n as a,p as o,s,t as c}from"./chunk-FPAJGGOC-
|
|
1
|
+
import{f as e,g as t,h as n,l as r,m as i,n as a,p as o,s,t as c}from"./chunk-FPAJGGOC-BjlYzVzU.js";var l=class extends c{static{e(this,`PieTokenBuilder`)}constructor(){super([`pie`,`showData`])}},u=class extends a{static{e(this,`PieValueConverter`)}runCustomConverter(e,t,n){if(e.name===`PIE_SECTION_LABEL`)return t.replace(/"/g,``).trim()}},d={parser:{TokenBuilder:e(()=>new l,`TokenBuilder`),ValueConverter:e(()=>new u,`ValueConverter`)}};function f(e=o){let a=i(t(e),s),c=i(n({shared:a}),r,d);return a.ServiceRegistry.register(c),{shared:a,Pie:c}}e(f,`createPieServices`);export{f as n,d as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-FPAJGGOC-_ax7LrI6.js";import{i as e}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CzEL6GEY.js";import"./chunk-S6J4BHB3-dkKq153Y.js";import"./chunk-LBM3YZW2-D1UaPZ0s.js";import"./chunk-76Q3JFCE-naB4GsSN.js";import"./chunk-T53DSG4Q-m8YxcxT5.js";import"./chunk-LHMN2FUI-DvMeDi1w.js";import"./chunk-FWNWRKHM-DESdnxaO.js";import{g as t,h as n,p as r}from"./src-CoWzf9ks.js";import{B as i,C as a,U as o,_ as s,a as c,c as l,d as u,v as d,y as f,z as p}from"./chunk-ABZYJK2D-B-uQQBad.js";import{t as m}from"./ordinal-NoUKjW5R.js";import{t as h}from"./defaultLocale-S7fGF81p.js";import{t as g}from"./chunk-EXTU4WIE-hA6kjEor.js";import"./dist-Bz_xenUc.js";import{t as _}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as v}from"./mermaid-parser.core-lVkskdol.js";import{t as y}from"./chunk-QN33PNHL-O3aN_XUL.js";import{i as b,n as x}from"./chunk-ATLVNIR6-06VCvgCA.js";function S(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function C(){return this.eachAfter(S)}function w(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function T(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function E(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function D(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function O(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function k(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function A(e){for(var t=this,n=j(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function j(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function N(){return Array.from(this)}function P(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function F(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*I(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function L(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=B)):t===void 0&&(t=z);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(H)}function R(){return L(this).eachBefore(V)}function z(e){return e.children}function B(e){return Array.isArray(e)?e[1]:null}function V(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function H(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=L.prototype={constructor:U,count:C,each:w,eachAfter:E,eachBefore:T,find:D,sum:O,sort:k,path:A,ancestors:M,descendants:N,leaves:P,links:F,copy:R,[Symbol.iterator]:I};function W(e){if(typeof e!=`function`)throw Error();return e}function G(){return 0}function K(e){return function(){return e}}function q(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function J(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var te=(1+Math.sqrt(5))/2;function ne(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?J(c,n,r,i,h?r+=m*g/h:a):ee(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var re=(function e(t){function n(e,n,r,i,a){ne(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(te);function ie(){var e=re,t=!1,n=1,r=1,i=[0],a=G,o=G,s=G,c=G,l=G;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(q),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=W(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:K(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:K(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:K(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:K(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:K(+e),u):l},u}var Y=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=o,this.getDiagramTitle=a,this.getAccDescription=s,this.setAccDescription=p}static{n(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let t=u,n=f();return e({...t.treemap,...n.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=[e.cssCompiledStyles]),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(X,`buildHierarchy`);var ae=n((e,t)=>{_(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=oe(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o.join(`;`):void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),oe=n(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:n(async e=>{try{let n=await v(`treemap`,e);t.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);ae(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},se=10,Q=10,$=25,ce={draw:n((e,i,a,o)=>{let s=o.db,c=s.getConfig(),u=c.padding??se,d=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:_}=f();if(!p)return;let v=d?30:0,x=g(i),S=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=S,T=C+v;x.attr(`viewBox`,`0 0 ${w} ${T}`),l(x,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+h(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+h(t||``)(e),`valueFormat`)}else E=h(e)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,_.cScale0,_.cScale1,_.cScale2,_.cScale3,_.cScale4,_.cScale5,_.cScale6,_.cScale7,_.cScale8,_.cScale9,_.cScale10,_.cScale11]),O=m().range([`transparent`,_.cScalePeer0,_.cScalePeer1,_.cScalePeer2,_.cScalePeer3,_.cScalePeer4,_.cScalePeer5,_.cScalePeer6,_.cScalePeer7,_.cScalePeer8,_.cScalePeer9,_.cScalePeer10,_.cScalePeer11]),k=m().range([_.cScaleLabel0,_.cScaleLabel1,_.cScaleLabel2,_.cScaleLabel3,_.cScaleLabel4,_.cScaleLabel5,_.cScaleLabel6,_.cScaleLabel7,_.cScaleLabel8,_.cScaleLabel9,_.cScaleLabel10,_.cScaleLabel11]);d&&x.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let A=x.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=L(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ie().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=r(this),n=e.data.name;t.text(n);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);I.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),I.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),I.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=r(this),n=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=n-8,s=i-8;if(o<10||s<10){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)t.style(`font-size`,`${c}px`),d=c+2+u;t.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&I.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=r(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let i=r(n).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;t.node().getComputedTextLength()>u||s+o>l||o<6?t.style(`display`,`none`):t.style(`display`,null)}),y(x,c.diagramPadding??8,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:n(function(e,t){return t.db.getClasses()},`getClasses`)},le={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},ue={parser:Z,get db(){return new Y},renderer:ce,styles:n(({treemap:t}={})=>{let n=e(le,t);return`
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{i as e}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CECReL7o.js";import"./chunk-S6J4BHB3-BHybUXml.js";import"./chunk-LBM3YZW2-CvtIRI2w.js";import"./chunk-76Q3JFCE-CAXIRKnn.js";import"./chunk-T53DSG4Q-7987HmnS.js";import"./chunk-LHMN2FUI-Ca-4316E.js";import"./chunk-FWNWRKHM-VOvXoVoT.js";import{g as t,h as n,p as r}from"./src-CoWzf9ks.js";import{B as i,C as a,U as o,_ as s,a as c,c as l,d as u,v as d,y as f,z as p}from"./chunk-ABZYJK2D-B-uQQBad.js";import{t as m}from"./ordinal-NoUKjW5R.js";import{t as h}from"./defaultLocale-S7fGF81p.js";import{t as g}from"./chunk-EXTU4WIE-hA6kjEor.js";import"./dist-Bz_xenUc.js";import{t as _}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as v}from"./mermaid-parser.core-B4UmuquT.js";import{t as y}from"./chunk-QN33PNHL-O3aN_XUL.js";import{i as b,n as x}from"./chunk-ATLVNIR6-06VCvgCA.js";function S(e){var t=0,n=e.children,r=n&&n.length;if(!r)t=1;else for(;--r>=0;)t+=n[r].value;e.value=t}function C(){return this.eachAfter(S)}function w(e,t){let n=-1;for(let r of this)e.call(t,r,++n,this);return this}function T(e,t){for(var n=this,r=[n],i,a,o=-1;n=r.pop();)if(e.call(t,n,++o,this),i=n.children)for(a=i.length-1;a>=0;--a)r.push(i[a]);return this}function E(e,t){for(var n=this,r=[n],i=[],a,o,s,c=-1;n=r.pop();)if(i.push(n),a=n.children)for(o=0,s=a.length;o<s;++o)r.push(a[o]);for(;n=i.pop();)e.call(t,n,++c,this);return this}function D(e,t){let n=-1;for(let r of this)if(e.call(t,r,++n,this))return r}function O(e){return this.eachAfter(function(t){for(var n=+e(t.data)||0,r=t.children,i=r&&r.length;--i>=0;)n+=r[i].value;t.value=n})}function k(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})}function A(e){for(var t=this,n=j(t,e),r=[t];t!==n;)t=t.parent,r.push(t);for(var i=r.length;e!==n;)r.splice(i,0,e),e=e.parent;return r}function j(e,t){if(e===t)return e;var n=e.ancestors(),r=t.ancestors(),i=null;for(e=n.pop(),t=r.pop();e===t;)i=e,e=n.pop(),t=r.pop();return i}function M(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}function N(){return Array.from(this)}function P(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e}function F(){var e=this,t=[];return e.each(function(n){n!==e&&t.push({source:n.parent,target:n})}),t}function*I(){var e=this,t,n=[e],r,i,a;do for(t=n.reverse(),n=[];e=t.pop();)if(yield e,r=e.children)for(i=0,a=r.length;i<a;++i)n.push(r[i]);while(n.length)}function L(e,t){e instanceof Map?(e=[void 0,e],t===void 0&&(t=B)):t===void 0&&(t=z);for(var n=new U(e),r,i=[n],a,o,s,c;r=i.pop();)if((o=t(r.data))&&(c=(o=Array.from(o)).length))for(r.children=o,s=c-1;s>=0;--s)i.push(a=o[s]=new U(o[s])),a.parent=r,a.depth=r.depth+1;return n.eachBefore(H)}function R(){return L(this).eachBefore(V)}function z(e){return e.children}function B(e){return Array.isArray(e)?e[1]:null}function V(e){e.data.value!==void 0&&(e.value=e.data.value),e.data=e.data.data}function H(e){var t=0;do e.height=t;while((e=e.parent)&&e.height<++t)}function U(e){this.data=e,this.depth=this.height=0,this.parent=null}U.prototype=L.prototype={constructor:U,count:C,each:w,eachAfter:E,eachBefore:T,find:D,sum:O,sort:k,path:A,ancestors:M,descendants:N,leaves:P,links:F,copy:R,[Symbol.iterator]:I};function W(e){if(typeof e!=`function`)throw Error();return e}function G(){return 0}function K(e){return function(){return e}}function q(e){e.x0=Math.round(e.x0),e.y0=Math.round(e.y0),e.x1=Math.round(e.x1),e.y1=Math.round(e.y1)}function J(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(r-t)/e.value;++s<c;)o=a[s],o.y0=n,o.y1=i,o.x0=t,o.x1=t+=o.value*l}function ee(e,t,n,r,i){for(var a=e.children,o,s=-1,c=a.length,l=e.value&&(i-n)/e.value;++s<c;)o=a[s],o.x0=t,o.x1=r,o.y0=n,o.y1=n+=o.value*l}var te=(1+Math.sqrt(5))/2;function ne(e,t,n,r,i,a){for(var o=[],s=t.children,c,l,u=0,d=0,f=s.length,p,m,h=t.value,g,_,v,y,b,x,S;u<f;){p=i-n,m=a-r;do g=s[d++].value;while(!g&&d<f);for(_=v=g,x=Math.max(m/p,p/m)/(h*e),S=g*g*x,b=Math.max(v/S,S/_);d<f;++d){if(g+=l=s[d].value,l<_&&(_=l),l>v&&(v=l),S=g*g*x,y=Math.max(v/S,S/_),y>b){g-=l;break}b=y}o.push(c={value:g,dice:p<m,children:s.slice(u,d)}),c.dice?J(c,n,r,i,h?r+=m*g/h:a):ee(c,n,r,h?n+=p*g/h:i,a),h-=g,u=d}return o}var re=(function e(t){function n(e,n,r,i,a){ne(t,e,n,r,i,a)}return n.ratio=function(t){return e((t=+t)>1?t:1)},n})(te);function ie(){var e=re,t=!1,n=1,r=1,i=[0],a=G,o=G,s=G,c=G,l=G;function u(e){return e.x0=e.y0=0,e.x1=n,e.y1=r,e.eachBefore(d),i=[0],t&&e.eachBefore(q),e}function d(t){var n=i[t.depth],r=t.x0+n,u=t.y0+n,d=t.x1-n,f=t.y1-n;d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),t.x0=r,t.y0=u,t.x1=d,t.y1=f,t.children&&(n=i[t.depth+1]=a(t)/2,r+=l(t)-n,u+=o(t)-n,d-=s(t)-n,f-=c(t)-n,d<r&&(r=d=(r+d)/2),f<u&&(u=f=(u+f)/2),e(t,r,u,d,f))}return u.round=function(e){return arguments.length?(t=!!e,u):t},u.size=function(e){return arguments.length?(n=+e[0],r=+e[1],u):[n,r]},u.tile=function(t){return arguments.length?(e=W(t),u):e},u.padding=function(e){return arguments.length?u.paddingInner(e).paddingOuter(e):u.paddingInner()},u.paddingInner=function(e){return arguments.length?(a=typeof e==`function`?e:K(+e),u):a},u.paddingOuter=function(e){return arguments.length?u.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):u.paddingTop()},u.paddingTop=function(e){return arguments.length?(o=typeof e==`function`?e:K(+e),u):o},u.paddingRight=function(e){return arguments.length?(s=typeof e==`function`?e:K(+e),u):s},u.paddingBottom=function(e){return arguments.length?(c=typeof e==`function`?e:K(+e),u):c},u.paddingLeft=function(e){return arguments.length?(l=typeof e==`function`?e:K(+e),u):l},u}var Y=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=i,this.getAccTitle=d,this.setDiagramTitle=o,this.getDiagramTitle=a,this.getAccDescription=s,this.setAccDescription=p}static{n(this,`TreeMapDB`)}getNodes(){return this.nodes}getConfig(){let t=u,n=f();return e({...t.treemap,...n.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),t===0&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:``,children:this.outerNodes}}addClass(e,t){let n=this.classes.get(e)??{id:e,styles:[],textStyles:[]},r=t.replace(/\\,/g,`§§§`).replace(/,/g,`;`).replace(/§§§/g,`,`).split(`;`);r&&r.forEach(e=>{x(e)&&(n?.textStyles?n.textStyles.push(e):n.textStyles=[e]),n?.styles?n.styles.push(e):n.styles=[e]}),this.classes.set(e,n)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){c(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function X(e){if(!e.length)return[];let t=[],n=[];return e.forEach(e=>{let r={name:e.name,children:e.type===`Leaf`?void 0:[]};for(r.classSelector=e?.classSelector,e?.cssCompiledStyles&&(r.cssCompiledStyles=[e.cssCompiledStyles]),e.type===`Leaf`&&e.value!==void 0&&(r.value=e.value);n.length>0&&n[n.length-1].level>=e.level;)n.pop();if(n.length===0)t.push(r);else{let e=n[n.length-1].node;e.children?e.children.push(r):e.children=[r]}e.type!==`Leaf`&&n.push({node:r,level:e.level})}),t}n(X,`buildHierarchy`);var ae=n((e,t)=>{_(e,t);let r=[];for(let n of e.TreemapRows??[])n.$type===`ClassDefStatement`&&t.addClass(n.className??``,n.styleText??``);for(let n of e.TreemapRows??[]){let e=n.item;if(!e)continue;let i=n.indent?parseInt(n.indent):0,a=oe(e),o=e.classSelector?t.getStylesForClass(e.classSelector):[],s=o.length>0?o.join(`;`):void 0,c={level:i,name:a,type:e.$type,value:e.value,classSelector:e.classSelector,cssCompiledStyles:s};r.push(c)}let i=X(r),a=n((e,n)=>{for(let r of e)t.addNode(r,n),r.children&&r.children.length>0&&a(r.children,n+1)},`addNodesRecursively`);a(i,0)},`populate`),oe=n(e=>e.name?String(e.name):``,`getItemName`),Z={parser:{yy:void 0},parse:n(async e=>{try{let n=await v(`treemap`,e);t.debug(`Treemap AST:`,n);let r=Z.parser?.yy;if(!(r instanceof Y))throw Error(`parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);ae(n,r)}catch(e){throw t.error(`Error parsing treemap:`,e),e}},`parse`)},se=10,Q=10,$=25,ce={draw:n((e,i,a,o)=>{let s=o.db,c=s.getConfig(),u=c.padding??se,d=s.getDiagramTitle(),p=s.getRoot(),{themeVariables:_}=f();if(!p)return;let v=d?30:0,x=g(i),S=c.nodeWidth?c.nodeWidth*Q:960,C=c.nodeHeight?c.nodeHeight*Q:500,w=S,T=C+v;x.attr(`viewBox`,`0 0 ${w} ${T}`),l(x,T,w,c.useMaxWidth);let E;try{let e=c.valueFormat||`,`;if(e===`$0,0`)E=n(e=>`$`+h(`,`)(e),`valueFormat`);else if(e.startsWith(`$`)&&e.includes(`,`)){let t=/\.\d+/.exec(e),r=t?t[0]:``;E=n(e=>`$`+h(`,`+r)(e),`valueFormat`)}else if(e.startsWith(`$`)){let t=e.substring(1);E=n(e=>`$`+h(t||``)(e),`valueFormat`)}else E=h(e)}catch(e){t.error(`Error creating format function:`,e),E=h(`,`)}let D=m().range([`transparent`,_.cScale0,_.cScale1,_.cScale2,_.cScale3,_.cScale4,_.cScale5,_.cScale6,_.cScale7,_.cScale8,_.cScale9,_.cScale10,_.cScale11]),O=m().range([`transparent`,_.cScalePeer0,_.cScalePeer1,_.cScalePeer2,_.cScalePeer3,_.cScalePeer4,_.cScalePeer5,_.cScalePeer6,_.cScalePeer7,_.cScalePeer8,_.cScalePeer9,_.cScalePeer10,_.cScalePeer11]),k=m().range([_.cScaleLabel0,_.cScaleLabel1,_.cScaleLabel2,_.cScaleLabel3,_.cScaleLabel4,_.cScaleLabel5,_.cScaleLabel6,_.cScaleLabel7,_.cScaleLabel8,_.cScaleLabel9,_.cScaleLabel10,_.cScaleLabel11]);d&&x.append(`text`).attr(`x`,w/2).attr(`y`,v/2).attr(`class`,`treemapTitle`).attr(`text-anchor`,`middle`).attr(`dominant-baseline`,`middle`).text(d);let A=x.append(`g`).attr(`transform`,`translate(0, ${v})`).attr(`class`,`treemapContainer`),j=L(p).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),M=ie().size([S,C]).paddingTop(e=>e.children&&e.children.length>0?$+Q:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?Q:0).paddingRight(e=>e.children&&e.children.length>0?Q:0).paddingBottom(e=>e.children&&e.children.length>0?Q:0).round(!0)(j),N=M.descendants().filter(e=>e.children&&e.children.length>0),P=A.selectAll(`.treemapSection`).data(N).enter().append(`g`).attr(`class`,`treemapSection`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,$).attr(`class`,`treemapSectionHeader`).attr(`fill`,`none`).attr(`fill-opacity`,.6).attr(`stroke-width`,.6).attr(`style`,e=>e.depth===0?`display: none;`:``),P.append(`clipPath`).attr(`id`,(e,t)=>`clip-section-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-12)).attr(`height`,$),P.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,(e,t)=>`treemapSection section${t}`).attr(`fill`,e=>D(e.data.name)).attr(`fill-opacity`,.6).attr(`stroke`,e=>O(e.data.name)).attr(`stroke-width`,2).attr(`stroke-opacity`,.4).attr(`style`,e=>{if(e.depth===0)return`display: none;`;let t=b({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+`;`+t.borderStyles.join(`;`)}),P.append(`text`).attr(`class`,`treemapSectionLabel`).attr(`x`,6).attr(`y`,$/2).attr(`dominant-baseline`,`middle`).text(e=>e.depth===0?``:e.data.name).attr(`font-weight`,`bold`).attr(`style`,e=>e.depth===0?`display: none;`:`dominant-baseline: middle; font-size: 12px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).each(function(e){if(e.depth===0)return;let t=r(this),n=e.data.name;t.text(n);let i=e.x1-e.x0,a;a=c.showValues!==!1&&e.value?i-10-30-10-6:i-6-6;let o=Math.max(15,a),s=t.node();if(s.getComputedTextLength()>o){let e=n;for(;e.length>0;){if(e=n.substring(0,e.length-1),e.length===0){t.text(`...`),s.getComputedTextLength()>o&&t.text(``);break}if(t.text(e+`...`),s.getComputedTextLength()<=o)break}}}),c.showValues!==!1&&P.append(`text`).attr(`class`,`treemapSectionValue`).attr(`x`,e=>e.x1-e.x0-10).attr(`y`,$/2).attr(`text-anchor`,`end`).attr(`dominant-baseline`,`middle`).text(e=>e.value?E(e.value):``).attr(`font-style`,`italic`).attr(`style`,e=>e.depth===0?`display: none;`:`text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:`+k(e.data.name)+`; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`));let F=M.leaves(),I=A.selectAll(`.treemapLeafGroup`).data(F).enter().append(`g`).attr(`class`,(e,t)=>`treemapNode treemapLeafGroup leaf${t}${e.data.classSelector?` ${e.data.classSelector}`:``}x`).attr(`transform`,e=>`translate(${e.x0},${e.y0})`);I.append(`rect`).attr(`width`,e=>e.x1-e.x0).attr(`height`,e=>e.y1-e.y0).attr(`class`,`treemapLeaf`).attr(`fill`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`style`,e=>b({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr(`fill-opacity`,.3).attr(`stroke`,e=>e.parent?D(e.parent.data.name):D(e.data.name)).attr(`stroke-width`,3),I.append(`clipPath`).attr(`id`,(e,t)=>`clip-${i}-${t}`).append(`rect`).attr(`width`,e=>Math.max(0,e.x1-e.x0-4)).attr(`height`,e=>Math.max(0,e.y1-e.y0-4)),I.append(`text`).attr(`class`,`treemapLabel`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,e=>(e.y1-e.y0)/2).attr(`style`,e=>`text-anchor: middle; dominant-baseline: middle; font-size: 38px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.data.name).each(function(e){let t=r(this),n=e.x1-e.x0,i=e.y1-e.y0,a=t.node(),o=n-8,s=i-8;if(o<10||s<10){t.style(`display`,`none`);return}let c=parseInt(t.style(`font-size`),10),l=.6;for(;a.getComputedTextLength()>o&&c>8;)c--,t.style(`font-size`,`${c}px`);let u=Math.max(6,Math.min(28,Math.round(c*l))),d=c+2+u;for(;d>s&&c>8&&(c--,u=Math.max(6,Math.min(28,Math.round(c*l))),!(u<6&&c===8));)t.style(`font-size`,`${c}px`),d=c+2+u;t.style(`font-size`,`${c}px`),(a.getComputedTextLength()>o||c<8||s<c)&&t.style(`display`,`none`)}),c.showValues!==!1&&I.append(`text`).attr(`class`,`treemapValue`).attr(`x`,e=>(e.x1-e.x0)/2).attr(`y`,function(e){return(e.y1-e.y0)/2}).attr(`style`,e=>`text-anchor: middle; dominant-baseline: hanging; font-size: 28px;fill:`+k(e.data.name)+`;`+b({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace(`color:`,`fill:`)).attr(`clip-path`,(e,t)=>`url(#clip-${i}-${t})`).text(e=>e.value?E(e.value):``).each(function(e){let t=r(this),n=this.parentNode;if(!n){t.style(`display`,`none`);return}let i=r(n).select(`.treemapLabel`);if(i.empty()||i.style(`display`)===`none`){t.style(`display`,`none`);return}let a=parseFloat(i.style(`font-size`)),o=Math.max(6,Math.min(28,Math.round(a*.6)));t.style(`font-size`,`${o}px`);let s=(e.y1-e.y0)/2+a/2+2;t.attr(`y`,s);let c=e.x1-e.x0,l=e.y1-e.y0-4,u=c-8;t.node().getComputedTextLength()>u||s+o>l||o<6?t.style(`display`,`none`):t.style(`display`,null)}),y(x,c.diagramPadding??8,`flowchart`,c?.useMaxWidth||!1)},`draw`),getClasses:n(function(e,t){return t.db.getClasses()},`getClasses`)},le={sectionStrokeColor:`black`,sectionStrokeWidth:`1`,sectionFillColor:`#efefef`,leafStrokeColor:`black`,leafStrokeWidth:`1`,leafFillColor:`#efefef`,labelColor:`black`,labelFontSize:`12px`,valueFontSize:`10px`,valueColor:`black`,titleColor:`black`,titleFontSize:`14px`},ue={parser:Z,get db(){return new Y},renderer:ce,styles:n(({treemap:t}={})=>{let n=e(le,t);return`
|
|
2
2
|
.treemapNode.section {
|
|
3
3
|
stroke: ${n.sectionStrokeColor};
|
|
4
4
|
stroke-width: ${n.sectionStrokeWidth};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-FPAJGGOC-
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{i as e}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CECReL7o.js";import"./chunk-S6J4BHB3-BHybUXml.js";import"./chunk-LBM3YZW2-CvtIRI2w.js";import"./chunk-76Q3JFCE-CAXIRKnn.js";import"./chunk-T53DSG4Q-7987HmnS.js";import"./chunk-LHMN2FUI-Ca-4316E.js";import"./chunk-FWNWRKHM-VOvXoVoT.js";import{g as t,h as n}from"./src-CoWzf9ks.js";import{B as r,C as i,T as a,U as o,_ as s,a as c,d as l,v as u,y as d,z as f}from"./chunk-ABZYJK2D-B-uQQBad.js";import{t as p}from"./chunk-EXTU4WIE-hA6kjEor.js";import"./dist-Bz_xenUc.js";import{t as m}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as h}from"./mermaid-parser.core-B4UmuquT.js";var g={showLegend:!0,ticks:5,max:null,min:0,graticule:`circle`},_={axes:[],curves:[],options:g},v=structuredClone(_),y=l.radar,b=n(()=>e({...y,...d().radar}),`getConfig`),x=n(()=>v.axes,`getAxes`),S=n(()=>v.curves,`getCurves`),C=n(()=>v.options,`getOptions`),w=n(e=>{v.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},`setAxes`),T=n(e=>{v.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:E(e.entries)}))},`setCurves`),E=n(e=>{if(e[0].axis==null)return e.map(e=>e.value);let t=x();if(t.length===0)throw Error(`Axes must be populated before curves for reference entries`);return t.map(t=>{let n=e.find(e=>e.axis?.$refText===t.name);if(n===void 0)throw Error(`Missing entry for axis `+t.label);return n.value})},`computeCurveEntries`),D={getAxes:x,getCurves:S,getOptions:C,setAxes:w,setCurves:T,setOptions:n(e=>{let t=e.reduce((e,t)=>(e[t.name]=t,e),{});v.options={showLegend:t.showLegend?.value??g.showLegend,ticks:t.ticks?.value??g.ticks,max:t.max?.value??g.max,min:t.min?.value??g.min,graticule:t.graticule?.value??g.graticule}},`setOptions`),getConfig:b,clear:n(()=>{c(),v=structuredClone(_)},`clear`),setAccTitle:r,getAccTitle:u,setDiagramTitle:o,getDiagramTitle:i,getAccDescription:s,setAccDescription:f},O=n(e=>{m(e,D);let{axes:t,curves:n,options:r}=e;D.setAxes(t),D.setCurves(n),D.setOptions(r)},`populate`),k={parse:n(async e=>{let n=await h(`radar`,e);t.debug(n),O(n)},`parse`)},A=n((e,t,n,r)=>{let i=r.db,a=i.getAxes(),o=i.getCurves(),s=i.getOptions(),c=i.getConfig(),l=i.getDiagramTitle(),u=j(p(t),c),d=s.max??Math.max(...o.map(e=>Math.max(...e.entries))),f=s.min,m=Math.min(c.width,c.height)/2;M(u,a,m,s.ticks,s.graticule),N(u,a,m,c),P(u,a,o,f,d,s.graticule,c),L(u,o,s.showLegend,c),u.append(`text`).attr(`class`,`radarTitle`).text(l).attr(`x`,0).attr(`y`,-c.height/2-c.marginTop)},`draw`),j=n((e,t)=>{let n=t.width+t.marginLeft+t.marginRight,r=t.height+t.marginTop+t.marginBottom,i={x:t.marginLeft+t.width/2,y:t.marginTop+t.height/2};return e.attr(`viewbox`,`0 0 ${n} ${r}`).attr(`width`,n).attr(`height`,r),e.append(`g`).attr(`transform`,`translate(${i.x}, ${i.y})`)},`drawFrame`),M=n((e,t,n,r,i)=>{if(i===`circle`)for(let t=0;t<r;t++){let i=n*(t+1)/r;e.append(`circle`).attr(`r`,i).attr(`class`,`radarGraticule`)}else if(i===`polygon`){let i=t.length;for(let a=0;a<r;a++){let o=n*(a+1)/r,s=t.map((e,t)=>{let n=2*t*Math.PI/i-Math.PI/2;return`${o*Math.cos(n)},${o*Math.sin(n)}`}).join(` `);e.append(`polygon`).attr(`points`,s).attr(`class`,`radarGraticule`)}}},`drawGraticule`),N=n((e,t,n,r)=>{let i=t.length;for(let a=0;a<i;a++){let o=t[a].label,s=2*a*Math.PI/i-Math.PI/2;e.append(`line`).attr(`x1`,0).attr(`y1`,0).attr(`x2`,n*r.axisScaleFactor*Math.cos(s)).attr(`y2`,n*r.axisScaleFactor*Math.sin(s)).attr(`class`,`radarAxisLine`),e.append(`text`).text(o).attr(`x`,n*r.axisLabelFactor*Math.cos(s)).attr(`y`,n*r.axisLabelFactor*Math.sin(s)).attr(`class`,`radarAxisLabel`)}},`drawAxes`);function P(e,t,n,r,i,a,o){let s=t.length,c=Math.min(o.width,o.height)/2;n.forEach((t,n)=>{if(t.entries.length!==s)return;let l=t.entries.map((e,t)=>{let n=2*Math.PI*t/s-Math.PI/2,a=F(e,r,i,c);return{x:a*Math.cos(n),y:a*Math.sin(n)}});a===`circle`?e.append(`path`).attr(`d`,I(l,o.curveTension)).attr(`class`,`radarCurve-${n}`):a===`polygon`&&e.append(`polygon`).attr(`points`,l.map(e=>`${e.x},${e.y}`).join(` `)).attr(`class`,`radarCurve-${n}`)})}n(P,`drawCurves`);function F(e,t,n,r){return r*(Math.min(Math.max(e,t),n)-t)/(n-t)}n(F,`relativeRadius`);function I(e,t){let n=e.length,r=`M${e[0].x},${e[0].y}`;for(let i=0;i<n;i++){let a=e[(i-1+n)%n],o=e[i],s=e[(i+1)%n],c=e[(i+2)%n],l={x:o.x+(s.x-a.x)*t,y:o.y+(s.y-a.y)*t},u={x:s.x-(c.x-o.x)*t,y:s.y-(c.y-o.y)*t};r+=` C${l.x},${l.y} ${u.x},${u.y} ${s.x},${s.y}`}return`${r} Z`}n(I,`closedRoundCurve`);function L(e,t,n,r){if(!n)return;let i=(r.width/2+r.marginRight)*3/4,a=-(r.height/2+r.marginTop)*3/4;t.forEach((t,n)=>{let r=e.append(`g`).attr(`transform`,`translate(${i}, ${a+n*20})`);r.append(`rect`).attr(`width`,12).attr(`height`,12).attr(`class`,`radarLegendBox-${n}`),r.append(`text`).attr(`x`,16).attr(`y`,0).attr(`class`,`radarLegendText`).text(t.label)})}n(L,`drawLegend`);var R={draw:A},z=n((e,t)=>{let n=``;for(let r=0;r<e.THEME_COLOR_LIMIT;r++){let i=e[`cScale${r}`];n+=`
|
|
2
2
|
.radarCurve-${r} {
|
|
3
3
|
color: ${i};
|
|
4
4
|
fill: ${i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-FPAJGGOC-
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{i as e}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CECReL7o.js";import"./chunk-S6J4BHB3-BHybUXml.js";import"./chunk-LBM3YZW2-CvtIRI2w.js";import"./chunk-76Q3JFCE-CAXIRKnn.js";import"./chunk-T53DSG4Q-7987HmnS.js";import"./chunk-LHMN2FUI-Ca-4316E.js";import"./chunk-FWNWRKHM-VOvXoVoT.js";import{g as t,h as n}from"./src-CoWzf9ks.js";import{B as r,C as i,U as a,_ as o,a as s,c,d as l,v as u,y as d,z as f}from"./chunk-ABZYJK2D-B-uQQBad.js";import{t as p}from"./chunk-EXTU4WIE-hA6kjEor.js";import"./dist-Bz_xenUc.js";import{t as m}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as h}from"./mermaid-parser.core-B4UmuquT.js";var g=l.packet,_=class{constructor(){this.packet=[],this.setAccTitle=r,this.getAccTitle=u,this.setDiagramTitle=a,this.getDiagramTitle=i,this.getAccDescription=o,this.setAccDescription=f}static{n(this,`PacketDB`)}getConfig(){let t=e({...g,...d().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(e){e.length>0&&this.packet.push(e)}clear(){s(),this.packet=[]}},v=1e4,y=n((e,n)=>{m(e,n);let r=-1,i=[],a=1,{bitsPerRow:o}=n.getConfig();for(let{start:s,end:c,bits:l,label:u}of e.blocks){if(s!==void 0&&c!==void 0&&c<s)throw Error(`Packet block ${s} - ${c} is invalid. End must be greater than start.`);if(s??=r+1,s!==r+1)throw Error(`Packet block ${s} - ${c??s} is not contiguous. It should start from ${r+1}.`);if(l===0)throw Error(`Packet block ${s} is invalid. Cannot have a zero bit field.`);for(c??=s+(l??1)-1,l??=c-s+1,r=c,t.debug(`Packet block ${s} - ${r} with label ${u}`);i.length<=o+1&&n.getPacket().length<v;){let[e,t]=b({start:s,end:c,bits:l,label:u},a,o);if(i.push(e),e.end+1===a*o&&(n.pushWord(i),i=[],a++),!t)break;({start:s,end:c,bits:l,label:u}=t)}}n.pushWord(i)},`populate`),b=n((e,t,n)=>{if(e.start===void 0)throw Error(`start should have been set during first phase`);if(e.end===void 0)throw Error(`end should have been set during first phase`);if(e.start>e.end)throw Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*n)return[e,void 0];let r=t*n-1,i=t*n;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:i,end:e.end,label:e.label,bits:e.end-i}]},`getNextFittingBlock`),x={parser:{yy:void 0},parse:n(async e=>{let n=await h(`packet`,e),r=x.parser?.yy;if(!(r instanceof _))throw Error(`parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.`);t.debug(n),y(n,r)},`parse`)},S=n((e,t,n,r)=>{let i=r.db,a=i.getConfig(),{rowHeight:o,paddingY:s,bitWidth:l,bitsPerRow:u}=a,d=i.getPacket(),f=i.getDiagramTitle(),m=o+s,h=m*(d.length+1)-(f?0:o),g=l*u+2,_=p(t);_.attr(`viewbox`,`0 0 ${g} ${h}`),c(_,h,g,a.useMaxWidth);for(let[e,t]of d.entries())C(_,t,e,a);_.append(`text`).text(f).attr(`x`,g/2).attr(`y`,h-m/2).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).attr(`class`,`packetTitle`)},`draw`),C=n((e,t,n,{rowHeight:r,paddingX:i,paddingY:a,bitWidth:o,bitsPerRow:s,showBits:c})=>{let l=e.append(`g`),u=n*(r+a)+a;for(let e of t){let t=e.start%s*o+1,n=(e.end-e.start+1)*o-i;if(l.append(`rect`).attr(`x`,t).attr(`y`,u).attr(`width`,n).attr(`height`,r).attr(`class`,`packetBlock`),l.append(`text`).attr(`x`,t+n/2).attr(`y`,u+r/2).attr(`class`,`packetLabel`).attr(`dominant-baseline`,`middle`).attr(`text-anchor`,`middle`).text(e.label),!c)continue;let a=e.end===e.start,d=u-2;l.append(`text`).attr(`x`,t+(a?n/2:0)).attr(`y`,d).attr(`class`,`packetByte start`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,a?`middle`:`start`).text(e.start),a||l.append(`text`).attr(`x`,t+n).attr(`y`,d).attr(`class`,`packetByte end`).attr(`dominant-baseline`,`auto`).attr(`text-anchor`,`end`).text(e.end)}},`drawWord`),w={draw:S},T={byteFontSize:`10px`,startByteColor:`black`,endByteColor:`black`,labelColor:`black`,labelFontSize:`12px`,titleColor:`black`,titleFontSize:`14px`,blockStrokeColor:`black`,blockStrokeWidth:`1`,blockFillColor:`#efefef`},E={parser:x,get db(){return new _},renderer:w,styles:n(({packet:t}={})=>{let n=e(T,t);return`
|
|
2
2
|
.packetByte {
|
|
3
3
|
font-size: ${n.byteFontSize};
|
|
4
4
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{n as e,t}from"./chunk-S6J4BHB3-BHybUXml.js";export{e as createGitGraphServices};
|
package/client/dist/{gitGraphDiagram-NY62KEGX-Cr6_VXUM.js → gitGraphDiagram-NY62KEGX-Jp7zkjZT.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./chunk-FPAJGGOC-_ax7LrI6.js";import{g as e,i as t,m as n}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CzEL6GEY.js";import"./chunk-S6J4BHB3-dkKq153Y.js";import"./chunk-LBM3YZW2-D1UaPZ0s.js";import"./chunk-76Q3JFCE-naB4GsSN.js";import"./chunk-T53DSG4Q-m8YxcxT5.js";import"./chunk-LHMN2FUI-DvMeDi1w.js";import"./chunk-FWNWRKHM-DESdnxaO.js";import{g as r,h as i,p as a}from"./src-CoWzf9ks.js";import{B as o,C as s,K as c,U as l,_ as u,a as d,b as f,d as ee,s as p,v as m,y as h,z as g}from"./chunk-ABZYJK2D-B-uQQBad.js";import"./dist-Bz_xenUc.js";import{t as _}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as te}from"./mermaid-parser.core-lVkskdol.js";import{t as ne}from"./chunk-QZHKN3VN-Cor-573y.js";var v={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=ee.gitGraph,y=i(()=>t({...re,...h().gitGraph}),`getConfig`),b=new ne(()=>{let e=y(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function x(){return n({length:7})}i(x,`getID`);function S(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(S,`uniqBy`);var ie=i(function(e){b.records.direction=e},`setDirection`),ae=i(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{b.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),oe=i(function(){return b.records.options},`getOptions`),se=i(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=y();n=p.sanitizeText(n,o),t=p.sanitizeText(t,o),a=a?.map(e=>p.sanitizeText(e,o));let s={id:n||b.records.seq+`-`+x(),message:t,seq:b.records.seq++,type:i??v.NORMAL,tags:a??[],parents:b.records.head==null?[]:[b.records.head.id],branch:b.records.currBranch};b.records.head=s,r.info(`main branch`,o.mainBranchName),b.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),b.records.commits.set(s.id,s),b.records.branches.set(b.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),ce=i(function(e){let t=e.name,n=e.order;if(t=p.sanitizeText(t,y()),b.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);b.records.branches.set(t,b.records.head==null?null:b.records.head.id),b.records.branchConfig.set(t,{name:t,order:n}),C(t),r.debug(`in createBranch`)},`branch`),le=i(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=y();t=p.sanitizeText(t,o),n&&=p.sanitizeText(n,o);let s=b.records.branches.get(b.records.currBranch),c=b.records.branches.get(t),l=s?b.records.commits.get(s):void 0,u=c?b.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(b.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!b.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&b.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let d=c||``,f={id:n||`${b.records.seq}-${x()}`,message:`merged branch ${t} into ${b.records.currBranch}`,seq:b.records.seq++,parents:b.records.head==null?[]:[b.records.head.id,d],branch:b.records.currBranch,type:v.MERGE,customType:i,customId:!!n,tags:a??[]};b.records.head=f,b.records.commits.set(f.id,f),b.records.branches.set(b.records.currBranch,f.id),r.debug(b.records.branches),r.debug(`in mergeBranch`)},`merge`),ue=i(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=y();if(t=p.sanitizeText(t,o),n=p.sanitizeText(n,o),i=i?.map(e=>p.sanitizeText(e,o)),a=p.sanitizeText(a,o),!t||!b.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=b.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===v.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!b.records.commits.has(n)){if(c===b.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=b.records.branches.get(b.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=b.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:b.records.seq+`-`+x(),message:`cherry-picked ${s?.message} into ${b.records.currBranch}`,seq:b.records.seq++,parents:b.records.head==null?[]:[b.records.head.id,s.id],branch:b.records.currBranch,type:v.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===v.MERGE?`|parent:${a}`:``}`]};b.records.head=l,b.records.commits.set(l.id,l),b.records.branches.set(b.records.currBranch,l.id),r.debug(b.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),C=i(function(e){if(e=p.sanitizeText(e,y()),b.records.branches.has(e)){b.records.currBranch=e;let t=b.records.branches.get(b.records.currBranch);t===void 0||!t?b.records.head=null:b.records.head=b.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function w(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(w,`upsert`);function T(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){e===t?n+=` *`:n+=` |`});let i=[n,t.id,t.seq];for(let e in b.records.branches)b.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=b.records.commits.get(t.parents[0]);w(e,t,n),t.parents[1]&&e.push(b.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=b.records.commits.get(t.parents[0]);w(e,t,n)}e=S(e,e=>e.id),T(e)}i(T,`prettyPrintCommitHistory`);var de=i(function(){r.debug(b.records.commits);let e=E()[0];T([e])},`prettyPrint`),fe=i(function(){b.reset(),d()},`clear`),pe=i(function(){return[...b.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),me=i(function(){return b.records.branches},`getBranches`),he=i(function(){return b.records.commits},`getCommits`),E=i(function(){let e=[...b.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),D={commitType:v,getConfig:y,setDirection:ie,setOptions:ae,getOptions:oe,commit:se,branch:ce,merge:le,cherryPick:ue,checkout:C,prettyPrint:de,clear:fe,getBranchesAsObjArray:pe,getBranches:me,getCommits:he,getCommitsArray:E,getCurrentBranch:i(function(){return b.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return b.records.direction},`getDirection`),getHead:i(function(){return b.records.head},`getHead`),setAccTitle:o,getAccTitle:m,getAccDescription:u,setAccDescription:g,setDiagramTitle:l,getDiagramTitle:s},O=i((e,t)=>{_(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)k(n,t)},`populate`),k=i((e,t)=>{let n={Commit:i(e=>t.commit(A(e)),`Commit`),Branch:i(e=>t.branch(j(e)),`Branch`),Merge:i(e=>t.merge(M(e)),`Merge`),Checkout:i(e=>t.checkout(N(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(P(e)),`CherryPicking`)}[e.$type];n?n(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),A=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?v.NORMAL:v[e.type],tags:e.tags??void 0}),`parseCommit`),j=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),M=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:v[e.type],tags:e.tags??void 0}),`parseMerge`),N=i(e=>e.branch,`parseCheckout`),P=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),F={parse:i(async e=>{let t=await te(`gitGraph`,e);r.debug(t),O(t,D)},`parse`)},I=f()?.gitGraph,L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,ge=i(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=i(e=>{let t,n,r;return J===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),_e=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ve=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=be(n),i=Math.max(r,i)):a.push(n),xe(n,r)}),r=i,a.forEach(e=>{Se(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=_e(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),ye=i(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),be=i(e=>ye(e)+R,`calculateCommitPosition`),xe=i((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Se=i((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),Ce=i((e,t,n,r,i,a)=>{if(a===v.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===v.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===v.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===v.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===v.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),we=i((e,t,n,r)=>{if(t.type!==v.CHERRY_PICK&&(t.customId&&t.type===v.MERGE||t.type!==v.MERGE)&&I?.showCommitLabel){let i=e.append(`g`),a=i.insert(`rect`).attr(`class`,`commit-label-bkg`),o=i.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),s=o.node()?.getBBox();if(s&&(a.attr(`x`,n.posWithOffset-s.width/2-B).attr(`y`,n.y+13.5).attr(`width`,s.width+2*B).attr(`height`,s.height+2*B),J===`TB`||J===`BT`?(a.attr(`x`,n.x-(s.width+4*z+5)).attr(`y`,n.y-12),o.attr(`x`,n.x-(s.width+4*z)).attr(`y`,n.y+s.height-12)):o.attr(`x`,n.posWithOffset-s.width/2),I.rotateCommitLabel))if(J===`TB`||J===`BT`)o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),a.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5;i.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Te=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{g as e,i as t,m as n}from"./chunk-S3R3BYOJ-CQpHdWQs.js";import"./chunk-O7ZBX7Z2-CECReL7o.js";import"./chunk-S6J4BHB3-BHybUXml.js";import"./chunk-LBM3YZW2-CvtIRI2w.js";import"./chunk-76Q3JFCE-CAXIRKnn.js";import"./chunk-T53DSG4Q-7987HmnS.js";import"./chunk-LHMN2FUI-Ca-4316E.js";import"./chunk-FWNWRKHM-VOvXoVoT.js";import{g as r,h as i,p as a}from"./src-CoWzf9ks.js";import{B as o,C as s,K as c,U as l,_ as u,a as d,b as f,d as ee,s as p,v as m,y as h,z as g}from"./chunk-ABZYJK2D-B-uQQBad.js";import"./dist-Bz_xenUc.js";import{t as _}from"./chunk-4BX2VUAB-CnDqYS75.js";import{t as te}from"./mermaid-parser.core-B4UmuquT.js";import{t as ne}from"./chunk-QZHKN3VN-Cor-573y.js";var v={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=ee.gitGraph,y=i(()=>t({...re,...h().gitGraph}),`getConfig`),b=new ne(()=>{let e=y(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function x(){return n({length:7})}i(x,`getID`);function S(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(S,`uniqBy`);var ie=i(function(e){b.records.direction=e},`setDirection`),ae=i(function(e){r.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{b.records.options=JSON.parse(e)}catch(e){r.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),oe=i(function(){return b.records.options},`getOptions`),se=i(function(e){let t=e.msg,n=e.id,i=e.type,a=e.tags;r.info(`commit`,t,n,i,a),r.debug(`Entering commit:`,t,n,i,a);let o=y();n=p.sanitizeText(n,o),t=p.sanitizeText(t,o),a=a?.map(e=>p.sanitizeText(e,o));let s={id:n||b.records.seq+`-`+x(),message:t,seq:b.records.seq++,type:i??v.NORMAL,tags:a??[],parents:b.records.head==null?[]:[b.records.head.id],branch:b.records.currBranch};b.records.head=s,r.info(`main branch`,o.mainBranchName),b.records.commits.has(s.id)&&r.warn(`Commit ID ${s.id} already exists`),b.records.commits.set(s.id,s),b.records.branches.set(b.records.currBranch,s.id),r.debug(`in pushCommit `+s.id)},`commit`),ce=i(function(e){let t=e.name,n=e.order;if(t=p.sanitizeText(t,y()),b.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);b.records.branches.set(t,b.records.head==null?null:b.records.head.id),b.records.branchConfig.set(t,{name:t,order:n}),C(t),r.debug(`in createBranch`)},`branch`),le=i(e=>{let t=e.branch,n=e.id,i=e.type,a=e.tags,o=y();t=p.sanitizeText(t,o),n&&=p.sanitizeText(n,o);let s=b.records.branches.get(b.records.currBranch),c=b.records.branches.get(t),l=s?b.records.commits.get(s):void 0,u=c?b.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(b.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!b.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&b.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${i} ${a?.join(` `)}`,token:`merge ${t} ${n} ${i} ${a?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${i} ${a?.join(` `)}`]},e}let d=c||``,f={id:n||`${b.records.seq}-${x()}`,message:`merged branch ${t} into ${b.records.currBranch}`,seq:b.records.seq++,parents:b.records.head==null?[]:[b.records.head.id,d],branch:b.records.currBranch,type:v.MERGE,customType:i,customId:!!n,tags:a??[]};b.records.head=f,b.records.commits.set(f.id,f),b.records.branches.set(b.records.currBranch,f.id),r.debug(b.records.branches),r.debug(`in mergeBranch`)},`merge`),ue=i(function(e){let t=e.id,n=e.targetId,i=e.tags,a=e.parent;r.debug(`Entering cherryPick:`,t,n,i);let o=y();if(t=p.sanitizeText(t,o),n=p.sanitizeText(n,o),i=i?.map(e=>p.sanitizeText(e,o)),a=p.sanitizeText(a,o),!t||!b.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=b.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===v.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!b.records.commits.has(n)){if(c===b.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=b.records.branches.get(b.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=b.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:b.records.seq+`-`+x(),message:`cherry-picked ${s?.message} into ${b.records.currBranch}`,seq:b.records.seq++,parents:b.records.head==null?[]:[b.records.head.id,s.id],branch:b.records.currBranch,type:v.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===v.MERGE?`|parent:${a}`:``}`]};b.records.head=l,b.records.commits.set(l.id,l),b.records.branches.set(b.records.currBranch,l.id),r.debug(b.records.branches),r.debug(`in cherryPick`)}},`cherryPick`),C=i(function(e){if(e=p.sanitizeText(e,y()),b.records.branches.has(e)){b.records.currBranch=e;let t=b.records.branches.get(b.records.currBranch);t===void 0||!t?b.records.head=null:b.records.head=b.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function w(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(w,`upsert`);function T(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){e===t?n+=` *`:n+=` |`});let i=[n,t.id,t.seq];for(let e in b.records.branches)b.records.branches.get(e)===t.id&&i.push(e);if(r.debug(i.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=b.records.commits.get(t.parents[0]);w(e,t,n),t.parents[1]&&e.push(b.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=b.records.commits.get(t.parents[0]);w(e,t,n)}e=S(e,e=>e.id),T(e)}i(T,`prettyPrintCommitHistory`);var de=i(function(){r.debug(b.records.commits);let e=E()[0];T([e])},`prettyPrint`),fe=i(function(){b.reset(),d()},`clear`),pe=i(function(){return[...b.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),me=i(function(){return b.records.branches},`getBranches`),he=i(function(){return b.records.commits},`getCommits`),E=i(function(){let e=[...b.records.commits.values()];return e.forEach(function(e){r.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),D={commitType:v,getConfig:y,setDirection:ie,setOptions:ae,getOptions:oe,commit:se,branch:ce,merge:le,cherryPick:ue,checkout:C,prettyPrint:de,clear:fe,getBranchesAsObjArray:pe,getBranches:me,getCommits:he,getCommitsArray:E,getCurrentBranch:i(function(){return b.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return b.records.direction},`getDirection`),getHead:i(function(){return b.records.head},`getHead`),setAccTitle:o,getAccTitle:m,getAccDescription:u,setAccDescription:g,setDiagramTitle:l,getDiagramTitle:s},O=i((e,t)=>{_(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)k(n,t)},`populate`),k=i((e,t)=>{let n={Commit:i(e=>t.commit(A(e)),`Commit`),Branch:i(e=>t.branch(j(e)),`Branch`),Merge:i(e=>t.merge(M(e)),`Merge`),Checkout:i(e=>t.checkout(N(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(P(e)),`CherryPicking`)}[e.$type];n?n(e):r.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),A=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?v.NORMAL:v[e.type],tags:e.tags??void 0}),`parseCommit`),j=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),M=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:v[e.type],tags:e.tags??void 0}),`parseMerge`),N=i(e=>e.branch,`parseCheckout`),P=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),F={parse:i(async e=>{let t=await te(`gitGraph`,e);r.debug(t),O(t,D)},`parse`)},I=f()?.gitGraph,L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,ge=i(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=i(e=>{let t,n,r;return J===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),_e=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ve=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=be(n),i=Math.max(r,i)):a.push(n),xe(n,r)}),r=i,a.forEach(e=>{Se(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=_e(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),ye=i(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),be=i(e=>ye(e)+R,`calculateCommitPosition`),xe=i((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Se=i((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),Ce=i((e,t,n,r,i,a)=>{if(a===v.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===v.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===v.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===v.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===v.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),we=i((e,t,n,r)=>{if(t.type!==v.CHERRY_PICK&&(t.customId&&t.type===v.MERGE||t.type!==v.MERGE)&&I?.showCommitLabel){let i=e.append(`g`),a=i.insert(`rect`).attr(`class`,`commit-label-bkg`),o=i.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),s=o.node()?.getBBox();if(s&&(a.attr(`x`,n.posWithOffset-s.width/2-B).attr(`y`,n.y+13.5).attr(`width`,s.width+2*B).attr(`height`,s.height+2*B),J===`TB`||J===`BT`?(a.attr(`x`,n.x-(s.width+4*z+5)).attr(`y`,n.y-12),o.attr(`x`,n.x-(s.width+4*z)).attr(`y`,n.y+s.height-12)):o.attr(`x`,n.posWithOffset-s.width/2),I.rotateCommitLabel))if(J===`TB`||J===`BT`)o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),a.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(s.width+10)/25*9.5,t=10+s.width/25*8.5;i.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Te=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
2
2
|
${r-a/2-z/2},${l+B}
|
|
3
3
|
${r-a/2-z/2},${l-B}
|
|
4
4
|
${n.posWithOffset-a/2-z},${l-s-B}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import{n as e,t}from"./chunk-LBM3YZW2-CvtIRI2w.js";export{e as createInfoServices};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"./chunk-FPAJGGOC-
|
|
1
|
+
import"./chunk-FPAJGGOC-BjlYzVzU.js";import"./chunk-O7ZBX7Z2-CECReL7o.js";import"./chunk-S6J4BHB3-BHybUXml.js";import"./chunk-LBM3YZW2-CvtIRI2w.js";import"./chunk-76Q3JFCE-CAXIRKnn.js";import"./chunk-T53DSG4Q-7987HmnS.js";import"./chunk-LHMN2FUI-Ca-4316E.js";import"./chunk-FWNWRKHM-VOvXoVoT.js";import{g as e,h as t}from"./src-CoWzf9ks.js";import{c as n}from"./chunk-ABZYJK2D-B-uQQBad.js";import{t as r}from"./chunk-EXTU4WIE-hA6kjEor.js";import{t as i}from"./mermaid-parser.core-B4UmuquT.js";import{t as a}from"./chunk-6MN3ZHY7-B86W-RmZ.js";var o={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},s={version:a.version+``},c={parser:o,db:{getVersion:t(()=>s.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram
|
|
2
2
|
`+t);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{c as diagram};
|