@sureshdsk/devflow-mcp 3.0.1 → 3.0.2
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/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +2 -2
- package/.next/standalone/.next/server/app/_global-error.html +2 -2
- package/.next/standalone/.next/server/app/_global-error.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +2 -2
- package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_buildManifest.js +11 -0
- package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_clientMiddlewareManifest.json +1 -0
- package/.next/standalone/.next/static/static/V6JvQiyb7wzYpHUOLB6BC/_ssgManifest.js +1 -0
- package/.next/standalone/.next/static/static/chunks/01c05b0fdc89fc0c.js +2 -0
- package/.next/standalone/.next/static/static/chunks/034e8cfdbd1cf3ac.js +24 -0
- package/.next/standalone/.next/static/static/chunks/0356b23e9d8fbd11.js +160 -0
- package/.next/standalone/.next/static/static/chunks/0697f660af9a95f1.js +1 -0
- package/.next/standalone/.next/static/static/chunks/09e4e9409aadc2fe.js +1 -0
- package/.next/standalone/.next/static/static/chunks/09ec2e3c3d2d294f.js +29 -0
- package/.next/standalone/.next/static/static/chunks/1bdb5b021c9a4e61.js +62 -0
- package/.next/standalone/.next/static/static/chunks/1cec4d71237d0c89.js +15 -0
- package/.next/standalone/.next/static/static/chunks/20337e5244416041.js +1 -0
- package/.next/standalone/.next/static/static/chunks/20c1169c30c95e0f.js +1 -0
- package/.next/standalone/.next/static/static/chunks/27f5fab49d8a5395.js +1 -0
- package/.next/standalone/.next/static/static/chunks/31965ae569bf807f.js +24 -0
- package/.next/standalone/.next/static/static/chunks/34e2788a0be7ee63.js +1 -0
- package/.next/standalone/.next/static/static/chunks/3e6042c77fa8e7ac.js +1 -0
- package/.next/standalone/.next/static/static/chunks/46d959abf8046f0e.js +15 -0
- package/.next/standalone/.next/static/static/chunks/483effa74d32093a.js +1 -0
- package/.next/standalone/.next/static/static/chunks/4f23f64d46848f57.js +1 -0
- package/.next/standalone/.next/static/static/chunks/53081dcdcad4f31e.js +1 -0
- package/.next/standalone/.next/static/static/chunks/539636bf51e84308.js +1 -0
- package/.next/standalone/.next/static/static/chunks/559e55a53f22f5d1.js +1 -0
- package/.next/standalone/.next/static/static/chunks/5623d8a1c99eba62.js +1 -0
- package/.next/standalone/.next/static/static/chunks/581c7f8a86cc86fb.js +1 -0
- package/.next/standalone/.next/static/static/chunks/5c05dda6ed4d92bf.js +1 -0
- package/.next/standalone/.next/static/static/chunks/5eac621951969859.js +60 -0
- package/.next/standalone/.next/static/static/chunks/6f4c5a75f38f686b.js +1 -0
- package/.next/standalone/.next/static/static/chunks/6fee5c7b5d483c8a.js +5 -0
- package/.next/standalone/.next/static/static/chunks/701cfcbb41e0ab47.js +1 -0
- package/.next/standalone/.next/static/static/chunks/70b3258c508216b5.js +4 -0
- package/.next/standalone/.next/static/static/chunks/762121739217e5da.js +1 -0
- package/.next/standalone/.next/static/static/chunks/808075c416a273c9.js +2 -0
- package/.next/standalone/.next/static/static/chunks/8321c26033c9fc5b.js +1 -0
- package/.next/standalone/.next/static/static/chunks/87f01c0a5d4010ab.js +1 -0
- package/.next/standalone/.next/static/static/chunks/89ebb4231102677a.js +77 -0
- package/.next/standalone/.next/static/static/chunks/909ac8a87c0dd9cb.js +215 -0
- package/.next/standalone/.next/static/static/chunks/9525dc246b363870.js +262 -0
- package/.next/standalone/.next/static/static/chunks/957a5dae245bbc84.js +1 -0
- package/.next/standalone/.next/static/static/chunks/9a52b8ded6a9ee38.js +215 -0
- package/.next/standalone/.next/static/static/chunks/9eb0474ddf7f6238.js +80 -0
- package/.next/standalone/.next/static/static/chunks/a6dad97d9634a72d.js +1 -0
- package/.next/standalone/.next/static/static/chunks/a6dad97d9634a72d.js.map +1 -0
- package/.next/standalone/.next/static/static/chunks/a85d55e8b6841436.js +1 -0
- package/.next/standalone/.next/static/static/chunks/ac4b6b4d5b7e486e.css +1 -0
- package/.next/standalone/.next/static/static/chunks/ad24b3b0881818aa.js +4 -0
- package/.next/standalone/.next/static/static/chunks/ae52f8e72d4127b1.js +59 -0
- package/.next/standalone/.next/static/static/chunks/af66c50a65af610b.js +93 -0
- package/.next/standalone/.next/static/static/chunks/b8b36494d4330f5f.js +152 -0
- package/.next/standalone/.next/static/static/chunks/b8ca88454bfa8e05.js +148 -0
- package/.next/standalone/.next/static/static/chunks/b9a047fc90291dbd.js +63 -0
- package/.next/standalone/.next/static/static/chunks/be28d13ded360528.js +117 -0
- package/.next/standalone/.next/static/static/chunks/c231010aae14914b.js +1 -0
- package/.next/standalone/.next/static/static/chunks/c36e148ece9c20ae.js +43 -0
- package/.next/standalone/.next/static/static/chunks/cb863a7e46548566.js +15 -0
- package/.next/standalone/.next/static/static/chunks/ce4052f386943efb.js +1 -0
- package/.next/standalone/.next/static/static/chunks/d0309ea872db5d9f.js +1 -0
- package/.next/standalone/.next/static/static/chunks/d4cf8893a018e965.js +1 -0
- package/.next/standalone/.next/static/static/chunks/d5b700b8aafeea3b.js +55 -0
- package/.next/standalone/.next/static/static/chunks/dc16aeb5aabadbd8.js +136 -0
- package/.next/standalone/.next/static/static/chunks/de9c5219846f92bb.js +53 -0
- package/.next/standalone/.next/static/static/chunks/df3c9c7fcf3e0a3d.js +15 -0
- package/.next/standalone/.next/static/static/chunks/e6c0233269a4bd69.js +13 -0
- package/.next/standalone/.next/static/static/chunks/e7d83ce855afe416.js +5 -0
- package/.next/standalone/.next/static/static/chunks/eb22f55ae829d296.js +36 -0
- package/.next/standalone/.next/static/static/chunks/ec0de430276c8209.js +1 -0
- package/.next/standalone/.next/static/static/chunks/ed2e02f2db03c1dc.js +1 -0
- package/.next/standalone/.next/static/static/chunks/ee7035560fc9e5e9.js +1 -0
- package/.next/standalone/.next/static/static/chunks/f1f8594d5ec7b93e.js +1 -0
- package/.next/standalone/.next/static/static/chunks/f42ff7863eb4c3ff.js +1 -0
- package/.next/standalone/.next/static/static/chunks/f678cdcec3cea0de.js +1 -0
- package/.next/standalone/.next/static/static/chunks/f7a6fed60fb079dd.js +1 -0
- package/.next/standalone/.next/static/static/chunks/f9eb3f4ff87b8d8d.js +56 -0
- package/.next/standalone/.next/static/static/chunks/ff1a16fafef87110.js +1 -0
- package/.next/standalone/.next/static/static/chunks/ff49535ba8193dec.js +1 -0
- package/.next/standalone/.next/static/static/chunks/turbopack-8b3b66a22a5e0fb4.js +4 -0
- package/.next/standalone/.next/static/static/media/favicon.0b3bf435.ico +0 -0
- package/.next/standalone/package.json +3 -3
- package/package.json +3 -3
- /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_buildManifest.js +0 -0
- /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_clientMiddlewareManifest.json +0 -0
- /package/.next/{static/Ql6qo0GYLL23WRu6ec4N5 → standalone/.next/static/V6JvQiyb7wzYpHUOLB6BC}/_ssgManifest.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/01c05b0fdc89fc0c.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/034e8cfdbd1cf3ac.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/0356b23e9d8fbd11.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/0697f660af9a95f1.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/09e4e9409aadc2fe.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/09ec2e3c3d2d294f.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/1bdb5b021c9a4e61.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/1cec4d71237d0c89.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/20337e5244416041.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/20c1169c30c95e0f.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/27f5fab49d8a5395.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/31965ae569bf807f.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/34e2788a0be7ee63.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/3e6042c77fa8e7ac.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/46d959abf8046f0e.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/483effa74d32093a.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/4f23f64d46848f57.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/53081dcdcad4f31e.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/539636bf51e84308.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/559e55a53f22f5d1.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/5623d8a1c99eba62.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/581c7f8a86cc86fb.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/5c05dda6ed4d92bf.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/5eac621951969859.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/6f4c5a75f38f686b.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/6fee5c7b5d483c8a.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/701cfcbb41e0ab47.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/70b3258c508216b5.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/762121739217e5da.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/808075c416a273c9.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/8321c26033c9fc5b.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/87f01c0a5d4010ab.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/89ebb4231102677a.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/909ac8a87c0dd9cb.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/9525dc246b363870.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/957a5dae245bbc84.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/9a52b8ded6a9ee38.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/9eb0474ddf7f6238.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/a6dad97d9634a72d.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/a6dad97d9634a72d.js.map +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/a85d55e8b6841436.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ac4b6b4d5b7e486e.css +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ad24b3b0881818aa.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ae52f8e72d4127b1.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/af66c50a65af610b.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/b8b36494d4330f5f.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/b8ca88454bfa8e05.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/b9a047fc90291dbd.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/be28d13ded360528.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/c231010aae14914b.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/c36e148ece9c20ae.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/cb863a7e46548566.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ce4052f386943efb.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/d0309ea872db5d9f.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/d4cf8893a018e965.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/d5b700b8aafeea3b.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/dc16aeb5aabadbd8.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/de9c5219846f92bb.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/df3c9c7fcf3e0a3d.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/e6c0233269a4bd69.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/e7d83ce855afe416.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/eb22f55ae829d296.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ec0de430276c8209.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ed2e02f2db03c1dc.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ee7035560fc9e5e9.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/f1f8594d5ec7b93e.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/f42ff7863eb4c3ff.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/f678cdcec3cea0de.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/f7a6fed60fb079dd.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/f9eb3f4ff87b8d8d.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ff1a16fafef87110.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/ff49535ba8193dec.js +0 -0
- /package/.next/{static → standalone/.next/static}/chunks/turbopack-8b3b66a22a5e0fb4.js +0 -0
- /package/.next/{static → standalone/.next/static}/media/favicon.0b3bf435.ico +0 -0
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,7983,83272,t=>{"use strict";var e=t.i(2256),a=t.i(33448),r=t.i(80262),l=t.i(95923),n=t.i(80926),i=t.i(71206);t.i(47716);var s=t.i(23685);function h(t,e,a){if(t&&t.length){let[r,l]=e,n=Math.PI/180*a,i=Math.cos(n),s=Math.sin(n);for(let e of t){let[t,a]=e;e[0]=(t-r)*i-(a-l)*s+r,e[1]=(t-r)*s+(a-l)*i+l}}}function o(t,e){var a;let r=e.hachureAngle+90,l=e.hachureGap;l<0&&(l=4*e.strokeWidth),l=Math.round(Math.max(l,.1));let n=1;return e.roughness>=1&&((null==(a=e.randomizer)?void 0:a.next())||Math.random())>.7&&(n=l),function(t,e,a,r=1){let l=Math.max(e,.1),n=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,i=[0,0];if(a)for(let t of n)h(t,i,a);let s=function(t,e,a){let r=[];for(let e of t){var l,n;let t=[...e];l=t[0],n=t[t.length-1],l[0]===n[0]&&l[1]===n[1]||t.push([t[0][0],t[0][1]]),t.length>2&&r.push(t)}let i=[];e=Math.max(e,.1);let s=[];for(let t of r)for(let e=0;e<t.length-1;e++){let a=t[e],r=t[e+1];if(a[1]!==r[1]){let t=Math.min(a[1],r[1]);s.push({ymin:t,ymax:Math.max(a[1],r[1]),x:t===a[1]?a[0]:r[0],islope:(r[0]-a[0])/(r[1]-a[1])})}}if(s.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!s.length)return i;let h=[],o=s[0].ymin,d=0;for(;h.length||s.length;){if(s.length){let t=-1;for(let e=0;e<s.length&&!(s[e].ymin>o);e++)t=e;s.splice(0,t+1).forEach(t=>{h.push({s:o,edge:t})})}if((h=h.filter(t=>!(t.edge.ymax<=o))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==a||d%e==0)&&h.length>1)for(let t=0;t<h.length;t+=2){let e=t+1;if(e>=h.length)break;let a=h[t].edge,r=h[e].edge;i.push([[Math.round(a.x),o],[Math.round(r.x),o]])}o+=a,h.forEach(t=>{t.edge.x=t.edge.x+a*t.edge.islope}),d++}return i}(n,l,r);if(a){let t;for(let t of n)h(t,i,-a);t=[],s.forEach(e=>t.push(...e)),h(t,i,-a)}return s}(t,l,r,n||1)}class d{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){let a=o(t,e);return{type:"fillSketch",ops:this.renderLines(a,e)}}renderLines(t,e){let a=[];for(let r of t)a.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return a}}function c(t){let e=t[0],a=t[1];return Math.sqrt(Math.pow(e[0]-a[0],2)+Math.pow(e[1]-a[1],2))}class g extends d{fillPolygons(t,e){let a=e.hachureGap;a<0&&(a=4*e.strokeWidth);let r=o(t,Object.assign({},e,{hachureGap:a=Math.max(a,.1)})),l=Math.PI/180*e.hachureAngle,n=[],i=.5*a*Math.cos(l),s=.5*a*Math.sin(l);for(let[t,e]of r)c([t,e])&&n.push([[t[0]-i,t[1]+s],[...e]],[[t[0]+i,t[1]-s],[...e]]);return{type:"fillSketch",ops:this.renderLines(n,e)}}}class u extends d{fillPolygons(t,e){let a=this._fillPolygons(t,e),r=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),l=this._fillPolygons(t,r);return a.ops=a.ops.concat(l.ops),a}}class f{constructor(t){this.helper=t}fillPolygons(t,e){let a=o(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(a,e)}dotsOnLines(t,e){let a=[],r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);let l=e.fillWeight;l<0&&(l=e.strokeWidth/2);let n=r/4;for(let i of t){let t=c(i),s=Math.ceil(t/r)-1,h=t-s*r,o=(i[0][0]+i[1][0])/2-r/4,d=Math.min(i[0][1],i[1][1]);for(let t=0;t<s;t++){let i=o-n+2*Math.random()*n,s=d+h+t*r-n+2*Math.random()*n,c=this.helper.ellipse(i,s,l,l,e);a.push(...c.ops)}}return{type:"fillSketch",ops:a}}}class p{constructor(t){this.helper=t}fillPolygons(t,e){let a=o(t,e);return{type:"fillSketch",ops:this.dashedLine(a,e)}}dashedLine(t,e){let a=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,r=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,l=[];return t.forEach(t=>{let n=c(t),i=Math.floor(n/(a+r)),s=(n+r-i*(a+r))/2,h=t[0],o=t[1];h[0]>o[0]&&(h=t[1],o=t[0]);let d=Math.atan((o[1]-h[1])/(o[0]-h[0]));for(let t=0;t<i;t++){let n=t*(a+r),i=n+a,o=[h[0]+n*Math.cos(d)+s*Math.cos(d),h[1]+n*Math.sin(d)+s*Math.sin(d)],c=[h[0]+i*Math.cos(d)+s*Math.cos(d),h[1]+i*Math.sin(d)+s*Math.sin(d)];l.push(...this.helper.doubleLineOps(o[0],o[1],c[0],c[1],e))}}),l}}class y{constructor(t){this.helper=t}fillPolygons(t,e){let a=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,r=e.zigzagOffset<0?a:e.zigzagOffset,l=o(t,e=Object.assign({},e,{hachureGap:a+r}));return{type:"fillSketch",ops:this.zigzagLines(l,r,e)}}zigzagLines(t,e,a){let r=[];return t.forEach(t=>{let l=Math.round(c(t)/(2*e)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);let s=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t<l;t++){let l=2*t*e,i=2*(t+1)*e,h=Math.sqrt(2*Math.pow(e,2)),o=[n[0]+l*Math.cos(s),n[1]+l*Math.sin(s)],d=[n[0]+i*Math.cos(s),n[1]+i*Math.sin(s)],c=[o[0]+h*Math.cos(s+Math.PI/4),o[1]+h*Math.sin(s+Math.PI/4)];r.push(...this.helper.doubleLineOps(o[0],o[1],c[0],c[1],a),...this.helper.doubleLineOps(c[0],c[1],d[0],d[1],a))}}),r}}let m={};class x{constructor(t){this.seed=t}next(){return this.seed?(0x80000000-1&(this.seed=Math.imul(48271,this.seed)))/0x80000000:Math.random()}}let w={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function b(t){let e=[],a=function(t){let e=[];for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t),r="BOD",l=0,n=a[0];for(;2!==n.type;){let i=0,s=[];if("BOD"===r){if("M"!==n.text&&"m"!==n.text)return b("M0,0"+t);l++,i=w[n.text],r=n.text}else 1===n.type?i=w[r]:(l++,i=w[n.text],r=n.text);if(!(l+i<a.length))throw Error("Path data ended short");for(let t=l;t<l+i;t++){let e=a[t];if(1!==e.type)throw Error("Param not a number: "+r+","+e.text);s[s.length]=+e.text}if("number"!=typeof w[r])throw Error("Bad segment: "+r);{let t={key:r,data:s};e.push(t),l+=i,n=a[l],"M"===r&&(r="L"),"m"===r&&(r="l")}}return e}function $(t){let e=0,a=0,r=0,l=0,n=[];for(let{key:i,data:s}of t)switch(i){case"M":n.push({key:"M",data:[...s]}),[e,a]=s,[r,l]=s;break;case"m":e+=s[0],a+=s[1],n.push({key:"M",data:[e,a]}),r=e,l=a;break;case"L":n.push({key:"L",data:[...s]}),[e,a]=s;break;case"l":e+=s[0],a+=s[1],n.push({key:"L",data:[e,a]});break;case"C":n.push({key:"C",data:[...s]}),e=s[4],a=s[5];break;case"c":{let t=s.map((t,r)=>r%2?t+a:t+e);n.push({key:"C",data:t}),e=t[4],a=t[5];break}case"Q":n.push({key:"Q",data:[...s]}),e=s[2],a=s[3];break;case"q":{let t=s.map((t,r)=>r%2?t+a:t+e);n.push({key:"Q",data:t}),e=t[2],a=t[3];break}case"A":n.push({key:"A",data:[...s]}),e=s[5],a=s[6];break;case"a":e+=s[5],a+=s[6],n.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,a]});break;case"H":n.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],n.push({key:"H",data:[e]});break;case"V":n.push({key:"V",data:[...s]}),a=s[0];break;case"v":a+=s[0],n.push({key:"V",data:[a]});break;case"S":n.push({key:"S",data:[...s]}),e=s[2],a=s[3];break;case"s":{let t=s.map((t,r)=>r%2?t+a:t+e);n.push({key:"S",data:t}),e=t[2],a=t[3];break}case"T":n.push({key:"T",data:[...s]}),e=s[0],a=s[1];break;case"t":e+=s[0],a+=s[1],n.push({key:"T",data:[e,a]});break;case"Z":case"z":n.push({key:"Z",data:[]}),e=r,a=l}return n}function k(t){let e=[],a="",r=0,l=0,n=0,i=0,s=0,h=0;for(let{key:o,data:d}of t){switch(o){case"M":e.push({key:"M",data:[...d]}),[r,l]=d,[n,i]=d;break;case"C":e.push({key:"C",data:[...d]}),r=d[4],l=d[5],s=d[2],h=d[3];break;case"L":e.push({key:"L",data:[...d]}),[r,l]=d;break;case"H":r=d[0],e.push({key:"L",data:[r,l]});break;case"V":l=d[0],e.push({key:"L",data:[r,l]});break;case"S":{let t=0,n=0;"C"===a||"S"===a?(t=r+(r-s),n=l+(l-h)):(t=r,n=l),e.push({key:"C",data:[t,n,...d]}),s=d[0],h=d[1],r=d[2],l=d[3];break}case"T":{let[t,n]=d,i=0,o=0;"Q"===a||"T"===a?(i=r+(r-s),o=l+(l-h)):(i=r,o=l);let c=r+2*(i-r)/3,g=l+2*(o-l)/3,u=t+2*(i-t)/3,f=n+2*(o-n)/3;e.push({key:"C",data:[c,g,u,f,t,n]}),s=i,h=o,r=t,l=n;break}case"Q":{let[t,a,n,i]=d,o=r+2*(t-r)/3,c=l+2*(a-l)/3,g=n+2*(t-n)/3,u=i+2*(a-i)/3;e.push({key:"C",data:[o,c,g,u,n,i]}),s=t,h=a,r=n,l=i;break}case"A":{let t=Math.abs(d[0]),a=Math.abs(d[1]),n=d[2],i=d[3],s=d[4],h=d[5],o=d[6];0===t||0===a?(e.push({key:"C",data:[r,l,h,o,h,o]}),r=h,l=o):(r!==h||l!==o)&&((function t(e,a,r,l,n,i,s,h,o,d){let c=Math.PI*s/180,g=[],u=0,f=0,p=0,y=0;if(d)[u,f,p,y]=d;else{[e,a]=M(e,a,-c),[r,l]=M(r,l,-c);let t=(e-r)/2,s=(a-l)/2,d=t*t/(n*n)+s*s/(i*i);d>1&&(n*=d=Math.sqrt(d),i*=d);let g=n*n,m=i*i,x=(h===o?-1:1)*Math.sqrt(Math.abs((g*m-g*s*s-m*t*t)/(g*s*s+m*t*t)));p=x*n*s/i+(e+r)/2,y=-(x*i)*t/n+(a+l)/2,u=Math.asin(parseFloat(((a-y)/i).toFixed(9))),f=Math.asin(parseFloat(((l-y)/i).toFixed(9))),e<p&&(u=Math.PI-u),r<p&&(f=Math.PI-f),u<0&&(u=2*Math.PI+u),f<0&&(f=2*Math.PI+f),o&&u>f&&(u-=2*Math.PI),!o&&f>u&&(f-=2*Math.PI)}let m=f-u;if(Math.abs(m)>120*Math.PI/180){let e=f,a=r,h=l;g=t(r=p+n*Math.cos(f=o&&f>u?u+120*Math.PI/180*1:u+-(120*Math.PI/180*1)),l=y+i*Math.sin(f),a,h,n,i,s,0,o,[f,e,p,y])}m=f-u;let x=Math.cos(u),w=Math.cos(f),b=Math.tan(m/4),$=4/3*n*b,k=4/3*i*b,S=[e,a],_=[e+$*Math.sin(u),a-k*x],v=[r+$*Math.sin(f),l-k*w],D=[r,l];if(_[0]=2*S[0]-_[0],_[1]=2*S[1]-_[1],d)return[_,v,D].concat(g);{g=[_,v,D].concat(g);let t=[];for(let e=0;e<g.length;e+=3){let a=M(g[e][0],g[e][1],c),r=M(g[e+1][0],g[e+1][1],c),l=M(g[e+2][0],g[e+2][1],c);t.push([a[0],a[1],r[0],r[1],l[0],l[1]])}return t}})(r,l,h,o,t,a,n,i,s).forEach(function(t){e.push({key:"C",data:t})}),r=h,l=o);break}case"Z":e.push({key:"Z",data:[]}),r=n,l=i}a=o}return e}function M(t,e,a){return[t*Math.cos(a)-e*Math.sin(a),t*Math.sin(a)+e*Math.cos(a)]}let S={randOffset:function(t,e){return I(t,e)},randOffsetWithRange:function(t,e,a){return R(t,e,a)},ellipse:function(t,e,a,r,l){let n=C(a,r,l);return N(t,e,l,n).opset},doubleLineOps:function(t,e,a,r,l){return W(t,e,a,r,l,!0)}};function _(t,e,a,r,l){return{type:"path",ops:W(t,e,a,r,l)}}function v(t,e,a){let r=(t||[]).length;if(r>2){let l=[];for(let e=0;e<r-1;e++)l.push(...W(t[e][0],t[e][1],t[e+1][0],t[e+1][1],a));return e&&l.push(...W(t[r-1][0],t[r-1][1],t[0][0],t[0][1],a)),{type:"path",ops:l}}return 2===r?_(t[0][0],t[0][1],t[1][0],t[1][1],a):{type:"path",ops:[]}}function D(t,e){if(t.length){let a="number"==typeof t[0][0]?[t]:t,r=z(a[0],+(1+.2*e.roughness),e),l=e.disableMultiStroke?[]:z(a[0],1.5*(1+.22*e.roughness),L(e));for(let t=1;t<a.length;t++){let n=a[t];if(n.length){let t=z(n,+(1+.2*e.roughness),e),a=e.disableMultiStroke?[]:z(n,1.5*(1+.22*e.roughness),L(e));for(let e of t)"move"!==e.op&&r.push(e);for(let t of a)"move"!==t.op&&l.push(t)}}return{type:"path",ops:r.concat(l)}}return{type:"path",ops:[]}}function C(t,e,a){let r=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),l=2*Math.PI/Math.ceil(Math.max(a.curveStepCount,a.curveStepCount/Math.sqrt(200)*r)),n=Math.abs(t/2),i=Math.abs(e/2),s=1-a.curveFitting;return n+=I(n*s,a),i+=I(i*s,a),{increment:l,rx:n,ry:i}}function N(t,e,a,r){let[l,n]=H(r.increment,t,e,r.rx,r.ry,1,r.increment*R(.1,R(.4,1,a),a),a),i=q(l,null,a);if(!a.disableMultiStroke&&0!==a.roughness){let[l]=H(r.increment,t,e,r.rx,r.ry,1.5,0,a),n=q(l,null,a);i=i.concat(n)}return{estimatedPoints:n,opset:{type:"path",ops:i}}}function A(t,e,a,r,l,n,i,s,h){let o=Math.abs(a/2),d=Math.abs(r/2);o+=I(.01*o,h),d+=I(.01*d,h);let c=l,g=n;for(;c<0;)c+=2*Math.PI,g+=2*Math.PI;g-c>2*Math.PI&&(c=0,g=2*Math.PI);let u=Math.min(2*Math.PI/h.curveStepCount/2,(g-c)/2),f=j(u,t,e,o,d,c,g,1,h);if(!h.disableMultiStroke){let a=j(u,t,e,o,d,c,g,1.5,h);f.push(...a)}return i&&(s?f.push(...W(t,e,t+o*Math.cos(c),e+d*Math.sin(c),h),...W(t,e,t+o*Math.cos(g),e+d*Math.sin(g),h)):f.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+o*Math.cos(c),e+d*Math.sin(c)]})),{type:"path",ops:f}}function P(t,e){let a=k($(b(t))),r=[],l=[0,0],n=[0,0];for(let{key:t,data:i}of a)switch(t){case"M":n=[i[0],i[1]],l=[i[0],i[1]];break;case"L":r.push(...W(n[0],n[1],i[0],i[1],e)),n=[i[0],i[1]];break;case"C":{let[t,a,l,s,h,o]=i;r.push(...function(t,e,a,r,l,n,i,s){let h=[],o=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],d=[0,0],c=s.disableMultiStroke?1:2,g=s.preserveVertices;for(let u=0;u<c;u++)0===u?h.push({op:"move",data:[i[0],i[1]]}):h.push({op:"move",data:[i[0]+(g?0:I(o[0],s)),i[1]+(g?0:I(o[0],s))]}),d=g?[l,n]:[l+I(o[u],s),n+I(o[u],s)],h.push({op:"bcurveTo",data:[t+I(o[u],s),e+I(o[u],s),a+I(o[u],s),r+I(o[u],s),d[0],d[1]]});return h}(t,a,l,s,h,o,n,e)),n=[h,o];break}case"Z":r.push(...W(n[0],n[1],l[0],l[1],e)),n=[l[0],l[1]]}return{type:"path",ops:r}}function O(t,e){let a=[];for(let r of t)if(r.length){let t=e.maxRandomnessOffset||0,l=r.length;if(l>2){a.push({op:"move",data:[r[0][0]+I(t,e),r[0][1]+I(t,e)]});for(let n=1;n<l;n++)a.push({op:"lineTo",data:[r[n][0]+I(t,e),r[n][1]+I(t,e)]})}}return{type:"fillPath",ops:a}}function B(t,e){return(function(t,e){let a=t.fillStyle||"hachure";if(!m[a])switch(a){case"zigzag":m[a]||(m[a]=new g(e));break;case"cross-hatch":m[a]||(m[a]=new u(e));break;case"dots":m[a]||(m[a]=new f(e));break;case"dashed":m[a]||(m[a]=new p(e));break;case"zigzag-line":m[a]||(m[a]=new y(e));break;default:m[a="hachure"]||(m[a]=new d(e))}return m[a]})(e,S).fillPolygons(t,e)}function L(t){let e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function T(t){return t.randomizer||(t.randomizer=new x(t.seed||0)),t.randomizer.next()}function R(t,e,a,r=1){return a.roughness*r*(T(a)*(e-t)+t)}function I(t,e,a=1){return R(-t,t,e,a)}function W(t,e,a,r,l,n=!1){let i=n?l.disableMultiStrokeFill:l.disableMultiStroke,s=E(t,e,a,r,l,!0,!1);if(i)return s;let h=E(t,e,a,r,l,!0,!0);return s.concat(h)}function E(t,e,a,r,l,n,i){let s=Math.pow(t-a,2)+Math.pow(e-r,2),h=Math.sqrt(s),o=1;o=h<200?1:h>500?.4:-.0016668*h+1.233334;let d=l.maxRandomnessOffset||0;d*d*100>s&&(d=h/10);let c=d/2,g=.2+.2*T(l),u=l.bowing*l.maxRandomnessOffset*(r-e)/200,f=l.bowing*l.maxRandomnessOffset*(t-a)/200;u=I(u,l,o),f=I(f,l,o);let p=[],y=l.preserveVertices;return n&&(i?p.push({op:"move",data:[t+(y?0:I(c,l,o)),e+(y?0:I(c,l,o))]}):p.push({op:"move",data:[t+(y?0:I(d,l,o)),e+(y?0:I(d,l,o))]})),i?p.push({op:"bcurveTo",data:[u+t+(a-t)*g+I(c,l,o),f+e+(r-e)*g+I(c,l,o),u+t+2*(a-t)*g+I(c,l,o),f+e+2*(r-e)*g+I(c,l,o),a+(y?0:I(c,l,o)),r+(y?0:I(c,l,o))]}):p.push({op:"bcurveTo",data:[u+t+(a-t)*g+I(d,l,o),f+e+(r-e)*g+I(d,l,o),u+t+2*(a-t)*g+I(d,l,o),f+e+2*(r-e)*g+I(d,l,o),a+(y?0:I(d,l,o)),r+(y?0:I(d,l,o))]}),p}function z(t,e,a){if(!t.length)return[];let r=[];r.push([t[0][0]+I(e,a),t[0][1]+I(e,a)]),r.push([t[0][0]+I(e,a),t[0][1]+I(e,a)]);for(let l=1;l<t.length;l++)r.push([t[l][0]+I(e,a),t[l][1]+I(e,a)]),l===t.length-1&&r.push([t[l][0]+I(e,a),t[l][1]+I(e,a)]);return q(r,null,a)}function q(t,e,a){let r=t.length,l=[];if(r>3){let n=[],i=1-a.curveTightness;l.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<r;e++){let a=t[e];n[0]=[a[0],a[1]],n[1]=[a[0]+(i*t[e+1][0]-i*t[e-1][0])/6,a[1]+(i*t[e+1][1]-i*t[e-1][1])/6],n[2]=[t[e+1][0]+(i*t[e][0]-i*t[e+2][0])/6,t[e+1][1]+(i*t[e][1]-i*t[e+2][1])/6],n[3]=[t[e+1][0],t[e+1][1]],l.push({op:"bcurveTo",data:[n[1][0],n[1][1],n[2][0],n[2][1],n[3][0],n[3][1]]})}if(e&&2===e.length){let t=a.maxRandomnessOffset;l.push({op:"lineTo",data:[e[0]+I(t,a),e[1]+I(t,a)]})}}else 3===r?(l.push({op:"move",data:[t[1][0],t[1][1]]}),l.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===r&&l.push(...E(t[0][0],t[0][1],t[1][0],t[1][1],a,!0,!0));return l}function H(t,e,a,r,l,n,i,s){let h=[],o=[];if(0===s.roughness){t/=4,o.push([e+r*Math.cos(-t),a+l*Math.sin(-t)]);for(let n=0;n<=2*Math.PI;n+=t){let t=[e+r*Math.cos(n),a+l*Math.sin(n)];h.push(t),o.push(t)}o.push([e+ +r,a+0*l]),o.push([e+r*Math.cos(t),a+l*Math.sin(t)])}else{let d=I(.5,s)-Math.PI/2;o.push([I(n,s)+e+.9*r*Math.cos(d-t),I(n,s)+a+.9*l*Math.sin(d-t)]);let c=2*Math.PI+d-.01;for(let i=d;i<c;i+=t){let t=[I(n,s)+e+r*Math.cos(i),I(n,s)+a+l*Math.sin(i)];h.push(t),o.push(t)}o.push([I(n,s)+e+r*Math.cos(d+2*Math.PI+.5*i),I(n,s)+a+l*Math.sin(d+2*Math.PI+.5*i)]),o.push([I(n,s)+e+.98*r*Math.cos(d+i),I(n,s)+a+.98*l*Math.sin(d+i)]),o.push([I(n,s)+e+.9*r*Math.cos(d+.5*i),I(n,s)+a+.9*l*Math.sin(d+.5*i)])}return[o,h]}function j(t,e,a,r,l,n,i,s,h){let o=n+I(.1,h),d=[];d.push([I(s,h)+e+.9*r*Math.cos(o-t),I(s,h)+a+.9*l*Math.sin(o-t)]);for(let n=o;n<=i;n+=t)d.push([I(s,h)+e+r*Math.cos(n),I(s,h)+a+l*Math.sin(n)]);return d.push([e+r*Math.cos(i),a+l*Math.sin(i)]),d.push([e+r*Math.cos(i),a+l*Math.sin(i)]),q(d,null,h)}function F(t,e=0){let a=t.length;if(a<3)throw Error("A curve must have at least three points.");let r=[];if(3===a)r.push([...t[0]],[...t[1]],[...t[2]],[...t[2]]);else{let a=[];a.push(t[0],t[0]);for(let e=1;e<t.length;e++)a.push(t[e]),e===t.length-1&&a.push(t[e]);let l=[],n=1-e;r.push([...a[0]]);for(let t=1;t+2<a.length;t++){let e=a[t];l[0]=[e[0],e[1]],l[1]=[e[0]+(n*a[t+1][0]-n*a[t-1][0])/6,e[1]+(n*a[t+1][1]-n*a[t-1][1])/6],l[2]=[a[t+1][0]+(n*a[t][0]-n*a[t+2][0])/6,a[t+1][1]+(n*a[t][1]-n*a[t+2][1])/6],l[3]=[a[t+1][0],a[t+1][1]],r.push(l[1],l[2],l[3])}}return r}function G(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function V(t,e,a){return[t[0]+(e[0]-t[0])*a,t[1]+(e[1]-t[1])*a]}function U(t,e,a,r,l){let n=l||[],i=t[e],s=t[a-1],h=0,o=1;for(let r=e+1;r<a-1;++r){let e=function(t,e,a){let r=G(e,a);if(0===r)return G(t,e);let l=((t[0]-e[0])*(a[0]-e[0])+(t[1]-e[1])*(a[1]-e[1]))/r;return G(t,V(e,a,l=Math.max(0,Math.min(1,l))))}(t[r],i,s);e>h&&(h=e,o=r)}return Math.sqrt(h)>r?(U(t,e,o+1,r,n),U(t,o,a,r,n)):(n.length||n.push(i),n.push(s)),n}function Z(t,e=.15,a){let r=[],l=(t.length-1)/3;for(let a=0;a<l;a++)!function t(e,a,r,l){let n,i,s,h,o,d,c,g,u=l||[];if(n=e[a+0],i=e[a+1],s=e[a+2],h=e[a+3],o=3*i[0]-2*n[0]-h[0],o*=o,d=3*i[1]-2*n[1]-h[1],d*=d,c=3*s[0]-2*h[0]-n[0],c*=c,g=3*s[1]-2*h[1]-n[1],g*=g,o<c&&(o=c),d<g&&(d=g),o+d<r){let t=e[a+0];u.length?Math.sqrt(G(u[u.length-1],t))>1&&u.push(t):u.push(t),u.push(e[a+3])}else{let l=e[a+0],n=e[a+1],i=e[a+2],s=e[a+3],h=V(l,n,.5),o=V(n,i,.5),d=V(i,s,.5),c=V(h,o,.5),g=V(o,d,.5),f=V(c,g,.5);t([l,h,c,f],0,r,u),t([f,g,d,s],0,r,u)}return u}(t,3*a,e,r);return a&&a>0?U(r,0,r.length,a):r}let X="none";class Q{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(0x80000000*Math.random())}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,a){return{shape:t,sets:e||[],options:a||this.defaultOptions}}line(t,e,a,r,l){let n=this._o(l);return this._d("line",[_(t,e,a,r,n)],n)}rectangle(t,e,a,r,l){var n,i,s,h;let o=this._o(l),d=[],c=v([[n=t,i=e],[n+(s=a),i],[n+s,i+(h=r)],[n,i+h]],!0,o);if(o.fill){let l=[[t,e],[t+a,e],[t+a,e+r],[t,e+r]];"solid"===o.fillStyle?d.push(O([l],o)):d.push(B([l],o))}return o.stroke!==X&&d.push(c),this._d("rectangle",d,o)}ellipse(t,e,a,r,l){let n=this._o(l),i=[],s=C(a,r,n),h=N(t,e,n,s);if(n.fill)if("solid"===n.fillStyle){let a=N(t,e,n,s).opset;a.type="fillPath",i.push(a)}else i.push(B([h.estimatedPoints],n));return n.stroke!==X&&i.push(h.opset),this._d("ellipse",i,n)}circle(t,e,a,r){let l=this.ellipse(t,e,a,a,r);return l.shape="circle",l}linearPath(t,e){let a=this._o(e);return this._d("linearPath",[v(t,!1,a)],a)}arc(t,e,a,r,l,n,i=!1,s){let h=this._o(s),o=[],d=A(t,e,a,r,l,n,i,!0,h);if(i&&h.fill)if("solid"===h.fillStyle){let i=Object.assign({},h);i.disableMultiStroke=!0;let s=A(t,e,a,r,l,n,!0,!1,i);s.type="fillPath",o.push(s)}else o.push(function(t,e,a,r,l,n,i){let s=Math.abs(a/2),h=Math.abs(r/2);s+=I(.01*s,i),h+=I(.01*h,i);let o=l,d=n;for(;o<0;)o+=2*Math.PI,d+=2*Math.PI;d-o>2*Math.PI&&(o=0,d=2*Math.PI);let c=(d-o)/i.curveStepCount,g=[];for(let a=o;a<=d;a+=c)g.push([t+s*Math.cos(a),e+h*Math.sin(a)]);return g.push([t+s*Math.cos(d),e+h*Math.sin(d)]),g.push([t,e]),B([g],i)}(t,e,a,r,l,n,h));return h.stroke!==X&&o.push(d),this._d("arc",o,h)}curve(t,e){let a=this._o(e),r=[],l=D(t,a);if(a.fill&&a.fill!==X)if("solid"===a.fillStyle){let e=D(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{let e=[];if(t.length)for(let r of"number"==typeof t[0][0]?[t]:t)r.length<3?e.push(...r):3===r.length?e.push(...Z(F([r[0],r[0],r[1],r[2]]),10,(1+a.roughness)/2)):e.push(...Z(F(r),10,(1+a.roughness)/2));e.length&&r.push(B([e],a))}return a.stroke!==X&&r.push(l),this._d("curve",r,a)}polygon(t,e){let a=this._o(e),r=[],l=v(t,!0,a);return a.fill&&("solid"===a.fillStyle?r.push(O([t],a)):r.push(B([t],a))),a.stroke!==X&&r.push(l),this._d("polygon",r,a)}path(t,e){let a=this._o(e),r=[];if(!t)return this._d("path",r,a);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");let l=a.fill&&"transparent"!==a.fill&&a.fill!==X,n=a.stroke!==X,i=!!(a.simplification&&a.simplification<1),s=function(t,e,a){let r=k($(b(t))),l=[],n=[],i=[0,0],s=[],h=()=>{s.length>=4&&n.push(...Z(s,1)),s=[]},o=()=>{h(),n.length&&(l.push(n),n=[])};for(let{key:t,data:e}of r)switch(t){case"M":o(),i=[e[0],e[1]],n.push(i);break;case"L":h(),n.push([e[0],e[1]]);break;case"C":if(!s.length){let t=n.length?n[n.length-1]:i;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":h(),n.push([i[0],i[1]])}if(o(),!a)return l;let d=[];for(let t of l){let e=U(t,0,t.length,a);e.length&&d.push(e)}return d}(t,0,i?4-4*(a.simplification||1):(1+a.roughness)/2),h=P(t,a);if(l)if("solid"===a.fillStyle)if(1===s.length){let e=P(t,Object.assign(Object.assign({},a),{disableMultiStroke:!0,roughness:a.roughness?a.roughness+a.fillShapeRoughnessGain:0}));r.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else r.push(O(s,a));else r.push(B(s,a));return n&&(i?s.forEach(t=>{r.push(v(t,!1,a))}):r.push(h)),this._d("path",r,a)}opsToPath(t,e){let a="";for(let r of t.ops){let t="number"==typeof e&&e>=0?r.data.map(t=>+t.toFixed(e)):r.data;switch(r.op){case"move":a+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":a+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":a+=`L${t[0]} ${t[1]} `}}return a.trim()}toPaths(t){let e=t.sets||[],a=t.options||this.defaultOptions,r=[];for(let t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:a.stroke,strokeWidth:a.strokeWidth,fill:X};break;case"fillPath":e={d:this.opsToPath(t),stroke:X,strokeWidth:0,fill:a.fill||X};break;case"fillSketch":e=this.fillSketch(t,a)}e&&r.push(e)}return r}fillSketch(t,e){let a=e.fillWeight;return a<0&&(a=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||X,strokeWidth:a,fill:X}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class J{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new Q(e)}draw(t){let e=t.sets||[],a=t.options||this.getDefaultOptions(),r=this.ctx,l=t.options.fixedDecimalPlaceDigits;for(let n of e)switch(n.type){case"path":r.save(),r.strokeStyle="none"===a.stroke?"transparent":a.stroke,r.lineWidth=a.strokeWidth,a.strokeLineDash&&r.setLineDash(a.strokeLineDash),a.strokeLineDashOffset&&(r.lineDashOffset=a.strokeLineDashOffset),this._drawToContext(r,n,l),r.restore();break;case"fillPath":{r.save(),r.fillStyle=a.fill||"";let e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(r,n,l,e),r.restore();break}case"fillSketch":this.fillSketch(r,n,a)}}fillSketch(t,e,a){let r=a.fillWeight;r<0&&(r=a.strokeWidth/2),t.save(),a.fillLineDash&&t.setLineDash(a.fillLineDash),a.fillLineDashOffset&&(t.lineDashOffset=a.fillLineDashOffset),t.strokeStyle=a.fill||"",t.lineWidth=r,this._drawToContext(t,e,a.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,a,r="nonzero"){for(let r of(t.beginPath(),e.ops)){let e="number"==typeof a&&a>=0?r.data.map(t=>+t.toFixed(a)):r.data;switch(r.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(r):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,a,r,l){let n=this.gen.line(t,e,a,r,l);return this.draw(n),n}rectangle(t,e,a,r,l){let n=this.gen.rectangle(t,e,a,r,l);return this.draw(n),n}ellipse(t,e,a,r,l){let n=this.gen.ellipse(t,e,a,r,l);return this.draw(n),n}circle(t,e,a,r){let l=this.gen.circle(t,e,a,r);return this.draw(l),l}linearPath(t,e){let a=this.gen.linearPath(t,e);return this.draw(a),a}polygon(t,e){let a=this.gen.polygon(t,e);return this.draw(a),a}arc(t,e,a,r,l,n,i=!1,s){let h=this.gen.arc(t,e,a,r,l,n,i,s);return this.draw(h),h}curve(t,e){let a=this.gen.curve(t,e);return this.draw(a),a}path(t,e){let a=this.gen.path(t,e);return this.draw(a),a}}let Y="http://www.w3.org/2000/svg";class K{constructor(t,e){this.svg=t,this.gen=new Q(e)}draw(t){let e=t.sets||[],a=t.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,l=r.createElementNS(Y,"g"),n=t.options.fixedDecimalPlaceDigits;for(let i of e){let e=null;switch(i.type){case"path":(e=r.createElementNS(Y,"path")).setAttribute("d",this.opsToPath(i,n)),e.setAttribute("stroke",a.stroke),e.setAttribute("stroke-width",a.strokeWidth+""),e.setAttribute("fill","none"),a.strokeLineDash&&e.setAttribute("stroke-dasharray",a.strokeLineDash.join(" ").trim()),a.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${a.strokeLineDashOffset}`);break;case"fillPath":(e=r.createElementNS(Y,"path")).setAttribute("d",this.opsToPath(i,n)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",a.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(r,i,a)}e&&l.appendChild(e)}return l}fillSketch(t,e,a){let r=a.fillWeight;r<0&&(r=a.strokeWidth/2);let l=t.createElementNS(Y,"path");return l.setAttribute("d",this.opsToPath(e,a.fixedDecimalPlaceDigits)),l.setAttribute("stroke",a.fill||""),l.setAttribute("stroke-width",r+""),l.setAttribute("fill","none"),a.fillLineDash&&l.setAttribute("stroke-dasharray",a.fillLineDash.join(" ").trim()),a.fillLineDashOffset&&l.setAttribute("stroke-dashoffset",`${a.fillLineDashOffset}`),l}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,a,r,l){let n=this.gen.line(t,e,a,r,l);return this.draw(n)}rectangle(t,e,a,r,l){let n=this.gen.rectangle(t,e,a,r,l);return this.draw(n)}ellipse(t,e,a,r,l){let n=this.gen.ellipse(t,e,a,r,l);return this.draw(n)}circle(t,e,a,r){let l=this.gen.circle(t,e,a,r);return this.draw(l)}linearPath(t,e){let a=this.gen.linearPath(t,e);return this.draw(a)}polygon(t,e){let a=this.gen.polygon(t,e);return this.draw(a)}arc(t,e,a,r,l,n,i=!1,s){let h=this.gen.arc(t,e,a,r,l,n,i,s);return this.draw(h)}curve(t,e){let a=this.gen.curve(t,e);return this.draw(a)}path(t,e){let a=this.gen.path(t,e);return this.draw(a)}}var tt={canvas:(t,e)=>new J(t,e),svg:(t,e)=>new K(t,e),generator:t=>new Q(t),newSeed:()=>Q.newSeed()};t.s(["default",()=>tt],83272);var te=(0,i.__name)(async(t,e,a)=>{let h,o=e.useHtmlLabels||(0,n.evaluate)((0,n.getConfig2)()?.htmlLabels),d=t.insert("g").attr("class",a||"node default").attr("id",e.domId||e.id),c=d.insert("g").attr("class","label").attr("style",(0,l.handleUndefinedAttr)(e.labelStyle));h=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];let g=await (0,r.createText)(c,(0,n.sanitizeText)((0,l.decodeEntities)(h),(0,n.getConfig2)()),{useHtmlLabels:o,width:e.width||(0,n.getConfig2)().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img}),u=g.getBBox(),f=(e?.padding??0)/2;if(o){let t=g.children[0],e=(0,s.select)(g),a=t.getElementsByTagName("img");if(a){let t=""===h.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=(0,n.getConfig2)().fontSize?(0,n.getConfig2)().fontSize:window.getComputedStyle(document.body).fontSize,[a=n.defaultConfig_default.fontSize]=(0,l.parseFontSize)(t),r=5*a+"px";e.style.minWidth=r,e.style.maxWidth=r}else e.style.width="100%";a(e)}(0,i.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return o?c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):c.attr("transform","translate(0, "+-u.height/2+")"),e.centerLabel&&c.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),c.insert("rect",":first-child"),{shapeSvg:d,bbox:u,halfPadding:f,label:c}},"labelHelper"),ta=(0,i.__name)(async(t,e,a)=>{let i=a.useHtmlLabels||(0,n.evaluate)((0,n.getConfig2)()?.flowchart?.htmlLabels),h=t.insert("g").attr("class","label").attr("style",a.labelStyle||""),o=await (0,r.createText)(h,(0,n.sanitizeText)((0,l.decodeEntities)(e),(0,n.getConfig2)()),{useHtmlLabels:i,width:a.width||(0,n.getConfig2)()?.flowchart?.wrappingWidth,style:a.labelStyle,addSvgBackground:!!a.icon||!!a.img}),d=o.getBBox(),c=a.padding/2;if((0,n.evaluate)((0,n.getConfig2)()?.flowchart?.htmlLabels)){let t=o.children[0],e=(0,s.select)(o);d=t.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return i?h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):h.attr("transform","translate(0, "+-d.height/2+")"),a.centerLabel&&h.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:t,bbox:d,halfPadding:c,label:h}},"insertLabel"),tr=(0,i.__name)((t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height},"updateNodeBounds"),tl=(0,i.__name)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function tn(t){let e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function ti(t,e,a,r,l,n){let i=[],s=a-t,h=2*Math.PI/(s/n),o=e+(r-e)/2;for(let e=0;e<=50;e++){let a=t+e/50*s,r=o+l*Math.sin(h*(a-t));i.push({x:a,y:r})}return i}function ts(t,e,a,r,l,n){let i=[],s=l*Math.PI/180,h=(n*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*h,n=t+a*Math.cos(r),o=e+a*Math.sin(r);i.push({x:-n,y:-o})}return i}(0,i.__name)(tn,"createPathFromPoints"),(0,i.__name)(ti,"generateFullSineWavePoints"),(0,i.__name)(ts,"generateCirclePoints");var th=(0,i.__name)((t,e)=>{var a,r,l=t.x,n=t.y,i=e.x-l,s=e.y-n,h=t.width/2,o=t.height/2;return Math.abs(s)*h>Math.abs(i)*o?(s<0&&(o=-o),a=0===s?0:o*i/s,r=o):(i<0&&(h=-h),a=h,r=0===i?0:h*s/i),{x:l+a,y:n+r}},"intersectRect");function to(t,e){e&&t.attr("style",e)}async function td(t){let e=(0,s.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),a=e.append("xhtml:div"),r=(0,n.getConfig2)(),l=t.label;t.label&&(0,n.hasKatex)(t.label)&&(l=await (0,n.renderKatexSanitized)(t.label.replace(n.common_default.lineBreakRegex,"\n"),r));let i='<span class="'+(t.isNode?"nodeLabel":"edgeLabel")+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+l+"</span>";return a.html((0,n.sanitizeText)(i,r)),to(a,t.labelStyle),a.style("display","inline-block"),a.style("padding-right","1px"),a.style("white-space","nowrap"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}(0,i.__name)(to,"applyStyle"),(0,i.__name)(td,"addHtmlLabel");var tc=(0,i.__name)(async(t,e,a,r)=>{let s=t||"";if("object"==typeof s&&(s=s[0]),(0,n.evaluate)((0,n.getConfig2)().flowchart.htmlLabels)){s=s.replace(/\\n|\n/g,"<br />"),i.log.info("vertexText"+s);let t={isNode:r,label:(0,l.decodeEntities)(s).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:e?e.replace("fill:","color:"):e};return await td(t)}{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof s?s.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(s)?s:[]){let r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},"createLabel"),tg=(0,i.__name)((t,e,a,r,l)=>["M",t+l,e,"H",t+a-l,"A",l,l,"0 0 1",t+a,e+l,"V",e+r-l,"A",l,l,"0 0 1",t+a-l,e+r,"H",t+l,"A",l,l,"0 0 1",t,e+r-l,"V",e+l,"A",l,l,"0 0 1",t+l,e,"Z"].join(" "),"createRoundedRectPathD"),tu=(0,i.__name)(async(t,l)=>{let h;i.log.info("Creating subgraph rect for ",l.id,l);let o=(0,n.getConfig2)(),{themeVariables:d,handDrawnSeed:c}=o,{clusterBkg:g,clusterBorder:u}=d,{labelStyles:f,nodeStyles:p,borderStyles:y,backgroundStyles:m}=(0,a.styles2String)(l),x=t.insert("g").attr("class","cluster "+l.cssClasses).attr("id",l.id).attr("data-look",l.look),w=(0,n.evaluate)(o.flowchart.htmlLabels),b=x.insert("g").attr("class","cluster-label "),$=await (0,r.createText)(b,l.label,{style:l.labelStyle,useHtmlLabels:w,isNode:!0}),k=$.getBBox();if((0,n.evaluate)(o.flowchart.htmlLabels)){let t=$.children[0],e=(0,s.select)($);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}let M=l.width<=k.width+l.padding?k.width+l.padding:l.width;l.width<=k.width+l.padding?l.diff=(M-l.width)/2-l.padding:l.diff=-l.padding;let S=l.height,_=l.x-M/2,v=l.y-S/2;if(i.log.trace("Data ",l,JSON.stringify(l)),"handDrawn"===l.look){let t=tt.svg(x),e=(0,a.userNodeOverrides)(l,{roughness:.7,fill:g,stroke:u,fillWeight:3,seed:c}),r=t.path(tg(_,v,M,S,0),e);(h=x.insert(()=>(i.log.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),h.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(h=x.insert("rect",":first-child")).attr("style",p).attr("rx",l.rx).attr("ry",l.ry).attr("x",_).attr("y",v).attr("width",M).attr("height",S);let{subGraphTitleTopMargin:D}=(0,e.getSubGraphTitleMargins)(o);if(b.attr("transform",`translate(${l.x-k.width/2}, ${l.y-l.height/2+D})`),f){let t=b.select("span");t&&t.attr("style",f)}let C=h.node().getBBox();return l.offsetX=0,l.width=C.width,l.height=C.height,l.offsetY=k.height-l.padding/2,l.intersect=function(t){return th(l,t)},{cluster:x,labelBBox:k}},"rect"),tf=(0,i.__name)((t,e)=>{let a=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=a.insert("rect",":first-child"),l=0*e.padding,n=l/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-n).attr("y",e.y-e.height/2-n).attr("width",e.width+l).attr("height",e.height+l).attr("fill","none");let i=r.node().getBBox();return e.width=i.width,e.height=i.height,e.intersect=function(t){return th(e,t)},{cluster:a,labelBBox:{width:0,height:0}}},"noteGroup"),tp=(0,i.__name)(async(t,e)=>{let a,r=(0,n.getConfig2)(),{themeVariables:l,handDrawnSeed:i}=r,{altBackground:h,compositeBackground:o,compositeTitleBackground:d,nodeBorder:c}=l,g=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-id",e.id).attr("data-look",e.look),u=g.insert("g",":first-child"),f=g.insert("g").attr("class","cluster-label"),p=g.append("rect"),y=f.node().appendChild(await tc(e.label,e.labelStyle,void 0,!0)),m=y.getBBox();if((0,n.evaluate)(r.flowchart.htmlLabels)){let t=y.children[0],e=(0,s.select)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}let x=0*e.padding,w=(e.width<=m.width+e.padding?m.width+e.padding:e.width)+x;e.width<=m.width+e.padding?e.diff=(w-e.width)/2-e.padding:e.diff=-e.padding;let b=e.height+x,$=e.height+x-m.height-6,k=e.x-w/2,M=e.y-b/2;e.width=w;let S=e.y-e.height/2-x/2+m.height+2;if("handDrawn"===e.look){let t=e.cssClasses.includes("statediagram-cluster-alt"),r=tt.svg(g),l=e.rx||e.ry?r.path(tg(k,M,w,b,10),{roughness:.7,fill:d,fillStyle:"solid",stroke:c,seed:i}):r.rectangle(k,M,w,b,{seed:i});a=g.insert(()=>l,":first-child");let n=r.rectangle(k,S,w,$,{fill:t?h:o,fillStyle:t?"hachure":"solid",stroke:c,seed:i});a=g.insert(()=>l,":first-child"),p=g.insert(()=>n)}else(a=u.insert("rect",":first-child")).attr("class","outer").attr("x",k).attr("y",M).attr("width",w).attr("height",b).attr("data-look",e.look),p.attr("class","inner").attr("x",k).attr("y",S).attr("width",w).attr("height",$);return f.attr("transform",`translate(${e.x-m.width/2}, ${M+1-3*!(0,n.evaluate)(r.flowchart.htmlLabels)})`),e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=m.height-e.padding/2,e.labelBBox=m,e.intersect=function(t){return th(e,t)},{cluster:g,labelBBox:m}},"roundedWithTitle"),ty=(0,i.__name)(async(t,l)=>{let h;i.log.info("Creating subgraph rect for ",l.id,l);let o=(0,n.getConfig2)(),{themeVariables:d,handDrawnSeed:c}=o,{clusterBkg:g,clusterBorder:u}=d,{labelStyles:f,nodeStyles:p,borderStyles:y,backgroundStyles:m}=(0,a.styles2String)(l),x=t.insert("g").attr("class","cluster "+l.cssClasses).attr("id",l.id).attr("data-look",l.look),w=(0,n.evaluate)(o.flowchart.htmlLabels),b=x.insert("g").attr("class","cluster-label "),$=await (0,r.createText)(b,l.label,{style:l.labelStyle,useHtmlLabels:w,isNode:!0,width:l.width}),k=$.getBBox();if((0,n.evaluate)(o.flowchart.htmlLabels)){let t=$.children[0],e=(0,s.select)($);k=t.getBoundingClientRect(),e.attr("width",k.width),e.attr("height",k.height)}let M=l.width<=k.width+l.padding?k.width+l.padding:l.width;l.width<=k.width+l.padding?l.diff=(M-l.width)/2-l.padding:l.diff=-l.padding;let S=l.height,_=l.x-M/2,v=l.y-S/2;if(i.log.trace("Data ",l,JSON.stringify(l)),"handDrawn"===l.look){let t=tt.svg(x),e=(0,a.userNodeOverrides)(l,{roughness:.7,fill:g,stroke:u,fillWeight:4,seed:c}),r=t.path(tg(_,v,M,S,l.rx),e);(h=x.insert(()=>(i.log.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",y.join(";")),h.select("path").attr("style",m.join(";").replace("fill","stroke"))}else(h=x.insert("rect",":first-child")).attr("style",p).attr("rx",l.rx).attr("ry",l.ry).attr("x",_).attr("y",v).attr("width",M).attr("height",S);let{subGraphTitleTopMargin:D}=(0,e.getSubGraphTitleMargins)(o);if(b.attr("transform",`translate(${l.x-k.width/2}, ${l.y-l.height/2+D})`),f){let t=b.select("span");t&&t.attr("style",f)}let C=h.node().getBBox();return l.offsetX=0,l.width=C.width,l.height=C.height,l.offsetY=k.height-l.padding/2,l.intersect=function(t){return th(l,t)},{cluster:x,labelBBox:k}},"kanbanSection"),tm={rect:tu,squareRect:tu,roundedWithTitle:tp,noteGroup:tf,divider:(0,i.__name)((t,e)=>{let a,{themeVariables:r,handDrawnSeed:l}=(0,n.getConfig2)(),{nodeBorder:i}=r,s=t.insert("g").attr("class",e.cssClasses).attr("id",e.id).attr("data-look",e.look),h=s.insert("g",":first-child"),o=0*e.padding,d=e.width+o;e.diff=-e.padding;let c=e.height+o,g=e.x-d/2,u=e.y-c/2;if(e.width=d,"handDrawn"===e.look){let t=tt.svg(s).rectangle(g,u,d,c,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:i,seed:l});a=s.insert(()=>t,":first-child")}else(a=h.insert("rect",":first-child")).attr("class","divider").attr("x",g).attr("y",u).attr("width",d).attr("height",c).attr("data-look",e.look);return e.height=a.node().getBBox().height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return th(e,t)},{cluster:s,labelBBox:{}}},"divider"),kanbanSection:ty},tx=new Map,tw=(0,i.__name)(async(t,e)=>{let a=e.shape||"rect",r=await tm[a](t,e);return tx.set(e.id,r),r},"insertCluster"),tb=(0,i.__name)(()=>{tx=new Map},"clear");function t$(t,e,a,r){var l=t.x,n=t.y,i=l-r.x,s=n-r.y,h=Math.sqrt(e*e*s*s+a*a*i*i),o=Math.abs(e*a*i/h);r.x<l&&(o=-o);var d=Math.abs(e*a*s/h);return r.y<n&&(d=-d),{x:l+o,y:n+d}}function tk(t,e,a){return t$(t,e,e,a)}function tM(t,e,a,r){{let l=e.y-t.y,n=t.x-e.x,i=e.x*t.y-t.x*e.y,s=l*a.x+n*a.y+i,h=l*r.x+n*r.y+i;if(0!==s&&0!==h&&tS(s,h))return;let o=r.y-a.y,d=a.x-r.x,c=r.x*a.y-a.x*r.y,g=o*t.x+d*t.y+c,u=o*e.x+d*e.y+c;if(1e-6>Math.abs(g)&&1e-6>Math.abs(u)&&tS(g,u))return;let f=l*d-o*n;if(0===f)return;let p=Math.abs(f/2),y=n*c-d*i;return{x:y<0?(y-p)/f:(y+p)/f,y:(y=o*i-l*c)<0?(y-p)/f:(y+p)/f}}}function tS(t,e){return t*e>0}function t_(t,e,a){let r=t.x,l=t.y,n=[],i=1/0,s=1/0;"function"==typeof e.forEach?e.forEach(function(t){i=Math.min(i,t.x),s=Math.min(s,t.y)}):(i=Math.min(i,e.x),s=Math.min(s,e.y));let h=r-t.width/2-i,o=l-t.height/2-s;for(let r=0;r<e.length;r++){let l=e[r],i=e[r<e.length-1?r+1:0],s=tM(t,a,{x:h+l.x,y:o+l.y},{x:h+i.x,y:o+i.y});s&&n.push(s)}return n.length?(n.length>1&&n.sort(function(t,e){let r=t.x-a.x,l=t.y-a.y,n=Math.sqrt(r*r+l*l),i=e.x-a.x,s=e.y-a.y,h=Math.sqrt(i*i+s*s);return n<h?-1:+(n!==h)}),n[0]):t}(0,i.__name)(function(t,e){return t.intersect(e)},"intersectNode"),(0,i.__name)(t$,"intersectEllipse"),(0,i.__name)(tk,"intersectCircle"),(0,i.__name)(tM,"intersectLine"),(0,i.__name)(tS,"sameSign"),(0,i.__name)(t_,"intersectPolygon");function tv(t,e){let{labelStyles:r}=(0,a.styles2String)(e);e.labelStyle=r;let n=tl(e),s=n;n||(s="anchor");let h=t.insert("g").attr("class",s).attr("id",e.domId||e.id),{cssStyles:o}=e,d=tt.svg(h),c=(0,a.userNodeOverrides)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let g=d.circle(0,0,2,c),u=h.insert(()=>g,":first-child");return u.attr("class","anchor").attr("style",(0,l.handleUndefinedAttr)(o)),tr(e,u),e.intersect=function(t){return i.log.info("Circle intersect",e,1,t),tk(e,1,t)},h}function tD(t,e,a,r,l,n,i){let s=Math.atan2(r-e,a-t),h=Math.sqrt(((a-t)/2/l)**2+((r-e)/2/n)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*n*Math.sin(s)*(i?-1:1),c=(e+r)/2-o*l*Math.cos(s)*(i?-1:1),g=Math.atan2((e-c)/n,(t-d)/l),u=Math.atan2((r-c)/n,(a-d)/l)-g;i&&u<0&&(u+=2*Math.PI),!i&&u>0&&(u-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*u,a=d+l*Math.cos(e),r=c+n*Math.sin(e);f.push({x:a,y:r})}return f}async function tC(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=i.width+e.padding+20,h=i.height+e.padding,o=h/2,d=o/(2.5+h/50),{cssStyles:c}=e,g=[{x:s/2,y:-h/2},{x:-s/2,y:-h/2},...tD(-s/2,-h/2,-s/2,h/2,d,o,!1),{x:s/2,y:h/2},...tD(s/2,h/2,s/2,-h/2,d,o,!0)],u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=tn(g),y=u.path(p,f),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),m.attr("transform",`translate(${d/2}, 0)`),tr(e,m),e.intersect=function(t){return t_(e,g,t)},n}function tN(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}async function tA(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=s.height+e.padding,o=s.width+e.padding+12,d=-h,c=[{x:12,y:d},{x:o,y:d},{x:o,y:0},{x:0,y:0},{x:0,y:d+12},{x:12,y:d}],{cssStyles:g}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=tn(c),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-o/2}, ${h/2})`),g&&r.attr("style",g)}else r=tN(i,o,h,c);return n&&r.attr("style",n),tr(e,r),e.intersect=function(t){return t_(e,c,t)},i}function tP(t,e){let{nodeStyles:r}=(0,a.styles2String)(e);e.label="";let l=t.insert("g").attr("class",tl(e)).attr("id",e.domId??e.id),{cssStyles:n}=e,i=Math.max(28,e.width??0),s=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}],h=tt.svg(l),o=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let d=tn(s),c=h.path(d,o),g=l.insert(()=>c,":first-child");return n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),r&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return t_(e,s,t)},l}async function tO(t,e,r){let n,{labelStyles:s,nodeStyles:h}=(0,a.styles2String)(e);e.labelStyle=s;let{shapeSvg:o,bbox:d,halfPadding:c}=await te(t,e,tl(e)),g=r?.padding??c,u=d.width/2+g,{cssStyles:f}=e;if("handDrawn"===e.look){let t=tt.svg(o),r=(0,a.userNodeOverrides)(e,{}),i=t.circle(0,0,2*u,r);(n=o.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(f))}else n=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",h).attr("r",u).attr("cx",0).attr("cy",0);return tr(e,n),e.calcIntersect=function(t,e){let a=t.width/2;return tk(t,a,e)},e.intersect=function(t){return i.log.info("Circle intersect",e,u,t),tk(e,u,t)},o}function tB(t){let e=Math.cos(Math.PI/4),a=Math.sin(Math.PI/4),r=2*t,l={x:r/2*e,y:r/2*a},n={x:-(r/2)*e,y:r/2*a},i={x:-(r/2)*e,y:-(r/2)*a},s={x:r/2*e,y:-(r/2)*a};return`M ${n.x},${n.y} L ${s.x},${s.y}
|
|
2
|
+
M ${l.x},${l.y} L ${i.x},${i.y}`}function tL(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r,e.label="";let n=t.insert("g").attr("class",tl(e)).attr("id",e.domId??e.id),s=Math.max(30,e?.width??0),{cssStyles:h}=e,o=tt.svg(n),d=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let c=o.circle(0,0,2*s,d),g=tB(s),u=o.path(g,d),f=n.insert(()=>c,":first-child");return f.insert(()=>u),h&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",h),l&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",l),tr(e,f),e.intersect=function(t){return i.log.info("crossedCircle intersect",e,{radius:s,point:t}),tk(e,s,t)},n}function tT(t,e,a,r=100,l=0,n=180){let i=[],s=l*Math.PI/180,h=(n*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*h,n=t+a*Math.cos(r),o=e+a*Math.sin(r);i.push({x:-n,y:-o})}return i}async function tR(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=i.width+(e.padding??0),o=i.height+(e.padding??0),d=Math.max(5,.1*o),{cssStyles:c}=e,g=[...tT(h/2,-o/2,d,30,-90,0),{x:-h/2-d,y:d},...tT(h/2+2*d,-d,d,20,-180,-270),...tT(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-o/2},...tT(h/2,o/2,d,20,0,90)],u=[{x:h/2,y:-o/2-d},{x:-h/2,y:-o/2-d},...tT(h/2,-o/2,d,20,-90,0),{x:-h/2-d,y:-d},...tT(h/2+.1*h,-d,d,20,-180,-270),...tT(h/2+.1*h,d,d,20,-90,-180),{x:-h/2-d,y:o/2},...tT(h/2,o/2,d,20,0,90),{x:-h/2,y:o/2+d},{x:h/2,y:o/2+d}],f=tt.svg(n),p=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=tn(g).replace("Z",""),m=f.path(y,p),x=tn(u),w=f.path(x,{...p}),b=n.insert("g",":first-child");return b.insert(()=>w,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),b.attr("transform",`translate(${d}, 0)`),s.attr("transform",`translate(${-h/2+d-(i.x-(i.left??0))},${-o/2+(e.padding??0)/2-(i.y-(i.top??0))})`),tr(e,b),e.intersect=function(t){return t_(e,u,t)},n}function tI(t,e,a,r=100,l=0,n=180){let i=[],s=l*Math.PI/180,h=(n*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*h,n=t+a*Math.cos(r),o=e+a*Math.sin(r);i.push({x:n,y:o})}return i}async function tW(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=i.width+(e.padding??0),o=i.height+(e.padding??0),d=Math.max(5,.1*o),{cssStyles:c}=e,g=[...tI(h/2,-o/2,d,20,-90,0),{x:h/2+d,y:-d},...tI(h/2+2*d,-d,d,20,-180,-270),...tI(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:o/2},...tI(h/2,o/2,d,20,0,90)],u=[{x:-h/2,y:-o/2-d},{x:h/2,y:-o/2-d},...tI(h/2,-o/2,d,20,-90,0),{x:h/2+d,y:-d},...tI(h/2+2*d,-d,d,20,-180,-270),...tI(h/2+2*d,d,d,20,-90,-180),{x:h/2+d,y:o/2},...tI(h/2,o/2,d,20,0,90),{x:h/2,y:o/2+d},{x:-h/2,y:o/2+d}],f=tt.svg(n),p=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=tn(g).replace("Z",""),m=f.path(y,p),x=tn(u),w=f.path(x,{...p}),b=n.insert("g",":first-child");return b.insert(()=>w,":first-child").attr("stroke-opacity",0),b.insert(()=>m,":first-child"),b.attr("class","text"),c&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",c),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),b.attr("transform",`translate(${-d}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(i.x-(i.left??0))},${-o/2+(e.padding??0)/2-(i.y-(i.top??0))})`),tr(e,b),e.intersect=function(t){return t_(e,u,t)},n}function tE(t,e,a,r=100,l=0,n=180){let i=[],s=l*Math.PI/180,h=(n*Math.PI/180-s)/(r-1);for(let l=0;l<r;l++){let r=s+l*h,n=t+a*Math.cos(r),o=e+a*Math.sin(r);i.push({x:-n,y:-o})}return i}async function tz(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=i.width+(e.padding??0),o=i.height+(e.padding??0),d=Math.max(5,.1*o),{cssStyles:c}=e,g=[...tE(h/2,-o/2,d,30,-90,0),{x:-h/2-d,y:d},...tE(h/2+2*d,-d,d,20,-180,-270),...tE(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:-o/2},...tE(h/2,o/2,d,20,0,90)],u=[...tE(-h/2+d+d/2,-o/2,d,20,-90,-180),{x:h/2-d/2,y:d},...tE(-h/2-d/2,-d,d,20,0,90),...tE(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...tE(-h/2+d+d/2,o/2,d,30,-180,-270)],f=[{x:h/2,y:-o/2-d},{x:-h/2,y:-o/2-d},...tE(h/2,-o/2,d,20,-90,0),{x:-h/2-d,y:-d},...tE(h/2+2*d,-d,d,20,-180,-270),...tE(h/2+2*d,d,d,20,-90,-180),{x:-h/2-d,y:o/2},...tE(h/2,o/2,d,20,0,90),{x:-h/2,y:o/2+d},{x:h/2-d-d/2,y:o/2+d},...tE(-h/2+d+d/2,-o/2,d,20,-90,-180),{x:h/2-d/2,y:d},...tE(-h/2-d/2,-d,d,20,0,90),...tE(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...tE(-h/2+d+d/2,o/2,d,30,-180,-270)],p=tt.svg(n),y=(0,a.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=tn(g).replace("Z",""),x=p.path(m,y),w=tn(u).replace("Z",""),b=p.path(w,y),$=tn(f),k=p.path($,{...y}),M=n.insert("g",":first-child");return M.insert(()=>k,":first-child").attr("stroke-opacity",0),M.insert(()=>x,":first-child"),M.insert(()=>b,":first-child"),M.attr("class","text"),c&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",c),l&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",l),M.attr("transform",`translate(${d-d/4}, 0)`),s.attr("transform",`translate(${-h/2+(e.padding??0)/2-(i.x-(i.left??0))},${-o/2+(e.padding??0)/2-(i.y-(i.top??0))})`),tr(e,M),e.intersect=function(t){return t_(e,f,t)},n}async function tq(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=Math.max(80,(i.width+(e.padding??0)*2)*1.25,e?.width??0),h=Math.max(20,i.height+(e.padding??0)*2,e?.height??0),o=h/2,{cssStyles:d}=e,c=tt.svg(n),g=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let u=s-o,f=h/4,p=[{x:u,y:0},{x:f,y:0},{x:0,y:h/2},{x:f,y:h},{x:u,y:h},...ts(-u,-h/2,o,50,270,90)],y=tn(p),m=c.path(y,g),x=n.insert(()=>m,":first-child");return x.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",d),l&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",l),x.attr("transform",`translate(${-s/2}, ${-h/2})`),tr(e,x),e.intersect=function(t){return t_(e,p,t)},n}(0,i.__name)(tv,"anchor"),(0,i.__name)(tD,"generateArcPoints"),(0,i.__name)(tC,"bowTieRect"),(0,i.__name)(tN,"insertPolygonShape"),(0,i.__name)(tA,"card"),(0,i.__name)(tP,"choice"),(0,i.__name)(tO,"circle"),(0,i.__name)(tB,"createLine"),(0,i.__name)(tL,"crossedCircle"),(0,i.__name)(tT,"generateCirclePoints"),(0,i.__name)(tR,"curlyBraceLeft"),(0,i.__name)(tI,"generateCirclePoints"),(0,i.__name)(tW,"curlyBraceRight"),(0,i.__name)(tE,"generateCirclePoints"),(0,i.__name)(tz,"curlyBraces"),(0,i.__name)(tq,"curvedTrapezoid");var tH=(0,i.__name)((t,e,a,r,l,n)=>`M${t},${e+n} a${l},${n} 0,0,0 ${a},0 a${l},${n} 0,0,0 ${-a},0 l0,${r} a${l},${n} 0,0,0 ${a},0 l0,${-r}`,"createCylinderPathD"),tj=(0,i.__name)((t,e,a,r,l,n)=>`M${t},${e+n} M${t+a},${e+n} a${l},${n} 0,0,0 ${-a},0 l0,${r} a${l},${n} 0,0,0 ${a},0 l0,${-r}`,"createOuterCylinderPathD"),tF=(0,i.__name)((t,e,a,r,l,n)=>`M${t-a/2},${-r/2} a${l},${n} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function tG(t,e){let r,{labelStyles:n,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:s,bbox:h,label:o}=await te(t,e,tl(e)),d=Math.max(h.width+e.padding,e.width??0),c=d/2,g=c/(2.5+d/50),u=Math.max(h.height+g+e.padding,e.height??0),{cssStyles:f}=e;if("handDrawn"===e.look){let t=tt.svg(s),l=tj(0,0,d,u,c,g),n=tF(0,g,d,u,c,g),i=t.path(l,(0,a.userNodeOverrides)(e,{})),h=t.path(n,(0,a.userNodeOverrides)(e,{fill:"none"}));r=s.insert(()=>h,":first-child"),(r=s.insert(()=>i,":first-child")).attr("class","basic label-container"),f&&r.attr("style",f)}else{let t=tH(0,0,d,u,c,g);r=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(f)).attr("style",i)}return r.attr("label-offset-y",g),r.attr("transform",`translate(${-d/2}, ${-(u/2+g)})`),tr(e,r),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(e.padding??0)/1.5-(h.y-(h.top??0))})`),e.intersect=function(t){let a=th(e,t),r=a.x-(e.x??0);if(0!=c&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-g)){let l=g*g*(1-r*r/(c*c));l>0&&(l=Math.sqrt(l)),l=g-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},s}async function tV(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=i.width+e.padding,o=i.height+e.padding,d=.2*o,c=-h/2,g=-o/2-d/2,{cssStyles:u}=e,f=tt.svg(n),p=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=f.polygon([{x:c,y:g+d},{x:-c,y:g+d},{x:-c,y:-g},{x:c,y:-g},{x:c,y:g},{x:-c,y:g},{x:-c,y:g+d}].map(t=>[t.x,t.y]),p),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",u),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),s.attr("transform",`translate(${c+(e.padding??0)/2-(i.x-(i.left??0))}, ${g+d+(e.padding??0)/2-(i.y-(i.top??0))})`),tr(e,m),e.intersect=function(t){return th(e,t)},n}async function tU(t,e){let r,{labelStyles:n,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:h,bbox:o,halfPadding:d}=await te(t,e,tl(e)),c=o.width/2+d+5,g=o.width/2+d,{cssStyles:u}=e;if("handDrawn"===e.look){let t=tt.svg(h),n=(0,a.userNodeOverrides)(e,{roughness:.2,strokeWidth:2.5}),i=(0,a.userNodeOverrides)(e,{roughness:.2,strokeWidth:1.5}),s=t.circle(0,0,2*c,n),o=t.circle(0,0,2*g,i);(r=h.insert("g",":first-child")).attr("class",(0,l.handleUndefinedAttr)(e.cssClasses)).attr("style",(0,l.handleUndefinedAttr)(u)),r.node()?.appendChild(s),r.node()?.appendChild(o)}else{let t=(r=h.insert("g",":first-child")).insert("circle",":first-child"),e=r.insert("circle");r.attr("class","basic label-container").attr("style",s),t.attr("class","outer-circle").attr("style",s).attr("r",c).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",s).attr("r",g).attr("cx",0).attr("cy",0)}return tr(e,r),e.intersect=function(t){return i.log.info("DoubleCircle intersect",e,c,t),tk(e,c,t)},h}function tZ(t,e,{config:{themeVariables:r}}){let{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.label="",e.labelStyle=l;let s=t.insert("g").attr("class",tl(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=tt.svg(s),{nodeBorder:d}=r,c=(0,a.userNodeOverrides)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(c.roughness=0);let g=o.circle(0,0,14,c),u=s.insert(()=>g,":first-child");return u.selectAll("path").attr("style",`fill: ${d} !important;`),h&&h.length>0&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",n),tr(e,u),e.intersect=function(t){return i.log.info("filledCircle intersect",e,{radius:7,point:t}),tk(e,7,t)},s}async function tX(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:s,label:h}=await te(t,e,tl(e)),o=s.width+(e.padding??0),d=o+s.height,c=o+s.height,g=[{x:0,y:-d},{x:c,y:-d},{x:c/2,y:0}],{cssStyles:u}=e,f=tt.svg(n),p=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=tn(g),m=f.path(y,p),x=n.insert(()=>m,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`);return u&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",l),e.width=o,e.height=d,tr(e,x),h.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${-d/2+(e.padding??0)/2+(s.y-(s.top??0))})`),e.intersect=function(t){return i.log.info("Triangle intersect",e,g,t),t_(e,g,t)},n}function tQ(t,e,{dir:r,config:{state:l,themeVariables:n}}){let{nodeStyles:i}=(0,a.styles2String)(e);e.label="";let s=t.insert("g").attr("class",tl(e)).attr("id",e.domId??e.id),{cssStyles:h}=e,o=Math.max(70,e?.width??0),d=Math.max(10,e?.height??0);"LR"===r&&(o=Math.max(10,e?.width??0),d=Math.max(70,e?.height??0));let c=-1*o/2,g=-1*d/2,u=tt.svg(s),f=(0,a.userNodeOverrides)(e,{stroke:n.lineColor,fill:n.lineColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=u.rectangle(c,g,o,d,f),y=s.insert(()=>p,":first-child");h&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",h),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),tr(e,y);let m=l?.padding??0;return e.width&&e.height&&(e.width+=m/2||0,e.height+=m/2||0),e.intersect=function(t){return th(e,t)},s}async function tJ(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:s}=await te(t,e,tl(e)),h=Math.max(80,s.width+(e.padding??0)*2,e?.width??0),o=Math.max(50,s.height+(e.padding??0)*2,e?.height??0),d=o/2,{cssStyles:c}=e,g=tt.svg(n),u=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let f=[{x:-h/2,y:-o/2},{x:h/2-d,y:-o/2},...ts(-h/2+d,0,d,50,90,270),{x:h/2-d,y:o/2},{x:-h/2,y:o/2}],p=tn(f),y=g.path(p,u),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",c),l&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",l),tr(e,m),e.intersect=function(t){return i.log.info("Pill intersect",e,{radius:d,point:t}),t_(e,f,t)},n}async function tY(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=i.height+(e.padding??0),h=i.width+(e.padding??0)*2.5,{cssStyles:o}=e,d=tt.svg(n),c=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=h/2,u=g/6,f=s/2,p=(g+=u)-f/2,y=[{x:-p,y:-f},{x:0,y:-f},{x:p,y:-f},{x:g,y:0},{x:p,y:f},{x:0,y:f},{x:-p,y:f},{x:-g,y:0}],m=tn(y),x=d.path(m,c),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",l),e.width=h,e.height=s,tr(e,w),e.intersect=function(t){return t_(e,y,t)},n}async function tK(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.label="",e.labelStyle=r;let{shapeSvg:n}=await te(t,e,tl(e)),s=Math.max(30,e?.width??0),h=Math.max(30,e?.height??0),{cssStyles:o}=e,d=tt.svg(n),c=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=[{x:0,y:0},{x:s,y:0},{x:0,y:h},{x:s,y:h}],u=tn(g),f=d.path(u,c),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",l),p.attr("transform",`translate(${-s/2}, ${-h/2})`),tr(e,p),e.intersect=function(t){return i.log.info("Pill intersect",e,{points:g}),t_(e,g,t)},n}async function t0(t,e,{config:{themeVariables:l,flowchart:n}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let h=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(h,n?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await te(t,e,"icon-shape default"),g="t"===e.pos,{nodeBorder:u}=l,{stylesMap:f}=(0,a.compileStyles)(e),p=-h/2,y=-h/2,m=8*!!e.label,x=tt.svg(o),w=(0,a.userNodeOverrides)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");let b=x.rectangle(p,y,h,h,w),$=Math.max(h,d.width),k=h+d.height+m,M=x.rectangle(-$/2,-k/2,$,k,{...w,fill:"transparent",stroke:"none"}),S=o.insert(()=>b,":first-child"),_=o.insert(()=>M);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.getIconSVG)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,n=a.height,i=a.x,s=a.y;t.attr("transform",`translate(${-l/2-i},${g?d.height/2+m/2-n/2-s:-d.height/2-m/2-n/2-s})`),t.attr("style",`color: ${f.get("stroke")??u};`)}return c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${g?-k/2:k/2-d.height})`),S.attr("transform",`translate(0,${g?d.height/2+m/2:-d.height/2-m/2})`),tr(e,_),e.intersect=function(t){if(i.log.info("iconSquare intersect",e,t),!e.label)return th(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,n=[];return t_(e,n=g?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+m},{x:a+h/2,y:r-l/2+d.height+m},{x:a+h/2,y:r+l/2},{x:a-h/2,y:r+l/2},{x:a-h/2,y:r-l/2+d.height+m},{x:a-d.width/2,y:r-l/2+d.height+m}]:[{x:a-h/2,y:r-l/2},{x:a+h/2,y:r-l/2},{x:a+h/2,y:r-l/2+h},{x:a+d.width/2,y:r-l/2+h},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+h},{x:a-h/2,y:r-l/2+h}],t)},o}async function t2(t,e,{config:{themeVariables:l,flowchart:n}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let h=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(h,n?.wrappingWidth??0);let{shapeSvg:o,bbox:d,label:c}=await te(t,e,"icon-shape default"),g=8*!!e.label,u="t"===e.pos,{nodeBorder:f,mainBkg:p}=l,{stylesMap:y}=(0,a.compileStyles)(e),m=tt.svg(o),x=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),x.stroke=y.get("fill")??p;let w=o.append("g");e.icon&&w.html(`<g>${await (0,r.getIconSVG)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let b=w.node().getBBox(),$=b.width,k=b.height,M=b.x,S=b.y,_=Math.max($,k)*Math.SQRT2+40,v=m.circle(0,0,_,x),D=Math.max(_,d.width),C=_+d.height+g,N=m.rectangle(-D/2,-C/2,D,C,{...x,fill:"transparent",stroke:"none"}),A=o.insert(()=>v,":first-child"),P=o.insert(()=>N);return w.attr("transform",`translate(${-$/2-M},${u?d.height/2+g/2-k/2-S:-d.height/2-g/2-k/2-S})`),w.attr("style",`color: ${y.get("stroke")??f};`),c.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-C/2:C/2-d.height})`),A.attr("transform",`translate(0,${u?d.height/2+g/2:-d.height/2-g/2})`),tr(e,P),e.intersect=function(t){return i.log.info("iconSquare intersect",e,t),th(e,t)},o}async function t1(t,e,{config:{themeVariables:l,flowchart:n}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let h=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(h,n?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:g}=await te(t,e,"icon-shape default"),u="t"===e.pos,f=h+2*c,p=h+2*c,{nodeBorder:y,mainBkg:m}=l,{stylesMap:x}=(0,a.compileStyles)(e),w=8*!!e.label,b=tt.svg(o),$=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=x.get("fill")??m;let k=b.path(tg(-p/2,-f/2,p,f,5),$),M=Math.max(p,d.width),S=f+d.height+w,_=b.rectangle(-M/2,-S/2,M,S,{...$,fill:"transparent",stroke:"none"}),v=o.insert(()=>k,":first-child").attr("class","icon-shape2"),D=o.insert(()=>_);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.getIconSVG)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,n=a.height,i=a.x,s=a.y;t.attr("transform",`translate(${-l/2-i},${u?d.height/2+w/2-n/2-s:-d.height/2-w/2-n/2-s})`),t.attr("style",`color: ${x.get("stroke")??y};`)}return g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-S/2:S/2-d.height})`),v.attr("transform",`translate(0,${u?d.height/2+w/2:-d.height/2-w/2})`),tr(e,D),e.intersect=function(t){if(i.log.info("iconSquare intersect",e,t),!e.label)return th(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,n=[];return t_(e,n=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+w},{x:a+p/2,y:r-l/2+d.height+w},{x:a+p/2,y:r+l/2},{x:a-p/2,y:r+l/2},{x:a-p/2,y:r-l/2+d.height+w},{x:a-d.width/2,y:r-l/2+d.height+w}]:[{x:a-p/2,y:r-l/2},{x:a+p/2,y:r-l/2},{x:a+p/2,y:r-l/2+f},{x:a+d.width/2,y:r-l/2+f},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+f},{x:a-p/2,y:r-l/2+f}],t)},o}async function t5(t,e,{config:{themeVariables:l,flowchart:n}}){let{labelStyles:s}=(0,a.styles2String)(e);e.labelStyle=s;let h=Math.max(e.assetHeight??48,e.assetWidth??48);e.width=Math.max(h,n?.wrappingWidth??0);let{shapeSvg:o,bbox:d,halfPadding:c,label:g}=await te(t,e,"icon-shape default"),u="t"===e.pos,f=h+2*c,p=h+2*c,{nodeBorder:y,mainBkg:m}=l,{stylesMap:x}=(0,a.compileStyles)(e),w=8*!!e.label,b=tt.svg(o),$=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&($.roughness=0,$.fillStyle="solid"),$.stroke=x.get("fill")??m;let k=b.path(tg(-p/2,-f/2,p,f,.1),$),M=Math.max(p,d.width),S=f+d.height+w,_=b.rectangle(-M/2,-S/2,M,S,{...$,fill:"transparent",stroke:"none"}),v=o.insert(()=>k,":first-child"),D=o.insert(()=>_);if(e.icon){let t=o.append("g");t.html(`<g>${await (0,r.getIconSVG)(e.icon,{height:h,width:h,fallbackPrefix:""})}</g>`);let a=t.node().getBBox(),l=a.width,n=a.height,i=a.x,s=a.y;t.attr("transform",`translate(${-l/2-i},${u?d.height/2+w/2-n/2-s:-d.height/2-w/2-n/2-s})`),t.attr("style",`color: ${x.get("stroke")??y};`)}return g.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))},${u?-S/2:S/2-d.height})`),v.attr("transform",`translate(0,${u?d.height/2+w/2:-d.height/2-w/2})`),tr(e,D),e.intersect=function(t){if(i.log.info("iconSquare intersect",e,t),!e.label)return th(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,n=[];return t_(e,n=u?[{x:a-d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2},{x:a+d.width/2,y:r-l/2+d.height+w},{x:a+p/2,y:r-l/2+d.height+w},{x:a+p/2,y:r+l/2},{x:a-p/2,y:r+l/2},{x:a-p/2,y:r-l/2+d.height+w},{x:a-d.width/2,y:r-l/2+d.height+w}]:[{x:a-p/2,y:r-l/2},{x:a+p/2,y:r-l/2},{x:a+p/2,y:r-l/2+f},{x:a+d.width/2,y:r-l/2+f},{x:a+d.width/2/2,y:r+l/2},{x:a-d.width/2,y:r+l/2},{x:a-d.width/2,y:r-l/2+f},{x:a-p/2,y:r-l/2+f}],t)},o}async function t3(t,e,{config:{flowchart:r}}){let l=new Image;l.src=e?.img??"",await l.decode();let n=Number(l.naturalWidth.toString().replace("px","")),s=Number(l.naturalHeight.toString().replace("px",""));e.imageAspectRatio=n/s;let{labelStyles:h}=(0,a.styles2String)(e);e.labelStyle=h;let o=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;let d=Math.max(e.label?o??0:0,e?.assetWidth??n),c="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:d,g="on"===e.constraint?c/e.imageAspectRatio:e?.assetHeight??s;e.width=Math.max(c,o??0);let{shapeSvg:u,bbox:f,label:p}=await te(t,e,"image-shape default"),y="t"===e.pos,m=-c/2,x=8*!!e.label,w=tt.svg(u),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=w.rectangle(m,-g/2,c,g,b),k=Math.max(c,f.width),M=g+f.height+x,S=w.rectangle(-k/2,-M/2,k,M,{...b,fill:"none",stroke:"none"}),_=u.insert(()=>$,":first-child"),v=u.insert(()=>S);if(e.img){let t=u.append("image");t.attr("href",e.img),t.attr("width",c),t.attr("height",g),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-c/2},${y?M/2-g:-M/2})`)}return p.attr("transform",`translate(${-f.width/2-(f.x-(f.left??0))},${y?-g/2-f.height/2-x/2:g/2-f.height/2+x/2})`),_.attr("transform",`translate(0,${y?f.height/2+x/2:-f.height/2-x/2})`),tr(e,v),e.intersect=function(t){if(i.log.info("iconSquare intersect",e,t),!e.label)return th(e,t);let a=e.x??0,r=e.y??0,l=e.height??0,n=[];return t_(e,n=y?[{x:a-f.width/2,y:r-l/2},{x:a+f.width/2,y:r-l/2},{x:a+f.width/2,y:r-l/2+f.height+x},{x:a+c/2,y:r-l/2+f.height+x},{x:a+c/2,y:r+l/2},{x:a-c/2,y:r+l/2},{x:a-c/2,y:r-l/2+f.height+x},{x:a-f.width/2,y:r-l/2+f.height+x}]:[{x:a-c/2,y:r-l/2},{x:a+c/2,y:r-l/2},{x:a+c/2,y:r-l/2+g},{x:a+f.width/2,y:r-l/2+g},{x:a+f.width/2/2,y:r+l/2},{x:a-f.width/2,y:r+l/2},{x:a-f.width/2,y:r-l/2+g},{x:a-c/2,y:r-l/2+g}],t)},u}async function t8(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=Math.max(s.width+(e.padding??0)*2,e?.width??0),o=Math.max(s.height+(e.padding??0)*2,e?.height??0),d=[{x:0,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:-3*o/6,y:-o}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=tn(d),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),c&&r.attr("style",c)}else r=tN(i,h,o,d);return n&&r.attr("style",n),e.width=h,e.height=o,tr(e,r),e.intersect=function(t){return t_(e,d,t)},i}async function t4(t,e,r){let n,{labelStyles:i,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=i;let{shapeSvg:h,bbox:o}=await te(t,e,tl(e)),d=Math.max(o.width+2*r.labelPaddingX,e?.width||0),c=Math.max(o.height+2*r.labelPaddingY,e?.height||0),g=-d/2,u=-c/2,{rx:f,ry:p}=e,{cssStyles:y}=e;if(r?.rx&&r.ry&&(f=r.rx,p=r.ry),"handDrawn"===e.look){let t=tt.svg(h),r=(0,a.userNodeOverrides)(e,{}),i=f||p?t.path(tg(g,u,d,c,f||0),r):t.rectangle(g,u,d,c,r);(n=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(y))}else(n=h.insert("rect",":first-child")).attr("class","basic label-container").attr("style",s).attr("rx",(0,l.handleUndefinedAttr)(f)).attr("ry",(0,l.handleUndefinedAttr)(p)).attr("x",g).attr("y",u).attr("width",d).attr("height",c);return tr(e,n),e.calcIntersect=function(t,e){return th(t,e)},e.intersect=function(t){return th(e,t)},h}async function t9(t,e){let{shapeSvg:a,bbox:r,label:l}=await te(t,e,"label"),n=a.insert("rect",":first-child");return n.attr("width",.1).attr("height",.1),a.attr("class","label edgeLabel"),l.attr("transform",`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),tr(e,n),e.intersect=function(t){return th(e,t)},a}async function t6(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),d=[{x:0,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:-(3*o)/6,y:-o}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=tn(d),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),c&&r.attr("style",c)}else r=tN(i,h,o,d);return n&&r.attr("style",n),e.width=h,e.height=o,tr(e,r),e.intersect=function(t){return t_(e,d,t)},i}async function t7(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=Math.max(s.width+(e.padding??0),e?.width??0),o=Math.max(s.height+(e.padding??0),e?.height??0),d=[{x:-3*o/6,y:0},{x:h,y:0},{x:h+3*o/6,y:-o},{x:0,y:-o}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=tn(d),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),c&&r.attr("style",c)}else r=tN(i,h,o,d);return n&&r.attr("style",n),e.width=h,e.height=o,tr(e,r),e.intersect=function(t){return t_(e,d,t)},i}function et(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.label="",e.labelStyle=r;let n=t.insert("g").attr("class",tl(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=Math.max(35,e?.width??0),o=Math.max(35,e?.height??0),d=[{x:h,y:0},{x:0,y:o+3.5},{x:h-14,y:o+3.5},{x:0,y:2*o},{x:h,y:o-3.5},{x:14,y:o-3.5}],c=tt.svg(n),g=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let u=tn(d),f=c.path(u,g),p=n.insert(()=>f,":first-child");return s&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),p.attr("transform",`translate(-${h/2},${-o})`),tr(e,p),e.intersect=function(t){return i.log.info("lightningBolt intersect",e,t),t_(e,d,t)},n}(0,i.__name)(tG,"cylinder"),(0,i.__name)(tV,"dividedRectangle"),(0,i.__name)(tU,"doublecircle"),(0,i.__name)(tZ,"filledCircle"),(0,i.__name)(tX,"flippedTriangle"),(0,i.__name)(tQ,"forkJoin"),(0,i.__name)(tJ,"halfRoundedRectangle"),(0,i.__name)(tY,"hexagon"),(0,i.__name)(tK,"hourglass"),(0,i.__name)(t0,"icon"),(0,i.__name)(t2,"iconCircle"),(0,i.__name)(t1,"iconRounded"),(0,i.__name)(t5,"iconSquare"),(0,i.__name)(t3,"imageSquare"),(0,i.__name)(t8,"inv_trapezoid"),(0,i.__name)(t4,"drawRect"),(0,i.__name)(t9,"labelRect"),(0,i.__name)(t6,"lean_left"),(0,i.__name)(t7,"lean_right"),(0,i.__name)(et,"lightningBolt");var ee=(0,i.__name)((t,e,a,r,l,n,i)=>`M${t},${e+n} a${l},${n} 0,0,0 ${a},0 a${l},${n} 0,0,0 ${-a},0 l0,${r} a${l},${n} 0,0,0 ${a},0 l0,${-r} M${t},${e+n+i} a${l},${n} 0,0,0 ${a},0`,"createCylinderPathD"),ea=(0,i.__name)((t,e,a,r,l,n,i)=>`M${t},${e+n} M${t+a},${e+n} a${l},${n} 0,0,0 ${-a},0 l0,${r} a${l},${n} 0,0,0 ${a},0 l0,${-r} M${t},${e+n+i} a${l},${n} 0,0,0 ${a},0`,"createOuterCylinderPathD"),er=(0,i.__name)((t,e,a,r,l,n)=>`M${t-a/2},${-r/2} a${l},${n} 0,0,0 ${a},0`,"createInnerCylinderPathD");async function el(t,e){let r,{labelStyles:n,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:s,bbox:h,label:o}=await te(t,e,tl(e)),d=Math.max(h.width+(e.padding??0),e.width??0),c=d/2,g=c/(2.5+d/50),u=Math.max(h.height+g+(e.padding??0),e.height??0),f=.1*u,{cssStyles:p}=e;if("handDrawn"===e.look){let t=tt.svg(s),l=ea(0,0,d,u,c,g,f),n=er(0,g,d,u,c,g),i=(0,a.userNodeOverrides)(e,{}),h=t.path(l,i),o=t.path(n,i);s.insert(()=>o,":first-child").attr("class","line"),(r=s.insert(()=>h,":first-child")).attr("class","basic label-container"),p&&r.attr("style",p)}else{let t=ee(0,0,d,u,c,g,f);r=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(p)).attr("style",i)}return r.attr("label-offset-y",g),r.attr("transform",`translate(${-d/2}, ${-(u/2+g)})`),tr(e,r),o.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+g-(h.y-(h.top??0))})`),e.intersect=function(t){let a=th(e,t),r=a.x-(e.x??0);if(0!=c&&(Math.abs(r)<(e.width??0)/2||Math.abs(r)==(e.width??0)/2&&Math.abs(a.y-(e.y??0))>(e.height??0)/2-g)){let l=g*g*(1-r*r/(c*c));l>0&&(l=Math.sqrt(l)),l=g-l,t.y-(e.y??0)>0&&(l=-l),a.y+=l}return a},s}async function en(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=o/4,c=o+d,{cssStyles:g}=e,u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=[{x:-h/2-h/2*.1,y:-c/2},{x:-h/2-h/2*.1,y:c/2},...ti(-h/2-h/2*.1,c/2,h/2+h/2*.1,c/2,d,.8),{x:h/2+h/2*.1,y:-c/2},{x:-h/2-h/2*.1,y:-c/2},{x:-h/2,y:-c/2},{x:-h/2,y:c/2*1.1},{x:-h/2,y:-c/2}],y=u.polygon(p.map(t=>[t.x,t.y]),f),m=n.insert(()=>y,":first-child");return m.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",l),m.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)+h/2*.1/2-(i.x-(i.left??0))},${-o/2+(e.padding??0)-d/2-(i.y-(i.top??0))})`),tr(e,m),e.intersect=function(t){return t_(e,p,t)},n}async function ei(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=-h/2,c=-o/2,{cssStyles:g}=e,u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{}),p=[{x:d-5,y:c+5},{x:d-5,y:c+o+5},{x:d+h-5,y:c+o+5},{x:d+h-5,y:c+o},{x:d+h,y:c+o},{x:d+h,y:c+o-5},{x:d+h+5,y:c+o-5},{x:d+h+5,y:c-5},{x:d+5,y:c-5},{x:d+5,y:c},{x:d,y:c},{x:d,y:c+5}];"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=tn(p),m=u.path(y,f),x=tn([{x:d,y:c+5},{x:d+h-5,y:c+5},{x:d+h-5,y:c+o},{x:d+h,y:c+o},{x:d+h,y:c},{x:d,y:c}]),w=u.path(x,{...f,fill:"none"}),b=n.insert(()=>w,":first-child");return b.insert(()=>m,":first-child"),b.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(i.width/2)-5-(i.x-(i.left??0))}, ${-(i.height/2)+5-(i.y-(i.top??0))})`),tr(e,b),e.intersect=function(t){return t_(e,p,t)},n}async function es(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=o/4,c=o+d,g=-h/2,u=-c/2,{cssStyles:f}=e,p=ti(g-5,u+c+5,g+h-5,u+c+5,d,.8),y=p?.[p.length-1],m=[{x:g-5,y:u+5},{x:g-5,y:u+c+5},...p,{x:g+h-5,y:y.y-5},{x:g+h,y:y.y-5},{x:g+h,y:y.y-10},{x:g+h+5,y:y.y-10},{x:g+h+5,y:u-5},{x:g+5,y:u-5},{x:g+5,y:u},{x:g,y:u},{x:g,y:u+5}],x=[{x:g,y:u+5},{x:g+h-5,y:u+5},{x:g+h-5,y:y.y-5},{x:g+h,y:y.y-5},{x:g+h,y:u},{x:g,y:u}],w=tt.svg(n),b=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(b.roughness=0,b.fillStyle="solid");let $=tn(m),k=w.path($,b),M=tn(x),S=w.path(M,b),_=n.insert(()=>k,":first-child");return _.insert(()=>S),_.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",l),_.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-(i.width/2)-5-(i.x-(i.left??0))}, ${-(i.height/2)+5-d/2-(i.y-(i.top??0))})`),tr(e,_),e.intersect=function(t){return t_(e,m,t)},n}async function eh(t,e,{config:{themeVariables:r}}){let{labelStyles:l,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=l,e.useHtmlLabels||(0,n.getConfig)().flowchart?.htmlLabels!==!1||(e.centerLabel=!0);let{shapeSvg:s,bbox:h,label:o}=await te(t,e,tl(e)),d=Math.max(h.width+(e.padding??0)*2,e?.width??0),c=Math.max(h.height+(e.padding??0)*2,e?.height??0),{cssStyles:g}=e,u=tt.svg(s),f=(0,a.userNodeOverrides)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=u.rectangle(-d/2,-c/2,d,c,f),y=s.insert(()=>p,":first-child");return y.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",g),i&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",i),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),tr(e,y),e.intersect=function(t){return th(e,t)},s}(0,i.__name)(el,"linedCylinder"),(0,i.__name)(en,"linedWaveEdgedRect"),(0,i.__name)(ei,"multiRect"),(0,i.__name)(es,"multiWaveEdgedRectangle"),(0,i.__name)(eh,"note");var eo=(0,i.__name)((t,e,a)=>`M${t+a/2},${e} L${t+a},${e-a/2} L${t+a/2},${e-a} L${t},${e-a/2} Z`,"createDecisionBoxPathD");async function ed(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=s.width+e.padding+(s.height+e.padding),o=[{x:h/2,y:0},{x:h,y:-h/2},{x:h/2,y:-h},{x:0,y:-h/2}],{cssStyles:d}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=eo(0,0,h),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-h/2+.5}, ${h/2})`),d&&r.attr("style",d)}else(r=tN(i,h,h,o)).attr("transform",`translate(${-h/2+.5}, ${h/2})`);return n&&r.attr("style",n),tr(e,r),e.calcIntersect=function(t,e){let a=t.width,r=t_(t,[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],e);return{x:r.x-.5,y:r.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},i}async function ec(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0),e?.width??0),o=Math.max(i.height+(e.padding??0),e?.height??0),d=-h/2,c=-o/2,g=c/2,u=[{x:d+g,y:c},{x:d,y:0},{x:d+g,y:-c},{x:-d,y:-c},{x:-d,y:c}],{cssStyles:f}=e,p=tt.svg(n),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=tn(u),x=p.path(m,y),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",l),w.attr("transform",`translate(${-g/2},0)`),s.attr("transform",`translate(${-g/2-i.width/2-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),tr(e,w),e.intersect=function(t){return t_(e,u,t)},n}async function eg(t,e){let r,l,h,{labelStyles:o,nodeStyles:d}=(0,a.styles2String)(e);e.labelStyle=o,r=e.cssClasses?"node "+e.cssClasses:"node default";let c=t.insert("g").attr("class",r).attr("id",e.domId||e.id),g=c.insert("g"),u=c.insert("g").attr("class","label").attr("style",d),f=e.description,p=e.label,y=u.node().appendChild(await tc(p,e.labelStyle,!0,!0)),m={width:0,height:0};if((0,n.evaluate)((0,n.getConfig2)()?.flowchart?.htmlLabels)){let t=y.children[0],e=(0,s.select)(y);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}i.log.info("Text 2",f);let x=f||[],w=y.getBBox(),b=u.node().appendChild(await tc(x.join?x.join("<br/>"):x,e.labelStyle,!0,!0)),$=b.children[0],k=(0,s.select)(b);m=$.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height);let M=(e.padding||0)/2;(0,s.select)(b).attr("transform","translate( "+(m.width>w.width?0:(w.width-m.width)/2)+", "+(w.height+M+5)+")"),(0,s.select)(y).attr("transform","translate( "+(m.width<w.width?0:-(w.width-m.width)/2)+", 0)"),m=u.node().getBBox(),u.attr("transform","translate("+-m.width/2+", "+(-m.height/2-M+3)+")");let S=m.width+(e.padding||0),_=m.height+(e.padding||0),v=-m.width/2-M,D=-m.height/2-M;if("handDrawn"===e.look){let t=tt.svg(c),r=(0,a.userNodeOverrides)(e,{}),n=t.path(tg(v,D,S,_,e.rx||0),r),s=t.line(-m.width/2-M,-m.height/2-M+w.height+M,m.width/2+M,-m.height/2-M+w.height+M,r);h=c.insert(()=>(i.log.debug("Rough node insert CXC",n),s),":first-child"),l=c.insert(()=>(i.log.debug("Rough node insert CXC",n),n),":first-child")}else l=g.insert("rect",":first-child"),h=g.insert("line"),l.attr("class","outer title-state").attr("style",d).attr("x",-m.width/2-M).attr("y",-m.height/2-M).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),h.attr("class","divider").attr("x1",-m.width/2-M).attr("x2",m.width/2+M).attr("y1",-m.height/2-M+w.height+M).attr("y2",-m.height/2-M+w.height+M);return tr(e,l),e.intersect=function(t){return th(e,t)},c}function eu(t,e,a,r,l,n,i){let s=Math.atan2(r-e,a-t),h=Math.sqrt(((a-t)/2/l)**2+((r-e)/2/n)**2);if(h>1)throw Error("The given radii are too small to create an arc between the points.");let o=Math.sqrt(1-h**2),d=(t+a)/2+o*n*Math.sin(s)*(i?-1:1),c=(e+r)/2-o*l*Math.cos(s)*(i?-1:1),g=Math.atan2((e-c)/n,(t-d)/l),u=Math.atan2((r-c)/n,(a-d)/l)-g;i&&u<0&&(u+=2*Math.PI),!i&&u>0&&(u-=2*Math.PI);let f=[];for(let t=0;t<20;t++){let e=g+t/19*u,a=d+l*Math.cos(e),r=c+n*Math.sin(e);f.push({x:a,y:r})}return f}async function ef(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=e?.padding??0,h=e?.padding??0,o=(e?.width?e?.width:i.width)+2*s,d=(e?.height?e?.height:i.height)+2*h,c=e.radius||5,g=e.taper||5,{cssStyles:u}=e,f=tt.svg(n),p=(0,a.userNodeOverrides)(e,{});e.stroke&&(p.stroke=e.stroke),"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=[{x:-o/2+g,y:-d/2},{x:o/2-g,y:-d/2},...eu(o/2-g,-d/2,o/2,-d/2+g,c,c,!0),{x:o/2,y:-d/2+g},{x:o/2,y:d/2-g},...eu(o/2,d/2-g,o/2-g,d/2,c,c,!0),{x:o/2-g,y:d/2},{x:-o/2+g,y:d/2},...eu(-o/2+g,d/2,-o/2,d/2-g,c,c,!0),{x:-o/2,y:d/2-g},{x:-o/2,y:-d/2+g},...eu(-o/2,-d/2+g,-o/2+g,-d/2,c,c,!0)],m=tn(y),x=f.path(m,p),w=n.insert(()=>x,":first-child");return w.attr("class","basic label-container outer-path"),u&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",u),l&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",l),tr(e,w),e.intersect=function(t){return t_(e,y,t)},n}async function ep(t,e){let{labelStyles:r,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:i,bbox:s,label:h}=await te(t,e,tl(e)),o=e?.padding??0,d=Math.max(s.width+(e.padding??0)*2,e?.width??0),c=Math.max(s.height+(e.padding??0)*2,e?.height??0),g=-s.width/2-o,u=-s.height/2-o,{cssStyles:f}=e,p=tt.svg(i),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=p.polygon([{x:g,y:u},{x:g+d+8,y:u},{x:g+d+8,y:u+c},{x:g-8,y:u+c},{x:g-8,y:u},{x:g,y:u},{x:g,y:u+c}].map(t=>[t.x,t.y]),y),x=i.insert(()=>m,":first-child");return x.attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(f)),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),f&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),h.attr("transform",`translate(${-d/2+4+(e.padding??0)-(s.x-(s.left??0))},${-c/2+(e.padding??0)-(s.y-(s.top??0))})`),tr(e,x),e.intersect=function(t){return th(e,t)},i}async function ey(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=-h/2,c=-o/2,{cssStyles:g}=e,u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let p=[{x:d,y:c},{x:d,y:c+o},{x:d+h,y:c+o},{x:d+h,y:c-o/2}],y=tn(p),m=u.path(y,f),x=n.insert(()=>m,":first-child");return x.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",g),l&&"handDrawn"!==e.look&&x.selectChildren("path").attr("style",l),x.attr("transform",`translate(0, ${o/4})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(i.x-(i.left??0))}, ${-o/4+(e.padding??0)-(i.y-(i.top??0))})`),tr(e,x),e.intersect=function(t){return t_(e,p,t)},n}async function em(t,e){let a={rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??2*(e?.padding||0),labelPaddingY:+(e?.padding||0)};return t4(t,e,a)}async function ex(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=i.height+e.padding,h=i.width+s/4+e.padding,o=s/2,{cssStyles:d}=e,c=tt.svg(n),g=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let u=[{x:-h/2+o,y:-s/2},{x:h/2-o,y:-s/2},...ts(-h/2+o,0,o,50,90,270),{x:h/2-o,y:s/2},...ts(h/2-o,0,o,50,270,450)],f=tn(u),p=c.path(f,g),y=n.insert(()=>p,":first-child");return y.attr("class","basic label-container outer-path"),d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),l&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",l),tr(e,y),e.intersect=function(t){return t_(e,u,t)},n}async function ew(t,e){return t4(t,e,{rx:5,ry:5,classes:"flowchart-node"})}function eb(t,e,{config:{themeVariables:r}}){let{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{cssStyles:i}=e,{lineColor:s,stateBorder:h,nodeBorder:o}=r,d=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),c=tt.svg(d),g=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");let u=c.circle(0,0,14,{...g,stroke:s,strokeWidth:2}),f=h??o,p=c.circle(0,0,5,{...g,fill:f,stroke:f,strokeWidth:2,fillStyle:"solid"}),y=d.insert(()=>u,":first-child");return y.insert(()=>p),i&&y.selectAll("path").attr("style",i),n&&y.selectAll("path").attr("style",n),tr(e,y),e.intersect=function(t){return tk(e,7,t)},d}function e$(t,e,{config:{themeVariables:r}}){let l,{lineColor:n}=r,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);if("handDrawn"===e.look){let t=tt.svg(i).circle(0,0,14,(0,a.solidStateFill)(n));(l=i.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(l=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return tr(e,l),e.intersect=function(t){return tk(e,7,t)},i}async function ek(t,e){let{labelStyles:r,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=(e?.padding||0)/2,o=s.width+e.padding,d=s.height+e.padding,c=-s.width/2-h,g=-s.height/2-h,u=[{x:0,y:0},{x:o,y:0},{x:o,y:-d},{x:0,y:-d},{x:0,y:0},{x:-8,y:0},{x:o+8,y:0},{x:o+8,y:-d},{x:-8,y:-d},{x:-8,y:0}];if("handDrawn"===e.look){let t=tt.svg(i),r=(0,a.userNodeOverrides)(e,{}),n=t.rectangle(c-8,g,o+16,d,r),s=t.line(c,g,c,g+d,r),h=t.line(c+o,g,c+o,g+d,r);i.insert(()=>s,":first-child"),i.insert(()=>h,":first-child");let u=i.insert(()=>n,":first-child"),{cssStyles:f}=e;u.attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(f)),tr(e,u)}else{let t=tN(i,o,d,u);n&&t.attr("style",n),tr(e,t)}return e.intersect=function(t){return t_(e,u,t)},i}async function eM(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),h=Math.max(i.height+(e.padding??0)*2,e?.height??0),o=-s/2,d=-h/2,c=.2*h,{cssStyles:g}=e,u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{}),p=[{x:o-c/2,y:d},{x:o+s+c/2,y:d},{x:o+s+c/2,y:d+h},{x:o-c/2,y:d+h}];"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let y=tn(p),m=u.path(y,f),x=tn([{x:o+s-c/2,y:d+h},{x:o+s+c/2,y:d+h},{x:o+s+c/2,y:d+h-.2*h}]),w=u.path(x,{...f,fillStyle:"solid"}),b=n.insert(()=>w,":first-child");return b.insert(()=>m,":first-child"),b.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),tr(e,b),e.intersect=function(t){return t_(e,p,t)},n}async function eS(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=o/4,c=.2*h,g=.2*o,u=o+d,{cssStyles:f}=e,p=tt.svg(n),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-h/2-h/2*.1,y:u/2},...ti(-h/2-h/2*.1,u/2,h/2+h/2*.1,u/2,d,.8),{x:h/2+h/2*.1,y:-u/2},{x:-h/2-h/2*.1,y:-u/2}],x=-h/2+h/2*.1,w=-u/2-.4*g,b=[{x:x+h-c,y:(w+o)*1.4},{x:x+h,y:w+o-g},{x:x+h,y:(w+o)*.9},...ti(x+h,(w+o)*1.3,x+h-c,(w+o)*1.5,-(.03*o),.5)],$=tn(m),k=p.path($,y),M=tn(b),S=p.path(M,{...y,fillStyle:"solid"}),_=n.insert(()=>S,":first-child");return _.insert(()=>k,":first-child"),_.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&_.selectAll("path").attr("style",l),_.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(i.x-(i.left??0))},${-o/2+(e.padding??0)-d/2-(i.y-(i.top??0))})`),tr(e,_),e.intersect=function(t){return t_(e,m,t)},n}async function e_(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=Math.max(i.width+e.padding,e?.width||0),h=Math.max(i.height+e.padding,e?.height||0),o=n.insert("rect",":first-child");return o.attr("class","text").attr("style",l).attr("rx",0).attr("ry",0).attr("x",-s/2).attr("y",-h/2).attr("width",s).attr("height",h),tr(e,o),e.intersect=function(t){return th(e,t)},n}(0,i.__name)(ed,"question"),(0,i.__name)(ec,"rect_left_inv_arrow"),(0,i.__name)(eg,"rectWithTitle"),(0,i.__name)(eu,"generateArcPoints"),(0,i.__name)(ef,"roundedRect"),(0,i.__name)(ep,"shadedProcess"),(0,i.__name)(ey,"slopedRect"),(0,i.__name)(em,"squareRect"),(0,i.__name)(ex,"stadium"),(0,i.__name)(ew,"state"),(0,i.__name)(eb,"stateEnd"),(0,i.__name)(e$,"stateStart"),(0,i.__name)(ek,"subroutine"),(0,i.__name)(eM,"taggedRect"),(0,i.__name)(eS,"taggedWaveEdgedRectangle"),(0,i.__name)(e_,"text");var ev=(0,i.__name)((t,e,a,r,l,n)=>`M${t},${e}
|
|
3
|
+
a${l},${n} 0,0,1 0,${-r}
|
|
4
|
+
l${a},0
|
|
5
|
+
a${l},${n} 0,0,1 0,${r}
|
|
6
|
+
M${a},${-r}
|
|
7
|
+
a${l},${n} 0,0,0 0,${r}
|
|
8
|
+
l${-a},0`,"createCylinderPathD"),eD=(0,i.__name)((t,e,a,r,l,n)=>`M${t},${e} M${t+a},${e} a${l},${n} 0,0,0 0,${-r} l${-a},0 a${l},${n} 0,0,0 0,${r} l${a},0`,"createOuterCylinderPathD"),eC=(0,i.__name)((t,e,a,r,l,n)=>`M${t+a/2},${-r/2} a${l},${n} 0,0,0 0,${r}`,"createInnerCylinderPathD");async function eN(t,e){let r,{labelStyles:n,nodeStyles:i}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:s,bbox:h,label:o,halfPadding:d}=await te(t,e,tl(e)),c="neo"===e.look?2*d:d,g=h.height+c,u=g/2,f=u/(2.5+g/50),p=h.width+f+c,{cssStyles:y}=e;if("handDrawn"===e.look){let t=tt.svg(s),l=eD(0,0,p,g,f,u),n=eC(0,0,p,g,f,u),i=t.path(l,(0,a.userNodeOverrides)(e,{})),h=t.path(n,(0,a.userNodeOverrides)(e,{fill:"none"}));r=s.insert(()=>h,":first-child"),(r=s.insert(()=>i,":first-child")).attr("class","basic label-container"),y&&r.attr("style",y)}else{let t=ev(0,0,p,g,f,u);(r=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(y)).attr("style",i)).attr("class","basic label-container"),y&&r.selectAll("path").attr("style",y),i&&r.selectAll("path").attr("style",i)}return r.attr("label-offset-x",f),r.attr("transform",`translate(${-p/2}, ${g/2} )`),o.attr("transform",`translate(${-(h.width/2)-f-(h.x-(h.left??0))}, ${-(h.height/2)-(h.y-(h.top??0))})`),tr(e,r),e.intersect=function(t){let a=th(e,t),r=a.y-(e.y??0);if(0!=u&&(Math.abs(r)<(e.height??0)/2||Math.abs(r)==(e.height??0)/2&&Math.abs(a.x-(e.x??0))>(e.width??0)/2-f)){let l=f*f*(1-r*r/(u*u));0!=l&&(l=Math.sqrt(Math.abs(l))),l=f-l,t.x-(e.x??0)>0&&(l=-l),a.x+=l}return a},s}async function eA(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let{shapeSvg:i,bbox:s}=await te(t,e,tl(e)),h=s.width+e.padding,o=s.height+e.padding,d=[{x:-3*o/6,y:0},{x:h+3*o/6,y:0},{x:h,y:-o},{x:0,y:-o}],{cssStyles:c}=e;if("handDrawn"===e.look){let t=tt.svg(i),l=(0,a.userNodeOverrides)(e,{}),n=tn(d),s=t.path(n,l);r=i.insert(()=>s,":first-child").attr("transform",`translate(${-h/2}, ${o/2})`),c&&r.attr("style",c)}else r=tN(i,h,o,d);return n&&r.attr("style",n),e.width=h,e.height=o,tr(e,r),e.intersect=function(t){return t_(e,d,t)},i}async function eP(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=Math.max(60,i.width+(e.padding??0)*2,e?.width??0),h=Math.max(20,i.height+(e.padding??0)*2,e?.height??0),{cssStyles:o}=e,d=tt.svg(n),c=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");let g=[{x:-s/2*.8,y:-h/2},{x:s/2*.8,y:-h/2},{x:s/2,y:-h/2*.6},{x:s/2,y:h/2},{x:-s/2,y:h/2},{x:-s/2,y:-h/2*.6}],u=tn(g),f=d.path(u,c),p=n.insert(()=>f,":first-child");return p.attr("class","basic label-container"),o&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",o),l&&"handDrawn"!==e.look&&p.selectChildren("path").attr("style",l),tr(e,p),e.intersect=function(t){return t_(e,g,t)},n}async function eO(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:s,bbox:h,label:o}=await te(t,e,tl(e)),d=(0,n.evaluate)((0,n.getConfig2)().flowchart?.htmlLabels),c=h.width+(e.padding??0),g=c+h.height,u=c+h.height,f=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-g}],{cssStyles:p}=e,y=tt.svg(s),m=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=tn(f),w=y.path(x,m),b=s.insert(()=>w,":first-child").attr("transform",`translate(${-g/2}, ${g/2})`);return p&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",p),l&&"handDrawn"!==e.look&&b.selectChildren("path").attr("style",l),e.width=c,e.height=g,tr(e,b),o.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${g/2-(h.height+(e.padding??0)/(d?2:1)-(h.y-(h.top??0)))})`),e.intersect=function(t){return i.log.info("Triangle intersect",e,f,t),t_(e,f,t)},s}async function eB(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=o/8,c=o+d,{cssStyles:g}=e,u=70-h,f=u>0?u/2:0,p=tt.svg(n),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-h/2-f,y:c/2},...ti(-h/2-f,c/2,h/2+f,c/2,d,.8),{x:h/2+f,y:-c/2},{x:-h/2-f,y:-c/2}],x=tn(m),w=p.path(x,y),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),b.attr("transform",`translate(0,${-d/2})`),s.attr("transform",`translate(${-h/2+(e.padding??0)-(i.x-(i.left??0))},${-o/2+(e.padding??0)-d-(i.y-(i.top??0))})`),tr(e,b),e.intersect=function(t){return t_(e,m,t)},n}async function eL(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i}=await te(t,e,tl(e)),s=Math.max(i.width+(e.padding??0)*2,e?.width??0),h=Math.max(i.height+(e.padding??0)*2,e?.height??0),o=s/h,d=s,c=h;d>c*o?c=d/o:d=c*o,d=Math.max(d,100);let g=Math.min(.2*(c=Math.max(c,50)),c/4),u=c+2*g,{cssStyles:f}=e,p=tt.svg(n),y=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid");let m=[{x:-d/2,y:u/2},...ti(-d/2,u/2,d/2,u/2,g,1),{x:d/2,y:-u/2},...ti(d/2,-u/2,-d/2,-u/2,g,-1)],x=tn(m),w=p.path(x,y),b=n.insert(()=>w,":first-child");return b.attr("class","basic label-container"),f&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",f),l&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",l),tr(e,b),e.intersect=function(t){return t_(e,m,t)},n}async function eT(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,label:s}=await te(t,e,tl(e)),h=Math.max(i.width+(e.padding??0)*2,e?.width??0),o=Math.max(i.height+(e.padding??0)*2,e?.height??0),d=-h/2,c=-o/2,{cssStyles:g}=e,u=tt.svg(n),f=(0,a.userNodeOverrides)(e,{}),p=[{x:d-5,y:c-5},{x:d-5,y:c+o},{x:d+h,y:c+o},{x:d+h,y:c-5}],y=`M${d-5},${c-5} L${d+h},${c-5} L${d+h},${c+o} L${d-5},${c+o} L${d-5},${c-5}
|
|
9
|
+
M${d-5},${c} L${d+h},${c}
|
|
10
|
+
M${d},${c-5} L${d},${c+o}`;"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");let m=u.path(y,f),x=n.insert(()=>m,":first-child");return x.attr("transform","translate(2.5, 2.5)"),x.attr("class","basic label-container"),g&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",g),l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),s.attr("transform",`translate(${-(i.width/2)+2.5-(i.x-(i.left??0))}, ${-(i.height/2)+2.5-(i.y-(i.top??0))})`),tr(e,x),e.intersect=function(t){return t_(e,p,t)},n}async function eR(t,e){if(e.alias&&(e.label=e.alias),"handDrawn"===e.look){let{themeVariables:a}=(0,n.getConfig)(),{background:r}=a,l={...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none",`fill: ${r}`]};await eR(t,l)}let r=(0,n.getConfig)();e.useHtmlLabels=r.htmlLabels;let i=r.er?.diagramPadding??10,h=r.er?.entityPadding??6,{cssStyles:o}=e,{labelStyles:d,nodeStyles:c}=(0,a.styles2String)(e);if(0===e.attributes.length&&e.label){let a={rx:0,ry:0,labelPaddingX:i,labelPaddingY:1.5*i,classes:""};(0,l.calculateTextWidth)(e.label,r)+2*a.labelPaddingX<r.er.minEntityWidth&&(e.width=r.er.minEntityWidth);let s=await t4(t,e,a);if(!(0,n.evaluate)(r.htmlLabels)){let t=s.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return s}r.htmlLabels||(i*=1.25,h*=1.25);let g=tl(e);g||(g="node default");let u=t.insert("g").attr("class",g).attr("id",e.domId||e.id),f=await eI(u,e.label??"",r,0,0,["name"],d);f.height+=h;let p=0,y=[],m=[],x=0,w=0,b=0,$=0,k=!0,M=!0;for(let t of e.attributes){let e=await eI(u,t.type,r,0,p,["attribute-type"],d);x=Math.max(x,e.width+i);let a=await eI(u,t.name,r,0,p,["attribute-name"],d);w=Math.max(w,a.width+i);let l=await eI(u,t.keys.join(),r,0,p,["attribute-keys"],d);b=Math.max(b,l.width+i);let n=await eI(u,t.comment,r,0,p,["attribute-comment"],d);$=Math.max($,n.width+i);let s=Math.max(e.height,a.height,l.height,n.height)+h;m.push({yOffset:p,rowHeight:s}),p+=s}let S=4;b<=i&&(k=!1,b=0,S--),$<=i&&(M=!1,$=0,S--);let _=u.node().getBBox();if(f.width+2*i-(x+w+b+$)>0){let t=f.width+2*i-(x+w+b+$);x+=t/S,w+=t/S,b>0&&(b+=t/S),$>0&&($+=t/S)}let v=x+w+b+$,D=tt.svg(u),C=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");let N=0;m.length>0&&(N=m.reduce((t,e)=>t+(e?.rowHeight??0),0));let A=Math.max(_.width+2*i,e?.width||0,v),P=Math.max((N??0)+f.height,e?.height||0),O=-A/2,B=-P/2;u.selectAll("g:not(:first-child)").each((t,e,a)=>{let r=(0,s.select)(a[e]),l=r.attr("transform"),n=0,o=0;if(l){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(n=parseFloat(t[1]),o=parseFloat(t[2]),r.attr("class").includes("attribute-name")?n+=x:r.attr("class").includes("attribute-keys")?n+=x+w:r.attr("class").includes("attribute-comment")&&(n+=x+w+b))}r.attr("transform",`translate(${O+i/2+n}, ${o+B+f.height+h/2})`)}),u.select(".name").attr("transform","translate("+-f.width/2+", "+(B+h/2)+")");let L=D.rectangle(O,B,A,P,C),T=u.insert(()=>L,":first-child").attr("style",o.join("")),{themeVariables:R}=(0,n.getConfig)(),{rowEven:I,rowOdd:W,nodeBorder:E}=R;for(let[t,e]of(y.push(0),m.entries())){let a=(t+1)%2==0&&0!==e.yOffset,r=D.rectangle(O,f.height+B+e?.yOffset,A,e?.rowHeight,{...C,fill:a?I:W,stroke:E});u.insert(()=>r,"g.label").attr("style",o.join("")).attr("class",`row-rect-${a?"even":"odd"}`)}let z=D.line(O,f.height+B,A+O,f.height+B,C);for(let t of(u.insert(()=>z).attr("class","divider"),z=D.line(x+O,f.height+B,x+O,P+B,C),u.insert(()=>z).attr("class","divider"),k&&(z=D.line(x+w+O,f.height+B,x+w+O,P+B,C),u.insert(()=>z).attr("class","divider")),M&&(z=D.line(x+w+b+O,f.height+B,x+w+b+O,P+B,C),u.insert(()=>z).attr("class","divider")),y))z=D.line(O,f.height+B+t,A+O,f.height+B+t,C),u.insert(()=>z).attr("class","divider");if(tr(e,T),c&&"handDrawn"!==e.look){let t=c.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",c)}return e.intersect=function(t){return th(e,t)},u}async function eI(t,e,a,i=0,h=0,o=[],d=""){let c=t.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${h})`).attr("style",d);e!==(0,n.parseGenericTypes)(e)&&(e=(e=(0,n.parseGenericTypes)(e)).replaceAll("<","<").replaceAll(">",">"));let g=c.node().appendChild(await (0,r.createText)(c,e,{width:(0,l.calculateTextWidth)(e,a)+100,style:d,useHtmlLabels:a.htmlLabels},a));if(e.includes("<")||e.includes(">")){let t=g.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let u=g.getBBox();if((0,n.evaluate)(a.htmlLabels)){let t=g.children[0];t.style.textAlign="start";let e=(0,s.select)(g);u=t.getBoundingClientRect(),e.attr("width",u.width),e.attr("height",u.height)}return u}async function eW(t,e,a,r,l=a.class.padding??12){let n=3*!r,i=t.insert("g").attr("class",tl(e)).attr("id",e.domId||e.id),s=null,h=null,o=null,d=null,c=0,g=0,u=0;if(s=i.insert("g").attr("class","annotation-group text"),e.annotations.length>0){let t=e.annotations[0];await eE(s,{text:`\xab${t}\xbb`},0),c=s.node().getBBox().height}h=i.insert("g").attr("class","label-group text"),await eE(h,e,0,["font-weight: bolder"]);let f=h.node().getBBox();g=f.height,o=i.insert("g").attr("class","members-group text");let p=0;for(let t of e.members){let e=await eE(o,t,p,[t.parseClassifier()]);p+=e+n}(u=o.node().getBBox().height)<=0&&(u=l/2),d=i.insert("g").attr("class","methods-group text");let y=0;for(let t of e.methods){let e=await eE(d,t,y,[t.parseClassifier()]);y+=e+n}let m=i.node().getBBox();if(null!==s){let t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return h.attr("transform",`translate(${-f.width/2}, ${c})`),m=i.node().getBBox(),o.attr("transform",`translate(0, ${c+g+2*l})`),m=i.node().getBBox(),d.attr("transform",`translate(0, ${c+g+(u?u+4*l:2*l)})`),m=i.node().getBBox(),{shapeSvg:i,bbox:m}}async function eE(t,e,a,h=[]){let o,d=t.insert("g").attr("class","label").attr("style",h.join("; ")),c=(0,n.getConfig)(),g="useHtmlLabels"in e?e.useHtmlLabels:(0,n.evaluate)(c.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!g&&u.startsWith("\\")&&(u=u.substring(1)),(0,n.hasKatex)(u)&&(g=!0);let f=await (0,r.createText)(d,(0,n.sanitizeText2)((0,l.decodeEntities)(u)),{width:(0,l.calculateTextWidth)(u,c)+50,classes:"markdown-node-label",useHtmlLabels:g},c),p=1;if(g){let t=f.children[0],e=(0,s.select)(f);p=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(p+=t.innerHTML.split("<mrow>").length-1);let a=t.getElementsByTagName("img");if(a){let t=""===u.replace(/<img[^>]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt(c.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}(0,i.__name)(r,"setupImage"),setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}o=t.getBoundingClientRect(),e.attr("width",o.width),e.attr("height",o.height)}else{h.includes("font-weight: bolder")&&(0,s.select)(f).selectAll("tspan").attr("font-weight",""),p=f.children.length;let t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),o=f.getBBox()}return d.attr("transform","translate(0,"+(-o.height/(2*p)+a)+")"),o.height}async function ez(t,e){let r=(0,n.getConfig2)(),l=r.class.padding??12,i=e.useHtmlLabels??(0,n.evaluate)(r.htmlLabels)??!0;e.annotations=e.annotations??[],e.members=e.members??[],e.methods=e.methods??[];let{shapeSvg:h,bbox:o}=await eW(t,e,r,i,l),{labelStyles:d,nodeStyles:c}=(0,a.styles2String)(e);e.labelStyle=d,e.cssStyles=e.styles||"";let g=e.styles?.join(";")||c||"";e.cssStyles||(e.cssStyles=g.replaceAll("!important","").split(";"));let u=0===e.members.length&&0===e.methods.length&&!r.class?.hideEmptyMembersBox,f=tt.svg(h),p=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let y=o.width,m=o.height;0===e.members.length&&0===e.methods.length?m+=l:e.members.length>0&&0===e.methods.length&&(m+=2*l);let x=-y/2,w=-m/2,b=f.rectangle(x-l,w-l-(u?l:0===e.members.length&&0===e.methods.length?-l/2:0),y+2*l,m+2*l+(u?2*l:0===e.members.length&&0===e.methods.length?-l:0),p),$=h.insert(()=>b,":first-child");$.attr("class","basic label-container");let k=$.node().getBBox();h.selectAll(".text").each((t,a,r)=>{let n=(0,s.select)(r[a]),o=n.attr("transform"),d=0;if(o){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(d=parseFloat(t[2]))}let c=d+w+l-(u?l:0===e.members.length&&0===e.methods.length?-l/2:0);i||(c-=4);let g=x;(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group"))&&(g=-n.node()?.getBBox().width/2||0,h.selectAll("text").each(function(t,e,a){"middle"===window.getComputedStyle(a[e]).textAnchor&&(g=0)})),n.attr("transform",`translate(${g}, ${c})`)});let M=h.select(".annotation-group").node().getBBox().height-(u?l/2:0)||0,S=h.select(".label-group").node().getBBox().height-(u?l/2:0)||0,_=h.select(".members-group").node().getBBox().height-(u?l/2:0)||0;if(e.members.length>0||e.methods.length>0||u){let t=f.line(k.x,M+S+w+l,k.x+k.width,M+S+w+l,p);h.insert(()=>t).attr("class","divider").attr("style",g)}if(u||e.members.length>0||e.methods.length>0){let t=f.line(k.x,M+S+_+w+2*l+l,k.x+k.width,M+S+_+w+l+2*l,p);h.insert(()=>t).attr("class","divider").attr("style",g)}if("handDrawn"!==e.look&&h.selectAll("path").attr("style",g),$.select(":nth-child(2)").attr("style",g),h.selectAll(".divider").select("path").attr("style",g),e.labelStyle?h.selectAll("span").attr("style",e.labelStyle):h.selectAll("span").attr("style",g),!i){let t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(g);if(e){let t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}else if(d){let e=t.exec(d);if(e){let t=e[0].replace("color","fill");h.selectAll("tspan").attr("style",t)}}}return tr(e,$),e.intersect=function(t){return th(e,t)},h}async function eq(t,e){let r,{labelStyles:l,nodeStyles:n}=(0,a.styles2String)(e);e.labelStyle=l;let i="verifyMethod"in e,h=tl(e),o=t.insert("g").attr("class",h).attr("id",e.domId??e.id),d=r=i?await eH(o,`<<${e.type}>>`,0,e.labelStyle):await eH(o,"<<Element>>",0,e.labelStyle),c=await eH(o,e.name,d,e.labelStyle+"; font-weight: bold;");if(d+=c+20,i){let t=await eH(o,`${e.requirementId?`ID: ${e.requirementId}`:""}`,d,e.labelStyle);d+=t;let a=await eH(o,`${e.text?`Text: ${e.text}`:""}`,d,e.labelStyle);d+=a;let r=await eH(o,`${e.risk?`Risk: ${e.risk}`:""}`,d,e.labelStyle);d+=r,await eH(o,`${e.verifyMethod?`Verification: ${e.verifyMethod}`:""}`,d,e.labelStyle)}else{let t=await eH(o,`${e.type?`Type: ${e.type}`:""}`,d,e.labelStyle);d+=t,await eH(o,`${e.docRef?`Doc Ref: ${e.docRef}`:""}`,d,e.labelStyle)}let g=(o.node()?.getBBox().width??200)+20,u=(o.node()?.getBBox().height??200)+20,f=-g/2,p=-u/2,y=tt.svg(o),m=(0,a.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");let x=y.rectangle(f,p,g,u,m),w=o.insert(()=>x,":first-child");if(w.attr("class","basic label-container").attr("style",n),o.selectAll(".label").each((t,e,a)=>{let r=(0,s.select)(a[e]),l=r.attr("transform"),n=0,i=0;if(l){let t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(l);t&&(n=parseFloat(t[1]),i=parseFloat(t[2]))}let h=i-u/2,o=f+10;(0===e||1===e)&&(o=n),r.attr("transform",`translate(${o}, ${h+20})`)}),d>r+c+20){let t=y.line(f,p+r+c+20,f+g,p+r+c+20,m);o.insert(()=>t).attr("style",n)}return tr(e,w),e.intersect=function(t){return th(e,t)},o}async function eH(t,e,a,i=""){let h;if(""===e)return 0;let o=t.insert("g").attr("class","label").attr("style",i),d=(0,n.getConfig2)(),c=d.htmlLabels??!0,g=await (0,r.createText)(o,(0,n.sanitizeText2)((0,l.decodeEntities)(e)),{width:(0,l.calculateTextWidth)(e,d)+50,classes:"markdown-node-label",useHtmlLabels:c,style:i},d);if(c){let t=g.children[0],e=(0,s.select)(g);h=t.getBoundingClientRect(),e.attr("width",h.width),e.attr("height",h.height)}else{for(let t of g.children[0].children)t.textContent=t.textContent.replaceAll(">",">").replaceAll("<","<"),i&&t.setAttribute("style",i);h=g.getBBox(),h.height+=6}return o.attr("transform",`translate(${-h.width/2},${-h.height/2+a})`),h.height}(0,i.__name)(eN,"tiltedCylinder"),(0,i.__name)(eA,"trapezoid"),(0,i.__name)(eP,"trapezoidalPentagon"),(0,i.__name)(eO,"triangle"),(0,i.__name)(eB,"waveEdgedRectangle"),(0,i.__name)(eL,"waveRectangle"),(0,i.__name)(eT,"windowPane"),(0,i.__name)(eR,"erBox"),(0,i.__name)(eI,"addText"),(0,i.__name)(eW,"textHelper"),(0,i.__name)(eE,"addText"),(0,i.__name)(ez,"classBox"),(0,i.__name)(eq,"requirementBox"),(0,i.__name)(eH,"addText");var ej=(0,i.__name)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function eF(t,e,{config:r}){let l,n,i,s,{labelStyles:h,nodeStyles:o}=(0,a.styles2String)(e);e.labelStyle=h||"";let d=e.width;e.width=(e.width??200)-10;let{shapeSvg:c,bbox:g,label:u}=await te(t,e,tl(e)),f=e.padding||10,p="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(p=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),l=c.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",p).attr("target","_blank"));let y={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};l?{label:n,bbox:i}=await ta(l,"ticket"in e&&e.ticket||"",y):{label:n,bbox:i}=await ta(c,"ticket"in e&&e.ticket||"",y);let{label:m,bbox:x}=await ta(c,"assigned"in e&&e.assigned||"",y);e.width=d;let w=e?.width||0,b=Math.max(i.height,x.height)/2,$=Math.max(g.height+20,e?.height||0)+b,k=-w/2,M=-$/2;u.attr("transform","translate("+(f-w/2)+", "+(-b-g.height/2)+")"),n.attr("transform","translate("+(f-w/2)+", "+(-b+g.height/2)+")"),m.attr("transform","translate("+(f+w/2-x.width-20)+", "+(-b+g.height/2)+")");let{rx:S,ry:_}=e,{cssStyles:v}=e;if("handDrawn"===e.look){let t=tt.svg(c),r=(0,a.userNodeOverrides)(e,{}),l=S||_?t.path(tg(k,M,w,$,S||0),r):t.rectangle(k,M,w,$,r);(s=c.insert(()=>l,":first-child")).attr("class","basic label-container").attr("style",v||null)}else{(s=c.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",o).attr("rx",S??5).attr("ry",_??5).attr("x",k).attr("y",M).attr("width",w).attr("height",$);let t="priority"in e&&e.priority;if(t){let e=c.append("line"),a=k+2,r=M+Math.floor((S??0)/2),l=M+$-Math.floor((S??0)/2);e.attr("x1",a).attr("y1",r).attr("x2",a).attr("y2",l).attr("stroke-width","4").attr("stroke",ej(t))}}return tr(e,s),e.height=$,e.intersect=function(t){return th(e,t)},c}async function eG(t,e){let r,{labelStyles:n,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:h,bbox:o,halfPadding:d,label:c}=await te(t,e,tl(e)),g=o.width+10*d,u=o.height+8*d,f=.15*g,{cssStyles:p}=e,y=o.width+20,m=o.height+20,x=Math.max(g,y),w=Math.max(u,m);c.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let b=`M0 0
|
|
11
|
+
a${f},${f} 1 0,0 ${.25*x},${-1*w*.1}
|
|
12
|
+
a${f},${f} 1 0,0 ${.25*x},0
|
|
13
|
+
a${f},${f} 1 0,0 ${.25*x},0
|
|
14
|
+
a${f},${f} 1 0,0 ${.25*x},${.1*w}
|
|
15
|
+
|
|
16
|
+
a${f},${f} 1 0,0 ${.15*x},${.33*w}
|
|
17
|
+
a${.8*f},${.8*f} 1 0,0 0,${.34*w}
|
|
18
|
+
a${f},${f} 1 0,0 ${-1*x*.15},${.33*w}
|
|
19
|
+
|
|
20
|
+
a${f},${f} 1 0,0 ${-1*x*.25},${.15*w}
|
|
21
|
+
a${f},${f} 1 0,0 ${-1*x*.25},0
|
|
22
|
+
a${f},${f} 1 0,0 ${-1*x*.25},0
|
|
23
|
+
a${f},${f} 1 0,0 ${-1*x*.25},${-1*w*.15}
|
|
24
|
+
|
|
25
|
+
a${f},${f} 1 0,0 ${-1*x*.1},${-1*w*.33}
|
|
26
|
+
a${.8*f},${.8*f} 1 0,0 0,${-1*w*.34}
|
|
27
|
+
a${f},${f} 1 0,0 ${.1*x},${-1*w*.33}
|
|
28
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=tt.svg(h),n=(0,a.userNodeOverrides)(e,{}),i=t.path(b,n);(r=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(p))}else r=h.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",b);return r.attr("transform",`translate(${-x/2}, ${-w/2})`),tr(e,r),e.calcIntersect=function(t,e){return th(t,e)},e.intersect=function(t){return i.log.info("Bang intersect",e,t),th(e,t)},h}async function eV(t,e){let r,{labelStyles:n,nodeStyles:s}=(0,a.styles2String)(e);e.labelStyle=n;let{shapeSvg:h,bbox:o,halfPadding:d,label:c}=await te(t,e,tl(e)),g=o.width+2*d,u=o.height+2*d,f=.15*g,p=.25*g,y=.35*g,m=.2*g,{cssStyles:x}=e,w=`M0 0
|
|
29
|
+
a${f},${f} 0 0,1 ${.25*g},${-1*g*.1}
|
|
30
|
+
a${y},${y} 1 0,1 ${.4*g},${-1*g*.1}
|
|
31
|
+
a${p},${p} 1 0,1 ${.35*g},${.2*g}
|
|
32
|
+
|
|
33
|
+
a${f},${f} 1 0,1 ${.15*g},${.35*u}
|
|
34
|
+
a${m},${m} 1 0,1 ${-1*g*.15},${.65*u}
|
|
35
|
+
|
|
36
|
+
a${p},${f} 1 0,1 ${-1*g*.25},${.15*g}
|
|
37
|
+
a${y},${y} 1 0,1 ${-1*g*.5},0
|
|
38
|
+
a${f},${f} 1 0,1 ${-1*g*.25},${-1*g*.15}
|
|
39
|
+
|
|
40
|
+
a${f},${f} 1 0,1 ${-1*g*.1},${-1*u*.35}
|
|
41
|
+
a${m},${m} 1 0,1 ${.1*g},${-1*u*.65}
|
|
42
|
+
H0 V0 Z`;if("handDrawn"===e.look){let t=tt.svg(h),n=(0,a.userNodeOverrides)(e,{}),i=t.path(w,n);(r=h.insert(()=>i,":first-child")).attr("class","basic label-container").attr("style",(0,l.handleUndefinedAttr)(x))}else r=h.insert("path",":first-child").attr("class","basic label-container").attr("style",s).attr("d",w);return c.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),r.attr("transform",`translate(${-g/2}, ${-u/2})`),tr(e,r),e.calcIntersect=function(t,e){return th(t,e)},e.intersect=function(t){return i.log.info("Cloud intersect",e,t),th(e,t)},h}async function eU(t,e){let{labelStyles:r,nodeStyles:l}=(0,a.styles2String)(e);e.labelStyle=r;let{shapeSvg:n,bbox:i,halfPadding:s,label:h}=await te(t,e,tl(e)),o=i.width+8*s,d=i.height+2*s,c=`
|
|
43
|
+
M${-o/2} ${d/2-5}
|
|
44
|
+
v${-d+10}
|
|
45
|
+
q0,-5 5,-5
|
|
46
|
+
h${o-10}
|
|
47
|
+
q5,0 5,5
|
|
48
|
+
v${d-10}
|
|
49
|
+
q0,5 -5,5
|
|
50
|
+
h${-o+10}
|
|
51
|
+
q-5,0 -5,-5
|
|
52
|
+
Z
|
|
53
|
+
`,g=n.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("style",l).attr("d",c);return n.append("line").attr("class","node-line-").attr("x1",-o/2).attr("y1",d/2).attr("x2",o/2).attr("y2",d/2),h.attr("transform",`translate(${-i.width/2}, ${-i.height/2})`),n.append(()=>h.node()),tr(e,g),e.calcIntersect=function(t,e){return th(t,e)},e.intersect=function(t){return th(e,t)},n}async function eZ(t,e){let a={padding:e.padding??0};return tO(t,e,a)}(0,i.__name)(eF,"kanbanItem"),(0,i.__name)(eG,"bang"),(0,i.__name)(eV,"cloud"),(0,i.__name)(eU,"defaultMindmapNode"),(0,i.__name)(eZ,"mindmapCircle");var eX=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:em},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:ef},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ex},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:ek},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:tG},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tO},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:eG},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:eV},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:ed},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:tY},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:t7},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:t6},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:eA},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:t8},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:tU},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:e_},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:tA},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:ep},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:e$},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:eb},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:tQ},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:tK},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:tR},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:tW},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:tz},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:et},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:eB},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:tJ},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:eN},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:el},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tq},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:tV},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:eO},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:eT},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:tZ},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eP},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:tX},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ey},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:es},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:ei},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tC},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:tL},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:eS},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:eM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:eL},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:ec},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:en}],eQ=(0,i.__name)(()=>Object.fromEntries([...Object.entries({state:ew,choice:tP,note:eh,rectWithTitle:eg,labelRect:t9,iconSquare:t5,iconCircle:t2,icon:t0,iconRounded:t1,imageSquare:t3,anchor:tv,kanbanItem:eF,mindmapCircle:eZ,defaultMindmapNode:eU,classBox:ez,erBox:eR,requirementBox:eq}),...eX.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))]),"generateShapeMap")();function eJ(t){return t in eQ}(0,i.__name)(eJ,"isValidShape");var eY=new Map;async function eK(t,e,a){let r,l;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");let n=e.shape?eQ[e.shape]:void 0;if(!n)throw Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===a.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),l=await n(r,e,a)}else r=l=await n(t,e,a);return e.tooltip&&l.attr("title",e.tooltip),eY.set(e.id,r),e.haveCallback&&r.attr("class",r.attr("class")+" clickable"),r}(0,i.__name)(eK,"insertNode");var e0=(0,i.__name)((t,e)=>{eY.set(e.id,t)},"setNodeElem"),e2=(0,i.__name)(()=>{eY.clear()},"clear"),e1=(0,i.__name)(t=>{let e=eY.get(t.id);i.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},"positionNode");t.s(["clear",()=>tb,"clear2",()=>e2,"createLabel_default",()=>tc,"insertCluster",()=>tw,"insertNode",()=>eK,"isValidShape",()=>eJ,"labelHelper",()=>te,"positionNode",()=>e1,"setNodeElem",()=>e0,"updateNodeBounds",()=>tr],7983)}]);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,89066,e=>{"use strict";var t=e.i(42038);e.s(["default",0,function(e){return(0,t.default)(e,4)}])},72247,e=>{"use strict";var t=(0,e.i(71206).__name)(()=>`
|
|
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");e.s(["getIconStyles",()=>t])},69696,e=>{"use strict";var t=e.i(95727),s=e.i(26290);e.s(["channel",0,(e,i)=>t.default.lang.round(s.default.parse(e)[i])],69696)},66661,87652,78662,4642,e=>{"use strict";var t=e.i(49132);e.s(["constant",()=>t.default],87652);var t=t,s=e.i(21017),i=e.i(37050),r=e.i(12319),n=e.i(15308),h=e.i(84891);e.s(["each",()=>h.default],78662);var h=h,o=e.i(95007),d=e.i(61196),a=e.i(90104),u=e.i(81597),l=e.i(13431),c=(0,a.default)(function(e){return(0,u.default)((0,d.default)(e,1,l.default,!0))}),_=e.i(26841),f=e.i(81047);class p{constructor(e={}){this._isDirected=!Object.prototype.hasOwnProperty.call(e,"directed")||e.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(e,"multigraph")&&e.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=t.default(void 0),this._defaultEdgeLabelFn=t.default(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return s.isFunction(e)||(e=t.default(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return i.keys(this._nodes)}sources(){var e=this;return r.filter(this.nodes(),function(t){return n.isEmpty(e._in[t])})}sinks(){var e=this;return r.filter(this.nodes(),function(t){return n.isEmpty(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return h.default(e,function(e){s.length>1?i.setNode(e,t):i.setNode(e)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?arguments.length>1&&(this._nodes[e]=t):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]="\0",this._children[e]={},this._children["\0"][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount),this}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=e=>this.removeEdge(this._edgeObjs[e]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],h.default(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),h.default(i.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],h.default(i.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw Error("Cannot set parent in a non-compound graph");if(o.isUndefined(t))t="\0";else{t+="";for(var s=t;!o.isUndefined(s);s=this.parent(s))if(s===e)throw Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if("\0"!==t)return t}}children(e){if(o.isUndefined(e)&&(e="\0"),this._isCompound){var t=this._children[e];if(t)return i.keys(t)}else if("\0"===e)return this.nodes();else if(this.hasNode(e))return[]}predecessors(e){var t=this._preds[e];if(t)return i.keys(t)}successors(e){var t=this._sucs[e];if(t)return i.keys(t)}neighbors(e){var t=this.predecessors(e);if(t)return c(t,this.successors(e))}isLeaf(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;h.default(this._nodes,function(s,i){e(i)&&t.setNode(i,s)}),h.default(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,s.edge(e))});var i={};return this._isCompound&&h.default(t.nodes(),function(e){t.setParent(e,function e(r){var n=s.parent(r);return void 0===n||t.hasNode(n)?(i[r]=n,n):n in i?i[n]:e(n)}(e))}),t}setDefaultEdgeLabel(e){return s.isFunction(e)||(e=t.default(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return _.values(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return f.reduce(e,function(e,r){return i.length>1?s.setEdge(e,r,t):s.setEdge(e,r),r}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];"object"==typeof n&&null!==n&&"v"in n?(e=n.v,t=n.w,s=n.name,2==arguments.length&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,o.isUndefined(s)||(s=""+s);var h=b(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!o.isUndefined(s)&&!this._isMultigraph)throw Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var d=function(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}var o={v:r,w:n};return i&&(o.name=i),o}(this._isDirected,e,t,s);return e=d.v,t=d.w,Object.freeze(d),this._edgeObjs[h]=d,g(this._preds[t],e),g(this._sucs[e],t),this._in[t][h]=d,this._out[e][h]=d,this._edgeCount++,this}edge(e,t,s){var i=1==arguments.length?m(this._isDirected,arguments[0]):b(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=1==arguments.length?m(this._isDirected,arguments[0]):b(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=1==arguments.length?m(this._isDirected,arguments[0]):b(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],v(this._preds[t],e),v(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=_.values(s);return t?r.filter(i,function(e){return e.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=_.values(s);return t?r.filter(i,function(e){return e.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}function g(e,t){e[t]?e[t]++:e[t]=1}function v(e,t){--e[t]||delete e[t]}function b(e,t,s,i){var r=""+t,n=""+s;if(!e&&r>n){var h=r;r=n,n=h}return r+"\x01"+n+"\x01"+(o.isUndefined(i)?"\0":i)}function m(e,t){return b(e,t.v,t.w,t.name)}p.prototype._nodeCount=0,p.prototype._edgeCount=0,e.s(["Graph",()=>p],4642),e.s([],66661)}]);
|