@kw-yeh/vibeflow 4.0.1
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/LICENSE +21 -0
- package/README.md +146 -0
- package/dist/vibeflow.mjs +6103 -0
- package/dist/web/404/index.html +1 -0
- package/dist/web/404.html +1 -0
- package/dist/web/_next/static/-9MMnQDtlhk8JcEq6dTBS/_buildManifest.js +1 -0
- package/dist/web/_next/static/-9MMnQDtlhk8JcEq6dTBS/_ssgManifest.js +1 -0
- package/dist/web/_next/static/chunks/02e71eac.0250f42685eae210.js +18 -0
- package/dist/web/_next/static/chunks/043de7d2.3a6733c82bc2409f.js +160 -0
- package/dist/web/_next/static/chunks/1201.011a689cd95a4983.js +1 -0
- package/dist/web/_next/static/chunks/1282.d0e740390a16bb90.js +1 -0
- package/dist/web/_next/static/chunks/1396.cb165487d4bf0f35.js +1 -0
- package/dist/web/_next/static/chunks/167.98f928ccaed44837.js +1 -0
- package/dist/web/_next/static/chunks/1672.82392f784373fc1a.js +149 -0
- package/dist/web/_next/static/chunks/1776.9ad96593642a32f0.js +36 -0
- package/dist/web/_next/static/chunks/1840.fa1f1878af23fd9f.js +41 -0
- package/dist/web/_next/static/chunks/1886.22db355b96ff3e38.js +7 -0
- package/dist/web/_next/static/chunks/2039.461f2ac8bbfeb1cf.js +90 -0
- package/dist/web/_next/static/chunks/2107.2540b21d69c927d0.js +1 -0
- package/dist/web/_next/static/chunks/2205.fe6639ba89aebb99.js +1 -0
- package/dist/web/_next/static/chunks/2271.8d52a83cf1b02b3e.js +1 -0
- package/dist/web/_next/static/chunks/2396.a4c1620b6d217c02.js +1 -0
- package/dist/web/_next/static/chunks/260.7db9b90987032402.js +1 -0
- package/dist/web/_next/static/chunks/2806.c2a6f6733f2b439b.js +32 -0
- package/dist/web/_next/static/chunks/2817.a82d851ccf215c35.js +1 -0
- package/dist/web/_next/static/chunks/3082.5086ba86ade06629.js +1 -0
- package/dist/web/_next/static/chunks/3110.db844baaab453716.js +287 -0
- package/dist/web/_next/static/chunks/3289.04108f17cdf795e3.js +1 -0
- package/dist/web/_next/static/chunks/3618.418bfeef9a735cc6.js +148 -0
- package/dist/web/_next/static/chunks/3711.7f07235c9e8ae090.js +1 -0
- package/dist/web/_next/static/chunks/3746.81e4d62ebdb395eb.js +1 -0
- package/dist/web/_next/static/chunks/3846.d63d31d2de9a159c.js +1 -0
- package/dist/web/_next/static/chunks/3927.8202e4c7eeb07487.js +74 -0
- package/dist/web/_next/static/chunks/39a04069.9dd71f191712d3fa.js +62 -0
- package/dist/web/_next/static/chunks/4012.440934d750758d59.js +1 -0
- package/dist/web/_next/static/chunks/4109.f1de572405aa3b2b.js +309 -0
- package/dist/web/_next/static/chunks/4224.c5c8af77fc9b6c44.js +286 -0
- package/dist/web/_next/static/chunks/4270-6c9c75303137e3a5.js +9 -0
- package/dist/web/_next/static/chunks/4292.70e0a2a99b20e418.js +1 -0
- package/dist/web/_next/static/chunks/4459.814d84742e06267c.js +1 -0
- package/dist/web/_next/static/chunks/4485.e209e1d39502d049.js +226 -0
- package/dist/web/_next/static/chunks/4802.6f5a5e00488db074.js +1 -0
- package/dist/web/_next/static/chunks/5432.3349240a8cd1114c.js +94 -0
- package/dist/web/_next/static/chunks/5468.7440c698079f7f79.js +1 -0
- package/dist/web/_next/static/chunks/5469.5e1555e411d9c96b.js +1 -0
- package/dist/web/_next/static/chunks/5695.45dd981e66074a89.js +1 -0
- package/dist/web/_next/static/chunks/5785.01c97ed45f552929.js +8 -0
- package/dist/web/_next/static/chunks/59.a9be2f8a75bc42e9.js +1 -0
- package/dist/web/_next/static/chunks/5918.7a18726fa96ba97d.js +1 -0
- package/dist/web/_next/static/chunks/621.7f06a4c57845924d.js +27 -0
- package/dist/web/_next/static/chunks/6232.4ebeb2a3e3fde2f9.js +1 -0
- package/dist/web/_next/static/chunks/6390.df979849e0b82b10.js +1 -0
- package/dist/web/_next/static/chunks/6747.fe4ace8428cf57b8.js +1 -0
- package/dist/web/_next/static/chunks/67584bf0.bcc252f93280fffc.js +1 -0
- package/dist/web/_next/static/chunks/6848.18adf63b76b43ce0.js +1 -0
- package/dist/web/_next/static/chunks/6863.7c16f1cf40adc214.js +77 -0
- package/dist/web/_next/static/chunks/6981.db8f1cd11466723b.js +1 -0
- package/dist/web/_next/static/chunks/7045.7cf0eb88acb1ee65.js +1 -0
- package/dist/web/_next/static/chunks/7266.5fc4e54a82b394a3.js +23 -0
- package/dist/web/_next/static/chunks/7271.3e11a6c675bba517.js +1 -0
- package/dist/web/_next/static/chunks/7443.de45a50460ec02b4.js +217 -0
- package/dist/web/_next/static/chunks/7449.be3a97c644b086d6.js +86 -0
- package/dist/web/_next/static/chunks/7835.eaf45d5554820d67.js +104 -0
- package/dist/web/_next/static/chunks/7869.b407f42eca1ddf4d.js +1 -0
- package/dist/web/_next/static/chunks/7913.3de14c31f63521fd.js +193 -0
- package/dist/web/_next/static/chunks/7915.e23554d5280c643a.js +1 -0
- package/dist/web/_next/static/chunks/7992.5dde103489d49ad1.js +24 -0
- package/dist/web/_next/static/chunks/8057.16633338493802bd.js +24 -0
- package/dist/web/_next/static/chunks/8244.0a0a340eddcff9ce.js +1 -0
- package/dist/web/_next/static/chunks/8259.62f5c49f967282f1.js +64 -0
- package/dist/web/_next/static/chunks/8372.eb7c979688ab1442.js +62 -0
- package/dist/web/_next/static/chunks/8590.c7e1c62b00e799ea.js +1 -0
- package/dist/web/_next/static/chunks/8655.1a55ea833e35b289.js +115 -0
- package/dist/web/_next/static/chunks/8687.cbb5d2e055f2a05f.js +1 -0
- package/dist/web/_next/static/chunks/8704.bb5e916a22041380.js +1 -0
- package/dist/web/_next/static/chunks/88492ad4.406f106f686c2ea4.js +82 -0
- package/dist/web/_next/static/chunks/898.a636c29260da655a.js +93 -0
- package/dist/web/_next/static/chunks/9371.f52b19a630591b42.js +34 -0
- package/dist/web/_next/static/chunks/94.c653beceaa62934f.js +1 -0
- package/dist/web/_next/static/chunks/9516.3d1f5c6a23f298e9.js +1 -0
- package/dist/web/_next/static/chunks/9525.c2f5e990d374aeb6.js +38 -0
- package/dist/web/_next/static/chunks/9540.9cc4cb31dd3a0d0a.js +1 -0
- package/dist/web/_next/static/chunks/9612.d9f1b4d3209e70dc.js +79 -0
- package/dist/web/_next/static/chunks/9759.ddd2794ce95b458c.js +1 -0
- package/dist/web/_next/static/chunks/b02c773b.2d61cc590e6c1c58.js +1 -0
- package/dist/web/_next/static/chunks/b9dacbaa.d2b59af18cc80870.js +1 -0
- package/dist/web/_next/static/chunks/d94f238e.ed1acca9cb2f0773.js +122 -0
- package/dist/web/_next/static/chunks/f24717c3.caadd8481abaaae2.js +1 -0
- package/dist/web/_next/static/chunks/framework-b92a367cf1ad4bf7.js +1 -0
- package/dist/web/_next/static/chunks/main-ec7fd4c371d06729.js +5 -0
- package/dist/web/_next/static/chunks/pages/_app-320afeed07d86516.js +1 -0
- package/dist/web/_next/static/chunks/pages/_error-8f65b0f8749f42d2.js +1 -0
- package/dist/web/_next/static/chunks/pages/home-efefddd4b88b018d.js +11 -0
- package/dist/web/_next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
- package/dist/web/_next/static/chunks/webpack-c8aa5df0425f6b7b.js +1 -0
- package/dist/web/_next/static/css/edcc6abb24dfd492.css +2 -0
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/favicon.ico +0 -0
- package/dist/web/home/index.html +1 -0
- package/dist/web/logo.svg +17 -0
- package/package.json +37 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7266],{57266:(t,e,n)=>{n.d(e,{diagram:()=>tp});var s,i=n(62831),r=n(58959),l=n(95631);n(5218);var a=n(14528),o=n(60830),h=n(91228),c=n(23792);let u=(t,e)=>(0,c.A)(t,"a",-e);var f=n(6030),d=n(32256);function y(t,e){let n=function(t){let e=[];for(let n=0;n<t.length;++n)for(let s=n+1;s<t.length;++s)for(let i of m(t[n],t[s]))i.parentIndex=[n,s],e.push(i);return e}(t),s=n.filter(e=>{var n;return n=e,t.every(t=>x(n,t)<t.radius+1e-10)}),i=0,r=0,l=[];if(s.length>1){let e=b(s);for(let t=0;t<s.length;++t){let n=s[t];n.angle=Math.atan2(n.x-e.x,n.y-e.y)}s.sort((t,e)=>e.angle-t.angle);let n=s[s.length-1];for(let e=0;e<s.length;++e){let a=s[e];r+=(n.x+a.x)*(a.y-n.y);let o={x:(a.x+n.x)/2,y:(a.y+n.y)/2},h=null;for(let e=0;e<a.parentIndex.length;++e)if(n.parentIndex.includes(a.parentIndex[e])){let s=t[a.parentIndex[e]],i=Math.atan2(a.x-s.x,a.y-s.y),r=Math.atan2(n.x-s.x,n.y-s.y),l=r-i;l<0&&(l+=2*Math.PI);let c=r-l/2,u=x(o,{x:s.x+s.radius*Math.sin(c),y:s.y+s.radius*Math.cos(c)});u>2*s.radius&&(u=2*s.radius),(null==h||h.width>u)&&(h={circle:s,width:u,p1:a,p2:n,large:u>s.radius,sweep:!0})}null!=h&&(l.push(h),i+=g(h.circle.radius,h.width),n=a)}}else{let e=t[0];for(let n=1;n<t.length;++n)t[n].radius<e.radius&&(e=t[n]);let n=!1;for(let s=0;s<t.length;++s)if(x(t[s],e)>Math.abs(e.radius-t[s].radius)){n=!0;break}n?i=r=0:(i=e.radius*e.radius*Math.PI,l.push({circle:e,p1:{x:e.x,y:e.y+e.radius},p2:{x:e.x-1e-10,y:e.y+e.radius},width:2*e.radius,large:!0,sweep:!0}))}return r/=2,e&&(e.area=i+r,e.arcArea=i,e.polygonArea=r,e.arcs=l,e.innerPoints=s,e.intersectionPoints=n),i+r}function g(t,e){return t*t*Math.acos(1-e/t)-(t-e)*Math.sqrt(e*(2*t-e))}function x(t,e){return Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))}function p(t,e,n){return n>=t+e?0:n<=Math.abs(t-e)?Math.PI*Math.min(t,e)*Math.min(t,e):g(t,t-(n*n-e*e+t*t)/(2*n))+g(e,e-(n*n-t*t+e*e)/(2*n))}function m(t,e){let n=x(t,e),s=t.radius,i=e.radius;if(n>=s+i||n<=Math.abs(s-i))return[];let r=(s*s-i*i+n*n)/(2*n),l=Math.sqrt(s*s-r*r),a=t.x+r*(e.x-t.x)/n,o=t.y+r*(e.y-t.y)/n,h=-(e.y-t.y)*(l/n),c=-(e.x-t.x)*(l/n);return[{x:a+h,y:o-c},{x:a-h,y:o+c}]}function b(t){let e={x:0,y:0};for(let n of t)e.x+=n.x,e.y+=n.y;return e.x/=t.length,e.y/=t.length,e}function v(t){let e=Array(t);for(let n=0;n<t;++n)e[n]=0;return e}function M(t,e){return v(t).map(()=>v(e))}function I(t,e){let n=0;for(let s=0;s<t.length;++s)n+=t[s]*e[s];return n}function k(t){return Math.sqrt(I(t,t))}function _(t,e,n){for(let s=0;s<e.length;++s)t[s]=e[s]*n}function w(t,e,n,s,i){for(let r=0;r<t.length;++r)t[r]=e*n[r]+s*i[r]}function S(t,e,n){let s,i=(n=n||{}).maxIterations||200*e.length,r=n.nonZeroDelta||1.05,l=n.zeroDelta||.001,a=n.minErrorDelta||1e-6,o=n.minErrorDelta||1e-5,h=void 0!==n.rho?n.rho:1,c=void 0!==n.chi?n.chi:2,u=void 0!==n.psi?n.psi:-.5,f=void 0!==n.sigma?n.sigma:.5,d=e.length,y=Array(d+1);y[0]=e,y[0].fx=t(e),y[0].id=0;for(let n=0;n<d;++n){let s=e.slice();s[n]=s[n]?s[n]*r:l,y[n+1]=s,y[n+1].fx=t(s),y[n+1].id=n+1}function g(t){for(let e=0;e<t.length;e++)y[d][e]=t[e];y[d].fx=t.fx}let x=(t,e)=>t.fx-e.fx,p=e.slice(),m=e.slice(),b=e.slice(),v=e.slice();for(let e=0;e<i;++e){if(y.sort(x),n.history){let t=y.map(t=>{let e=t.slice();return e.fx=t.fx,e.id=t.id,e});t.sort((t,e)=>t.id-e.id),n.history.push({x:y[0].slice(),fx:y[0].fx,simplex:t})}s=0;for(let t=0;t<d;++t)s=Math.max(s,Math.abs(y[0][t]-y[1][t]));if(Math.abs(y[0].fx-y[d].fx)<a&&s<o)break;for(let t=0;t<d;++t){p[t]=0;for(let e=0;e<d;++e)p[t]+=y[e][t];p[t]/=d}let e=y[d];if(w(m,1+h,p,-h,e),m.fx=t(m),m.fx<y[0].fx)w(v,1+c,p,-c,e),v.fx=t(v),g(v.fx<m.fx?v:m);else if(m.fx>=y[d-1].fx){let n=!1;if(m.fx>e.fx?(w(b,1+u,p,-u,e),b.fx=t(b),b.fx<e.fx?g(b):n=!0):(w(b,1-u*h,p,u*h,e),b.fx=t(b),b.fx<m.fx?g(b):n=!0),n){if(f>=1)break;for(let e=1;e<y.length;++e)w(y[e],1-f,y[0],f,y[e]),y[e].fx=t(y[e])}}else g(m)}return y.sort(x),{fx:y[0].fx,x:y[0]}}function E(t,e={}){e.maxIterations=e.maxIterations||500;let n=e.initialLayout||T,s=e.lossFunction||A,i=function(t,e={}){let n=e.distinct,s=t.map(t=>Object.assign({},t));function i(t){return t.join(";")}if(n){let t=new Map;for(let e of s)for(let n=0;n<e.sets.length;n++){let s=String(e.sets[n]);t.set(s,e.size+(t.get(s)||0));for(let i=n+1;i<e.sets.length;i++){let n=String(e.sets[i]),r=`${s};${n}`,l=`${n};${s}`;t.set(r,e.size+(t.get(r)||0)),t.set(l,e.size+(t.get(l)||0))}}for(let e of s)e.sets.length<3&&(e.size=t.get(i(e.sets)))}let r=[],l=new Set;for(let t of s)if(1===t.sets.length)r.push(t.sets[0]);else if(2===t.sets.length){let e=t.sets[0],n=t.sets[1];l.add(i(t.sets)),l.add(i([n,e]))}r.sort((t,e)=>t===e?0:t<e?-1:1);for(let t=0;t<r.length;++t){let e=r[t];for(let n=t+1;n<r.length;++n){let t=r[n];l.has(i([e,t]))||s.push({sets:[e,t],size:0})}}return s}(t,e),r=n(i,e),l=Object.keys(r),a=[];for(let t of l)a.push(r[t].x),a.push(r[t].y);let o=S(t=>{let e={};for(let n=0;n<l.length;++n){let s=l[n];e[s]={x:t[2*n],y:t[2*n+1],radius:r[s].radius}}return s(e,i)},a,e).x;for(let t=0;t<l.length;++t){let e=l[t];r[e].x=o[2*t],r[e].y=o[2*t+1]}return r}function z(t,e,n){return Math.min(t,e)*Math.min(t,e)*Math.PI<=n+1e-10?Math.abs(t-e):function(t,e,n,s){let i=(s=s||{}).maxIterations||100,r=s.tolerance||1e-10,l=t(e),a=t(n),o=n-e;if(l*a>0)throw"Initial bisect points must have opposite signs";if(0===l)return e;if(0===a)return n;for(let n=0;n<i;++n){let n=e+(o/=2),s=t(n);if(s*l>=0&&(e=n),Math.abs(o)<r||0===s)return n}return e+o}(s=>p(t,e,s)-n,0,t+e)}function T(t,e={}){let n=function(t,e){let n=e&&e.lossFunction?e.lossFunction:A,s={},i={};for(let e of t)if(1===e.sets.length){let t=e.sets[0];s[t]={x:1e10,y:1e10,rowid:s.length,size:e.size,radius:Math.sqrt(e.size/Math.PI)},i[t]=[]}for(let e of t=t.filter(t=>2===t.sets.length)){let t=null!=e.weight?e.weight:1,n=e.sets[0],r=e.sets[1];e.size+1e-10>=Math.min(s[n].size,s[r].size)&&(t=0),i[n].push({set:r,size:e.size,weight:t}),i[r].push({set:n,size:e.size,weight:t})}let r=[];function l(t,e){return e.size-t.size}Object.keys(i).forEach(t=>{let e=0;for(let n=0;n<i[t].length;++n)e+=i[t][n].size*i[t][n].weight;r.push({set:t,size:e})}),r.sort(l);let a={};function o(t){return t.set in a}function h(t,e){s[e].x=t.x,s[e].y=t.y,a[e]=!0}h({x:0,y:0},r[0].set);for(let e=1;e<r.length;++e){let a=r[e].set,u=i[a].filter(o),f=s[a];if(u.sort(l),0===u.length)throw"ERROR: missing pairwise overlap information";let d=[];for(var c=0;c<u.length;++c){let t=s[u[c].set],e=z(f.radius,t.radius,u[c].size);d.push({x:t.x+e,y:t.y}),d.push({x:t.x-e,y:t.y}),d.push({y:t.y+e,x:t.x}),d.push({y:t.y-e,x:t.x});for(let n=c+1;n<u.length;++n){let i=s[u[n].set],r=z(f.radius,i.radius,u[n].size),l=m({x:t.x,y:t.y,radius:e},{x:i.x,y:i.y,radius:r});d.push(...l)}}let y=1e50,g=d[0];for(let e of d){s[a].x=e.x,s[a].y=e.y;let i=n(s,t);i<y&&(y=i,g=e)}h(g,a)}return s}(t,e),s=e.lossFunction||A;if(t.length>=8){let i=function(t,e={}){let n,s,i=e.restarts||10,r=[],l={};for(let e of t)1===e.sets.length&&(l[e.sets[0]]=r.length,r.push(e));let{distances:a,constraints:o}=(n=M(r.length,r.length),s=M(r.length,r.length),t.filter(t=>2===t.sets.length).forEach(t=>{let e=l[t.sets[0]],i=l[t.sets[1]],a=z(Math.sqrt(r[e].size/Math.PI),Math.sqrt(r[i].size/Math.PI),t.size);n[e][i]=n[i][e]=a;let o=0;t.size+1e-10>=Math.min(r[e].size,r[i].size)?o=1:t.size<=1e-10&&(o=-1),s[e][i]=s[i][e]=o}),{distances:n,constraints:s}),h=k(a.map(k))/a.length;a=a.map(t=>t.map(t=>t/h));let c=(t,e)=>(function(t,e,n,s){for(let t=0;t<e.length;++t)e[t]=0;let i=0;for(let r=0;r<n.length;++r){let l=t[2*r],a=t[2*r+1];for(let o=r+1;o<n.length;++o){let h=t[2*o],c=t[2*o+1],u=n[r][o],f=s[r][o],d=(h-l)*(h-l)+(c-a)*(c-a),y=Math.sqrt(d),g=d-u*u;f>0&&y<=u||f<0&&y>=u||(i+=2*g*g,e[2*r]+=4*g*(l-h),e[2*r+1]+=4*g*(a-c),e[2*o]+=4*g*(h-l),e[2*o+1]+=4*g*(c-a))}}return i})(t,e,a,o),u=null;for(let t=0;t<i;++t){let t=function(t,e,n){let s,i,r,l={x:e.slice(),fx:0,fxprime:e.slice()},a={x:e.slice(),fx:0,fxprime:e.slice()},o=e.slice(),h=1;r=(n=n||{}).maxIterations||20*e.length,l.fx=t(l.x,l.fxprime),_(s=l.fxprime.slice(),l.fxprime,-1);for(let e=0;e<r;++e){if(h=function(t,e,n,s,i,r,l){let a=n.fx,o=I(n.fxprime,e),h=a,c=a,u=o,f=0;function d(c,f,d){for(let y=0;y<16;++y)if(i=(c+f)/2,w(s.x,1,n.x,i,e),h=s.fx=t(s.x,s.fxprime),u=I(s.fxprime,e),h>a+r*i*o||h>=d)f=i;else{if(Math.abs(u)<=-l*o)return i;u*(f-c)>=0&&(f=c),c=i,d=h}return 0}i=i||1,r=r||1e-6,l=l||.1;for(let y=0;y<10;++y){if(w(s.x,1,n.x,i,e),h=s.fx=t(s.x,s.fxprime),u=I(s.fxprime,e),h>a+r*i*o||y&&h>=c)return d(f,i,c);if(Math.abs(u)<=-l*o)break;if(u>=0)return d(i,f,h);c=h,f=i,i*=2}return i}(t,s,l,a,h),n.history&&n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice(),alpha:h}),h){w(o,1,a.fxprime,-1,l.fxprime);let t=I(l.fxprime,l.fxprime);w(s,Math.max(0,I(o,a.fxprime)/t),s,-1,a.fxprime),i=l,l=a,a=i}else _(s,l.fxprime,-1);if(1e-5>=k(l.fxprime))break}return n.history&&n.history.push({x:l.x.slice(),fx:l.fx,fxprime:l.fxprime.slice(),alpha:h}),l}(c,v(2*a.length).map(Math.random),e);(!u||t.fx<u.fx)&&(u=t)}let f=u.x,d={};for(let t=0;t<r.length;++t){let e=r[t];d[e.sets[0]]={x:f[2*t]*h,y:f[2*t+1]*h,radius:Math.sqrt(e.size/Math.PI)}}if(e.history)for(let t of e.history)_(t.x,h);return d}(t,e);s(i,t)+1e-8<s(n,t)&&(n=i)}return n}function A(t,e){let n=0;for(let s of e){let e;if(1!==s.sets.length){if(2===s.sets.length){let n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,x(n,i))}else e=y(s.sets.map(e=>t[e]));n+=(null!=s.weight?s.weight:1)*(e-s.size)*(e-s.size)}}return n}function K(t,e){let n=0;for(let s of e){let e;if(1===s.sets.length)continue;if(2===s.sets.length){let n=t[s.sets[0]],i=t[s.sets[1]];e=p(n.radius,i.radius,x(n,i))}else e=y(s.sets.map(e=>t[e]));let i=null!=s.weight?s.weight:1,r=Math.log((e+1)/(s.size+1));n+=i*r*r}return n}function R(t){let e=e=>({max:t.reduce((t,n)=>Math.max(t,n[e]+n.radius),-1/0),min:t.reduce((t,n)=>Math.min(t,n[e]-n.radius),1/0)});return{xRange:e("x"),yRange:e("y")}}function $(t,e,n){null==e&&(e=Math.PI/2);let s=C(t).map(t=>Object.assign({},t)),i=function(t){function e(t){return t.parent!==t&&(t.parent=e(t.parent)),t.parent}t.forEach(t=>{t.parent=t});for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){var n,s;let l=t[i].radius+t[r].radius;x(t[i],t[r])+1e-10<l&&(n=t[r],s=t[i],e(n).parent=e(s))}let i=new Map;for(let n=0;n<t.length;++n){let s=e(t[n]).parent.setid;i.has(s)||i.set(s,[]),i.get(s).push(t[n])}return t.forEach(t=>{delete t.parent}),Array.from(i.values())}(s);for(let t of i){!function(t,e,n){if(null==n?t.sort((t,e)=>e.radius-t.radius):t.sort(n),t.length>0){let e=t[0].x,n=t[0].y;for(let s of t)s.x-=e,s.y-=n}if(2===t.length&&x(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){let n=Math.atan2(t[1].x,t[1].y)-e,s=Math.cos(n),i=Math.sin(n);for(let e of t){let t=e.x,n=e.y;e.x=s*t-i*n,e.y=i*t+s*n}}if(t.length>2){let n=Math.atan2(t[2].x,t[2].y)-e;for(;n<0;)n+=2*Math.PI;for(;n>2*Math.PI;)n-=2*Math.PI;if(n>Math.PI){let e=t[1].y/(1e-10+t[1].x);for(let n of t){var s=(n.x+e*n.y)/(1+e*e);n.x=2*s-n.x,n.y=2*s*e-n.y}}}}(t,e,n);let s=R(t);t.size=(s.xRange.max-s.xRange.min)*(s.yRange.max-s.yRange.min),t.bounds=s}i.sort((t,e)=>e.size-t.size);let r=(s=i[0]).bounds,l=(r.xRange.max-r.xRange.min)/50;function a(t,e,n){let i,a;if(!t)return;let o=t.bounds;if(e)i=r.xRange.max-o.xRange.min+l;else{i=r.xRange.max-o.xRange.max;let t=(o.xRange.max-o.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;t<0&&(i+=t)}if(n)a=r.yRange.max-o.yRange.min+l;else{a=r.yRange.max-o.yRange.max;let t=(o.yRange.max-o.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;t<0&&(a+=t)}for(let e of t)e.x+=i,e.y+=a,s.push(e)}let o=1;for(;o<i.length;)a(i[o],!0,!1),a(i[o+1],!1,!0),a(i[o+2],!0,!0),o+=3,r=R(s);return O(s)}function N(t,e,n,s,i){let r,l,a=C(t);e-=2*s,n-=2*s;let{xRange:o,yRange:h}=R(a);if(o.max===o.min||h.max===h.min)return console.log("not scaling solution: zero size detected"),t;if(i){let t=2*Math.sqrt(i/Math.PI);r=e/t,l=n/t}else r=e/(o.max-o.min),l=n/(h.max-h.min);let c=Math.min(l,r),u=(e-(o.max-o.min)*c)/2,f=(n-(h.max-h.min)*c)/2;return O(a.map(t=>({radius:c*t.radius,x:s+u+(t.x-o.min)*c,y:s+f+(t.y-h.min)*c,setid:t.setid})))}function O(t){let e={};for(let n of t)e[n.setid]=n;return e}function C(t){return Object.keys(t).map(e=>Object.assign(t[e],{setid:e}))}function D(t,e){return function(n){let s=this,i=t[n.sets[0]].radius||50,r=e(n)||"",l=r.split(/\s+/).reverse(),a=(r.length+l.length)/3,o=l.pop(),h=[o],c=0;s.textContent=null;let u=[];function f(t){let e=s.ownerDocument.createElementNS(s.namespaceURI,"tspan");return e.textContent=t,u.push(e),s.append(e),e}let d=f(o);for(;o=l.pop();){h.push(o);let t=h.join(" ");d.textContent=t,t.length>a&&d.getComputedTextLength()>i&&(h.pop(),d.textContent=h.join(" "),h=[o],d=f(o),c++)}let y=.35-1.1*c/2,g=s.getAttribute("x"),x=s.getAttribute("y");u.forEach((t,e)=>{t.setAttribute("x",g),t.setAttribute("y",x),t.setAttribute("dy",`${y+1.1*e}em`)})}}function F(t,e,n){let s=e[0].radius-x(e[0],t);for(let n=1;n<e.length;++n){let i=e[n].radius-x(e[n],t);i<=s&&(s=i)}for(let e=0;e<n.length;++e){let i=x(n[e],t)-n[e].radius;i<=s&&(s=i)}return s}function j(t,e,n){let s={},i=function(t){let e={},n=Object.keys(t);for(let t of n)e[t]=[];for(let s=0;s<n.length;s++){let i=n[s],r=t[i];for(let l=s+1;l<n.length;++l){let s=n[l],a=t[s],o=x(r,a);o+a.radius<=r.radius+1e-10?e[s].push(i):o+r.radius<=a.radius+1e-10&&e[i].push(s)}}return e}(t);for(let r=0;r<e.length;++r){let l=e[r].sets,a={},o={};for(let t=0;t<l.length;++t){a[l[t]]=!0;let e=i[l[t]];for(let t=0;t<e.length;++t)o[e[t]]=!0}let h=[],c=[];for(let e in t)e in a?h.push(t[e]):e in o||c.push(t[e]);let u=function t(e,n,s){let i=[];for(let t of e)i.push({x:t.x,y:t.y}),i.push({x:t.x+t.radius/2,y:t.y}),i.push({x:t.x-t.radius/2,y:t.y}),i.push({x:t.x,y:t.y+t.radius/2}),i.push({x:t.x,y:t.y-t.radius/2});let r=i[0],l=F(i[0],e,n);for(let t=1;t<i.length;++t){let s=F(i[t],e,n);s>=l&&(r=i[t],l=s)}let a=S(t=>-1*F({x:t[0],y:t[1]},e,n),[r.x,r.y],{maxIterations:500,minErrorDelta:1e-10}).x,o={x:s?0:a[0],y:a[1]},h=!0;for(let t of e)if(x(o,t)>t.radius){h=!1;break}for(let t of n)if(x(o,t)<t.radius){h=!1;break}if(h)return o;if(1==e.length)return{x:e[0].x,y:e[0].y};let c={};return(y(e,c),0===c.arcs.length)?{x:0,y:-1e3,disjoint:!0}:1==c.arcs.length?{x:c.arcs[0].circle.x,y:c.arcs[0].circle.y}:n.length?t(e,[]):b(c.arcs.map(t=>t.p1))}(h,c,n);s[l]=u,u.disjoint&&e[r].size>0&&console.log("WARNING: area "+l+" not represented on screen")}return s}function L(t){if(0===t.length)return[];let e={};return y(t,e),e.arcs}function P(t,e){if(0===t.length)return"M 0 0";let n=Math.pow(10,e||0),s=null!=e?t=>Math.round(t*n)/n:t=>t;if(1==t.length){var i,r,l;let e,n=t[0].circle;return i=s(n.x),r=s(n.y),l=s(n.radius),(e=[]).push("\nM",i,r),e.push("\nm",-l,0),e.push("\na",l,l,0,1,0,2*l,0),e.push("\na",l,l,0,1,0,-(2*l),0),e.join(" ")}let a=["\nM",s(t[0].p2.x),s(t[0].p2.y)];for(let e of t){let t=s(e.circle.radius);a.push("\nA",t,t,0,+!!e.large,+!!e.sweep,s(e.p1.x),s(e.p1.y))}return a.join(" ")}var U=n(3288),q=function(){var t=(0,a.K)(function(t,e,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=e);return n},"o"),e=[5,8],n=[7,8,11,12,17,19,22,24],s=[1,17],i=[1,18],r=[7,8,11,12,14,15,16,17,19,20,21,22,24,27],l=[1,31],o=[1,39],h=[7,8,11,12,17,19,22,24,27],c=[1,57],u=[1,56],f=[1,58],d=[1,59],y=[1,60],g=[7,8,11,12,16,17,19,20,22,24,27,31,32,33],x={trace:(0,a.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,optNewlines:4,VENN:5,document:6,EOF:7,NEWLINE:8,line:9,statement:10,TITLE:11,SET:12,identifier:13,BRACKET_LABEL:14,COLON:15,NUMERIC:16,UNION:17,identifierList:18,TEXT:19,IDENTIFIER:20,STRING:21,INDENT_TEXT:22,indentedTextTail:23,STYLE:24,stylesOpt:25,styleField:26,COMMA:27,styleValue:28,valueTokens:29,valueToken:30,HEXCOLOR:31,RGBCOLOR:32,RGBACOLOR:33,$accept:0,$end:1},terminals_:{2:"error",5:"VENN",7:"EOF",8:"NEWLINE",11:"TITLE",12:"SET",14:"BRACKET_LABEL",15:"COLON",16:"NUMERIC",17:"UNION",19:"TEXT",20:"IDENTIFIER",21:"STRING",22:"INDENT_TEXT",24:"STYLE",27:"COMMA",31:"HEXCOLOR",32:"RGBCOLOR",33:"RGBACOLOR"},productions_:[0,[3,4],[4,0],[4,2],[6,0],[6,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,5],[10,2],[10,3],[10,4],[10,5],[10,3],[10,3],[10,3],[10,4],[10,4],[10,2],[10,3],[23,1],[23,1],[23,1],[23,2],[23,2],[25,1],[25,3],[26,3],[28,1],[28,1],[29,1],[29,2],[30,1],[30,1],[30,1],[30,1],[30,1],[18,1],[18,3],[13,1],[13,1]],performAction:(0,a.K)(function(t,e,n,s,i,r,l){var a=r.length-1;switch(i){case 1:return r[a-1];case 2:case 3:case 4:case 6:this.$=[];break;case 5:case 35:r[a-1].push(r[a]),this.$=r[a-1];break;case 7:case 22:case 32:case 36:case 37:case 38:case 39:case 40:case 43:case 44:this.$=r[a];break;case 8:s.setDiagramTitle(r[a].substr(6)),this.$=r[a].substr(6);break;case 9:s.addSubsetData([r[a]],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 10:s.addSubsetData([r[a-1]],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 11:s.addSubsetData([r[a-2]],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 12:s.addSubsetData([r[a-3]],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 13:if(r[a].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a]),s.addSubsetData(r[a],void 0,void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 14:if(r[a-1].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-1]),s.addSubsetData(r[a-1],r[a],void 0),s.setIndentMode&&s.setIndentMode(!0);break;case 15:if(r[a-2].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-2]),s.addSubsetData(r[a-2],void 0,parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 16:if(r[a-3].length<2)throw Error("union requires multiple identifiers");s.validateUnionIdentifiers&&s.validateUnionIdentifiers(r[a-3]),s.addSubsetData(r[a-3],r[a-2],parseFloat(r[a])),s.setIndentMode&&s.setIndentMode(!0);break;case 17:case 18:case 19:s.addTextData(r[a-1],r[a],void 0);break;case 20:case 21:s.addTextData(r[a-2],r[a-1],r[a]);break;case 23:s.addStyleData(r[a-1],r[a]);break;case 24:case 25:case 26:var o=s.getCurrentSets();if(!o)throw Error("text requires set");s.addTextData(o,r[a],void 0);break;case 27:case 28:var o=s.getCurrentSets();if(!o)throw Error("text requires set");s.addTextData(o,r[a-1],r[a]);break;case 29:case 41:case 34:this.$=[r[a]];break;case 30:case 42:this.$=[...r[a-2],r[a]];break;case 31:this.$=[r[a-2],r[a]];break;case 33:this.$=r[a].join(" ")}},"anonymous"),table:[t(e,[2,2],{3:1,4:2}),{1:[3]},{5:[1,3],8:[1,4]},t(n,[2,4],{6:5}),t(e,[2,3]),{7:[1,6],8:[1,8],9:7,10:9,11:[1,10],12:[1,11],17:[1,12],19:[1,13],22:[1,14],24:[1,15]},{1:[2,1]},t(n,[2,5]),t(n,[2,6]),t(n,[2,7]),t(n,[2,8]),{13:16,20:s,21:i},{13:20,18:19,20:s,21:i},{13:20,18:21,20:s,21:i},{16:[1,25],20:[1,23],21:[1,24],23:22},{13:20,18:26,20:s,21:i},t(n,[2,9],{14:[1,27],15:[1,28]}),t(r,[2,43]),t(r,[2,44]),t(n,[2,13],{14:[1,29],15:[1,30],27:l}),t(r,[2,41]),{16:[1,34],20:[1,32],21:[1,33],27:l},t(n,[2,22]),t(n,[2,24],{14:[1,35]}),t(n,[2,25],{14:[1,36]}),t(n,[2,26]),{20:o,25:37,26:38,27:l},t(n,[2,10],{15:[1,40]}),{16:[1,41]},t(n,[2,14],{15:[1,42]}),{16:[1,43]},{13:44,20:s,21:i},t(n,[2,17],{14:[1,45]}),t(n,[2,18],{14:[1,46]}),t(n,[2,19]),t(n,[2,27]),t(n,[2,28]),t(n,[2,23],{27:[1,47]}),t(h,[2,29]),{15:[1,48]},{16:[1,49]},t(n,[2,11]),{16:[1,50]},t(n,[2,15]),t(r,[2,42]),t(n,[2,20]),t(n,[2,21]),{20:o,26:51},{16:c,20:u,21:[1,53],28:52,29:54,30:55,31:f,32:d,33:y},t(n,[2,12]),t(n,[2,16]),t(h,[2,30]),t(h,[2,31]),t(h,[2,32]),t(h,[2,33],{30:61,16:c,20:u,31:f,32:d,33:y}),t(g,[2,34]),t(g,[2,36]),t(g,[2,37]),t(g,[2,38]),t(g,[2,39]),t(g,[2,40]),t(g,[2,35])],defaultActions:{6:[2,1]},parseError:(0,a.K)(function(t,e){if(e.recoverable)this.trace(t);else{var n=Error(t);throw n.hash=e,n}},"parseError"),parse:(0,a.K)(function(t){var e=this,n=[0],s=[],i=[null],r=[],l=this.table,o="",h=0,c=0,u=0,f=r.slice.call(arguments,1),d=Object.create(this.lexer),y={};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(y[g]=this.yy[g]);d.setInput(t,y),y.lexer=d,y.parser=this,void 0===d.yylloc&&(d.yylloc={});var x=d.yylloc;r.push(x);var p=d.options&&d.options.ranges;function m(){var t;return"number"!=typeof(t=s.pop()||d.lex()||1)&&(t instanceof Array&&(t=(s=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof y.parseError?this.parseError=y.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,a.K)(function(t){n.length=n.length-2*t,i.length=i.length-t,r.length=r.length-t},"popStack"),(0,a.K)(m,"lex");for(var b,v,M,I,k,_,w,S,E,z={};;){if(M=n[n.length-1],this.defaultActions[M]?I=this.defaultActions[M]:(null==b&&(b=m()),I=l[M]&&l[M][b]),void 0===I||!I.length||!I[0]){var T="";for(_ in E=[],l[M])this.terminals_[_]&&_>2&&E.push("'"+this.terminals_[_]+"'");T=d.showPosition?"Parse error on line "+(h+1)+":\n"+d.showPosition()+"\nExpecting "+E.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(T,{text:d.match,token:this.terminals_[b]||b,line:d.yylineno,loc:x,expected:E})}if(I[0]instanceof Array&&I.length>1)throw Error("Parse Error: multiple actions possible at state: "+M+", token: "+b);switch(I[0]){case 1:n.push(b),i.push(d.yytext),r.push(d.yylloc),n.push(I[1]),b=null,v?(b=v,v=null):(c=d.yyleng,o=d.yytext,h=d.yylineno,x=d.yylloc,u>0&&u--);break;case 2:if(w=this.productions_[I[1]][1],z.$=i[i.length-w],z._$={first_line:r[r.length-(w||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(w||1)].first_column,last_column:r[r.length-1].last_column},p&&(z._$.range=[r[r.length-(w||1)].range[0],r[r.length-1].range[1]]),void 0!==(k=this.performAction.apply(z,[o,c,h,y,I[1],i,r].concat(f))))return k;w&&(n=n.slice(0,-1*w*2),i=i.slice(0,-1*w),r=r.slice(0,-1*w)),n.push(this.productions_[I[1]][0]),i.push(z.$),r.push(z._$),S=l[n[n.length-2]][n[n.length-1]],n.push(S);break;case 3:return!0}}return!0},"parse")};function p(){this.yy={}}return x.lexer={EOF:1,parseError:(0,a.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,a.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,a.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,a.K)(function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var s=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),n.length-1&&(this.yylineno-=n.length-1);var i=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:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,a.K)(function(){return this._more=!0,this},"more"),reject:(0,a.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,a.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,a.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,a.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,a.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,a.K)(function(t,e){var n,s,i;if(this.options.backtrack_lexer&&(i={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&&(i.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var r in i)this[r]=i[r];return!1},"test_match"),next:(0,a.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,n,s,i=this._currentRules(),r=0;r<i.length;r++)if((n=this._input.match(this.rules[i[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[r])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,a.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,a.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,a.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,a.K)(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:(0,a.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,a.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,a.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,a.K)(function(t,e,n,s){switch(n){case 0:case 1:case 2:case 4:case 7:case 8:break;case 3:if(t.getIndentMode&&t.getIndentMode())return t.consumeIndentText=!0,this.begin("INITIAL"),22;break;case 5:t.setIndentMode&&t.setIndentMode(!1),this.begin("INITIAL"),this.unput(e.yytext);break;case 6:return this.begin("bol"),8;case 9:return 7;case 10:return 11;case 11:return 5;case 12:return 12;case 13:return 17;case 14:if(!t.consumeIndentText)return 19;t.consumeIndentText=!1;break;case 15:return 24;case 16:return e.yytext=e.yytext.slice(2,-2),14;case 17:return e.yytext=e.yytext.slice(1,-1).trim(),14;case 18:return 16;case 19:return 31;case 20:return 33;case 21:return 32;case 22:return 20;case 23:return 21;case 24:return 27;case 25:return 15}},"anonymous"),rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[ \t]+(?=[\n\r]))/i,/^(?:[ \t]+(?=text\b))/i,/^(?:[ \t]+)/i,/^(?:[^ \t\n\r])/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[ \t]+)/i,/^(?:$)/i,/^(?:title\s[^#\n;]+)/i,/^(?:venn-beta\b)/i,/^(?:set\b)/i,/^(?:union\b)/i,/^(?:text\b)/i,/^(?:style\b)/i,/^(?:\["[^\"]*"\])/i,/^(?:\[[^\]\"]+\])/i,/^(?:[+-]?(\d+(\.\d+)?|\.\d+))/i,/^(?:#[0-9a-fA-F]{3,8})/i,/^(?:rgba\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:rgb\(\s*[0-9.]+\s*[,]\s*[0-9.]+\s*[,]\s*[0-9.]+\s*\))/i,/^(?:[A-Za-z_][A-Za-z0-9\-_]*)/i,/^(?:"[^\"]*")/i,/^(?:,)/i,/^(?::)/i],conditions:{bol:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0},INITIAL:{rules:[0,1,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}},(0,a.K)(p,"Parser"),p.prototype=x,x.Parser=p,new p}();q.parser=q;var B=[],G=[],W=[],V=new Set,X=!1,Y=(0,a.K)((t,e,n)=>{let i=tn(t).sort(),r=n??10/Math.pow(t.length,2);s=i,1===i.length&&V.add(i[0]),B.push({sets:i,size:r,label:e?H(e):void 0})},"addSubsetData"),Z=(0,a.K)(()=>B,"getSubsetData"),H=(0,a.K)(t=>{let e=t.trim();return e.length>=2&&e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e},"normalizeText"),J=(0,a.K)(t=>t?H(t):t,"normalizeStyleValue"),Q=(0,a.K)((t,e,n)=>{let s=H(e);G.push({sets:tn(t).sort(),id:s,label:n?H(n):void 0})},"addTextData"),tt=(0,a.K)((t,e)=>{let n=tn(t).sort(),s={};for(let[t,n]of e)s[t]=J(n)??n;W.push({targets:n,styles:s})},"addStyleData"),te=(0,a.K)(()=>W,"getStyleData"),tn=(0,a.K)(t=>t.map(t=>H(t)),"normalizeIdentifierList"),ts=(0,a.K)(t=>{let e=tn(t).filter(t=>!V.has(t));if(e.length>0)throw Error(`unknown set identifier: ${e.join(", ")}`)},"validateUnionIdentifiers"),ti=(0,a.K)(()=>G,"getTextData"),tr=(0,a.K)(()=>s,"getCurrentSets"),tl=(0,a.K)(()=>X,"getIndentMode"),ta=(0,a.K)(t=>{X=t},"setIndentMode"),to=l.UI.venn;function th(){return(0,r.$t)(to,(0,l.zj)().venn)}(0,a.K)(th,"getConfig");var tc={getConfig:th,clear:(0,a.K)(()=>{(0,l.IU)(),B.length=0,G.length=0,W.length=0,V.clear(),s=void 0,X=!1},"customClear"),setAccTitle:l.SV,getAccTitle:l.iN,setDiagramTitle:l.ke,getDiagramTitle:l.ab,getAccDescription:l.m7,setAccDescription:l.EI,addSubsetData:Y,getSubsetData:Z,addTextData:Q,addStyleData:tt,validateUnionIdentifiers:ts,getTextData:ti,getStyleData:te,getCurrentSets:tr,getIndentMode:tl,setIndentMode:ta},tu=(0,a.K)(t=>`
|
|
2
|
+
.venn-title {
|
|
3
|
+
font-size: 32px;
|
|
4
|
+
fill: ${t.vennTitleTextColor};
|
|
5
|
+
font-family: ${t.fontFamily};
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.venn-circle text {
|
|
9
|
+
font-size: 48px;
|
|
10
|
+
font-family: ${t.fontFamily};
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.venn-intersection text {
|
|
14
|
+
font-size: 48px;
|
|
15
|
+
fill: ${t.vennSetTextColor};
|
|
16
|
+
font-family: ${t.fontFamily};
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.venn-text-node {
|
|
20
|
+
font-family: ${t.fontFamily};
|
|
21
|
+
color: ${t.vennSetTextColor};
|
|
22
|
+
}
|
|
23
|
+
`,"getStyles");function tf(t){let e=new Map;for(let n of t){let t=n.targets.join("|"),s=e.get(t);s?Object.assign(s,n.styles):e.set(t,{...n.styles})}return e}(0,a.K)(tf,"buildStyleByKey");var td=(0,a.K)((t,e,n,s)=>{let r=s.db,a=r.getConfig?.(),{themeVariables:c,look:y,handDrawnSeed:g}=(0,l.zj)(),x="handDrawn"===y,p=[c.venn1,c.venn2,c.venn3,c.venn4,c.venn5,c.venn6,c.venn7,c.venn8].filter(Boolean),m=r.getDiagramTitle?.(),b=r.getSubsetData(),v=r.getTextData(),M=tf(r.getStyleData()),I=tx(b),k=a?.width??800,_=a?.height??450,w=k/1600,S=m?48*w:0,z=c.primaryTextColor??c.textColor,T=(0,i.D)(e);T.attr("viewBox",`0 0 ${k} ${_}`),m&&T.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",c.vennTitleTextColor||c.titleColor);let R=(0,o.Ltv)(document.createElement("div")),O=(function(t={}){let e=!1,n=600,s=350,i=15,r=1e3,l=Math.PI/2,a=!0,o=null,h=!0,c=!0,u=null,f=null,d=!1,y=null,g=!!t&&!!t.symmetricalTextCentre&&t.symmetricalTextCentre,x={},p=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],m=0,b=function(t){if(t in x)return x[t];var e=x[t]=p[m];return(m+=1)>=p.length&&(m=0),e},v=E,M=A;function I(x){let p=x.datum(),m=new Set;p.forEach(t=>{0==t.size&&1==t.sets.length&&m.add(t.sets[0])});let I={},k={};if((p=p.filter(t=>!t.sets.some(t=>m.has(t)))).length>0){let t=v(p,{lossFunction:M,distinct:d});a&&(t=$(t,l,f)),k=j(I=N(t,n,s,i,o),p,g)}let _={};function w(t){return t.sets in _?_[t.sets]:1==t.sets.length?""+t.sets[0]:void 0}p.forEach(t=>{t.label&&(_[t.sets]=t.label)}),x.selectAll("svg").data([I]).enter().append("svg");let S=x.select("svg");e?S.attr("viewBox",`0 0 ${n} ${s}`):S.attr("width",n).attr("height",s);let E={},z=!1;function T(t){return e=>{var i,r;return i=t.sets.map(t=>{let i=E[t],r=I[t];return i||(i={x:n/2,y:s/2,radius:1}),r||(r={x:n/2,y:s/2,radius:1}),{x:i.x*(1-e)+r.x*e,y:i.y*(1-e)+r.y*e,radius:i.radius*(1-e)+r.radius*e}}),r=y,P(L(i),r)}}S.selectAll(".venn-area path").each(function(t){let e,n=this.getAttribute("d");1==t.sets.length&&n&&!d&&(z=!0,E[t.sets[0]]={x:Number.parseFloat((e=n.split(" "))[1]),y:Number.parseFloat(e[2]),radius:-Number.parseFloat(e[4])})});let A=S.selectAll(".venn-area").data(p,t=>t.sets),K=A.enter().append("g").attr("class",t=>`venn-area venn-${1==t.sets.length?"circle":"intersection"}${t.colour||t.color?" venn-coloured":""}`).attr("data-venn-sets",t=>t.sets.join("_")),R=K.append("path"),O=K.append("text").attr("class","label").text(t=>w(t)).attr("text-anchor","middle").attr("dy",".35em").attr("x",n/2).attr("y",s/2);function C(t){return"function"==typeof t.transition?t.transition("venn").duration(r):t}c&&(R.style("fill-opacity","0").filter(t=>1==t.sets.length).style("fill",t=>t.colour?t.colour:t.color?t.color:b(t.sets)).style("fill-opacity",".25"),O.style("fill",e=>e.colour||e.color?"#FFF":t.textFill?t.textFill:1==e.sets.length?b(e.sets):"#444"));let F=x;z&&"function"==typeof F.transition?(F=C(x)).selectAll("path").attrTween("d",T):F.selectAll("path").attr("d",t=>P(L(t.sets.map(t=>I[t])),void 0),y);let U=F.selectAll("text").filter(t=>t.sets in k).text(t=>w(t)).attr("x",t=>Math.floor(k[t.sets].x)).attr("y",t=>Math.floor(k[t.sets].y));h&&(z?"on"in U?U.on("end",D(I,w)):U.each("end",D(I,w)):U.each(D(I,w)));let q=C(A.exit()).remove();"function"==typeof A.transition&&q.selectAll("path").attrTween("d",T);let B=q.selectAll("text").attr("x",n/2).attr("y",s/2);return null!==u&&(O.style("font-size","0px"),U.style("font-size",u),B.style("font-size","0px")),{circles:I,textCentres:k,nodes:A,enter:K,update:F,exit:q}}return I.wrap=function(t){return arguments.length?(h=t,I):h},I.useViewBox=function(){return e=!0,I},I.width=function(t){return arguments.length?(n=t,I):n},I.height=function(t){return arguments.length?(s=t,I):s},I.padding=function(t){return arguments.length?(i=t,I):i},I.distinct=function(t){return arguments.length?(d=t,I):d},I.colours=function(t){return arguments.length?(b=t,I):b},I.colors=function(t){return arguments.length?(b=t,I):b},I.fontSize=function(t){return arguments.length?(u=t,I):u},I.round=function(t){return arguments.length?(y=t,I):y},I.duration=function(t){return arguments.length?(r=t,I):r},I.layoutFunction=function(t){return arguments.length?(v=t,I):v},I.normalize=function(t){return arguments.length?(a=t,I):a},I.scaleToFit=function(t){return arguments.length?(o=t,I):o},I.styled=function(t){return arguments.length?(c=t,I):c},I.orientation=function(t){return arguments.length?(l=t,I):l},I.orientationOrder=function(t){return arguments.length?(f=t,I):f},I.lossFunction=function(t){return arguments.length?(M="default"===t?A:"logRatio"===t?K:t,I):M},I})().width(k).height(_-S);R.datum(I).call(O);let C=x?U.A.svg(R.select("svg").node()):void 0,F=function(t,e={}){let{lossFunction:n,layoutFunction:s=E,normalize:i=!0,orientation:r=Math.PI/2,orientationOrder:l,width:a=600,height:o=350,padding:h=15,scaleToFit:c=!1,symmetricalTextCentre:u=!1,distinct:f,round:d=2}=e,y=s(t,{lossFunction:"default"!==n&&n?"logRatio"===n?K:n:A,distinct:f});i&&(y=$(y,r,l));let g=N(y,a,o,h,c),x=j(g,t,u),p=new Map(Object.keys(g).map(t=>[t,{set:t,x:g[t].x,y:g[t].y,radius:g[t].radius}])),m=t.map(t=>{let e=t.sets.map(t=>p.get(t)),n=L(e),s=P(n,d);return{circles:e,arcs:n,path:s,area:t,has:new Set(t.sets)}});return m.map(({circles:t,arcs:e,path:n,area:s})=>({data:s,text:x[s.sets],circles:t,arcs:e,path:n,distinctPath:n+function(t){let e="";for(let n of m)n.has.size>t.length&&t.every(t=>n.has.has(t))&&(e+=" "+n.path);return e}(s.sets)}))}(I,{width:k,height:_-S,padding:a?.padding??15}),q=new Map;for(let t of F){let e=ty([...t.data.sets].sort());q.set(e,t)}v.length>0&&tg(a,q,R,v,w,M);let B=(0,h.A)(c.background||"#f4f4f4");R.selectAll(".venn-circle").each(function(t,e){let n=(0,o.Ltv)(this),s=ty([...t.sets].sort()),i=M.get(s),r=p.length>0?p[e%p.length]:void 0,l=i?.fill||r||c.primaryColor;n.classed(`venn-set-${e%8}`,!0);let a=i?.["fill-opacity"]??.1,h=i?.stroke||l,y=i?.["stroke-width"]||`${5*w}`;if(x&&C){let t=q.get(s);if(t&&t.circles.length>0){let s=t.circles[0],i=C.circle(s.x,s.y,2*s.radius,{roughness:.7,seed:g,fill:u(l,.7),fillStyle:"hachure",fillWeight:2,hachureGap:8,hachureAngle:-41+60*e,stroke:h,strokeWidth:parseFloat(String(y))});n.select("path").remove(),n.node()?.insertBefore(i,n.select("text").node())}}else n.select("path").style("fill",l).style("fill-opacity",a).style("stroke",h).style("stroke-width",y).style("stroke-opacity",.95);let m=i?.color||(B?(0,f.A)(l,30):(0,d.A)(l,30));n.select("text").style("font-size",`${48*w}px`).style("fill",m)}),x&&C?R.selectAll(".venn-intersection").each(function(t){let e=(0,o.Ltv)(this),n=ty([...t.sets].sort()),s=M.get(n),i=s?.fill;if(i){let t=e.select("path"),n=t.attr("d");if(n){let e=C.path(n,{roughness:.7,seed:g,fill:u(i,.3),fillStyle:"cross-hatch",fillWeight:2,hachureGap:6,hachureAngle:60,stroke:"none"}),s=t.node();s?.parentNode?.insertBefore(e,s),t.remove()}}else e.select("path").style("fill-opacity",0);e.select("text").style("font-size",`${48*w}px`).style("fill",s?.color??c.vennSetTextColor??z)}):(R.selectAll(".venn-intersection text").style("font-size",`${48*w}px`).style("fill",t=>{let e=ty([...t.sets].sort());return M.get(e)?.color??c.vennSetTextColor??z}),R.selectAll(".venn-intersection path").style("fill-opacity",t=>{let e=ty([...t.sets].sort());return+!!M.get(e)?.fill}).style("fill",t=>{let e=ty([...t.sets].sort());return M.get(e)?.fill??"transparent"}));let G=T.append("g").attr("transform",`translate(0, ${S})`),W=R.select("svg").node();if(W&&"childNodes"in W)for(let t of[...W.childNodes])G.node()?.appendChild(t);(0,l.a$)(T,_,k,a?.useMaxWidth??!0)},"draw");function ty(t){return t.join("|")}function tg(t,e,n,s,i,r){let l=t?.useDebugLayout??!1,a=n.select("svg").append("g").attr("class","venn-text-nodes"),o=new Map;for(let t of s){let e=ty(t.sets),n=o.get(e);n?n.push(t):o.set(e,[t])}for(let[t,n]of o.entries()){let s=e.get(t);if(!s?.text)continue;let o=s.text.x,h=s.text.y,c=Math.min(...s.circles.map(t=>t.radius)),u=Math.min(...s.circles.map(t=>t.radius-Math.hypot(o-t.x,h-t.y))),f=Number.isFinite(u)?Math.max(0,u):0;0===f&&Number.isFinite(c)&&(f=.6*c);let d=a.append("g").attr("class","venn-text-area").attr("font-size",`${40*i}px`);l&&d.append("circle").attr("class","venn-text-debug-circle").attr("cx",o).attr("cy",h).attr("r",f).attr("fill","none").attr("stroke","purple").attr("stroke-width",1.5*i).attr("stroke-dasharray",`${6*i} ${4*i}`);let y=Math.max(80*i,2*f*.95),g=Math.max(60*i,2*f*.95),x=(s.data.label&&s.data.label.length>0?Math.min(32*i,.25*f):0)+(n.length<=2?30*i:0),p=o-y/2,m=h-g/2+x,b=Math.max(1,Math.ceil(Math.sqrt(n.length))),v=Math.max(1,Math.ceil(n.length/b)),M=y/b,I=g/v;for(let[t,e]of n.entries()){let n=t%b,s=Math.floor(t/b),a=p+M*(n+.5),o=m+I*(s+.5);l&&d.append("rect").attr("class","venn-text-debug-cell").attr("x",p+M*n).attr("y",m+I*s).attr("width",M).attr("height",I).attr("fill","none").attr("stroke","teal").attr("stroke-width",+i).attr("stroke-dasharray",`${4*i} ${3*i}`);let h=.9*M,c=.9*I,u=d.append("foreignObject").attr("class","venn-text-node-fo").attr("width",h).attr("height",c).attr("x",a-h/2).attr("y",o-c/2).attr("overflow","visible"),f=r.get(e.id)?.color,y=u.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(e.label??e.id);f&&y.style("color",f)}}}function tx(t){let e=new Set(t.map(t=>[...t.sets].sort().join("|"))),n=new Map(t.filter(t=>1===t.sets.length&&void 0!==t.size).map(t=>[t.sets[0],t.size])),s=[];for(let i of t){if(i.sets.length<3)continue;let t=[...i.sets].sort();for(let i=0;i<t.length-1;i++)for(let r=i+1;r<t.length;r++){let l=[t[i],t[r]],a=l.join("|");if(!e.has(a)){e.add(a);let t=n.get(l[0]),i=n.get(l[1]),r=void 0!==t&&void 0!==i?Math.min(t,i)/4:2.5;s.push({sets:l,size:r,label:""})}}}return s.length>0?[...t,...s]:t}(0,a.K)(ty,"stableSetsKey"),(0,a.K)(tg,"renderTextNodes"),(0,a.K)(tx,"ensurePairwiseSubsets");var tp={parser:q,db:tc,renderer:{draw:td},styles:tu}}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7271],{37271:(e,s,c)=>{c.d(s,{createCynefinServices:()=>a.t});var a=c(808);c(85477)}}]);
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7443],{14569:(t,e,s)=>{s.d(e,{P:()=>n});var i=s(95631),r=s(5218),a=s(14528),n=(0,a.K)((t,e,s,a)=>{t.attr("class",s);let{width:n,height:o,x:c,y:h}=u(t,e);(0,i.a$)(t,o,n,a);let d=l(c,h,n,o,e);t.attr("viewBox",d),r.R.debug(`viewBox configured: ${d} with padding: ${e}`)},"setupViewPortForSVG"),u=(0,a.K)((t,e)=>{let s=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:s.width+2*e,height:s.height+2*e,x:s.x,y:s.y}},"calculateDimensionsWithPadding"),l=(0,a.K)((t,e,s,i,r)=>`${t-r} ${e-r} ${s} ${i}`,"createViewBox")},26989:(t,e,s)=>{s.d(e,{o:()=>i});var i=(0,s(14528).K)(()=>`
|
|
2
|
+
/* Font Awesome icon styling - consolidated */
|
|
3
|
+
.label-icon {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
height: 1em;
|
|
6
|
+
overflow: visible;
|
|
7
|
+
vertical-align: -0.125em;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.node .label-icon path {
|
|
11
|
+
fill: currentColor;
|
|
12
|
+
stroke: revert;
|
|
13
|
+
stroke-width: revert;
|
|
14
|
+
}
|
|
15
|
+
`,"getIconStyles")},27443:(t,e,s)=>{s.d(e,{AC:()=>S,tM:()=>T,ur:()=>F});var i=s(26989),r=s(98204),a=s(14569),n=s(40350),u=s(33280),l=s(31984),o=s(60833),c=s(94698),h=s(58959),d=s(95631),p=s(5218),g=s(14528),A=s(60830),b=s(10637),y=s(63842),k=s(37245),f=class{constructor(){this.vertexCounter=0,this.config=(0,d.D7)(),this.diagramId="",this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=d.SV,this.setAccDescription=d.EI,this.setDiagramTitle=d.ke,this.getAccTitle=d.iN,this.getAccDescription=d.m7,this.getDiagramTitle=d.ab,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen("gen-2")}static{(0,g.K)(this,"FlowDB")}sanitizeText(t){return d.Y2.sanitizeText(t,this.config)}sanitizeNodeLabelType(t){switch(t){case"markdown":case"string":case"text":return t;default:return"markdown"}}setDiagramId(t){this.diagramId=t}lookUpDomId(t){for(let e of this.vertices.values())if(e.id===t)return this.diagramId?`${this.diagramId}-${e.domId}`:e.domId;return this.diagramId?`${this.diagramId}-${t}`:t}addVertex(t,e,s,i,r,a,u={},l){let c,h;if(!t||0===t.trim().length)return;if(void 0!==l){let t;t=l.includes("\n")?l+"\n":"{\n"+l+"\n}",c=(0,n.H)(t,{schema:n.r})}let g=this.subGraphLookup.get(t);if(g&&c){g.metadata={...g.metadata,...c};return}let A=this.edges.find(e=>e.id===t);if(A){let t=c;t?.animate!==void 0&&(A.animate=t.animate),t?.animation!==void 0&&(A.animation=t.animation),t?.curve!==void 0&&(A.interpolate=t.curve);return}let b=this.vertices.get(t);if(void 0===b&&(void 0===e&&void 0===s&&null!=i&&p.R.warn(`Style applied to unknown node "${t}". This may indicate a typo. The node will be created automatically.`),b={id:t,labelType:"text",domId:"flowchart-"+t+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(t,b)),this.vertexCounter++,void 0!==e?(this.config=(0,d.D7)(),h=this.sanitizeText(e.text.trim()),b.labelType=e.type,h.startsWith('"')&&h.endsWith('"')&&(h=h.substring(1,h.length-1)),b.text=h):void 0===b.text&&(b.text=t),void 0!==s&&(b.type=s),null!=i&&i.forEach(t=>{b.styles.push(t)}),null!=r&&r.forEach(t=>{b.classes.push(t)}),void 0!==a&&(b.dir=a),void 0===b.props?b.props=u:void 0!==u&&Object.assign(b.props,u),void 0!==c){if(c.shape){if(c.shape!==c.shape.toLowerCase()||c.shape.includes("_"))throw Error(`No such shape: ${c.shape}. Shape names should be lowercase.`);if(!(0,o.aP)(c.shape))throw Error(`No such shape: ${c.shape}.`);b.type=c?.shape}c?.label&&(b.text=c?.label,b.labelType=this.sanitizeNodeLabelType(c?.labelType)),c?.icon&&(b.icon=c?.icon,c.label?.trim()||b.text!==t||(b.text="")),c?.form&&(b.form=c?.form),c?.pos&&(b.pos=c?.pos),c?.img&&(b.img=c?.img,c.label?.trim()||b.text!==t||(b.text="")),c?.constraint&&(b.constraint=c.constraint),c.w&&(b.assetWidth=Number(c.w)),c.h&&(b.assetHeight=Number(c.h))}}addSingleLink(t,e,s,i){let r={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};p.R.info("abc78 Got edge...",r);let a=s.text;if(void 0!==a&&(r.text=this.sanitizeText(a.text.trim()),r.text.startsWith('"')&&r.text.endsWith('"')&&(r.text=r.text.substring(1,r.text.length-1)),r.labelType=this.sanitizeNodeLabelType(a.type)),void 0!==s&&(r.type=s.type,r.stroke=s.stroke,r.length=s.length>10?10:s.length),i&&!this.edges.some(t=>t.id===i))r.id=i,r.isUserDefinedId=!0;else{let t=this.edges.filter(t=>t.start===r.start&&t.end===r.end);0===t.length?r.id=(0,h.rY)(r.start,r.end,{counter:0,prefix:"L"}):r.id=(0,h.rY)(r.start,r.end,{counter:t.length+1,prefix:"L"})}if(this.edges.length<(this.config.maxEdges??500))p.R.info("Pushing edge..."),this.edges.push(r);else throw Error(`Edge limit exceeded. ${this.edges.length} edges found, but the limit is ${this.config.maxEdges}.
|
|
16
|
+
|
|
17
|
+
Initialize mermaid with maxEdges set to a higher number to allow more edges.
|
|
18
|
+
You cannot set this config via configuration inside the diagram as it is a secure config.
|
|
19
|
+
You have to call mermaid.initialize.`)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,s){let i=this.isLinkData(s)?s.id.replace("@",""):void 0;for(let r of(p.R.info("addLink",t,e,i),t))for(let a of e){let n=r===t[t.length-1],u=a===e[0];n&&u?this.addSingleLink(r,a,s,i):this.addSingleLink(r,a,s,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw Error(`The index ${t} for linkStyle is out of bounds. Valid indices for linkStyle are between 0 and ${this.edges.length-1}. (Help: Ensure that the index is within the range of existing edges.)`);"default"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,(this.edges[t]?.style?.length??0)>0&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let s=e.join().replace(/\\,/g,"\xa7\xa7\xa7").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let e=this.classes.get(t);void 0===e&&(e={id:t,styles:[],textStyles:[]},this.classes.set(t,e)),null!=s&&s.forEach(t=>{if(/color/.exec(t)){let s=t.replace("fill","bgFill");e.textStyles.push(s)}e.styles.push(t)})})}setDirection(t){this.direction=t.trim(),/.*</.exec(this.direction)&&(this.direction="RL"),/.*\^/.exec(this.direction)&&(this.direction="BT"),/.*>/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,e){for(let s of t.split(",")){let t=this.vertices.get(s);t&&t.classes.push(e);let i=this.edges.find(t=>t.id===s);i&&i.classes.push(e);let r=this.subGraphLookup.get(s);r&&r.classes.push(e)}}setTooltip(t,e){if(void 0!==e)for(let s of(e=this.sanitizeText(e),t.split(",")))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(s):s,e)}setClickFun(t,e,s){if("loose"!==(0,d.D7)().securityLevel||void 0===e)return;let i=[];if("string"==typeof s){i=s.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t<i.length;t++){let e=i[t].trim();e.startsWith('"')&&e.endsWith('"')&&(e=e.substr(1,e.length-2)),i[t]=e}}0===i.length&&i.push(t);let r=this.vertices.get(t);r&&(r.haveCallback=!0,this.funs.push(()=>{let s=this.lookUpDomId(t),r=document.querySelector(`[id="${s}"]`);null!==r&&r.addEventListener("click",()=>{h._K.runFunc(e,...i)},!1)}))}setLink(t,e,s){t.split(",").forEach(t=>{let i=this.vertices.get(t);void 0!==i&&(i.link=h._K.formatUrl(e,this.config),i.linkTarget=s)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,s){t.split(",").forEach(t=>{this.setClickFun(t,e,s)}),this.setClass(t,"clickable")}bindFunctions(t){this.funs.forEach(e=>{e(t)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let e=(0,l.Ck)();(0,A.Ltv)(t).select("svg").selectAll("g.node").on("mouseover",t=>{let s=(0,A.Ltv)(t.currentTarget),i=s.attr("title");if(null===i)return;let r=t.currentTarget?.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(s.attr("title")).style("left",window.scrollX+r.left+(r.right-r.left)/2+"px").style("top",window.scrollY+r.bottom+"px"),e.html(b.A.sanitize(i)),s.classed("hover",!0)}).on("mouseout",t=>{e.transition().duration(500).style("opacity",0),(0,A.Ltv)(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.diagramId="",this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=(0,d.D7)(),(0,d.IU)()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,s){let i=t.text.trim(),r=s.text;t===s&&/\s/.exec(s.text)&&(i=void 0);let a=(0,g.K)(t=>{let e,s={boolean:{},number:{},string:{}},i=[];return{nodeList:t.filter(function(t){let r=typeof t;return t.stmt&&"dir"===t.stmt?(e=t.value,!1):""!==t.trim()&&(r in s?!s[r].hasOwnProperty(t)&&(s[r][t]=!0):!i.includes(t)&&i.push(t))}),dir:e}},"uniq")(e.flat()),n=a.nodeList,u=a.dir,l=(0,d.D7)().flowchart??{};if(u=u??(l.inheritDir?this.getDirection()??(0,d.D7)().direction??void 0:void 0),"gen-1"===this.version)for(let t=0;t<n.length;t++)n[t]=this.lookUpDomId(n[t]);i=i??"subGraph"+this.subCount,r=r||"",r=this.sanitizeText(r),this.subCount=this.subCount+1;let o={id:i,nodes:n,title:r.trim(),classes:[],dir:u,labelType:this.sanitizeNodeLabelType(s?.type)};return p.R.info("Adding",o.id,o.nodes,o.dir),o.nodes=this.makeUniq(o,this.subGraphs).nodes,this.subGraphs.push(o),this.subGraphLookup.set(i,o),i}getPosForId(t){for(let[e,s]of this.subGraphs.entries())if(s.id===t)return e;return -1}indexNodes2(t,e){let s=this.subGraphs[e].nodes;if(this.secCount=this.secCount+1,this.secCount>2e3)return{result:!1,count:0};if(this.posCrossRef[this.secCount]=e,this.subGraphs[e].id===t)return{result:!0,count:0};let i=0,r=1;for(;i<s.length;){let e=this.getPosForId(s[i]);if(e>=0){let s=this.indexNodes2(t,e);if(s.result)return{result:!0,count:r+s.count};r+=s.count}i+=1}return{result:!1,count:r}}getDepthFirstPos(t){return this.posCrossRef[t]}indexNodes(){this.secCount=-1,this.subGraphs.length>0&&this.indexNodes2("none",this.subGraphs.length-1)}getSubGraphs(){return this.subGraphs}firstGraph(){return!!this.firstGraphFlag&&(this.firstGraphFlag=!1,!0)}destructStartLink(t){let e=t.trim(),s="arrow_open";switch(e[0]){case"<":s="arrow_point",e=e.slice(1);break;case"x":s="arrow_cross",e=e.slice(1);break;case"o":s="arrow_circle",e=e.slice(1)}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:s,stroke:i}}countChar(t,e){let s=e.length,i=0;for(let r=0;r<s;++r)e[r]===t&&++i;return i}destructEndLink(t){let e=t.trim(),s=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e.startsWith("x")&&(i="double_"+i,s=s.slice(1));break;case">":i="arrow_point",e.startsWith("<")&&(i="double_"+i,s=s.slice(1));break;case"o":i="arrow_circle",e.startsWith("o")&&(i="double_"+i,s=s.slice(1))}let r="normal",a=s.length-1;s.startsWith("=")&&(r="thick"),s.startsWith("~")&&(r="invisible");let n=this.countChar(".",s);return n&&(r="dotted",a=n),{type:i,stroke:r,length:a}}destructLink(t,e){let s,i=this.destructEndLink(t);if(e){if((s=this.destructStartLink(e)).stroke!==i.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===s.type)s.type=i.type;else{if(s.type!==i.type)return{type:"INVALID",stroke:"INVALID"};s.type="double_"+s.type}return"double_arrow"===s.type&&(s.type="double_arrow_point"),s.length=i.length,s}return i}exists(t,e){for(let s of t)if(s.nodes.includes(e))return!0;return!1}makeUniq(t,e){let s=[];return t.nodes.forEach((i,r)=>{this.exists(e,i)||s.push(t.nodes[r])}),{nodes:s}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",s="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":s=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":s=e=t.replace("double_","")}return{arrowTypeStart:e,arrowTypeEnd:s}}addNodeFromVertex(t,e,s,i,r,a){let n=s.get(t.id),u=i.get(t.id)??!1,l=this.findNode(e,t.id);if(l)l.cssStyles=t.styles,l.cssCompiledStyles=this.getCompiledStyles(t.classes),l.cssClasses=t.classes.join(" ");else{let s={id:t.id,label:t.text,labelType:t.labelType,labelStyle:"",parentId:n,padding:r.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint};u?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t),minWidth:r.flowchart?.minNodeWidth})}}getCompiledStyles(t){let e=[];for(let s of t){let t=this.classes.get(s);t?.styles&&(e=[...e,...t.styles??[]].map(t=>t.trim())),t?.textStyles&&(e=[...e,...t.textStyles??[]].map(t=>t.trim()))}return e}getData(){let t=(0,d.D7)(),e=[],s=[],i=this.getSubGraphs(),r=new Map,a=new Map,n=new Map;for(let t of i)for(let e of t.nodes)this.subGraphLookup.has(e)&&n.set(e,t.id);let u=new Map,l=new Map;for(let t of i){let e=n.get(t.id);void 0!==e&&l.set(e,[...l.get(e)??[],t.id])}let o=0,c=(0,g.K)(t=>{for(let e of(u.set(t,o++),l.get(t)??[]))c(e)},"walk");for(let t of i)n.has(t.id)||c(t.id);let p=(0,g.K)(t=>this.subGraphLookup.get(t)?.metadata?.view==="collapsed","isCollapsed"),A=(0,g.K)(t=>{let e,s=new Set,i=t;for(;void 0!==i&&!s.has(i);)s.add(i),p(i)&&(e=i),i=n.get(i);return e},"outermostCollapsed"),b=new Set,y=new Map;for(let t of i){let e=A(t.id);if(void 0!==e)for(let s of(t.id!==e&&(b.add(t.id),y.set(t.id,e)),t.nodes))s!==e&&(b.add(s),y.set(s,e))}for(let t=i.length-1;t>=0;t--){let e=i[t];if(!b.has(e.id))for(let t of(e.nodes.length>0&&a.set(e.id,!0),e.nodes))r.set(t,e.id)}for(let s=i.length-1;s>=0;s--){let a=i[s];b.has(a.id)||(a.metadata?.view==="collapsed"?e.push({id:a.id,label:a.title,labelStyle:"",labelType:a.labelType,parentId:r.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(" "),shape:"collapsedGroup",dir:a.dir,isGroup:!1,look:t.look,colorIndex:u.get(a.id)}):e.push({id:a.id,label:a.title,labelStyle:"",labelType:a.labelType,parentId:r.get(a.id),padding:8,cssCompiledStyles:this.getCompiledStyles(a.classes),cssClasses:a.classes.join(" "),shape:"rect",dir:a.dir,isGroup:!0,look:t.look,colorIndex:u.get(a.id),metadata:a.metadata}))}this.getVertices().forEach(s=>{b.has(s.id)||this.addNodeFromVertex(s,e,r,a,t,t.look||"classic")});let k=this.getEdges();return k.forEach((e,i)=>{let{arrowTypeStart:r,arrowTypeEnd:a}=this.destructEdgeType(e.type),n=[...k.defaultStyle??[]],u=y.get(e.start)??e.start,l=y.get(e.end)??e.end;if(u===l&&(y.has(e.start)||y.has(e.end)))return;e.style&&n.push(...e.style);let o={id:(0,h.rY)(u,l,{counter:i,prefix:"L"},e.id),isUserDefinedId:e.isUserDefinedId,start:u,end:l,type:e.type??"normal",label:e.text,labelType:e.labelType,labelpos:"c",thickness:e.stroke,minlen:e.length,classes:e?.stroke==="invisible"?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:e?.stroke==="invisible"||e?.type==="arrow_open"?"none":r,arrowTypeEnd:e?.stroke==="invisible"||e?.type==="arrow_open"?"none":a,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:n,style:n,pattern:e.stroke,look:t.look,animate:e.animate,animation:e.animation,curve:e.interpolate||this.edges.defaultInterpolate||t.flowchart?.curve};s.push(o)}),{nodes:e,edges:s,other:{},config:t}}defaultConfig(){return d.ME.flowchart}},m={getClasses:(0,g.K)(function(t,e){return e.db.getClasses()},"getClasses"),draw:(0,g.K)(async function(t,e,s,i){p.R.info("REF0:"),p.R.info("Drawing state diagram (v2)",e);let{securityLevel:n,flowchart:l,layout:o}=(0,d.D7)();i.db.setDiagramId(e),p.R.debug("Before getData: ");let c=i.db.getData();p.R.debug("Data: ",c);let g=(0,r.A)(e,n),A=i.db.getDirection();c.type=i.type,c.layoutAlgorithm=(0,u.q7)(o),c.direction=A,c.nodeSpacing=l?.nodeSpacing||50,c.rankSpacing=l?.rankSpacing||50,c.markers=["point","circle","cross"],c.diagramId=e,p.R.debug("REF1:",c),await (0,u.XX)(c,g);let b=c.config.flowchart?.diagramPadding??8;h._K.insertTitle(g,"flowchartTitleText",l?.titleTopMargin||0,i.db.getDiagramTitle()),(0,a.P)(g,b,"flowchart",l?.useMaxWidth||!1)},"draw")},x=function(){var t=(0,g.K)(function(t,e,s,i){for(s=s||{},i=t.length;i--;s[t[i]]=e);return s},"o"),e=[1,4],s=[1,3],i=[1,5],r=[1,8,9,10,11,27,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],a=[2,2],n=[1,13],u=[1,14],l=[1,15],o=[1,16],c=[1,23],h=[1,25],d=[1,26],p=[1,27],A=[1,50],b=[1,49],y=[1,29],k=[1,30],f=[1,31],m=[1,32],x=[1,33],E=[1,45],C=[1,47],D=[1,43],T=[1,48],F=[1,44],S=[1,51],_=[1,46],v=[1,52],B=[1,53],$=[1,34],w=[1,35],L=[1,36],I=[1,37],R=[1,38],N=[1,58],K=[1,8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],P=[1,62],G=[1,61],O=[1,63],M=[8,9,11,75,77,78],V=[1,79],U=[1,92],W=[1,97],z=[1,96],j=[1,93],Y=[1,89],H=[1,95],X=[1,91],q=[1,98],Q=[1,94],J=[1,99],Z=[1,90],tt=[8,9,10,11,40,75,77,78],te=[8,9,10,11,40,46,75,77,78],ts=[8,9,10,11,29,40,44,46,48,50,52,54,56,58,60,63,65,67,68,70,75,77,78,89,102,105,106,109,111,114,115,116],ti=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],tr=[44,60,89,102,105,106,109,111,114,115,116],ta=[1,122],tn=[1,123],tu=[1,125],tl=[1,124],to=[44,60,62,74,89,102,105,106,109,111,114,115,116],tc=[1,134],th=[1,148],td=[1,149],tp=[1,150],tg=[1,151],tA=[1,136],tb=[1,138],ty=[1,142],tk=[1,143],tf=[1,144],tm=[1,145],tx=[1,146],tE=[1,147],tC=[1,152],tD=[1,153],tT=[1,132],tF=[1,133],tS=[1,140],t_=[1,135],tv=[1,139],tB=[1,137],t$=[8,9,10,11,27,32,34,36,38,44,60,84,85,86,87,88,89,102,105,106,109,111,114,115,116,121,122,123,124,125],tw=[1,155],tL=[1,157],tI=[8,9,11],tR=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],tN=[1,177],tK=[1,173],tP=[1,174],tG=[1,178],tO=[1,175],tM=[1,176],tV=[77,116,119],tU=[8,9,10,11,12,14,27,29,32,44,60,75,84,85,86,87,88,89,90,105,109,111,114,115,116],tW=[10,106],tz=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],tj=[1,248],tY=[1,246],tH=[1,250],tX=[1,244],tq=[1,245],tQ=[1,247],tJ=[1,249],tZ=[1,251],t1=[1,269],t0=[8,9,11,106],t2=[8,9,10,11,60,84,105,106,109,110,111,112],t8={trace:(0,g.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,graphConfig:4,document:5,line:6,statement:7,SEMI:8,NEWLINE:9,SPACE:10,EOF:11,GRAPH:12,NODIR:13,DIR:14,FirstStmtSeparator:15,ending:16,endToken:17,spaceList:18,spaceListNewline:19,vertexStatement:20,separator:21,styleStatement:22,linkStyleStatement:23,classDefStatement:24,classStatement:25,clickStatement:26,subgraph:27,textNoTags:28,SQS:29,text:30,SQE:31,end:32,direction:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,shapeData:39,SHAPE_DATA:40,link:41,node:42,styledVertex:43,AMP:44,vertex:45,STYLE_SEPARATOR:46,idString:47,DOUBLECIRCLESTART:48,DOUBLECIRCLEEND:49,PS:50,PE:51,"(-":52,"-)":53,STADIUMSTART:54,STADIUMEND:55,SUBROUTINESTART:56,SUBROUTINEEND:57,VERTEX_WITH_PROPS_START:58,"NODE_STRING[field]":59,COLON:60,"NODE_STRING[value]":61,PIPE:62,CYLINDERSTART:63,CYLINDEREND:64,DIAMOND_START:65,DIAMOND_STOP:66,TAGEND:67,TRAPSTART:68,TRAPEND:69,INVTRAPSTART:70,INVTRAPEND:71,linkStatement:72,arrowText:73,TESTSTR:74,START_LINK:75,edgeText:76,LINK:77,LINK_ID:78,edgeTextToken:79,STR:80,MD_STR:81,textToken:82,keywords:83,STYLE:84,LINKSTYLE:85,CLASSDEF:86,CLASS:87,CLICK:88,DOWN:89,UP:90,textNoTagsToken:91,stylesOpt:92,"idString[vertex]":93,"idString[class]":94,CALLBACKNAME:95,CALLBACKARGS:96,HREF:97,LINK_TARGET:98,"STR[link]":99,"STR[tooltip]":100,alphaNum:101,DEFAULT:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,NODE_STRING:109,UNIT:110,BRKT:111,PCT:112,idStringToken:113,MINUS:114,MULT:115,UNICODE_TEXT:116,TEXT:117,TAGSTART:118,EDGE_TEXT:119,alphaNumToken:120,direction_tb:121,direction_bt:122,direction_rl:123,direction_lr:124,direction_td:125,$accept:0,$end:1},terminals_:{2:"error",8:"SEMI",9:"NEWLINE",10:"SPACE",11:"EOF",12:"GRAPH",13:"NODIR",14:"DIR",27:"subgraph",29:"SQS",31:"SQE",32:"end",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",40:"SHAPE_DATA",44:"AMP",46:"STYLE_SEPARATOR",48:"DOUBLECIRCLESTART",49:"DOUBLECIRCLEEND",50:"PS",51:"PE",52:"(-",53:"-)",54:"STADIUMSTART",55:"STADIUMEND",56:"SUBROUTINESTART",57:"SUBROUTINEEND",58:"VERTEX_WITH_PROPS_START",59:"NODE_STRING[field]",60:"COLON",61:"NODE_STRING[value]",62:"PIPE",63:"CYLINDERSTART",64:"CYLINDEREND",65:"DIAMOND_START",66:"DIAMOND_STOP",67:"TAGEND",68:"TRAPSTART",69:"TRAPEND",70:"INVTRAPSTART",71:"INVTRAPEND",74:"TESTSTR",75:"START_LINK",77:"LINK",78:"LINK_ID",80:"STR",81:"MD_STR",84:"STYLE",85:"LINKSTYLE",86:"CLASSDEF",87:"CLASS",88:"CLICK",89:"DOWN",90:"UP",93:"idString[vertex]",94:"idString[class]",95:"CALLBACKNAME",96:"CALLBACKARGS",97:"HREF",98:"LINK_TARGET",99:"STR[link]",100:"STR[tooltip]",102:"DEFAULT",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"NODE_STRING",110:"UNIT",111:"BRKT",112:"PCT",114:"MINUS",115:"MULT",116:"UNICODE_TEXT",117:"TEXT",118:"TAGSTART",119:"EDGE_TEXT",121:"direction_tb",122:"direction_bt",123:"direction_rl",124:"direction_lr",125:"direction_td"},productions_:[0,[3,2],[5,0],[5,2],[6,1],[6,1],[6,1],[6,1],[6,1],[4,2],[4,2],[4,2],[4,3],[16,2],[16,1],[17,1],[17,1],[17,1],[15,1],[15,1],[15,2],[19,2],[19,2],[19,1],[19,1],[18,2],[18,1],[7,2],[7,2],[7,2],[7,2],[7,2],[7,2],[7,9],[7,6],[7,4],[7,1],[7,2],[7,2],[7,1],[21,1],[21,1],[21,1],[39,2],[39,1],[20,4],[20,3],[20,4],[20,2],[20,2],[20,1],[42,1],[42,6],[42,5],[43,1],[43,3],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,8],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[41,2],[41,3],[41,3],[41,1],[41,3],[41,4],[76,1],[76,2],[76,1],[76,1],[72,1],[72,2],[73,3],[30,1],[30,2],[30,1],[30,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[28,1],[28,2],[28,1],[28,1],[24,5],[25,5],[26,2],[26,4],[26,3],[26,5],[26,3],[26,5],[26,5],[26,7],[26,2],[26,4],[26,2],[26,4],[26,4],[26,6],[22,5],[23,5],[23,5],[23,9],[23,9],[23,7],[23,7],[103,1],[103,3],[92,1],[92,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[113,1],[82,1],[82,1],[82,1],[82,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[79,1],[79,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[120,1],[47,1],[47,2],[101,1],[101,2],[33,1],[33,1],[33,1],[33,1],[33,1]],performAction:(0,g.K)(function(t,e,s,i,r,a,n){var u=a.length-1;switch(r){case 2:case 28:case 29:case 30:case 31:case 32:this.$=[];break;case 3:(!Array.isArray(a[u])||a[u].length>0)&&a[u-1].push(a[u]),this.$=a[u-1];break;case 4:case 183:case 44:case 54:case 76:case 181:this.$=a[u];break;case 11:i.setDirection("TB"),this.$="TB";break;case 12:i.setDirection(a[u-1]),this.$=a[u-1];break;case 27:this.$=a[u-1].nodes;break;case 33:this.$=i.addSubGraph(a[u-6],a[u-1],a[u-4]);break;case 34:this.$=i.addSubGraph(a[u-3],a[u-1],a[u-3]);break;case 35:this.$=i.addSubGraph(void 0,a[u-1],void 0);break;case 37:this.$=a[u].trim(),i.setAccTitle(this.$);break;case 38:case 39:this.$=a[u].trim(),i.setAccDescription(this.$);break;case 43:case 133:this.$=a[u-1]+a[u];break;case 45:i.addVertex(a[u-1][a[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[u]),i.addLink(a[u-3].stmt,a[u-1],a[u-2]),this.$={stmt:a[u-1],nodes:a[u-1].concat(a[u-3].nodes)};break;case 46:i.addLink(a[u-2].stmt,a[u],a[u-1]),this.$={stmt:a[u],nodes:a[u].concat(a[u-2].nodes)};break;case 47:i.addLink(a[u-3].stmt,a[u-1],a[u-2]),this.$={stmt:a[u-1],nodes:a[u-1].concat(a[u-3].nodes)};break;case 48:this.$={stmt:a[u-1],nodes:a[u-1]};break;case 49:i.addVertex(a[u-1][a[u-1].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[u]),this.$={stmt:a[u-1],nodes:a[u-1],shapeData:a[u]};break;case 50:this.$={stmt:a[u],nodes:a[u]};break;case 51:case 128:case 130:this.$=[a[u]];break;case 52:i.addVertex(a[u-5][a[u-5].length-1],void 0,void 0,void 0,void 0,void 0,void 0,a[u-4]),this.$=a[u-5].concat(a[u]);break;case 53:this.$=a[u-4].concat(a[u]);break;case 55:this.$=a[u-2],i.setClass(a[u-2],a[u]);break;case 56:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"square");break;case 57:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"doublecircle");break;case 58:this.$=a[u-5],i.addVertex(a[u-5],a[u-2],"circle");break;case 59:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"ellipse");break;case 60:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"stadium");break;case 61:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"subroutine");break;case 62:this.$=a[u-7],i.addVertex(a[u-7],a[u-1],"rect",void 0,void 0,void 0,Object.fromEntries([[a[u-5],a[u-3]]]));break;case 63:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"cylinder");break;case 64:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"round");break;case 65:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"diamond");break;case 66:this.$=a[u-5],i.addVertex(a[u-5],a[u-2],"hexagon");break;case 67:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"odd");break;case 68:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"trapezoid");break;case 69:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"inv_trapezoid");break;case 70:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"lean_right");break;case 71:this.$=a[u-3],i.addVertex(a[u-3],a[u-1],"lean_left");break;case 72:this.$=a[u],i.addVertex(a[u]);break;case 73:a[u-1].text=a[u],this.$=a[u-1];break;case 74:case 75:a[u-2].text=a[u-1],this.$=a[u-2];break;case 77:var l=i.destructLink(a[u],a[u-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[u-1]};break;case 78:var l=i.destructLink(a[u],a[u-2]);this.$={type:l.type,stroke:l.stroke,length:l.length,text:a[u-1],id:a[u-3]};break;case 79:case 86:case 101:case 103:this.$={text:a[u],type:"text"};break;case 80:case 87:case 102:this.$={text:a[u-1].text+""+a[u],type:a[u-1].type};break;case 81:case 88:this.$={text:a[u],type:"string"};break;case 82:case 89:case 104:this.$={text:a[u],type:"markdown"};break;case 83:var l=i.destructLink(a[u]);this.$={type:l.type,stroke:l.stroke,length:l.length};break;case 84:var l=i.destructLink(a[u]);this.$={type:l.type,stroke:l.stroke,length:l.length,id:a[u-1]};break;case 85:this.$=a[u-1];break;case 105:this.$=a[u-4],i.addClass(a[u-2],a[u]);break;case 106:this.$=a[u-4],i.setClass(a[u-2],a[u]);break;case 107:case 115:this.$=a[u-1],i.setClickEvent(a[u-1],a[u]);break;case 108:case 116:this.$=a[u-3],i.setClickEvent(a[u-3],a[u-2]),i.setTooltip(a[u-3],a[u]);break;case 109:this.$=a[u-2],i.setClickEvent(a[u-2],a[u-1],a[u]);break;case 110:this.$=a[u-4],i.setClickEvent(a[u-4],a[u-3],a[u-2]),i.setTooltip(a[u-4],a[u]);break;case 111:this.$=a[u-2],i.setLink(a[u-2],a[u]);break;case 112:this.$=a[u-4],i.setLink(a[u-4],a[u-2]),i.setTooltip(a[u-4],a[u]);break;case 113:this.$=a[u-4],i.setLink(a[u-4],a[u-2],a[u]);break;case 114:this.$=a[u-6],i.setLink(a[u-6],a[u-4],a[u]),i.setTooltip(a[u-6],a[u-2]);break;case 117:this.$=a[u-1],i.setLink(a[u-1],a[u]);break;case 118:this.$=a[u-3],i.setLink(a[u-3],a[u-2]),i.setTooltip(a[u-3],a[u]);break;case 119:this.$=a[u-3],i.setLink(a[u-3],a[u-2],a[u]);break;case 120:this.$=a[u-5],i.setLink(a[u-5],a[u-4],a[u]),i.setTooltip(a[u-5],a[u-2]);break;case 121:this.$=a[u-4],i.addVertex(a[u-2],void 0,void 0,a[u]);break;case 122:this.$=a[u-4],i.updateLink([a[u-2]],a[u]);break;case 123:this.$=a[u-4],i.updateLink(a[u-2],a[u]);break;case 124:this.$=a[u-8],i.updateLinkInterpolate([a[u-6]],a[u-2]),i.updateLink([a[u-6]],a[u]);break;case 125:this.$=a[u-8],i.updateLinkInterpolate(a[u-6],a[u-2]),i.updateLink(a[u-6],a[u]);break;case 126:this.$=a[u-6],i.updateLinkInterpolate([a[u-4]],a[u]);break;case 127:this.$=a[u-6],i.updateLinkInterpolate(a[u-4],a[u]);break;case 129:case 131:a[u-2].push(a[u]),this.$=a[u-2];break;case 182:case 184:this.$=a[u-1]+""+a[u];break;case 185:this.$={stmt:"dir",value:"TB"};break;case 186:this.$={stmt:"dir",value:"BT"};break;case 187:this.$={stmt:"dir",value:"RL"};break;case 188:this.$={stmt:"dir",value:"LR"};break;case 189:this.$={stmt:"dir",value:"TD"}}},"anonymous"),table:[{3:1,4:2,9:e,10:s,12:i},{1:[3]},t(r,a,{5:6}),{4:7,9:e,10:s,12:i},{4:8,9:e,10:s,12:i},{13:[1,9],14:[1,10]},{1:[2,1],6:11,7:12,8:n,9:u,10:l,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:c,33:24,34:h,36:d,38:p,42:28,43:39,44:A,45:40,47:41,60:b,84:y,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:$,122:w,123:L,124:I,125:R},t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),{8:[1,55],9:[1,56],10:N,15:54,18:57},t(K,[2,3]),t(K,[2,4]),t(K,[2,5]),t(K,[2,6]),t(K,[2,7]),t(K,[2,8]),{8:P,9:G,11:O,21:59,41:60,72:64,75:[1,65],77:[1,67],78:[1,66]},{8:P,9:G,11:O,21:68},{8:P,9:G,11:O,21:69},{8:P,9:G,11:O,21:70},{8:P,9:G,11:O,21:71},{8:P,9:G,11:O,21:72},{8:P,9:G,10:[1,73],11:O,21:74},t(K,[2,36]),{35:[1,75]},{37:[1,76]},t(K,[2,39]),t(M,[2,50],{18:77,39:78,10:N,40:V}),{10:[1,80]},{10:[1,81]},{10:[1,82]},{10:[1,83]},{14:U,44:W,60:z,80:[1,87],89:j,95:[1,84],97:[1,85],101:86,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},t(K,[2,185]),t(K,[2,186]),t(K,[2,187]),t(K,[2,188]),t(K,[2,189]),t(tt,[2,51]),t(tt,[2,54],{46:[1,100]}),t(te,[2,72],{113:113,29:[1,101],44:A,48:[1,102],50:[1,103],52:[1,104],54:[1,105],56:[1,106],58:[1,107],60:b,63:[1,108],65:[1,109],67:[1,110],68:[1,111],70:[1,112],89:E,102:C,105:D,106:T,109:F,111:S,114:_,115:v,116:B}),t(ts,[2,181]),t(ts,[2,142]),t(ts,[2,143]),t(ts,[2,144]),t(ts,[2,145]),t(ts,[2,146]),t(ts,[2,147]),t(ts,[2,148]),t(ts,[2,149]),t(ts,[2,150]),t(ts,[2,151]),t(ts,[2,152]),t(r,[2,12]),t(r,[2,18]),t(r,[2,19]),{9:[1,114]},t(ti,[2,26],{18:115,10:N}),t(K,[2,27]),{42:116,43:39,44:A,45:40,47:41,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(K,[2,40]),t(K,[2,41]),t(K,[2,42]),t(tr,[2,76],{73:117,62:[1,119],74:[1,118]}),{76:120,79:121,80:ta,81:tn,116:tu,119:tl},{75:[1,126],77:[1,127]},t(to,[2,83]),t(K,[2,28]),t(K,[2,29]),t(K,[2,30]),t(K,[2,31]),t(K,[2,32]),{10:tc,12:th,14:td,27:tp,28:128,32:tg,44:tA,60:tb,75:ty,80:[1,130],81:[1,131],83:141,84:tk,85:tf,86:tm,87:tx,88:tE,89:tC,90:tD,91:129,105:tT,109:tF,111:tS,114:t_,115:tv,116:tB},t(t$,a,{5:154}),t(K,[2,37]),t(K,[2,38]),t(M,[2,48],{44:tw}),t(M,[2,49],{18:156,10:N,40:tL}),t(tt,[2,44]),{44:A,47:158,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{102:[1,159],103:160,105:[1,161]},{44:A,47:162,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{44:A,47:163,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(tI,[2,107],{10:[1,164],96:[1,165]}),{80:[1,166]},t(tI,[2,115],{120:168,10:[1,167],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(tI,[2,117],{10:[1,169]}),t(tR,[2,183]),t(tR,[2,170]),t(tR,[2,171]),t(tR,[2,172]),t(tR,[2,173]),t(tR,[2,174]),t(tR,[2,175]),t(tR,[2,176]),t(tR,[2,177]),t(tR,[2,178]),t(tR,[2,179]),t(tR,[2,180]),{44:A,47:170,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{30:171,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:179,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:181,50:[1,180],67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:182,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:183,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:184,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{109:[1,185]},{30:186,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:187,65:[1,188],67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:189,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:190,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{30:191,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},t(ts,[2,182]),t(r,[2,20]),t(ti,[2,25]),t(M,[2,46],{39:192,18:193,10:N,40:V}),t(tr,[2,73],{10:[1,194]}),{10:[1,195]},{30:196,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{77:[1,197],79:198,116:tu,119:tl},t(tV,[2,79]),t(tV,[2,81]),t(tV,[2,82]),t(tV,[2,168]),t(tV,[2,169]),{76:199,79:121,80:ta,81:tn,116:tu,119:tl},t(to,[2,84]),{8:P,9:G,10:tc,11:O,12:th,14:td,21:201,27:tp,29:[1,200],32:tg,44:tA,60:tb,75:ty,83:141,84:tk,85:tf,86:tm,87:tx,88:tE,89:tC,90:tD,91:202,105:tT,109:tF,111:tS,114:t_,115:tv,116:tB},t(tU,[2,101]),t(tU,[2,103]),t(tU,[2,104]),t(tU,[2,157]),t(tU,[2,158]),t(tU,[2,159]),t(tU,[2,160]),t(tU,[2,161]),t(tU,[2,162]),t(tU,[2,163]),t(tU,[2,164]),t(tU,[2,165]),t(tU,[2,166]),t(tU,[2,167]),t(tU,[2,90]),t(tU,[2,91]),t(tU,[2,92]),t(tU,[2,93]),t(tU,[2,94]),t(tU,[2,95]),t(tU,[2,96]),t(tU,[2,97]),t(tU,[2,98]),t(tU,[2,99]),t(tU,[2,100]),{6:11,7:12,8:n,9:u,10:l,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,203],33:24,34:h,36:d,38:p,42:28,43:39,44:A,45:40,47:41,60:b,84:y,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:$,122:w,123:L,124:I,125:R},{10:N,18:204},{44:[1,205]},t(tt,[2,43]),{10:[1,206],44:A,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{10:[1,207]},{10:[1,208],106:[1,209]},t(tW,[2,128]),{10:[1,210],44:A,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{10:[1,211],44:A,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:113,114:_,115:v,116:B},{80:[1,212]},t(tI,[2,109],{10:[1,213]}),t(tI,[2,111],{10:[1,214]}),{80:[1,215]},t(tR,[2,184]),{80:[1,216],98:[1,217]},t(tt,[2,55],{113:113,44:A,60:b,89:E,102:C,105:D,106:T,109:F,111:S,114:_,115:v,116:B}),{31:[1,218],67:tN,82:219,116:tG,117:tO,118:tM},t(tz,[2,86]),t(tz,[2,88]),t(tz,[2,89]),t(tz,[2,153]),t(tz,[2,154]),t(tz,[2,155]),t(tz,[2,156]),{49:[1,220],67:tN,82:219,116:tG,117:tO,118:tM},{30:221,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{51:[1,222],67:tN,82:219,116:tG,117:tO,118:tM},{53:[1,223],67:tN,82:219,116:tG,117:tO,118:tM},{55:[1,224],67:tN,82:219,116:tG,117:tO,118:tM},{57:[1,225],67:tN,82:219,116:tG,117:tO,118:tM},{60:[1,226]},{64:[1,227],67:tN,82:219,116:tG,117:tO,118:tM},{66:[1,228],67:tN,82:219,116:tG,117:tO,118:tM},{30:229,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},{31:[1,230],67:tN,82:219,116:tG,117:tO,118:tM},{67:tN,69:[1,231],71:[1,232],82:219,116:tG,117:tO,118:tM},{67:tN,69:[1,234],71:[1,233],82:219,116:tG,117:tO,118:tM},t(M,[2,45],{18:156,10:N,40:tL}),t(M,[2,47],{44:tw}),t(tr,[2,75]),t(tr,[2,74]),{62:[1,235],67:tN,82:219,116:tG,117:tO,118:tM},t(tr,[2,77]),t(tV,[2,80]),{77:[1,236],79:198,116:tu,119:tl},{30:237,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},t(t$,a,{5:238}),t(tU,[2,102]),t(K,[2,35]),{43:239,44:A,45:40,47:41,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},{10:N,18:240},{10:tj,60:tY,84:tH,92:241,105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},{10:tj,60:tY,84:tH,92:252,104:[1,253],105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},{10:tj,60:tY,84:tH,92:254,104:[1,255],105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},{105:[1,256]},{10:tj,60:tY,84:tH,92:257,105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},{44:A,47:258,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(tI,[2,108]),{80:[1,259]},{80:[1,260],98:[1,261]},t(tI,[2,116]),t(tI,[2,118],{10:[1,262]}),t(tI,[2,119]),t(te,[2,56]),t(tz,[2,87]),t(te,[2,57]),{51:[1,263],67:tN,82:219,116:tG,117:tO,118:tM},t(te,[2,64]),t(te,[2,59]),t(te,[2,60]),t(te,[2,61]),{109:[1,264]},t(te,[2,63]),t(te,[2,65]),{66:[1,265],67:tN,82:219,116:tG,117:tO,118:tM},t(te,[2,67]),t(te,[2,68]),t(te,[2,70]),t(te,[2,69]),t(te,[2,71]),t([10,44,60,89,102,105,106,109,111,114,115,116],[2,85]),t(tr,[2,78]),{31:[1,266],67:tN,82:219,116:tG,117:tO,118:tM},{6:11,7:12,8:n,9:u,10:l,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,267],33:24,34:h,36:d,38:p,42:28,43:39,44:A,45:40,47:41,60:b,84:y,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:$,122:w,123:L,124:I,125:R},t(tt,[2,53]),{43:268,44:A,45:40,47:41,60:b,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B},t(tI,[2,121],{106:t1}),t(t0,[2,130],{108:270,10:tj,60:tY,84:tH,105:tX,109:tq,110:tQ,111:tJ,112:tZ}),t(t2,[2,132]),t(t2,[2,134]),t(t2,[2,135]),t(t2,[2,136]),t(t2,[2,137]),t(t2,[2,138]),t(t2,[2,139]),t(t2,[2,140]),t(t2,[2,141]),t(tI,[2,122],{106:t1}),{10:[1,271]},t(tI,[2,123],{106:t1}),{10:[1,272]},t(tW,[2,129]),t(tI,[2,105],{106:t1}),t(tI,[2,106],{113:113,44:A,60:b,89:E,102:C,105:D,106:T,109:F,111:S,114:_,115:v,116:B}),t(tI,[2,110]),t(tI,[2,112],{10:[1,273]}),t(tI,[2,113]),{98:[1,274]},{51:[1,275]},{62:[1,276]},{66:[1,277]},{8:P,9:G,11:O,21:278},t(K,[2,34]),t(tt,[2,52]),{10:tj,60:tY,84:tH,105:tX,107:279,108:243,109:tq,110:tQ,111:tJ,112:tZ},t(t2,[2,133]),{14:U,44:W,60:z,89:j,101:280,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{14:U,44:W,60:z,89:j,101:281,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z,120:88},{98:[1,282]},t(tI,[2,120]),t(te,[2,58]),{30:283,67:tN,80:tK,81:tP,82:172,116:tG,117:tO,118:tM},t(te,[2,66]),t(t$,a,{5:284}),t(t0,[2,131],{108:270,10:tj,60:tY,84:tH,105:tX,109:tq,110:tQ,111:tJ,112:tZ}),t(tI,[2,126],{120:168,10:[1,285],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(tI,[2,127],{120:168,10:[1,286],14:U,44:W,60:z,89:j,105:Y,106:H,109:X,111:q,114:Q,115:J,116:Z}),t(tI,[2,114]),{31:[1,287],67:tN,82:219,116:tG,117:tO,118:tM},{6:11,7:12,8:n,9:u,10:l,11:o,20:17,22:18,23:19,24:20,25:21,26:22,27:c,32:[1,288],33:24,34:h,36:d,38:p,42:28,43:39,44:A,45:40,47:41,60:b,84:y,85:k,86:f,87:m,88:x,89:E,102:C,105:D,106:T,109:F,111:S,113:42,114:_,115:v,116:B,121:$,122:w,123:L,124:I,125:R},{10:tj,60:tY,84:tH,92:289,105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},{10:tj,60:tY,84:tH,92:290,105:tX,107:242,108:243,109:tq,110:tQ,111:tJ,112:tZ},t(te,[2,62]),t(K,[2,33]),t(tI,[2,124],{106:t1}),t(tI,[2,125],{106:t1})],defaultActions:{},parseError:(0,g.K)(function(t,e){if(e.recoverable)this.trace(t);else{var s=Error(t);throw s.hash=e,s}},"parseError"),parse:(0,g.K)(function(t){var e=this,s=[0],i=[],r=[null],a=[],n=this.table,u="",l=0,o=0,c=0,h=a.slice.call(arguments,1),d=Object.create(this.lexer),p={};for(var A in this.yy)Object.prototype.hasOwnProperty.call(this.yy,A)&&(p[A]=this.yy[A]);d.setInput(t,p),p.lexer=d,p.parser=this,void 0===d.yylloc&&(d.yylloc={});var b=d.yylloc;a.push(b);var y=d.options&&d.options.ranges;function k(){var t;return"number"!=typeof(t=i.pop()||d.lex()||1)&&(t instanceof Array&&(t=(i=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof p.parseError?this.parseError=p.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,g.K)(function(t){s.length=s.length-2*t,r.length=r.length-t,a.length=a.length-t},"popStack"),(0,g.K)(k,"lex");for(var f,m,x,E,C,D,T,F,S,_={};;){if(x=s[s.length-1],this.defaultActions[x]?E=this.defaultActions[x]:(null==f&&(f=k()),E=n[x]&&n[x][f]),void 0===E||!E.length||!E[0]){var v="";for(D in S=[],n[x])this.terminals_[D]&&D>2&&S.push("'"+this.terminals_[D]+"'");v=d.showPosition?"Parse error on line "+(l+1)+":\n"+d.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(v,{text:d.match,token:this.terminals_[f]||f,line:d.yylineno,loc:b,expected:S})}if(E[0]instanceof Array&&E.length>1)throw Error("Parse Error: multiple actions possible at state: "+x+", token: "+f);switch(E[0]){case 1:s.push(f),r.push(d.yytext),a.push(d.yylloc),s.push(E[1]),f=null,m?(f=m,m=null):(o=d.yyleng,u=d.yytext,l=d.yylineno,b=d.yylloc,c>0&&c--);break;case 2:if(T=this.productions_[E[1]][1],_.$=r[r.length-T],_._$={first_line:a[a.length-(T||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(T||1)].first_column,last_column:a[a.length-1].last_column},y&&(_._$.range=[a[a.length-(T||1)].range[0],a[a.length-1].range[1]]),void 0!==(C=this.performAction.apply(_,[u,o,l,p,E[1],r,a].concat(h))))return C;T&&(s=s.slice(0,-1*T*2),r=r.slice(0,-1*T),a=a.slice(0,-1*T)),s.push(this.productions_[E[1]][0]),r.push(_.$),a.push(_._$),F=n[s[s.length-2]][s[s.length-1]],s.push(F);break;case 3:return!0}}return!0},"parse")};function t6(){this.yy={}}return t8.lexer={EOF:1,parseError:(0,g.K)(function(t,e){if(this.yy.parser)this.yy.parser.parseError(t,e);else throw Error(t)},"parseError"),setInput:(0,g.K)(function(t,e){return this.yy=e||this.yy||{},this._input=t,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:(0,g.K)(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:(0,g.K)(function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=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),s.length-1&&(this.yylineno-=s.length-1);var r=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:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[r[0],r[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:(0,g.K)(function(){return this._more=!0,this},"more"),reject:(0,g.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):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).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,g.K)(function(t){this.unput(this.match.slice(t))},"less"),pastInput:(0,g.K)(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,g.K)(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,g.K)(function(){var t=this.pastInput(),e=Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:(0,g.K)(function(t,e){var s,i,r;if(this.options.backtrack_lexer&&(r={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&&(r.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,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(t[0].length),this.matched+=t[0],s=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),s)return s;if(this._backtrack)for(var a in r)this[a]=r[a];return!1},"test_match"),next:(0,g.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,s,i,r=this._currentRules(),a=0;a<r.length;a++)if((s=this._input.match(this.rules[r[a]]))&&(!e||s[0].length>e[0].length)){if(e=s,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(s,r[a])))return t;if(!this._backtrack)return!1;e=!1;continue}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,r[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,g.K)(function(){var t=this.next();return t||this.lex()},"lex"),begin:(0,g.K)(function(t){this.conditionStack.push(t)},"begin"),popState:(0,g.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,g.K)(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:(0,g.K)(function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},"topState"),pushState:(0,g.K)(function(t){this.begin(t)},"pushState"),stateStackSize:(0,g.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:(0,g.K)(function(t,e,s,i){switch(s){case 0:return this.begin("acc_title"),34;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),36;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 12:case 14:case 17:case 20:case 23:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.pushState("shapeData"),e.yytext="",40;case 8:return this.pushState("shapeDataStr"),40;case 9:return this.popState(),40;case 10:return e.yytext=e.yytext.replace(/\n\s*/g,"<br/>"),40;case 11:return 40;case 13:this.begin("callbackname");break;case 15:this.popState(),this.begin("callbackargs");break;case 16:return 95;case 18:return 96;case 19:return"MD_STR";case 21:this.begin("md_string");break;case 22:return"STR";case 24:this.pushState("string");break;case 25:return 84;case 26:return 102;case 27:return 85;case 28:return 104;case 29:return 86;case 30:return 87;case 31:return 97;case 32:this.begin("click");break;case 34:return 88;case 35:case 36:case 37:case 38:return t.lex.firstGraph()&&this.begin("dir"),12;case 39:return 27;case 40:return 32;case 41:case 42:case 43:case 44:return 98;case 45:return this.popState(),13;case 46:case 47:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:return this.popState(),14;case 56:return 121;case 57:return 122;case 58:return 123;case 59:return 124;case 60:return 125;case 61:return 78;case 62:return 105;case 63:case 104:return 111;case 64:return 46;case 65:return 60;case 66:case 105:return 44;case 67:return 8;case 68:return 106;case 69:case 103:return 115;case 70:case 73:case 76:return this.popState(),77;case 71:return this.pushState("edgeText"),75;case 72:case 75:case 78:return 119;case 74:return this.pushState("thickEdgeText"),75;case 77:return this.pushState("dottedEdgeText"),75;case 79:return 77;case 80:return this.popState(),53;case 81:case 117:return"TEXT";case 82:return this.pushState("ellipseText"),52;case 83:return this.popState(),55;case 84:return this.pushState("text"),54;case 85:return this.popState(),57;case 86:return this.pushState("text"),56;case 87:return 58;case 88:return this.pushState("text"),67;case 89:return this.popState(),64;case 90:return this.pushState("text"),63;case 91:return this.popState(),49;case 92:return this.pushState("text"),48;case 93:return this.popState(),69;case 94:return this.popState(),71;case 95:return 117;case 96:return this.pushState("trapText"),68;case 97:return this.pushState("trapText"),70;case 98:return 118;case 99:return 67;case 100:return 90;case 101:return"SEP";case 102:return 89;case 106:return 109;case 107:return 114;case 108:return 116;case 109:return this.popState(),62;case 110:return this.pushState("text"),62;case 111:return this.popState(),51;case 112:return this.pushState("text"),50;case 113:return this.popState(),31;case 114:return this.pushState("text"),29;case 115:return this.popState(),66;case 116:return this.pushState("text"),65;case 118:return"QUOTE";case 119:return 9;case 120:return 10;case 121:return 11}},"anonymous"),rules:[/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:@\{)/,/^(?:["])/,/^(?:["])/,/^(?:[^\"]+)/,/^(?:[^}^"]+)/,/^(?:\})/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["][`])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:["])/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s])/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:flowchart-elk\b)/,/^(?:swimlane-beta\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:.*direction\s+TD[^\n]*)/,/^(?:[^\s\"]+@(?=[^\{\"]))/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:[^-]|-(?!-)+)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:[^=]|=(?!))/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:[^\.]|\.(?!))/,/^(?:\s*~~[\~]+\s*)/,/^(?:[-/\)][\)])/,/^(?:[^\(\)\[\]\{\}]|!\)+)/,/^(?:\(-)/,/^(?:\]\))/,/^(?:\(\[)/,/^(?:\]\])/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:>)/,/^(?:\)\])/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\(\(\()/,/^(?:[\\(?=\])][\]])/,/^(?:\/(?=\])\])/,/^(?:\/(?!\])|\\(?!\])|[^\\\[\]\(\)\{\}\/]+)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:\*)/,/^(?:#)/,/^(?:&)/,/^(?:([A-Za-z0-9!"\#$%&'*+\.`?\\_\/]|-(?=[^\>\-\.])|(?!))+)/,/^(?:-)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\|)/,/^(?:\))/,/^(?:\()/,/^(?:\])/,/^(?:\[)/,/^(?:(\}))/,/^(?:\{)/,/^(?:[^\[\]\(\)\{\}\|\"]+)/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:[^\S\n\r]+)/,/^(?:$)/],conditions:{shapeDataEndBracket:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},shapeData:{rules:[8,11,12,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackargs:{rules:[17,18,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},callbackname:{rules:[14,15,16,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},href:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},click:{rules:[21,24,33,34,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dottedEdgeText:{rules:[21,24,76,78,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},thickEdgeText:{rules:[21,24,73,75,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},edgeText:{rules:[21,24,70,72,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},trapText:{rules:[21,24,79,82,84,86,90,92,93,94,95,96,97,110,112,114,116],inclusive:!1},ellipseText:{rules:[21,24,79,80,81,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},text:{rules:[21,24,79,82,83,84,85,86,89,90,91,92,96,97,109,110,111,112,113,114,115,116,117],inclusive:!1},vertex:{rules:[21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},dir:{rules:[21,24,45,46,47,48,49,50,51,52,53,54,55,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_descr:{rules:[3,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},acc_title:{rules:[1,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},md_string:{rules:[19,20,21,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},string:{rules:[21,22,23,24,79,82,84,86,90,92,96,97,110,112,114,116],inclusive:!1},INITIAL:{rules:[0,2,4,7,13,21,24,25,26,27,28,29,30,31,32,35,36,37,38,39,40,41,42,43,44,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,73,74,76,77,79,82,84,86,87,88,90,92,96,97,98,99,100,101,102,103,104,105,106,107,108,110,112,114,116,118,119,120,121],inclusive:!0}}},(0,g.K)(t6,"Parser"),t6.prototype=t8,t8.Parser=t6,new t6}();x.parser=x;var E=Object.assign({},x);E.parse=t=>{let e=t.replace(/}\s*\n/g,"}\n");return x.parse(e)};var C=(0,g.K)(t=>{let{theme:e,bkgColorArray:s,borderColorArray:i}=t;if(!(0,c.P1)(e,i))return"";let r=(0,c.rq)(t.look),a=(0,c.Ic)(s),n="";for(let e=0;e<(0,c.nw)(t.THEME_COLOR_LIMIT,i);e++){let t=i[e%i.length],u=a?`fill: ${s[e%s.length]};`:"",l=`[data-look="${r}"][data-color-id="color-${e}"]`,o=(0,g.K)(t=>`${l}.node ${t}, ${l}.rough-node ${t}`,"collapsedRule"),c=(0,g.K)(t=>`${l}.swimlane.cluster .swimlane-title${t}, ${l}.swimlane.cluster .swimlane-body${t}`,"laneRule");n+=`
|
|
20
|
+
|
|
21
|
+
${l}.cluster:not(.swimlane) rect {
|
|
22
|
+
stroke: ${t};
|
|
23
|
+
${u}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
${l}.cluster:not(.swimlane) path {
|
|
27
|
+
stroke: ${t};
|
|
28
|
+
${u}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/* Lane, classic and neo. */
|
|
32
|
+
${l}.swimlane.cluster rect.swimlane-title,
|
|
33
|
+
${l}.swimlane.cluster rect.swimlane-body {
|
|
34
|
+
stroke: ${t};
|
|
35
|
+
${u}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Lane, handDrawn: roughjs emits the hachure fill first, then the outline. */
|
|
39
|
+
${c(" path:nth-of-type(2)")} {
|
|
40
|
+
stroke: ${t};
|
|
41
|
+
}
|
|
42
|
+
${a?`
|
|
43
|
+
/* A roughjs fill is drawn as lines, so the lane fill is a stroke here. */
|
|
44
|
+
${c(" path:first-of-type")} {
|
|
45
|
+
stroke: ${s[e%s.length]};
|
|
46
|
+
}
|
|
47
|
+
`:""}
|
|
48
|
+
${o(".collapsed-group")},
|
|
49
|
+
${o(".collapsed-group path")} {
|
|
50
|
+
stroke: ${t};
|
|
51
|
+
${u}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* The ellipsis dots and the separator take clusterBorder further down, so without
|
|
55
|
+
these the container is palette-coloured while its own markers are not. */
|
|
56
|
+
${o(".collapsed-indicator")} {
|
|
57
|
+
fill: ${t};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
${o(".collapsed-separator")} {
|
|
61
|
+
stroke: ${t};
|
|
62
|
+
}
|
|
63
|
+
`}return n},"genColor"),D=(0,g.K)((t,e)=>{let s=y.A,i=s(t,"r"),r=s(t,"g"),a=s(t,"b");return k.A(i,r,a,e)},"fade"),T=(0,g.K)(t=>`${C(t)}
|
|
64
|
+
.label {
|
|
65
|
+
font-family: ${t.fontFamily};
|
|
66
|
+
color: ${t.nodeTextColor||t.textColor};
|
|
67
|
+
}
|
|
68
|
+
.cluster-label text {
|
|
69
|
+
fill: ${t.titleColor};
|
|
70
|
+
}
|
|
71
|
+
.cluster-label span {
|
|
72
|
+
color: ${t.titleColor};
|
|
73
|
+
}
|
|
74
|
+
.cluster-label span p {
|
|
75
|
+
background-color: transparent;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.label text,span {
|
|
79
|
+
fill: ${t.nodeTextColor||t.textColor};
|
|
80
|
+
color: ${t.nodeTextColor||t.textColor};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.node rect,
|
|
84
|
+
.node circle,
|
|
85
|
+
.node ellipse,
|
|
86
|
+
.node polygon,
|
|
87
|
+
.node path {
|
|
88
|
+
fill: ${t.mainBkg};
|
|
89
|
+
stroke: ${t.nodeBorder};
|
|
90
|
+
stroke-width: ${t.strokeWidth??1}px;
|
|
91
|
+
}
|
|
92
|
+
.rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label {
|
|
93
|
+
text-anchor: middle;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.node .katex path {
|
|
97
|
+
fill: #000;
|
|
98
|
+
stroke: #000;
|
|
99
|
+
stroke-width: 1px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.rough-node .label,.node .label, .image-shape .label, .icon-shape .label {
|
|
103
|
+
text-align: center;
|
|
104
|
+
}
|
|
105
|
+
.node.clickable {
|
|
106
|
+
cursor: pointer;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
.root .anchor path {
|
|
111
|
+
fill: ${t.lineColor} !important;
|
|
112
|
+
stroke-width: 0;
|
|
113
|
+
stroke: ${t.lineColor};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.arrowheadPath {
|
|
117
|
+
fill: ${t.arrowheadColor};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.edgePaths .path {
|
|
121
|
+
stroke: ${t.lineColor};
|
|
122
|
+
stroke-width: ${t.strokeWidth??2}px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.flowchart-link {
|
|
126
|
+
stroke: ${t.lineColor};
|
|
127
|
+
fill: none;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.edgeLabel {
|
|
131
|
+
background-color: ${t.edgeLabelBackground};
|
|
132
|
+
p {
|
|
133
|
+
background-color: ${t.edgeLabelBackground};
|
|
134
|
+
}
|
|
135
|
+
rect {
|
|
136
|
+
opacity: 0.5;
|
|
137
|
+
background-color: ${t.edgeLabelBackground};
|
|
138
|
+
fill: ${t.edgeLabelBackground};
|
|
139
|
+
}
|
|
140
|
+
text-align: center;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/* For html labels only */
|
|
144
|
+
.labelBkg {
|
|
145
|
+
background-color: ${D(t.edgeLabelBackground,.5)};
|
|
146
|
+
// background-color:
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.cluster rect {
|
|
150
|
+
fill: ${t.clusterBkg};
|
|
151
|
+
stroke: ${t.clusterBorder};
|
|
152
|
+
stroke-width: 1px;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.cluster text {
|
|
156
|
+
fill: ${t.titleColor};
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.cluster span {
|
|
160
|
+
color: ${t.titleColor};
|
|
161
|
+
}
|
|
162
|
+
/* .cluster div {
|
|
163
|
+
color: ${t.titleColor};
|
|
164
|
+
} */
|
|
165
|
+
|
|
166
|
+
/* Collapsed subgraph node (@{ view: collapsed }) */
|
|
167
|
+
.node .collapsed-indicator {
|
|
168
|
+
fill: ${t.clusterBorder};
|
|
169
|
+
stroke: none;
|
|
170
|
+
opacity: 0.6;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.node .collapsed-separator {
|
|
174
|
+
stroke: ${t.clusterBorder};
|
|
175
|
+
stroke-width: 0.75px;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
div.mermaidTooltip {
|
|
179
|
+
position: absolute;
|
|
180
|
+
text-align: center;
|
|
181
|
+
max-width: 200px;
|
|
182
|
+
padding: 2px;
|
|
183
|
+
font-family: ${t.fontFamily};
|
|
184
|
+
font-size: 12px;
|
|
185
|
+
background: ${t.tertiaryColor};
|
|
186
|
+
border: 1px solid ${t.border2};
|
|
187
|
+
border-radius: 2px;
|
|
188
|
+
pointer-events: none;
|
|
189
|
+
z-index: 100;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.flowchartTitleText {
|
|
193
|
+
text-anchor: middle;
|
|
194
|
+
font-size: 18px;
|
|
195
|
+
fill: ${t.textColor};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
rect.text {
|
|
199
|
+
fill: none;
|
|
200
|
+
stroke-width: 0;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.icon-shape, .image-shape {
|
|
204
|
+
background-color: ${t.edgeLabelBackground};
|
|
205
|
+
p {
|
|
206
|
+
background-color: ${t.edgeLabelBackground};
|
|
207
|
+
padding: 2px;
|
|
208
|
+
}
|
|
209
|
+
.label rect {
|
|
210
|
+
opacity: 0.5;
|
|
211
|
+
background-color: ${t.edgeLabelBackground};
|
|
212
|
+
fill: ${t.edgeLabelBackground};
|
|
213
|
+
}
|
|
214
|
+
text-align: center;
|
|
215
|
+
}
|
|
216
|
+
${(0,i.o)()}
|
|
217
|
+
`,"getStyles"),F=(0,g.K)(({styles:t=T}={})=>({parser:E,get db(){return new f},renderer:m,styles:t,init:(0,g.K)(t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,(0,d.XV)({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}),"createFlowDiagram"),S=F()},31984:(t,e,s)=>{s.d(e,{CP:()=>h,Ck:()=>g,HT:()=>p,PB:()=>d,aC:()=>c,lC:()=>l,m:()=>o,tk:()=>u});var i=s(95631),r=s(14528),a=s(77850),n=s(60830),u=(0,r.K)((t,e)=>{let s=t.append("rect");if(s.attr("x",e.x),s.attr("y",e.y),s.attr("fill",e.fill),s.attr("stroke",e.stroke),s.attr("width",e.width),s.attr("height",e.height),e.name&&s.attr("name",e.name),e.rx&&s.attr("rx",e.rx),e.ry&&s.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)s.attr(t,e.attrs[t]);return e.class&&s.attr("class",e.class),s},"drawRect"),l=(0,r.K)((t,e)=>{u(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),o=(0,r.K)((t,e)=>{let s=e.text.replace(i.H1," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),e.class&&r.attr("class",e.class);let a=r.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.text(s),r},"drawText"),c=(0,r.K)((t,e,s,i)=>{let r=t.append("image");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",n)},"drawImage"),h=(0,r.K)((t,e,s,i)=>{let r=t.append("use");r.attr("x",e),r.attr("y",s);let n=(0,a.J)(i);r.attr("xlink:href",`#${n}`)},"drawEmbeddedImage"),d=(0,r.K)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),p=(0,r.K)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.K)(()=>{let t=(0,n.Ltv)(".mermaidTooltip");return t.empty()&&(t=(0,n.Ltv)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip")},63842:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(19519),r=s(62079);let a=(t,e)=>i.A.lang.round(r.A.parse(t)[e])},98204:(t,e,s)=>{s.d(e,{A:()=>a});var i=s(14528),r=s(60830),a=(0,i.K)((t,e)=>{let s;return"sandbox"===e&&(s=(0,r.Ltv)("#i"+t)),("sandbox"===e?(0,r.Ltv)(s.nodes()[0].contentDocument.body):(0,r.Ltv)("body")).select(`[id="${t}"]`)},"getDiagramElement")}}]);
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7449],{34765:(e,t,r)=>{function i(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}r.d(t,{S:()=>i}),(0,r(14528).K)(i,"populateCommonDb")},42189:(e,t,r)=>{r.d(t,{$:()=>O,U:()=>j,db:()=>S});var i=r(62831),a=r(95631),n=r(5218),o=r(14528),l="",s="",d="",m=[],c=new Map,h=(0,o.K)(e=>(0,a.jZ)(e,(0,a.D7)()),"sanitizeText"),p=(0,o.K)(e=>{switch(e.type){case"terminal":return{...e,value:h(e.value)};case"nonterminal":return{...e,name:h(e.name)};case"sequence":return{...e,elements:e.elements.map(p)};case"choice":return{...e,alternatives:e.alternatives.map(p)};case"optional":return{...e,element:p(e.element)};case"repetition":return{...e,element:p(e.element),separator:e.separator?p(e.separator):void 0};case"special":return{...e,text:h(e.text)}}},"sanitizeAstNode"),u=(0,o.K)(()=>{l="",s="",d="",m.length=0,c.clear(),(0,a.IU)(),n.R.debug("[Railroad] Database cleared")},"clear"),g=(0,o.K)(e=>{l=h(e),n.R.debug("[Railroad] Title set:",e)},"setTitle"),T=(0,o.K)(()=>l,"getTitle"),f=(0,o.K)(e=>{let t={...e,name:h(e.name),definition:p(e.definition),comment:e.comment?h(e.comment):void 0};n.R.debug("[Railroad] Adding rule:",t.name),c.has(t.name)&&n.R.warn(`[Railroad] Rule '${t.name}' is already defined. Overwriting.`),m.push(t),c.set(t.name,t)},"addRule"),x=(0,o.K)(()=>m,"getRules"),w=(0,o.K)(e=>c.get(e),"getRule"),k=(0,o.K)(e=>{s=h(e).replace(/^\s+/g,""),n.R.debug("[Railroad] Accessibility title set:",e)},"setAccTitle"),C=(0,o.K)(()=>s,"getAccTitle"),$=(0,o.K)(e=>{d=h(e).replace(/\n\s+/g,"\n"),n.R.debug("[Railroad] Accessibility description set:",e)},"setAccDescription"),S={clear:u,setTitle:g,getTitle:T,addRule:f,getRules:x,getRule:w,setAccTitle:k,getAccTitle:C,setAccDescription:$,getAccDescription:(0,o.K)(()=>d,"getAccDescription"),setDiagramTitle:g,getDiagramTitle:T},F={compactMode:!1,padding:10,verticalSeparation:8,horizontalSeparation:10,arcRadius:10,fontSize:14,fontFamily:"monospace",terminalFill:"#FFFFC0",terminalStroke:"#000000",terminalTextColor:"#000000",nonTerminalFill:"#FFFFFF",nonTerminalStroke:"#000000",nonTerminalTextColor:"#000000",lineColor:"#000000",strokeWidth:2,markerFill:"#000000",commentFill:"#E8E8E8",commentStroke:"#888888",commentTextColor:"#666666",specialFill:"#F0E0FF",specialStroke:"#8800CC",ruleNameColor:"#000066",showMarkers:!0,markerRadius:5},y=/^#(?:[\da-f]{3,4}|[\da-f]{6}|[\da-f]{8})$|^(?:rgb|rgba|hsl|hsla|hwb|lab|lch|oklab|oklch)\([\d\s%+,./-]+\)$|^[a-z]+$/i,R=/^[\w "',.-]+$/,b=new Set(["compactMode","padding","verticalSeparation","horizontalSeparation","arcRadius","fontSize","fontFamily","terminalFill","terminalStroke","terminalTextColor","nonTerminalFill","nonTerminalStroke","nonTerminalTextColor","lineColor","strokeWidth","markerFill","commentFill","commentStroke","commentTextColor","specialFill","specialStroke","ruleNameColor","showMarkers","markerRadius"]),v=(0,o.K)(e=>!!e&&Object.keys(e).every(e=>"railroad"===e||b.has(e)),"isRailroadStyleOptions"),z=(0,o.K)(e=>e?"railroad"in e&&e.railroad?e.railroad:v(e)?e:{}:{},"extractRailroadOverrides"),K=(0,o.K)(e=>{if(!e||v(e))return{};let{railroad:t,svgId:r,theme:i,look:a,...n}=e;return n},"extractThemeOverrides"),N=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;let r=e.trim();return y.test(r)?r:t},"sanitizeColorValue"),M=(0,o.K)((e,t)=>{if("string"!=typeof e)return t;let r=e.trim();return R.test(r)?r:t},"sanitizeFontFamilyValue"),A=(0,o.K)((e,t)=>{let r="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):NaN;return Number.isFinite(r)&&r>=0?r:t},"sanitizeNumberValue"),D=(0,o.K)(e=>{let t="number"==typeof e?e:"string"==typeof e?Number.parseFloat(e):NaN;return Number.isFinite(t)&&t>0?t:void 0},"parseThemeFontSize"),E=(0,o.K)(e=>{let t=M(e.fontFamily,F.fontFamily),r=D(e.fontSize)??F.fontSize;return{...F,fontFamily:t,fontSize:r,terminalFill:N(e.secondBkg??e.secondaryColor,F.terminalFill),terminalStroke:N(e.secondaryBorderColor??e.lineColor,F.terminalStroke),terminalTextColor:N(e.secondaryTextColor??e.textColor,F.terminalTextColor),nonTerminalFill:N(e.mainBkg??e.background,F.nonTerminalFill),nonTerminalStroke:N(e.primaryBorderColor??e.lineColor,F.nonTerminalStroke),nonTerminalTextColor:N(e.primaryTextColor??e.textColor,F.nonTerminalTextColor),lineColor:N(e.lineColor,F.lineColor),markerFill:N(e.lineColor,F.markerFill),commentFill:N(e.labelBackground??e.tertiaryColor,F.commentFill),commentStroke:N(e.tertiaryBorderColor??e.lineColor,F.commentStroke),commentTextColor:N(e.tertiaryTextColor??e.textColor,F.commentTextColor),specialFill:N(e.tertiaryColor??e.secondaryColor,F.specialFill),specialStroke:N(e.tertiaryBorderColor??e.secondaryBorderColor,F.specialStroke),ruleNameColor:N(e.titleColor??e.textColor,F.ruleNameColor)}},"buildThemeDefaults"),B=(0,o.K)(e=>{let t=(0,a.zj)(),r=E({...(0,a.P$)(),...t.themeVariables??{},...K(e)}),i={...t.railroad??{},...z(e)};return{compactMode:i.compactMode??r.compactMode,padding:A(i.padding,r.padding),verticalSeparation:A(i.verticalSeparation,r.verticalSeparation),horizontalSeparation:A(i.horizontalSeparation,r.horizontalSeparation),arcRadius:A(i.arcRadius,r.arcRadius),fontSize:A(i.fontSize,r.fontSize),fontFamily:M(i.fontFamily,r.fontFamily),terminalFill:N(i.terminalFill,r.terminalFill),terminalStroke:N(i.terminalStroke,r.terminalStroke),terminalTextColor:N(i.terminalTextColor,r.terminalTextColor),nonTerminalFill:N(i.nonTerminalFill,r.nonTerminalFill),nonTerminalStroke:N(i.nonTerminalStroke,r.nonTerminalStroke),nonTerminalTextColor:N(i.nonTerminalTextColor,r.nonTerminalTextColor),lineColor:N(i.lineColor,r.lineColor),strokeWidth:A(i.strokeWidth,r.strokeWidth),markerFill:N(i.markerFill,r.markerFill),commentFill:N(i.commentFill,r.commentFill),commentStroke:N(i.commentStroke,r.commentStroke),commentTextColor:N(i.commentTextColor,r.commentTextColor),specialFill:N(i.specialFill,r.specialFill),specialStroke:N(i.specialStroke,r.specialStroke),ruleNameColor:N(i.ruleNameColor,r.ruleNameColor),showMarkers:i.showMarkers??r.showMarkers,markerRadius:A(i.markerRadius,r.markerRadius)}},"buildRailroadStyleOptions"),O=(0,o.K)(e=>{let{fontFamily:t,fontSize:r,terminalFill:i,terminalStroke:a,terminalTextColor:n,nonTerminalFill:o,nonTerminalStroke:l,nonTerminalTextColor:s,lineColor:d,strokeWidth:m,markerFill:c,commentFill:h,commentStroke:p,commentTextColor:u,specialFill:g,specialStroke:T,ruleNameColor:f}=B(e);return`
|
|
2
|
+
.railroad-diagram {
|
|
3
|
+
font-family: ${t};
|
|
4
|
+
font-size: ${r}px;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.railroad-terminal rect {
|
|
8
|
+
fill: ${i};
|
|
9
|
+
stroke: ${a};
|
|
10
|
+
stroke-width: ${m}px;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.railroad-terminal text {
|
|
14
|
+
fill: ${n};
|
|
15
|
+
font-family: ${t};
|
|
16
|
+
font-size: ${r}px;
|
|
17
|
+
text-anchor: middle;
|
|
18
|
+
dominant-baseline: middle;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.railroad-nonterminal rect {
|
|
22
|
+
fill: ${o};
|
|
23
|
+
stroke: ${l};
|
|
24
|
+
stroke-width: ${m}px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.railroad-nonterminal text {
|
|
28
|
+
fill: ${s};
|
|
29
|
+
font-family: ${t};
|
|
30
|
+
font-size: ${r}px;
|
|
31
|
+
text-anchor: middle;
|
|
32
|
+
dominant-baseline: middle;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.railroad-line {
|
|
36
|
+
stroke: ${d};
|
|
37
|
+
stroke-width: ${m}px;
|
|
38
|
+
fill: none;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.railroad-start circle,
|
|
42
|
+
.railroad-end circle {
|
|
43
|
+
fill: ${c};
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.railroad-comment ellipse {
|
|
47
|
+
fill: ${h};
|
|
48
|
+
stroke: ${p};
|
|
49
|
+
stroke-width: ${m}px;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.railroad-comment text {
|
|
53
|
+
fill: ${u};
|
|
54
|
+
font-style: italic;
|
|
55
|
+
font-family: ${t};
|
|
56
|
+
font-size: ${r}px;
|
|
57
|
+
text-anchor: middle;
|
|
58
|
+
dominant-baseline: middle;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.railroad-special rect {
|
|
62
|
+
fill: ${g};
|
|
63
|
+
stroke: ${T};
|
|
64
|
+
stroke-width: ${m}px;
|
|
65
|
+
stroke-dasharray: 5,3;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.railroad-special text {
|
|
69
|
+
fill: ${s};
|
|
70
|
+
font-family: ${t};
|
|
71
|
+
font-size: ${r}px;
|
|
72
|
+
text-anchor: middle;
|
|
73
|
+
dominant-baseline: middle;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.railroad-rule-name {
|
|
77
|
+
font-weight: bold;
|
|
78
|
+
fill: ${f};
|
|
79
|
+
font-family: ${t};
|
|
80
|
+
font-size: ${r}px;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.railroad-group {
|
|
84
|
+
/* Grouping container, no specific styles */
|
|
85
|
+
}
|
|
86
|
+
`},"getStyles"),W=class{constructor(){this.d=""}static{(0,o.K)(this,"PathBuilder")}moveTo(e,t){return this.d+=`M ${e} ${t} `,this}lineTo(e,t){return this.d+=`L ${e} ${t} `,this}horizontalTo(e){return this.d+=`H ${e} `,this}verticalTo(e){return this.d+=`V ${e} `,this}arcTo(e,t,r,i,a,n,o){return this.d+=`A ${e} ${t} ${r} ${+!!i} ${+!!a} ${n} ${o} `,this}build(){return this.d.trim()}},q=class{constructor(e,t=B()){this.textCache=new Map,this.svg=e,this.config=t}static{(0,o.K)(this,"RailroadRenderer")}measureText(e){if(this.textCache.has(e))return this.textCache.get(e);let t=this.svg.append("text").attr("font-family",this.config.fontFamily).attr("font-size",this.config.fontSize).text(e),r=t.node().getBBox(),i={width:r.width,height:r.height};return t.remove(),this.textCache.set(e,i),i}renderTerminal(e,t){let r=this.measureText(t),i=r.width+2*this.config.padding,a=r.height+2*this.config.padding,n=e.append("g").attr("class","railroad-terminal");return n.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a).attr("rx",10).attr("ry",10),n.append("text").attr("x",i/2).attr("y",a/2).text(t),{element:n.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderNonTerminal(e,t){let r=this.measureText(t),i=r.width+2*this.config.padding,a=r.height+2*this.config.padding,n=e.append("g").attr("class","railroad-nonterminal");return n.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a),n.append("text").attr("x",i/2).attr("y",a/2).text(t),{element:n.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderSequence(e,t){let r=t.map(t=>this.renderExpression(e,t)),i=0,a=0,n=0;for(let e of r)i+=e.dimensions.width,a=Math.max(a,e.dimensions.up),n=Math.max(n,e.dimensions.down);i+=(r.length-1)*this.config.horizontalSeparation;let o=e.append("g").attr("class","railroad-sequence"),l=0;for(let e=0;e<r.length;e++){let t=r[e],i=a-t.dimensions.up;if(o.node().appendChild(t.element).setAttribute("transform",`translate(${l}, ${i})`),e<r.length-1){let e=l+t.dimensions.width,r=e+this.config.horizontalSeparation,i=a;o.append("path").attr("class","railroad-line").attr("d",new W().moveTo(e,i).lineTo(r,i).build())}l+=t.dimensions.width+this.config.horizontalSeparation}return{element:o.node(),dimensions:{width:i,height:a+n,up:a,down:n}}}renderChoice(e,t){let r=t.map(t=>this.renderExpression(e,t)),i=0,a=0;for(let e of r)i=Math.max(i,e.dimensions.width),a+=e.dimensions.height;a+=(r.length-1)*this.config.verticalSeparation;let n=this.config.arcRadius,o=i+4*n,l=e.append("g").attr("class","railroad-choice"),s=0,d=a/2;for(let e of r){let t=s,r=t+e.dimensions.up,a=2*n+(i-e.dimensions.width)/2;l.node().appendChild(e.element).setAttribute("transform",`translate(${a}, ${t})`);let m=new W,c=r>d;r===d?m.moveTo(0,d).lineTo(a,r):m.moveTo(0,d).arcTo(n,n,0,!1,c,n,d+(c?n:-n)).lineTo(n,r-(c?n:-n)).arcTo(n,n,0,!1,!c,2*n,r).lineTo(a,r),l.append("path").attr("class","railroad-line").attr("d",m.build());let h=new W,p=a+e.dimensions.width,u=o-2*n;r===d?h.moveTo(p,r).lineTo(o,d):h.moveTo(p,r).lineTo(u,r).arcTo(n,n,0,!1,!c,o-n,r+(c?-n:n)).lineTo(o-n,d+(c?n:-n)).arcTo(n,n,0,!1,c,o,d),l.append("path").attr("class","railroad-line").attr("d",h.build()),s+=e.dimensions.height+this.config.verticalSeparation}return{element:l.node(),dimensions:{width:o,height:a,up:d,down:a-d}}}renderOptional(e,t){let r=this.renderExpression(e,t),i=this.config.arcRadius,a=2*i,n=r.dimensions.width+4*i,o=r.dimensions.height+a,l=e.append("g").attr("class","railroad-optional"),s=2*i;l.node().appendChild(r.element).setAttribute("transform",`translate(${s}, ${a})`);let d=a+r.dimensions.up,m=new W().moveTo(0,d).lineTo(2*i,d);l.append("path").attr("class","railroad-line").attr("d",m.build());let c=new W().moveTo(s+r.dimensions.width,d).lineTo(n,d);l.append("path").attr("class","railroad-line").attr("d",c.build());let h=new W().moveTo(0,d).arcTo(i,i,0,!1,!1,i,d-i).lineTo(i,i).arcTo(i,i,0,!1,!0,2*i,0).lineTo(n-2*i,0).arcTo(i,i,0,!1,!0,n-i,i).lineTo(n-i,d-i).arcTo(i,i,0,!1,!1,n,d);return l.append("path").attr("class","railroad-line").attr("d",h.build()),{element:l.node(),dimensions:{width:n,height:o,up:d,down:o-d}}}renderRepetition(e,t,r){let i=this.renderExpression(e,t),a=this.config.arcRadius,n=2*a,o=i.dimensions.width+4*a,l=0===r,s=i.dimensions.height+n+(l?n:0),d=e.append("g").attr("class","railroad-repetition"),m=2*a,c=l?n:0;d.node().appendChild(i.element).setAttribute("transform",`translate(${m}, ${c})`);let h=c+i.dimensions.up;d.append("path").attr("class","railroad-line").attr("d",new W().moveTo(0,h).lineTo(2*a,h).build()),d.append("path").attr("class","railroad-line").attr("d",new W().moveTo(m+i.dimensions.width,h).lineTo(o,h).build());let p=c+i.dimensions.height+a,u=new W().moveTo(m+i.dimensions.width,h).arcTo(a,a,0,!1,!0,m+i.dimensions.width+a,h+a).lineTo(m+i.dimensions.width+a,p).arcTo(a,a,0,!1,!0,m+i.dimensions.width,p+a).lineTo(2*a,p+a).arcTo(a,a,0,!1,!0,a,p).lineTo(a,h+a).arcTo(a,a,0,!1,!0,2*a,h);if(d.append("path").attr("class","railroad-line").attr("d",u.build()),l){let e=new W().moveTo(0,h).arcTo(a,a,0,!1,!1,a,h-a).lineTo(a,a).arcTo(a,a,0,!1,!0,2*a,0).lineTo(o-2*a,0).arcTo(a,a,0,!1,!0,o-a,a).lineTo(o-a,h-a).arcTo(a,a,0,!1,!1,o,h);d.append("path").attr("class","railroad-line").attr("d",e.build())}return{element:d.node(),dimensions:{width:o,height:s,up:h,down:s-h}}}renderSpecial(e,t){let r=this.measureText("? "+t+" ?"),i=r.width+2*this.config.padding,a=r.height+2*this.config.padding,n=e.append("g").attr("class","railroad-special");return n.append("rect").attr("x",0).attr("y",0).attr("width",i).attr("height",a),n.append("text").attr("x",i/2).attr("y",a/2).text("? "+t+" ?"),{element:n.node(),dimensions:{width:i,height:a,up:a/2,down:a/2}}}renderExpression(e,t){switch(t.type){case"terminal":return this.renderTerminal(e,t.value);case"nonterminal":return this.renderNonTerminal(e,t.name);case"sequence":return this.renderSequence(e,t.elements);case"choice":return this.renderChoice(e,t.alternatives);case"optional":return this.renderOptional(e,t.element);case"repetition":return this.renderRepetition(e,t.element,t.min);case"special":return this.renderSpecial(e,t.text);default:throw Error(`Unknown node type: ${t.type}`)}}renderRule(e,t){let r=this.svg.append("g").attr("class","railroad-rule").attr("transform",`translate(0, ${t})`),i=e.name+" =",a=this.measureText(i).width+20,n=a+20,o=r.append("g"),l=this.renderExpression(o,e.definition),s=Math.max(20,l.dimensions.up),d=s-l.dimensions.up;return o.attr("transform",`translate(${n}, ${d})`),r.append("g").attr("class","railroad-rule-name-group").append("text").attr("class","railroad-rule-name").attr("x",0).attr("y",s).text(i),r.append("g").attr("class","railroad-start").append("circle").attr("cx",a).attr("cy",s).attr("r",this.config.markerRadius),r.append("g").attr("class","railroad-end").append("circle").attr("cx",n+l.dimensions.width+10).attr("cy",s).attr("r",this.config.markerRadius),r.append("path").attr("class","railroad-line").attr("d",new W().moveTo(a+this.config.markerRadius,s).lineTo(n,s).build()),r.append("path").attr("class","railroad-line").attr("d",new W().moveTo(n+l.dimensions.width,s).lineTo(n+l.dimensions.width+10-this.config.markerRadius,s).build()),{height:Math.max(40,d+l.dimensions.height+2*this.config.padding),width:n+l.dimensions.width+10+this.config.markerRadius}}renderDiagram(e){let t=this.config.padding,r=0;for(let i of e){let e=this.renderRule(i,t);t+=e.height+this.config.verticalSeparation,r=Math.max(r,e.width)}return{width:r+2*this.config.padding,height:t+this.config.padding}}},V=(0,o.K)((e,t,r)=>{(0,a.a$)(e,t.height,t.width,r),e.attr("viewBox",`0 0 ${t.width} ${t.height}`)},"configureRailroadSvgSize"),j={draw:(0,o.K)((e,t,r)=>{n.R.debug("[Railroad] Rendering diagram\n"+e);try{let e=(0,i.D)(t);e.attr("class","railroad-diagram");let r=(0,a.zj)().railroad,o=r?.useMaxWidth??!0,l=S.getRules();if(n.R.debug(`[Railroad] Rendering ${l.length} rules`),0===l.length){n.R.warn("[Railroad] No rules to render"),V(e,{height:100,width:200},o);return}let s=new q(e,B()).renderDiagram(l);V(e,s,o),n.R.debug("[Railroad] Render complete")}catch(e){throw n.R.error("[Railroad] Render error:",e),e}},"draw")}}}]);
|