@bkm016/basalt 0.1.7 → 0.1.8
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/README.md +1 -1
- package/{chunk-n981vx1t.js → chunk-0d51ggzj.js} +6 -6
- package/chunk-12trygzx.js +25 -0
- package/{chunk-s6dejhfj.js → chunk-26cz8et8.js} +1 -1
- package/{chunk-zxkq9m8e.js → chunk-2ek3wq4b.js} +2 -2
- package/chunk-2gcp3xdc.js +2 -0
- package/{chunk-x4874m8e.js → chunk-2ks2tnac.js} +2 -2
- package/{chunk-0javrjcm.js → chunk-2nrkqq45.js} +22 -22
- package/chunk-320174qe.js +2 -0
- package/{chunk-ey15ye2h.js → chunk-3hg7yn1t.js} +1 -1
- package/{chunk-benrzwea.js → chunk-3j2kkgsc.js} +1 -1
- package/{chunk-8x21n7y9.js → chunk-47vf66t6.js} +1 -1
- package/chunk-4n49ptbz.js +3 -0
- package/{chunk-7hr6zw2m.js → chunk-5gxj9560.js} +1 -1
- package/{chunk-g0t9c3gv.js → chunk-6vnjg5x9.js} +1 -1
- package/{chunk-dnx91jrd.js → chunk-7kjr9gdx.js} +2 -2
- package/{chunk-y8dkfpmj.js → chunk-7p6e2f5s.js} +3 -3
- package/{chunk-053vb71h.js → chunk-86xhmz7k.js} +1 -1
- package/{chunk-ebpyvs1d.js → chunk-91r5nvth.js} +2 -2
- package/{chunk-c7rcw9fb.js → chunk-adys4qq4.js} +4 -4
- package/{chunk-npez1492.js → chunk-ckjw3b61.js} +2 -2
- package/{chunk-f156y565.js → chunk-d37gemt2.js} +3 -3
- package/{chunk-j7yvh0ae.js → chunk-dcwdmpw2.js} +1 -1
- package/chunk-dvb5nd2x.js +2 -0
- package/{chunk-063vbmtp.js → chunk-e6c2mzxc.js} +2 -2
- package/{chunk-s7skpgm2.js → chunk-ef9yhnk3.js} +1 -1
- package/{chunk-ecf896fz.js → chunk-fpxc6qjr.js} +2 -2
- package/chunk-frt9k18g.js +480 -0
- package/{chunk-bdy4jksd.js → chunk-fzcmzbsq.js} +1 -1
- package/{chunk-q9dd6fhj.js → chunk-g3ed130w.js} +3 -3
- package/{chunk-d48bfd2e.js → chunk-h1kb8b49.js} +2 -2
- package/{chunk-arcqjt91.js → chunk-hd3x1w46.js} +1 -1
- package/{chunk-dpz4hwqb.js → chunk-j781n7ca.js} +2 -2
- package/{chunk-z02sj1je.js → chunk-jp5afrwm.js} +2 -2
- package/{chunk-r8vvcp6c.js → chunk-jyv9cae6.js} +1 -1
- package/{chunk-whj87h4r.js → chunk-k3q5jqjj.js} +3 -3
- package/{chunk-75434aay.js → chunk-k3rmjrf1.js} +1 -1
- package/{chunk-peja51xv.js → chunk-kgkrccr1.js} +2 -2
- package/{chunk-pg5nkf1y.js → chunk-kpvaqb7c.js} +2 -2
- package/{chunk-sjjtxpg2.js → chunk-ky55taar.js} +330 -288
- package/{chunk-10p3mb40.js → chunk-mr807v9n.js} +1 -1
- package/chunk-n015c8nx.js +2 -0
- package/chunk-ndt6rjt9.js +2 -0
- package/{chunk-gv7wqkey.js → chunk-nmtk9xra.js} +2 -2
- package/{chunk-d6p2hgxh.js → chunk-pehyqj8k.js} +1 -1
- package/{chunk-ca982n62.js → chunk-pkpj7s2k.js} +1 -1
- package/{chunk-fx7f4m3c.js → chunk-pn413hjw.js} +1 -1
- package/{chunk-6ptv4g5e.js → chunk-ppxv5q7y.js} +3 -3
- package/{chunk-8wj32837.js → chunk-qmdpgbg3.js} +1 -1
- package/{chunk-8wv5t0w6.js → chunk-rnt1ckk9.js} +6 -6
- package/{chunk-prgm07j4.js → chunk-t40fag3z.js} +2 -2
- package/{chunk-w67dvqtb.js → chunk-t66jqz12.js} +2 -2
- package/{chunk-39vwrg8n.js → chunk-v2srrqcv.js} +2 -2
- package/{chunk-n85qs7cs.js → chunk-x496kg3v.js} +1 -1
- package/{chunk-6kdgk70p.js → chunk-xjw78yey.js} +4 -4
- package/chunk-xy2bxwq8.js +2 -0
- package/{chunk-y69ewdn2.js → chunk-ypqjfv3a.js} +2 -2
- package/{chunk-f544p9rh.js → chunk-yyy2yp6f.js} +10 -10
- package/{chunk-8gw5bvh3.js → chunk-yzevjkms.js} +5 -5
- package/chunk-z3ch1wg6.js +16 -0
- package/chunk-zdyd8hbn.js +2 -0
- package/compiled.js +6 -6
- package/package.json +1 -1
- package/ui-test-worker.js +19 -19
- package/web/{chunk-kjacapzd.js → chunk-0j9a7811.js} +6 -6
- package/web/chunk-0jfda4jw.js +2 -0
- package/web/{chunk-z1geewdf.js → chunk-0zwc2rvh.js} +2 -2
- package/web/{chunk-ht4mx2dt.js → chunk-1gx0zpmp.js} +7 -7
- package/web/{chunk-q3jevm51.js → chunk-1s8zg6fb.js} +51 -51
- package/web/chunk-2axwda8c.js +89 -0
- package/web/chunk-2p3fkhy8.js +1 -0
- package/web/{chunk-tz4twwmw.js → chunk-33w36n91.js} +2 -2
- package/web/{chunk-1s53190z.js → chunk-3q0v8w45.js} +81 -81
- package/web/chunk-3sz5qcwj.js +1 -0
- package/web/chunk-433c80pc.js +1 -0
- package/web/chunk-48cnmhvd.js +106 -0
- package/web/{chunk-da7m1kva.js → chunk-4anjs6yp.js} +2 -2
- package/web/chunk-5r37rwq1.js +4 -0
- package/web/{chunk-pjz30xcp.js → chunk-6e38yf3a.js} +23 -23
- package/web/{chunk-xckxtfp8.js → chunk-7a4xk6j9.js} +72 -72
- package/web/chunk-7f1t7z72.js +2 -0
- package/web/chunk-7qq1ypvj.js +1 -0
- package/web/{chunk-h6k1x096.js → chunk-7tkgbbf9.js} +2 -2
- package/web/chunk-7x35g67d.js +78 -0
- package/web/{chunk-xbpc6x9m.js → chunk-823b7866.js} +15 -15
- package/web/chunk-85gdsmt4.js +1 -0
- package/web/{chunk-gyp6v7jd.js → chunk-8773nwdc.js} +2 -2
- package/web/{chunk-2cem4sv7.js → chunk-8dp7h6w8.js} +24 -24
- package/web/{chunk-y99ed8rd.js → chunk-8nv7q5ac.js} +9 -9
- package/web/chunk-8pzg8qw4.js +1 -0
- package/web/chunk-8wg44w91.js +2 -0
- package/web/chunk-9p5dfvav.js +1 -0
- package/web/chunk-9q9w9pay.js +1 -0
- package/web/chunk-a3teqvz2.js +39 -0
- package/web/chunk-bd8ftfxn.js +3 -0
- package/web/chunk-c03bt2pz.js +1 -0
- package/web/chunk-c1ha2xg6.js +8 -0
- package/web/chunk-cez1k71m.js +1 -0
- package/web/chunk-cgng31df.js +1 -0
- package/web/chunk-cn0tmwjs.js +2 -0
- package/web/{chunk-t6sq85s6.js → chunk-cn1xpg3q.js} +2 -2
- package/web/chunk-cvd4f51j.js +1 -0
- package/web/chunk-cybvxssy.js +1 -0
- package/web/{chunk-geh05ghh.js → chunk-cyjnert7.js} +19 -19
- package/web/{chunk-twdy2f67.js → chunk-d0m0h0eb.js} +1 -1
- package/web/{chunk-sn3tkwme.js → chunk-dgwkqcz6.js} +37 -37
- package/web/{chunk-nfvqjzz5.js → chunk-dtg5yhhs.js} +1 -1
- package/web/chunk-dynajx8x.js +2 -0
- package/web/{chunk-svh4n157.js → chunk-et8q775x.js} +4 -4
- package/web/chunk-f3vv7n52.js +1 -0
- package/web/{chunk-tmndcktk.js → chunk-f93pe4kb.js} +15 -15
- package/web/{chunk-5nda24gv.js → chunk-fe31sv6t.js} +1 -1
- package/web/chunk-fpa81dv7.js +62 -0
- package/web/{chunk-4q7wf0wd.js → chunk-fx4mackk.js} +9 -9
- package/web/chunk-g17n6asp.js +1 -0
- package/web/chunk-g9dzaw9e.js +30 -0
- package/web/chunk-gcwhx3av.js +1139 -0
- package/web/chunk-gf8vm6b5.js +1 -0
- package/web/chunk-gnmeyy4h.js +1 -0
- package/web/chunk-h5cfg3vv.js +2 -0
- package/web/{chunk-femhej5w.js → chunk-hbkasy6c.js} +46 -46
- package/web/chunk-hn7mhsbg.js +1 -0
- package/web/{chunk-tfn0rqg9.js → chunk-hstbgb83.js} +26 -26
- package/web/chunk-jjjtv2r1.js +2 -0
- package/web/chunk-jzte2phh.js +2 -0
- package/web/chunk-k8h8zx6r.js +24 -0
- package/web/chunk-m3ajw575.js +1 -0
- package/web/chunk-m5y2d4zv.js +1 -0
- package/web/chunk-mbwwj216.js +1 -0
- package/web/chunk-mf6xng5b.js +2 -0
- package/web/chunk-nky3bqfg.js +1 -0
- package/web/chunk-np33kmn4.js +1 -0
- package/web/chunk-nvk8mazs.js +1 -0
- package/web/chunk-nyw5ewgv.js +1 -0
- package/web/{chunk-dg3p8db5.js → chunk-p0cjvjdx.js} +1 -1
- package/web/chunk-p56dcqpr.js +1 -0
- package/web/chunk-pdn4r8x4.js +1 -0
- package/web/chunk-q1xxs319.js +41 -0
- package/web/chunk-qpt34d8d.js +1 -0
- package/web/{chunk-4fm55fgb.js → chunk-qq2v8h6d.js} +7 -7
- package/web/chunk-qskt3tqa.js +1 -0
- package/web/chunk-qt3n897m.js +4 -0
- package/web/chunk-r1rt48h9.js +1 -0
- package/web/{chunk-4sve9xrj.js → chunk-r4ffr96e.js} +1 -1
- package/web/chunk-r7tgd2fm.js +7 -0
- package/web/{chunk-gksf7cek.js → chunk-rbdvc8x7.js} +7 -7
- package/web/{chunk-q97hn4j5.js → chunk-rkjkynm3.js} +33 -33
- package/web/chunk-rznszqmy.js +1 -0
- package/web/chunk-s1pefd34.js +1 -0
- package/web/chunk-s38s9ff9.js +370 -0
- package/web/{chunk-n754s8xd.js → chunk-s7e93552.js} +8 -8
- package/web/chunk-sc29azev.js +1 -0
- package/web/{chunk-czjk218p.js → chunk-sda7cyrt.js} +52 -52
- package/web/chunk-svh2gkx8.js +2 -0
- package/web/chunk-t4jc4nac.js +1 -0
- package/web/chunk-t7g366a5.js +24 -0
- package/web/chunk-tj1fn8v2.js +1 -0
- package/web/{chunk-sy7e4dmq.js → chunk-tkp72r9b.js} +1 -1
- package/web/{chunk-5wbnjjhg.js → chunk-v14s4vgc.js} +1 -1
- package/web/chunk-v94v68xg.js +36 -0
- package/web/{chunk-0whceqes.js → chunk-vvvd3grf.js} +2 -2
- package/web/chunk-w37n09px.js +21 -0
- package/web/chunk-wcphswcx.js +2 -0
- package/web/{chunk-aangfjqc.js → chunk-wj3ymejj.js} +38 -38
- package/web/chunk-wwcnvyjh.css +1 -0
- package/web/{chunk-e8yj05t1.js → chunk-xabcx3ry.js} +6 -6
- package/web/chunk-xb9m0092.js +1 -0
- package/web/chunk-xfd3b01q.js +1 -0
- package/web/{chunk-4vjnrz87.js → chunk-xqyazzm7.js} +17 -17
- package/web/{chunk-bdydzbqk.js → chunk-xsz1dfm2.js} +23 -23
- package/web/chunk-z0zrp8n8.js +1 -0
- package/web/index.html +1 -1
- package/worker.js +1 -1
- package/chunk-654cny9a.js +0 -480
- package/chunk-8saewt61.js +0 -3
- package/chunk-a0c989ky.js +0 -2
- package/chunk-a5apjjcn.js +0 -16
- package/chunk-a81p46j7.js +0 -2
- package/chunk-agsfy9w7.js +0 -2
- package/chunk-d20p02ny.js +0 -2
- package/chunk-ejsneb6f.js +0 -2
- package/chunk-fmq3zwzk.js +0 -2
- package/chunk-rfb85nj7.js +0 -2
- package/chunk-rfdt992v.js +0 -25
- package/web/chunk-079091ar.js +0 -39
- package/web/chunk-083r4f80.js +0 -1
- package/web/chunk-0cng7r2x.js +0 -2
- package/web/chunk-0k0ande6.js +0 -1
- package/web/chunk-14deqqhr.js +0 -2
- package/web/chunk-2b63adsj.js +0 -89
- package/web/chunk-3baypnwn.js +0 -4
- package/web/chunk-4067nwjp.js +0 -19
- package/web/chunk-59678wmg.js +0 -1
- package/web/chunk-5k8sv4f5.js +0 -1
- package/web/chunk-5vjhvw1m.js +0 -2
- package/web/chunk-6ft5pz3c.js +0 -1
- package/web/chunk-7c8rwqtx.js +0 -1
- package/web/chunk-7qzz025k.js +0 -1
- package/web/chunk-7xbaqqd7.css +0 -1
- package/web/chunk-80eyv2mk.js +0 -1
- package/web/chunk-89paytbk.js +0 -4
- package/web/chunk-8ceej2g7.js +0 -1
- package/web/chunk-8nyhy122.js +0 -1
- package/web/chunk-989jq2h8.js +0 -2
- package/web/chunk-9w5tf22s.js +0 -1
- package/web/chunk-c3nn0vvc.js +0 -1
- package/web/chunk-cpwtt6ny.js +0 -1
- package/web/chunk-dsw5t58p.js +0 -1
- package/web/chunk-dv72fat3.js +0 -1
- package/web/chunk-dvvs1jjq.js +0 -3
- package/web/chunk-e131rg6p.js +0 -2
- package/web/chunk-ekw54h1q.js +0 -1
- package/web/chunk-hwsvhst3.js +0 -1
- package/web/chunk-k02b36g1.js +0 -62
- package/web/chunk-kkfrs7d1.js +0 -41
- package/web/chunk-kkyn8yhj.js +0 -106
- package/web/chunk-mh4rx5cf.js +0 -1
- package/web/chunk-n448vaba.js +0 -1
- package/web/chunk-n8j88qxy.js +0 -1
- package/web/chunk-nmpbsvwb.js +0 -2
- package/web/chunk-nws1s56b.js +0 -1
- package/web/chunk-p7126wwy.js +0 -7
- package/web/chunk-phnqnhj9.js +0 -1
- package/web/chunk-qg31p6cn.js +0 -1
- package/web/chunk-qhm3cfq9.js +0 -1
- package/web/chunk-qsd595b9.js +0 -1
- package/web/chunk-r7frwjqx.js +0 -2
- package/web/chunk-rddft5ce.js +0 -1139
- package/web/chunk-rgbdf2m9.js +0 -370
- package/web/chunk-rsbkbg6x.js +0 -78
- package/web/chunk-s2bs5vxh.js +0 -2
- package/web/chunk-sgwccs54.js +0 -1
- package/web/chunk-sjh8gtm9.js +0 -30
- package/web/chunk-t3658ehb.js +0 -2
- package/web/chunk-t81p4wqc.js +0 -24
- package/web/chunk-tewmsd7t.js +0 -1
- package/web/chunk-tf57s7ry.js +0 -1
- package/web/chunk-tqr80b5w.js +0 -2
- package/web/chunk-v282r683.js +0 -24
- package/web/chunk-v4vjjtn7.js +0 -1
- package/web/chunk-vbwdwcdp.js +0 -1
- package/web/chunk-vjngfh0q.js +0 -1
- package/web/chunk-vnt34mkb.js +0 -1
- package/web/chunk-wbgkwxrc.js +0 -1
- package/web/chunk-wjbk50hn.js +0 -2
- package/web/chunk-wjy848e2.js +0 -1
- package/web/chunk-wqsczy57.js +0 -36
- package/web/chunk-wvfmmw1v.js +0 -8
- package/web/chunk-x1jm4zsg.js +0 -1
- package/web/chunk-xmsb2g71.js +0 -1
package/web/chunk-rsbkbg6x.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,ke,b,B,C,S,E,T,A,R,L,l,V,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var ot=e((r,i)=>{let n=r<=1?r*100:r;if(n<0||n>100)throw Error(`${i} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);return n},"toPercent"),j=e((r,i,n)=>({x:ot(i,`${n} evolution`),y:ot(r,`${n} visibility`)}),"toCoordinates"),pt=e((r)=>{if(!r)return;if(r==="+<>")return"bidirectional";if(r==="+<")return"backward";if(r==="+>")return"forward";return},"getFlowFromPort"),Bt=e((r)=>{if(!r?.startsWith("+"))return{};let n=/^\+'([^']*)'/.exec(r)?.[1];if(r.includes("<>"))return{flow:"bidirectional",label:n};if(r.includes("<"))return{flow:"backward",label:n};if(r.includes(">"))return{flow:"forward",label:n};return{label:n}},"extractFlowFromArrow"),Ft=e((r,i)=>{if(G(r,i),r.size)i.setSize(r.size.width,r.size.height);if(r.evolution){let n=r.evolution.stages.map((o)=>{if(o.secondName)return`${o.name.trim()} / ${o.secondName.trim()}`;return o.name.trim()}),y=r.evolution.stages.filter((o)=>o.boundary!==void 0).map((o)=>o.boundary);i.updateAxes({stages:n,stageBoundaries:y})}if(r.anchors.forEach((n)=>{let y=j(n.visibility,n.evolution,`Anchor "${n.name}"`);i.addNode(n.name,n.name,y.x,y.y,"anchor")}),r.components.forEach((n)=>{let y=j(n.visibility,n.evolution,`Component "${n.name}"`),o=n.label?(n.label.negX?-1:1)*n.label.offsetX:void 0,p=n.label?(n.label.negY?-1:1)*n.label.offsetY:void 0,k=n.decorator?.strategy;i.addNode(n.name,n.name,y.x,y.y,"component",o,p,n.inertia,k)}),r.notes.forEach((n)=>{let y=j(n.visibility,n.evolution,`Note "${n.text}"`);i.addNote(n.text,y.x,y.y)}),r.pipelines.forEach((n)=>{let y=i.getNode(n.parent);if(!y||typeof y.y!=="number")throw Error(`Pipeline "${n.parent}" must reference an existing component with coordinates.`);let o=y.y;i.startPipeline(n.parent),n.components.forEach((p)=>{let k=`${n.parent}_${p.name}`,H=p.label?(p.label.negX?-1:1)*p.label.offsetX:void 0,w=p.label?(p.label.negY?-1:1)*p.label.offsetY:void 0,tt=ot(p.evolution,`Pipeline component "${p.name}" evolution`);i.addNode(k,p.name,tt,o,"pipeline-component",H,w),i.addPipelineComponent(n.parent,k)})}),r.links.forEach((n)=>{let y=!!n.arrow&&(n.arrow.includes("-.->")||n.arrow.includes(".-.")),o=pt(n.fromPort)??pt(n.toPort),{flow:p,label:k}=Bt(n.arrow);if(!o&&p)o=p;let H=n.linkLabel,w=k??H;i.addLink(i.resolveNodeId(n.from),i.resolveNodeId(n.to),y,w,o)}),r.evolves.forEach((n)=>{let y=i.getNode(n.component);if(y?.y!==void 0){let o=ot(n.target,`Evolve target for "${n.component}"`);i.addTrend(n.component,o,y.y)}}),r.annotations.length>0){let n=r.annotations[0],y=j(n.x,n.y,"Annotations box");i.setAnnotationsBox(y.x,y.y)}r.annotation.forEach((n)=>{let y=j(n.x,n.y,`Annotation ${n.number}`);i.addAnnotation(n.number,[{x:y.x,y:y.y}],n.text)}),r.accelerators.forEach((n)=>{let y=j(n.x,n.y,`Accelerator "${n.name}"`);i.addAccelerator(n.name,y.x,y.y)}),r.deaccelerators.forEach((n)=>{let y=j(n.x,n.y,`Deaccelerator "${n.name}"`);i.addDeaccelerator(n.name,y.x,y.y)})},"populateDb"),ht={parser:{yy:void 0},parse:e(async(r)=>{let i=await X("wardley",r);a.debug(i);let n=ht.parser?.yy;if(!n||typeof n.addNode!=="function")throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Ft(i,n)},"parse")},Rt=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}static{e(this,"WardleyBuilder")}addNode(r){let i=this.nodes.get(r.id)??{id:r.id,label:r.label},n={...i,...r,className:r.className??i.className,labelOffsetX:r.labelOffsetX??i.labelOffsetX,labelOffsetY:r.labelOffsetY??i.labelOffsetY};this.nodes.set(r.id,n)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});let i=this.nodes.get(r);if(i)i.isPipelineParent=!0}addPipelineComponent(r,i){let n=this.pipelines.get(r);if(n)n.componentIds.push(i);let y=this.nodes.get(i);if(y)y.inPipeline=!0}addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,i){this.annotationsBox={x:r,y:i}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,i){this.size={width:r,height:i}}getNode(r){return this.nodes.get(r)}resolveNodeId(r){if(this.nodes.has(r))return r;for(let[i,n]of this.nodes)if(n.label===r)return i;return r}build(){let r=[];for(let i of this.nodes.values()){if(typeof i.x!=="number"||typeof i.y!=="number")throw Error(`Node "${i.label}" is missing coordinates`);r.push(i)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},P=new Rt;function ft(){return l()["wardley-beta"]}e(ft,"getConfig");function xt(r,i,n,y,o,p,k,H,w){P.addNode({id:r,label:i,x:n,y,className:o,labelOffsetX:p,labelOffsetY:k,inertia:H,sourceStrategy:w})}e(xt,"addNode");function gt(r,i,n=!1,y,o){P.addLink({source:r,target:i,dashed:n,label:y,flow:o})}e(gt,"addLink");function yt(r,i,n){P.addTrend({nodeId:r,targetX:i,targetY:n})}e(yt,"addTrend");function ut(r,i,n){P.addAnnotation({number:r,coordinates:i,text:n})}e(ut,"addAnnotation");function wt(r,i,n){P.addNote({text:r,x:i,y:n})}e(wt,"addNote");function mt(r,i,n){P.addAccelerator({name:r,x:i,y:n})}e(mt,"addAccelerator");function kt(r,i,n){P.addDeaccelerator({name:r,x:i,y:n})}e(kt,"addDeaccelerator");function bt(r,i){P.setAnnotationsBox(r,i)}e(bt,"setAnnotationsBox");function $t(r,i){P.setSize(r,i)}e($t,"setSize");function vt(r){P.startPipeline(r)}e(vt,"startPipeline");function Pt(r,i){P.addPipelineComponent(r,i)}e(Pt,"addPipelineComponent");function Ct(r){P.setAxes(r)}e(Ct,"updateAxes");function St(r){return P.getNode(r)}e(St,"getNode");function Mt(r){return P.resolveNodeId(r)}e(Mt,"resolveNodeId");function Nt(){return P.build()}e(Nt,"getWardleyData");function zt(){P.clear(),C()}e(zt,"clear");var Ot={getConfig:ft,addNode:xt,addLink:gt,addTrend:yt,addAnnotation:ut,addNote:wt,addAccelerator:mt,addDeaccelerator:kt,setAnnotationsBox:bt,setSize:$t,startPipeline:vt,addPipelineComponent:Pt,updateAxes:Ct,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:zt,setAccTitle:S,getAccTitle:E,setDiagramTitle:R,getDiagramTitle:L,getAccDescription:A,setAccDescription:T},Dt=["Genesis","Custom Built","Product","Commodity"],Gt=e(()=>{let{themeVariables:r}=l();return{backgroundColor:r.wardley?.backgroundColor??r.background??"#fff",axisColor:r.wardley?.axisColor??"#000",axisTextColor:r.wardley?.axisTextColor??r.primaryTextColor??"#222",gridColor:r.wardley?.gridColor??"rgba(100, 100, 100, 0.2)",componentFill:r.wardley?.componentFill??"#fff",componentStroke:r.wardley?.componentStroke??"#000",componentLabelColor:r.wardley?.componentLabelColor??r.primaryTextColor??"#222",linkStroke:r.wardley?.linkStroke??"#000",evolutionStroke:r.wardley?.evolutionStroke??"#dc3545",annotationStroke:r.wardley?.annotationStroke??"#000",annotationTextColor:r.wardley?.annotationTextColor??r.primaryTextColor??"#222",annotationFill:r.wardley?.annotationFill??r.background??"#fff"}},"getTheme"),qt=e(()=>{let r=l()["wardley-beta"];return{width:r?.width??900,height:r?.height??600,padding:r?.padding??48,nodeRadius:r?.nodeRadius??6,nodeLabelOffset:r?.nodeLabelOffset??8,axisFontSize:r?.axisFontSize??12,labelFontSize:r?.labelFontSize??10,showGrid:r?.showGrid??!1,useMaxWidth:r?.useMaxWidth??!0}},"getConfigValues"),jt=e((r,i,n,y)=>{a.debug(`Rendering Wardley map
|
|
2
|
-
`+r);let o=qt(),p=Gt(),k=o.nodeRadius*1.6,H=y.db,w=H.getWardleyData(),tt=H.getDiagramTitle(),Y=w.size?.width??o.width,M=w.size?.height??o.height,Z=V(i);Z.selectAll("*").remove(),B(Z,M,Y,o.useMaxWidth),Z.attr("viewBox",`0 0 ${Y} ${M}`);let z=Z.append("g").attr("class","wardley-map"),nt=Z.append("defs");nt.append("marker").attr("id",`arrow-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.evolutionStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-end-${i}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",p.linkStroke).attr("stroke","none"),nt.append("marker").attr("id",`link-arrow-start-${i}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",p.linkStroke).attr("stroke","none"),z.append("rect").attr("class","wardley-background").attr("width",Y).attr("height",M).attr("fill",p.backgroundColor);let J=Y-o.padding*2,K=M-o.padding*2;if(tt)z.append("text").attr("class","wardley-title").attr("x",Y/2).attr("y",o.padding/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(tt);let O=e((t)=>o.padding+t/100*J,"projectX"),D=e((t)=>M-o.padding-t/100*K,"projectY"),et=z.append("g").attr("class","wardley-axes");et.append("line").attr("x1",o.padding).attr("x2",Y-o.padding).attr("y1",M-o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1),et.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.axisColor).attr("stroke-width",1);let Lt=w.axes.xLabel??"Evolution",Tt=w.axes.yLabel??"Visibility";et.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+J/2).attr("y",M-o.padding/4).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(Lt),et.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+K/2).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+K/2})`).text(Tt);let Q=w.axes.stages&&w.axes.stages.length>0?w.axes.stages:Dt;if(Q.length>0){let t=z.append("g").attr("class","wardley-stages"),d=w.axes.stageBoundaries,s=[];if(d&&d.length===Q.length){let c=0;d.forEach((f)=>{s.push({start:c,end:f}),c=f})}else{let c=1/Q.length;Q.forEach((f,x)=>{s.push({start:x*c,end:(x+1)*c})})}Q.forEach((c,f)=>{let x=s[f],u=o.padding+x.start*J,g=o.padding+x.end*J,m=(u+g)/2;if(f>0)t.append("line").attr("x1",u).attr("x2",u).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",0.8);t.append("text").attr("class","wardley-stage-label").attr("x",m).attr("y",M-o.padding/1.5).attr("fill",p.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(c)})}if(o.showGrid){let t=z.append("g").attr("class","wardley-grid");for(let d=1;d<4;d++){let s=d/4,c=o.padding+J*s;t.append("line").attr("x1",c).attr("x2",c).attr("y1",o.padding).attr("y2",M-o.padding).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",Y-o.padding).attr("y1",M-o.padding-K*s).attr("y2",M-o.padding-K*s).attr("stroke",p.gridColor).attr("stroke-dasharray","2 6")}}let h=new Map;if(w.nodes.forEach((t)=>{h.set(t.id,{x:O(t.x),y:D(t.y),node:t})}),w.pipelines.length>0){let t=z.append("g").attr("class","wardley-pipelines"),d=z.append("g").attr("class","wardley-pipeline-links");w.pipelines.forEach((s)=>{if(s.componentIds.length===0)return;let c=s.componentIds.map((g)=>({id:g,pos:h.get(g),node:w.nodes.find((m)=>m.id===g)})).filter((g)=>g.pos&&g.node).sort((g,m)=>g.node.x-m.node.x);for(let g=0;g<c.length-1;g++){let m=c[g],v=c[g+1];d.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",m.pos.x).attr("y1",m.pos.y).attr("x2",v.pos.x).attr("y2",v.pos.y).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let f=1/0,x=-1/0,u=0;if(s.componentIds.forEach((g)=>{let m=h.get(g);if(m)f=Math.min(f,m.x),x=Math.max(x,m.x),u=m.y}),f!==1/0&&x!==-1/0){let m=o.nodeRadius*4,v=u-m/2,W=h.get(s.nodeId);if(W){let F=(f+x)/2;W.x=F,W.y=v-k/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",f-15).attr("y",v).attr("width",x-f+30).attr("height",m).attr("fill","none").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}let dt=z.append("g").attr("class","wardley-links"),lt=new Map;w.pipelines.forEach((t)=>{lt.set(t.nodeId,new Set(t.componentIds))});let ct=w.links.filter((t)=>{if(!h.has(t.source)||!h.has(t.target))return!1;if(lt.get(t.target)?.has(t.source))return!1;return!0});dt.selectAll("line").data(ct).enter().append("line").attr("class",(t)=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u);return d.x+x/g*f}).attr("y1",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.source).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u);return d.y+u/g*f}).attr("x2",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=d.x-s.x,u=d.y-s.y,g=Math.sqrt(x*x+u*u);return s.x+x/g*f}).attr("y2",(t)=>{let d=h.get(t.source),s=h.get(t.target),f=w.nodes.find((m)=>m.id===t.target).isPipelineParent?k/Math.sqrt(2):o.nodeRadius,x=d.x-s.x,u=d.y-s.y,g=Math.sqrt(x*x+u*u);return s.y+u/g*f}).attr("stroke",p.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",(t)=>t.dashed?"6 6":null).attr("marker-end",(t)=>{if(t.flow==="forward"||t.flow==="bidirectional")return`url(#link-arrow-end-${i})`;return null}).attr("marker-start",(t)=>{if(t.flow==="backward"||t.flow==="bidirectional")return`url(#link-arrow-start-${i})`;return null}),dt.selectAll("text").data(ct.filter((t)=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.x+s.x)/2,f=s.y-d.y,x=s.x-d.x,u=Math.sqrt(x*x+f*f),g=8,m=f/u;return c+m*8}).attr("y",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.y+s.y)/2,f=s.x-d.x,x=s.y-d.y,u=Math.sqrt(f*f+x*x),g=8,m=-f/u;return c+m*8}).attr("fill",p.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",(t)=>{let d=h.get(t.source),s=h.get(t.target),c=(d.x+s.x)/2,f=(d.y+s.y)/2,x=s.x-d.x,u=s.y-d.y,g=Math.sqrt(x*x+u*u),m=8,v=u/g,W=-x/g,F=c+v*8,at=f+W*8,_=Math.atan2(u,x)*180/Math.PI;if(_>90||_<-90)_+=180;return`rotate(${_} ${F} ${at})`}).text((t)=>t.label);let Wt=z.append("g").attr("class","wardley-trends"),At=w.trends.map((t)=>{let d=h.get(t.nodeId);if(!d)return null;let s=O(t.targetX),c=D(t.targetY),f=s-d.x,x=c-d.y,u=Math.sqrt(f*f+x*x),g=o.nodeRadius+2,m=u>g?s-f/u*g:s,v=u>g?c-x/u*g:c;return{origin:d,targetX:s,targetY:c,adjustedX2:m,adjustedY2:v}}).filter((t)=>t!==null);Wt.selectAll("line").data(At).enter().append("line").attr("class","wardley-trend").attr("x1",(t)=>t.origin.x).attr("y1",(t)=>t.origin.y).attr("x2",(t)=>t.adjustedX2).attr("y2",(t)=>t.adjustedY2).attr("stroke",p.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${i})`);let I=z.append("g").attr("class","wardley-nodes").selectAll("g").data(w.nodes).enter().append("g").attr("class",(t)=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));I.filter((t)=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);let q=I.filter((t)=>t.sourceStrategy==="market");q.append("circle").attr("class","wardley-market-overlay").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y).attr("r",o.nodeRadius).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1);let st=o.nodeRadius*0.7,N=o.nodeRadius*1.2;if(q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x).attr("y1",(t)=>h.get(t.id).y-N).attr("x2",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y2",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("line").attr("class","wardley-market-line").attr("x1",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("y1",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("x2",(t)=>h.get(t.id).x).attr("y2",(t)=>h.get(t.id).y-N).attr("stroke",p.componentStroke).attr("stroke-width",1),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x).attr("cy",(t)=>h.get(t.id).y-N).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x-N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),q.append("circle").attr("class","wardley-market-dot").attr("cx",(t)=>h.get(t.id).x+N*Math.cos(Math.PI/6)).attr("cy",(t)=>h.get(t.id).y+N*Math.sin(Math.PI/6)).attr("r",st).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",2),I.filter((t)=>t.isPipelineParent===!0).append("rect").attr("x",(t)=>h.get(t.id).x-k/2).attr("y",(t)=>h.get(t.id).y-k/2).attr("width",k).attr("height",k).attr("fill",p.componentFill).attr("stroke",p.componentStroke).attr("stroke-width",1),I.filter((t)=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y1",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k:o.nodeRadius*2;return d.y-s/2}).attr("x2",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k/2+15:o.nodeRadius+15;if(t.sourceStrategy)s+=o.nodeRadius+10;return d.x+s}).attr("y2",(t)=>{let d=h.get(t.id),s=t.isPipelineParent?k:o.nodeRadius*2;return d.y+s/2}).attr("stroke",p.componentStroke).attr("stroke-width",6),I.append("text").attr("x",(t)=>{let d=h.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?d.x+t.labelOffsetX:d.x;let s=o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetX===void 0)s+=10;let c=t.labelOffsetX??s;return d.x+c}).attr("y",(t)=>{let d=h.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?d.y+t.labelOffsetY:d.y-3;let s=-o.nodeLabelOffset;if(t.sourceStrategy&&t.labelOffsetY===void 0)s-=10;let c=t.labelOffsetY??s;return d.y+c}).attr("class","wardley-node-label").attr("fill",(t)=>{if(t.className==="evolved")return p.evolutionStroke;if(t.className==="anchor")return"#000";return p.componentLabelColor}).attr("font-size",o.labelFontSize).attr("font-weight",(t)=>t.className==="anchor"?"bold":"normal").attr("text-anchor",(t)=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",(t)=>t.className==="anchor"?"middle":"auto").text((t)=>t.label),w.annotations.length>0){let t=z.append("g").attr("class","wardley-annotations");if(w.annotations.forEach((d)=>{let s=d.coordinates.map((c)=>({x:O(c.x),y:D(c.y)}));if(s.length>1)for(let c=0;c<s.length-1;c++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[c].x).attr("y1",s[c].y).attr("x2",s[c+1].x).attr("y2",s[c+1].y).attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach((c)=>{let f=t.append("g").attr("class","wardley-annotation");f.append("circle").attr("cx",c.x).attr("cy",c.y).attr("r",10).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5),f.append("text").attr("x",c.x).attr("y",c.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.number)})}),w.annotationsBox){let d=O(w.annotationsBox.x),s=D(w.annotationsBox.y),c=10,f=16,x=11,u=t.append("g").attr("class","wardley-annotations-box"),g=[...w.annotations].filter((v)=>v.text).sort((v,W)=>v.number-W.number),m=[];if(g.forEach((v,W)=>{let F=u.append("text").attr("x",d+c).attr("y",s+c+(W+1)*f).attr("font-size",x).attr("fill",p.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${v.number}. ${v.text}`);m.push(F)}),m.length>0){let v=0,W=0;m.forEach((it)=>{let rt=it.node(),Yt=rt.getComputedTextLength();v=Math.max(v,Yt);let It=rt.getBBox();W=Math.max(W,It.height)});let F=v+c*2+105,at=g.length*f+c*2+W/2,_=o.padding,Xt=Y-o.padding-F,Et=o.padding,Ht=M-o.padding-at;d=Math.max(_,Math.min(d,Xt)),s=Math.max(Et,Math.min(s,Ht)),m.forEach((it,rt)=>{it.attr("x",d+c).attr("y",s+c+(rt+1)*f)}),u.insert("rect","text").attr("x",d).attr("y",s).attr("width",F).attr("height",at).attr("fill","white").attr("stroke",p.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(w.notes.length>0){let t=z.append("g").attr("class","wardley-notes");w.notes.forEach((d)=>{let s=O(d.x),c=D(d.y);t.append("text").attr("x",s).attr("y",c).attr("text-anchor","start").attr("font-size",11).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.text)})}if(w.accelerators.length>0){let t=z.append("g").attr("class","wardley-accelerators");w.accelerators.forEach((d)=>{let s=O(d.x),c=D(d.y),f=60,x=30,u=20,g=`
|
|
3
|
-
M ${s} ${c-15}
|
|
4
|
-
L ${s+60-20} ${c-15}
|
|
5
|
-
L ${s+60-20} ${c-15-8}
|
|
6
|
-
L ${s+60} ${c}
|
|
7
|
-
L ${s+60-20} ${c+15+8}
|
|
8
|
-
L ${s+60-20} ${c+15}
|
|
9
|
-
L ${s} ${c+15}
|
|
10
|
-
Z
|
|
11
|
-
`;t.append("path").attr("d",g).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}if(w.deaccelerators.length>0){let t=z.append("g").attr("class","wardley-deaccelerators");w.deaccelerators.forEach((d)=>{let s=O(d.x),c=D(d.y),f=60,x=30,u=20,g=`
|
|
12
|
-
M ${s+60} ${c-15}
|
|
13
|
-
L ${s+20} ${c-15}
|
|
14
|
-
L ${s+20} ${c-15-8}
|
|
15
|
-
L ${s} ${c}
|
|
16
|
-
L ${s+20} ${c+15+8}
|
|
17
|
-
L ${s+20} ${c+15}
|
|
18
|
-
L ${s+60} ${c+15}
|
|
19
|
-
Z
|
|
20
|
-
`;t.append("path").attr("d",g).attr("fill","white").attr("stroke",p.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+30).attr("y",c+15+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",p.axisTextColor).attr("font-weight","bold").text(d.name)})}},"draw"),Vt={draw:jt},_t=e(({wardley:r}={})=>{let i=ke(),n=b(),y=U(i,n.themeVariables),o=U(y.wardley,r);return`
|
|
21
|
-
.wardley-background {
|
|
22
|
-
fill: ${o.backgroundColor};
|
|
23
|
-
}
|
|
24
|
-
.wardley-axes line, .wardley-axes path {
|
|
25
|
-
stroke: ${o.axisColor};
|
|
26
|
-
}
|
|
27
|
-
.wardley-axis-label {
|
|
28
|
-
fill: ${o.axisTextColor};
|
|
29
|
-
}
|
|
30
|
-
.wardley-stage-label {
|
|
31
|
-
fill: ${o.axisTextColor};
|
|
32
|
-
}
|
|
33
|
-
.wardley-grid line {
|
|
34
|
-
stroke: ${o.gridColor};
|
|
35
|
-
}
|
|
36
|
-
.wardley-node circle {
|
|
37
|
-
fill: ${o.componentFill};
|
|
38
|
-
stroke: ${o.componentStroke};
|
|
39
|
-
}
|
|
40
|
-
.wardley-node-label {
|
|
41
|
-
fill: ${o.componentLabelColor};
|
|
42
|
-
}
|
|
43
|
-
.wardley-link {
|
|
44
|
-
stroke: ${o.linkStroke};
|
|
45
|
-
}
|
|
46
|
-
.wardley-link--dashed {
|
|
47
|
-
stroke-dasharray: 4 4;
|
|
48
|
-
}
|
|
49
|
-
.wardley-link-label {
|
|
50
|
-
fill: ${o.axisTextColor};
|
|
51
|
-
}
|
|
52
|
-
.wardley-trend line {
|
|
53
|
-
stroke: ${o.evolutionStroke};
|
|
54
|
-
}
|
|
55
|
-
.wardley-annotation-line {
|
|
56
|
-
stroke: ${o.annotationStroke};
|
|
57
|
-
}
|
|
58
|
-
.wardley-annotation circle {
|
|
59
|
-
fill: ${o.annotationFill};
|
|
60
|
-
stroke: ${o.annotationStroke};
|
|
61
|
-
}
|
|
62
|
-
.wardley-annotation text {
|
|
63
|
-
fill: ${o.annotationTextColor};
|
|
64
|
-
}
|
|
65
|
-
.wardley-annotations-box rect {
|
|
66
|
-
fill: ${o.annotationFill};
|
|
67
|
-
stroke: ${o.annotationStroke};
|
|
68
|
-
}
|
|
69
|
-
.wardley-annotations-box text {
|
|
70
|
-
fill: ${o.annotationTextColor};
|
|
71
|
-
}
|
|
72
|
-
.wardley-pipeline-box {
|
|
73
|
-
stroke: ${o.componentStroke};
|
|
74
|
-
}
|
|
75
|
-
.wardley-notes text {
|
|
76
|
-
fill: ${o.axisTextColor};
|
|
77
|
-
}
|
|
78
|
-
`},"styles"),re={parser:ht,db:Ot,renderer:Vt,styles:_t};export{re as diagram};
|
package/web/chunk-s2bs5vxh.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{e,a,b,l,M,P,Tt,Et,yo,yt,tn,vo,Yn,Pe,bo,Wi,At,Gi,nn,Xn}from"./chunk-1s53190z.js";import{te}from"./chunk-tz4twwmw.js";import{x}from"./chunk-rddft5ce.js";function la(t,{edgePathsClass:r="edges edgePaths"}={}){let n=t.insert("g").attr("class","root"),i=n.insert("g").attr("class","clusters"),s=n.insert("g").attr("class",r),o=n.insert("g").attr("class","edgeLabels"),u=n.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:u,rootGroups:n}}e(la,"createLayoutElementGroups");async function D(t,r,n){if(r.label){let{shapeSvg:i,bbox:s}=await P(t,n===void 0?r:{...r,width:n});r.labelBBox={width:s.width,height:s.height},i.remove()}else r.labelBBox={width:0,height:0}}e(D,"measureGroupLabel");async function ca(t,r,n){let i=await Et(t,r,n),s=i.node()?.getBBox()??{width:0,height:0};return r.width=s.width,r.height=s.height,i}e(ca,"insertMeasuredNode");function S(t,r,n){let i=t,s=new Set;while(i){if(i.dir)return i.dir;if(!i.parentId||s.has(i.parentId))break;s.add(i.parentId),i=r.get(i.parentId)}return n}e(S,"resolveNodeDir");async function k(t,r,n={}){let i=new te({multigraph:!0,compound:!0}),s=[...r.edges],o=l(),u=la(t),{edgeLabels:d,nodes:c}=u,g=new Map,h=new Map(r.nodes.map((f)=>[f.id,f])),C=r.direction,w=t.node()!=null;await Promise.all(r.nodes.map(async(f)=>{if(f.isGroup){if(w){let p=n.unwrapGroupLabels&&f.labelType!=="markdown";await D(c,f,p?Number.POSITIVE_INFINITY:void 0)}i.setNode(f.id,{...f})}else{if(w){let p=await ca(c,f,{config:o,dir:S(f,h,C)});g.set(f.id,p)}i.setNode(f.id,{...f})}}));for(let f of s){if(w&&Wi(f))await At(d,f);if(i.setEdge(f.start,f.end,{...f},f.id),!r.edges.some((E)=>E.id===f.id))r.edges.push(f)}if(globalThis.mermaidCaptureSizes){let{captureNodeSizes:f}=await (x("tewmsd7t"),import("./chunk-tewmsd7t.js"));f(t,r)}return{graph:i,groups:u,nodeElements:g}}e(k,"createGraphWithElements");var W=new Map,m=new Map,R=new Map,U=e(()=>{m.clear(),R.clear(),W.clear()},"clear"),v=e((t,r)=>{let n=m.get(r)||[];return a.trace("In isDescendant",r," ",t," = ",n.includes(t)),n.includes(t)},"isDescendant"),Z=e((t,r)=>{let n=m.get(r)||[];if(a.info("Descendants of ",r," is ",n),a.info("Edge is ",t),t.v===r||t.w===r)return!1;if(!n)return a.debug("Tilt, ",r,",not in descendants"),!1;return n.includes(t.v)||v(t.v,r)||v(t.w,r)||n.includes(t.w)},"edgeInCluster"),T=e((t,r,n,i)=>{a.debug("Copying children of ",t,"root",i,"data",r.node(t),i);let s=r.children(t)||[];if(t!==i)s.push(t);a.debug("Copying (nodes) clusterId",t,"nodes",s),s.forEach((o)=>{if(r.children(o).length>0)T(o,r,n,i);else{let u=r.node(o);if(a.info("cp ",o," to ",i," with parent ",t),n.setNode(o,u),i!==r.parent(o))a.debug("Setting parent",o,r.parent(o)),n.setParent(o,r.parent(o));if(t!==i&&o!==t)a.debug("Setting parent",o,t),n.setParent(o,t);else a.info("In copy ",t,"root",i,"data",r.node(t),i),a.debug("Not Setting parent for node=",o,"cluster!==rootId",t!==i,"node!==clusterId",o!==t);let d=r.edges(o);a.debug("Copying Edges",d),d.forEach((c)=>{a.info("Edge",c);let g=r.edge(c.v,c.w,c.name);a.info("Edge data",g,i);try{if(Z(c,i))a.info("Copying as ",c.v,c.w,g,c.name),n.setEdge(c.v,c.w,g,c.name),a.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]));else a.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",i," clusterId:",t)}catch(h){a.error(h)}})}a.debug("Removing node",o),r.removeNode(o)})},"copy"),B=e((t,r)=>{let n=r.children(t),i=[...n];for(let s of n)R.set(s,t),i=[...i,...B(s,r)];return i},"extractDescendants"),I=e((t,r,n)=>{let i=t.edges().filter((c)=>c.v===r||c.w===r),s=t.edges().filter((c)=>c.v===n||c.w===n),o=i.map((c)=>({v:c.v===r?n:c.v,w:c.w===r?r:c.w})),u=s.map((c)=>({v:c.v,w:c.w}));return o.filter((c)=>u.some((g)=>c.v===g.v&&c.w===g.w))},"findCommonEdges"),Fn=e((t,r,n)=>{let i=r.children(t);if(a.trace("Searching children of id ",t,i),i.length<1)return t;let s;for(let o of i){let u=Fn(o,r,n),d=I(r,n,u);if(u)if(d.length>0)s=u;else return u}return s},"findNonClusterChild"),L=e((t)=>{if(!W.has(t))return t;if(!W.get(t).externalConnections)return t;if(W.has(t))return W.get(t).id;return t},"getAnchorId"),to=e((t,r)=>{if(!t||r>10){a.debug("Opting out, no graph ");return}else a.debug("Opting in, graph ");t.nodes().forEach(function(n){if(t.children(n).length>0)a.debug("Cluster identified",n," Replacement id in edges: ",Fn(n,t,n)),m.set(n,B(n,t)),W.set(n,{id:Fn(n,t,n),clusterData:t.node(n)})}),t.nodes().forEach(function(n){let i=t.children(n),s=t.edges();if(i.length>0)a.debug("Cluster identified",n,m),s.forEach((o)=>{let u=v(o.v,n),d=v(o.w,n);if(u^d)a.debug("Edge: ",o," leaves cluster ",n),a.debug("Descendants of XXX ",n,": ",m.get(n)),W.get(n).externalConnections=!0});else a.debug("Not a cluster ",n,m)});for(let n of W.keys()){let i=W.get(n).id,s=t.parent(i);if(s!==n&&W.has(s)&&!W.get(s).externalConnections)W.get(n).id=s;let o=t.edges().some((u)=>u.v===n);if(i&&W.get(n)?.externalConnections&&o&&_(t,i,n)){let u=ee(t,n,t.parent(i));if(u)W.get(n).id=u}}t.edges().forEach(function(n){let i=t.edge(n);a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),a.debug("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(t.edge(n)));let{v:s,w:o}=n;if(a.debug("Fix XXX",W,"ids:",n.v,n.w,"Translating: ",W.get(n.v)," --- ",W.get(n.w)),W.get(n.v)||W.get(n.w)){if(a.debug("Fixing and trying - removing XXX",n.v,n.w,n.name),s=L(n.v),o=L(n.w),t.removeEdge(n.v,n.w,n.name),s!==n.v){let u=t.parent(s);W.get(u).externalConnections=!0,i.fromCluster=n.v}if(o!==n.w){let u=t.parent(o);W.get(u).externalConnections=!0,i.toCluster=n.w}a.debug("Fix Replacing with XXX",s,o,n.name),t.setEdge(s,o,i,n.name)}}),A(t,0),a.trace(W)},"adjustClustersAndEdges"),A=e((t,r)=>{if(r>10){a.error("Bailing out");return}let n=t.nodes(),i=!1;for(let s of n){let o=t.children(s);i=i||o.length>0}if(!i){a.debug("Done, no node has children",t.nodes());return}a.debug("Nodes = ",n,r);for(let s of n)if(a.debug("Extracting node",s,W,W.has(s)&&!W.get(s).externalConnections,!t.parent(s),t.node(s),t.children("D")," Depth ",r),!W.has(s))a.debug("Not a cluster",s,r);else if(!W.get(s).externalConnections&&t.children(s)&&t.children(s).length>0){a.debug("Cluster without external connections, without a parent and with children",s,r);let u=t.graph().rankdir==="TB"?"LR":"TB";if(W.get(s)?.clusterData?.dir)u=W.get(s).clusterData.dir,a.debug("Fixing dir",W.get(s).clusterData.dir,u);let d=new te({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});T(s,t,d,s),t.setNode(s,{clusterNode:!0,id:s,clusterData:W.get(s).clusterData,label:W.get(s).label,graph:d})}else a.debug("Cluster ** ",s," **not meeting the criteria !externalConnections:",!W.get(s).externalConnections," no parent: ",!t.parent(s)," children ",t.children(s)&&t.children(s).length>0,t.children("D"),r),a.debug(W);n=t.nodes(),a.debug("New list of nodes",n);for(let s of n){let o=t.node(s);if(a.debug(" Now next level",s,o),o?.clusterNode)A(o.graph,r+1)}},"extractor"),X=e((t,r)=>{if(r.length===0)return[];let n=Object.assign([],r);return r.forEach((i)=>{let s=t.children(i),o=X(t,s);n=[...n,...o]}),n},"sorter"),ua=e((t)=>X(t,t.children()),"sortNodesByHierarchy"),_=e((t,r,n)=>{let i=t.parent(r);while(i&&i!==n){let s=W.get(i);if(s&&!s.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),ee=e((t,r,n)=>{let i=t.children(r)??[];for(let s of i){if(s===n||v(s,n))continue;let o=Fn(s,t,r);if(!o)continue;if(!_(t,o,r))return o}return null},"findSafeAnchorNode");function cr({prepareLayout:t,measureLayout:r,runLayoutCore:n,paintLayout:i,afterPaint:s,paintOptions:o}){let u=r??O;return e(async function(c,g,h,C){let w=g.select("g");(h?.insertMarkers??Xn)(w,c.markers,c.type,c.diagramId),G();let f={element:w,helpers:h,options:C};f.preparedLayout=await t?.(c,f);let p=await u(c,f),E=await n(c,f),N={...f,measure:p};if(i)await i(c,N,E);else await F(c,N,o);await s?.(c,N,E)},"render")}e(cr,"createCommonLayoutRenderer");function G(){yo(),bo(),vo(),U()}e(G,"clearLayoutRenderState");async function O(t,{element:r},n){return await k(r,t,n)}e(O,"defaultMeasureLayout");async function F(t,r,n={}){let{measure:i}=r,{groups:s}=i;for(let u of n.getNodes?.(t,r)??t.nodes){if(n.skipNode?.(u,r))continue;await j(s,u,r,n)}let o=z(t.nodes);for(let u of t.edges){if(J(u,n))continue;await V(s,u,o,t,n,r)}}e(F,"paintLayoutData");async function j(t,r,n,i){if(r.clusterNode)yt(r);else if(H(r,n,i))await tn(t.clusters,r);else yt(r)}e(j,"paintLayoutNode");function H(t,r,n){return t.isGroup===!0&&(n.isCluster?.(t,r)??!0)}e(H,"shouldPaintAsCluster");function z(t){let r=new Map;for(let n of t)if(n?.id)r.set(n.id,n);return r}e(z,"buildNodeLookup");function J(t,r){return t.isLayoutOnly||Boolean(r.skipEdge?.(t))}e(J,"shouldSkipPaintEdge");async function V(t,r,n,i,s,o){let u=nn(t.edgePaths,{...r},s.clusterDb??new Map,i.type,y(r.start,r,n,o,s),y(r.end,r,n,o,s),i.diagramId,Y(r,s),i.layoutAlgorithm);if(Wi(r)){if(!Yn.has(r.id))await At(t.edgeLabels,r);q(r,u)}}e(V,"paintLayoutEdge");function y(t,r,n,i,s){return s.getEdgeNode?.(t,r,i)??(t?n.get(t)??{}:{})}e(y,"getRenderedNode");function Y(t,r){return typeof r.skipIntersect==="function"?r.skipIntersect(t):r.skipIntersect??!1}e(Y,"shouldSkipIntersect");function q(t,r){let n=r?.updatedPath??r?.originalPath,i=b(),{subGraphTitleTotalMargin:s}=Tt({flowchart:i.flowchart??{}});if(t.label){let o=Yn.get(t.id),{x:u,y:d}=Gi(t,r);o.attr("transform",`translate(${u}, ${d+s/2})`)}for(let[o,u]of[["startLeft",t.startLabelLeft],["startRight",t.startLabelRight],["endLeft",t.endLabelLeft],["endRight",t.endLabelRight]])if(u){let{x:d,y:c}=K(t,o,n);Pe.get(t.id)[o].attr("transform",`translate(${d}, ${c})`)}}e(q,"positionRenderedEdgeLabel");var ne={startLeft:"start_left",startRight:"start_right",endLeft:"end_left",endRight:"end_right"};function K(t,r,n){let i=t.terminalLabelCenters?.[r];if(i)return{...i};if(!n)return{x:t.x,y:t.y};let s=r.startsWith("start")?t.arrowTypeStart:t.arrowTypeEnd;return M.calcTerminalLabelPosition(s?10:0,ne[r],n)}e(K,"terminalLabelTranslate");
|
|
2
|
-
export{la,ca,W,Fn,to,ua,cr};
|
package/web/chunk-sgwccs54.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,a}from"./chunk-1s53190z.js";import{K,Dt,Mt}from"./chunk-2b63adsj.js";import{G}from"./chunk-14deqqhr.js";import{sr,kt}from"./chunk-2cem4sv7.js";var i=sr().RailroadPeg.parser.LangiumParser,s=e((r)=>{let t=r.alternatives.map(l);if(t.length===1)return t[0];return{type:"choice",alternatives:t}},"transformOrderedChoice"),l=e((r)=>{let t=r.elements.map(m);if(t.length===1)return t[0];return{type:"sequence",elements:t}},"transformSequence"),m=e((r)=>{let t=p(r.suffix);if(!r.operator)return t;return{type:"special",text:r.operator==="&"?`&${o(t)}`:`!${o(t)}`}},"transformPrefix"),o=e((r)=>{switch(r.type){case"terminal":return`"${r.value}"`;case"nonterminal":return r.name;case"special":return r.text;default:return"(...)"}},"nodeToLabel"),p=e((r)=>{let t=u(r.primary);if(!r.operator)return t;switch(r.operator){case"?":return{type:"optional",element:t};case"*":return{type:"repetition",element:t,min:0,max:1/0};case"+":return{type:"repetition",element:t,min:1,max:1/0};default:throw Error(`Unsupported PEG suffix operator: ${r.operator}`)}},"transformSuffix"),u=e((r)=>{switch(r.$type){case"PegLiteral":return{type:"terminal",value:r.value};case"PegIdentifier":return{type:"nonterminal",name:r.name};case"PegGroup":return s(r.element);case"PegAny":return{type:"special",text:r.dot};default:throw Error(`Unsupported PEG primary node: ${r.$type}`)}},"transformPrimary"),c=e((r)=>({name:r.name,definition:s(r.definition)}),"transformRule"),f=e((r)=>{if(G(r,K),r.title)K.setTitle(r.title);r.rules.map((t)=>K.addRule(c(t)))},"populateDb"),d={parse:e((r)=>{K.clear(),a.debug("[PEG Parser] Starting Langium parse");let t=i.parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new kt(t);let n=t.value;a.debug("[PEG Parser] Parsed rules:",n.rules.length),f(n),a.debug("[PEG Parser] Parse complete")},"parse"),parser:{yy:K}},w={parser:d,db:K,renderer:Mt,styles:Dt};export{w as diagram};
|
package/web/chunk-sjh8gtm9.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import{yn}from"./chunk-wjbk50hn.js";import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,O,B,C,S,E,T,A,R,L,V,Dn,nt,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var P=/[─━│┃└┗├┣]/,F=/[└┗├┣]/,ee=/[─━]/,H=/^[\s│┃]+$/,W=/^\s*(title[\t ]|accTitle[\t ]*:|accDescr[\t ]*[:{])/,z=/^\s*%%/,te=" ";function Z(n){return n.some((r)=>P.test(r))}e(Z,"isBoxDrawingFormat");function q(n){for(let r of n){let t=F.exec(r);if(t?.index&&t.index>0)return t.index}return 4}e(q,"inferSegmentWidth");function j(n,r){return n.replace(/\bline\s+(\d+)\b/gi,(t,i)=>{let c=parseInt(i,10),o=r.get(c);return o?`line ${o}`:t})}e(j,"remapErrorLines");function J(n){let r=n.split(`
|
|
2
|
-
`),t=new Map,i=-1;for(let[g,d]of r.entries())if(d.trim()==="treeView-beta"){i=g;break}if(i===-1)return{text:n,lineMap:t};let c=[];for(let g=i+1;g<r.length;g++){let d=r[g];if(d.trim()===""||z.test(d)||W.test(d))continue;if(H.test(d))continue;c.push(d.replace(/\t/g," "))}if(!Z(c))return{text:n,lineMap:t};let o=q(c),s=[],l=0;for(let g=0;g<=i;g++)s.push(r[g]),l++,t.set(l,g+1);for(let g=i+1;g<r.length;g++){let d=r[g],p=d.trim(),f=g+1;if(p===""){s.push(d),l++,t.set(l,f);continue}if(z.test(d)){s.push(d),l++,t.set(l,f);continue}if(W.test(d)){s.push(d),l++,t.set(l,f);continue}if(H.test(d))continue;let h=d.replace(/\t/g," "),w=F.exec(h);if(w?.index!==void 0){let u=w.index,x=Math.round(u/o)+1,m=u+1;while(m<h.length&&ee.test(h[m]))m++;while(m<h.length&&h[m]===" ")m++;let I=h.slice(m).trimEnd();if(!I)throw Error(`Line ${f}: Empty node — expected a filename or directory name after the box-drawing prefix`);let Q=te.repeat(x);s.push(Q+I),l++,t.set(l,f)}else if(/^[\s─━│┃└┗├┣]+$/.test(h))continue;else if(P.test(h))s.push(d),l++,t.set(l,f);else if(/^\s+/.test(h))throw Error(`Line ${f}: Unexpected indentation without box-drawing characters. In box-drawing format, use ├── or └── prefixes for indented nodes.`);else s.push(d),l++,t.set(l,f)}return{text:s.join(`
|
|
3
|
-
`),lineMap:t}}e(J,"preprocessBoxDrawing");var v=new yn(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",nodeType:"directory",children:[]}]})),re=e(()=>{v.reset(),C()},"clear"),ne=e(()=>v.records.stack[0],"getRoot"),ie=e(()=>v.records.cnt,"getCount"),oe=D.treeView,se=e(()=>U(oe,b().treeView),"getConfig"),ae=e((n,r,t,i,c,o)=>{while(n<=v.records.stack[v.records.stack.length-1].level)v.records.stack.pop();let s={id:v.records.cnt++,level:n,name:r,nodeType:t,icon:c,cssClass:i,description:o,children:[]};v.records.stack[v.records.stack.length-1].children.push(s),v.records.stack.push(s)},"addNode"),ce={clear:re,addNode:ae,getRoot:ne,getCount:ie,getConfig:se,getAccTitle:E,getAccDescription:A,getDiagramTitle:L,setAccDescription:T,setAccTitle:S,setDiagramTitle:R},k=ce,le=e((n)=>{G(n,k);for(let r of n.nodes){let t=typeof r.indent==="number"?r.indent:0,i=r.name,c=i.endsWith("/");if(c)i=i.slice(0,-1);let o=c?"directory":"file",s=r.classAnnotation||void 0,l=r.iconAnnotation,g=l!==void 0?l||"none":void 0,d=r.descAnnotation||void 0,p=d?O(d,b()):void 0;k.addNode(t,i,o,s,g,p)}},"populate"),de={parse:e(async(n)=>{let{text:r,lineMap:t}=J(n);try{let i=await X("treeView",r);a.debug(i),le(i)}catch(i){if(t.size>0&&i instanceof Error)i.message=j(i.message,t);throw i}},"parse")},y={prefix:"mermaid-treeview",height:24,width:24,icons:{folder:{body:'<path fill="currentColor" d="M10.59 4.59A2 2 0 0 0 9.17 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.17z"/>'},file:{body:'<path fill="currentColor" fill-rule="evenodd" d="M6 2a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8.83a2 2 0 0 0-.59-1.42l-4.82-4.82A2 2 0 0 0 13.17 2H6Zm7.5 1.9l4.6 4.6h-3.6a1 1 0 0 1-1-1V3.9Z" clip-rule="evenodd"/>'}}};function K(n,r){let t=r?.filenameIcons?.[n];if(t)return t;let i=n.lastIndexOf(".");if(i>0){let c=n.substring(i).toLowerCase(),o=r?.extensionIcons;return o?.[c]??o?.[c.slice(1)]}return}e(K,"detectIcon");function N(n,r){if(n.includes(":"))return n;if(n in y.icons||!r)return`${y.prefix}:${n}`;return`${r}:${n}`}e(N,"qualifyIcon");function M(n,r){if(n.icon==="none")return;if(n.icon)return N(n.icon,r.defaultIconPack);if(!r.showIcons)return;if(n.nodeType==="file"){let t=K(n.name,r);if(t==="none")return;if(t)return N(t,r.defaultIconPack)}return`${y.prefix}:${n.nodeType==="directory"?"folder":"file"}`}e(M,"getNodeIcon");Dn([{name:y.prefix,icons:y}]);var _=14,he=4,pe=16,fe=e(async(n,r)=>{let t=[],i=e((o)=>{let s=M(o,r);if(s)t.push({icon:s,node:o});o.children.forEach(i)},"collect");i(n);let c=await Promise.all(t.map(async({icon:o,node:s})=>({id:s.id,svg:await nt(o,{height:_,width:_})})));return new Map(c.map(({id:o,svg:s})=>[o,s]))},"resolveNodeIcons"),ge=e((n,r,t,i,c,o)=>{let s=i.append("g"),l="treeView-node-label";if(t.nodeType==="directory")l+=" treeView-node-dir";if(t.cssClass)l+=` ${t.cssClass}`;let g=_+he,d=M(t,c),p=d!==void 0;if(d)s.append("g").attr("class","treeView-node-icon").attr("transform",`translate(${n+c.paddingX}, ${r+c.paddingY})`).html(o.get(t.id)??"");let f=s.append("text").text(t.name).attr("dominant-baseline","middle").attr("class",l),{height:h,width:w}=f.node().getBBox(),u=h+c.paddingY*2,x=n+c.paddingX+(p?g:0);f.attr("x",x),f.attr("y",r+u/2);let m=x+w,I=w+c.paddingX*2+(p?g:0);if(t.BBox={x:n,y:r,width:I,height:u},t.cssClass?.split(/\s+/).includes("highlight"))s.insert("rect",":first-child").attr("x",n).attr("y",r+1).attr("width",0).attr("height",u-2).attr("rx",3).attr("class","treeView-highlight-bg");return{node:t,nodeGroup:s,labelRightEdge:m,centerY:r+u/2}},"positionLabel"),Y=e((n,r,t,i,c,o)=>n.append("line").attr("x1",r).attr("y1",t).attr("x2",i).attr("y2",c).attr("stroke-width",o).attr("class","treeView-node-line"),"positionLine"),ue=e((n,r,t,i)=>{let c=0,o=0,s=[],l=e((p,f,h,w)=>{let u=w*(h.rowIndent+h.paddingX),x=ge(u,c,f,p,h,i);s.push(x);let{height:m,width:I}=f.BBox;Y(p,u-h.rowIndent,c+m/2,u,c+m/2,h.lineThickness),o=Math.max(o,u+I),c+=m},"drawNode"),g=e((p,f=0)=>{l(n,p,t,f),p.children.forEach((x)=>{g(x,f+1)});let{x:h,y:w,height:u}=p.BBox;if(p.children.length){let{y:x,height:m}=p.children[p.children.length-1].BBox;Y(n,h+t.paddingX,w+u,h+t.paddingX,x+m/2+t.lineThickness/2,t.lineThickness)}},"processNode");g(r);let d=s.filter((p)=>p.node.description);if(d.length>0){let f=Math.max(...s.map((h)=>h.labelRightEdge))+pe;for(let h of d){let u=h.nodeGroup.append("text").text(h.node.description).attr("dominant-baseline","middle").attr("class","treeView-node-description").attr("x",f).attr("y",h.centerY).node().getBBox();o=Math.max(o,f+u.width+t.paddingX)}}for(let p of s)if(p.node.cssClass?.split(/\s+/).includes("highlight")){let f=p.nodeGroup.select(".treeView-highlight-bg");if(!f.empty()){let h=o-p.node.BBox.x+8;f.attr("width",h),o=Math.max(o,p.node.BBox.x+h+2)}}return{totalHeight:c,totalWidth:o}},"drawTree"),me=e(async(n,r,t,i)=>{a.debug(`Rendering treeView diagram
|
|
4
|
-
`+n);let c=i.db,o=c.getRoot(),s=c.getConfig(),l=V(r),g=l.append("g");g.attr("class","tree-view");let d=await fe(o,s),{totalHeight:p,totalWidth:f}=ue(g,o,s,d);l.attr("viewBox",`-${s.lineThickness/2} 0 ${f} ${p}`),B(l,p,f,s.useMaxWidth)},"draw"),we={draw:me},xe=we,ve={labelFontSize:"16px",labelColor:"black",lineColor:"black",iconColor:"#546e7a",descriptionColor:"#6a9955",highlightBg:"rgba(255, 193, 7, 0.15)",highlightStroke:"#ffc107"},be=e(({treeView:n})=>{let{labelFontSize:r,labelColor:t,lineColor:i,iconColor:c,descriptionColor:o,highlightBg:s,highlightStroke:l}=U(ve,n);return`
|
|
5
|
-
.treeView-node-label {
|
|
6
|
-
font-size: ${r};
|
|
7
|
-
fill: ${t};
|
|
8
|
-
white-space: pre;
|
|
9
|
-
}
|
|
10
|
-
.treeView-node-dir {
|
|
11
|
-
font-weight: bold;
|
|
12
|
-
}
|
|
13
|
-
.treeView-node-line {
|
|
14
|
-
stroke: ${i};
|
|
15
|
-
}
|
|
16
|
-
.treeView-node-icon {
|
|
17
|
-
color: ${c};
|
|
18
|
-
}
|
|
19
|
-
.treeView-node-description {
|
|
20
|
-
font-size: ${r};
|
|
21
|
-
fill: ${o};
|
|
22
|
-
font-style: italic;
|
|
23
|
-
white-space: pre;
|
|
24
|
-
}
|
|
25
|
-
.treeView-highlight-bg {
|
|
26
|
-
fill: ${s};
|
|
27
|
-
stroke: ${l};
|
|
28
|
-
stroke-width: 1;
|
|
29
|
-
}
|
|
30
|
-
`},"styles"),Ce=be,Ee={db:k,renderer:xe,parser:de,styles:Ce};export{Ee as diagram};
|
package/web/chunk-t3658ehb.js
DELETED
package/web/chunk-t81p4wqc.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,ke,D,b,B,C,S,E,T,A,R,L,p,V,Hr,k,U}from"./chunk-1s53190z.js";import{Pt}from"./chunk-5nda24gv.js";import{X}from"./chunk-2cem4sv7.js";import{Xe}from"./chunk-07agqp8h.js";import{le}from"./chunk-989jq2h8.js";function je(t){var n=0,l=t.children,o=l&&l.length;if(!o)n=1;else while(--o>=0)n+=l[o].value;t.value=n}function ge(){return this.eachAfter(je)}function ye(t,n){let l=-1;for(let o of this)t.call(n,o,++l,this);return this}function xe(t,n){var l=this,o=[l],s,d,f=-1;while(l=o.pop())if(t.call(n,l,++f,this),s=l.children)for(d=s.length-1;d>=0;--d)o.push(s[d]);return this}function Se(t,n){var l=this,o=[l],s=[],d,f,h,v=-1;while(l=o.pop())if(s.push(l),d=l.children)for(f=0,h=d.length;f<h;++f)o.push(d[f]);while(l=s.pop())t.call(n,l,++v,this);return this}function ve(t,n){let l=-1;for(let o of this)if(t.call(n,o,++l,this))return o}function be(t){return this.eachAfter(function(n){var l=+t(n.data)||0,o=n.children,s=o&&o.length;while(--s>=0)l+=o[s].value;n.value=l})}function we(t){return this.eachBefore(function(n){if(n.children)n.children.sort(t)})}function Ce(t){var n=this,l=Ze(n,t),o=[n];while(n!==l)n=n.parent,o.push(n);var s=o.length;while(t!==l)o.splice(s,0,t),t=t.parent;return o}function Ze(t,n){if(t===n)return t;var l=t.ancestors(),o=n.ancestors(),s=null;t=l.pop(),n=o.pop();while(t===n)s=t,t=l.pop(),n=o.pop();return s}function Te(){var t=this,n=[t];while(t=t.parent)n.push(t);return n}function Le(){return Array.from(this)}function $e(){var t=[];return this.eachBefore(function(n){if(!n.children)t.push(n)}),t}function Ae(){var t=this,n=[];return t.each(function(l){if(l!==t)n.push({source:l.parent,target:l})}),n}function*Fe(){var t=this,n,l=[t],o,s,d;do{n=l.reverse(),l=[];while(t=n.pop())if(yield t,o=t.children)for(s=0,d=o.length;s<d;++s)l.push(o[s])}while(l.length)}function re(t,n){if(t instanceof Map){if(t=[void 0,t],n===void 0)n=Ke}else if(n===void 0)n=Je;var l=new ce(t),o,s=[l],d,f,h,v;while(o=s.pop())if((f=n(o.data))&&(v=(f=Array.from(f)).length)){o.children=f;for(h=v-1;h>=0;--h)s.push(d=f[h]=new ce(f[h])),d.parent=o,d.depth=o.depth+1}return l.eachBefore(et)}function Ue(){return re(this).eachBefore(Qe)}function Je(t){return t.children}function Ke(t){return Array.isArray(t)?t[1]:null}function Qe(t){if(t.data.value!==void 0)t.value=t.data.value;t.data=t.data.data}function et(t){var n=0;do t.height=n;while((t=t.parent)&&t.height<++n)}function ce(t){this.data=t,this.depth=this.height=0,this.parent=null}ce.prototype=re.prototype={constructor:ce,count:ge,each:ye,eachAfter:Se,eachBefore:xe,find:ve,sum:be,sort:we,path:Ce,ancestors:Te,descendants:Le,leaves:$e,links:Ae,copy:Ue,[Symbol.iterator]:Fe};function Be(t){if(typeof t!=="function")throw Error();return t}function ne(){return 0}function Q(t){return function(){return t}}function Ne(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Me(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(o-n)/t.value;while(++h<v)f=d[h],f.y0=l,f.y1=s,f.x0=n,f.x1=n+=f.value*u}function _e(t,n,l,o,s){var d=t.children,f,h=-1,v=d.length,u=t.value&&(s-l)/t.value;while(++h<v)f=d[h],f.x0=n,f.x1=o,f.y0=l,f.y1=l+=f.value*u}var tt=(1+Math.sqrt(5))/2;function at(t,n,l,o,s,d){var f=[],h=n.children,v,u,m=0,_=0,i=h.length,M,F,N=n.value,g,w,Y,O,ee,se,j;while(m<i){M=s-l,F=d-o;do g=h[_++].value;while(!g&&_<i);w=Y=g,se=Math.max(F/M,M/F)/(N*t),j=g*g*se,ee=Math.max(Y/j,j/w);for(;_<i;++_){if(g+=u=h[_].value,u<w)w=u;if(u>Y)Y=u;if(j=g*g*se,O=Math.max(Y/j,j/w),O>ee){g-=u;break}ee=O}if(f.push(v={value:g,dice:M<F,children:h.slice(m,_)}),v.dice)Me(v,l,o,s,N?o+=F*g/N:d);else _e(v,l,o,N?l+=M*g/N:s,d);N-=g,m=_}return f}var Ee=function t(n){function l(o,s,d,f,h){at(n,o,s,d,f,h)}return l.ratio=function(o){return t((o=+o)>1?o:1)},l}(tt);function fe(){var t=Ee,n=!1,l=1,o=1,s=[0],d=ne,f=ne,h=ne,v=ne,u=ne;function m(i){if(i.x0=i.y0=0,i.x1=l,i.y1=o,i.eachBefore(_),s=[0],n)i.eachBefore(Ne);return i}function _(i){var M=s[i.depth],F=i.x0+M,N=i.y0+M,g=i.x1-M,w=i.y1-M;if(g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;if(i.x0=F,i.y0=N,i.x1=g,i.y1=w,i.children){if(M=s[i.depth+1]=d(i)/2,F+=u(i)-M,N+=f(i)-M,g-=h(i)-M,w-=v(i)-M,g<F)F=g=(F+g)/2;if(w<N)N=w=(N+w)/2;t(i,F,N,g,w)}}return m.round=function(i){return arguments.length?(n=!!i,m):n},m.size=function(i){return arguments.length?(l=+i[0],o=+i[1],m):[l,o]},m.tile=function(i){return arguments.length?(t=Be(i),m):t},m.padding=function(i){return arguments.length?m.paddingInner(i).paddingOuter(i):m.paddingInner()},m.paddingInner=function(i){return arguments.length?(d=typeof i==="function"?i:Q(+i),m):d},m.paddingOuter=function(i){return arguments.length?m.paddingTop(i).paddingRight(i).paddingBottom(i).paddingLeft(i):m.paddingTop()},m.paddingTop=function(i){return arguments.length?(f=typeof i==="function"?i:Q(+i),m):f},m.paddingRight=function(i){return arguments.length?(h=typeof i==="function"?i:Q(+i),m):h},m.paddingBottom=function(i){return arguments.length?(v=typeof i==="function"?i:Q(+i),m):v},m.paddingLeft=function(i){return arguments.length?(u=typeof i==="function"?i:Q(+i),m):u},m}var Re=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"TreeMapDB")}getNodes(){return this.nodes}getConfig(){let t=D,n=b();return U({...t.treemap,...n.treemap??{}})}addNode(t,n){if(this.nodes.push(t),this.levels.set(t,n),n===0)this.outerNodes.push(t),this.root??=t}getRoot(){return{name:"",children:this.outerNodes}}addClass(t,n){let l=this.classes.get(t)??{id:t,styles:[],textStyles:[]},o=n.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");if(o)o.forEach((s)=>{if(Hr(s))if(l?.textStyles)l.textStyles.push(s);else l.textStyles=[s];if(l?.styles)l.styles.push(s);else l.styles=[s]});this.classes.set(t,l)}getClasses(){return this.classes}getStylesForClass(t){return this.classes.get(t)?.styles??[]}clear(){C(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}};function We(t){if(!t.length)return[];let n=[],l=[];return t.forEach((o)=>{let s={name:o.name,children:o.type==="Leaf"?void 0:[]};if(s.classSelector=o?.classSelector,o?.cssCompiledStyles)s.cssCompiledStyles=o.cssCompiledStyles;if(o.type==="Leaf"&&o.value!==void 0)s.value=o.value;while(l.length>0&&l[l.length-1].level>=o.level)l.pop();if(l.length===0)n.push(s);else{let d=l[l.length-1].node;if(d.children)d.children.push(s);else d.children=[s]}if(o.type!=="Leaf")l.push({node:s,level:o.level})}),n}e(We,"buildHierarchy");var rt=e((t,n)=>{G(t,n);let l=[];for(let d of t.TreemapRows??[])if(d.$type==="ClassDefStatement")n.addClass(d.className??"",d.styleText??"");for(let d of t.TreemapRows??[]){let f=d.item;if(!f)continue;let h=d.indent?parseInt(d.indent):0,v=nt(f),u=f.classSelector?n.getStylesForClass(f.classSelector):[],m=u.length>0?u:void 0,_={level:h,name:v,type:f.$type,value:f.value,classSelector:f.classSelector,cssCompiledStyles:m};l.push(_)}let o=We(l),s=e((d,f)=>{for(let h of d)if(n.addNode(h,f),h.children&&h.children.length>0)s(h.children,f+1)},"addNodesRecursively");s(o,0)},"populate"),nt=e((t)=>t.name?String(t.name):"","getItemName"),He={parser:{yy:void 0},parse:e(async(t)=>{try{let l=await X("treemap",t);a.debug("Treemap AST:",l);let o=He.parser?.yy;if(!(o instanceof Re))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.");rt(l,o)}catch(n){throw a.error("Error parsing treemap:",n),n}},"parse")},lt=10,oe=10,pe=25,ot=e((t,n,l,o)=>{let s=o.db,d=s.getConfig(),f=d.padding??lt,h=s.getDiagramTitle(),v=s.getRoot(),{themeVariables:u}=b();if(!v)return;let m=h?30:0,_=V(n),i=d.nodeWidth?d.nodeWidth*oe:960,M=d.nodeHeight?d.nodeHeight*oe:500,F=i,N=M+m;_.attr("viewBox",`0 0 ${F} ${N}`),B(_,N,F,d.useMaxWidth);let g;try{let r=d.valueFormat||",";if(r==="$0,0")g=e((c)=>"$"+Pt(",")(c),"valueFormat");else if(r.startsWith("$")&&r.includes(",")){let c=/\.\d+/.exec(r),y=c?c[0]:"";g=e((z)=>"$"+Pt(","+y)(z),"valueFormat")}else if(r.startsWith("$")){let c=r.substring(1);g=e((y)=>"$"+Pt(c||"")(y),"valueFormat")}else g=Pt(r)}catch(r){a.error("Error creating format function:",r),g=Pt(",")}let w=Xe().range(["transparent",u.cScale0,u.cScale1,u.cScale2,u.cScale3,u.cScale4,u.cScale5,u.cScale6,u.cScale7,u.cScale8,u.cScale9,u.cScale10,u.cScale11]),Y=Xe().range(["transparent",u.cScalePeer0,u.cScalePeer1,u.cScalePeer2,u.cScalePeer3,u.cScalePeer4,u.cScalePeer5,u.cScalePeer6,u.cScalePeer7,u.cScalePeer8,u.cScalePeer9,u.cScalePeer10,u.cScalePeer11]),O=Xe().range([u.cScaleLabel0,u.cScaleLabel1,u.cScaleLabel2,u.cScaleLabel3,u.cScaleLabel4,u.cScaleLabel5,u.cScaleLabel6,u.cScaleLabel7,u.cScaleLabel8,u.cScaleLabel9,u.cScaleLabel10,u.cScaleLabel11]);if(h)_.append("text").attr("x",F/2).attr("y",m/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(h);let ee=_.append("g").attr("transform",`translate(0, ${m})`).attr("class","treemapContainer"),se=re(v).sum((r)=>r.value??0).sort((r,c)=>(c.value??0)-(r.value??0)),ze=fe().size([i,M]).paddingTop((r)=>r.children&&r.children.length>0?pe+oe:0).paddingInner(f).paddingLeft((r)=>r.children&&r.children.length>0?oe:0).paddingRight((r)=>r.children&&r.children.length>0?oe:0).paddingBottom((r)=>r.children&&r.children.length>0?oe:0).round(!0)(se),Ie=ze.descendants().filter((r)=>r.children&&r.children.length>0),ie=ee.selectAll(".treemapSection").data(Ie).enter().append("g").attr("class","treemapSection").attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",pe).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",0.6).attr("stroke-width",0.6).attr("style",(r)=>{if(r.depth===0)return"display: none;";return""}),ie.append("clipPath").attr("id",(r,c)=>`clip-section-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-12)).attr("height",pe),ie.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class",(r,c)=>`treemapSection section${c}`).attr("fill",(r)=>w(r.data.name)).attr("fill-opacity",0.6).attr("stroke",(r)=>Y(r.data.name)).attr("stroke-width",2).attr("stroke-opacity",0.4).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c=k({cssCompiledStyles:r.data.cssCompiledStyles});return c.nodeStyles+";"+c.borderStyles.join(";")}),ie.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",pe/2).attr("dominant-baseline","middle").text((r)=>r.depth===0?"":r.data.name).attr("font-weight","bold").attr("clip-path",(r,c)=>`url(#clip-section-${n}-${c})`).attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="dominant-baseline: middle; font-size: 12px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).each(function(r){if(r.depth===0)return;let c=p(this),y=r.data.name;c.text(y);let z=r.x1-r.x0,W=6,P;if(d.showValues!==!1&&r.value){let I=z-10,K=30,Ge=10;P=I-30-10-W}else P=z-W-6;let x=Math.max(15,P),J=c.node();if(J.getComputedTextLength()>x){let K=y;while(K.length>0){if(K=y.substring(0,K.length-1),K.length===0){if(c.text("..."),J.getComputedTextLength()>x)c.text("");break}if(c.text(K+"..."),J.getComputedTextLength()<=x)break}}}),d.showValues!==!1)ie.append("text").attr("class","treemapSectionValue").attr("x",(r)=>r.x1-r.x0-10).attr("y",pe/2).attr("text-anchor","end").attr("dominant-baseline","middle").text((r)=>r.value?g(r.value):"").attr("font-style","italic").attr("style",(r)=>{if(r.depth===0)return"display: none;";let c="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+O(r.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")});let De=ze.leaves(),q=De.length>20,Oe=q?16:38,de=q?14:28,te=q?4:8,ae=q?4:6,he=q?2:4,Ve=q?8:10,me=q?1:2,ue=ee.selectAll(".treemapLeafGroup").data(De).enter().append("g").attr("class",(r,c)=>`treemapNode treemapLeafGroup leaf${c}${r.data.classSelector?` ${r.data.classSelector}`:""}x`).attr("transform",(r)=>`translate(${r.x0},${r.y0})`);if(ue.append("rect").attr("width",(r)=>r.x1-r.x0).attr("height",(r)=>r.y1-r.y0).attr("class","treemapLeaf").attr("fill",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("style",(r)=>k({cssCompiledStyles:r.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",0.3).attr("stroke",(r)=>r.parent?w(r.parent.data.name):w(r.data.name)).attr("stroke-width",3),ue.append("clipPath").attr("id",(r,c)=>`clip-${n}-${c}`).append("rect").attr("width",(r)=>Math.max(0,r.x1-r.x0-4)).attr("height",(r)=>Math.max(0,r.y1-r.y0-4)),ue.append("text").attr("class","treemapLabel").attr("x",(r)=>(r.x1-r.x0)/2).attr("y",(r)=>(r.y1-r.y0)/2).attr("style",(r)=>{let c=`text-anchor: middle; dominant-baseline: middle; font-size: ${Oe}px;fill:`+O(r.data.name)+";",y=k({cssCompiledStyles:r.data.cssCompiledStyles});return c+y.labelStyles.replace("color:","fill:")}).attr("clip-path",(r,c)=>`url(#clip-${n}-${c})`).text((r)=>r.data.name).each(function(r){let c=p(this),y=r.x1-r.x0,z=r.y1-r.y0,W=c.node(),P=y-2*he,Z=z-2*he;if(P<Ve||Z<Ve){c.style("display","none");return}let x=parseInt(c.style("font-size"),10),J=0.6;while(W.getComputedTextLength()>P&&x>te)x--,c.style("font-size",`${x}px`);let H=Math.max(ae,Math.min(de,Math.round(x*J))),I=x+me+H;while(I>Z&&x>te){if(x--,H=Math.max(ae,Math.min(de,Math.round(x*J))),H<ae&&x===te)break;if(c.style("font-size",`${x}px`),I=x+me+H,H<=ae&&I>Z);}if(c.style("font-size",`${x}px`),q){if(x<te||Z<te)c.style("display","none")}else if(W.getComputedTextLength()>P||x<te||Z<x)c.style("display","none")}),d.showValues!==!1)ue.append("text").attr("class","treemapValue").attr("x",(c)=>(c.x1-c.x0)/2).attr("y",function(c){return(c.y1-c.y0)/2}).attr("style",(c)=>{let y=`text-anchor: middle; dominant-baseline: hanging; font-size: ${de}px;fill:`+O(c.data.name)+";",z=k({cssCompiledStyles:c.data.cssCompiledStyles});return y+z.labelStyles.replace("color:","fill:")}).attr("clip-path",(c,y)=>`url(#clip-${n}-${y})`).text((c)=>c.value?g(c.value):"").each(function(c){let y=p(this),z=this.parentNode;if(!z){y.style("display","none");return}let W=p(z).select(".treemapLabel");if(W.empty()||W.style("display")==="none"){y.style("display","none");return}let P=parseFloat(W.style("font-size")),x=Math.max(ae,Math.min(de,Math.round(P*0.6)));y.style("font-size",`${x}px`);let H=(c.y1-c.y0)/2+P/2+me;y.attr("y",H);let I=c.x1-c.x0,Pe=c.y1-c.y0-4,Ye=I-2*he;if(y.node().getComputedTextLength()>Ye||H+x>Pe||x<ae)y.style("display","none");else y.style("display",null)});let qe=d.diagramPadding??8;le(_,qe,"flowchart",d?.useMaxWidth||!1)},"draw"),st=e(function(t,n){return n.db.getClasses()},"getClasses"),it={draw:ot,getClasses:st},ct={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},pt=e(({treemap:t}={})=>{let n=ke(),l=b(),o=U(n,l.themeVariables),s=U(ct,t),d=s.titleColor??o.titleColor,f=s.labelColor??o.textColor,h=s.valueColor??o.textColor;return`
|
|
2
|
-
.treemapNode.section {
|
|
3
|
-
stroke: ${s.sectionStrokeColor};
|
|
4
|
-
stroke-width: ${s.sectionStrokeWidth};
|
|
5
|
-
fill: ${s.sectionFillColor};
|
|
6
|
-
}
|
|
7
|
-
.treemapNode.leaf {
|
|
8
|
-
stroke: ${s.leafStrokeColor};
|
|
9
|
-
stroke-width: ${s.leafStrokeWidth};
|
|
10
|
-
fill: ${s.leafFillColor};
|
|
11
|
-
}
|
|
12
|
-
.treemapLabel {
|
|
13
|
-
fill: ${f};
|
|
14
|
-
font-size: ${s.labelFontSize};
|
|
15
|
-
}
|
|
16
|
-
.treemapValue {
|
|
17
|
-
fill: ${h};
|
|
18
|
-
font-size: ${s.valueFontSize};
|
|
19
|
-
}
|
|
20
|
-
.treemapTitle {
|
|
21
|
-
fill: ${d};
|
|
22
|
-
font-size: ${s.titleFontSize};
|
|
23
|
-
}
|
|
24
|
-
`},"getStyles"),dt=pt,fa={parser:He,get db(){return new Re},renderer:it,styles:dt};export{fa as diagram};
|
package/web/chunk-tewmsd7t.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-1s53190z.js";var c=1;function i(){if(typeof globalThis>"u")return;return globalThis}e(i,"getCaptureGlobal");function p(){return Boolean(i()?.mermaidCaptureSizes)}e(p,"shouldCaptureSizes");function u(){if(typeof location>"u")return"browser-dev";return`${location.pathname}${location.search}`}e(u,"capturedFromLocation");function d(n,r){let o=i();if(!o)return;let t=r.node(),s=((t&&"ownerSVGElement"in t?t.ownerSVGElement:null)??t)?.id??"(unknown)";o.mermaidCapturedSizes??=[];let a={svgId:s,sizes:n};o.mermaidCapturedSizes.push(a),o.mermaidLastCapturedSizes=a}e(d,"emitCapturedSizes");function m(n,r){let o=[];for(let t of r.nodes){if(t.isGroup)continue;o.push({id:t.id,width:t.width??0,height:t.height??0})}if(o.length===0)return;d({metadata:{captureVersion:c,capturedAt:new Date().toISOString(),capturedFrom:u()},nodes:o},n)}e(m,"captureNodeSizes");export{m as captureNodeSizes};
|
package/web/chunk-tf57s7ry.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{or}from"./chunk-2cem4sv7.js";export{or as createRailroadAbnfServices};
|
package/web/chunk-tqr80b5w.js
DELETED
package/web/chunk-v282r683.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,B,C,S,E,T,A,R,L,V,U}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";var N=D.packet,F=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T}static{e(this,"PacketDB")}getConfig(){let t=U({...N,...b().packet});if(t.showBits)t.paddingY+=10;return t}getPacket(){return this.packet}pushWord(t){if(t.length>0)this.packet.push(t)}clear(){C(),this.packet=[]}},M=1e4,Y=e((t,r)=>{G(t,r);let i=-1,s=[],l=1,{bitsPerRow:d}=r.getConfig();for(let{start:o,end:n,bits:g,label:f}of t.blocks){if(o!==void 0&&n!==void 0&&n<o)throw Error(`Packet block ${o} - ${n} is invalid. End must be greater than start.`);if(o??=i+1,o!==i+1)throw Error(`Packet block ${o} - ${n??o} is not contiguous. It should start from ${i+1}.`);if(g===0)throw Error(`Packet block ${o} is invalid. Cannot have a zero bit field.`);n??=o+(g??1)-1,g??=n-o+1,i=n,a.debug(`Packet block ${o} - ${i} with label ${f}`);while(s.length<=d+1&&r.getPacket().length<M){let[p,h]=I({start:o,end:n,bits:g,label:f},l,d);if(s.push(p),p.end+1===l*d)r.pushWord(s),s=[],l++;if(!h)break;({start:o,end:n,bits:g,label:f}=h)}}r.pushWord(s)},"populate"),I=e((t,r,i)=>{if(t.start===void 0)throw Error("start should have been set during first phase");if(t.end===void 0)throw Error("end should have been set during first phase");if(t.start>t.end)throw Error(`Block start ${t.start} is greater than block end ${t.end}.`);if(t.end+1<=r*i)return[t,void 0];let s=r*i-1,l=r*i;return[{start:t.start,end:s,label:t.label,bits:s-t.start},{start:l,end:t.end,label:t.label,bits:t.end-l}]},"getNextFittingBlock"),P={parser:{yy:void 0},parse:e(async(t)=>{let r=await X("packet",t),i=P.parser?.yy;if(!(i instanceof F))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.");a.debug(r),Y(r,i)},"parse")},O=e((t,r,i,s)=>{let l=s.db,d=l.getConfig(),{rowHeight:o,paddingY:n,bitWidth:g,bitsPerRow:f}=d,p=l.getPacket(),h=l.getDiagramTitle(),w=o+n,c=w*(p.length+1)-(h?0:o),k=g*f+2,m=V(r);m.attr("viewBox",`0 0 ${k} ${c}`),B(m,c,k,d.useMaxWidth);for(let[y,u]of p.entries())j(m,u,y,d);m.append("text").text(h).attr("x",k/2).attr("y",c-w/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=e((t,r,i,{rowHeight:s,paddingX:l,paddingY:d,bitWidth:o,bitsPerRow:n,showBits:g,bitOrder:f})=>{let p=t.append("g"),h=i*(s+d)+d,w=f==="descending";for(let c of r){let k=c.end-c.start+1,m=c.start%n,u=(w?n-m-k:m)*o+1,v=k*o-l;if(p.append("rect").attr("x",u).attr("y",h).attr("width",v).attr("height",s).attr("class","packetBlock"),p.append("text").attr("x",u+v/2).attr("y",h+s/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(c.label),!g)continue;let[W,_]=w?[c.end,c.start]:[c.start,c.end],x=k===1,z=h-2;if(p.append("text").attr("x",u+(x?v/2:0)).attr("y",z).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",x?"middle":"start").text(W),!x)p.append("text").attr("x",u+v).attr("y",z).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(_)}},"drawWord"),H={draw:O},K={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},q=e(({packet:t}={})=>{let r=U(K,t);return`
|
|
2
|
-
.packetByte {
|
|
3
|
-
font-size: ${r.byteFontSize};
|
|
4
|
-
}
|
|
5
|
-
.packetByte.start {
|
|
6
|
-
fill: ${r.startByteColor};
|
|
7
|
-
}
|
|
8
|
-
.packetByte.end {
|
|
9
|
-
fill: ${r.endByteColor};
|
|
10
|
-
}
|
|
11
|
-
.packetLabel {
|
|
12
|
-
fill: ${r.labelColor};
|
|
13
|
-
font-size: ${r.labelFontSize};
|
|
14
|
-
}
|
|
15
|
-
.packetTitle {
|
|
16
|
-
fill: ${r.titleColor};
|
|
17
|
-
font-size: ${r.titleFontSize};
|
|
18
|
-
}
|
|
19
|
-
.packetBlock {
|
|
20
|
-
stroke: ${r.blockStrokeColor};
|
|
21
|
-
stroke-width: ${r.blockStrokeWidth};
|
|
22
|
-
fill: ${r.blockFillColor};
|
|
23
|
-
}
|
|
24
|
-
`},"styles"),ot={parser:P,get db(){return new F},renderer:H,styles:q};export{ot as diagram};
|
package/web/chunk-v4vjjtn7.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Si}from"./chunk-2cem4sv7.js";export{Si as createTreeViewServices};
|
package/web/chunk-vbwdwcdp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Co}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";export{Co as diagram};
|
package/web/chunk-vjngfh0q.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,g,t,n,_,s,Z,ae,j,lt}from"./chunk-rddft5ce.js";var I=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],h=s("circle-slash",I);function R(o){let{Button:N,Panel:y,style:k}=_(),e=o.payload,[i,c]=r(!1),[b,C]=r(!1),[l,p]=r();if(!e)return null;let a=b?"killed":e.state,m=a==="running",d=a==="exited"&&e.code===0,u=a==="killed"||a==="timeout",f=e.output?.trim(),P=async()=>{if(i)return;c(!0),p(void 0);try{await o.connection.request(`/api/sessions/${encodeURIComponent(o.sessionID)}/jobs/${encodeURIComponent(e.id)}/kill`,{method:"POST"}),C(!0)}catch(x){p(x instanceof Error?x.message:"停止失败,后台任务可能已结束")}finally{c(!1)}};return n(y,{className:"my-2",header:n(g,{children:[t(lt,{className:"size-3.5 shrink-0 text-faint"}),t("span",{className:"truncate font-mono text-ink/90",title:e.command??e.id,children:e.command??`任务 ${e.id}`})]}),actions:n(g,{children:[m&&n(g,{children:[n("span",{className:"flex items-center gap-1 text-warning",children:[t(ae,{className:"size-3.5 animate-spin"}),t("span",{children:"后台运行中"})]}),t(N,{size:"sm",variant:"danger-ghost",className:"h-6 rounded-md px-2 text-xs",disabled:i,onClick:()=>{P()},children:"停止"})]}),d&&n("span",{className:"flex items-center gap-1 text-success",children:[t(j,{className:"size-3.5"}),t("span",{children:"已完成"})]}),u&&n("span",{className:"flex items-center gap-1 text-faint",children:[t(h,{className:"size-3.5"}),t("span",{children:a==="timeout"?"已超时":"已停止"})]}),!m&&!d&&!u&&n("span",{className:"flex items-center gap-1 text-danger",children:[t(Z,{className:"size-3.5"}),n("span",{children:["退出码 ",e.code??"异常"]})]})]}),children:[l&&t("p",{role:"status",className:"border-b border-line px-4 py-2.5 text-xs text-danger",children:l}),f&&t("pre",{className:k("chat.toolOutput","max-h-60 text-ink/90 select-text"),children:f})]})}export{R as BashJobCard};
|
package/web/chunk-vnt34mkb.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Kn}from"./chunk-h6k1x096.js";export{Kn as default};
|
package/web/chunk-wbgkwxrc.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h,o,i,r,t,n,_,Z,ee,at,bt}from"./chunk-rddft5ce.js";import{vn}from"./chunk-t3658ehb.js";var I={config:"自定义路径",env:"环境变量",system:"系统预装"};function L({connection:p,onClose:S}){let{Button:m,Input:O,Switch:C,SettingGroup:N,SettingRow:v,cn:w}=_(),[b,B]=r({}),[a,g]=r({}),[l,y]=r(null),[u,A]=r(!0),[k,z]=r(!1),[d,R]=r(!1),[f,c]=r(null),P=i(null),q=(a.executable??"")!==(b.executable??"")||Boolean(a.noSandbox)!==Boolean(b.noSandbox)||Boolean(a.ignoreCertErrors)!==Boolean(b.ignoreCertErrors),E=h(async(e)=>{z(!0);try{let s=await p.request("/api/plugins/browser/status",{signal:e});y(s)}catch(s){if(!e?.aborted)y({available:!1,error:s instanceof Error?s.message:"无法获取浏览器状态"})}finally{if(!e?.aborted)z(!1)}},[p]);o(()=>{let e=new AbortController;return P.current=e,Promise.all([p.request("/api/plugins/browser/settings",{signal:e.signal}),p.request("/api/plugins/browser/status",{signal:e.signal})]).then(([s,x])=>{if(!e.signal.aborted)B(s),g(s),y(x)}).catch((s)=>{if(!e.signal.aborted)c({type:"error",text:s instanceof Error?s.message:"读取浏览器设置失败"})}).finally(()=>{if(!e.signal.aborted)A(!1)}),()=>e.abort()},[p]);let T=async(e)=>{if(e?.preventDefault(),d||u)return;let s=new AbortController;R(!0),c(null);try{if(await p.request("/api/plugins/browser/settings",{method:"PATCH",signal:s.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),!s.signal.aborted)B(a),c({type:"success",text:"设置已保存,将在浏览器进程下次启动时生效。"}),await E(s.signal)}catch(x){if(!s.signal.aborted)c({type:"error",text:x instanceof Error?x.message:"保存设置失败"})}finally{if(!s.signal.aborted)R(!1)}},G=()=>{g(b),c(null)};return n("div",{className:"min-w-0 space-y-6",children:[t(N,{title:"运行环境",action:n(m,{size:"sm",variant:"ghost",disabled:u||k,onClick:()=>void E(),className:"h-8 px-2.5 text-xs text-dim hover:text-ink",children:[t(ee,{className:w("mr-1.5 size-3.5",k&&"animate-spin")}),"重新检测"]}),children:t("div",{className:"flex flex-wrap items-center justify-between gap-4 p-4",children:n("div",{className:"min-w-0 flex-1",children:[n("div",{className:"flex items-center gap-2",children:[t("span",{className:w("size-2 shrink-0 rounded-full",l?.available?"bg-success shadow-[0_0_8px_var(--color-success)]":"bg-danger")}),t("span",{className:"text-sm font-medium text-ink",children:l?l.available?"浏览器可用":"未检测到可用浏览器":"正在检测…"}),l?.available&&l.source&&t("span",{className:"rounded-md bg-raised px-2 py-0.5 text-xs text-dim",children:I[l.source]??l.source})]}),l&&!l.available&&l.error&&t("p",{className:"mt-2 text-xs leading-5 text-danger",children:l.error})]})})}),n("form",{onSubmit:T,children:[n(N,{title:"启动参数",children:[t(v,{vertical:!0,title:"可执行文件路径",children:n("div",{className:"flex gap-2",children:[t(O,{id:"browser-executable",disabled:u||d,value:a.executable??"",placeholder:"留空自动探测系统浏览器",onChange:(e)=>{g({...a,executable:e.target.value}),c(null)}}),a.executable&&t(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:()=>{g({...a,executable:""}),c(null)},className:"shrink-0",children:"清空"})]})}),t(v,{title:"禁用沙箱 (--no-sandbox)",description:"容器或 root 环境使用",children:t(C,{label:"禁用沙箱",disabled:u||d,checked:a.noSandbox??!1,onCheckedChange:(e)=>{g({...a,noSandbox:e}),c(null)}})}),t(v,{title:"忽略证书错误 (--ignore-certificate-errors)",description:"跳过自签名与证书有效性检查",children:t(C,{label:"忽略证书错误",disabled:u||d,checked:a.ignoreCertErrors??!1,onCheckedChange:(e)=>{g({...a,ignoreCertErrors:e}),c(null)}})})]}),n("div",{className:"mt-4 flex flex-wrap items-center justify-between gap-3 px-0.5",children:[t("div",{className:"min-w-0 flex-1",children:f&&n("div",{className:w("flex items-center gap-2 text-xs",f.type==="success"?"text-success":"text-danger"),children:[f.type==="success"?t(vn,{className:"size-3.5 shrink-0"}):t(Z,{className:"size-3.5 shrink-0"}),t("span",{children:f.text})]})}),n("div",{className:"flex items-center gap-2",children:[q&&n(m,{type:"button",variant:"ghost",size:"sm",disabled:u||d,onClick:G,children:[t(at,{className:"mr-1.5 size-3.5"}),"重置"]}),n(m,{type:"submit",variant:"primary",size:"sm",disabled:u||d,children:[t(bt,{className:"mr-1.5 size-3.5"}),d?"保存中…":"保存"]}),S&&t(m,{type:"button",variant:"secondary",size:"sm",onClick:S,children:"关闭"})]})]})]})]})}export{L as default};
|
package/web/chunk-wjbk50hn.js
DELETED
package/web/chunk-wjy848e2.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ki}from"./chunk-2cem4sv7.js";export{ki as createPacketServices};
|
package/web/chunk-wqsczy57.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import{G}from"./chunk-14deqqhr.js";import{e,a,D,b,O,ht,C,S,E,T,A,R,L,l,p,V,Fi,Dn,nt,U,ze,Ie}from"./chunk-1s53190z.js";import{X}from"./chunk-2cem4sv7.js";import{ut,lr}from"./chunk-gksf7cek.js";import{Se,Te}from"./chunk-rddft5ce.js";var ft=Te(function(rt,st){(function(i,s){if(typeof rt==="object"&&typeof st==="object")st.exports=s(lr());else if(typeof define==="function"&&define.amd)define(["cose-base"],s);else if(typeof rt==="object")rt.cytoscapeFcose=s(lr());else i.cytoscapeFcose=s(i.coseBase)})(rt,function(t){return(()=>{var i={658:(N)=>{N.exports=Object.assign!=null?Object.assign.bind(Object):function(B){for(var v=arguments.length,I=Array(v>1?v-1:0),c=1;c<v;c++)I[c-1]=arguments[c];return I.forEach(function(y){Object.keys(y).forEach(function(d){return B[d]=y[d]})}),B}},548:(N,B,v)=>{var I=function(){function d(f,u){var g=[],r=!0,_=!1,F=void 0;try{for(var o=f[Symbol.iterator](),h;!(r=(h=o.next()).done);r=!0)if(g.push(h.value),u&&g.length===u)break}catch(k){_=!0,F=k}finally{try{if(!r&&o.return)o.return()}finally{if(_)throw F}}return g}return function(f,u){if(Array.isArray(f))return f;else if(Symbol.iterator in Object(f))return d(f,u);else throw TypeError("Invalid attempt to destructure non-iterable instance")}}(),c=v(140).layoutBase.LinkedList,y={};y.getTopMostNodes=function(d){var f={};for(var u=0;u<d.length;u++)f[d[u].id()]=!0;var g=d.filter(function(r,_){if(typeof r==="number")r=_;var F=r.parent()[0];while(F!=null){if(f[F.id()])return!1;F=F.parent()[0]}return!0});return g},y.connectComponents=function(d,f,u,g){var r=new c,_=new Set,F=[],o=void 0,h=void 0,k=void 0,n=!1,P=1,j=[],M=[],q=function(){var x=d.collection();M.push(x);var H=u[0],Z=d.collection();Z.merge(H).merge(H.descendants().intersection(f)),F.push(H),Z.forEach(function(re){r.push(re),_.add(re),x.merge(re)});var Q=function(){H=r.shift();var ue=d.collection();H.neighborhood().nodes().forEach(function(W){if(f.intersection(H.edgesWith(W)).length>0)ue.merge(W)});for(var Le=0;Le<ue.length;Le++){var $e=ue[Le];if(o=u.intersection($e.union($e.ancestors())),o!=null&&!_.has(o[0])){var de=o.union(o.descendants());de.forEach(function(W){if(r.push(W),_.add(W),x.merge(W),u.has(W))F.push(W)})}}};while(r.length!=0)Q();if(x.forEach(function(re){f.intersection(re.connectedEdges()).forEach(function(ue){if(x.has(ue.source())&&x.has(ue.target()))x.merge(ue)})}),F.length==u.length)n=!0;if(!n||n&&P>1){h=F[0],k=h.connectedEdges().length,F.forEach(function(re){if(re.connectedEdges().length<k)k=re.connectedEdges().length,h=re}),j.push(h.id());var se=d.collection();se.merge(F[0]),F.forEach(function(re){se.merge(re)}),F=[],u=u.difference(se),P++}};do q();while(!n);if(g){if(j.length>0)g.set("dummy"+(g.size+1),j)}return M},y.relocateComponent=function(d,f,u){if(!u.fixedNodeConstraint){var{POSITIVE_INFINITY:g,NEGATIVE_INFINITY:r,POSITIVE_INFINITY:_,NEGATIVE_INFINITY:F}=Number;if(u.quality=="draft"){var o=!0,h=!1,k=void 0;try{for(var n=f.nodeIndexes[Symbol.iterator](),P;!(o=(P=n.next()).done);o=!0){var j=P.value,M=I(j,2),q=M[0],Y=M[1],x=u.cy.getElementById(q);if(x){var H=x.boundingBox(),Z=f.xCoords[Y]-H.w/2,Q=f.xCoords[Y]+H.w/2,se=f.yCoords[Y]-H.h/2,re=f.yCoords[Y]+H.h/2;if(Z<g)g=Z;if(Q>r)r=Q;if(se<_)_=se;if(re>F)F=re}}}catch(W){h=!0,k=W}finally{try{if(!o&&n.return)n.return()}finally{if(h)throw k}}var ue=d.x-(r+g)/2,Le=d.y-(F+_)/2;f.xCoords=f.xCoords.map(function(W){return W+ue}),f.yCoords=f.yCoords.map(function(W){return W+Le})}else{Object.keys(f).forEach(function(W){var oe=f[W],Ne=oe.getRect().x,ke=oe.getRect().x+oe.getRect().width,De=oe.getRect().y,xe=oe.getRect().y+oe.getRect().height;if(Ne<g)g=Ne;if(ke>r)r=ke;if(De<_)_=De;if(xe>F)F=xe});var $e=d.x-(r+g)/2,de=d.y-(F+_)/2;Object.keys(f).forEach(function(W){var oe=f[W];oe.setCenter(oe.getCenterX()+$e,oe.getCenterY()+de)})}}},y.calcBoundingBox=function(d,f,u,g){var{MAX_SAFE_INTEGER:r,MIN_SAFE_INTEGER:_,MAX_SAFE_INTEGER:F,MIN_SAFE_INTEGER:o}=Number,h=void 0,k=void 0,n=void 0,P=void 0,j=d.descendants().not(":parent"),M=j.length;for(var q=0;q<M;q++){var Y=j[q];if(h=f[g.get(Y.id())]-Y.width()/2,k=f[g.get(Y.id())]+Y.width()/2,n=u[g.get(Y.id())]-Y.height()/2,P=u[g.get(Y.id())]+Y.height()/2,r>h)r=h;if(_<k)_=k;if(F>n)F=n;if(o<P)o=P}var x={};return x.topLeftX=r,x.topLeftY=F,x.width=_-r,x.height=o-F,x},y.calcParentsWithoutChildren=function(d,f){var u=d.collection();return f.nodes(":parent").forEach(function(g){var r=!1;if(g.children().forEach(function(_){if(_.css("display")!="none")r=!0}),!r)u.merge(g)}),u},N.exports=y},816:(N,B,v)=>{var I=v(548),c=v(140).CoSELayout,y=v(140).CoSENode,d=v(140).layoutBase.PointD,f=v(140).layoutBase.DimensionD,u=v(140).layoutBase.LayoutConstants,g=v(140).layoutBase.FDLayoutConstants,r=v(140).CoSEConstants,_=function(o,h){var{cy:k,eles:n}=o,P=n.nodes(),j=n.edges(),M=void 0,q=void 0,Y=void 0,x={};if(o.randomize)M=h.nodeIndexes,q=h.xCoords,Y=h.yCoords;var H=function(W){return typeof W==="function"},Z=function(W,oe){if(H(W))return W(oe);else return W},Q=I.calcParentsWithoutChildren(k,n),se=function de(W,oe,Ne,ke){var De=oe.length;for(var xe=0;xe<De;xe++){var J=oe[xe],Ae=null;if(J.intersection(Q).length==0)Ae=J.children();var ie=void 0,ve=J.layoutDimensions({nodeDimensionsIncludeLabels:ke.nodeDimensionsIncludeLabels});if(J.outerWidth()!=null&&J.outerHeight()!=null)if(ke.randomize)if(!J.isParent())ie=W.add(new y(Ne.graphManager,new d(q[M.get(J.id())]-ve.w/2,Y[M.get(J.id())]-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else{var Me=I.calcBoundingBox(J,q,Y,M);if(J.intersection(Q).length==0)ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(Me.width,Me.height)));else ie=W.add(new y(Ne.graphManager,new d(Me.topLeftX,Me.topLeftY),new f(parseFloat(ve.w),parseFloat(ve.h))))}else ie=W.add(new y(Ne.graphManager,new d(J.position("x")-ve.w/2,J.position("y")-ve.h/2),new f(parseFloat(ve.w),parseFloat(ve.h))));else ie=W.add(new y(this.graphManager));if(ie.id=J.data("id"),ie.nodeRepulsion=Z(ke.nodeRepulsion,J),ie.paddingLeft=parseInt(J.css("padding")),ie.paddingTop=parseInt(J.css("padding")),ie.paddingRight=parseInt(J.css("padding")),ie.paddingBottom=parseInt(J.css("padding")),ke.nodeDimensionsIncludeLabels)ie.labelWidth=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).w,ie.labelHeight=J.boundingBox({includeLabels:!0,includeNodes:!1,includeOverlays:!1}).h,ie.labelPosVertical=J.css("text-valign"),ie.labelPosHorizontal=J.css("text-halign");if(x[J.data("id")]=ie,isNaN(ie.rect.x))ie.rect.x=0;if(isNaN(ie.rect.y))ie.rect.y=0;if(Ae!=null&&Ae.length>0){var Ge=void 0;Ge=Ne.getGraphManager().add(Ne.newGraph(),ie),de(Ge,Ae,Ne,ke)}}},re=function(W,oe,Ne){var ke=0,De=0;for(var xe=0;xe<Ne.length;xe++){var J=Ne[xe],Ae=x[J.data("source")],ie=x[J.data("target")];if(Ae&&ie&&Ae!==ie&&Ae.getEdgesBetween(ie).length==0){var ve=oe.add(W.newEdge(),Ae,ie);ve.id=J.id(),ve.idealLength=Z(o.idealEdgeLength,J),ve.edgeElasticity=Z(o.edgeElasticity,J),ke+=ve.idealLength,De++}}if(o.idealEdgeLength!=null){if(De>0)r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=ke/De;else if(!H(o.idealEdgeLength))r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=o.idealEdgeLength;else r.DEFAULT_EDGE_LENGTH=g.DEFAULT_EDGE_LENGTH=50;r.MIN_REPULSION_DIST=g.MIN_REPULSION_DIST=g.DEFAULT_EDGE_LENGTH/10,r.DEFAULT_RADIAL_SEPARATION=g.DEFAULT_EDGE_LENGTH}},ue=function(W,oe){if(oe.fixedNodeConstraint)W.constraints.fixedNodeConstraint=oe.fixedNodeConstraint;if(oe.alignmentConstraint)W.constraints.alignmentConstraint=oe.alignmentConstraint;if(oe.relativePlacementConstraint)W.constraints.relativePlacementConstraint=oe.relativePlacementConstraint};if(o.nestingFactor!=null)r.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=g.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=o.nestingFactor;if(o.gravity!=null)r.DEFAULT_GRAVITY_STRENGTH=g.DEFAULT_GRAVITY_STRENGTH=o.gravity;if(o.numIter!=null)r.MAX_ITERATIONS=g.MAX_ITERATIONS=o.numIter;if(o.gravityRange!=null)r.DEFAULT_GRAVITY_RANGE_FACTOR=g.DEFAULT_GRAVITY_RANGE_FACTOR=o.gravityRange;if(o.gravityCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_STRENGTH=g.DEFAULT_COMPOUND_GRAVITY_STRENGTH=o.gravityCompound;if(o.gravityRangeCompound!=null)r.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=g.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=o.gravityRangeCompound;if(o.initialEnergyOnIncremental!=null)r.DEFAULT_COOLING_FACTOR_INCREMENTAL=g.DEFAULT_COOLING_FACTOR_INCREMENTAL=o.initialEnergyOnIncremental;if(o.tilingCompareBy!=null)r.TILING_COMPARE_BY=o.tilingCompareBy;if(o.quality=="proof")u.QUALITY=2;else u.QUALITY=0;if(r.NODE_DIMENSIONS_INCLUDE_LABELS=g.NODE_DIMENSIONS_INCLUDE_LABELS=u.NODE_DIMENSIONS_INCLUDE_LABELS=o.nodeDimensionsIncludeLabels,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!o.randomize,r.ANIMATE=g.ANIMATE=u.ANIMATE=o.animate,r.TILE=o.tile,r.TILING_PADDING_VERTICAL=typeof o.tilingPaddingVertical==="function"?o.tilingPaddingVertical.call():o.tilingPaddingVertical,r.TILING_PADDING_HORIZONTAL=typeof o.tilingPaddingHorizontal==="function"?o.tilingPaddingHorizontal.call():o.tilingPaddingHorizontal,r.DEFAULT_INCREMENTAL=g.DEFAULT_INCREMENTAL=u.DEFAULT_INCREMENTAL=!0,r.PURE_INCREMENTAL=!o.randomize,u.DEFAULT_UNIFORM_LEAF_NODE_SIZES=o.uniformNodeDimensions,o.step=="transformed")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!1;if(o.step=="enforced")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!1;if(o.step=="cose")r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1,r.ENFORCE_CONSTRAINTS=!1,r.APPLY_LAYOUT=!0;if(o.step=="all"){if(o.randomize)r.TRANSFORM_ON_CONSTRAINT_HANDLING=!0;else r.TRANSFORM_ON_CONSTRAINT_HANDLING=!1;r.ENFORCE_CONSTRAINTS=!0,r.APPLY_LAYOUT=!0}if(o.fixedNodeConstraint||o.alignmentConstraint||o.relativePlacementConstraint)r.TREE_REDUCTION_ON_INCREMENTAL=!1;else r.TREE_REDUCTION_ON_INCREMENTAL=!0;var Le=new c,$e=Le.newGraphManager();return se($e.addRoot(),I.getTopMostNodes(P),Le,o),re(Le,$e,j),ue(Le,o),Le.runLayout(),x};N.exports={coseLayout:_}},212:(N,B,v)=>{var I=function(){function o(h,k){for(var n=0;n<k.length;n++){var P=k[n];if(P.enumerable=P.enumerable||!1,P.configurable=!0,"value"in P)P.writable=!0;Object.defineProperty(h,P.key,P)}}return function(h,k,n){if(k)o(h.prototype,k);if(n)o(h,n);return h}}();function c(o,h){if(!(o instanceof h))throw TypeError("Cannot call a class as a function")}var y=v(658),d=v(548),f=v(657),u=f.spectralLayout,g=v(816),r=g.coseLayout,_=Object.freeze({quality:"default",randomize:!0,animate:!0,animationDuration:1000,animationEasing:void 0,fit:!0,padding:30,nodeDimensionsIncludeLabels:!1,uniformNodeDimensions:!1,packComponents:!0,step:"all",samplingType:!0,sampleSize:25,nodeSeparation:75,piTol:0.0000001,nodeRepulsion:function(h){return 4500},idealEdgeLength:function(h){return 50},edgeElasticity:function(h){return 0.45},nestingFactor:0.1,gravity:0.25,numIter:2500,tile:!0,tilingCompareBy:void 0,tilingPaddingVertical:10,tilingPaddingHorizontal:10,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:3.8,initialEnergyOnIncremental:0.3,fixedNodeConstraint:void 0,alignmentConstraint:void 0,relativePlacementConstraint:void 0,ready:function(){},stop:function(){}}),F=function(){function o(h){c(this,o),this.options=y({},_,h)}return I(o,[{key:"run",value:function(){var k=this,n=this.options,{cy:P,eles:j}=n,M=[],q=void 0,Y=void 0,x=[],H=void 0,Z=[];if(n.fixedNodeConstraint&&(!Array.isArray(n.fixedNodeConstraint)||n.fixedNodeConstraint.length==0))n.fixedNodeConstraint=void 0;if(n.alignmentConstraint){if(n.alignmentConstraint.vertical&&(!Array.isArray(n.alignmentConstraint.vertical)||n.alignmentConstraint.vertical.length==0))n.alignmentConstraint.vertical=void 0;if(n.alignmentConstraint.horizontal&&(!Array.isArray(n.alignmentConstraint.horizontal)||n.alignmentConstraint.horizontal.length==0))n.alignmentConstraint.horizontal=void 0}if(n.relativePlacementConstraint&&(!Array.isArray(n.relativePlacementConstraint)||n.relativePlacementConstraint.length==0))n.relativePlacementConstraint=void 0;var Q=n.fixedNodeConstraint||n.alignmentConstraint||n.relativePlacementConstraint;if(Q)n.tile=!1,n.packComponents=!1;var se=void 0,re=!1;if(P.layoutUtilities&&n.packComponents){if(se=P.layoutUtilities("get"),!se)se=P.layoutUtilities();re=!0}if(j.nodes().length>0)if(!re){var ue=n.eles.boundingBox();if(Z.push({x:ue.x1+ue.w/2,y:ue.y1+ue.h/2}),n.randomize){var Le=u(n);M.push(Le)}if(n.quality=="default"||n.quality=="proof")x.push(r(n,M[0])),d.relocateComponent(Z[0],x[0],n);else d.relocateComponent(Z[0],M[0],n)}else{var $e=d.getTopMostNodes(n.eles.nodes());if(H=d.connectComponents(P,n.eles,$e),H.forEach(function(K){var z=K.boundingBox();Z.push({x:z.x1+z.w/2,y:z.y1+z.h/2})}),n.randomize)H.forEach(function(K){n.eles=K,M.push(u(n))});if(n.quality=="default"||n.quality=="proof"){var de=P.collection();if(n.tile){var W=new Map,oe=[],Ne=[],ke=0,De={nodeIndexes:W,xCoords:oe,yCoords:Ne},xe=[];if(H.forEach(function(K,z){if(K.edges().length==0)K.nodes().forEach(function(pe,le){if(de.merge(K.nodes()[le]),!pe.isParent())De.nodeIndexes.set(K.nodes()[le].id(),ke++),De.xCoords.push(K.nodes()[0].position().x),De.yCoords.push(K.nodes()[0].position().y)}),xe.push(z)}),de.length>1){var J=de.boundingBox();Z.push({x:J.x1+J.w/2,y:J.y1+J.h/2}),H.push(de),M.push(De);for(var Ae=xe.length-1;Ae>=0;Ae--)H.splice(xe[Ae],1),M.splice(xe[Ae],1),Z.splice(xe[Ae],1)}}H.forEach(function(K,z){n.eles=K,x.push(r(n,M[z])),d.relocateComponent(Z[z],x[z],n)})}else H.forEach(function(K,z){d.relocateComponent(Z[z],M[z],n)});var ie=new Set;if(H.length>1){var ve=[],Me=j.filter(function(K){return K.css("display")=="none"});H.forEach(function(K,z){var pe=void 0;if(n.quality=="draft")pe=M[z].nodeIndexes;if(K.nodes().not(Me).length>0){var le={};le.edges=[],le.nodes=[];var me=void 0;if(K.nodes().not(Me).forEach(function(fe){if(n.quality=="draft")if(!fe.isParent())me=pe.get(fe.id()),le.nodes.push({x:M[z].xCoords[me]-fe.boundingbox().w/2,y:M[z].yCoords[me]-fe.boundingbox().h/2,width:fe.boundingbox().w,height:fe.boundingbox().h});else{var he=d.calcBoundingBox(fe,M[z].xCoords,M[z].yCoords,pe);le.nodes.push({x:he.topLeftX,y:he.topLeftY,width:he.width,height:he.height})}else if(x[z][fe.id()])le.nodes.push({x:x[z][fe.id()].getLeft(),y:x[z][fe.id()].getTop(),width:x[z][fe.id()].getWidth(),height:x[z][fe.id()].getHeight()})}),K.edges().forEach(function(fe){var he=fe.source(),Ee=fe.target();if(he.css("display")!="none"&&Ee.css("display")!="none"){if(n.quality=="draft"){var Be=pe.get(he.id()),et=pe.get(Ee.id()),Pe=[],Ye=[];if(he.isParent()){var We=d.calcBoundingBox(he,M[z].xCoords,M[z].yCoords,pe);Pe.push(We.topLeftX+We.width/2),Pe.push(We.topLeftY+We.height/2)}else Pe.push(M[z].xCoords[Be]),Pe.push(M[z].yCoords[Be]);if(Ee.isParent()){var Je=d.calcBoundingBox(Ee,M[z].xCoords,M[z].yCoords,pe);Ye.push(Je.topLeftX+Je.width/2),Ye.push(Je.topLeftY+Je.height/2)}else Ye.push(M[z].xCoords[et]),Ye.push(M[z].yCoords[et]);le.edges.push({startX:Pe[0],startY:Pe[1],endX:Ye[0],endY:Ye[1]})}else if(x[z][he.id()]&&x[z][Ee.id()])le.edges.push({startX:x[z][he.id()].getCenterX(),startY:x[z][he.id()].getCenterY(),endX:x[z][Ee.id()].getCenterX(),endY:x[z][Ee.id()].getCenterY()})}}),le.nodes.length>0)ve.push(le),ie.add(z)}});var Ge=se.packComponents(ve,n.randomize).shifts;if(n.quality=="draft")M.forEach(function(K,z){var pe=K.xCoords.map(function(me){return me+Ge[z].dx}),le=K.yCoords.map(function(me){return me+Ge[z].dy});K.xCoords=pe,K.yCoords=le});else{var Ke=0;ie.forEach(function(K){Object.keys(x[K]).forEach(function(z){var pe=x[K][z];pe.setCenter(pe.getCenterX()+Ge[Ke].dx,pe.getCenterY()+Ge[Ke].dy)}),Ke++})}}}var je=function(z,pe){if(n.quality=="default"||n.quality=="proof"){if(typeof z==="number")z=pe;var le=void 0,me=void 0,fe=z.data("id");if(x.forEach(function(Ee){if(fe in Ee)le={x:Ee[fe].getRect().getCenterX(),y:Ee[fe].getRect().getCenterY()},me=Ee[fe]}),n.nodeDimensionsIncludeLabels){if(me.labelWidth){if(me.labelPosHorizontal=="left")le.x+=me.labelWidth/2;else if(me.labelPosHorizontal=="right")le.x-=me.labelWidth/2}if(me.labelHeight){if(me.labelPosVertical=="top")le.y+=me.labelHeight/2;else if(me.labelPosVertical=="bottom")le.y-=me.labelHeight/2}}if(le==null)le={x:z.position("x"),y:z.position("y")};return{x:le.x,y:le.y}}else{var he=void 0;if(M.forEach(function(Ee){var Be=Ee.nodeIndexes.get(z.id());if(Be!=null)he={x:Ee.xCoords[Be],y:Ee.yCoords[Be]}}),he==null)he={x:z.position("x"),y:z.position("y")};return{x:he.x,y:he.y}}};if(n.quality=="default"||n.quality=="proof"||n.randomize){var at=d.calcParentsWithoutChildren(P,j),qe=j.filter(function(K){return K.css("display")=="none"});if(n.eles=j.not(qe),j.nodes().not(":parent").not(qe).layoutPositions(k,n,je),at.length>0)at.forEach(function(K){K.position(je(K))})}else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.")}}]),o}();N.exports=F},657:(N,B,v)=>{var I=v(548),c=v(140).layoutBase.Matrix,y=v(140).layoutBase.SVD,d=function(u){var{cy:g,eles:r}=u,_=r.nodes(),F=r.nodes(":parent"),o=new Map,h=new Map,k=new Map,n=[],P=[],j=[],M=[],q=[],Y=[],x=[],H=[],Z=void 0,Q=void 0,se=1e8,re=0.000000001,{piTol:ue,samplingType:Le,nodeSeparation:$e}=u,de=void 0,W=function(){var ee=0,te=0,ne=!1;while(te<de){ee=Math.floor(Math.random()*Q),ne=!1;for(var ae=0;ae<te;ae++)if(M[ae]==ee){ne=!0;break}if(!ne)M[te]=ee,te++;else continue}},oe=function(ee,te,ne){var ae=[],we=0,ge=0,ce=0,Ce=void 0,be=[],Fe=0,_e=1;for(var Ue=0;Ue<Q;Ue++)be[Ue]=se;ae[ge]=ee,be[ee]=0;while(ge>=we){ce=ae[we++];var Xe=n[ce];for(var He=0;He<Xe.length;He++)if(Ce=h.get(Xe[He]),be[Ce]==se)be[Ce]=be[ce]+1,ae[++ge]=Ce;Y[ce][te]=be[ce]*$e}if(ne){for(var Oe=0;Oe<Q;Oe++)if(Y[Oe][te]<q[Oe])q[Oe]=Y[Oe][te];for(var tt=0;tt<Q;tt++)if(q[tt]>Fe)Fe=q[tt],_e=tt}return _e},Ne=function(ee){var te=void 0;if(!ee){W();for(var ne=0;ne<de;ne++)oe(M[ne],ne,ee,!1)}else{te=Math.floor(Math.random()*Q),Z=te;for(var ae=0;ae<Q;ae++)q[ae]=se;for(var we=0;we<de;we++)M[we]=te,te=oe(te,we,ee)}for(var ge=0;ge<Q;ge++)for(var ce=0;ce<de;ce++)Y[ge][ce]*=Y[ge][ce];for(var Ce=0;Ce<de;Ce++)x[Ce]=[];for(var be=0;be<de;be++)for(var Fe=0;Fe<de;Fe++)x[be][Fe]=Y[M[Fe]][be]},ke=function(){var ee=y.svd(x),{S:te,U:ne,V:ae}=ee,we=te[0]*te[0]*te[0],ge=[];for(var ce=0;ce<de;ce++){ge[ce]=[];for(var Ce=0;Ce<de;Ce++)if(ge[ce][Ce]=0,ce==Ce)ge[ce][Ce]=te[ce]/(te[ce]*te[ce]+we/(te[ce]*te[ce]))}H=c.multMat(c.multMat(ae,ge),c.transpose(ne))},De=function(){var ee=void 0,te=void 0,ne=[],ae=[],we=[],ge=[];for(var ce=0;ce<Q;ce++)ne[ce]=Math.random(),ae[ce]=Math.random();ne=c.normalize(ne),ae=c.normalize(ae);var Ce=0,be=re,Fe=re,_e=void 0;while(!0){Ce++;for(var Ue=0;Ue<Q;Ue++)we[Ue]=ne[Ue];if(ne=c.multGamma(c.multL(c.multGamma(we),Y,H)),ee=c.dotProduct(we,ne),ne=c.normalize(ne),be=c.dotProduct(we,ne),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Xe=0;Xe<Q;Xe++)we[Xe]=ne[Xe];Ce=0,Fe=re;while(!0){Ce++;for(var He=0;He<Q;He++)ge[He]=ae[He];if(ge=c.minusOp(ge,c.multCons(we,c.dotProduct(we,ge))),ae=c.multGamma(c.multL(c.multGamma(ge),Y,H)),te=c.dotProduct(ge,ae),ae=c.normalize(ae),be=c.dotProduct(ge,ae),_e=Math.abs(be/Fe),_e<=1+ue&&_e>=1)break;Fe=be}for(var Oe=0;Oe<Q;Oe++)ge[Oe]=ae[Oe];P=c.multCons(we,Math.sqrt(Math.abs(ee))),j=c.multCons(ge,Math.sqrt(Math.abs(te)))};I.connectComponents(g,r,I.getTopMostNodes(_),o),F.forEach(function(ye){I.connectComponents(g,r,I.getTopMostNodes(ye.descendants().intersection(r)),o)});var xe=0;for(var J=0;J<_.length;J++)if(!_[J].isParent())h.set(_[J].id(),xe++);var Ae=!0,ie=!1,ve=void 0;try{for(var Me=o.keys()[Symbol.iterator](),Ge;!(Ae=(Ge=Me.next()).done);Ae=!0){var Ke=Ge.value;h.set(Ke,xe++)}}catch(ye){ie=!0,ve=ye}finally{try{if(!Ae&&Me.return)Me.return()}finally{if(ie)throw ve}}for(var je=0;je<h.size;je++)n[je]=[];F.forEach(function(ye){var ee=ye.children().intersection(r);while(ee.nodes(":childless").length==0)ee=ee.nodes()[0].children().intersection(r);var te=0,ne=ee.nodes(":childless")[0].connectedEdges().length;ee.nodes(":childless").forEach(function(ae,we){if(ae.connectedEdges().length<ne)ne=ae.connectedEdges().length,te=we}),k.set(ye.id(),ee.nodes(":childless")[te].id())}),_.forEach(function(ye){var ee=void 0;if(ye.isParent())ee=h.get(k.get(ye.id()));else ee=h.get(ye.id());ye.neighborhood().nodes().forEach(function(te){if(r.intersection(ye.edgesWith(te)).length>0)if(te.isParent())n[ee].push(k.get(te.id()));else n[ee].push(te.id())})});var at=function(ee){var te=h.get(ee),ne=void 0;o.get(ee).forEach(function(ae){if(g.getElementById(ae).isParent())ne=k.get(ae);else ne=ae;n[te].push(ne),n[h.get(ne)].push(ee)})},qe=!0,K=!1,z=void 0;try{for(var pe=o.keys()[Symbol.iterator](),le;!(qe=(le=pe.next()).done);qe=!0){var me=le.value;at(me)}}catch(ye){K=!0,z=ye}finally{try{if(!qe&&pe.return)pe.return()}finally{if(K)throw z}}Q=h.size;var fe=void 0;if(Q>2){de=Q<u.sampleSize?Q:u.sampleSize;for(var he=0;he<Q;he++)Y[he]=[];for(var Ee=0;Ee<de;Ee++)H[Ee]=[];if(u.quality=="draft"||u.step=="all")Ne(Le),ke(),De(),fe={nodeIndexes:h,xCoords:P,yCoords:j};else h.forEach(function(ye,ee){P.push(g.getElementById(ee).position("x")),j.push(g.getElementById(ee).position("y"))}),fe={nodeIndexes:h,xCoords:P,yCoords:j};return fe}else{var Be=h.keys(),et=g.getElementById(Be.next().value),Pe=et.position(),Ye=et.outerWidth();if(P.push(Pe.x),j.push(Pe.y),Q==2){var We=g.getElementById(Be.next().value),Je=We.outerWidth();P.push(Pe.x+Ye/2+Je/2+u.idealEdgeLength),j.push(Pe.y)}return fe={nodeIndexes:h,xCoords:P,yCoords:j},fe}};N.exports={spectralLayout:d}},579:(N,B,v)=>{var I=v(212),c=function(d){if(!d)return;d("layout","fcose",I)};if(typeof cytoscape<"u")c(cytoscape);N.exports=c},140:(N)=>{N.exports=t}},s={};function w(N){var B=s[N];if(B!==void 0)return B.exports;var v=s[N]={exports:{}};return i[N](v,v.exports,w),v.exports}var m=w(579);return m})()})});var xt=Se(ft(),1);var gt={L:"left",R:"right",T:"top",B:"bottom"},vt={L:e((t)=>`${t},${t/2} 0,${t} 0,0`,"L"),R:e((t)=>`0,${t/2} ${t},0 ${t},${t}`,"R"),T:e((t)=>`0,0 ${t},0 ${t/2},${t}`,"T"),B:e((t)=>`${t/2},0 ${t},${t} 0,${t}`,"B")},ot={L:e((t,i)=>t-i+2,"L"),R:e((t,i)=>t-2,"R"),T:e((t,i)=>t-i+2,"T"),B:e((t,i)=>t-2,"B")},kt=e(function(t){if(Re(t))return t==="L"?"R":"L";else return t==="T"?"B":"T"},"getOppositeArchitectureDirection"),pt=e(function(t){let i=t;return i==="L"||i==="R"||i==="T"||i==="B"},"isArchitectureDirection"),Re=e(function(t){let i=t;return i==="L"||i==="R"},"isArchitectureDirectionX"),Ve=e(function(t){let i=t;return i==="T"||i==="B"},"isArchitectureDirectionY"),dt=e(function(t,i){let s=Re(t)&&Ve(i),w=Ve(t)&&Re(i);return s||w},"isArchitectureDirectionXY"),Dt=e(function(t){let i=t[0],s=t[1],w=Re(i)&&Ve(s),m=Ve(i)&&Re(s);return w||m},"isArchitecturePairXY"),Rt=e(function(t){return t!=="LL"&&t!=="RR"&&t!=="TT"&&t!=="BB"},"isValidArchitectureDirectionPair"),lt=e(function(t,i){let s=`${t}${i}`;return Rt(s)?s:void 0},"getArchitectureDirectionPair"),Mt=e(function([t,i],s){let w=s[0],m=s[1];if(Re(w))if(Ve(m))return[t+(w==="L"?-1:1),i+(m==="T"?1:-1)];else return[t+(w==="L"?-1:1),i];else if(Re(m))return[t+(m==="L"?1:-1),i+(w==="T"?1:-1)];else return[t,i+(w==="T"?1:-1)]},"shiftPositionByArchitectureDirectionPair"),Ft=e(function(t){if(t==="LT"||t==="TL")return[1,1];else if(t==="BL"||t==="LB")return[1,-1];else if(t==="BR"||t==="RB")return[-1,-1];else return[-1,1]},"getArchitectureDirectionXYFactors"),$t=e(function(t,i){if(dt(t,i))return"bend";else if(Re(t))return"horizontal";return"vertical"},"getArchitectureDirectionAlignment"),Pt=e(function(t){return t.type==="service"},"isArchitectureService"),Ot=e(function(t){return t.type==="junction"},"isArchitectureJunction"),mt=e((t,i)=>{let[s,w]=[t,i].sort();return`${JSON.stringify(s)}-${JSON.stringify(w)}`},"architectureGroupAlignmentKey"),yt=e((t)=>t.data(),"edgeData"),Qe=e((t)=>t.data(),"nodeData"),Gt=D.architecture,Et=class{constructor(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.elements=new Map,this.diagramId="",this.setAccTitle=S,this.getAccTitle=E,this.setDiagramTitle=R,this.getDiagramTitle=L,this.getAccDescription=A,this.setAccDescription=T,this.clear()}static{e(this,"ArchitectureDB")}setDiagramId(t){this.diagramId=t}getDiagramId(){return this.diagramId}clear(){this.nodes=new Map,this.groups=new Map,this.edges=[],this.layoutHints=[],this.registeredIds=new Map,this.dataStructures=void 0,this.elements=new Map,this.diagramId="",C()}addService({id:t,icon:i,in:s,title:w,iconText:m}){if(this.registeredIds.has(t))throw Error(`The service id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The service [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if(this.registeredIds.get(s)==="node")throw Error(`The service [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"service",icon:i,iconText:m,title:w,edges:[],in:s})}getServices(){return[...this.nodes.values()].filter(Pt)}addJunction({id:t,in:i}){if(this.registeredIds.has(t))throw Error(`The junction id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(i!==void 0){if(t===i)throw Error(`The junction [${t}] cannot be placed within itself`);if(!this.registeredIds.has(i))throw Error(`The junction [${t}]'s parent does not exist. Please make sure the parent is created before this junction`);if(this.registeredIds.get(i)==="node")throw Error(`The junction [${t}]'s parent is not a group`)}this.registeredIds.set(t,"node"),this.nodes.set(t,{id:t,type:"junction",edges:[],in:i})}getJunctions(){return[...this.nodes.values()].filter(Ot)}getNodes(){return[...this.nodes.values()]}getNode(t){return this.nodes.get(t)??null}addGroup({id:t,icon:i,in:s,title:w}){if(this.registeredIds.has(t))throw Error(`The group id [${t}] is already in use by another ${this.registeredIds.get(t)}`);if(s!==void 0){if(t===s)throw Error(`The group [${t}] cannot be placed within itself`);if(!this.registeredIds.has(s))throw Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if(this.registeredIds.get(s)==="node")throw Error(`The group [${t}]'s parent is not a group`)}this.registeredIds.set(t,"group"),this.groups.set(t,{id:t,icon:i,title:w,in:s})}getGroups(){return[...this.groups.values()]}addEdge({lhsId:t,rhsId:i,lhsDir:s,rhsDir:w,lhsInto:m,rhsInto:N,lhsGroup:B,rhsGroup:v,title:I}){if(!pt(s))throw Error(`Invalid direction given for left hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(s)}`);if(!pt(w))throw Error(`Invalid direction given for right hand side of edge ${t}--${i}. Expected (L,R,T,B) got ${String(w)}`);if(!this.nodes.has(t)&&!this.groups.has(t))throw Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(!this.nodes.has(i)&&!this.groups.has(i))throw Error(`The right-hand id [${i}] does not yet exist. Please create the service/group before declaring an edge to it.`);let c=this.nodes.get(t).in,y=this.nodes.get(i).in;if(B&&c&&y&&c==y)throw Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(v&&c&&y&&c==y)throw Error(`The right-hand id [${i}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);let d={lhsId:t,lhsDir:s,lhsInto:m,lhsGroup:B,rhsId:i,rhsDir:w,rhsInto:N,rhsGroup:v,title:I};this.edges.push(d);let f=this.nodes.get(t),u=this.nodes.get(i);if(f&&u)f.edges.push(this.edges[this.edges.length-1]),u.edges.push(this.edges[this.edges.length-1])}getEdges(){return this.edges}addLayoutHint(t){if(t.members.length<2)throw Error(`An align directive requires at least two members; got ${t.members.length}`);let i=new Set;t.members.forEach((s)=>{if(this.registeredIds.get(s)!=="node")throw Error(`align ${t.direction} references [${s}], which is not a service or junction`);if(i.has(s))throw Error(`align ${t.direction} lists [${s}] more than once`);i.add(s)}),this.layoutHints.push(t)}getLayoutHints(){return this.layoutHints}getDataStructures(){if(this.dataStructures===void 0){let t=new Map,i=new Map;for(let[B,v]of this.nodes.entries()){let I=new Map;for(let c of v.edges){let y=this.getNode(c.lhsId)?.in,d=this.getNode(c.rhsId)?.in;if(y&&d&&y!==d){let f=$t(c.lhsDir,c.rhsDir);if(f!=="bend")t.set(mt(y,d),f)}if(c.lhsId===B){let f=lt(c.lhsDir,c.rhsDir);if(f)I.set(f,c.rhsId)}else{let f=lt(c.rhsDir,c.lhsDir);if(f)I.set(f,c.lhsId)}}i.set(B,I)}let s=new Set,w=new Set(i.keys()),m=e((B)=>{let v=new Map([[B,[0,0]]]),I=[B];while(I.length>0){let c=I.shift();if(c){s.add(c),w.delete(c);let y=i.get(c);if(!y)throw Error(`BFS error: adjacency list for id ${c} not found. Please report this as a bug.`);let d=v.get(c);if(!d)throw Error(`BFS error: position for id ${c} not found in spatial map. Please report this as a bug.`);let[f,u]=d;y.forEach((g,r)=>{if(!s.has(g))v.set(g,Mt([f,u],r)),I.push(g)})}}return v},"BFS"),N=[];while(w.size>0){let B=w.values().next().value;N.push(m(B))}this.dataStructures={adjList:i,spatialMaps:N,groupAlignments:t}}return this.dataStructures}setElementForId(t,i){this.elements.set(t,i)}getElementById(t){return this.elements.get(t)}getConfig(){return U({...Gt,...b().architecture})}getConfigField(t){return this.getConfig()[t]}},zt=e((t,i)=>{G(t,i),t.groups.map((s)=>i.addGroup(s)),t.services.map((s)=>i.addService({...s,type:"service"})),t.junctions.map((s)=>i.addJunction({...s,type:"junction"})),t.edges.map((s)=>i.addEdge(s)),t.alignments?.map((s)=>i.addLayoutHint({direction:s.direction,members:[...s.members]}))},"populateDb"),wt={parser:{yy:void 0},parse:e(async(t)=>{let i=await X("architecture",t);a.debug(i);let s=wt.parser?.yy;if(!(s instanceof Et))throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");zt(i,s)},"parse")},Bt=e((t)=>`
|
|
2
|
-
.edge {
|
|
3
|
-
stroke-width: ${t.archEdgeWidth};
|
|
4
|
-
stroke: ${t.archEdgeColor};
|
|
5
|
-
fill: none;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
.arrow {
|
|
9
|
-
fill: ${t.archEdgeArrowColor};
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
.node-bkg {
|
|
13
|
-
fill: none;
|
|
14
|
-
stroke: ${t.archGroupBorderColor};
|
|
15
|
-
stroke-width: ${t.archGroupBorderWidth};
|
|
16
|
-
stroke-dasharray: 8;
|
|
17
|
-
}
|
|
18
|
-
.node-icon-text {
|
|
19
|
-
display: flex;
|
|
20
|
-
align-items: center;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.node-icon-text > div {
|
|
24
|
-
color: #fff;
|
|
25
|
-
margin: 1px;
|
|
26
|
-
height: fit-content;
|
|
27
|
-
text-align: center;
|
|
28
|
-
overflow: hidden;
|
|
29
|
-
display: -webkit-box;
|
|
30
|
-
-webkit-box-orient: vertical;
|
|
31
|
-
}
|
|
32
|
-
`,"getStyles"),_t=Bt;function ct(t,i){if(t===0)return i();let s=Math.random,w=t>>>0;Math.random=function(){w=w+1831565813>>>0;let m=w;return m=Math.imul(m^m>>>15,m|1),m^=m+Math.imul(m^m>>>7,m|61),((m^m>>>14)>>>0)/4294967296};try{return i()}finally{Math.random=s}}e(ct,"withSeededRandom");var Ze=e((t)=>`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${t}</g>`,"wrapIcon"),it={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:Ze('<path id="b" data-name="4" d="m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="c" data-name="3" d="m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path id="d" data-name="2" d="m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse id="e" data-name="1" cx="40" cy="22.14" rx="20" ry="7.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="20" y1="57.86" x2="20" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="60" y1="57.86" x2="60" y2="22.14" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},server:{body:Ze('<rect x="17.5" y="17.5" width="45" height="45" rx="2" ry="2" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="32.5" x2="62.5" y2="32.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="47.5" x2="62.5" y2="47.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><g><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: #fff; stroke-width: 0px;"/><path d="m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="25" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="40" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g><g><circle cx="32.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="27.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/><circle cx="22.5" cy="55" r=".75" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10;"/></g>')},disk:{body:Ze('<rect x="20" y="15" width="40" height="50" rx="1" ry="1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="19.17" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="24" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="56" cy="60.83" rx=".8" ry=".83" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="14" ry="14.58" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><ellipse cx="40" cy="33.75" rx="4" ry="4.17" style="fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z" style="fill: #fff; stroke-width: 0px;"/>')},internet:{body:Ze('<circle cx="40" cy="40" r="22.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="40" y1="17.5" x2="40" y2="62.5" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="17.5" y1="40" x2="62.5" y2="40" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><path d="m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="30.1" x2="60.25" y2="30.1" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/><line x1="19.75" y1="49.9" x2="60.25" y2="49.9" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},cloud:{body:Ze('<path d="m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;"/>')},unknown:Fi,blank:{body:Ze("")}}},Yt=e(async function(t,i,s,w){let m=s.getConfigField("padding"),N=s.getConfigField("iconSize"),B=N/2,v=N/6,I=v/2;await Promise.all(i.edges().map(async(c)=>{let{source:y,sourceDir:d,sourceArrow:f,sourceGroup:u,target:g,targetDir:r,targetArrow:_,targetGroup:F,label:o}=yt(c),{x:h,y:k}=c[0].sourceEndpoint(),{x:n,y:P}=c[0].midpoint(),{x:j,y:M}=c[0].targetEndpoint(),q=m+4;if(u)if(Re(d))h+=d==="L"?-q:q;else k+=d==="T"?-q:q+18;if(F)if(Re(r))j+=r==="L"?-q:q;else M+=r==="T"?-q:q+18;if(!u&&s.getNode(y)?.type==="junction")if(Re(d))h+=d==="L"?B:-B;else k+=d==="T"?B:-B;if(!F&&s.getNode(g)?.type==="junction")if(Re(r))j+=r==="L"?B:-B;else M+=r==="T"?B:-B;if(c[0]._private.rscratch){let Y=t.insert("g");if(Y.insert("path").attr("d",`M ${h},${k} L ${n},${P} L${j},${M} `).attr("class","edge").attr("id",`${w}-${ze(y,g,{prefix:"L"})}`),f){let x=Re(d)?ot[d](h,v):h-I,H=Ve(d)?ot[d](k,v):k-I;Y.insert("polygon").attr("points",vt[d](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(_){let x=Re(r)?ot[r](j,v):j-I,H=Ve(r)?ot[r](M,v):M-I;Y.insert("polygon").attr("points",vt[r](v)).attr("transform",`translate(${x},${H})`).attr("class","arrow")}if(o){let x=!dt(d,r)?Re(d)?"X":"Y":"XY",H=0;if(x==="X")H=Math.abs(h-j);else if(x==="Y")H=Math.abs(k-M)/1.5;else H=Math.abs(h-j)/2;let Z=Y.append("g");if(await Ie(Z,o,{useHtmlLabels:!1,width:H,classes:"architecture-service-label"},l()),Z.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),x==="X")Z.attr("transform","translate("+n+", "+P+")");else if(x==="Y")Z.attr("transform","translate("+n+", "+P+") rotate(-90)");else if(x==="XY"){let Q=lt(d,r);if(Q&&Dt(Q)){let se=Z.node().getBoundingClientRect(),[re,ue]=Ft(Q);Z.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*re*ue*45})`);let Le=Z.node().getBoundingClientRect();Z.attr("transform",`
|
|
33
|
-
translate(${n}, ${P-se.height/2})
|
|
34
|
-
translate(${re*Le.width/2}, ${ue*Le.height/2})
|
|
35
|
-
rotate(${-1*re*ue*45}, 0, ${se.height/2})
|
|
36
|
-
`)}}}}}))},"drawEdges"),Ut=e(async function(t,i,s,w){let N=s.getConfigField("padding")*0.75,B=s.getConfigField("fontSize"),I=s.getConfigField("iconSize")/2;await Promise.all(i.nodes().map(async(c)=>{let y=Qe(c);if(y.type==="group"){let{h:d,w:f,x1:u,y1:g}=c.boundingBox(),r=t.append("rect");r.attr("id",`${w}-group-${y.id}`).attr("x",u+I).attr("y",g+I).attr("width",f).attr("height",d).attr("class","node-bkg");let _=t.append("g"),F=u,o=g;if(y.icon){let h=_.append("g");h.html(`<g>${await nt(y.icon,{height:N,width:N,fallbackPrefix:it.prefix})}</g>`),h.attr("transform","translate("+(F+I+1)+", "+(o+I+1)+")"),F+=N,o+=B/2-1-2}if(y.label){let h=_.append("g");await Ie(h,y.label,{useHtmlLabels:!1,width:f,classes:"architecture-service-label"},l()),h.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),h.attr("transform","translate("+(F+I+4)+", "+(o+I+2)+")")}s.setElementForId(y.id,r)}}))},"drawGroups"),Ht=e(async function(t,i,s,w){let m=l();for(let N of s){let B=i.append("g"),v=t.getConfigField("iconSize");if(N.title){let d=B.append("g");await Ie(d,N.title,{useHtmlLabels:!1,width:v*1.5,classes:"architecture-service-label"},m),d.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),d.attr("transform","translate("+v/2+", "+v+")")}let I=B.append("g");if(N.icon)I.html(`<g>${await nt(N.icon,{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);else if(N.iconText){I.html(`<g>${await nt("blank",{height:v,width:v,fallbackPrefix:it.prefix})}</g>`);let u=I.append("g").append("foreignObject").attr("width",v).attr("height",v).append("div").attr("class","node-icon-text").attr("style",`height: ${v}px;`).append("div").html(O(N.iconText,m)),g=parseInt(window.getComputedStyle(u.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16;u.attr("style",`-webkit-line-clamp: ${Math.floor((v-2)/g)};`)}else I.append("path").attr("class","node-bkg").attr("id",`${w}-node-${N.id}`).attr("d",`M0,${v} V5 Q0,0 5,0 H${v-5} Q${v},0 ${v},5 V${v} Z`);B.attr("id",`${w}-service-${N.id}`).attr("class","architecture-service");let{width:c,height:y}=B.node().getBBox();N.width=c,N.height=y,t.setElementForId(N.id,B)}return 0},"drawServices"),Vt=e(function(t,i,s,w){s.forEach((m)=>{let N=i.append("g"),B=t.getConfigField("iconSize");N.append("g").append("rect").attr("id",`${w}-node-${m.id}`).attr("fill-opacity","0").attr("width",B).attr("height",B),N.attr("class","architecture-junction");let{width:I,height:c}=N._groups[0][0].getBBox();N.width=I,N.height=c,t.setElementForId(m.id,N)})},"drawJunctions");Dn([{name:it.prefix,icons:it}]);ut.use(xt.default);function Tt(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"service",id:w.id,icon:w.icon,label:w.title,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-service"})})}e(Tt,"addServices");function At(t,i,s){t.forEach((w)=>{i.add({group:"nodes",data:{type:"junction",id:w.id,parent:w.in,width:s.getConfigField("iconSize"),height:s.getConfigField("iconSize")},classes:"node-junction"})})}e(At,"addJunctions");function Lt(t,i){i.nodes().map((s)=>{let w=Qe(s);if(w.type==="group")return;w.x=s.position().x,w.y=s.position().y,t.getElementById(w.id).attr("transform","translate("+(w.x||0)+","+(w.y||0)+")")})}e(Lt,"positionNodes");function Ct(t,i){t.forEach((s)=>{i.add({group:"nodes",data:{type:"group",id:s.id,icon:s.icon,label:s.title,parent:s.in},classes:"node-group"})})}e(Ct,"addGroups");function It(t,i){t.forEach((s)=>{let{lhsId:w,rhsId:m,lhsInto:N,lhsGroup:B,rhsInto:v,lhsDir:I,rhsDir:c,rhsGroup:y,title:d}=s,f=dt(s.lhsDir,s.rhsDir)?"segments":"straight",u={id:`${w}-${m}`,label:d,source:w,sourceDir:I,sourceArrow:N,sourceGroup:B,sourceEndpoint:I==="L"?"0 50%":I==="R"?"100% 50%":I==="T"?"50% 0":"50% 100%",target:m,targetDir:c,targetArrow:v,targetGroup:y,targetEndpoint:c==="L"?"0 50%":c==="R"?"100% 50%":c==="T"?"50% 0":"50% 100%"};i.add({group:"edges",data:u,classes:f})})}e(It,"addEdges");function bt(t,i,s,w=[]){let m=e((f,u)=>{let g=new Map;for(let[r,_]of f.entries()){let F=`${r}`,o=0,h=[..._.entries()];if(h.length===1){g.set(F,h[0][1]);continue}for(let k=0;k<h.length-1;k++)for(let n=k+1;n<h.length;n++){let[P,j]=h[k],[M,q]=h[n];if(s.get(mt(P,M))===u)g.set(F,[...g.get(F)??[],...j,...q]);else if(P==="default"||M==="default")g.set(F,[...g.get(F)??[],...j,...q]);else{let x=`${F}-${o++}`;g.set(x,j);let H=`${F}-${o++}`;g.set(H,q)}}}return g},"flattenAlignments"),N=i.map((f)=>{let u=new Map,g=new Map;return f.forEach(([r,_],F)=>{let o=t.getNode(F)?.in??"default",h=u.get(_)??new Map;if(!u.has(_))u.set(_,h);let k=g.get(r)??new Map;if(!g.has(r))g.set(r,k);for(let n of[h,k]){let P=n.get(o)??[];if(!n.has(o))n.set(o,P);P.push(F)}}),{horiz:[...m(u,"horizontal").values()].filter((r)=>r.length>1),vert:[...m(g,"vertical").values()].filter((r)=>r.length>1)}}),[B,v]=N.reduce(([f,u],{horiz:g,vert:r})=>[[...f,...g],[...u,...r]],[[],[]]),I=new Set;w.forEach((f)=>f.members.forEach((u)=>I.add(u)));let c=e((f)=>f.filter((u)=>!u.some((g)=>I.has(g))),"dropOverlapping"),y=c(B),d=c(v);return w.forEach((f)=>{if(f.members.length<2)return;if(f.direction==="row")y.push([...f.members]);else d.push([...f.members])}),{horizontal:y,vertical:d}}e(bt,"getAlignments");function Nt(t,i,s=[]){let w=[],m=i.getConfigField("iconSize"),N=i.getConfigField("idealEdgeLengthMultiplier"),B=N*m,v=new Set;s.forEach((y)=>{for(let d=0;d<y.members.length-1;d++){let f=y.members[d],u=y.members[d+1];if(v.add(`${f}|${u}`),v.add(`${u}|${f}`),y.direction==="row")w.push({left:f,right:u,gap:B});else w.push({top:f,bottom:u,gap:B})}});let I=e((y)=>`${y[0]},${y[1]}`,"posToStr"),c=e((y)=>y.split(",").map((d)=>parseInt(d)),"strToPos");return t.forEach((y)=>{let d=new Map([...y.entries()].map(([r,_])=>[I(_),r])),f=[I([0,0])],u={},g={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};while(f.length>0){let r=f.shift();if(r){u[r]=1;let _=d.get(r);if(_){let F=c(r);Object.entries(g).forEach(([o,h])=>{let k=I([F[0]+h[0],F[1]+h[1]]),n=d.get(k);if(n&&!u[k]){if(f.push(k),v.has(`${_}|${n}`))return;w.push({[gt[o]]:n,[gt[kt(o)]]:_,gap:N*m})}})}}}}),w}e(Nt,"getRelativeConstraints");function St(t,i,s,w,m,{spatialMaps:N,groupAlignments:B}){return new Promise((v)=>{let I=p("body").append("div").attr("id","cy").attr("style","display:none"),c=ut({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge[label]",style:{label:"data(label)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[0.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":`${m.getConfigField("fontSize")}px`}},{selector:".node-service",style:{label:"data(label)",width:"data(width)",height:"data(height)"}},{selector:".node-junction",style:{width:"data(width)",height:"data(height)"}},{selector:".node-group",style:{padding:`${m.getConfigField("padding")}px`}}],layout:{name:"grid",boundingBox:{x1:0,x2:100,y1:0,y2:100}}});I.remove(),Ct(s,c),Tt(t,c,m),At(i,c,m),It(w,c);let y=m.getLayoutHints(),d=bt(m,N,B,y),f=Nt(N,m,y),u=m.getConfigField("iconSize"),g=m.getConfigField("idealEdgeLengthMultiplier")*u,r=0.5*u,_=m.getConfigField("edgeElasticity"),F=m.getConfigField("seed"),o=c.layout({name:"fcose",quality:"proof",randomize:m.getConfigField("randomize"),nodeSeparation:m.getConfigField("nodeSeparation"),numIter:m.getConfigField("numIter"),styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?g:r},edgeElasticity(h){let[k,n]=h.connectedNodes(),{parent:P}=Qe(k),{parent:j}=Qe(n);return P===j?_:0.001},alignmentConstraint:d,relativePlacementConstraint:f});o.one("layoutstop",()=>{function h(k,n,P,j){let M,q,{x:Y,y:x}=k,{x:H,y:Z}=n;q=(j-x+(Y-P)*(x-Z)/(Y-H))/Math.sqrt(1+Math.pow((x-Z)/(Y-H),2)),M=Math.sqrt(Math.pow(j-x,2)+Math.pow(P-Y,2)-Math.pow(q,2));let Q=Math.sqrt(Math.pow(H-Y,2)+Math.pow(Z-x,2));M=M/Q;let se=(H-Y)*(j-x)-(Z-x)*(P-Y);switch(!0){case se>=0:se=1;break;case se<0:se=-1;break}let re=(H-Y)*(P-Y)+(Z-x)*(j-x);switch(!0){case re>=0:re=1;break;case re<0:re=-1;break}return q=Math.abs(q)*se,M=M*re,{distances:q,weights:M}}e(h,"getSegmentWeights"),c.startBatch();for(let k of Object.values(c.edges()))if(k.data?.()){let{x:n,y:P}=k.source().position(),{x:j,y:M}=k.target().position();if(n!==j&&P!==M){let q=k.sourceEndpoint(),Y=k.targetEndpoint(),{sourceDir:x}=yt(k),[H,Z]=Ve(x)?[q.x,Y.y]:[Y.x,q.y],{weights:Q,distances:se}=h(q,Y,H,Z);k.style("segment-distances",se),k.style("segment-weights",Q)}}c.endBatch(),ct(F,()=>o.run())});try{ct(F,()=>o.run())}catch(h){if(h instanceof RangeError&&h.message.includes("Invalid array length"))throw Error("Architecture layout failed: a declared `align row|column` directive likely contradicts the edge directions, or two declared alignments overlap on a shared node. Check that the order of members in each `align` chain is consistent with the edges between them, and that no node appears in two `align` directives along the same axis.");throw h}c.ready((h)=>{a.info("Ready",h),v(c)})})}e(St,"layoutArchitecture");var Xt=e(async(t,i,s,w)=>{let m=w.db;m.setDiagramId(i);let N=m.getServices(),B=m.getJunctions(),v=m.getGroups(),I=m.getEdges(),c=m.getDataStructures(),y=V(i),d=y.append("g");d.attr("class","architecture-edges");let f=y.append("g");f.attr("class","architecture-services");let u=y.append("g");u.attr("class","architecture-groups"),await Ht(m,f,N,i),Vt(m,f,B,i);let g=await St(N,B,v,I,m,c);await Yt(d,g,m,i),await Ut(u,g,m,i),Lt(m,g),ht(void 0,y,m.getConfigField("padding"),m.getConfigField("useMaxWidth"))},"draw"),jt={draw:Xt},ar={parser:wt,get db(){return new Et},renderer:jt,styles:_t};export{ar as diagram};
|
package/web/chunk-wvfmmw1v.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{e}from"./chunk-1s53190z.js";import"./chunk-5vjhvw1m.js";import{Ai,Li}from"./chunk-femhej5w.js";import"./chunk-dg3p8db5.js";import"./chunk-tqr80b5w.js";import"./chunk-r7frwjqx.js";import"./chunk-989jq2h8.js";var r=e((t)=>`${Ai(t)}
|
|
2
|
-
.swimlane.cluster:not([data-color-id]) rect {
|
|
3
|
-
stroke: ${t.clusterBorder} !important;
|
|
4
|
-
}
|
|
5
|
-
[data-look="neo"].cluster rect {
|
|
6
|
-
filter: none;
|
|
7
|
-
}
|
|
8
|
-
`,"getStyles"),o=r,D=Li({styles:o});export{D as diagram};
|
package/web/chunk-x1jm4zsg.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{bi}from"./chunk-2cem4sv7.js";export{bi as createWardleyServices};
|
package/web/chunk-xmsb2g71.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{N,r,t,n,Ae,It,j,ve,Xi}from"./chunk-rddft5ce.js";function T(s){let a=N(Ae);a?.useTheme?.();let e=s.payload,[i,m]=r(!1);if(!e||e.state==="pending")return null;let h=e.questions.map((o)=>o.header).join(" · "),l=e.state==="answered",u=l?j:It,d=l?"text-success":"text-faint",f=l?"已回答":e.state==="dismissed"?"已忽略提问":"提问已取消",p=l?C(e):h;if(a){let{Collapsible:o,CollapsibleTrigger:y,CollapsibleContent:v,Chevron:b,cn:g}=a;return n(o,{open:i,onOpenChange:m,className:"w-full text-xs text-ink/90 animate-fade",children:[n(y,{className:a.style("chat.timelineRow","cursor-pointer select-none"),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:g("size-3.5",d)})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(b,{className:"size-3.5 shrink-0 text-faint opacity-0 transition-opacity group-hover/collapsible:opacity-100 group-data-[state=open]/collapsible:opacity-100"})]}),t(v,{children:t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})})]})}return n("div",{role:"status",className:"w-full animate-fade",children:[n("button",{type:"button","aria-expanded":i,className:"group -mx-2 flex w-[calc(100%+1rem)] cursor-pointer items-center gap-2 rounded-lg px-2 py-1 text-left text-[12.5px] text-faint transition-colors select-none hover:bg-raised/60 hover:text-dim",onClick:()=>m((o)=>!o),children:[t("span",{className:"flex size-4 shrink-0 items-center justify-center",children:t(u,{className:`size-3.5 shrink-0 ${d}`})}),t("span",{className:"shrink-0",children:f}),t("span",{className:"min-w-0 flex-1 truncate opacity-80",title:p,children:p}),t(ve,{className:`size-3.5 shrink-0 text-faint opacity-0 transition-[opacity,transform] group-hover:opacity-100 ${i?"rotate-180 opacity-100":""}`})]}),i&&t("div",{className:"mt-0.5 mb-1.5 ml-2 border-l border-line py-1 pl-[15px]",children:t(x,{question:e})})]})}function c(s){if(!s)return"未作答";let a=s.selected.map((e)=>Xi(e).title);if(s.other)a.push(`其他:${s.other}`);return a.length?a.join("、"):"未作答"}function C(s){if(s.questions.length===1)return`${s.questions[0]?.header??""} · ${c(s.answers?.[0])}`;return s.questions.map((a,e)=>`${a.header} → ${c(s.answers?.[e])}`).join(";")}function x(s){let a=s.question;return t("div",{className:"space-y-2 text-xs",children:a.questions.map((e,i)=>n("div",{className:"space-y-0.5",children:[n("div",{className:"text-dim",children:[t("span",{className:"font-medium text-ink/90",children:e.header})," · ",e.question]}),t("div",{className:"text-ink",children:c(a.answers?.[i])})]},e.header))})}export{T as QuestionCard};
|