@kim123rla/hcc-bdp-agent 0.5.34 → 0.5.35
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/dist/assets/{arc-C4CNvK-a.js → arc-g30SzNm-.js} +1 -1
- package/dist/assets/architectureDiagram-3BPJPVTR-7SkOcPIQ.js +36 -0
- package/dist/assets/{blockDiagram-GPEHLZMM-CqkST5pS.js → blockDiagram-GPEHLZMM-C_nXUxok.js} +2 -2
- package/dist/assets/{c4Diagram-AAUBKEIU-CFlRNcNO.js → c4Diagram-AAUBKEIU-DvXqOvs9.js} +2 -2
- package/dist/assets/channel-BZQVJnOc.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-CGXKUE3u.js → chunk-2J33WTMH-DZ8T1IZj.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-DIMDzUvG.js → chunk-4BX2VUAB-IBWLnx_7.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-CeT7Ubm7.js → chunk-55IACEB6-C0oDuSIh.js} +1 -1
- package/dist/assets/{chunk-727SXJPM-CROwjyXU.js → chunk-727SXJPM-cffiQJMy.js} +1 -1
- package/dist/assets/{chunk-AQP2D5EJ-BrkooBRL.js → chunk-AQP2D5EJ-C0Ak85hI.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-ult0zspw.js → chunk-FMBD7UC4-BRByys73.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-DXm-XggW.js → chunk-ND2GUHAM-5fVDn5XQ.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-COT862xs.js → chunk-QZHKN3VN-vdgakGO4.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-LOzuyI6Y.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-LOzuyI6Y.js +1 -0
- package/dist/assets/cose-bilkent-S5V4N54A-Dzd39tvB.js +1 -0
- package/dist/assets/dagre-BM42HDAG-DGivN3ww.js +4 -0
- package/dist/assets/dataResults-B1swefI5.js +1 -0
- package/dist/assets/diagram-2AECGRRQ-TExl3x2d.js +43 -0
- package/dist/assets/diagram-5GNKFQAL-CRYY7jqF.js +10 -0
- package/dist/assets/diagram-KO2AKTUF-B8mDcbvS.js +3 -0
- package/dist/assets/diagram-LMA3HP47-BMcqoxLc.js +24 -0
- package/dist/assets/diagram-OG6HWLK6-DFVaaje4.js +24 -0
- package/dist/assets/{erDiagram-TEJ5UH35-D9INTeuk.js → erDiagram-TEJ5UH35-7qA4kn-k.js} +2 -2
- package/dist/assets/{flowDiagram-I6XJVG4X-oGQJWpiS.js → flowDiagram-I6XJVG4X-XjYtOzxd.js} +2 -2
- package/dist/assets/ganttDiagram-6RSMTGT7-DdtYmRkr.js +292 -0
- package/dist/assets/gitGraphDiagram-PVQCEYII-C2_Cf7LG.js +106 -0
- package/dist/assets/infoDiagram-5YYISTIA-C6y-dHy6.js +2 -0
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-DCaFuecI.js → ishikawaDiagram-YF4QCWOH-DDf2V_TY.js} +2 -2
- package/dist/assets/{journeyDiagram-JHISSGLW-XHN5sQTP.js → journeyDiagram-JHISSGLW-BvmVxFFc.js} +2 -2
- package/dist/assets/{kanban-definition-UN3LZRKU-C6Z1NMPy.js → kanban-definition-UN3LZRKU-e_fJ6cFJ.js} +2 -2
- package/dist/assets/{linear-CJiRf5bU.js → linear-B91Fgz-z.js} +1 -1
- package/dist/assets/{index-CVsP1YhF.css → main-B1yvZRuy.css} +1 -1
- package/dist/assets/{index-BDubzIOk.js → main-DNu7P8AU.js} +38 -38
- package/dist/assets/{mermaid.core-BU6D8Fsk.js → mermaid.core-D0obZElW.js} +4 -4
- package/dist/assets/{mindmap-definition-RKZ34NQL-CbLpxIh1.js → mindmap-definition-RKZ34NQL-Dste0FPZ.js} +2 -2
- package/dist/assets/{pieDiagram-4H26LBE5-Bot7_twR.js → pieDiagram-4H26LBE5-DlkxG18I.js} +2 -2
- package/dist/assets/{quadrantDiagram-W4KKPZXB-C0f_ak4L.js → quadrantDiagram-W4KKPZXB-CaF4erGI.js} +4 -4
- package/dist/assets/{requirementDiagram-4Y6WPE33-BqJozRLK.js → requirementDiagram-4Y6WPE33-JjvwFMuy.js} +2 -2
- package/dist/assets/results-B1r9P01j.css +1 -0
- package/dist/assets/results-BLVcBvMW.js +1 -0
- package/dist/assets/{sankeyDiagram-5OEKKPKP-lRYAS88J.js → sankeyDiagram-5OEKKPKP-Df9aIcGI.js} +2 -2
- package/dist/assets/{sequenceDiagram-3UESZ5HK-2JorXvQs.js → sequenceDiagram-3UESZ5HK-eTrTVK9z.js} +2 -2
- package/dist/assets/stateDiagram-AJRCARHV-qKJqOfEO.js +1 -0
- package/dist/assets/stateDiagram-v2-BHNVJYJU-DCT2fPOh.js +1 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-Dx-wzh56.js → timeline-definition-PNZ67QCA-CTNFcXLu.js} +2 -2
- package/dist/assets/{vennDiagram-CIIHVFJN-BDZHGx-W.js → vennDiagram-CIIHVFJN-DizFGls1.js} +2 -2
- package/dist/assets/{wardley-L42UT6IY-CsMxpZAT.js → wardley-L42UT6IY-N5EX1ou0.js} +1 -1
- package/dist/assets/{wardleyDiagram-YWT4CUSO-3TLDK7Y6.js → wardleyDiagram-YWT4CUSO-Da-1FJ9m.js} +2 -2
- package/dist/assets/{xychartDiagram-2RQKCTM6-CX1rEnVo.js → xychartDiagram-2RQKCTM6-DzLfacO5.js} +2 -2
- package/dist/index.html +3 -2
- package/dist/results.html +14 -0
- package/package.json +1 -1
- package/dist/assets/architectureDiagram-3BPJPVTR-uDTs0F_K.js +0 -36
- package/dist/assets/channel-iJxofKBo.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-fQOUt9GA.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-fQOUt9GA.js +0 -1
- package/dist/assets/cose-bilkent-S5V4N54A-C-zvi96U.js +0 -1
- package/dist/assets/dagre-BM42HDAG-BsGAg2-8.js +0 -4
- package/dist/assets/diagram-2AECGRRQ-CfpkJc0V.js +0 -43
- package/dist/assets/diagram-5GNKFQAL-BiCeoFzB.js +0 -10
- package/dist/assets/diagram-KO2AKTUF-De9gL4gz.js +0 -3
- package/dist/assets/diagram-LMA3HP47-FBCs1Ucb.js +0 -24
- package/dist/assets/diagram-OG6HWLK6-Bm92DYf2.js +0 -24
- package/dist/assets/ganttDiagram-6RSMTGT7-BT479Udj.js +0 -292
- package/dist/assets/gitGraphDiagram-PVQCEYII-DeZsn90v.js +0 -106
- package/dist/assets/infoDiagram-5YYISTIA-CsiOfYsn.js +0 -2
- package/dist/assets/stateDiagram-AJRCARHV-BBYeuF2q.js +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-DPvztxos.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{e as Yt,a$ as Xt,a0 as Zt,a4 as Jt,b2 as Qt,a1 as $t,b0 as te,b as S,a2 as Tt,a_ as ee,aZ as lt,l as ne,at as se,ay as ie,L as re,E as oe,t as ae,s as le,S as ce}from"./mermaid.core-BU6D8Fsk.js";import"./index-BDubzIOk.js";const St=(t,n)=>Yt(t,"a",-n),zt=1e-10;function it(t,n){const s=he(t),e=s.filter(c=>ue(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Rt(e);for(let u=0;u<e.length;++u){const l=e[u];l.angle=Math.atan2(l.x-c.x,l.y-c.y)}e.sort((u,l)=>l.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const l=e[u];r+=(f.x+l.x)*(l.y-f.y);const m={x:(l.x+f.x)/2,y:(l.y+f.y)/2};let g=null;for(let b=0;b<l.parentIndex.length;++b)if(f.parentIndex.includes(l.parentIndex[b])){const d=t[l.parentIndex[b]],k=Math.atan2(l.x-d.x,l.y-d.y),T=Math.atan2(f.x-d.x,f.y-d.y);let E=T-k;E<0&&(E+=2*Math.PI);const w=T-E/2;let x=G(m,{x:d.x+d.radius*Math.sin(w),y:d.y+d.radius*Math.cos(w)});x>d.radius*2&&(x=d.radius*2),(g==null||g.width>x)&&(g={circle:d,width:x,p1:l,p2:f,large:x>d.radius,sweep:!0})}g!=null&&(o.push(g),i+=ht(g.circle.radius,g.width),f=l)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(G(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-zt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ue(t,n){return n.every(s=>G(t,s)<s.radius+zt)}function he(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=At(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function ht(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function G(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function mt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return ht(t,e)+ht(n,i)}function At(t,n){const s=G(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),l=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-l},{x:c-u,y:f+l}]}function Rt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function fe(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const l=n+f,m=t(l);if(m*o>=0&&(n=l),Math.abs(f)<r||m===0)return l}return n+f}function ft(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function _t(t,n){return ft(t).map(()=>ft(n))}function et(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function dt(t){return Math.sqrt(et(t,t))}function gt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function Ct(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,l=s.psi!==void 0?s.psi:-.5,m=s.sigma!==void 0?s.sigma:.5;let g;const b=n.length,d=new Array(b+1);d[0]=n,d[0].fx=t(n),d[0].id=0;for(let v=0;v<b;++v){const a=n.slice();a[v]=a[v]?a[v]*i:r,d[v+1]=a,d[v+1].fx=t(a),d[v+1].id=v+1}function k(v){for(let a=0;a<v.length;a++)d[b][a]=v[a];d[b].fx=v.fx}const T=(v,a)=>v.fx-a.fx,E=n.slice(),w=n.slice(),x=n.slice(),p=n.slice();for(let v=0;v<e;++v){if(d.sort(T),s.history){const y=d.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});y.sort((h,j)=>h.id-j.id),s.history.push({x:d[0].slice(),fx:d[0].fx,simplex:y})}g=0;for(let y=0;y<b;++y)g=Math.max(g,Math.abs(d[0][y]-d[1][y]));if(Math.abs(d[0].fx-d[b].fx)<o&&g<c)break;for(let y=0;y<b;++y){E[y]=0;for(let h=0;h<b;++h)E[y]+=d[h][y];E[y]/=b}const a=d[b];if(Q(w,1+f,E,-f,a),w.fx=t(w),w.fx<d[0].fx)Q(p,1+u,E,-u,a),p.fx=t(p),p.fx<w.fx?k(p):k(w);else if(w.fx>=d[b-1].fx){let y=!1;if(w.fx>a.fx?(Q(x,1+l,E,-l,a),x.fx=t(x),x.fx<a.fx?k(x):y=!0):(Q(x,1-l*f,E,l*f,a),x.fx=t(x),x.fx<w.fx?k(x):y=!0),y){if(m>=1)break;for(let h=1;h<d.length;++h)Q(d[h],1-m,d[0],m,d[h]),d[h].fx=t(d[h])}}else k(w)}return d.sort(T),{fx:d[0].fx,x:d[0]}}function de(t,n,s,e,i,r,o){const c=s.fx,f=et(s.fxprime,n);let u=c,l=c,m=f,g=0;i=i||1,r=r||1e-6,o=o||.1;function b(d,k,T){for(let E=0;E<16;++E)if(i=(d+k)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),m=et(e.fxprime,n),u>c+r*i*f||u>=T)k=i;else{if(Math.abs(m)<=-o*f)return i;m*(k-d)>=0&&(k=d),d=i,T=u}return 0}for(let d=0;d<10;++d){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),m=et(e.fxprime,n),u>c+r*i*f||d&&u>=l)return b(g,i,l);if(Math.abs(m)<=-o*f)return i;if(m>=0)return b(i,g,u);l=u,g=i,i*=2}return i}function ge(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),gt(o,e.fxprime,-1);for(let l=0;l<u;++l){if(f=de(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)gt(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const m=et(e.fxprime,e.fxprime),g=Math.max(0,et(r,i.fxprime)/m);Q(o,g,o,-1,i.fxprime),c=e,e=i,i=c}if(dt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function Dt(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||me,e=n.lossFunction||nt,i=xe(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const l of o)c.push(r[l].x),c.push(r[l].y);const u=Ct(l=>{const m={};for(let g=0;g<o.length;++g){const b=o[g];m[b]={x:l[2*g],y:l[2*g+1],radius:r[b].radius}}return e(m,i)},c,n).x;for(let l=0;l<o.length;++l){const m=o[l];r[m].x=u[2*l],r[m].y=u[2*l+1]}return r}const Nt=1e-10;function xt(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Nt?Math.abs(t-n):fe(e=>mt(t,n,e)-s,0,t+n)}function xe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const l=String(f.sets[u]);c.set(l,f.size+(c.get(l)||0));for(let m=u+1;m<f.sets.length;m++){const g=String(f.sets[m]),b=`${l};${g}`,d=`${g};${l}`;c.set(b,f.size+(c.get(b)||0)),c.set(d,f.size+(c.get(d)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const l=r[u];o.has(i([f,l]))||e.push({sets:[f,l],size:0})}}return e}function ye(t,n,s){const e=_t(n.length,n.length),i=_t(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),l=xt(f,u,r.size);e[o][c]=e[c][o]=l;let m=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?m=1:r.size<=1e-10&&(m=-1),i[o][c]=i[c][o]=m}),{distances:e,constraints:i}}function pe(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],l=t[2*f+1],m=s[r][f],g=e[r][f],b=(u-o)*(u-o)+(l-c)*(l-c),d=Math.sqrt(b),k=b-m*m;g>0&&d<=m||g<0&&d>=m||(i+=2*k*k,n[2*r]+=4*k*(o-u),n[2*r+1]+=4*k*(c-l),n[2*f]+=4*k*(u-o),n[2*f+1]+=4*k*(l-c))}}return i}function me(t,n={}){let s=ve(t,n);const e=n.lossFunction||nt;if(t.length>=8){const i=be(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function be(t,n={}){const s=n.restarts||10,e=[],i={};for(const g of t)g.sets.length===1&&(i[g.sets[0]]=e.length,e.push(g));let{distances:r,constraints:o}=ye(t,e,i);const c=dt(r.map(dt))/r.length;r=r.map(g=>g.map(b=>b/c));const f=(g,b)=>pe(g,b,r,o);let u=null;for(let g=0;g<s;++g){const b=ft(r.length*2).map(Math.random),d=ge(f,b,n);(!u||d.fx<u.fx)&&(u=d)}const l=u.x,m={};for(let g=0;g<e.length;++g){const b=e[g];m[b.sets[0]]={x:l[2*g]*c,y:l[2*g+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const g of n.history)gt(g.x,c);return m}function ve(t,n){const s=n&&n.lossFunction?n.lossFunction:nt,e={},i={};for(const m of t)if(m.sets.length===1){const g=m.sets[0];e[g]={x:1e10,y:1e10,rowid:e.length,size:m.size,radius:Math.sqrt(m.size/Math.PI)},i[g]=[]}t=t.filter(m=>m.sets.length===2);for(const m of t){let g=m.weight!=null?m.weight:1;const b=m.sets[0],d=m.sets[1];m.size+Nt>=Math.min(e[b].size,e[d].size)&&(g=0),i[b].push({set:d,size:m.size,weight:g}),i[d].push({set:b,size:m.size,weight:g})}const r=[];Object.keys(i).forEach(m=>{let g=0;for(let b=0;b<i[m].length;++b)g+=i[m][b].size*i[m][b].weight;r.push({set:m,size:g})});function o(m,g){return g.size-m.size}r.sort(o);const c={};function f(m){return m.set in c}function u(m,g){e[g].x=m.x,e[g].y=m.y,c[g]=!0}u({x:0,y:0},r[0].set);for(let m=1;m<r.length;++m){const g=r[m].set,b=i[g].filter(f),d=e[g];if(b.sort(o),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var l=0;l<b.length;++l){const w=e[b[l].set],x=xt(d.radius,w.radius,b[l].size);k.push({x:w.x+x,y:w.y}),k.push({x:w.x-x,y:w.y}),k.push({y:w.y+x,x:w.x}),k.push({y:w.y-x,x:w.x});for(let p=l+1;p<b.length;++p){const v=e[b[p].set],a=xt(d.radius,v.radius,b[p].size),y=At({x:w.x,y:w.y,radius:x},{x:v.x,y:v.y,radius:a});k.push(...y)}}let T=1e50,E=k[0];for(const w of k){e[g].x=w.x,e[g].y=w.y;const x=s(e,t);x<T&&(T=x,E=w)}u(E,g)}return e}function nt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=mt(o.radius,c.radius,G(o,c))}else i=it(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ot(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=mt(c.radius,f.radius,G(c,f))}else i=it(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function Ie(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&G(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function ke(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;G(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function yt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ft(t,n,s){n==null&&(n=Math.PI/2);let e=Pt(t).map(u=>Object.assign({},u));const i=ke(e);for(const u of i){Ie(u,n,s);const l=yt(u);u.size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),u.bounds=l}i.sort((u,l)=>l.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,l,m){if(!u)return;const g=u.bounds;let b,d;if(l)b=r.xRange.max-g.xRange.min+o;else{b=r.xRange.max-g.xRange.max;const k=(g.xRange.max-g.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;k<0&&(b+=k)}if(m)d=r.yRange.max-g.yRange.min+o;else{d=r.yRange.max-g.yRange.max;const k=(g.yRange.max-g.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;k<0&&(d+=k)}for(const k of u)k.x+=b,k.y+=d,e.push(k)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=yt(e);return jt(e)}function Lt(t,n,s,e,i){const r=Pt(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=yt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(o.max-o.min),u=s/(c.max-c.min);const l=Math.min(u,f),m=(n-(o.max-o.min)*l)/2,g=(s-(c.max-c.min)*l)/2;return jt(r.map(b=>({radius:l*b.radius,x:e+m+(b.x-o.min)*l,y:e+g+(b.y-c.min)*l,setid:b.setid})))}function jt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Pt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function Me(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,l=!0,m=null,g=null,b=!1,d=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,x=function(y){if(y in T)return T[y];var h=T[y]=E[w];return w+=1,w>=E.length&&(w=0),h},p=Dt,v=nt;function a(y){let h=y.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(C=>j.has(C)));let M={},F={};if(h.length>0){let I=p(h,{lossFunction:v,distinct:b});c&&(I=Ft(I,o,g)),M=Lt(I,s,e,i,f),F=Bt(M,h,k)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function V(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}y.selectAll("svg").data([M]).enter().append("svg");const K=y.select("svg");n?K.attr("viewBox",`0 0 ${s} ${e}`):K.attr("width",s).attr("height",e);const H={};let z=!1;K.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!b&&(z=!0,H[I.sets[0]]=_e(C))});function N(I){return C=>{const B=I.sets.map(X=>{let P=H[X],U=M[X];return P||(P={x:s/2,y:e/2,radius:1}),U||(U={x:s/2,y:e/2,radius:1}),{x:P.x*(1-C)+U.x*C,y:P.y*(1-C)+U.y*C,radius:P.radius*(1-C)+U.radius*C}});return Et(B,d)}}const q=K.selectAll(".venn-area").data(h,I=>I.sets),W=q.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),Z=W.append("path"),J=W.append("text").attr("class","label").text(I=>V(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);l&&(Z.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:x(I.sets)).style("fill-opacity",".25"),J.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?x(I.sets):"#444"));function O(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=y;z&&typeof _.transition=="function"?(_=O(y),_.selectAll("path").attrTween("d",N)):_.selectAll("path").attr("d",I=>Et(I.sets.map(C=>M[C])),d);const A=_.selectAll("text").filter(I=>I.sets in F).text(I=>V(I)).attr("x",I=>Math.floor(F[I.sets].x)).attr("y",I=>Math.floor(F[I.sets].y));u&&(z?"on"in A?A.on("end",ct(M,V)):A.each("end",ct(M,V)):A.each(ct(M,V)));const R=O(q.exit()).remove();typeof q.transition=="function"&&R.selectAll("path").attrTween("d",N);const D=R.selectAll("text").attr("x",s/2).attr("y",e/2);return m!==null&&(J.style("font-size","0px"),A.style("font-size",m),D.style("font-size","0px")),{circles:M,textCentres:F,nodes:q,enter:W,update:_,exit:R}}return a.wrap=function(y){return arguments.length?(u=y,a):u},a.useViewBox=function(){return n=!0,a},a.width=function(y){return arguments.length?(s=y,a):s},a.height=function(y){return arguments.length?(e=y,a):e},a.padding=function(y){return arguments.length?(i=y,a):i},a.distinct=function(y){return arguments.length?(b=y,a):b},a.colours=function(y){return arguments.length?(x=y,a):x},a.colors=function(y){return arguments.length?(x=y,a):x},a.fontSize=function(y){return arguments.length?(m=y,a):m},a.round=function(y){return arguments.length?(d=y,a):d},a.duration=function(y){return arguments.length?(r=y,a):r},a.layoutFunction=function(y){return arguments.length?(p=y,a):p},a.normalize=function(y){return arguments.length?(c=y,a):c},a.scaleToFit=function(y){return arguments.length?(f=y,a):f},a.styled=function(y){return arguments.length?(l=y,a):l},a.orientation=function(y){return arguments.length?(o=y,a):o},a.orientationOrder=function(y){return arguments.length?(g=y,a):g},a.lossFunction=function(y){return arguments.length?(v=y==="default"?nt:y==="logRatio"?Ot:y,a):v},a}function ct(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),l=[u],m=0;const g=1.1;e.textContent=null;const b=[];function d(x){const p=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return p.textContent=x,b.push(p),e.append(p),p}let k=d(u);for(;u=o.pop(),!!u;){l.push(u);const x=l.join(" ");k.textContent=x,x.length>f&&k.getComputedTextLength()>i&&(l.pop(),k.textContent=l.join(" "),l=[u],k=d(u),m++)}const T=.35-m*g/2,E=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((x,p)=>{x.setAttribute("x",E),x.setAttribute("y",w),x.setAttribute("dy",`${T+p*g}em`)})}}function ut(t,n,s){let e=n[0].radius-G(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-G(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=G(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Vt(t,n,s){const e=[];for(const l of t)e.push({x:l.x,y:l.y}),e.push({x:l.x+l.radius/2,y:l.y}),e.push({x:l.x-l.radius/2,y:l.y}),e.push({x:l.x,y:l.y+l.radius/2}),e.push({x:l.x,y:l.y-l.radius/2});let i=e[0],r=ut(e[0],t,n);for(let l=1;l<e.length;++l){const m=ut(e[l],t,n);m>=r&&(i=e[l],r=m)}const o=Ct(l=>-1*ut({x:l[0],y:l[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const l of t)if(G(c,l)>l.radius){f=!1;break}for(const l of n)if(G(c,l)<l.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Vt(t,[]):Rt(u.arcs.map(l=>l.p1))}function we(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=G(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function Bt(t,n,s){const e={},i=we(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let g=0;g<o.length;++g){c[o[g]]=!0;const b=i[o[g]];for(let d=0;d<b.length;++d)f[b[d]]=!0}const u=[],l=[];for(let g in t)g in c?u.push(t[g]):g in f||l.push(t[g]);const m=Vt(u,l,s);e[o]=m,m.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Se(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{e as Yt,a$ as Xt,a0 as Zt,a4 as Jt,b2 as Qt,a1 as $t,b0 as te,b as S,a2 as Tt,a_ as ee,aZ as lt,l as ne,at as se,ay as ie,L as re,E as oe,t as ae,s as le,S as ce}from"./mermaid.core-D0obZElW.js";import"./main-DNu7P8AU.js";import"./dataResults-B1swefI5.js";const St=(t,n)=>Yt(t,"a",-n),zt=1e-10;function it(t,n){const s=he(t),e=s.filter(c=>ue(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Rt(e);for(let u=0;u<e.length;++u){const l=e[u];l.angle=Math.atan2(l.x-c.x,l.y-c.y)}e.sort((u,l)=>l.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const l=e[u];r+=(f.x+l.x)*(l.y-f.y);const m={x:(l.x+f.x)/2,y:(l.y+f.y)/2};let g=null;for(let b=0;b<l.parentIndex.length;++b)if(f.parentIndex.includes(l.parentIndex[b])){const d=t[l.parentIndex[b]],k=Math.atan2(l.x-d.x,l.y-d.y),T=Math.atan2(f.x-d.x,f.y-d.y);let E=T-k;E<0&&(E+=2*Math.PI);const w=T-E/2;let x=G(m,{x:d.x+d.radius*Math.sin(w),y:d.y+d.radius*Math.cos(w)});x>d.radius*2&&(x=d.radius*2),(g==null||g.width>x)&&(g={circle:d,width:x,p1:l,p2:f,large:x>d.radius,sweep:!0})}g!=null&&(o.push(g),i+=ht(g.circle.radius,g.width),f=l)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(G(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-zt,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function ue(t,n){return n.every(s=>G(t,s)<s.radius+zt)}function he(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=At(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function ht(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function G(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function mt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return ht(t,e)+ht(n,i)}function At(t,n){const s=G(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),l=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-l},{x:c-u,y:f+l}]}function Rt(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function fe(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const l=n+f,m=t(l);if(m*o>=0&&(n=l),Math.abs(f)<r||m===0)return l}return n+f}function ft(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function _t(t,n){return ft(t).map(()=>ft(n))}function et(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function dt(t){return Math.sqrt(et(t,t))}function gt(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function Ct(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,l=s.psi!==void 0?s.psi:-.5,m=s.sigma!==void 0?s.sigma:.5;let g;const b=n.length,d=new Array(b+1);d[0]=n,d[0].fx=t(n),d[0].id=0;for(let v=0;v<b;++v){const a=n.slice();a[v]=a[v]?a[v]*i:r,d[v+1]=a,d[v+1].fx=t(a),d[v+1].id=v+1}function k(v){for(let a=0;a<v.length;a++)d[b][a]=v[a];d[b].fx=v.fx}const T=(v,a)=>v.fx-a.fx,E=n.slice(),w=n.slice(),x=n.slice(),p=n.slice();for(let v=0;v<e;++v){if(d.sort(T),s.history){const y=d.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});y.sort((h,j)=>h.id-j.id),s.history.push({x:d[0].slice(),fx:d[0].fx,simplex:y})}g=0;for(let y=0;y<b;++y)g=Math.max(g,Math.abs(d[0][y]-d[1][y]));if(Math.abs(d[0].fx-d[b].fx)<o&&g<c)break;for(let y=0;y<b;++y){E[y]=0;for(let h=0;h<b;++h)E[y]+=d[h][y];E[y]/=b}const a=d[b];if(Q(w,1+f,E,-f,a),w.fx=t(w),w.fx<d[0].fx)Q(p,1+u,E,-u,a),p.fx=t(p),p.fx<w.fx?k(p):k(w);else if(w.fx>=d[b-1].fx){let y=!1;if(w.fx>a.fx?(Q(x,1+l,E,-l,a),x.fx=t(x),x.fx<a.fx?k(x):y=!0):(Q(x,1-l*f,E,l*f,a),x.fx=t(x),x.fx<w.fx?k(x):y=!0),y){if(m>=1)break;for(let h=1;h<d.length;++h)Q(d[h],1-m,d[0],m,d[h]),d[h].fx=t(d[h])}}else k(w)}return d.sort(T),{fx:d[0].fx,x:d[0]}}function de(t,n,s,e,i,r,o){const c=s.fx,f=et(s.fxprime,n);let u=c,l=c,m=f,g=0;i=i||1,r=r||1e-6,o=o||.1;function b(d,k,T){for(let E=0;E<16;++E)if(i=(d+k)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),m=et(e.fxprime,n),u>c+r*i*f||u>=T)k=i;else{if(Math.abs(m)<=-o*f)return i;m*(k-d)>=0&&(k=d),d=i,T=u}return 0}for(let d=0;d<10;++d){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),m=et(e.fxprime,n),u>c+r*i*f||d&&u>=l)return b(g,i,l);if(Math.abs(m)<=-o*f)return i;if(m>=0)return b(i,g,u);l=u,g=i,i*=2}return i}function ge(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),gt(o,e.fxprime,-1);for(let l=0;l<u;++l){if(f=de(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)gt(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const m=et(e.fxprime,e.fxprime),g=Math.max(0,et(r,i.fxprime)/m);Q(o,g,o,-1,i.fxprime),c=e,e=i,i=c}if(dt(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function Dt(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||me,e=n.lossFunction||nt,i=xe(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const l of o)c.push(r[l].x),c.push(r[l].y);const u=Ct(l=>{const m={};for(let g=0;g<o.length;++g){const b=o[g];m[b]={x:l[2*g],y:l[2*g+1],radius:r[b].radius}}return e(m,i)},c,n).x;for(let l=0;l<o.length;++l){const m=o[l];r[m].x=u[2*l],r[m].y=u[2*l+1]}return r}const Nt=1e-10;function xt(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Nt?Math.abs(t-n):fe(e=>mt(t,n,e)-s,0,t+n)}function xe(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const l=String(f.sets[u]);c.set(l,f.size+(c.get(l)||0));for(let m=u+1;m<f.sets.length;m++){const g=String(f.sets[m]),b=`${l};${g}`,d=`${g};${l}`;c.set(b,f.size+(c.get(b)||0)),c.set(d,f.size+(c.get(d)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const l=r[u];o.has(i([f,l]))||e.push({sets:[f,l],size:0})}}return e}function ye(t,n,s){const e=_t(n.length,n.length),i=_t(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),l=xt(f,u,r.size);e[o][c]=e[c][o]=l;let m=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?m=1:r.size<=1e-10&&(m=-1),i[o][c]=i[c][o]=m}),{distances:e,constraints:i}}function pe(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],l=t[2*f+1],m=s[r][f],g=e[r][f],b=(u-o)*(u-o)+(l-c)*(l-c),d=Math.sqrt(b),k=b-m*m;g>0&&d<=m||g<0&&d>=m||(i+=2*k*k,n[2*r]+=4*k*(o-u),n[2*r+1]+=4*k*(c-l),n[2*f]+=4*k*(u-o),n[2*f+1]+=4*k*(l-c))}}return i}function me(t,n={}){let s=ve(t,n);const e=n.lossFunction||nt;if(t.length>=8){const i=be(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function be(t,n={}){const s=n.restarts||10,e=[],i={};for(const g of t)g.sets.length===1&&(i[g.sets[0]]=e.length,e.push(g));let{distances:r,constraints:o}=ye(t,e,i);const c=dt(r.map(dt))/r.length;r=r.map(g=>g.map(b=>b/c));const f=(g,b)=>pe(g,b,r,o);let u=null;for(let g=0;g<s;++g){const b=ft(r.length*2).map(Math.random),d=ge(f,b,n);(!u||d.fx<u.fx)&&(u=d)}const l=u.x,m={};for(let g=0;g<e.length;++g){const b=e[g];m[b.sets[0]]={x:l[2*g]*c,y:l[2*g+1]*c,radius:Math.sqrt(b.size/Math.PI)}}if(n.history)for(const g of n.history)gt(g.x,c);return m}function ve(t,n){const s=n&&n.lossFunction?n.lossFunction:nt,e={},i={};for(const m of t)if(m.sets.length===1){const g=m.sets[0];e[g]={x:1e10,y:1e10,rowid:e.length,size:m.size,radius:Math.sqrt(m.size/Math.PI)},i[g]=[]}t=t.filter(m=>m.sets.length===2);for(const m of t){let g=m.weight!=null?m.weight:1;const b=m.sets[0],d=m.sets[1];m.size+Nt>=Math.min(e[b].size,e[d].size)&&(g=0),i[b].push({set:d,size:m.size,weight:g}),i[d].push({set:b,size:m.size,weight:g})}const r=[];Object.keys(i).forEach(m=>{let g=0;for(let b=0;b<i[m].length;++b)g+=i[m][b].size*i[m][b].weight;r.push({set:m,size:g})});function o(m,g){return g.size-m.size}r.sort(o);const c={};function f(m){return m.set in c}function u(m,g){e[g].x=m.x,e[g].y=m.y,c[g]=!0}u({x:0,y:0},r[0].set);for(let m=1;m<r.length;++m){const g=r[m].set,b=i[g].filter(f),d=e[g];if(b.sort(o),b.length===0)throw"ERROR: missing pairwise overlap information";const k=[];for(var l=0;l<b.length;++l){const w=e[b[l].set],x=xt(d.radius,w.radius,b[l].size);k.push({x:w.x+x,y:w.y}),k.push({x:w.x-x,y:w.y}),k.push({y:w.y+x,x:w.x}),k.push({y:w.y-x,x:w.x});for(let p=l+1;p<b.length;++p){const v=e[b[p].set],a=xt(d.radius,v.radius,b[p].size),y=At({x:w.x,y:w.y,radius:x},{x:v.x,y:v.y,radius:a});k.push(...y)}}let T=1e50,E=k[0];for(const w of k){e[g].x=w.x,e[g].y=w.y;const x=s(e,t);x<T&&(T=x,E=w)}u(E,g)}return e}function nt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=mt(o.radius,c.radius,G(o,c))}else i=it(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Ot(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=mt(c.radius,f.radius,G(c,f))}else i=it(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function Ie(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&G(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function ke(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;G(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function yt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ft(t,n,s){n==null&&(n=Math.PI/2);let e=Pt(t).map(u=>Object.assign({},u));const i=ke(e);for(const u of i){Ie(u,n,s);const l=yt(u);u.size=(l.xRange.max-l.xRange.min)*(l.yRange.max-l.yRange.min),u.bounds=l}i.sort((u,l)=>l.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,l,m){if(!u)return;const g=u.bounds;let b,d;if(l)b=r.xRange.max-g.xRange.min+o;else{b=r.xRange.max-g.xRange.max;const k=(g.xRange.max-g.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;k<0&&(b+=k)}if(m)d=r.yRange.max-g.yRange.min+o;else{d=r.yRange.max-g.yRange.max;const k=(g.yRange.max-g.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;k<0&&(d+=k)}for(const k of u)k.x+=b,k.y+=d,e.push(k)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=yt(e);return jt(e)}function Lt(t,n,s,e,i){const r=Pt(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=yt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const b=Math.sqrt(i/Math.PI)*2;f=n/b,u=s/b}else f=n/(o.max-o.min),u=s/(c.max-c.min);const l=Math.min(u,f),m=(n-(o.max-o.min)*l)/2,g=(s-(c.max-c.min)*l)/2;return jt(r.map(b=>({radius:l*b.radius,x:e+m+(b.x-o.min)*l,y:e+g+(b.y-c.min)*l,setid:b.setid})))}function jt(t){const n={};for(const s of t)n[s.setid]=s;return n}function Pt(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function Me(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,l=!0,m=null,g=null,b=!1,d=null,k=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,T={},E=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,x=function(y){if(y in T)return T[y];var h=T[y]=E[w];return w+=1,w>=E.length&&(w=0),h},p=Dt,v=nt;function a(y){let h=y.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(C=>j.has(C)));let M={},F={};if(h.length>0){let I=p(h,{lossFunction:v,distinct:b});c&&(I=Ft(I,o,g)),M=Lt(I,s,e,i,f),F=Bt(M,h,k)}const Y={};h.forEach(I=>{I.label&&(Y[I.sets]=I.label)});function V(I){if(I.sets in Y)return Y[I.sets];if(I.sets.length==1)return""+I.sets[0]}y.selectAll("svg").data([M]).enter().append("svg");const K=y.select("svg");n?K.attr("viewBox",`0 0 ${s} ${e}`):K.attr("width",s).attr("height",e);const H={};let z=!1;K.selectAll(".venn-area path").each(function(I){const C=this.getAttribute("d");I.sets.length==1&&C&&!b&&(z=!0,H[I.sets[0]]=_e(C))});function N(I){return C=>{const B=I.sets.map(X=>{let P=H[X],U=M[X];return P||(P={x:s/2,y:e/2,radius:1}),U||(U={x:s/2,y:e/2,radius:1}),{x:P.x*(1-C)+U.x*C,y:P.y*(1-C)+U.y*C,radius:P.radius*(1-C)+U.radius*C}});return Et(B,d)}}const q=K.selectAll(".venn-area").data(h,I=>I.sets),W=q.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),Z=W.append("path"),J=W.append("text").attr("class","label").text(I=>V(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);l&&(Z.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:x(I.sets)).style("fill-opacity",".25"),J.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?x(I.sets):"#444"));function O(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let _=y;z&&typeof _.transition=="function"?(_=O(y),_.selectAll("path").attrTween("d",N)):_.selectAll("path").attr("d",I=>Et(I.sets.map(C=>M[C])),d);const A=_.selectAll("text").filter(I=>I.sets in F).text(I=>V(I)).attr("x",I=>Math.floor(F[I.sets].x)).attr("y",I=>Math.floor(F[I.sets].y));u&&(z?"on"in A?A.on("end",ct(M,V)):A.each("end",ct(M,V)):A.each(ct(M,V)));const R=O(q.exit()).remove();typeof q.transition=="function"&&R.selectAll("path").attrTween("d",N);const D=R.selectAll("text").attr("x",s/2).attr("y",e/2);return m!==null&&(J.style("font-size","0px"),A.style("font-size",m),D.style("font-size","0px")),{circles:M,textCentres:F,nodes:q,enter:W,update:_,exit:R}}return a.wrap=function(y){return arguments.length?(u=y,a):u},a.useViewBox=function(){return n=!0,a},a.width=function(y){return arguments.length?(s=y,a):s},a.height=function(y){return arguments.length?(e=y,a):e},a.padding=function(y){return arguments.length?(i=y,a):i},a.distinct=function(y){return arguments.length?(b=y,a):b},a.colours=function(y){return arguments.length?(x=y,a):x},a.colors=function(y){return arguments.length?(x=y,a):x},a.fontSize=function(y){return arguments.length?(m=y,a):m},a.round=function(y){return arguments.length?(d=y,a):d},a.duration=function(y){return arguments.length?(r=y,a):r},a.layoutFunction=function(y){return arguments.length?(p=y,a):p},a.normalize=function(y){return arguments.length?(c=y,a):c},a.scaleToFit=function(y){return arguments.length?(f=y,a):f},a.styled=function(y){return arguments.length?(l=y,a):l},a.orientation=function(y){return arguments.length?(o=y,a):o},a.orientationOrder=function(y){return arguments.length?(g=y,a):g},a.lossFunction=function(y){return arguments.length?(v=y==="default"?nt:y==="logRatio"?Ot:y,a):v},a}function ct(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),l=[u],m=0;const g=1.1;e.textContent=null;const b=[];function d(x){const p=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return p.textContent=x,b.push(p),e.append(p),p}let k=d(u);for(;u=o.pop(),!!u;){l.push(u);const x=l.join(" ");k.textContent=x,x.length>f&&k.getComputedTextLength()>i&&(l.pop(),k.textContent=l.join(" "),l=[u],k=d(u),m++)}const T=.35-m*g/2,E=e.getAttribute("x"),w=e.getAttribute("y");b.forEach((x,p)=>{x.setAttribute("x",E),x.setAttribute("y",w),x.setAttribute("dy",`${T+p*g}em`)})}}function ut(t,n,s){let e=n[0].radius-G(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-G(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=G(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Vt(t,n,s){const e=[];for(const l of t)e.push({x:l.x,y:l.y}),e.push({x:l.x+l.radius/2,y:l.y}),e.push({x:l.x-l.radius/2,y:l.y}),e.push({x:l.x,y:l.y+l.radius/2}),e.push({x:l.x,y:l.y-l.radius/2});let i=e[0],r=ut(e[0],t,n);for(let l=1;l<e.length;++l){const m=ut(e[l],t,n);m>=r&&(i=e[l],r=m)}const o=Ct(l=>-1*ut({x:l[0],y:l[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const l of t)if(G(c,l)>l.radius){f=!1;break}for(const l of n)if(G(c,l)<l.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return it(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Vt(t,[]):Rt(u.arcs.map(l=>l.p1))}function we(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=G(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function Bt(t,n,s){const e={},i=we(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let g=0;g<o.length;++g){c[o[g]]=!0;const b=i[o[g]];for(let d=0;d<b.length;++d)f[b[d]]=!0}const u=[],l=[];for(let g in t)g in c?u.push(t[g]):g in f||l.push(t[g]);const m=Vt(u,l,s);e[o]=m,m.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Se(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -31,4 +31,4 @@ Expecting `+P.join(", ")+", got '"+(this.terminals_[_]||_)+"'":U="Parse error on
|
|
|
31
31
|
font-family: ${t.fontFamily};
|
|
32
32
|
color: ${t.vennSetTextColor};
|
|
33
33
|
}
|
|
34
|
-
`,"getStyles"),Ge=Ue;function Wt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}S(Wt,"buildStyleByKey");var We=S((t,n,s,e)=>{var K,H,z,N,q,W,Z,J;const i=e.db,r=(K=i.getConfig)==null?void 0:K.call(i),{themeVariables:o,look:c,handDrawnSeed:f}=Tt(),u=c==="handDrawn",l=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),m=(H=i.getDiagramTitle)==null?void 0:H.call(i),g=i.getSubsetData(),b=i.getTextData(),d=Wt(i.getStyleData()),k=(z=r==null?void 0:r.width)!=null?z:800,T=(N=r==null?void 0:r.height)!=null?N:450,w=k/1600,x=m?48*w:0,p=(q=o.primaryTextColor)!=null?q:o.textColor,v=ee(n);v.attr("viewBox",`0 0 ${k} ${T}`),m&&v.append("text").text(m).attr("class","venn-title").attr("font-size",`${32*w}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*w).style("fill",o.vennTitleTextColor||o.titleColor);const a=lt(document.createElement("div")),y=Me().width(k).height(T-x);a.datum(g).call(y);const h=u?ne.svg(a.select("svg").node()):void 0,j=Ee(g,{width:k,height:T-x,padding:(W=r==null?void 0:r.padding)!=null?W:15}),M=new Map;for(const O of j){const _=$([...O.data.sets].sort());M.set(_,O)}b.length>0&&Kt(r,M,a,b,w,d);const F=se(o.background||"#f4f4f4");a.selectAll(".venn-circle").each(function(O,_){var L,tt;const A=lt(this),D=$([...O.sets].sort()),I=d.get(D),C=(I==null?void 0:I.fill)||l[_%l.length]||o.primaryColor;A.classed(`venn-set-${_%8}`,!0);const B=(L=I==null?void 0:I["fill-opacity"])!=null?L:.1,X=(I==null?void 0:I.stroke)||C,P=(I==null?void 0:I["stroke-width"])||`${5*w}`;if(u&&h){const ot=M.get(D);if(ot&&ot.circles.length>0){const at=ot.circles[0],Ht=h.circle(at.x,at.y,at.radius*2,{roughness:.7,seed:f,fill:St(C,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+_*60,stroke:X,strokeWidth:parseFloat(String(P))});A.select("path").remove(),(tt=A.node())==null||tt.insertBefore(Ht,A.select("text").node())}}else A.select("path").style("fill",C).style("fill-opacity",B).style("stroke",X).style("stroke-width",P).style("stroke-opacity",.95);const U=(I==null?void 0:I.color)||(F?ie(C,30):re(C,30));A.select("text").style("font-size",`${48*w}px`).style("fill",U)}),u&&h?a.selectAll(".venn-intersection").each(function(O){var C,B,X;const _=lt(this),R=$([...O.sets].sort()),D=d.get(R),I=D==null?void 0:D.fill;if(I){const P=_.select("path"),U=P.attr("d");if(U){const L=h.path(U,{roughness:.7,seed:f,fill:St(I,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),tt=P.node();(C=tt==null?void 0:tt.parentNode)==null||C.insertBefore(L,tt),P.remove()}}else _.select("path").style("fill-opacity",0);_.select("text").style("font-size",`${48*w}px`).style("fill",(X=(B=D==null?void 0:D.color)!=null?B:o.vennSetTextColor)!=null?X:p)}):(a.selectAll(".venn-intersection text").style("font-size",`${48*w}px`).style("fill",O=>{var R,D,I;const A=$([...O.sets].sort());return(I=(D=(R=d.get(A))==null?void 0:R.color)!=null?D:o.vennSetTextColor)!=null?I:p}),a.selectAll(".venn-intersection path").style("fill-opacity",O=>{var R;const A=$([...O.sets].sort());return(R=d.get(A))!=null&&R.fill?1:0}).style("fill",O=>{var R,D;const A=$([...O.sets].sort());return(D=(R=d.get(A))==null?void 0:R.fill)!=null?D:"transparent"}));const Y=v.append("g").attr("transform",`translate(0, ${x})`),V=a.select("svg").node();if(V&&"childNodes"in V)for(const O of[...V.childNodes])(Z=Y.node())==null||Z.appendChild(O);oe(v,T,k,(J=r==null?void 0:r.useMaxWidth)!=null?J:!0)},"draw");function $(t){return t.join("|")}S($,"stableSetsKey");function Kt(t,n,s,e,i,r){var l,m,g;const o=(l=t==null?void 0:t.useDebugLayout)!=null?l:!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const b of e){const d=$(b.sets),k=u.get(d);k?k.push(b):u.set(d,[b])}for(const[b,d]of u.entries()){const k=n.get(b);if(!(k!=null&&k.text))continue;const T=k.text.x,E=k.text.y,w=Math.min(...k.circles.map(N=>N.radius)),x=Math.min(...k.circles.map(N=>N.radius-Math.hypot(T-N.x,E-N.y)));let p=Number.isFinite(x)?Math.max(0,x):0;p===0&&Number.isFinite(w)&&(p=w*.6);const v=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&v.append("circle").attr("class","venn-text-debug-circle").attr("cx",T).attr("cy",E).attr("r",p).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const a=Math.max(80*i,p*2*.95),y=Math.max(60*i,p*2*.95),M=(k.data.label&&k.data.label.length>0?Math.min(32*i,p*.25):0)+(d.length<=2?30*i:0),F=T-a/2,Y=E-y/2+M,V=Math.max(1,Math.ceil(Math.sqrt(d.length))),K=Math.max(1,Math.ceil(d.length/V)),H=a/V,z=y/K;for(const[N,q]of d.entries()){const W=N%V,Z=Math.floor(N/V),J=F+H*(W+.5),O=Y+z*(Z+.5);o&&v.append("rect").attr("class","venn-text-debug-cell").attr("x",F+H*W).attr("y",Y+z*Z).attr("width",H).attr("height",z).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const _=H*.9,A=z*.9,R=v.append("foreignObject").attr("class","venn-text-node-fo").attr("width",_).attr("height",A).attr("x",J-_/2).attr("y",O-A/2).attr("overflow","visible"),D=(m=r.get(q.id))==null?void 0:m.color,I=R.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text((g=q.label)!=null?g:q.id);D&&I.style("color",D)}}}S(Kt,"renderTextNodes");var Ke={draw:We},
|
|
34
|
+
`,"getStyles"),Ge=Ue;function Wt(t){const n=new Map;for(const s of t){const e=s.targets.join("|"),i=n.get(e);i?Object.assign(i,s.styles):n.set(e,{...s.styles})}return n}S(Wt,"buildStyleByKey");var We=S((t,n,s,e)=>{var K,H,z,N,q,W,Z,J;const i=e.db,r=(K=i.getConfig)==null?void 0:K.call(i),{themeVariables:o,look:c,handDrawnSeed:f}=Tt(),u=c==="handDrawn",l=[o.venn1,o.venn2,o.venn3,o.venn4,o.venn5,o.venn6,o.venn7,o.venn8].filter(Boolean),m=(H=i.getDiagramTitle)==null?void 0:H.call(i),g=i.getSubsetData(),b=i.getTextData(),d=Wt(i.getStyleData()),k=(z=r==null?void 0:r.width)!=null?z:800,T=(N=r==null?void 0:r.height)!=null?N:450,w=k/1600,x=m?48*w:0,p=(q=o.primaryTextColor)!=null?q:o.textColor,v=ee(n);v.attr("viewBox",`0 0 ${k} ${T}`),m&&v.append("text").text(m).attr("class","venn-title").attr("font-size",`${32*w}px`).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("x","50%").attr("y",32*w).style("fill",o.vennTitleTextColor||o.titleColor);const a=lt(document.createElement("div")),y=Me().width(k).height(T-x);a.datum(g).call(y);const h=u?ne.svg(a.select("svg").node()):void 0,j=Ee(g,{width:k,height:T-x,padding:(W=r==null?void 0:r.padding)!=null?W:15}),M=new Map;for(const O of j){const _=$([...O.data.sets].sort());M.set(_,O)}b.length>0&&Kt(r,M,a,b,w,d);const F=se(o.background||"#f4f4f4");a.selectAll(".venn-circle").each(function(O,_){var L,tt;const A=lt(this),D=$([...O.sets].sort()),I=d.get(D),C=(I==null?void 0:I.fill)||l[_%l.length]||o.primaryColor;A.classed(`venn-set-${_%8}`,!0);const B=(L=I==null?void 0:I["fill-opacity"])!=null?L:.1,X=(I==null?void 0:I.stroke)||C,P=(I==null?void 0:I["stroke-width"])||`${5*w}`;if(u&&h){const ot=M.get(D);if(ot&&ot.circles.length>0){const at=ot.circles[0],Ht=h.circle(at.x,at.y,at.radius*2,{roughness:.7,seed:f,fill:St(C,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+_*60,stroke:X,strokeWidth:parseFloat(String(P))});A.select("path").remove(),(tt=A.node())==null||tt.insertBefore(Ht,A.select("text").node())}}else A.select("path").style("fill",C).style("fill-opacity",B).style("stroke",X).style("stroke-width",P).style("stroke-opacity",.95);const U=(I==null?void 0:I.color)||(F?ie(C,30):re(C,30));A.select("text").style("font-size",`${48*w}px`).style("fill",U)}),u&&h?a.selectAll(".venn-intersection").each(function(O){var C,B,X;const _=lt(this),R=$([...O.sets].sort()),D=d.get(R),I=D==null?void 0:D.fill;if(I){const P=_.select("path"),U=P.attr("d");if(U){const L=h.path(U,{roughness:.7,seed:f,fill:St(I,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),tt=P.node();(C=tt==null?void 0:tt.parentNode)==null||C.insertBefore(L,tt),P.remove()}}else _.select("path").style("fill-opacity",0);_.select("text").style("font-size",`${48*w}px`).style("fill",(X=(B=D==null?void 0:D.color)!=null?B:o.vennSetTextColor)!=null?X:p)}):(a.selectAll(".venn-intersection text").style("font-size",`${48*w}px`).style("fill",O=>{var R,D,I;const A=$([...O.sets].sort());return(I=(D=(R=d.get(A))==null?void 0:R.color)!=null?D:o.vennSetTextColor)!=null?I:p}),a.selectAll(".venn-intersection path").style("fill-opacity",O=>{var R;const A=$([...O.sets].sort());return(R=d.get(A))!=null&&R.fill?1:0}).style("fill",O=>{var R,D;const A=$([...O.sets].sort());return(D=(R=d.get(A))==null?void 0:R.fill)!=null?D:"transparent"}));const Y=v.append("g").attr("transform",`translate(0, ${x})`),V=a.select("svg").node();if(V&&"childNodes"in V)for(const O of[...V.childNodes])(Z=Y.node())==null||Z.appendChild(O);oe(v,T,k,(J=r==null?void 0:r.useMaxWidth)!=null?J:!0)},"draw");function $(t){return t.join("|")}S($,"stableSetsKey");function Kt(t,n,s,e,i,r){var l,m,g;const o=(l=t==null?void 0:t.useDebugLayout)!=null?l:!1,f=s.select("svg").append("g").attr("class","venn-text-nodes"),u=new Map;for(const b of e){const d=$(b.sets),k=u.get(d);k?k.push(b):u.set(d,[b])}for(const[b,d]of u.entries()){const k=n.get(b);if(!(k!=null&&k.text))continue;const T=k.text.x,E=k.text.y,w=Math.min(...k.circles.map(N=>N.radius)),x=Math.min(...k.circles.map(N=>N.radius-Math.hypot(T-N.x,E-N.y)));let p=Number.isFinite(x)?Math.max(0,x):0;p===0&&Number.isFinite(w)&&(p=w*.6);const v=f.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);o&&v.append("circle").attr("class","venn-text-debug-circle").attr("cx",T).attr("cy",E).attr("r",p).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);const a=Math.max(80*i,p*2*.95),y=Math.max(60*i,p*2*.95),M=(k.data.label&&k.data.label.length>0?Math.min(32*i,p*.25):0)+(d.length<=2?30*i:0),F=T-a/2,Y=E-y/2+M,V=Math.max(1,Math.ceil(Math.sqrt(d.length))),K=Math.max(1,Math.ceil(d.length/V)),H=a/V,z=y/K;for(const[N,q]of d.entries()){const W=N%V,Z=Math.floor(N/V),J=F+H*(W+.5),O=Y+z*(Z+.5);o&&v.append("rect").attr("class","venn-text-debug-cell").attr("x",F+H*W).attr("y",Y+z*Z).attr("width",H).attr("height",z).attr("fill","none").attr("stroke","teal").attr("stroke-width",1*i).attr("stroke-dasharray",`${4*i} ${3*i}`);const _=H*.9,A=z*.9,R=v.append("foreignObject").attr("class","venn-text-node-fo").attr("width",_).attr("height",A).attr("x",J-_/2).attr("y",O-A/2).attr("overflow","visible"),D=(m=r.get(q.id))==null?void 0:m.color,I=R.append("xhtml:span").attr("class","venn-text-node").style("display","flex").style("width","100%").style("height","100%").style("white-space","normal").style("align-items","center").style("justify-content","center").style("text-align","center").style("overflow-wrap","normal").style("word-break","normal").text((g=q.label)!=null?g:q.id);D&&I.style("color",D)}}}S(Kt,"renderTextNodes");var Ke={draw:We},Ze={parser:Te,db:qe,renderer:Ke,styles:Ge};export{Ze as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var DN=Object.defineProperty;var MN=(t,e,r)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>MN(t,typeof e!="symbol"?e+"":e,r);import{_ as er}from"./index-BDubzIOk.js";var xN=Object.create,hc=Object.defineProperty,FN=Object.getOwnPropertyDescriptor,Hh=Object.getOwnPropertyNames,GN=Object.getPrototypeOf,jN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),UN=(t,e)=>function(){return t&&(e=(0,t[Hh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Hh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Yh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Hh(e))!jN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=FN(e,a))||n.enumerable});return t},$f=(t,e,r)=>(Yh(t,e,"default"),r),Xh=(t,e,r)=>(r=t!=null?xN(GN(t)):{},Yh(hc(r,"default",{value:t,enumerable:!0}),t)),Jh=t=>Yh(hc({},"__esModule",{value:!0}),t),Af={};Qr(Af,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Ze,CodeAction:()=>Op,CodeActionContext:()=>Pp,CodeActionKind:()=>kp,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>cp,CodeLens:()=>Lp,Color:()=>du,ColorInformation:()=>np,ColorPresentation:()=>ap,Command:()=>un,CompletionItem:()=>Tp,CompletionItemKind:()=>pp,CompletionItemLabelDetails:()=>vp,CompletionItemTag:()=>mp,CompletionList:()=>Rp,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>pu,DiagnosticSeverity:()=>op,DiagnosticTag:()=>lp,DocumentHighlight:()=>Cp,DocumentHighlightKind:()=>_p,DocumentLink:()=>Mp,DocumentSymbol:()=>Np,DocumentUri:()=>ep,EOL:()=>mT,FoldingRange:()=>sp,FoldingRangeKind:()=>ip,FormattingOptions:()=>Dp,Hover:()=>$p,InlayHint:()=>qp,InlayHintKind:()=>gu,InlayHintLabelPart:()=>yu,InlineCompletionContext:()=>Jp,InlineCompletionItem:()=>Vp,InlineCompletionList:()=>Hp,InlineCompletionTriggerKind:()=>Yp,InlineValueContext:()=>Kp,InlineValueEvaluatableExpression:()=>Bp,InlineValueText:()=>Up,InlineValueVariableLookup:()=>zp,InsertReplaceEdit:()=>gp,InsertTextFormat:()=>hp,InsertTextMode:()=>yp,Location:()=>Cl,LocationLink:()=>rp,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>mu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>Ap,Position:()=>ae,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>Xp,SelectionRange:()=>xp,SemanticTokenModifiers:()=>Gp,SemanticTokenTypes:()=>Fp,SemanticTokens:()=>jp,SignatureInformation:()=>Ep,StringValue:()=>Wp,SymbolInformation:()=>wp,SymbolKind:()=>Sp,SymbolTag:()=>bp,TextDocument:()=>Qp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>up,TextDocumentItem:()=>dp,TextEdit:()=>rr,URI:()=>fu,VersionedTextDocumentIdentifier:()=>fp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>hu,WorkspaceFolder:()=>Zp,WorkspaceSymbol:()=>Ip,integer:()=>tp,uinteger:()=>_l});var ep,fu,tp,_l,ae,ee,Cl,rp,du,np,ap,ip,sp,pu,op,lp,cp,Sl,un,rr,fn,Ze,Tr,bl,Ra,$a,Aa,hu,hl,kd,hT,up,fp,wl,dp,mu,Ea,pp,hp,mp,gp,yp,vp,Tp,Rp,Il,$p,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Nl,Pp,Op,Lp,Dp,Mp,xp,Fp,Gp,jp,Up,zp,Bp,Kp,gu,yu,qp,Wp,Vp,Hp,Yp,Xp,Jp,Zp,mT,Qp,Ly,_,mc=UN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(ep||(ep={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(fu||(fu={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(tp||(tp={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(_l||(_l={})),function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o}(ae||(ae={})),function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ae.create(c,l),end:ae.create(u,f)};if(ae.is(c)&&ae.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ae.is(l.start)&&ae.is(l.end)}s(o,"is"),a.is=o}(ee||(ee={})),function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o}(Cl||(Cl={})),function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(rp||(rp={})),function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(du||(du={})),function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&du.is(l.color)}s(o,"is"),a.is=o}(np||(np={})),function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o}(ap||(ap={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(ip||(ip={})),function(a){function i(c,l,u,f,p,d){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(p)&&(m.kind=p),_.defined(d)&&(m.collapsedText=d),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o}(sp||(sp={})),function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o}(pu||(pu={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(op||(op={})),function(a){a.Unnecessary=1,a.Deprecated=2}(lp||(lp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i}(cp||(cp={})),function(a){function i(c,l,u,f,p,d){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(p)&&(m.source=p),_.defined(d)&&(m.relatedInformation=d),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,pu.is))}s(o,"is"),a.is=o}(Sl||(Sl={})),function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o}(un||(un={})),function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l}(rr||(rr={})),function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(fn||(fn={})),function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i}(Ze||(Ze={})),function(a){function i(u,f,p){return{range:u,newText:f,annotationId:p}}s(i,"replace"),a.replace=i;function o(u,f,p){return{range:{start:u,end:u},newText:f,annotationId:p}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Ze.is(f.annotationId))}s(l,"is"),a.is=l}(Tr||(Tr={})),function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(bl||(bl={})),function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}(Ra||(Ra={})),function(a){function i(c,l,u,f){let p={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(p.options=u),f!==void 0&&(p.annotationId=f),p}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}($a||($a={})),function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}(Aa||(Aa={})),function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i}(hu||(hu={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Ze.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Ze.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Ze.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),kd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Ze.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new kd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(wl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Ze.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Ze.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Ze.is(c)?u=c:l=c;let f,p;if(u===void 0?f=$a.create(i,o,l):(p=Ze.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,p)),this._workspaceEdit.documentChanges.push(f),p!==void 0)return p}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Ze.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Ze.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o}(up||(up={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o}(fp||(fp={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o}(wl||(wl={})),function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o}(dp||(dp={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i}(mu||(mu={})),function(a){function i(o){const c=o;return _.objectLiteral(o)&&mu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i}(Ea||(Ea={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(pp||(pp={})),function(a){a.PlainText=1,a.Snippet=2}(hp||(hp={})),function(a){a.Deprecated=1}(mp||(mp={})),function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o}(gp||(gp={})),function(a){a.asIs=1,a.adjustIndentation=2}(yp||(yp={})),function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i}(vp||(vp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(Tp||(Tp={})),function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i}(Rp||(Rp={})),function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o}(Il||(Il={})),function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i}($p||($p={})),function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i}(Ap||(Ap={})),function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i}(Ep||(Ep={})),function(a){a.Text=1,a.Read=2,a.Write=3}(_p||(_p={})),function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i}(Cp||(Cp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(Sp||(Sp={})),function(a){a.Deprecated=1}(bp||(bp={})),function(a){function i(o,c,l,u,f){let p={name:o,kind:c,location:{uri:u,range:l}};return f&&(p.containerName=f),p}s(i,"create"),a.create=i}(wp||(wp={})),function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i}(Ip||(Ip={})),function(a){function i(c,l,u,f,p,d){let m={name:c,detail:l,kind:u,range:f,selectionRange:p};return d!==void 0&&(m.children=d),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(Np||(Np={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(kp||(kp={})),function(a){a.Invoked=1,a.Automatic=2}(Nl||(Nl={})),function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(c,l,u){let f={title:c},p=!0;return typeof l=="string"?(p=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,p&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||hu.is(l.edit))}s(o,"is"),a.is=o}(Op||(Op={})),function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o}(Lp||(Lp={})),function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(Dp||(Dp={})),function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o}(Mp||(Mp={})),function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(xp||(xp={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(Fp||(Fp={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(Gp||(Gp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i}(jp||(jp={})),function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o}(Up||(Up={})),function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(zp||(zp={})),function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(Bp||(Bp={})),function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o}(Kp||(Kp={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(gu||(gu={})),function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o}(yu||(yu={})),function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ae.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,yu.is))&&(l.kind===void 0||gu.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o}(qp||(qp={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(Wp||(Wp={})),function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i}(Vp||(Vp={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(Hp||(Hp={})),function(a){a.Invoked=0,a.Automatic=1}(Yp||(Yp={})),function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i}(Xp||(Xp={})),function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i}(Jp||(Jp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&fu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i}(Zp||(Zp={})),mT=[`
|
|
1
|
+
var DN=Object.defineProperty;var MN=(t,e,r)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>MN(t,typeof e!="symbol"?e+"":e,r);import{_ as er}from"./main-DNu7P8AU.js";var xN=Object.create,hc=Object.defineProperty,FN=Object.getOwnPropertyDescriptor,Hh=Object.getOwnPropertyNames,GN=Object.getPrototypeOf,jN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),UN=(t,e)=>function(){return t&&(e=(0,t[Hh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Hh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Yh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Hh(e))!jN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=FN(e,a))||n.enumerable});return t},$f=(t,e,r)=>(Yh(t,e,"default"),r),Xh=(t,e,r)=>(r=t!=null?xN(GN(t)):{},Yh(hc(r,"default",{value:t,enumerable:!0}),t)),Jh=t=>Yh(hc({},"__esModule",{value:!0}),t),Af={};Qr(Af,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Ze,CodeAction:()=>Op,CodeActionContext:()=>Pp,CodeActionKind:()=>kp,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>cp,CodeLens:()=>Lp,Color:()=>du,ColorInformation:()=>np,ColorPresentation:()=>ap,Command:()=>un,CompletionItem:()=>Tp,CompletionItemKind:()=>pp,CompletionItemLabelDetails:()=>vp,CompletionItemTag:()=>mp,CompletionList:()=>Rp,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>pu,DiagnosticSeverity:()=>op,DiagnosticTag:()=>lp,DocumentHighlight:()=>Cp,DocumentHighlightKind:()=>_p,DocumentLink:()=>Mp,DocumentSymbol:()=>Np,DocumentUri:()=>ep,EOL:()=>mT,FoldingRange:()=>sp,FoldingRangeKind:()=>ip,FormattingOptions:()=>Dp,Hover:()=>$p,InlayHint:()=>qp,InlayHintKind:()=>gu,InlayHintLabelPart:()=>yu,InlineCompletionContext:()=>Jp,InlineCompletionItem:()=>Vp,InlineCompletionList:()=>Hp,InlineCompletionTriggerKind:()=>Yp,InlineValueContext:()=>Kp,InlineValueEvaluatableExpression:()=>Bp,InlineValueText:()=>Up,InlineValueVariableLookup:()=>zp,InsertReplaceEdit:()=>gp,InsertTextFormat:()=>hp,InsertTextMode:()=>yp,Location:()=>Cl,LocationLink:()=>rp,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>mu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>Ap,Position:()=>ae,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>Xp,SelectionRange:()=>xp,SemanticTokenModifiers:()=>Gp,SemanticTokenTypes:()=>Fp,SemanticTokens:()=>jp,SignatureInformation:()=>Ep,StringValue:()=>Wp,SymbolInformation:()=>wp,SymbolKind:()=>Sp,SymbolTag:()=>bp,TextDocument:()=>Qp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>up,TextDocumentItem:()=>dp,TextEdit:()=>rr,URI:()=>fu,VersionedTextDocumentIdentifier:()=>fp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>hu,WorkspaceFolder:()=>Zp,WorkspaceSymbol:()=>Ip,integer:()=>tp,uinteger:()=>_l});var ep,fu,tp,_l,ae,ee,Cl,rp,du,np,ap,ip,sp,pu,op,lp,cp,Sl,un,rr,fn,Ze,Tr,bl,Ra,$a,Aa,hu,hl,kd,hT,up,fp,wl,dp,mu,Ea,pp,hp,mp,gp,yp,vp,Tp,Rp,Il,$p,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Nl,Pp,Op,Lp,Dp,Mp,xp,Fp,Gp,jp,Up,zp,Bp,Kp,gu,yu,qp,Wp,Vp,Hp,Yp,Xp,Jp,Zp,mT,Qp,Ly,_,mc=UN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(ep||(ep={})),function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i}(fu||(fu={})),function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(tp||(tp={})),function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i}(_l||(_l={})),function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o}(ae||(ae={})),function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ae.create(c,l),end:ae.create(u,f)};if(ae.is(c)&&ae.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ae.is(l.start)&&ae.is(l.end)}s(o,"is"),a.is=o}(ee||(ee={})),function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o}(Cl||(Cl={})),function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o}(rp||(rp={})),function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o}(du||(du={})),function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&du.is(l.color)}s(o,"is"),a.is=o}(np||(np={})),function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o}(ap||(ap={})),function(a){a.Comment="comment",a.Imports="imports",a.Region="region"}(ip||(ip={})),function(a){function i(c,l,u,f,p,d){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(p)&&(m.kind=p),_.defined(d)&&(m.collapsedText=d),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o}(sp||(sp={})),function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o}(pu||(pu={})),function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4}(op||(op={})),function(a){a.Unnecessary=1,a.Deprecated=2}(lp||(lp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i}(cp||(cp={})),function(a){function i(c,l,u,f,p,d){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(p)&&(m.source=p),_.defined(d)&&(m.relatedInformation=d),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,pu.is))}s(o,"is"),a.is=o}(Sl||(Sl={})),function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o}(un||(un={})),function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l}(rr||(rr={})),function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o}(fn||(fn={})),function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i}(Ze||(Ze={})),function(a){function i(u,f,p){return{range:u,newText:f,annotationId:p}}s(i,"replace"),a.replace=i;function o(u,f,p){return{range:{start:u,end:u},newText:f,annotationId:p}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Ze.is(f.annotationId))}s(l,"is"),a.is=l}(Tr||(Tr={})),function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o}(bl||(bl={})),function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}(Ra||(Ra={})),function(a){function i(c,l,u,f){let p={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(p.options=u),f!==void 0&&(p.annotationId=f),p}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}($a||($a={})),function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Ze.is(l.annotationId))}s(o,"is"),a.is=o}(Aa||(Aa={})),function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i}(hu||(hu={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Ze.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Ze.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Ze.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),kd=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Ze.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new kd(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(wl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new kd,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Ze.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Ze.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Ze.is(c)?u=c:l=c;let f,p;if(u===void 0?f=$a.create(i,o,l):(p=Ze.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,p)),this._workspaceEdit.documentChanges.push(f),p!==void 0)return p}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Ze.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Ze.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o}(up||(up={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o}(fp||(fp={})),function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o}(wl||(wl={})),function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o}(dp||(dp={})),function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i}(mu||(mu={})),function(a){function i(o){const c=o;return _.objectLiteral(o)&&mu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i}(Ea||(Ea={})),function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25}(pp||(pp={})),function(a){a.PlainText=1,a.Snippet=2}(hp||(hp={})),function(a){a.Deprecated=1}(mp||(mp={})),function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o}(gp||(gp={})),function(a){a.asIs=1,a.adjustIndentation=2}(yp||(yp={})),function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i}(vp||(vp={})),function(a){function i(o){return{label:o}}s(i,"create"),a.create=i}(Tp||(Tp={})),function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i}(Rp||(Rp={})),function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o}(Il||(Il={})),function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i}($p||($p={})),function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i}(Ap||(Ap={})),function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i}(Ep||(Ep={})),function(a){a.Text=1,a.Read=2,a.Write=3}(_p||(_p={})),function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i}(Cp||(Cp={})),function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26}(Sp||(Sp={})),function(a){a.Deprecated=1}(bp||(bp={})),function(a){function i(o,c,l,u,f){let p={name:o,kind:c,location:{uri:u,range:l}};return f&&(p.containerName=f),p}s(i,"create"),a.create=i}(wp||(wp={})),function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i}(Ip||(Ip={})),function(a){function i(c,l,u,f,p,d){let m={name:c,detail:l,kind:u,range:f,selectionRange:p};return d!==void 0&&(m.children=d),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o}(Np||(Np={})),function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"}(kp||(kp={})),function(a){a.Invoked=1,a.Automatic=2}(Nl||(Nl={})),function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o}(Pp||(Pp={})),function(a){function i(c,l,u){let f={title:c},p=!0;return typeof l=="string"?(p=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,p&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||hu.is(l.edit))}s(o,"is"),a.is=o}(Op||(Op={})),function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o}(Lp||(Lp={})),function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o}(Dp||(Dp={})),function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o}(Mp||(Mp={})),function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o}(xp||(xp={})),function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"}(Fp||(Fp={})),function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"}(Gp||(Gp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i}(jp||(jp={})),function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o}(Up||(Up={})),function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o}(zp||(zp={})),function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o}(Bp||(Bp={})),function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o}(Kp||(Kp={})),function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i}(gu||(gu={})),function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o}(yu||(yu={})),function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ae.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,yu.is))&&(l.kind===void 0||gu.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o}(qp||(qp={})),function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i}(Wp||(Wp={})),function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i}(Vp||(Vp={})),function(a){function i(o){return{items:o}}s(i,"create"),a.create=i}(Hp||(Hp={})),function(a){a.Invoked=0,a.Automatic=1}(Yp||(Yp={})),function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i}(Xp||(Xp={})),function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i}(Jp||(Jp={})),function(a){function i(o){const c=o;return _.objectLiteral(c)&&fu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i}(Zp||(Zp={})),mT=[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`,"\r"],function(a){function i(u,f,p,d){return new Ly(u,f,p,d)}s(i,"create"),a.create=i;function o(u){let f=u;return!!(_.defined(f)&&_.string(f.uri)&&(_.undefined(f.languageId)||_.string(f.languageId))&&_.uinteger(f.lineCount)&&_.func(f.getText)&&_.func(f.positionAt)&&_.func(f.offsetAt))}s(o,"is"),a.is=o;function c(u,f){let p=u.getText(),d=l(f,(g,v)=>{let A=g.range.start.line-v.range.start.line;return A===0?g.range.start.character-v.range.start.character:A}),m=p.length;for(let g=d.length-1;g>=0;g--){let v=d[g],A=u.offsetAt(v.range.start),T=u.offsetAt(v.range.end);if(T<=m)p=p.substring(0,A)+v.newText+p.substring(T,p.length);else throw new Error("Overlapping edit");m=A}return p}s(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const p=u.length/2|0,d=u.slice(0,p),m=u.slice(p);l(d,f),l(m,f);let g=0,v=0,A=0;for(;g<d.length&&v<m.length;)f(d[g],m[v])<=0?u[A++]=d[g++]:u[A++]=m[v++];for(;g<d.length;)u[A++]=d[g++];for(;v<m.length;)u[A++]=m[v++];return u}s(l,"mergeSort")}(Qp||(Qp={})),Ly=(n=class{constructor(i,o,c,l){this._uri=i,this._languageId=o,this._version=c,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),c=this.offsetAt(i.end);return this._content.substring(o,c)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,c=!0;for(let l=0;l<o.length;l++){c&&(i.push(l),c=!1);let u=o.charAt(l);c=u==="\r"||u===`
|
|
4
4
|
`,u==="\r"&&l+1<o.length&&o.charAt(l+1)===`
|
package/dist/assets/{wardleyDiagram-YWT4CUSO-3TLDK7Y6.js → wardleyDiagram-YWT4CUSO-Da-1FJ9m.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a$ as Et,a0 as Yt,a4 as It,b2 as Bt,a1 as Ft,b0 as Rt,b as m,ad as Ot,a2 as Wt,s as dt,aC as ct,a_ as Dt,E as Gt,t as qt,a3 as et}from"./mermaid.core-
|
|
1
|
+
import{a$ as Et,a0 as Yt,a4 as It,b2 as Bt,a1 as Ft,b0 as Rt,b as m,ad as Ot,a2 as Wt,s as dt,aC as ct,a_ as Dt,E as Gt,t as qt,a3 as et}from"./mermaid.core-D0obZElW.js";import{p as Ht}from"./chunk-4BX2VUAB-IBWLnx_7.js";import{p as jt}from"./wardley-L42UT6IY-N5EX1ou0.js";import"./main-DNu7P8AU.js";import"./dataResults-B1swefI5.js";var J=m((r,o)=>{const e=r<=1?r*100:r;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${r}`);return e},"toPercent"),F=m((r,o,e)=>({x:J(o,`${e} evolution`),y:J(r,`${e} visibility`)}),"toCoordinates"),lt=m(r=>{if(r){if(r==="+<>")return"bidirectional";if(r==="+<")return"backward";if(r==="+>")return"forward"}},"getFlowFromPort"),Vt=m(r=>{if(!(r!=null&&r.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(r),e=o==null?void 0:o[1];return r.includes("<>")?{flow:"bidirectional",label:e}:r.includes("<")?{flow:"backward",label:e}:r.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),_t=m((r,o)=>{if(Ht(r,o),r.size&&o.setSize(r.size.width,r.size.height),r.evolution){const e=r.evolution.stages.map(a=>a.secondName?`${a.name.trim()} / ${a.secondName.trim()}`:a.name.trim()),h=r.evolution.stages.filter(a=>a.boundary!==void 0).map(a=>a.boundary);o.updateAxes({stages:e,stageBoundaries:h})}if(r.anchors.forEach(e=>{const h=F(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,h.x,h.y,"anchor")}),r.components.forEach(e=>{var w;const h=F(e.visibility,e.evolution,`Component "${e.name}"`),a=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,y=(w=e.decorator)==null?void 0:w.strategy;o.addNode(e.name,e.name,h.x,h.y,"component",a,d,e.inertia,y)}),r.notes.forEach(e=>{const h=F(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,h.x,h.y)}),r.pipelines.forEach(e=>{const h=o.getNode(e.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const a=h.y;o.startPipeline(e.parent),e.components.forEach(d=>{const y=`${e.parent}_${d.name}`,w=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,S=J(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(y,d.name,S,a,"pipeline-component",w,g),o.addPipelineComponent(e.parent,y)})}),r.links.forEach(e=>{var S;const h=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let a=(S=lt(e.fromPort))!=null?S:lt(e.toPort);const{flow:d,label:y}=Vt(e.arrow);!a&&d&&(a=d);const w=e.linkLabel,g=y!=null?y:w;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),h,g,a)}),r.evolves.forEach(e=>{const h=o.getNode(e.component);if((h==null?void 0:h.y)!==void 0){const a=J(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,a,h.y)}}),r.annotations.length>0){const e=r.annotations[0],h=F(e.x,e.y,"Annotations box");o.setAnnotationsBox(h.x,h.y)}r.annotation.forEach(e=>{const h=F(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:h.x,y:h.y}],e.text)}),r.accelerators.forEach(e=>{const h=F(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,h.x,h.y)}),r.deaccelerators.forEach(e=>{const h=F(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,h.x,h.y)})},"populateDb"),pt={parser:{yy:void 0},parse:m(async r=>{var h;const o=await jt("wardley",r);ct.debug(o);const e=(h=pt.parser)==null?void 0:h.yy;if(!e||typeof e.addNode!="function")throw new 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.");_t(o,e)},"parse")},W,Zt=(W=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={}}addNode(o){var a,d,y,w;const e=(a=this.nodes.get(o.id))!=null?a:{id:o.id,label:o.label},h={...e,...o,className:(d=o.className)!=null?d:e.className,labelOffsetX:(y=o.labelOffsetX)!=null?y:e.labelOffsetX,labelOffsetY:(w=o.labelOffsetY)!=null?w:e.labelOffsetY};this.nodes.set(o.id,h)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const h=this.pipelines.get(o);h&&h.componentIds.push(e);const a=this.nodes.get(e);a&&(a.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,h]of this.nodes)if(h.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,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}},m(W,"WardleyBuilder"),W),v=new Zt;function ht(){return et()["wardley-beta"]}m(ht,"getConfig");function xt(r,o,e,h,a,d,y,w,g){v.addNode({id:r,label:o,x:e,y:h,className:a,labelOffsetX:d,labelOffsetY:y,inertia:w,sourceStrategy:g})}m(xt,"addNode");function ft(r,o,e=!1,h,a){v.addLink({source:r,target:o,dashed:e,label:h,flow:a})}m(ft,"addLink");function gt(r,o,e){v.addTrend({nodeId:r,targetX:o,targetY:e})}m(gt,"addTrend");function ut(r,o,e){v.addAnnotation({number:r,coordinates:o,text:e})}m(ut,"addAnnotation");function yt(r,o,e){v.addNote({text:r,x:o,y:e})}m(yt,"addNote");function mt(r,o,e){v.addAccelerator({name:r,x:o,y:e})}m(mt,"addAccelerator");function wt(r,o,e){v.addDeaccelerator({name:r,x:o,y:e})}m(wt,"addDeaccelerator");function kt(r,o){v.setAnnotationsBox(r,o)}m(kt,"setAnnotationsBox");function bt(r,o){v.setSize(r,o)}m(bt,"setSize");function $t(r){v.startPipeline(r)}m($t,"startPipeline");function vt(r,o){v.addPipelineComponent(r,o)}m(vt,"addPipelineComponent");function Pt(r){v.setAxes(r)}m(Pt,"updateAxes");function St(r){return v.getNode(r)}m(St,"getNode");function Mt(r){return v.resolveNodeId(r)}m(Mt,"resolveNodeId");function Nt(){return v.build()}m(Nt,"getWardleyData");function Ct(){v.clear(),qt()}m(Ct,"clear");var Ut={getConfig:ht,addNode:xt,addLink:ft,addTrend:gt,addAnnotation:ut,addNote:yt,addAccelerator:mt,addDeaccelerator:wt,setAnnotationsBox:kt,setSize:bt,startPipeline:$t,addPipelineComponent:vt,updateAxes:Pt,getNode:St,resolveNodeId:Mt,getWardleyData:Nt,clear:Ct,setAccTitle:Rt,getAccTitle:Ft,setDiagramTitle:Bt,getDiagramTitle:It,getAccDescription:Yt,setAccDescription:Et},Jt=["Genesis","Custom Built","Product","Commodity"],Kt=m(()=>{var o,e,h,a,d,y,w,g,S,N,b,T,$,R,L,A,C,z,I,H,j,X,l,D,G,q,V,_,K;const{themeVariables:r}=et();return{backgroundColor:(h=(e=(o=r.wardley)==null?void 0:o.backgroundColor)!=null?e:r.background)!=null?h:"#fff",axisColor:(d=(a=r.wardley)==null?void 0:a.axisColor)!=null?d:"#000",axisTextColor:(g=(w=(y=r.wardley)==null?void 0:y.axisTextColor)!=null?w:r.primaryTextColor)!=null?g:"#222",gridColor:(N=(S=r.wardley)==null?void 0:S.gridColor)!=null?N:"rgba(100, 100, 100, 0.2)",componentFill:(T=(b=r.wardley)==null?void 0:b.componentFill)!=null?T:"#fff",componentStroke:(R=($=r.wardley)==null?void 0:$.componentStroke)!=null?R:"#000",componentLabelColor:(C=(A=(L=r.wardley)==null?void 0:L.componentLabelColor)!=null?A:r.primaryTextColor)!=null?C:"#222",linkStroke:(I=(z=r.wardley)==null?void 0:z.linkStroke)!=null?I:"#000",evolutionStroke:(j=(H=r.wardley)==null?void 0:H.evolutionStroke)!=null?j:"#dc3545",annotationStroke:(l=(X=r.wardley)==null?void 0:X.annotationStroke)!=null?l:"#000",annotationTextColor:(q=(G=(D=r.wardley)==null?void 0:D.annotationTextColor)!=null?G:r.primaryTextColor)!=null?q:"#222",annotationFill:(K=(_=(V=r.wardley)==null?void 0:V.annotationFill)!=null?_:r.background)!=null?K:"#fff"}},"getTheme"),Qt=m(()=>{var o,e,h,a,d,y,w,g,S;const r=et()["wardley-beta"];return{width:(o=r==null?void 0:r.width)!=null?o:900,height:(e=r==null?void 0:r.height)!=null?e:600,padding:(h=r==null?void 0:r.padding)!=null?h:48,nodeRadius:(a=r==null?void 0:r.nodeRadius)!=null?a:6,nodeLabelOffset:(d=r==null?void 0:r.nodeLabelOffset)!=null?d:8,axisFontSize:(y=r==null?void 0:r.axisFontSize)!=null?y:12,labelFontSize:(w=r==null?void 0:r.labelFontSize)!=null?w:10,showGrid:(g=r==null?void 0:r.showGrid)!=null?g:!1,useMaxWidth:(S=r==null?void 0:r.useMaxWidth)!=null?S:!0}},"getConfigValues"),te=m((r,o,e,h)=>{var at,rt,ot,st,nt,it;ct.debug(`Rendering Wardley map
|
|
2
2
|
`+r);const a=Qt(),d=Kt(),y=a.nodeRadius*1.6,w=h.db,g=w.getWardleyData(),S=w.getDiagramTitle(),N=(rt=(at=g.size)==null?void 0:at.width)!=null?rt:a.width,b=(st=(ot=g.size)==null?void 0:ot.height)!=null?st:a.height,T=Dt(o);T.selectAll("*").remove(),Gt(T,b,N,a.useMaxWidth),T.attr("viewBox",`0 0 ${N} ${b}`);const $=T.append("g").attr("class","wardley-map"),R=T.append("defs");R.append("marker").attr("id",`arrow-${o}`).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",d.evolutionStroke).attr("stroke","none"),R.append("marker").attr("id",`link-arrow-end-${o}`).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",d.linkStroke).attr("stroke","none"),R.append("marker").attr("id",`link-arrow-start-${o}`).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",d.linkStroke).attr("stroke","none"),$.append("rect").attr("class","wardley-background").attr("width",N).attr("height",b).attr("fill",d.backgroundColor);const L=N-a.padding*2,A=b-a.padding*2;S&&$.append("text").attr("class","wardley-title").attr("x",N/2).attr("y",a.padding/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(S);const C=m(t=>a.padding+t/100*L,"projectX"),z=m(t=>b-a.padding-t/100*A,"projectY"),I=$.append("g").attr("class","wardley-axes");I.append("line").attr("x1",a.padding).attr("x2",N-a.padding).attr("y1",b-a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1),I.append("line").attr("x1",a.padding).attr("x2",a.padding).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const H=(nt=g.axes.xLabel)!=null?nt:"Evolution",j=(it=g.axes.yLabel)!=null?it:"Visibility";I.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",a.padding+L/2).attr("y",b-a.padding/4).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(H),I.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",a.padding/3).attr("y",a.padding+A/2).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${a.padding/3} ${a.padding+A/2})`).text(j);const X=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:Jt;if(X.length>0){const t=$.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===X.length){let i=0;n.forEach(c=>{s.push({start:i,end:c}),i=c})}else{const i=1/X.length;X.forEach((c,p)=>{s.push({start:p*i,end:(p+1)*i})})}X.forEach((i,c)=>{const p=s[c],x=a.padding+p.start*L,f=a.padding+p.end*L,u=(x+f)/2;c>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-a.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",a.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(a.showGrid){const t=$.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=a.padding+L*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",a.padding).attr("y2",b-a.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",a.padding).attr("x2",N-a.padding).attr("y1",b-a.padding-A*s).attr("y2",b-a.padding-A*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const l=new Map;if(g.nodes.forEach(t=>{l.set(t.id,{x:C(t.x),y:z(t.y),node:t})}),g.pipelines.length>0){const t=$.append("g").attr("class","wardley-pipelines"),n=$.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:l.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],k=i[f+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",k.pos.x).attr("y2",k.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let c=1/0,p=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=l.get(f);u&&(c=Math.min(c,u.x),p=Math.max(p,u.x),x=u.y)}),c!==1/0&&p!==-1/0){const u=a.nodeRadius*4,k=x-u/2,M=l.get(s.nodeId);if(M){const Y=(c+p)/2;M.x=Y,M.y=k-y/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",c-15).attr("y",k).attr("width",p-c+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const D=$.append("g").attr("class","wardley-links"),G=new Map;g.pipelines.forEach(t=>{G.set(t.nodeId,new Set(t.componentIds))});const q=g.links.filter(t=>{if(!l.has(t.source)||!l.has(t.target))return!1;const n=G.get(t.target);return!(n!=null&&n.has(t.source))});D.selectAll("line").data(q).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=l.get(t.source),s=l.get(t.target),c=g.nodes.find(u=>u.id===t.source).isPipelineParent?y/Math.sqrt(2):a.nodeRadius,p=s.x-n.x,x=s.y-n.y,f=Math.sqrt(p*p+x*x);return n.x+p/f*c}).attr("y1",t=>{const n=l.get(t.source),s=l.get(t.target),c=g.nodes.find(u=>u.id===t.source).isPipelineParent?y/Math.sqrt(2):a.nodeRadius,p=s.x-n.x,x=s.y-n.y,f=Math.sqrt(p*p+x*x);return n.y+x/f*c}).attr("x2",t=>{const n=l.get(t.source),s=l.get(t.target),c=g.nodes.find(u=>u.id===t.target).isPipelineParent?y/Math.sqrt(2):a.nodeRadius,p=n.x-s.x,x=n.y-s.y,f=Math.sqrt(p*p+x*x);return s.x+p/f*c}).attr("y2",t=>{const n=l.get(t.source),s=l.get(t.target),c=g.nodes.find(u=>u.id===t.target).isPipelineParent?y/Math.sqrt(2):a.nodeRadius,p=n.x-s.x,x=n.y-s.y,f=Math.sqrt(p*p+x*x);return s.y+x/f*c}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),D.selectAll("text").data(q.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=l.get(t.source),s=l.get(t.target),i=(n.x+s.x)/2,c=s.y-n.y,p=s.x-n.x,x=Math.sqrt(p*p+c*c),f=8,u=c/x;return i+u*f}).attr("y",t=>{const n=l.get(t.source),s=l.get(t.target),i=(n.y+s.y)/2,c=s.x-n.x,p=s.y-n.y,x=Math.sqrt(c*c+p*p),f=8,u=-c/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",a.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=l.get(t.source),s=l.get(t.target),i=(n.x+s.x)/2,c=(n.y+s.y)/2,p=s.x-n.x,x=s.y-n.y,f=Math.sqrt(p*p+x*x),u=8,k=x/f,M=-p/f,Y=i+k*u,Z=c+M*u;let O=Math.atan2(x,p)*180/Math.PI;return(O>90||O<-90)&&(O+=180),`rotate(${O} ${Y} ${Z})`}).text(t=>t.label);const V=$.append("g").attr("class","wardley-trends"),_=g.trends.map(t=>{const n=l.get(t.nodeId);if(!n)return null;const s=C(t.targetX),i=z(t.targetY),c=s-n.x,p=i-n.y,x=Math.sqrt(c*c+p*p),f=a.nodeRadius+2,u=x>f?s-c/x*f:s,k=x>f?i-p/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:k}}).filter(t=>t!==null);V.selectAll("line").data(_).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",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${o})`);const E=$.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));E.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),E.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),E.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const B=E.filter(t=>t.sourceStrategy==="market");B.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y).attr("r",a.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),E.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y).attr("r",a.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const Q=a.nodeRadius*.7,P=a.nodeRadius*1.2;if(B.append("line").attr("class","wardley-market-line").attr("x1",t=>l.get(t.id).x).attr("y1",t=>l.get(t.id).y-P).attr("x2",t=>l.get(t.id).x-P*Math.cos(Math.PI/6)).attr("y2",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),B.append("line").attr("class","wardley-market-line").attr("x1",t=>l.get(t.id).x-P*Math.cos(Math.PI/6)).attr("y1",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("x2",t=>l.get(t.id).x+P*Math.cos(Math.PI/6)).attr("y2",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),B.append("line").attr("class","wardley-market-line").attr("x1",t=>l.get(t.id).x+P*Math.cos(Math.PI/6)).attr("y1",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("x2",t=>l.get(t.id).x).attr("y2",t=>l.get(t.id).y-P).attr("stroke",d.componentStroke).attr("stroke-width",1),B.append("circle").attr("class","wardley-market-dot").attr("cx",t=>l.get(t.id).x).attr("cy",t=>l.get(t.id).y-P).attr("r",Q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),B.append("circle").attr("class","wardley-market-dot").attr("cx",t=>l.get(t.id).x-P*Math.cos(Math.PI/6)).attr("cy",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("r",Q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),B.append("circle").attr("class","wardley-market-dot").attr("cx",t=>l.get(t.id).x+P*Math.cos(Math.PI/6)).attr("cy",t=>l.get(t.id).y+P*Math.sin(Math.PI/6)).attr("r",Q).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),E.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>l.get(t.id).x-y/2).attr("y",t=>l.get(t.id).y-y/2).attr("width",y).attr("height",y).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),E.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=l.get(t.id);let s=t.isPipelineParent?y/2+15:a.nodeRadius+15;return t.sourceStrategy&&(s+=a.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=l.get(t.id),s=t.isPipelineParent?y:a.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=l.get(t.id);let s=t.isPipelineParent?y/2+15:a.nodeRadius+15;return t.sourceStrategy&&(s+=a.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=l.get(t.id),s=t.isPipelineParent?y:a.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),E.append("text").attr("x",t=>{var c;const n=l.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=(c=t.labelOffsetX)!=null?c:s;return n.x+i}).attr("y",t=>{var c;const n=l.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-a.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=(c=t.labelOffsetY)!=null?c:s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",a.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),g.annotations.length>0){const t=$.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:C(i.x),y:z(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const c=t.append("g").attr("class","wardley-annotation");c.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),c.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=C(g.annotationsBox.x),s=z(g.annotationsBox.y);const i=10,c=16,p=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(k=>k.text).sort((k,M)=>k.number-M.number),u=[];if(f.forEach((k,M)=>{const Y=x.append("text").attr("x",n+i).attr("y",s+i+(M+1)*c).attr("font-size",p).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${k.number}. ${k.text}`);u.push(Y)}),u.length>0){let k=0,M=0;u.forEach(tt=>{const U=tt.node(),At=U.getComputedTextLength();k=Math.max(k,At);const Xt=U.getBBox();M=Math.max(M,Xt.height)});const Y=k+i*2+105,Z=f.length*c+i*2+M/2,O=a.padding,zt=N-a.padding-Y,Tt=a.padding,Lt=b-a.padding-Z;n=Math.max(O,Math.min(n,zt)),s=Math.max(Tt,Math.min(s,Lt)),u.forEach((tt,U)=>{tt.attr("x",n+i).attr("y",s+i+(U+1)*c)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",Y).attr("height",Z).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=$.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=C(n.x),i=z(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=$.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=C(n.x),i=z(n.y),c=60,p=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-p/2}
|
|
4
4
|
L ${s+c-x} ${i-p/2}
|
|
@@ -75,4 +75,4 @@ import{a$ as Et,a0 as Yt,a4 as It,b2 as Bt,a1 as Ft,b0 as Rt,b as m,ad as Ot,a2
|
|
|
75
75
|
.wardley-notes text {
|
|
76
76
|
fill: ${a.axisTextColor};
|
|
77
77
|
}
|
|
78
|
-
`},"styles"),
|
|
78
|
+
`},"styles"),de={parser:pt,db:Ut,renderer:ee,styles:ae};export{de as diagram};
|
package/dist/assets/{xychartDiagram-2RQKCTM6-CX1rEnVo.js → xychartDiagram-2RQKCTM6-DzLfacO5.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{a$ as gi,a0 as xi,a4 as Xt,b2 as di,a1 as fi,b0 as pi,b as a,aC as Yt,a_ as mi,E as yi,t as bi,a2 as _t,aX as Ai,s as Nt,S as wi,ad as Ci,A as Si,az as Wt}from"./mermaid.core-
|
|
1
|
+
import{a$ as gi,a0 as xi,a4 as Xt,b2 as di,a1 as fi,b0 as pi,b as a,aC as Yt,a_ as mi,E as yi,t as bi,a2 as _t,aX as Ai,s as Nt,S as wi,ad as Ci,A as Si,az as Wt}from"./mermaid.core-D0obZElW.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-B91Fgz-z.js";import"./main-DNu7P8AU.js";import"./dataResults-B1swefI5.js";import"./defaultLocale-CrowFXzY.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var M=Ri(y).map(function(m){return v+o*m});return i(E?M.reverse():M)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],M=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:M,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,Mt=0,hi=2,It=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc=="undefined"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||It,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var I,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((I===null||typeof I=="undefined")&&(I=Vt()),z=rt[q]&&rt[q][I]),typeof z=="undefined"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[I]||I)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(I==It?"end of input":"'"+(this.terminals_[I]||I)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[I]||I,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+I);switch(z[0]){case 1:g.push(I),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),I=null,Mt=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,Mt,ct,$.yy,z[1],C,r].concat(li)),typeof mt!="undefined")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
|
5
5
|
`+c+"^"},"showPosition"),test_match:a(function(h,c){var g,x,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),x=h[0].match(/(?:\r\n?|\n).*/g),x&&(this.yylineno+=x.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:x?x[x.length-1].length-x[x.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+h[0].length},this.yytext+=h[0],this.match+=h[0],this.matches=h,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(h[0].length),this.matched+=h[0],g=this.performAction.call(this,this.yy,this,c,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),g)return g;if(this._backtrack){for(var r in C)this[r]=C[r];return!1}return!1},"test_match"),next:a(function(){if(this.done)return this.EOF;this._input||(this.done=!0);var h,c,g,x;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),r=0;r<C.length;r++)if(g=this._input.match(this.rules[C[r]]),g&&(!c||g[0].length>c[0].length)){if(c=g,x=r,this.options.backtrack_lexer){if(h=this.test_match(g,C[r]),h!==!1)return h;if(this._backtrack){c=!1;continue}else return!1}else if(!this.options.flex)break}return c?(h=this.test_match(c,C[x]),h!==!1?h:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
6
6
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:a(function(){var c=this.next();return c||this.lex()},"lex"),begin:a(function(c){this.conditionStack.push(c)},"begin"),popState:a(function(){var c=this.conditionStack.length-1;return c>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:a(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:a(function(c){return c=this.conditionStack.length-1-Math.abs(c||0),c>=0?this.conditionStack[c]:"INITIAL"},"topState"),pushState:a(function(c){this.begin(c)},"pushState"),stateStackSize:a(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:a(function(c,g,x,C){switch(x){case 0:break;case 1:break;case 2:return this.popState(),34;case 3:return this.popState(),34;case 4:return 34;case 5:break;case 6:return 10;case 7:return this.pushState("acc_title"),19;case 8:return this.popState(),"acc_title_value";case 9:return this.pushState("acc_descr"),21;case 10:return this.popState(),"acc_descr_value";case 11:this.pushState("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 5;case 15:return 5;case 16:return 8;case 17:return this.pushState("axis_data"),"X_AXIS";case 18:return this.pushState("axis_data"),"Y_AXIS";case 19:return this.pushState("axis_band_data"),24;case 20:return 31;case 21:return this.pushState("data"),16;case 22:return this.pushState("data"),18;case 23:return this.pushState("data_inner"),24;case 24:return 27;case 25:return this.popState(),26;case 26:this.popState();break;case 27:this.pushState("string");break;case 28:this.popState();break;case 29:return"STR";case 30:return 24;case 31:return 26;case 32:return 43;case 33:return"COLON";case 34:return 44;case 35:return 28;case 36:return 45;case 37:return 46;case 38:return 48;case 39:return 50;case 40:return 47;case 41:return 41;case 42:return 49;case 43:return 42;case 44:break;case 45:return 35;case 46:return 36}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:(\r?\n))/i,/^(?:(\r?\n))/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:title\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:\})/i,/^(?:[^\}]*)/i,/^(?:xychart-beta\b)/i,/^(?:xychart\b)/i,/^(?:(?:vertical|horizontal))/i,/^(?:x-axis\b)/i,/^(?:y-axis\b)/i,/^(?:\[)/i,/^(?:-->)/i,/^(?:line\b)/i,/^(?:bar\b)/i,/^(?:\[)/i,/^(?:[+-]?(?:\d+(?:\.\d+)?|\.\d+))/i,/^(?:\])/i,/^(?:(?:`\) \{ this\.pushState\(md_string\); \}\n<md_string>\(\?:\(\?!`"\)\.\)\+ \{ return MD_STR; \}\n<md_string>\(\?:`))/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:\[)/i,/^(?:\])/i,/^(?:[A-Za-z]+)/i,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s+)/i,/^(?:;)/i,/^(?:$)/i],conditions:{data_inner:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,24,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,18,21,22,23,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,25,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,22,24,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[28,29],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,18,21,22,26,27,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};return F}();V.lexer=k;function H(){this.yy={}}return a(H,"Parser"),H.prototype=V,V.Parser=H,new H}();At.parser=At;var Ti=At;function wt(e){return e.type==="bar"}a(wt,"isBarPlot");function kt(e){return e.type==="band"}a(kt,"isBandAxisData");function j(e){return e.type==="linear"}a(j,"isLinearAxisData");var Q,Ht=(Q=class{constructor(t){this.parentGroup=t}getMaxDimension(t,i){if(!this.parentGroup)return{width:t.reduce((o,u)=>Math.max(u.length,o),0)*i,height:i};const s={width:0,height:0},n=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",i);for(const o of t){const u=Si(n,1,o),p=u?u.width:o.length*i,f=u?u.height:i;s.width=Math.max(s.width,p),s.height=Math.max(s.height,f)}return n.remove(),s}},a(Q,"TextDimensionCalculatorWithFont"),Q),Ot=.7,Ft=.2,K,Ut=(K=class{constructor(t,i,s,n){this.axisConfig=t,this.title=i,this.textDimensionCalculator=s,this.axisThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left",this.showTitle=!1,this.showLabel=!1,this.showTick=!1,this.showAxisLine=!1,this.outerPadding=0,this.titleTextHeight=0,this.labelTextHeight=0,this.range=[0,10],this.boundingRect={x:0,y:0,width:0,height:0},this.axisPosition="left"}setRange(t){this.range=t,this.axisPosition==="left"||this.axisPosition==="right"?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){const t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){Ot*this.getTickDistance()>this.outerPadding*2&&(this.outerPadding=Math.floor(Ot*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let i=t.height;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.width;this.outerPadding=Math.min(s.width/2,n);const o=s.height+this.axisConfig.labelPadding*2;this.labelTextHeight=s.height,o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width,this.boundingRect.height=t.height-i}calculateSpaceIfDrawnVertical(t){let i=t.width;if(this.axisConfig.showAxisLine&&i>this.axisConfig.axisLineWidth&&(i-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel){const s=this.getLabelDimension(),n=Ft*t.height;this.outerPadding=Math.min(s.height/2,n);const o=s.width+this.axisConfig.labelPadding*2;o<=i&&(i-=o,this.showLabel=!0)}if(this.axisConfig.showTick&&i>=this.axisConfig.tickLength&&(this.showTick=!0,i-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title){const s=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize),n=s.height+this.axisConfig.titlePadding*2;this.titleTextHeight=s.height,n<=i&&(i-=n,this.showTitle=!0)}this.boundingRect.width=t.width-i,this.boundingRect.height=t.height}calculateSpace(t){return this.axisPosition==="left"||this.axisPosition==="right"?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${i},${this.boundingRect.y} L ${i},${this.boundingRect.y+this.boundingRect.height} `,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["left-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.boundingRect.x+this.boundingRect.width-(this.showLabel?this.axisConfig.labelPadding:0)-(this.showTick?this.axisConfig.tickLength:0)-(this.showAxisLine?this.axisConfig.axisLineWidth:0),y:this.getScaleValue(i),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){const i=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${i},${this.getScaleValue(s)} L ${i-this.axisConfig.tickLength},${this.getScaleValue(s)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["left-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.axisConfig.titlePadding,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:270,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForBottomAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+this.axisConfig.labelPadding+(this.showTick?this.axisConfig.tickLength:0)+(this.showAxisLine?this.axisConfig.axisLineWidth:0),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);t.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i} L ${this.getScaleValue(s)},${i+this.axisConfig.tickLength}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["bottom-axis","title"],data:[{text:this.title,x:this.range[0]+(this.range[1]-this.range[0])/2,y:this.boundingRect.y+this.boundingRect.height-this.axisConfig.titlePadding-this.titleTextHeight,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElementsForTopAxis(){const t=[];if(this.showAxisLine){const i=this.boundingRect.y+this.boundingRect.height-this.axisConfig.axisLineWidth/2;t.push({type:"path",groupTexts:["top-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${i} L ${this.boundingRect.x+this.boundingRect.width},${i}`,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})}if(this.showLabel&&t.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(i=>({text:i.toString(),x:this.getScaleValue(i),y:this.boundingRect.y+(this.showTitle?this.titleTextHeight+this.axisConfig.titlePadding*2:0)+this.axisConfig.labelPadding,fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}))}),this.showTick){const i=this.boundingRect.y;t.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(s=>({path:`M ${this.getScaleValue(s)},${i+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(s)},${i+this.boundingRect.height-this.axisConfig.tickLength-(this.showAxisLine?this.axisConfig.axisLineWidth:0)}`,strokeFill:this.axisThemeConfig.tickColor,strokeWidth:this.axisConfig.tickWidth}))})}return this.showTitle&&t.push({type:"text",groupTexts:["top-axis","title"],data:[{text:this.title,x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.axisConfig.titlePadding,fill:this.axisThemeConfig.titleColor,fontSize:this.axisConfig.titleFontSize,rotation:0,verticalPos:"top",horizontalPos:"center"}]}),t}getDrawableElements(){if(this.axisPosition==="left")return this.getDrawableElementsForLeftAxis();if(this.axisPosition==="right")throw Error("Drawing of right axis is not implemented");return this.axisPosition==="bottom"?this.getDrawableElementsForBottomAxis():this.axisPosition==="top"?this.getDrawableElementsForTopAxis():[]}},a(K,"BaseAxis"),K),Z,Di=(Z=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.categories=s,this.scale=bt().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=bt().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),Yt.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){var i;return(i=this.scale(t))!=null?i:this.getRange()[0]}},a(Z,"BandAxis"),Z),J,vi=(J=class extends Ut{constructor(t,i,s,n,o){super(t,n,o,i),this.domain=s,this.scale=zt().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){const t=[...this.domain];this.axisPosition==="left"&&t.reverse(),this.scale=zt().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}},a(J,"LinearAxis"),J);function Ct(e,t,i,s){const n=new Ht(s);return kt(e)?new Di(t,i,e.categories,e.title,n):new vi(t,i,[e.min,e.max],e.title,n)}a(Ct,"getAxis");var tt,Pi=(tt=class{constructor(t,i,s,n){this.textDimensionCalculator=t,this.chartConfig=i,this.chartData=s,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){const i=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),s=Math.max(i.width,t.width),n=i.height+2*this.chartConfig.titlePadding;return i.width<=s&&i.height<=n&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=s,this.boundingRect.height=n,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){const t=[];return this.showChartTitle&&t.push({groupTexts:["chart-title"],type:"text",data:[{fontSize:this.chartConfig.titleFontSize,text:this.chartData.title,verticalPos:"middle",horizontalPos:"center",x:this.boundingRect.x+this.boundingRect.width/2,y:this.boundingRect.y+this.boundingRect.height/2,fill:this.chartThemeConfig.titleColor,rotation:0}]}),t}},a(tt,"ChartTitle"),tt);function $t(e,t,i,s){const n=new Ht(s);return new Pi(n,e,t,i)}a($t,"getChartTitleComponent");var it,Li=(it=class{constructor(t,i,s,n,o){this.plotData=t,this.xAxis=i,this.yAxis=s,this.orientation=n,this.plotIndex=o}getDrawableElement(){const t=this.plotData.data.map(s=>[this.xAxis.getScaleValue(s[0]),this.yAxis.getScaleValue(s[1])]);let i;return this.orientation==="horizontal"?i=Wt().y(s=>s[0]).x(s=>s[1])(t):i=Wt().x(s=>s[0]).y(s=>s[1])(t),i?[{groupTexts:["plot",`line-plot-${this.plotIndex}`],type:"path",data:[{path:i,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}},a(it,"LinePlot"),it),et,Ei=(et=class{constructor(t,i,s,n,o,u){this.barData=t,this.boundingRect=i,this.xAxis=s,this.yAxis=n,this.orientation=o,this.plotIndex=u}getDrawableElement(){const t=this.barData.data.map(o=>[this.xAxis.getScaleValue(o[0]),this.yAxis.getScaleValue(o[1])]),s=Math.min(this.xAxis.getAxisOuterPadding()*2,this.xAxis.getTickDistance())*(1-.05),n=s/2;return this.orientation==="horizontal"?[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:this.boundingRect.x,y:o[0]-n,height:s,width:o[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot",`bar-plot-${this.plotIndex}`],type:"rect",data:t.map(o=>({x:o[0]-n,y:o[1],width:s,height:this.boundingRect.y+this.boundingRect.height-o[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}},a(et,"BarPlot"),et),st,Mi=(st=class{constructor(t,i,s){this.chartConfig=t,this.chartData=i,this.chartThemeConfig=s,this.boundingRect={x:0,y:0,width:0,height:0}}setAxes(t,i){this.xAxis=t,this.yAxis=i}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.height,{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){if(!(this.xAxis&&this.yAxis))throw Error("Axes must be passed to render Plots");const t=[];for(const[i,s]of this.chartData.plots.entries())switch(s.type){case"line":{const n=new Li(s,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break;case"bar":{const n=new Ei(s,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,i);t.push(...n.getDrawableElement())}break}return t}},a(st,"BasePlot"),st);function qt(e,t,i){return new Mi(e,t,i)}a(qt,"getPlotComponent");var nt,Ii=(nt=class{constructor(t,i,s,n){this.chartConfig=t,this.chartData=i,this.componentStore={title:$t(t,i,s,n),plot:qt(t,i,s),xAxis:Ct(i.xAxis,t.xAxis,{titleColor:s.xAxisTitleColor,labelColor:s.xAxisLabelColor,tickColor:s.xAxisTickColor,axisLineColor:s.xAxisLineColor},n),yAxis:Ct(i.yAxis,t.yAxis,{titleColor:s.yAxisTitleColor,labelColor:s.yAxisLabelColor,tickColor:s.yAxisTickColor,axisLineColor:s.yAxisLineColor},n)}}calculateVerticalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),u=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),p=this.componentStore.plot.calculateSpace({width:o,height:u});t-=p.width,i-=p.height,p=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),n=p.height,i-=p.height,this.componentStore.xAxis.setAxisPosition("bottom"),p=this.componentStore.xAxis.calculateSpace({width:t,height:i}),i-=p.height,this.componentStore.yAxis.setAxisPosition("left"),p=this.componentStore.yAxis.calculateSpace({width:t,height:i}),s=p.width,t-=p.width,t>0&&(o+=t,t=0),i>0&&(u+=i,i=0),this.componentStore.plot.calculateSpace({width:o,height:u}),this.componentStore.plot.setBoundingBoxXY({x:s,y:n}),this.componentStore.xAxis.setRange([s,s+o]),this.componentStore.xAxis.setBoundingBoxXY({x:s,y:n+u}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:0,y:n}),this.chartData.plots.some(f=>wt(f))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,i=this.chartConfig.height,s=0,n=0,o=0,u=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),p=Math.floor(i*this.chartConfig.plotReservedSpacePercent/100),f=this.componentStore.plot.calculateSpace({width:u,height:p});t-=f.width,i-=f.height,f=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:i}),s=f.height,i-=f.height,this.componentStore.xAxis.setAxisPosition("left"),f=this.componentStore.xAxis.calculateSpace({width:t,height:i}),t-=f.width,n=f.width,this.componentStore.yAxis.setAxisPosition("top"),f=this.componentStore.yAxis.calculateSpace({width:t,height:i}),i-=f.height,o=s+f.height,t>0&&(u+=t,t=0),i>0&&(p+=i,i=0),this.componentStore.plot.calculateSpace({width:u,height:p}),this.componentStore.plot.setBoundingBoxXY({x:n,y:o}),this.componentStore.yAxis.setRange([n,n+u]),this.componentStore.yAxis.setBoundingBoxXY({x:n,y:s}),this.componentStore.xAxis.setRange([o,o+p]),this.componentStore.xAxis.setBoundingBoxXY({x:0,y:o}),this.chartData.plots.some(T=>wt(T))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){this.chartConfig.chartOrientation==="horizontal"?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();const t=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(const i of Object.values(this.componentStore))t.push(...i.getDrawableElements());return t}},a(nt,"Orchestrator"),nt),at,Vi=(at=class{static build(t,i,s,n){return new Ii(t,i,s,n).getDrawableElement()}},a(at,"XYChartBuilder"),at),ot=0,Gt,ht=Dt(),lt=Tt(),A=vt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1;function Tt(){const e=Ci(),t=_t();return Nt(e.xyChart,t.themeVariables.xyChart)}a(Tt,"getChartDefaultThemeConfig");function Dt(){const e=_t();return Nt(wi.xyChart,e.xyChart)}a(Dt,"getChartDefaultConfig");function vt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}a(vt,"getChartDefaultData");function dt(e){const t=_t();return Ai(e.trim(),t)}a(dt,"textSanitizer");function jt(e){Gt=e}a(jt,"setTmpSVGG");function Qt(e){e==="horizontal"?ht.chartOrientation="horizontal":ht.chartOrientation="vertical"}a(Qt,"setOrientation");function Kt(e){A.xAxis.title=dt(e.text)}a(Kt,"setXAxisTitle");function Pt(e,t){A.xAxis={type:"linear",title:A.xAxis.title,min:e,max:t},xt=!0}a(Pt,"setXAxisRangeData");function Zt(e){A.xAxis={type:"band",title:A.xAxis.title,categories:e.map(t=>dt(t.text))},xt=!0}a(Zt,"setXAxisBand");function Jt(e){A.yAxis.title=dt(e.text)}a(Jt,"setYAxisTitle");function ti(e,t){A.yAxis={type:"linear",title:A.yAxis.title,min:e,max:t},Rt=!0}a(ti,"setYAxisRangeData");function ii(e){const t=Math.min(...e),i=Math.max(...e),s=j(A.yAxis)?A.yAxis.min:1/0,n=j(A.yAxis)?A.yAxis.max:-1/0;A.yAxis={type:"linear",title:A.yAxis.title,min:Math.min(s,t),max:Math.max(n,i)}}a(ii,"setYAxisRangeFromPlotData");function Lt(e){let t=[];if(e.length===0)return t;if(!xt){const i=j(A.xAxis)?A.xAxis.min:1/0,s=j(A.xAxis)?A.xAxis.max:-1/0;Pt(Math.min(i,1),Math.max(s,e.length))}if(Rt||ii(e),kt(A.xAxis)&&(t=A.xAxis.categories.map((i,s)=>[i,e[s]])),j(A.xAxis)){const i=A.xAxis.min,s=A.xAxis.max,n=(s-i)/(e.length-1),o=[];for(let u=i;u<=s;u+=n)o.push(`${u}`);t=o.map((u,p)=>[u,e[p]])}return t}a(Lt,"transformDataWithoutCategory");function Et(e){return St[e===0?0:e%St.length]}a(Et,"getPlotColorFromPalette");function ei(e,t){const i=Lt(t);A.plots.push({type:"line",strokeFill:Et(ot),strokeWidth:2,data:i}),ot++}a(ei,"setLineData");function si(e,t){const i=Lt(t);A.plots.push({type:"bar",fill:Et(ot),data:i}),ot++}a(si,"setBarData");function ni(){if(A.plots.length===0)throw Error("No Plot to render, please provide a plot with some data");return A.title=Xt(),Vi.build(ht,A,lt,Gt)}a(ni,"getDrawableElem");function ai(){return lt}a(ai,"getChartThemeConfig");function ri(){return ht}a(ri,"getChartConfig");function oi(){return A}a(oi,"getXYChartData");var Bi=a(function(){bi(),ot=0,ht=Dt(),A=vt(),lt=Tt(),St=lt.plotColorPalette.split(",").map(e=>e.trim()),xt=!1,Rt=!1},"clear"),Wi={getDrawableElem:ni,clear:Bi,setAccTitle:pi,getAccTitle:fi,setDiagramTitle:di,getDiagramTitle:Xt,getAccDescription:xi,setAccDescription:gi,setOrientation:Qt,setXAxisTitle:Kt,setXAxisRangeData:Pt,setXAxisBand:Zt,setYAxisTitle:Jt,setYAxisRangeData:ti,setLineData:ei,setBarData:si,setTmpSVGG:jt,getChartThemeConfig:ai,getChartConfig:ri,getXYChartData:oi},zi=a((e,t,i,s)=>{const n=s.db,o=n.getChartThemeConfig(),u=n.getChartConfig(),p=n.getXYChartData().plots[0].data.map(m=>m[1]);function f(m){return m==="top"?"text-before-edge":"middle"}a(f,"getDominantBaseLine");function T(m){return m==="left"?"start":m==="right"?"end":"middle"}a(T,"getTextAnchor");function P(m){return`translate(${m.x}, ${m.y}) rotate(${m.rotation||0})`}a(P,"getTextTransformation"),Yt.debug(`Rendering xychart chart
|
|
7
|
-
`+e);const _=mi(t),y=_.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(_,u.height,u.width,!0),_.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));const v=n.getDrawableElem(),L={};function M(m){let R=y,l="";for(const[W]of m.entries()){let O=y;W>0&&L[l]&&(O=L[l]),l+=m[W],R=L[l],R||(R=L[l]=O.append("g").attr("class",m[W]))}return R}a(M,"getGroup");for(const m of v){if(m.data.length===0)continue;const R=M(m.groupTexts);switch(m.type){case"rect":if(R.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(w,V){const{data:k,label:H}=w;return V*H.length*O<=k.width-X};a(W,"fitsHorizontally");const O=.7,X=10,Y=m.data.map((w,V)=>({data:w,label:p[V].toString()})).filter(w=>w.data.width>0&&w.data.height>0),S=Y.map(w=>{const{data:V}=w;let k=V.height*.7;for(;!W(w,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...S)),b=a(w=>l?w.data.x+w.data.width+X:w.data.x+w.data.width-X,"determineLabelXPosition");R.selectAll("text").data(Y).enter().append("text").attr("x",b).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let W=function(b,w,V){const{data:k,label:H}=b,h=w*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,C=g>=k.x&&x<=k.x+k.width,r=k.y+V+w<=k.y+k.height;return C&&r};a(W,"fitsInBar");const O=10,X=m.data.map((b,w)=>({data:b,label:p[w].toString()})).filter(b=>b.data.width>0&&b.data.height>0),Y=X.map(b=>{const{data:w,label:V}=b;let k=w.width/(V.length*.7);for(;!W(b,k,O)&&k>0;)k-=1;return k}),S=Math.floor(Math.min(...Y)),U=a(b=>l?b.data.y-O:b.data.y+O,"determineLabelYPosition");R.selectAll("text").data(X).enter().append("text").attr("x",b=>b.data.x+b.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${S}px`).text(b=>b.label)}}break;case"text":R.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>T(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":R.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:zi}
|
|
7
|
+
`+e);const _=mi(t),y=_.append("g").attr("class","main"),E=y.append("rect").attr("width",u.width).attr("height",u.height).attr("class","background");yi(_,u.height,u.width,!0),_.attr("viewBox",`0 0 ${u.width} ${u.height}`),E.attr("fill",o.backgroundColor),n.setTmpSVGG(_.append("g").attr("class","mermaid-tmp-group"));const v=n.getDrawableElem(),L={};function M(m){let R=y,l="";for(const[W]of m.entries()){let O=y;W>0&&L[l]&&(O=L[l]),l+=m[W],R=L[l],R||(R=L[l]=O.append("g").attr("class",m[W]))}return R}a(M,"getGroup");for(const m of v){if(m.data.length===0)continue;const R=M(m.groupTexts);switch(m.type){case"rect":if(R.selectAll("rect").data(m.data).enter().append("rect").attr("x",l=>l.x).attr("y",l=>l.y).attr("width",l=>l.width).attr("height",l=>l.height).attr("fill",l=>l.fill).attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth),u.showDataLabel){const l=u.showDataLabelOutsideBar;if(u.chartOrientation==="horizontal"){let W=function(w,V){const{data:k,label:H}=w;return V*H.length*O<=k.width-X};a(W,"fitsHorizontally");const O=.7,X=10,Y=m.data.map((w,V)=>({data:w,label:p[V].toString()})).filter(w=>w.data.width>0&&w.data.height>0),S=Y.map(w=>{const{data:V}=w;let k=V.height*.7;for(;!W(w,k)&&k>0;)k-=1;return k}),U=Math.floor(Math.min(...S)),b=a(w=>l?w.data.x+w.data.width+X:w.data.x+w.data.width-X,"determineLabelXPosition");R.selectAll("text").data(Y).enter().append("text").attr("x",b).attr("y",w=>w.data.y+w.data.height/2).attr("text-anchor",l?"start":"end").attr("dominant-baseline","middle").attr("fill",o.dataLabelColor).attr("font-size",`${U}px`).text(w=>w.label)}else{let W=function(b,w,V){const{data:k,label:H}=b,h=w*H.length*.7,c=k.x+k.width/2,g=c-h/2,x=c+h/2,C=g>=k.x&&x<=k.x+k.width,r=k.y+V+w<=k.y+k.height;return C&&r};a(W,"fitsInBar");const O=10,X=m.data.map((b,w)=>({data:b,label:p[w].toString()})).filter(b=>b.data.width>0&&b.data.height>0),Y=X.map(b=>{const{data:w,label:V}=b;let k=w.width/(V.length*.7);for(;!W(b,k,O)&&k>0;)k-=1;return k}),S=Math.floor(Math.min(...Y)),U=a(b=>l?b.data.y-O:b.data.y+O,"determineLabelYPosition");R.selectAll("text").data(X).enter().append("text").attr("x",b=>b.data.x+b.data.width/2).attr("y",U).attr("text-anchor","middle").attr("dominant-baseline",l?"auto":"hanging").attr("fill",o.dataLabelColor).attr("font-size",`${S}px`).text(b=>b.label)}}break;case"text":R.selectAll("text").data(m.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",l=>l.fill).attr("font-size",l=>l.fontSize).attr("dominant-baseline",l=>f(l.verticalPos)).attr("text-anchor",l=>T(l.horizontalPos)).attr("transform",l=>P(l)).text(l=>l.text);break;case"path":R.selectAll("path").data(m.data).enter().append("path").attr("d",l=>l.path).attr("fill",l=>l.fill?l.fill:"none").attr("stroke",l=>l.strokeFill).attr("stroke-width",l=>l.strokeWidth);break}}},"draw"),Oi={draw:zi},qi={parser:Ti,db:Wi,renderer:Oi};export{qi as diagram};
|
package/dist/index.html
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Sample Feature</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/
|
|
8
|
-
<link rel="
|
|
7
|
+
<script type="module" crossorigin src="./assets/main-DNu7P8AU.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="./assets/dataResults-B1swefI5.js">
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/main-B1yvZRuy.css">
|
|
9
10
|
</head>
|
|
10
11
|
<body>
|
|
11
12
|
<div id="app"></div>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="ko">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>조회 결과</title>
|
|
7
|
+
<script type="module" crossorigin src="./assets/results-BLVcBvMW.js"></script>
|
|
8
|
+
<link rel="modulepreload" crossorigin href="./assets/dataResults-B1swefI5.js">
|
|
9
|
+
<link rel="stylesheet" crossorigin href="./assets/results-B1r9P01j.css">
|
|
10
|
+
</head>
|
|
11
|
+
<body>
|
|
12
|
+
<div id="app"></div>
|
|
13
|
+
</body>
|
|
14
|
+
</html>
|