PageSourceSearch

https://chpeptides.com/js/diagram-OG6HWLK6-q6xliLzz.js

js chpeptides.com collected 2026-10-04 06:37:47 UTC 15,708 bytes, 1 lines download raw bytes

vendor: 5,565 bytes, line 1
1import{_ as e,L as t,E as a,G as n,K as r,e as l,l as s,aR as o,d as i,b as c,a as d,q as p,t as h,g as u,s as f,H as m,aS as y,z as g}from"./mermaid.core-D8Wpv7P-.js";import{s as x}from"./chunk-2J33WTMH-CgFg-zt9.js";import{p as S}from"./chunk-4BX2VUAB-CokWx971.js";import{p as v}from"./wardley-L42UT6IY-bH6k1zOj.js";import{b}from"./defaultLocale-BsH76t_G.js";import{o as C}from"./ordinal-B3SZQd5H.js";import"./index-BwhXW8eI.js";import"./admin-vendor-B_1xywrZ.js";import"./react-vendor-DOiMLSFB.js";import"./data-vendor-CIxtln5N.js";import"./ui-vendor-CtHzwLAQ.js";import"./purify.es-Dwqavglh.js";import"./string-BuEQ6bSV.js";import"./init-DLRA0X12.js";function w(e){var t=0,a=e.children,n=a&&a.length;if(n)for(;--n>=0;)t+=a[n].value;else t=1;e.value=t}function $(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=M)):void 0===t&&(t=L);for(var a,n,r,l,s,o=new z(e),i=[o];a=i.pop();)if((r=t(a.data))&&(s=(r=Array.from(r)).length))for(a.children=r,l=s-1;l>=0;--l)i.push(n=r[l]=new z(r[l])),n.parent=a,n.depth=a.depth+1;return o.eachBefore(k)}function L(e){return e.children}function M(e){return Array.isArray(e)?e[1]:null}function T(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function k(e){var t=0;do{e.height=t}while((e=e.parent)&&e.height<++t)}function z(e){this.data=e,this.depth=this.height=0,this.parent=null}function F(){return 0}function j(e){return function(){return e}}function A(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 B(e,t,a,n,r){for(var l,s=e.children,o=-1,i=s.length,c=e.value&&(n-t)/e.value;++o<i;)(l=s[o]).y0=a,l.y1=r,l.x0=t,l.x1=t+=l.value*c}function P(e,t,a,n,r){for(var l,s=e.children,o=-1,i=s.length,c=e.value&&(r-a)/e.value;++o<i;)(l=s[o]).x0=t,l.x1=n,l.y0=a,l.y1=a+=l.value*c}z.prototype=$.prototype={constructor:z,count:function(){return this.eachAfter(w)},each:function(e,t){let a=-1;for(const n of this)e.call(t,n,++a,this);return this},eachAfter:function(e,t){for(var a,n,r,l=this,s=[l],o=[],i=-1;l=s.pop();)if(o.push(l),a=l.children)for(n=0,r=a.length;n<r;++n)s.push(a[n]);for(;l=o.pop();)e.call(t,l,++i,this);return this},eachBefore:function(e,t){for(var a,n,r=this,l=[r],s=-1;r=l.pop();)if(e.call(t,r,++s,this),a=r.children)for(n=a.length-1;n>=0;--n)l.push(a[n]);return this},find:function(e,t){let a=-1;for(const n of this)if(e.call(t,n,++a,this))return n},sum:function(e){return this.eachAfter(function(t){for(var a=+e(t.data)||0,n=t.children,r=n&&n.length;--r>=0;)a+=n[r].value;t.value=a})},sort:function(e){return this.eachBefore(function(t){t.children&&t.children.sort(e)})},path:function(e){for(var t=this,a=function(e,t){if(e===t)return e;var a=e.ancestors(),n=t.ancestors(),r=null;e=a.pop(),t=n.pop();for(;e===t;)r=e,e=a.pop(),t=n.pop();return r}(t,e),n=[t];t!==a;)t=t.parent,n.push(t);for(var r=n.length;e!==a;)n.splice(r,0,e),e=e.parent;return n},ancestors:function(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t},descendants:function(){return Array.from(this)},leaves:function(){var e=[];return this.eachBefore(function(t){t.children||e.push(t)}),e},links:function(){var e=this,t=[];return e.each(function(a){a!==e&&t.push({source:a.parent,target:a})}),t},copy:function(){return $(this).eachBefore(T)},[Symbol.iterator]:function*(){var e,t,a,n,r=this,l=[r];do{for(e=l.reverse(),l=[];r=e.pop();)if(yield r,t=r.children)for(a=0,n=t.length;a<n;++a)l.push(t[a])}while(l.length)}};const N=function e(t){function a(e,a,n,r,l){!function(e,t,a,n,r,l){for(var s,o,i,c,d,p,h,u,f,m,y,g=[],x=t.children,S=0,v=0,b=x.length,C=t.value;S<b;){i=r-a,c=l-n;do{d=x[v++].value}while(!d&&v<b);for(p=h=d,y=d*d*(m=Math.max(c/i,i/c)/(C*e)),f=Math.max(h/y,y/p);v<b;++v){if(d+=o=x[v].value,o<p&&(p=o),o>h&&(h=o),y=d*d*m,(u=Math.max(h/y,y/p))>f){d-=o;break}f=u}g.push(s={value:d,dice:i<c,children:x.slice(S,v)}),s.dice?B(s,a,n,r,C?n+=c*d/C:l):P(s,a,n,C?a+=i*d/C:r,l),C-=d,S=v}}(t,e,a,n,r,l)}return a.ratio=function(t){return e((t=+t)>1?t:1)},a}((1+Math.sqrt(5))/2);function W(){var e=N,t=!1,a=1,n=1,r=[0],l=F,s=F,o=F,i=F,c=F;function d(e){return e.x0=e.y0=0,e.x1=a,e.y1=n,e.eachBefore(p),r=[0],t&&e.eachBefore(A),e}function p(t){var a=r[t.depth],n=t.x0+a,d=t.y0+a,p=t.x1-a,h=t.y1-a;p<n&&(n=p=(n+p)/2),h<d&&(d=h=(d+h)/2),t.x0=n,t.y0=d,t.x1=p,t.y1=h,t.children&&(a=r[t.depth+1]=l(t)/2,n+=c(t)-a,d+=s(t)-a,(p-=o(t)-a)<n&&(n=p=(n+p)/2),(h-=i(t)-a)<d&&(d=h=(d+h)/2),e(t,n,d,p,h))}return d.round=function(e){return arguments.length?(t=!!e,d):t},d.size=function(e){return arguments.length?(a=+e[0],n=+e[1],d):[a,n]},d.tile=function(t){return arguments.length?(e=function(e){if("function"!=typeof e)throw new Error;return e}(t),d):e},d.padding=function(e){return arguments.length?d.paddingInner(e).paddingOuter(e):d.paddingInner()},d.paddingInner=function(e){return arguments.length?(l="function"==typeof e?e:j(+e),d):l},d.paddingOuter=function(e){return arguments.length?d.paddingTop(e).paddingRight(e).paddingBottom(e).paddingLeft(e):d.paddingTop()},d.paddingTop=function(e){return arguments.length?(s="function"==typeof e?e:j(+e),d):s},d.paddingRight=function(e){return arguments.length?(o="function"==typeof e?e:j(+e),d):o},d.paddingBottom=function(e){return arguments.length?(i="function"==typeof e?e:j(+e),d):i},d.paddingLeft=function(e){return arguments.length?(c="function"==typeof e?e:j(+e),d):c},d}var R=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=c,this.getAccTitle=d,this.setDiagramTitle=p,this.getDiagramTitle=h,this.getAccDescription=u,this.setAccDescription=f}static{e(this,"TreeMapDB")}
1getNodes(){return this.nodes}getConfig(){const e=m,t=a();return n({...e.treemap,...t.treemap??{}})}addNode(e,t){this.nodes.push(e),this.levels.set(e,t),0===t&&(this.outerNodes.push(e),this.root??=e)}getRoot(){return{name:"",children:this.outerNodes}}addClass(e,t){const a=this.classes.get(e)??{id:e,styles:[],textStyles:[]},n=t.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");n&&n.forEach(e=>{y(e)&&(a?.textStyles?a.textStyles.push(e):a.textStyles=[e]),a?.styles?a.styles.push(e):a.styles=[e]}),this.classes.set(e,a)}getClasses(){return this.classes}getStylesForClass(e){return this.classes.get(e)?.styles??[]}clear(){g(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function V(e){if(!e.length)return[];const t=[],a=[];return e.forEach(e=>{const n={name:e.name,children:"Leaf"===e.type?void 0:[]};for(n.classSelector=e?.classSelector,e?.cssCompiledStyles&&(n.cssCompiledStyles=e.cssCompiledStyles),"Leaf"===e.type&&void 0!==e.value&&(n.value=e.value);a.length>0&&a[a.length-1].level>=e.level;)a.pop();if(0===a.length)t.push(n);else{const e=a[a.length-1].node;e.children?e.children.push(n):e.children=[n]}"Leaf"!==e.type&&a.push({node:n,level:e.level})}),t}e(V,"buildHierarchy");var D=e((t,a)=>{S(t,a);const n=[];for(const e of t.TreemapRows??[])"ClassDefStatement"===e.$type&&a.addClass(e.className??"",e.styleText??"");for(const e of t.TreemapRows??[]){const t=e.item;if(!t)continue;const r=e.indent?parseInt(e.indent):0,l=I(t),s=t.classSelector?a.getStylesForClass(t.classSelector):[],o=s.length>0?s:void 0,i={level:r,name:l,type:t.$type,value:t.value,classSelector:t.classSelector,cssCompiledStyles:o};n.push(i)}const r=V(n),l=e((e,t)=>{for(const n of e)a.addNode(n,t),n.children&&n.children.length>0&&l(n.children,t+1)},"addNodesRecursively");l(r,0)},"populate"),I=e(e=>e.name?String(e.name):"","getItemName"),E={parser:{yy:void 0},parse:e(async e=>{try{const t=v,a=await t("treemap",e);s.debug("Treemap AST:",a);const n=E.parser?.yy;if(!(n instanceof R))throw new 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.");D(a,n)}catch(t){throw s.error("Error parsing treemap:",t),t}},"parse")},H=10,G={draw:e((t,n,c,d)=>{const p=d.db,h=p.getConfig(),u=h.padding??10,f=p.getDiagramTitle(),m=p.getRoot(),{themeVariables:y}=a();if(!m)return;const g=f?30:0,S=r(n),v=h.nodeWidth?h.nodeWidth*H:960,w=h.nodeHeight?h.nodeHeight*H:500,L=v,M=w+g;let T;S.attr("viewBox",`0 0 ${L} ${M}`),l(S,M,L,h.useMaxWidth);try{const t=h.valueFormat||",";if("$0,0"===t)T=e(e=>"$"+b(",")(e),"valueFormat");else if(t.startsWith("$")&&t.includes(",")){const a=/\.\d+/.exec(t),n=a?a[0]:"";T=e(e=>"$"+b(","+n)(e),"valueFormat")}else if(t.startsWith("$")){const a=t.substring(1);T=e(e=>"$"+b(a||"")(e),"valueFormat")}else T=b(t)}catch(I){s.error("Error creating format function:",I),T=b(",")}const k=C().range(["transparent",y.cScale0,y.cScale1,y.cScale2,y.cScale3,y.cScale4,y.cScale5,y.cScale6,y.cScale7,y.cScale8,y.cScale9,y.cScale10,y.cScale11]),z=C().range(["transparent",y.cScalePeer0,y.cScalePeer1,y.cScalePeer2,y.cScalePeer3,y.cScalePeer4,y.cScalePeer5,y.cScalePeer6,y.cScalePeer7,y.cScalePeer8,y.cScalePeer9,y.cScalePeer10,y.cScalePeer11]),F=C().range([y.cScaleLabel0,y.cScaleLabel1,y.cScaleLabel2,y.cScaleLabel3,y.cScaleLabel4,y.cScaleLabel5,y.cScaleLabel6,y.cScaleLabel7,y.cScaleLabel8,y.cScaleLabel9,y.cScaleLabel10,y.cScaleLabel11]);f&&S.append("text").attr("x",L/2).attr("y",g/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(f);const j=S.append("g").attr("transform",`translate(0, ${g})`).attr("class","treemapContainer"),A=$(m).sum(e=>e.value??0).sort((e,t)=>(t.value??0)-(e.value??0)),B=W().size([v,w]).paddingTop(e=>e.children&&e.children.length>0?35:0).paddingInner(u).paddingLeft(e=>e.children&&e.children.length>0?H:0).paddingRight(e=>e.children&&e.children.length>0?H:0).paddingBottom(e=>e.children&&e.children.length>0?H:0).round(!0)(A),P=B.descendants().filter(e=>e.children&&e.children.length>0),N=j.selectAll(".treemapSection").data(P).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);N.append("rect").attr("width",e=>e.x1-e.x0).attr("height",25).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>0===e.depth?"display: none;":""),N.append("clipPath").attr("id",(e,t)=>`clip-section-${n}-${t}`).append("rect").attr("width",e=>Math.max(0,e.x1-e.x0-12)).attr("height",25),N.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=>k(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>z(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(0===e.depth)return"display: none;";const t=o({cssCompiledStyles:e.data.cssCompiledStyles});return t.nodeStyles+";"+t.borderStyles.join(";")}),N.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",12.5).attr("dominant-baseline","middle").text(e=>0===e.depth?"":e.data.name).attr("font-weight","bold").attr("style",e=>{if(0===e.depth)return"display: none;";return"dominant-baseline: middle; font-size: 12px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+o({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")}).each(function(e){if(0===e.depth)return;const t=i(this),a=e.data.name;t.text(a);const n=e.x1-e.x0;let r;if(!1!==h.showValues&&e.value){r=n-10-30-10-6}else{r=n-6-6}const l=Math.max(15,r),s=t.node();if(s.getComputedTextLength()>l){const e="...";let n=a;for(;n.length>0;){if(n=a.substring(0,n.length-1),0===n.length){t.text(e),s.getComputedTextLength()>l&&t.text("");break}if(t.text(n+e),s.getComputedTextLength()<=l)break}}}),!1!==h.showValues&&N.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",12.5).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>
1e.value?T(e.value):"").attr("font-style","italic").attr("style",e=>{if(0===e.depth)return"display: none;";return"text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+F(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"+o({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")});const R=B.leaves(),V=j.selectAll(".treemapLeafGroup").data(R).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})`);V.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr("style",e=>o({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?k(e.parent.data.name):k(e.data.name)).attr("stroke-width",3),V.append("clipPath").attr("id",(e,t)=>`clip-${n}-${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));if(V.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:"+F(e.data.name)+";"+o({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${n}-${t})`).text(e=>e.data.name).each(function(e){const t=i(this),a=e.x1-e.x0,n=e.y1-e.y0,r=t.node(),l=a-8,s=n-8;if(l<10||s<10)return void t.style("display","none");let o=parseInt(t.style("font-size"),10);for(;r.getComputedTextLength()>l&&o>8;)o--,t.style("font-size",`${o}px`);let c=Math.max(6,Math.min(28,Math.round(.6*o))),d=o+2+c;for(;d>s&&o>8&&(o--,c=Math.max(6,Math.min(28,Math.round(.6*o))),!(c<6&&8===o));)t.style("font-size",`${o}px`),d=o+2+c;t.style("font-size",`${o}px`),(r.getComputedTextLength()>l||o<8||s<o)&&t.style("display","none")}),!1!==h.showValues){V.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:"+F(e.data.name)+";"+o({cssCompiledStyles:e.data.cssCompiledStyles}).labelStyles.replace("color:","fill:")).attr("clip-path",(e,t)=>`url(#clip-${n}-${t})`).text(e=>e.value?T(e.value):"").each(function(e){const t=i(this),a=this.parentNode;if(!a)return void t.style("display","none");const n=i(a).select(".treemapLabel");if(n.empty()||"none"===n.style("display"))return void t.style("display","none");const r=parseFloat(n.style("font-size")),l=Math.max(6,Math.min(28,Math.round(.6*r)));t.style("font-size",`${l}px`);const s=(e.y1-e.y0)/2+r/2+2;t.attr("y",s);const o=e.x1-e.x0,c=e.y1-e.y0-4,d=o-8;t.node().getComputedTextLength()>d||s+l>c||l<6?t.style("display","none"):t.style("display",null)})}const D=h.diagramPadding??8;x(S,D,"flowchart",h?.useMaxWidth||!1)},"draw"),getClasses:e(function(e,t){return t.db.getClasses()},"getClasses")},q={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},O=e(({treemap:e}={})=>{const r=t(),l=a(),s=n(r,l.themeVariables),o=n(q,e),i=o.titleColor??s.titleColor,c=o.labelColor??s.textColor,d=o.valueColor??s.textColor;return`\n  .treemapNode.section {\n    stroke: ${o.sectionStrokeColor};\n    stroke-width: ${o.sectionStrokeWidth};\n    fill: ${o.sectionFillColor};\n  }\n  .treemapNode.leaf {\n    stroke: ${o.leafStrokeColor};\n    stroke-width: ${o.leafStrokeWidth};\n    fill: ${o.leafFillColor};\n  }\n  .treemapLabel {\n    fill: ${c};\n    font-size: ${o.labelFontSize};\n  }\n  .treemapValue {\n    fill: ${d};\n    font-size: ${o.valueFontSize};\n  }\n  .treemapTitle {\n    fill: ${i};\n    font-size: ${o.titleFontSize};\n  }\n  `},"getStyles"),U={parser:E,get db(){return new R},renderer:G,styles:O};export{U as diagram};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.