@reqvire-org/reqvire 1.3.2 → 1.4.0
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/artifacts/reqvire-darwin-arm64.tar.gz +0 -0
- package/artifacts/reqvire-darwin-x86_64.tar.gz +0 -0
- package/artifacts/reqvire-linux-x86_64.tar.gz +0 -0
- package/explorer-dist/assets/brand/README.md +28 -0
- package/explorer-dist/assets/explorer-KnowledgeGraphCanvasImpl.js +1 -0
- package/explorer-dist/assets/{explorer-abnfDiagram-VCTEODGH.js → explorer-abnfDiagram-WEYOIA3C.js} +1 -1
- package/explorer-dist/assets/explorer-actionscript-3.js +1 -1
- package/explorer-dist/assets/explorer-ada.js +1 -1
- package/explorer-dist/assets/explorer-ahk.js +1 -0
- package/explorer-dist/assets/explorer-ahk2.js +1 -0
- package/explorer-dist/assets/explorer-apex.js +1 -1
- package/explorer-dist/assets/explorer-architectureDiagram-ZHVYKT53.js +36 -0
- package/explorer-dist/assets/explorer-asciidoc.js +1 -1
- package/explorer-dist/assets/explorer-bat.js +1 -1
- package/explorer-dist/assets/explorer-beancount.js +1 -1
- package/explorer-dist/assets/explorer-bird2.js +1 -1
- package/explorer-dist/assets/explorer-blockDiagram-RJAE7QA3.js +140 -0
- package/explorer-dist/assets/explorer-bsl.js +1 -1
- package/explorer-dist/assets/explorer-c3.js +1 -1
- package/explorer-dist/assets/explorer-c4Diagram-XDPPPE54.js +38 -0
- package/explorer-dist/assets/explorer-catppuccin-frappe.js +1 -1
- package/explorer-dist/assets/explorer-catppuccin-latte.js +1 -1
- package/explorer-dist/assets/explorer-catppuccin-macchiato.js +1 -1
- package/explorer-dist/assets/explorer-catppuccin-mocha.js +1 -1
- package/explorer-dist/assets/explorer-chapel.js +1 -0
- package/explorer-dist/assets/{explorer-chunk-SVP7TREG.js → explorer-chunk-2E7WHVMD.js} +4 -4
- package/explorer-dist/assets/explorer-chunk-4EMNKR2T.js +1 -0
- package/explorer-dist/assets/explorer-chunk-55XCU76K.js +1 -0
- package/explorer-dist/assets/explorer-chunk-ZCHMQSOR.js +2 -0
- package/explorer-dist/assets/explorer-clarity.js +1 -1
- package/explorer-dist/assets/explorer-classDiagram-v2-4MYWR3UA.js +217 -0
- package/explorer-dist/assets/explorer-coq.js +1 -1
- package/explorer-dist/assets/explorer-cose-bilkent-JH36ORCC.js +1 -1
- package/explorer-dist/assets/explorer-cpp.js +1 -1
- package/explorer-dist/assets/explorer-csharp.js +1 -1
- package/explorer-dist/assets/explorer-css.js +1 -1
- package/explorer-dist/assets/explorer-cynefin-EF2NZ3EQ.js +141 -0
- package/explorer-dist/assets/{explorer-cynefinDiagram-5FMLGOSQ.js → explorer-cynefinDiagram-WF24UDRP.js} +2 -2
- package/explorer-dist/assets/explorer-cytoscape.esm.js +23 -23
- package/explorer-dist/assets/explorer-dagre-NK4GIZVX.js +4 -0
- package/explorer-dist/assets/explorer-dart.js +1 -1
- package/explorer-dist/assets/{explorer-diagram-VX7I27RA.js → explorer-diagram-CBK3MWTC.js} +2 -2
- package/explorer-dist/assets/explorer-diagram-I5XIIV2D.js +24 -0
- package/explorer-dist/assets/{explorer-diagram-S7CK7UJ4.js → explorer-diagram-ODIL2UCW.js} +5 -5
- package/explorer-dist/assets/explorer-diagram-PFBEJUXE.js +3 -0
- package/explorer-dist/assets/explorer-diagram-RJA3I4VV.js +41 -0
- package/explorer-dist/assets/explorer-diagram-TYUNFSNR.js +200 -0
- package/explorer-dist/assets/explorer-dotenv.js +1 -1
- package/explorer-dist/assets/{explorer-ebnfDiagram-PWID7BFC.js → explorer-ebnfDiagram-V4P3TTPT.js} +1 -1
- package/explorer-dist/assets/explorer-elk-QONTBCTQ.js +27 -0
- package/explorer-dist/assets/explorer-emacs-lisp.js +1 -1
- package/explorer-dist/assets/explorer-erDiagram-KYQIGQAA.js +99 -0
- package/explorer-dist/assets/explorer-flowDiagram-IUGLLWBU.js +213 -0
- package/explorer-dist/assets/explorer-ganttDiagram-R7GPNTJY.js +292 -0
- package/explorer-dist/assets/explorer-gdscript.js +1 -1
- package/explorer-dist/assets/{explorer-gitGraphDiagram-WWUBYQGX.js → explorer-gitGraphDiagram-PDYL7XHY.js} +5 -5
- package/explorer-dist/assets/explorer-gn.js +1 -1
- package/explorer-dist/assets/explorer-graph.js +1 -0
- package/explorer-dist/assets/explorer-hack.js +1 -1
- package/explorer-dist/assets/explorer-handlebars.js +1 -1
- package/explorer-dist/assets/explorer-haxe.js +1 -1
- package/explorer-dist/assets/explorer-hxml.js +1 -1
- package/explorer-dist/assets/explorer-index.js +312 -0
- package/explorer-dist/assets/explorer-infoDiagram-MVDRKAX5.js +2 -0
- package/explorer-dist/assets/{explorer-ishikawaDiagram-5VMMS53U.js → explorer-ishikawaDiagram-HPEHV2GE.js} +4 -4
- package/explorer-dist/assets/{explorer-journeyDiagram-3NMN7TZE.js → explorer-journeyDiagram-BOSHW7O7.js} +1 -1
- package/explorer-dist/assets/explorer-julia.js +1 -1
- package/explorer-dist/assets/explorer-just.js +1 -1
- package/explorer-dist/assets/explorer-kanagawa-dragon.js +1 -1
- package/explorer-dist/assets/explorer-kanagawa-lotus.js +1 -1
- package/explorer-dist/assets/explorer-kanagawa-wave.js +1 -1
- package/explorer-dist/assets/{explorer-kanban-definition-UXKFOSKX.js → explorer-kanban-definition-FNSA4HC5.js} +7 -7
- package/explorer-dist/assets/explorer-katex.js +18 -18
- package/explorer-dist/assets/explorer-latex.js +1 -1
- package/explorer-dist/assets/explorer-linear.js +1 -1
- package/explorer-dist/assets/explorer-llvm.js +1 -1
- package/explorer-dist/assets/explorer-luau.js +1 -1
- package/explorer-dist/assets/explorer-marko.js +1 -1
- package/explorer-dist/assets/explorer-mdc.js +1 -1
- package/explorer-dist/assets/explorer-mermaid.core.js +150 -148
- package/explorer-dist/assets/explorer-mermaid.js +1 -1
- package/explorer-dist/assets/explorer-mindmap-definition-6OY57UG3.js +98 -0
- package/explorer-dist/assets/explorer-mojo.js +1 -1
- package/explorer-dist/assets/explorer-monokai.js +1 -1
- package/explorer-dist/assets/explorer-moonbit.js +1 -1
- package/explorer-dist/assets/explorer-move.js +1 -1
- package/explorer-dist/assets/explorer-nextflow-groovy.js +1 -1
- package/explorer-dist/assets/explorer-nextflow.js +1 -1
- package/explorer-dist/assets/explorer-nsis.js +1 -0
- package/explorer-dist/assets/explorer-nushell.js +1 -1
- package/explorer-dist/assets/explorer-one-dark-pro.js +1 -1
- package/explorer-dist/assets/explorer-ontologyGraphRendererImpl.js +616 -0
- package/explorer-dist/assets/explorer-org.js +1 -0
- package/explorer-dist/assets/{explorer-pegDiagram-XKGWAZYB.js → explorer-pegDiagram-ECIUJNBX.js} +1 -1
- package/explorer-dist/assets/explorer-php.js +1 -1
- package/explorer-dist/assets/explorer-pieDiagram-GNMPY74T.js +39 -0
- package/explorer-dist/assets/explorer-powershell.js +1 -1
- package/explorer-dist/assets/explorer-prisma.js +1 -1
- package/explorer-dist/assets/{explorer-quadrantDiagram-AXDQQJYC.js → explorer-quadrantDiagram-D57K4MC3.js} +1 -1
- package/explorer-dist/assets/explorer-r.js +1 -1
- package/explorer-dist/assets/{explorer-railroadDiagram-O6MQD6OU.js → explorer-railroadDiagram-Y72NRBL7.js} +1 -1
- package/explorer-dist/assets/explorer-rbs.js +1 -0
- package/explorer-dist/assets/explorer-red.js +1 -1
- package/explorer-dist/assets/explorer-requirementDiagram-EQYSW5RA.js +84 -0
- package/explorer-dist/assets/explorer-rose-pine-dawn.js +1 -1
- package/explorer-dist/assets/explorer-rose-pine-moon.js +1 -1
- package/explorer-dist/assets/explorer-rose-pine.js +1 -1
- package/explorer-dist/assets/explorer-rst.js +1 -1
- package/explorer-dist/assets/explorer-ruby.js +1 -1
- package/explorer-dist/assets/explorer-rust.js +1 -1
- package/explorer-dist/assets/{explorer-sankeyDiagram-P5KCCOFB.js → explorer-sankeyDiagram-SY24JHO5.js} +4 -4
- package/explorer-dist/assets/explorer-scala.js +1 -1
- package/explorer-dist/assets/explorer-sequenceDiagram-BLEHNHQU.js +169 -0
- package/explorer-dist/assets/explorer-smalltalk.js +1 -1
- package/explorer-dist/assets/explorer-smithy.js +1 -0
- package/explorer-dist/assets/explorer-solarized-dark.js +1 -1
- package/explorer-dist/assets/explorer-solarized-light.js +1 -1
- package/explorer-dist/assets/explorer-solidity.js +1 -1
- package/explorer-dist/assets/explorer-sql.js +1 -1
- package/explorer-dist/assets/explorer-stateDiagram-v2-A6IESKWZ.js +291 -0
- package/explorer-dist/assets/explorer-surrealql.js +1 -1
- package/explorer-dist/assets/explorer-svelte.js +1 -1
- package/explorer-dist/assets/explorer-swift.js +1 -1
- package/explorer-dist/assets/explorer-swimlanes-B3ENRKFQ.js +1 -0
- package/explorer-dist/assets/explorer-swimlanesDiagram-AYQRV4AK.js +8 -0
- package/explorer-dist/assets/explorer-system-verilog.js +1 -1
- package/explorer-dist/assets/explorer-timeline-definition-JXYKGLGB.js +120 -0
- package/explorer-dist/assets/explorer-twig.js +1 -1
- package/explorer-dist/assets/explorer-typespec.js +1 -1
- package/explorer-dist/assets/explorer-typst.js +1 -1
- package/explorer-dist/assets/explorer-usecaseDiagram-WPOLBNNX.js +370 -0
- package/explorer-dist/assets/explorer-v.js +1 -1
- package/explorer-dist/assets/explorer-vb.js +1 -1
- package/explorer-dist/assets/explorer-vennDiagram-Q3Y3IDCW.js +34 -0
- package/explorer-dist/assets/explorer-verilog.js +1 -1
- package/explorer-dist/assets/explorer-vue.js +1 -1
- package/explorer-dist/assets/{explorer-wardleyDiagram-VM6X3IG4.js → explorer-wardleyDiagram-IVAIDKWA.js} +3 -3
- package/explorer-dist/assets/explorer-xychartDiagram-4URNHDU4.js +7 -0
- package/explorer-dist/assets/explorer.css +1 -1
- package/explorer-dist/assets/explorer.js +40 -1152
- package/explorer-dist/assets/fonts/.gitkeep +0 -0
- package/package.json +1 -1
- package/explorer-dist/assets/explorer-architectureDiagram-5GKGNRK7.js +0 -36
- package/explorer-dist/assets/explorer-blockDiagram-I7D4REHJ.js +0 -129
- package/explorer-dist/assets/explorer-c4Diagram-7LVT6UL2.js +0 -38
- package/explorer-dist/assets/explorer-chunk-F27PBJKO.js +0 -1
- package/explorer-dist/assets/explorer-chunk-IMKFNOWR.js +0 -231
- package/explorer-dist/assets/explorer-chunk-TICWLB2K.js +0 -206
- package/explorer-dist/assets/explorer-classDiagram-ZZMXUADV.js +0 -1
- package/explorer-dist/assets/explorer-classDiagram-v2-VYDZK3BY.js +0 -1
- package/explorer-dist/assets/explorer-cynefin-OW5HDTMX.js +0 -178
- package/explorer-dist/assets/explorer-dagre-GXQ25YYZ.js +0 -4
- package/explorer-dist/assets/explorer-diagram-UQ7AKVKN.js +0 -41
- package/explorer-dist/assets/explorer-diagram-VSXAHHWV.js +0 -3
- package/explorer-dist/assets/explorer-diagram-Z3DM3KII.js +0 -24
- package/explorer-dist/assets/explorer-erDiagram-RLTQ6QDP.js +0 -99
- package/explorer-dist/assets/explorer-flowDiagram-HODETNUW.js +0 -168
- package/explorer-dist/assets/explorer-ganttDiagram-EL5Y4UJY.js +0 -292
- package/explorer-dist/assets/explorer-infoDiagram-27XIBGKW.js +0 -2
- package/explorer-dist/assets/explorer-layout.js +0 -1
- package/explorer-dist/assets/explorer-mindmap-definition-YA3MSWOX.js +0 -96
- package/explorer-dist/assets/explorer-pieDiagram-E7YTZNPT.js +0 -39
- package/explorer-dist/assets/explorer-requirementDiagram-BXWQKSXE.js +0 -84
- package/explorer-dist/assets/explorer-sequenceDiagram-WJ2MYXX4.js +0 -162
- package/explorer-dist/assets/explorer-stateDiagram-D77RDMKH.js +0 -1
- package/explorer-dist/assets/explorer-stateDiagram-v2-MP3YSRHH.js +0 -1
- package/explorer-dist/assets/explorer-swimlanes-42K2YHIH.js +0 -1
- package/explorer-dist/assets/explorer-swimlanesDiagram-VR7AAH4N.js +0 -8
- package/explorer-dist/assets/explorer-timeline-definition-24CTP7MA.js +0 -120
- package/explorer-dist/assets/explorer-vennDiagram-4TSXK5OY.js +0 -34
- package/explorer-dist/assets/explorer-xychartDiagram-S5SC5T6Z.js +0 -7
- /package/explorer-dist/assets/{explorer-chunk-POPQ4Y6H.js → explorer-chunk-VQ5W62QI.js} +0 -0
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-
|
|
2
|
-
var _y=Object.defineProperty;var By=(e,t,r)=>t in e?_y(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>By(e,typeof t!="symbol"?t+"":t,r);import{w as vy,a as Ly,c as oi,x as Fy,y as Ey,q as xh,g as In,_ as It,s as Pt,u as Uu,v as Gu}from"./explorer.js";function Xu(e){this._context=e}Xu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ds(e){return new Xu(e)}function Ay(e,t){var r=oi(!0),i=null,s=ds,a=null,o=vy(n);e=typeof e=="function"?e:e===void 0?Fy:oi(e),t=typeof t=="function"?t:t===void 0?Ey:oi(t);function n(l){var c,h=(l=Ly(l)).length,u,p=!1,d;for(i==null&&(a=s(d=o())),c=0;c<=h;++c)!(c<h&&r(u=l[c],c,l))===p&&((p=!p)?a.lineStart():a.lineEnd()),p&&a.point(+e(u,c,l),+t(u,c,l));if(d)return a=null,d+""||null}return n.x=function(l){return arguments.length?(e=typeof l=="function"?l:oi(+l),n):e},n.y=function(l){return arguments.length?(t=typeof l=="function"?l:oi(+l),n):t},n.defined=function(l){return arguments.length?(r=typeof l=="function"?l:oi(!!l),n):r},n.curve=function(l){return arguments.length?(s=l,i!=null&&(a=s(i)),n):s},n.context=function(l){return arguments.length?(l==null?i=a=null:a=s(i=l),n):i},n}function Mr(){}function ha(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function Ea(e){this._context=e}Ea.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:ha(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function en(e){return new Ea(e)}function Vu(e){this._context=e}Vu.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function My(e){return new Vu(e)}function Zu(e){this._context=e}Zu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:ha(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Oy(e){return new Zu(e)}function Ku(e,t){this._basis=new Ea(e),this._beta=t}Ku.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,o=t[r]-s,n=-1,l;++n<=r;)l=n/r,this._basis.point(this._beta*e[n]+(1-this._beta)*(i+l*a),this._beta*t[n]+(1-this._beta)*(s+l*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const $y=(function e(t){function r(i){return t===1?new Ea(i):new Ku(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function ca(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function Rn(e,t){this._context=e,this._k=(1-t)/6}Rn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:ca(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Qu=(function e(t){function r(i){return new Rn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function qn(e,t){this._context=e,this._k=(1-t)/6}qn.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Dy=(function e(t){function r(i){return new qn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Nn(e,t){this._context=e,this._k=(1-t)/6}Nn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:ca(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Py=(function e(t){function r(i){return new Nn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function zn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,o=e._y2;if(e._l01_a>xh){var n=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,l=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*n-e._x0*e._l12_2a+e._x2*e._l01_2a)/l,s=(s*n-e._y0*e._l12_2a+e._y2*e._l01_2a)/l}if(e._l23_a>xh){var c=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,h=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*c+e._x1*e._l23_2a-t*e._l12_2a)/h,o=(o*c+e._y1*e._l23_2a-r*e._l12_2a)/h}e._context.bezierCurveTo(i,s,a,o,e._x2,e._y2)}function Ju(e,t){this._context=e,this._alpha=t}Ju.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const td=(function e(t){function r(i){return t?new Ju(i,t):new Rn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ed(e,t){this._context=e,this._alpha=t}ed.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Iy=(function e(t){function r(i){return t?new ed(i,t):new qn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function rd(e,t){this._context=e,this._alpha=t}rd.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:zn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const Ry=(function e(t){function r(i){return t?new rd(i,t):new Nn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function id(e){this._context=e}id.prototype={areaStart:Mr,areaEnd:Mr,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function qy(e){return new id(e)}function bh(e){return e<0?-1:1}function kh(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),o=(r-e._y1)/(s||i<0&&-0),n=(a*s+o*i)/(i+s);return(bh(a)+bh(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(n))||0}function Th(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function oo(e,t,r){var i=e._x0,s=e._y0,a=e._x1,o=e._y1,n=(a-i)/3;e._context.bezierCurveTo(i+n,s+n*t,a-n,o-n*r,a,o)}function ua(e){this._context=e}ua.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:oo(this,this._t0,Th(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,oo(this,Th(this,r=kh(this,e,t)),r);break;default:oo(this,this._t0,r=kh(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function sd(e){this._context=new ad(e)}(sd.prototype=Object.create(ua.prototype)).point=function(e,t){ua.prototype.point.call(this,t,e)};function ad(e){this._context=e}ad.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function od(e){return new ua(e)}function nd(e){return new sd(e)}function ld(e){this._context=e}ld.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=Sh(e),s=Sh(t),a=0,o=1;o<r;++a,++o)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[o],t[o]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function Sh(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),o=new Array(r);for(s[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,o[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,o[t]-=i*o[t-1];for(s[r-1]=o[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(o[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function hd(e){return new ld(e)}function Aa(e,t){this._context=e,this._t=t}Aa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function cd(e){return new Aa(e,.5)}function ud(e){return new Aa(e,0)}function dd(e){return new Aa(e,1)}var pd=Object.defineProperty,f=(e,t)=>pd(e,"name",{value:t,configurable:!0}),Ny=(e,t)=>{for(var r in t)pd(e,r,{get:t[r],enumerable:!0})},Js={exports:{}},zy=Js.exports,wh;function Wy(){return wh||(wh=1,(function(e,t){(function(r,i){e.exports=i()})(zy,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",o="second",n="minute",l="hour",c="day",h="week",u="month",p="quarter",d="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,k={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(A){var O=["th","st","nd","rd"],v=A%100;return"["+A+(O[(v-20)%10]||O[v]||O[0])+"]"}},S=function(A,O,v){var R=String(A);return!R||R.length>=O?A:""+Array(O+1-R.length).join(v)+A},w={s:S,z:function(A){var O=-A.utcOffset(),v=Math.abs(O),R=Math.floor(v/60),P=v%60;return(O<=0?"+":"-")+S(R,2,"0")+":"+S(P,2,"0")},m:function A(O,v){if(O.date()<v.date())return-A(v,O);var R=12*(v.year()-O.year())+(v.month()-O.month()),P=O.clone().add(R,u),H=v-P<0,Z=O.clone().add(R+(H?-1:1),u);return+(-(R+(v-P)/(H?P-Z:Z-P))||0)},a:function(A){return A<0?Math.ceil(A)||0:Math.floor(A)},p:function(A){return{M:u,y:d,w:h,d:c,D:m,h:l,m:n,s:o,ms:a,Q:p}[A]||String(A||"").toLowerCase().replace(/s$/,"")},u:function(A){return A===void 0}},B="en",L={};L[B]=k;var E="$isDayjsObject",F=function(A){return A instanceof at||!(!A||!A[E])},X=function A(O,v,R){var P;if(!O)return B;if(typeof O=="string"){var H=O.toLowerCase();L[H]&&(P=H),v&&(L[H]=v,P=H);var Z=O.split("-");if(!P&&Z.length>1)return A(Z[0])}else{var ut=O.name;L[ut]=O,P=ut}return!R&&P&&(B=P),P||!R&&B},N=function(A,O){if(F(A))return A.clone();var v=typeof O=="object"?O:{};return v.date=A,v.args=arguments,new at(v)},z=w;z.l=X,z.i=F,z.w=function(A,O){return N(A,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var at=(function(){function A(v){this.$L=X(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[E]=!0}var O=A.prototype;return O.parse=function(v){this.$d=(function(R){var P=R.date,H=R.utc;if(P===null)return new Date(NaN);if(z.u(P))return new Date;if(P instanceof Date)return new Date(P);if(typeof P=="string"&&!/Z$/i.test(P)){var Z=P.match(x);if(Z){var ut=Z[2]-1||0,pt=(Z[7]||"0").substring(0,3);return H?new Date(Date.UTC(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pt)):new Date(Z[1],ut,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,pt)}}return new Date(P)})(v),this.init()},O.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},O.$utils=function(){return z},O.isValid=function(){return this.$d.toString()!==y},O.isSame=function(v,R){var P=N(v);return this.startOf(R)<=P&&P<=this.endOf(R)},O.isAfter=function(v,R){return N(v)<this.startOf(R)},O.isBefore=function(v,R){return this.endOf(R)<N(v)},O.$g=function(v,R,P){return z.u(v)?this[R]:this.set(P,v)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(v,R){var P=this,H=!!z.u(R)||R,Z=z.p(v),ut=function(vt,lt){var gt=z.w(P.$u?Date.UTC(P.$y,lt,vt):new Date(P.$y,lt,vt),P);return H?gt:gt.endOf(c)},pt=function(vt,lt){return z.w(P.toDate()[vt].apply(P.toDate("s"),(H?[0,0,0,0]:[23,59,59,999]).slice(lt)),P)},bt=this.$W,Tt=this.$M,nt=this.$D,At="set"+(this.$u?"UTC":"");switch(Z){case d:return H?ut(1,0):ut(31,11);case u:return H?ut(1,Tt):ut(0,Tt+1);case h:var Lt=this.$locale().weekStart||0,qt=(bt<Lt?bt+7:bt)-Lt;return ut(H?nt-qt:nt+(6-qt),Tt);case c:case m:return pt(At+"Hours",0);case l:return pt(At+"Minutes",1);case n:return pt(At+"Seconds",2);case o:return pt(At+"Milliseconds",3);default:return this.clone()}},O.endOf=function(v){return this.startOf(v,!1)},O.$set=function(v,R){var P,H=z.p(v),Z="set"+(this.$u?"UTC":""),ut=(P={},P[c]=Z+"Date",P[m]=Z+"Date",P[u]=Z+"Month",P[d]=Z+"FullYear",P[l]=Z+"Hours",P[n]=Z+"Minutes",P[o]=Z+"Seconds",P[a]=Z+"Milliseconds",P)[H],pt=H===c?this.$D+(R-this.$W):R;if(H===u||H===d){var bt=this.clone().set(m,1);bt.$d[ut](pt),bt.init(),this.$d=bt.set(m,Math.min(this.$D,bt.daysInMonth())).$d}else ut&&this.$d[ut](pt);return this.init(),this},O.set=function(v,R){return this.clone().$set(v,R)},O.get=function(v){return this[z.p(v)]()},O.add=function(v,R){var P,H=this;v=Number(v);var Z=z.p(R),ut=function(Tt){var nt=N(H);return z.w(nt.date(nt.date()+Math.round(Tt*v)),H)};if(Z===u)return this.set(u,this.$M+v);if(Z===d)return this.set(d,this.$y+v);if(Z===c)return ut(1);if(Z===h)return ut(7);var pt=(P={},P[n]=i,P[l]=s,P[o]=r,P)[Z]||1,bt=this.$d.getTime()+v*pt;return z.w(bt,this)},O.subtract=function(v,R){return this.add(-1*v,R)},O.format=function(v){var R=this,P=this.$locale();if(!this.isValid())return P.invalidDate||y;var H=v||"YYYY-MM-DDTHH:mm:ssZ",Z=z.z(this),ut=this.$H,pt=this.$m,bt=this.$M,Tt=P.weekdays,nt=P.months,At=P.meridiem,Lt=function(lt,gt,Et,Rt){return lt&&(lt[gt]||lt(R,H))||Et[gt].slice(0,Rt)},qt=function(lt){return z.s(ut%12||12,lt,"0")},vt=At||function(lt,gt,Et){var Rt=lt<12?"AM":"PM";return Et?Rt.toLowerCase():Rt};return H.replace(C,(function(lt,gt){return gt||(function(Et){switch(Et){case"YY":return String(R.$y).slice(-2);case"YYYY":return z.s(R.$y,4,"0");case"M":return bt+1;case"MM":return z.s(bt+1,2,"0");case"MMM":return Lt(P.monthsShort,bt,nt,3);case"MMMM":return Lt(nt,bt);case"D":return R.$D;case"DD":return z.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return Lt(P.weekdaysMin,R.$W,Tt,2);case"ddd":return Lt(P.weekdaysShort,R.$W,Tt,3);case"dddd":return Tt[R.$W];case"H":return String(ut);case"HH":return z.s(ut,2,"0");case"h":return qt(1);case"hh":return qt(2);case"a":return vt(ut,pt,!0);case"A":return vt(ut,pt,!1);case"m":return String(pt);case"mm":return z.s(pt,2,"0");case"s":return String(R.$s);case"ss":return z.s(R.$s,2,"0");case"SSS":return z.s(R.$ms,3,"0");case"Z":return Z}return null})(lt)||Z.replace(":","")}))},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(v,R,P){var H,Z=this,ut=z.p(R),pt=N(v),bt=(pt.utcOffset()-this.utcOffset())*i,Tt=this-pt,nt=function(){return z.m(Z,pt)};switch(ut){case d:H=nt()/12;break;case u:H=nt();break;case p:H=nt()/3;break;case h:H=(Tt-bt)/6048e5;break;case c:H=(Tt-bt)/864e5;break;case l:H=Tt/s;break;case n:H=Tt/i;break;case o:H=Tt/r;break;default:H=Tt}return P?H:z.a(H)},O.daysInMonth=function(){return this.endOf(u).$D},O.$locale=function(){return L[this.$L]},O.locale=function(v,R){if(!v)return this.$L;var P=this.clone(),H=X(v,R,!0);return H&&(P.$L=H),P},O.clone=function(){return z.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},A})(),j=at.prototype;return N.prototype=j,[["$ms",a],["$s",o],["$m",n],["$H",l],["$W",c],["$M",u],["$y",d],["$D",m]].forEach((function(A){j[A[1]]=function(O){return this.$g(O,A[0],A[1])}})),N.extend=function(A,O){return A.$i||(A(O,at,N),A.$i=!0),N},N.locale=X,N.isDayjs=F,N.unix=function(A){return N(1e3*A)},N.en=L[B],N.Ls=L,N.p={},N}))})(Js)),Js.exports}var Hy=Wy();const jy=In(Hy);var fr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},W={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},Wn=f(function(e="fatal"){let t=fr.fatal;typeof e=="string"?e.toLowerCase()in fr&&(t=fr[e]):typeof e=="number"&&(t=e),W.trace=()=>{},W.debug=()=>{},W.info=()=>{},W.warn=()=>{},W.error=()=>{},W.fatal=()=>{},t<=fr.fatal&&(W.fatal=console.error?console.error.bind(console,qe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",qe("FATAL"))),t<=fr.error&&(W.error=console.error?console.error.bind(console,qe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",qe("ERROR"))),t<=fr.warn&&(W.warn=console.warn?console.warn.bind(console,qe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",qe("WARN"))),t<=fr.info&&(W.info=console.info?console.info.bind(console,qe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",qe("INFO"))),t<=fr.debug&&(W.debug=console.debug?console.debug.bind(console,qe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("DEBUG"))),t<=fr.trace&&(W.trace=console.debug?console.debug.bind(console,qe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",qe("TRACE")))},"setLogLevel"),qe=f(e=>`%c${jy().format("ss.SSS")} : ${e} : `,"format");const ta={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return ta.hue2rgb(a,s,e+1/3)*255;case"g":return ta.hue2rgb(a,s,e)*255;case"b":return ta.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),o=(s+a)/2;if(i==="l")return o*100;if(s===a)return 0;const n=s-a,l=o>.5?n/(2-s-a):n/(s+a);if(i==="s")return l*100;switch(s){case e:return((t-r)/n+(t<r?6:0))*60;case t:return((r-e)/n+2)*60;case r:return((e-t)/n+4)*60;default:return-1}}},Yy={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Uy={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Dt={channel:ta,lang:Yy,unit:Uy},Lr={};for(let e=0;e<=255;e++)Lr[e]=Dt.unit.dec2hex(e);const ye={ALL:0,RGB:1,HSL:2};let Gy=class{constructor(){this.type=ye.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=ye.ALL}is(t){return this.type===t}};class Xy{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new Gy}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=ye.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(ye.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(ye.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(ye.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(ye.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(ye.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(ye.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(ye.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(ye.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const Ma=new Xy({r:0,g:0,b:0,a:0},"transparent"),gi={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(gi.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,o=s>4,n=o?1:17,l=o?8:4,c=a?0:-1,h=o?255:15;return Ma.set({r:(i>>l*(c+3)&h)*n,g:(i>>l*(c+2)&h)*n,b:(i>>l*(c+1)&h)*n,a:a?(i&h)*n/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}${Lr[Math.round(s*255)]}`:`#${Lr[Math.round(t)]}${Lr[Math.round(r)]}${Lr[Math.round(i)]}`}},Hr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(Hr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(Hr.re);if(!r)return;const[,i,s,a,o,n]=r;return Ma.set({h:Hr._hue2deg(i),s:Dt.channel.clamp.s(parseFloat(s)),l:Dt.channel.clamp.l(parseFloat(a)),a:o?Dt.channel.clamp.a(n?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%, ${s})`:`hsl(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%)`}},ps={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=ps.colors[e];if(t)return gi.parse(t)},stringify:e=>{const t=gi.stringify(e);for(const r in ps.colors)if(ps.colors[r]===t)return r}},ss={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(ss.re);if(!r)return;const[,i,s,a,o,n,l,c,h]=r;return Ma.set({r:Dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Dt.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(l?parseFloat(n)*2.55:parseFloat(n)),a:c?Dt.channel.clamp.a(h?parseFloat(c)/100:parseFloat(c)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`:`rgb(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)})`}},sr={format:{keyword:ps,hex:gi,rgb:ss,rgba:ss,hsl:Hr,hsla:Hr},parse:e=>{if(typeof e!="string")return e;const t=gi.parse(e)||ss.parse(e)||Hr.parse(e)||ps.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(ye.HSL)||e.data.r===void 0?Hr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?ss.stringify(e):gi.stringify(e)},fd=(e,t)=>{const r=sr.parse(e);for(const i in t)r[i]=Dt.channel.clamp[i](t[i]);return sr.stringify(r)},Ar=(e,t,r=0,i=1)=>{if(typeof e!="number")return fd(e,{a:t});const s=Ma.set({r:Dt.channel.clamp.r(e),g:Dt.channel.clamp.g(t),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(i)});return sr.stringify(s)},Vy=e=>{const{r:t,g:r,b:i}=sr.parse(e),s=.2126*Dt.channel.toLinear(t)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(i);return Dt.lang.round(s)},Zy=e=>Vy(e)>=.5,Xe=e=>!Zy(e),gd=(e,t,r)=>{const i=sr.parse(e),s=i[t],a=Dt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),sr.stringify(i)},Y=(e,t)=>gd(e,"l",t),U=(e,t)=>gd(e,"l",-t),b=(e,t)=>{const r=sr.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return fd(e,i)},Ky=(e,t,r=50)=>{const{r:i,g:s,b:a,a:o}=sr.parse(e),{r:n,g:l,b:c,a:h}=sr.parse(t),u=r/100,p=u*2-1,d=o-h,y=((p*d===-1?p:(p+d)/(1+p*d))+1)/2,x=1-y,C=i*y+n*x,k=s*y+l*x,S=a*y+c*x,w=o*u+h*(1-u);return Ar(C,k,S,w)},M=(e,t=100)=>{const r=sr.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ky(r,e,t)};/*! @license DOMPurify 3.4.15 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.15/LICENSE */function _h(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Qy(e){if(Array.isArray(e))return e}function Jy(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,o,n=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(l=(i=a.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return n}}function tC(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function eC(e,t){return Qy(e)||Jy(e,t)||rC(e,t)||tC()}function rC(e,t){if(e){if(typeof e=="string")return _h(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_h(e,t):void 0}}const md=Object.entries,Bh=Object.setPrototypeOf,iC=Object.isFrozen,sC=Object.getPrototypeOf,aC=Object.getOwnPropertyDescriptor;let he=Object.freeze,ue=Object.seal,ci=Object.create,yd=typeof Reflect<"u"&&Reflect,rn=yd.apply,sn=yd.construct;he||(he=function(t){return t});ue||(ue=function(t){return t});rn||(rn=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});sn||(sn=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const zr=ne(Array.prototype.forEach),oC=ne(Array.prototype.lastIndexOf),vh=ne(Array.prototype.pop),Xi=ne(Array.prototype.push),nC=ne(Array.prototype.splice),mi=Array.isArray,as=ne(String.prototype.toLowerCase),no=ne(String.prototype.toString),Lh=ne(String.prototype.match),Vi=ne(String.prototype.replace),Fh=ne(String.prototype.indexOf),lC=ne(String.prototype.trim),hC=ne(Number.prototype.toString),cC=ne(Boolean.prototype.toString),Eh=typeof BigInt>"u"?null:ne(BigInt.prototype.toString),Ah=typeof Symbol>"u"?null:ne(Symbol.prototype.toString),Ae=ne(Object.prototype.hasOwnProperty),Zi=ne(Object.prototype.toString),me=ne(RegExp.prototype.test),Ir=uC(TypeError);function ne(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return rn(e,t,i)}}function uC(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return sn(e,r)}}function Yt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:as;if(Bh&&Bh(e,null),!mi(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(iC(t)||(t[i]=a),s=a)}e[s]=!0}return e}function dC(e){for(let t=0;t<e.length;t++)Ae(e,t)||(e[t]=null);return e}function Pe(e){const t=ci(null);for(const i of md(e)){var r=eC(i,2);const s=r[0],a=r[1];Ae(e,s)&&(mi(a)?t[s]=dC(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Pe(a):t[s]=a)}return t}function pC(e){switch(typeof e){case"string":return e;case"number":return hC(e);case"boolean":return cC(e);case"bigint":return Eh?Eh(e):"0";case"symbol":return Ah?Ah(e):"Symbol()";case"undefined":return Zi(e);case"function":case"object":{if(e===null)return Zi(e);const t=e,r=Ne(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Zi(i)}return Zi(e)}default:return Zi(e)}}function Ne(e,t){for(;e!==null;){const i=aC(e,t);if(i){if(i.get)return ne(i.get);if(typeof i.value=="function")return ne(i.value)}e=sC(e)}function r(){return null}return r}function fC(e){try{return me(e,""),!0}catch{return!1}}const Mh=he(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),lo=he(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ho=he(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),gC=he(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),co=he(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),mC=he(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Oh=he(["#text"]),$h=he(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),uo=he(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Dh=he(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ns=he(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),yC=ue(/{{[\w\W]*|^[\w\W]*}}/g),CC=ue(/<%[\w\W]*|^[\w\W]*%>/g),xC=ue(/\${[\w\W]*/g),bC=ue(/^data-[\-\w.\u00B7-\uFFFF]+$/),kC=ue(/^aria-[\-\w]+$/),Ph=ue(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),TC=ue(/^(?:\w+script|data):/i),SC=ue(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),wC=ue(/^html$/i),_C=ue(/^[a-z][.\w]*(-[.\w]+)+$/i),Ih=ue(/<[/\w!]/g),Rh=ue(/<[/\w]/g),BC=ue(/<\/no(script|embed|frames)/i),vC=ue(/\/>/i),$e={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Cd=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],LC=he(Yt({},Cd)),FC=(function(){const e={};return zr(Cd,t=>{e[t]=ue(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),he(e)})(),EC=function(){return typeof window>"u"?null:window},AC=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(o){return o},createScriptURL(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},qh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Br=function(t,r,i,s){return Ae(t,r)&&mi(t[r])?Yt(s.base?Pe(s.base):{},t[r],s.transform):i},po=function(t,r,i){const s=Ae(t,r)?t[r]:void 0;return s&&typeof s=="object"?Pe(s):i()};function xd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:EC();const t=ot=>xd(ot);if(t.version="3.4.15",t.removed=[],!e||!e.document||e.document.nodeType!==$e.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,o=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,u=e.trustedTypes,p=n.prototype,d=Ne(p,"cloneNode"),m=Ne(p,"remove"),y=Ne(p,"removeAttributeNode"),x=Ne(p,"nextSibling"),C=Ne(p,"childNodes"),k=Ne(p,"parentNode"),S=Ne(p,"shadowRoot"),w=Ne(p,"attributes"),B=o&&o.prototype?Ne(o.prototype,"nodeType"):null,L=o&&o.prototype?Ne(o.prototype,"nodeName"):null,E=o&&o.prototype?Ne(o.prototype,"ownerDocument"):null,F=function(_){return B?B(_):_.nodeType},X=function(_){return L?L(_):_.nodeName};if(typeof a=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let N,z="",at,j=!1,A=0;const O=function(){if(A>0)throw Ir('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},v=function(_){O(),A++;try{return N.createHTML(_)}finally{A--}},R=function(_){O(),A++;try{return N.createScriptURL(_)}finally{A--}},P=function(){return j||(at=AC(u,s),j=!0),at},H=r,Z=H.implementation,ut=H.createNodeIterator,pt=H.createDocumentFragment,bt=H.getElementsByTagName,Tt=i.importNode;let nt=qh();t.isSupported=typeof md=="function"&&typeof k=="function"&&Z&&Z.createHTMLDocument!==void 0;const At=yC,Lt=CC,qt=xC,vt=bC,lt=kC,gt=TC,Et=SC,Rt=_C;let Ut=Ph,D=null;const Ft=Yt({},[...Mh,...lo,...ho,...co,...Oh]);let Wt=null;const we=Yt({},[...$h,...uo,...Dh,...Ns]);let fe=Object.seal(ci(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Re=null,cr=null;const _e=Object.seal(ci(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let Be=!0,ur=!0,dr=!1,pr=!0,ve=!1,g=!0,$=!1,V=!1,Q=null,G=null,st=!1,T=!1,q=!1,et=!1,K=!0,J=!1;const it="user-content-";let tt=!0,mt=!1,ct={},kt=null;const Bt=Yt({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Nt=null;const Vt=Yt({},["audio","video","img","source","image","track"]);let Yi=null;const wr=Yt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ze="http://www.w3.org/1998/Math/MathML",Os="http://www.w3.org/2000/svg",Ke="http://www.w3.org/1999/xhtml";let ii=Ke,Qa=!1,Ja=null;const hy=Yt({},[Ze,Os,Ke],no),ih=he(["mi","mo","mn","ms","mtext"]);let to=Yt({},ih);const sh=he(["annotation-xml"]);let eo=Yt({},sh);const cy=Yt({},["title","style","font","a","script"]);let Ui=null;const uy=["application/xhtml+xml","text/html"],dy="text/html";let ie=null,si=null;const py=r.createElement("form"),ah=function(_){return _ instanceof RegExp||_ instanceof Function},ro=function(){let _=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(si&&si===_)return;(!_||typeof _!="object")&&(_={}),_=Pe(_),Ui=uy.indexOf(_.PARSER_MEDIA_TYPE)===-1?dy:_.PARSER_MEDIA_TYPE,ie=Ui==="application/xhtml+xml"?no:as,D=Br(_,"ALLOWED_TAGS",Ft,{transform:ie}),Wt=Br(_,"ALLOWED_ATTR",we,{transform:ie}),Ja=Br(_,"ALLOWED_NAMESPACES",hy,{transform:no}),Yi=Br(_,"ADD_URI_SAFE_ATTR",wr,{transform:ie,base:wr}),Nt=Br(_,"ADD_DATA_URI_TAGS",Vt,{transform:ie,base:Vt}),kt=Br(_,"FORBID_CONTENTS",Bt,{transform:ie}),Re=Br(_,"FORBID_TAGS",Pe({}),{transform:ie}),cr=Br(_,"FORBID_ATTR",Pe({}),{transform:ie}),ct=Ae(_,"USE_PROFILES")?_.USE_PROFILES&&typeof _.USE_PROFILES=="object"?Pe(_.USE_PROFILES):_.USE_PROFILES:!1,Be=_.ALLOW_ARIA_ATTR!==!1,ur=_.ALLOW_DATA_ATTR!==!1,dr=_.ALLOW_UNKNOWN_PROTOCOLS||!1,pr=_.ALLOW_SELF_CLOSE_IN_ATTR!==!1,ve=_.SAFE_FOR_TEMPLATES||!1,g=_.SAFE_FOR_XML!==!1,$=_.WHOLE_DOCUMENT||!1,T=_.RETURN_DOM||!1,q=_.RETURN_DOM_FRAGMENT||!1,et=_.RETURN_TRUSTED_TYPE||!1,st=_.FORCE_BODY||!1,K=_.SANITIZE_DOM!==!1,J=_.SANITIZE_NAMED_PROPS||!1,tt=_.KEEP_CONTENT!==!1,mt=_.IN_PLACE||!1,Ut=fC(_.ALLOWED_URI_REGEXP)?_.ALLOWED_URI_REGEXP:Ph,ii=typeof _.NAMESPACE=="string"?_.NAMESPACE:Ke,to=po(_,"MATHML_TEXT_INTEGRATION_POINTS",()=>Yt({},ih)),eo=po(_,"HTML_INTEGRATION_POINTS",()=>Yt({},sh));const I=po(_,"CUSTOM_ELEMENT_HANDLING",()=>ci(null));if(fe=ci(null),Ae(I,"tagNameCheck")&&ah(I.tagNameCheck)&&(fe.tagNameCheck=I.tagNameCheck),Ae(I,"attributeNameCheck")&&ah(I.attributeNameCheck)&&(fe.attributeNameCheck=I.attributeNameCheck),Ae(I,"allowCustomizedBuiltInElements")&&typeof I.allowCustomizedBuiltInElements=="boolean"&&(fe.allowCustomizedBuiltInElements=I.allowCustomizedBuiltInElements),ue(fe),ve&&(ur=!1),q&&(T=!0),ct&&(D=Yt({},Oh),Wt=ci(null),ct.html===!0&&(Yt(D,Mh),Yt(Wt,$h)),ct.svg===!0&&(Yt(D,lo),Yt(Wt,uo),Yt(Wt,Ns)),ct.svgFilters===!0&&(Yt(D,ho),Yt(Wt,uo),Yt(Wt,Ns)),ct.mathMl===!0&&(Yt(D,co),Yt(Wt,Dh),Yt(Wt,Ns))),_e.tagCheck=null,_e.attributeCheck=null,Ae(_,"ADD_TAGS")&&(typeof _.ADD_TAGS=="function"?_e.tagCheck=_.ADD_TAGS:mi(_.ADD_TAGS)&&(D===Ft&&(D=Pe(D)),Yt(D,_.ADD_TAGS,ie))),Ae(_,"ADD_ATTR")&&(typeof _.ADD_ATTR=="function"?_e.attributeCheck=_.ADD_ATTR:mi(_.ADD_ATTR)&&(Wt===we&&(Wt=Pe(Wt)),Yt(Wt,_.ADD_ATTR,ie))),Ae(_,"ADD_FORBID_CONTENTS")&&mi(_.ADD_FORBID_CONTENTS)&&(kt===Bt&&(kt=Pe(kt)),Yt(kt,_.ADD_FORBID_CONTENTS,ie)),tt&&(D["#text"]=!0),$&&Yt(D,["html","head","body"]),D.table&&(Yt(D,["tbody"]),delete Re.tbody),_.TRUSTED_TYPES_POLICY){if(typeof _.TRUSTED_TYPES_POLICY.createHTML!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof _.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Ir('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const rt=N;N=_.TRUSTED_TYPES_POLICY;try{z=v("")}catch(yt){throw N=rt,yt}}else _.TRUSTED_TYPES_POLICY===null?(N=void 0,z=""):(N===void 0&&(N=P()),N&&typeof z=="string"&&(z=v("")));he&&he(_),si=_},oh=Yt({},[...lo,...ho,...gC]),nh=Yt({},[...co,...mC]),fy=function(_,I,rt){return I.namespaceURI===Ke?_==="svg":I.namespaceURI===Ze?_==="svg"&&(rt==="annotation-xml"||to[rt]):!!oh[_]},gy=function(_,I,rt){return I.namespaceURI===Ke?_==="math":I.namespaceURI===Os?_==="math"&&eo[rt]:!!nh[_]},my=function(_,I,rt){return I.namespaceURI===Os&&!eo[rt]||I.namespaceURI===Ze&&!to[rt]?!1:!nh[_]&&(cy[_]||!oh[_])},yy=function(_){let I=k(_);(!I||!I.tagName)&&(I={namespaceURI:ii,tagName:"template"});const rt=as(_.tagName),yt=as(I.tagName);return Ja[_.namespaceURI]?_.namespaceURI===Os?fy(rt,I,yt):_.namespaceURI===Ze?gy(rt,I,yt):_.namespaceURI===Ke?my(rt,I,yt):!!(Ui==="application/xhtml+xml"&&Ja[_.namespaceURI]):!1},_r=function(_){Xi(t.removed,{element:_});try{k(_).removeChild(_)}catch{if(m(_),!k(_))throw Ir("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},lh=function(_,I,rt){try{y(_,I)}catch{try{_.removeAttribute(rt)}catch{}}},$s=function(_){Ds(_);const I=C(_);if(I){const yt=[];zr(I,_t=>{Xi(yt,_t)}),zr(yt,_t=>{try{m(_t)}catch{}})}const rt=w(_);if(rt)for(let yt=rt.length-1;yt>=0;--yt){const _t=rt[yt],$t=_t&&_t.name;typeof $t=="string"&&lh(_,_t,$t)}},Pr=function(_,I,rt){if(!rt)try{rt=I.getAttributeNode(_)}catch{rt=null}Xi(t.removed,{attribute:rt||null,from:I});try{rt?y(I,rt):I.removeAttribute(_)}catch{try{I.removeAttribute(_)}catch{}}if(_==="is")if(T||q)try{_r(I)}catch{}else try{I.setAttribute(_,"")}catch{}},Cy=function(_){const I=w(_);if(I)for(let rt=I.length-1;rt>=0;--rt){const yt=I[rt],_t=yt&&yt.name;typeof _t!="string"||Wt[ie(_t)]||lh(_,yt,_t)}},Ds=function(_){const I=[_];for(;I.length>0;){const rt=I.pop();F(rt)===$e.element&&Cy(rt);const _t=C(rt);if(_t)for(let $t=_t.length-1;$t>=0;--$t)I.push(_t[$t])}},hh=function(_,I){return g?_==="patchsrc"?!0:_==="for"&&I!=="label"&&I!=="output":!1},xy=function(_){if(!g)return;const I=[_];for(;I.length>0;){const rt=I.pop(),yt=F(rt);if(yt===$e.processingInstruction||yt===$e.comment&&me(Rh,rt.data)){try{m(rt)}catch{}continue}if(yt===$e.element){const $t=rt,Kt=ie(X(rt));try{$t.hasAttribute&&$t.hasAttribute("patchsrc")&&$t.removeAttribute("patchsrc"),$t.hasAttribute&&$t.hasAttribute("for")&&hh("for",Kt)&&$t.removeAttribute("for")}catch{}}const _t=C(rt);if(_t)for(let $t=_t.length-1;$t>=0;--$t)I.push(_t[$t])}},ch=function(_){let I=null,rt=null;if(st)_="<remove></remove>"+_;else{const $t=Lh(_,/^[\r\n\t ]+/);rt=$t&&$t[0]}Ui==="application/xhtml+xml"&&ii===Ke&&(_='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+_+"</body></html>");const yt=N?v(_):_;if(ii===Ke)try{I=new h().parseFromString(yt,Ui)}catch{}if(!I||!I.documentElement){I=Z.createDocument(ii,"template",null);try{I.documentElement.innerHTML=Qa?z:yt}catch{}}const _t=I.body||I.documentElement;return _&&rt&&_t.insertBefore(r.createTextNode(rt),_t.childNodes[0]||null),ii===Ke?bt.call(I,$?"html":"body")[0]:$?I.documentElement:_t},uh=function(_){const I=E?E(_):_.ownerDocument;return ut.call(I||_,_,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},Ps=function(_){return _=Vi(_,At," "),_=Vi(_,Lt," "),_=Vi(_,qt," "),_},io=function(_){var I;_.normalize();const rt=E?E(_):_.ownerDocument,yt=ut.call(rt||_,_,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let _t=yt.nextNode();for(;_t;)_t.data=Ps(_t.data),_t=yt.nextNode();const $t=(I=_.querySelectorAll)===null||I===void 0?void 0:I.call(_,"template");$t&&zr($t,Kt=>{ai(Kt.content)&&io(Kt.content)})},Is=function(_){const I=L?L(_):null;return typeof I!="string"||ie(I)!=="form"?!1:typeof _.nodeName!="string"||typeof _.textContent!="string"||typeof _.removeChild!="function"||_.attributes!==w(_)||typeof _.removeAttribute!="function"||typeof _.removeAttributeNode!="function"||typeof _.getAttributeNode!="function"||typeof _.setAttribute!="function"||typeof _.namespaceURI!="string"||typeof _.insertBefore!="function"||typeof _.hasChildNodes!="function"||_.nodeType!==B(_)||_.childNodes!==C(_)},ai=function(_){if(!B||typeof _!="object"||_===null)return!1;try{return B(_)===$e.documentFragment}catch{return!1}},Gi=function(_){if(!B||typeof _!="object"||_===null)return!1;try{return typeof B(_)=="number"}catch{return!1}};function Qe(ot,_,I){ot.length!==0&&zr(ot,rt=>{rt.call(t,_,I,si)})}const by=function(_,I){return!!(g&&_.hasChildNodes()&&!Gi(_.firstElementChild)&&me(Ih,_.textContent)&&me(Ih,_.innerHTML)||g&&_.namespaceURI===Ke&&LC[I]&&(Gi(_.firstElementChild)||typeof _.textContent=="string"&&me(FC[I],_.textContent))||_.nodeType===$e.processingInstruction||g&&_.nodeType===$e.comment&&me(Rh,_.data))},Rs=function(_,I){if(_ instanceof RegExp)return me(_,I);if(_ instanceof Function){for(var rt=arguments.length,yt=new Array(rt>2?rt-2:0),_t=2;_t<rt;_t++)yt[_t-2]=arguments[_t];return!!_(I,...yt)}return!1},ky=function(_,I,rt){if(!Re[I]&&mh(I)&&Rs(fe.tagNameCheck,I))return!1;if(tt&&!kt[I]){const yt=k(_),_t=C(_);if(_t&&yt){const $t=_t.length;for(let Kt=$t-1;Kt>=0;--Kt){const ee=_===rt?d(_t[Kt],!0):_t[Kt];yt.insertBefore(ee,x(_))}}}return _r(_),!0},dh=function(_,I,rt,yt){return _.length===0?I:I===rt||I===yt?Pe(I):I},ph=function(_,I){return _===I||k(_)!==null?!1:(mt&&Ds(_),!0)},fh=function(_,I){if(Qe(nt.beforeSanitizeElements,_,null),ph(_,I))return!0;if(Is(_))return _r(_),!0;const rt=ie(X(_));if(D=dh(nt.uponSanitizeElement,D,Ft,Q),Qe(nt.uponSanitizeElement,_,{tagName:rt,allowedTags:D}),ph(_,I))return!0;if(by(_,rt))return _r(_),!0;if(Re[rt]||!(_e.tagCheck instanceof Function&&_e.tagCheck(rt))&&!D[rt]){const _t=ky(_,rt,I);return _t===!1&&Qe(nt.afterSanitizeElements,_,null),_t}if(F(_)===$e.element&&!yy(_)||(rt==="noscript"||rt==="noembed"||rt==="noframes")&&me(BC,_.innerHTML))return _r(_),!0;if(ve&&_.nodeType===$e.text){const _t=Ps(_.textContent);_.textContent!==_t&&(Xi(t.removed,{element:_.cloneNode()}),_.textContent=_t)}return Qe(nt.afterSanitizeElements,_,null),!1},gh=function(_,I,rt){if(cr[I]||hh(I,_)||K&&(I==="id"||I==="name")&&(rt in r||rt in py))return!1;const yt=Wt[I]||_e.attributeCheck instanceof Function&&_e.attributeCheck(I,_);return ur&&me(vt,I)||Be&&me(lt,I)?!0:yt?Yi[I]||me(Ut,Vi(rt,Et,""))||(I==="src"||I==="xlink:href"||I==="href")&&_!=="script"&&Fh(rt,"data:")===0&&Nt[_]||dr&&!me(gt,Vi(rt,Et,""))?!0:!rt:mh(_)&&Rs(fe.tagNameCheck,_)&&Rs(fe.attributeNameCheck,I,_)||I==="is"&&fe.allowCustomizedBuiltInElements&&Rs(fe.tagNameCheck,rt)},Ty=Yt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),mh=function(_){return!Ty[as(_)]&&me(Rt,_)},Sy=function(_,I,rt,yt){if(N&&typeof u=="object"&&typeof u.getAttributeType=="function"&&!rt)switch(u.getAttributeType(_,I)){case"TrustedHTML":return v(yt);case"TrustedScriptURL":return R(yt)}return yt},wy=function(_,I,rt,yt){try{return rt?_.setAttributeNS(rt,I,yt):_.setAttribute(I,yt),Is(_)?(_r(_),!1):!0}catch{return Pr(I,_),!1}},yh=function(_){Qe(nt.beforeSanitizeAttributes,_,null);const I=_.attributes;if(!I||Is(_))return;Wt=dh(nt.uponSanitizeAttribute,Wt,we,G);const rt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Wt,forceKeepAttr:void 0};let yt=I.length;const _t=ie(_.nodeName);for(;yt--;){const $t=I[yt],Kt=$t.name,ee=$t.namespaceURI,Le=$t.value,Fe=ie(Kt),ao=Le;let Te=Kt==="value"?ao:lC(ao),Ch=!1;if(rt.attrName=Fe,rt.attrValue=Te,rt.keepAttr=!0,rt.forceKeepAttr=void 0,Qe(nt.uponSanitizeAttribute,_,rt),Te=rt.attrValue,J&&(Fe==="id"||Fe==="name")&&Fh(Te,it)!==0&&(Pr(Kt,_,$t),Te=it+Te,Ch=!0),g&&me(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Pr(Kt,_,$t);continue}if(Fe==="attributename"&&Lh(Te,"href")){Pr(Kt,_,$t);continue}if(!rt.forceKeepAttr){if(!rt.keepAttr){Pr(Kt,_,$t);continue}if(!pr&&me(vC,Te)){Pr(Kt,_,$t);continue}if(ve&&(Te=Ps(Te)),!gh(_t,Fe,Te)){Pr(Kt,_,$t);continue}Te=Sy(_t,Fe,ee,Te),Te!==ao&&wy(_,Kt,ee,Te)&&Ch&&vh(t.removed)}}Qe(nt.afterSanitizeAttributes,_,null)},qs=function(_){let I=null;const rt=uh(_);for(Qe(nt.beforeSanitizeShadowDOM,_,null);I=rt.nextNode();)if(Qe(nt.uponSanitizeShadowNode,I,null),fh(I,_),yh(I),ai(I.content)&&qs(I.content),F(I)===$e.element){const yt=S(I);ai(yt)&&(so(yt),qs(yt))}Qe(nt.afterSanitizeShadowDOM,_,null)},so=function(_){const I=[{node:_,shadow:null}];for(;I.length>0;){const rt=I.pop();if(rt.shadow){qs(rt.shadow);continue}const yt=rt.node,$t=F(yt)===$e.element,Kt=C(yt);if(Kt)for(let ee=Kt.length-1;ee>=0;--ee)I.push({node:Kt[ee],shadow:null});if($t){const ee=L?L(yt):null;if(typeof ee=="string"&&ie(ee)==="template"){const Le=yt.content;ai(Le)&&I.push({node:Le,shadow:null})}}if($t){const ee=S(yt);ai(ee)&&I.push({node:null,shadow:ee},{node:ee,shadow:null})}}};return t.sanitize=function(ot){let _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},I=null,rt=null,yt=null,_t=null;if(Qa=!ot,Qa&&(ot="<!-->"),typeof ot!="string"&&!Gi(ot)&&(ot=pC(ot),typeof ot!="string"))throw Ir("dirty is not a string, aborting");if(!t.isSupported)return ot;V?(D=Q,Wt=G):ro(_),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(D=Pe(D)),nt.uponSanitizeAttribute.length>0&&(Wt=Pe(Wt)),t.removed=[];const $t=mt&&typeof ot!="string"&&Gi(ot);if($t){xy(ot);const Le=X(ot);if(typeof Le=="string"){const Fe=ie(Le);if(!D[Fe]||Re[Fe])throw $s(ot),Ir("root node is forbidden and cannot be sanitized in-place")}if(Is(ot))throw $s(ot),Ir("root node is clobbered and cannot be sanitized in-place");try{so(ot)}catch(Fe){throw $s(ot),Fe}}else if(Gi(ot))I=ch("<!---->"),rt=I.ownerDocument.importNode(ot,!0),rt.nodeType===$e.element&&rt.nodeName==="BODY"||rt.nodeName==="HTML"?I=rt:I.appendChild(rt),so(I);else{if(!T&&!ve&&!$&&ot.indexOf("<")===-1)return N&&et?v(ot):ot;if(I=ch(ot),!I)return T?null:et?z:""}I&&st&&_r(I.firstChild);const Kt=$t?ot:I;try{const Le=uh(Kt);for(;yt=Le.nextNode();)fh(yt,Kt),yh(yt),ai(yt.content)&&qs(yt.content)}catch(Le){throw $t&&($s(ot),zr(t.removed,Fe=>{Fe.element&&Ds(Fe.element)})),Le}if($t)return zr(t.removed,Le=>{Le.element&&Ds(Le.element)}),ve&&io(ot),ot;if(T){if(ve&&io(I),q)for(_t=pt.call(I.ownerDocument);I.firstChild;)_t.appendChild(I.firstChild);else _t=I;return(Wt.shadowroot||Wt.shadowrootmode)&&(_t=Tt.call(i,_t,!0)),_t}let ee=$?I.outerHTML:I.innerHTML;return $&&D["!doctype"]&&I.ownerDocument&&I.ownerDocument.doctype&&I.ownerDocument.doctype.name&&me(wC,I.ownerDocument.doctype.name)&&(ee="<!DOCTYPE "+I.ownerDocument.doctype.name+`>
|
|
4
|
-
`+ee),ve&&(ee=Ps(ee)),N&&et?v(ee):ee},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};ro(ot),V=!0,Q=D,G=Wt},t.clearConfig=function(){si=null,V=!1,Q=null,G=null,N=at,z=""},t.isValidAttribute=function(ot,_,I){si||ro({});const rt=ie(ot),yt=ie(_);return gh(rt,yt,I)},t.addHook=function(ot,_){typeof _=="function"&&Ae(nt,ot)&&Xi(nt[ot],_)},t.removeHook=function(ot,_){if(Ae(nt,ot)){if(_!==void 0){const I=oC(nt[ot],_);return I===-1?void 0:nC(nt[ot],I,1)[0]}return vh(nt[ot])}},t.removeHooks=function(ot){Ae(nt,ot)&&(nt[ot]=[])},t.removeAllHooks=function(){nt=qh()},t}var $i=xd(),an=f((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>an(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,o])=>{if(typeof o=="object"){if(o===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(o)?[]:{}),typeof s[a]=="object"&&(s[a]=an(s[a],o,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=o:Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),ce=an,or="#ffffff",nr="#f2f2f2",Ot=f((e,t)=>t?b(e,{s:-40,l:10}):b(e,{s:-40,l:-10}),"mkBorder"),xi,MC=(xi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut,D;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],75);else for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScale"+Ft]=U(this["cScale"+Ft],25);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleInv"+Ft]=this["cScaleInv"+Ft]||M(this["cScale"+Ft]);for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this.darkMode?this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||Y(this["cScale"+Ft],10):this["cScalePeer"+Ft]=this["cScalePeer"+Ft]||U(this["cScale"+Ft],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let Ft=0;Ft<this.THEME_COLOR_LIMIT;Ft++)this["cScaleLabel"+Ft]=this["cScaleLabel"+Ft]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let Ft=0;Ft<5;Ft++)this["surface"+Ft]=this["surface"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(5+Ft*3)}),this["surfacePeer"+Ft]=this["surfacePeer"+Ft]||b(this.mainBkg,{h:180,s:-15,l:t*(8+Ft*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((u=this.cynefin)==null?void 0:u.complicatedBg)||"#E3F2FD",chaoticBg:((p=this.cynefin)==null?void 0:p.chaoticBg)||"#FBE9E7",clearBg:((d=this.cynefin)==null?void 0:d.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((k=this.radar)==null?void 0:k.axisStrokeWidth)||2,axisLabelFontSize:((S=this.radar)==null?void 0:S.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((B=this.radar)==null?void 0:B.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((E=this.radar)==null?void 0:E.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((X=this.radar)==null?void 0:X.legendBoxSize)||12,legendFontSize:((N=this.radar)==null?void 0:N.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((z=this.wardley)==null?void 0:z.backgroundColor)||this.background,axisColor:((at=this.wardley)==null?void 0:at.axisColor)||this.lineColor,axisTextColor:((j=this.wardley)==null?void 0:j.axisTextColor)||this.primaryTextColor,gridColor:((A=this.wardley)==null?void 0:A.gridColor)||this.gridColor,componentFill:((O=this.wardley)==null?void 0:O.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:((P=this.wardley)==null?void 0:P.linkStroke)||this.lineColor,evolutionStroke:((H=this.wardley)==null?void 0:H.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((ut=this.wardley)==null?void 0:ut.annotationTextColor)||this.primaryTextColor,annotationFill:((pt=this.wardley)==null?void 0:pt.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((Tt=this.xyChart)==null?void 0:Tt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((At=this.xyChart)==null?void 0:At.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((qt=this.xyChart)==null?void 0:qt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((vt=this.xyChart)==null?void 0:vt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((lt=this.xyChart)==null?void 0:lt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((gt=this.xyChart)==null?void 0:gt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Ut=this.xyChart)==null?void 0:Ut.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((D=this.xyChart)==null?void 0:D.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(xi,"Theme"),xi),OC=f(e=>{const t=new MC;return t.calculate(e),t},"getThemeVariables"),bi,$C=(bi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Ar(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ar(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.secondBkg=Y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Y(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=M(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10);for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-10+D*4)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(-7+D*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??Y(this["cScale"+D],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#BF360C",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#F57F17",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((E=this.xyChart)==null?void 0:E.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((pt=this.radar)==null?void 0:pt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Lt=this.wardley)==null?void 0:Lt.componentFill)||this.mainBkg,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((vt=this.wardley)==null?void 0:vt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||b(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||b(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||b(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||b(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||b(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(bi,"Theme"),bi),DC=f(e=>{const t=new $C;return t.calculate(e),t},"getThemeVariables"),ki,PC=(ki=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=b(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ar(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,l:-(7+D*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||b(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||b(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((z=this.wardley)==null?void 0:z.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((pt=this.xyChart)==null?void 0:pt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((vt=this.xyChart)==null?void 0:vt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ki,"Theme"),ki),IC=f(e=>{const t=new PC;return t.calculate(e),t},"getThemeVariables"),Ti,RC=(Ti=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Y("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScale"+D]=U(this["cScale"+D],10),this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],25);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||b(this["cScale"+D],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{h:30,s:-30,l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{h:30,s:-30,l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-30}),this.pie5=this.pie5||b(this.secondaryColor,{l:-30}),this.pie6=this.pie6||b(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??b(this.primaryColor,{l:-30}),this.venn2=this.venn2??b(this.secondaryColor,{l:-30}),this.venn3=this.venn3??b(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??b(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??b(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??b(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??b(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??b(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FFE0B2",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF9C4",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((B=this.radar)==null?void 0:B.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((X=this.radar)==null?void 0:X.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((N=this.wardley)==null?void 0:N.backgroundColor)||this.background,axisColor:((z=this.wardley)==null?void 0:z.axisColor)||this.lineColor,axisTextColor:((at=this.wardley)==null?void 0:at.axisTextColor)||this.primaryTextColor,gridColor:((j=this.wardley)==null?void 0:j.gridColor)||this.gridColor,componentFill:((A=this.wardley)==null?void 0:A.componentFill)||this.background,componentStroke:((O=this.wardley)==null?void 0:O.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:((P=this.wardley)==null?void 0:P.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((H=this.wardley)==null?void 0:H.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((ut=this.wardley)==null?void 0:ut.annotationFill)||this.background},this.xyChart={backgroundColor:((pt=this.xyChart)==null?void 0:pt.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((nt=this.xyChart)==null?void 0:nt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((Lt=this.xyChart)==null?void 0:Lt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((qt=this.xyChart)==null?void 0:qt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((vt=this.xyChart)==null?void 0:vt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((lt=this.xyChart)==null?void 0:lt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((gt=this.xyChart)==null?void 0:gt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Ut=this.xyChart)==null?void 0:Ut.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Ti,"Theme"),Ti),qC=f(e=>{const t=new RC;return t.calculate(e),t},"getThemeVariables"),Si,NC=(Si=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,o,n,l,c,h,u,p,d,m,y,x,C,k,S,w,B,L,E,F,X,N,z,at,j,A,O,v,R,P,H,Z,ut,pt,bt,Tt,nt,At,Lt,qt,vt,lt,gt,Et,Rt,Ut;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleInv"+D]=this["cScaleInv"+D]||M(this["cScale"+D]);for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this.darkMode?this["cScalePeer"+D]=this["cScalePeer"+D]||Y(this["cScale"+D],10):this["cScalePeer"+D]=this["cScalePeer"+D]||U(this["cScale"+D],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["cScaleLabel"+D]=this["cScaleLabel"+D]||this.scaleLabelColor;for(let D=0;D<5;D++)this["surface"+D]=this["surface"+D]||b(this.mainBkg,{l:-(5+D*5)}),this["surfacePeer"+D]=this["surfacePeer"+D]||b(this.mainBkg,{l:-(8+D*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=b(this.primaryColor,{h:64}),this.fillType3=b(this.secondaryColor,{h:64}),this.fillType4=b(this.primaryColor,{h:-64}),this.fillType5=b(this.secondaryColor,{h:-64}),this.fillType6=b(this.primaryColor,{h:128}),this.fillType7=b(this.secondaryColor,{h:128});for(let D=0;D<this.THEME_COLOR_LIMIT;D++)this["pie"+D]=this["cScale"+D];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let D=0;D<8;D++)this["venn"+(D+1)]=this["venn"+(D+1)]??this["cScale"+D];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((p=this.cynefin)==null?void 0:p.clearBg)||"#FFF8E1",confusionBg:((d=this.cynefin)==null?void 0:d.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((k=this.xyChart)==null?void 0:k.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((B=this.xyChart)==null?void 0:B.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((E=this.xyChart)==null?void 0:E.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((X=this.xyChart)==null?void 0:X.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((N=this.xyChart)==null?void 0:N.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((z=this.xyChart)==null?void 0:z.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((at=this.xyChart)==null?void 0:at.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((j=this.radar)==null?void 0:j.axisColor)||this.lineColor,axisStrokeWidth:((A=this.radar)==null?void 0:A.axisStrokeWidth)||2,axisLabelFontSize:((O=this.radar)==null?void 0:O.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:((P=this.radar)==null?void 0:P.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((H=this.radar)==null?void 0:H.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((ut=this.radar)==null?void 0:ut.legendBoxSize)||12,legendFontSize:((pt=this.radar)==null?void 0:pt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((bt=this.wardley)==null?void 0:bt.backgroundColor)||this.background,axisColor:((Tt=this.wardley)==null?void 0:Tt.axisColor)||this.lineColor,axisTextColor:((nt=this.wardley)==null?void 0:nt.axisTextColor)||this.primaryTextColor,gridColor:((At=this.wardley)==null?void 0:At.gridColor)||this.gridColor,componentFill:((Lt=this.wardley)==null?void 0:Lt.componentFill)||this.background,componentStroke:((qt=this.wardley)==null?void 0:qt.componentStroke)||this.lineColor,componentLabelColor:((vt=this.wardley)==null?void 0:vt.componentLabelColor)||this.primaryTextColor,linkStroke:((lt=this.wardley)==null?void 0:lt.linkStroke)||this.lineColor,evolutionStroke:((gt=this.wardley)==null?void 0:gt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Rt=this.wardley)==null?void 0:Rt.annotationTextColor)||this.primaryTextColor,annotationFill:((Ut=this.wardley)==null?void 0:Ut.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||b(this.primaryColor,{h:-30}),this.git4=this.pie5||b(this.primaryColor,{h:-60}),this.git5=this.pie6||b(this.primaryColor,{h:-90}),this.git6=this.pie7||b(this.primaryColor,{h:60}),this.git7=this.pie8||b(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Si,"Theme"),Si),zC=f(e=>{const t=new NC;return t.calculate(e),t},"getThemeVariables"),wi,WC=(wi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||b(t,{h:30}),this.cScale4=this.cScale4||b(t,{h:60}),this.cScale5=this.cScale5||b(t,{h:90}),this.cScale6=this.cScale6||b(t,{h:120}),this.cScale7=this.cScale7||b(t,{h:150}),this.cScale8=this.cScale8||b(t,{h:210,l:150}),this.cScale9=this.cScale9||b(t,{h:270}),this.cScale10=this.cScale10||b(t,{h:300}),this.cScale11=this.cScale11||b(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(wi,"Theme"),wi),HC=f(e=>{const t=new WC;return t.calculate(e),t},"getThemeVariables"),_i,jC=(_i=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(_i,"Theme"),_i),YC=f(e=>{const t=new jC;return t.calculate(e),t},"getThemeVariables"),Bi,UC=(Bi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Bi,"Theme"),Bi),GC=f(e=>{const t=new UC;return t.calculate(e),t},"getThemeVariables"),vi,XC=(vi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||b(this.primaryColor,{h:30}),this.cScale4=this.cScale4||b(this.primaryColor,{h:60}),this.cScale5=this.cScale5||b(this.primaryColor,{h:90}),this.cScale6=this.cScale6||b(this.primaryColor,{h:120}),this.cScale7=this.cScale7||b(this.primaryColor,{h:150}),this.cScale8=this.cScale8||b(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||b(this.primaryColor,{h:270}),this.cScale10=this.cScale10||b(this.primaryColor,{h:300}),this.cScale11=this.cScale11||b(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(vi,"Theme"),vi),VC=f(e=>{const t=new XC;return t.calculate(e),t},"getThemeVariables"),Li,ZC=(Li=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){var a,o,n,l,c,h,u,p,d,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=b(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||M(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||b(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||b(t,{h:64}),this.fillType3=this.fillType3||b(r,{h:64}),this.fillType4=this.fillType4||b(t,{h:-64}),this.fillType5=this.fillType5||b(r,{h:-64}),this.fillType6=this.fillType6||b(t,{h:128}),this.fillType7=this.fillType7||b(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||b(t,{l:-10}),this.pie5=this.pie5||b(r,{l:-10}),this.pie6=this.pie6||b(i,{l:-10}),this.pie7=this.pie7||b(t,{h:60,l:-10}),this.pie8=this.pie8||b(t,{h:-60,l:-10}),this.pie9=this.pie9||b(t,{h:120,l:0}),this.pie10=this.pie10||b(t,{h:60,l:-20}),this.pie11=this.pie11||b(t,{h:-60,l:-20}),this.pie12=this.pie12||b(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||b(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((o=this.xyChart)==null?void 0:o.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((u=this.xyChart)==null?void 0:u.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((p=this.xyChart)==null?void 0:p.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||b(t,{h:-30}),this.git4=this.git4||b(t,{h:-60}),this.git5=this.git5||b(t,{h:-90}),this.git6=this.git6||b(t,{h:60}),this.git7=this.git7||b(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Li,"Theme"),Li),KC=f(e=>{const t=new ZC;return t.calculate(e),t},"getThemeVariables"),Fi,QC=(Fi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=b(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(M("#323D47"),10),this.border1="#ccc",this.border2=Ar(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,o,n,l,c,h,u,p,d;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||b(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||b(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||M(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=U(this["cScale"+m],75);const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||b(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||b(this.primaryColor,{h:64}),this.fillType3=this.fillType3||b(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||b(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||b(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||b(this.primaryColor,{h:128}),this.fillType7=this.fillType7||b(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||b(this.primaryColor,{l:-10}),this.pie5=this.pie5||b(this.secondaryColor,{l:-10}),this.pie6=this.pie6||b(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||b(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||b(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||b(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||b(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||b(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||b(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||b(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||b(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||b(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||b(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||b(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||b(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Xe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((p=this.xyChart)==null?void 0:p.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((d=this.xyChart)==null?void 0:d.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||b(this.primaryColor,{h:-30}),this.git4=this.git4||b(this.primaryColor,{h:-60}),this.git5=this.git5||b(this.primaryColor,{h:-90}),this.git6=this.git6||b(this.primaryColor,{h:60}),this.git7=this.git7||b(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||or,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||nr}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Fi,"Theme"),Fi),JC=f(e=>{const t=new QC;return t.calculate(e),t},"getThemeVariables"),Cr={base:{getThemeVariables:OC},dark:{getThemeVariables:DC},default:{getThemeVariables:IC},forest:{getThemeVariables:qC},neutral:{getThemeVariables:zC},neo:{getThemeVariables:HC},"neo-dark":{getThemeVariables:YC},redux:{getThemeVariables:GC},"redux-dark":{getThemeVariables:VC},"redux-color":{getThemeVariables:KC},"redux-dark-color":{getThemeVariables:JC}},de={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},bd={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:Cr.default.getThemeVariables(),sequence:{...de.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},railroad:{...de.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...de.ishikawa},sankey:{...de.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...de.venn},cynefin:{...de.cynefin}},kd=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...kd(e[i],"")]:[...r,t+i],[]),"keyify"),t0=new Set(kd(bd,"")),Td=bd,e0={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},r0=f((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(W.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),da=f(e=>{if(W.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>da(t));return}for(const t of Object.keys(e)){if(W.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!t0.has(t)||e[t]==null){W.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=e0[t];i?r0(e[t],i):(W.debug("sanitizing object",t),da(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(W.debug("sanitizing css option",t),e[t]=Sd(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}W.debug("After sanitization",e)}},"sanitizeDirective"),Sd=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Di=Object.freeze(Td),lr=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Me=ce({},Di),pa,Ur=[],fs=ce({},Di),Bs=f((e,t)=>{let r=ce({},e),i={};for(const s of t)Bd(s),i=ce(i,s);if(r=ce(r,i),i.theme&&i.theme in Cr){const s=ce({},pa),a=ce(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in Cr&&(r.themeVariables=Cr[r.theme].getThemeVariables(a))}return fs=r,l0(fs),fs},"updateCurrentConfig"),i0=f(e=>(Me=ce({},Di),Me=ce(Me,e),e.theme&&Cr[e.theme]&&(Me.themeVariables=Cr[e.theme].getThemeVariables(e.themeVariables)),Bs(Me,Ur),Me),"setSiteConfig"),s0=f(e=>{pa=ce({},e)},"saveConfigFromInitialize"),a0=f(e=>(Me=ce(Me,e),Bs(Me,Ur),Me),"updateSiteConfig"),wd=f(()=>ce({},Me),"getSiteConfig"),_d=f(e=>(Bs(fs,[e]),te()),"setConfig"),te=f(()=>ce({},fs),"getConfig"),Bd=f(e=>{e&&(["secure",...Me.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(W.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&Bd(e[t])}))},"sanitize"),o0=f(e=>{var t;da(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Ur.push(e),Bs(Me,Ur)},"addDirective"),fa=f((e=Me)=>{Ur=[],Bs(e,Ur)},"reset"),n0={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},Nh={},vd=f(e=>{Nh[e]||(W.warn(n0[e]),Nh[e]=!0)},"issueWarning"),l0=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&vd("LAZY_LOAD_DEPRECATED")},"checkConfig"),vL=f(()=>{let e={};pa&&(e=ce(e,pa));for(const t of Ur)e=ce(e,t);return e},"getUserDefinedConfig"),be=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&vd("FLOWCHART_HTML_LABELS_DEPRECATED"),lr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),Ld=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,gs=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,h0=/\s*%%.*\n/gm,Ei,Fd=(Ei=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(Ei,"UnknownDiagramError"),Ei),Gr={},Hn=f(function(e,t){e=e.replace(Ld,"").replace(gs,"").replace(h0,`
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./explorer-elk-QONTBCTQ.js","./explorer-chunk-4EMNKR2T.js","./explorer-chunk-ZCHMQSOR.js","./explorer.js","./explorer.css","./explorer-graph.js","./explorer-dagre-NK4GIZVX.js","./explorer-swimlanes-B3ENRKFQ.js","./explorer-cose-bilkent-JH36ORCC.js","./explorer-cytoscape.esm.js","./explorer-c4Diagram-XDPPPE54.js","./explorer-chunk-55XCU76K.js","./explorer-flowDiagram-IUGLLWBU.js","./explorer-chunk-5VM5RSS4.js","./explorer-chunk-XXDRQBXY.js","./explorer-chunk-VQ5W62QI.js","./explorer-channel.js","./explorer-diagram-TYUNFSNR.js","./explorer-swimlanesDiagram-AYQRV4AK.js","./explorer-erDiagram-KYQIGQAA.js","./explorer-gitGraphDiagram-PDYL7XHY.js","./explorer-chunk-2Q5K7J3B.js","./explorer-chunk-JWPE2WC7.js","./explorer-cynefin-EF2NZ3EQ.js","./explorer-ganttDiagram-R7GPNTJY.js","./explorer-linear.js","./explorer-defaultLocale.js","./explorer-infoDiagram-MVDRKAX5.js","./explorer-pieDiagram-GNMPY74T.js","./explorer-quadrantDiagram-D57K4MC3.js","./explorer-xychartDiagram-4URNHDU4.js","./explorer-requirementDiagram-EQYSW5RA.js","./explorer-sequenceDiagram-BLEHNHQU.js","./explorer-classDiagram-v2-4MYWR3UA.js","./explorer-stateDiagram-v2-A6IESKWZ.js","./explorer-journeyDiagram-BOSHW7O7.js","./explorer-timeline-definition-JXYKGLGB.js","./explorer-mindmap-definition-6OY57UG3.js","./explorer-kanban-definition-FNSA4HC5.js","./explorer-sankeyDiagram-SY24JHO5.js","./explorer-diagram-I5XIIV2D.js","./explorer-diagram-RJA3I4VV.js","./explorer-blockDiagram-RJAE7QA3.js","./explorer-diagram-ODIL2UCW.js","./explorer-architectureDiagram-ZHVYKT53.js","./explorer-diagram-PFBEJUXE.js","./explorer-ishikawaDiagram-HPEHV2GE.js","./explorer-vennDiagram-Q3Y3IDCW.js","./explorer-diagram-CBK3MWTC.js","./explorer-usecaseDiagram-WPOLBNNX.js","./explorer-wardleyDiagram-IVAIDKWA.js","./explorer-cynefinDiagram-WF24UDRP.js","./explorer-railroadDiagram-Y72NRBL7.js","./explorer-chunk-2E7WHVMD.js","./explorer-ebnfDiagram-V4P3TTPT.js","./explorer-abnfDiagram-WEYOIA3C.js","./explorer-pegDiagram-ECIUJNBX.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var im=Object.defineProperty;var sm=(e,t,r)=>t in e?im(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Zt=(e,t,r)=>sm(e,typeof t!="symbol"?t+"":t,r);import{L as am,k as om,j as Qr,M as nm,N as lm,O as zl,n as hm,_ as Wt,s as Pt,P as Zc,Q as Kc}from"./explorer.js";function Qc(e){this._context=e}Qc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function es(e){return new Qc(e)}function cm(e,t){var r=Qr(!0),i=null,s=es,a=null,n=am(o);e=typeof e=="function"?e:e===void 0?nm:Qr(e),t=typeof t=="function"?t:t===void 0?lm:Qr(t);function o(c){var h,l=(c=om(c)).length,d,u=!1,g;for(i==null&&(a=s(g=n())),h=0;h<=l;++h)!(h<l&&r(d=c[h],h,c))===u&&((u=!u)?a.lineStart():a.lineEnd()),u&&a.point(+e(d,h,c),+t(d,h,c));if(g)return a=null,g+""||null}return o.x=function(c){return arguments.length?(e=typeof c=="function"?c:Qr(+c),o):e},o.y=function(c){return arguments.length?(t=typeof c=="function"?c:Qr(+c),o):t},o.defined=function(c){return arguments.length?(r=typeof c=="function"?c:Qr(!!c),o):r},o.curve=function(c){return arguments.length?(s=c,i!=null&&(a=s(i)),o):s},o.context=function(c){return arguments.length?(c==null?i=a=null:a=s(i=c),o):i},o}function Ar(){}function Us(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function ga(e){this._context=e}ga.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Us(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Us(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Ro(e){return new ga(e)}function Jc(e){this._context=e}Jc.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Us(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function dm(e){return new Jc(e)}function td(e){this._context=e}td.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,i=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:Us(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function um(e){return new td(e)}function ed(e,t){this._basis=new ga(e),this._beta=t}ed.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,r=e.length-1;if(r>0)for(var i=e[0],s=t[0],a=e[r]-i,n=t[r]-s,o=-1,c;++o<=r;)c=o/r,this._basis.point(this._beta*e[o]+(1-this._beta)*(i+c*a),this._beta*t[o]+(1-this._beta)*(s+c*n));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};const gm=(function e(t){function r(i){return t===1?new ga(i):new ed(i,t)}return r.beta=function(i){return e(+i)},r})(.85);function js(e,t,r){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-r),e._x2,e._y2)}function yn(e,t){this._context=e,this._k=(1-t)/6}yn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:js(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const rd=(function e(t){function r(i){return new yn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function Cn(e,t){this._context=e,this._k=(1-t)/6}Cn.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const pm=(function e(t){function r(i){return new Cn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function xn(e,t){this._context=e,this._k=(1-t)/6}xn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:js(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const fm=(function e(t){function r(i){return new xn(i,t)}return r.tension=function(i){return e(+i)},r})(0);function bn(e,t,r){var i=e._x1,s=e._y1,a=e._x2,n=e._y2;if(e._l01_a>zl){var o=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);i=(i*o-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,s=(s*o-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>zl){var h=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,l=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*h+e._x1*e._l23_2a-t*e._l12_2a)/l,n=(n*h+e._y1*e._l23_2a-r*e._l12_2a)/l}e._context.bezierCurveTo(i,s,a,n,e._x2,e._y2)}function id(e,t){this._context=e,this._alpha=t}id.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:bn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const sd=(function e(t){function r(i){return t?new id(i,t):new yn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function ad(e,t){this._context=e,this._alpha=t}ad.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:bn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const mm=(function e(t){function r(i){return t?new ad(i,t):new Cn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function od(e,t){this._context=e,this._alpha=t}od.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var r=this._x2-e,i=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:bn(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};const ym=(function e(t){function r(i){return t?new od(i,t):new xn(i,0)}return r.alpha=function(i){return e(+i)},r})(.5);function nd(e){this._context=e}nd.prototype={areaStart:Ar,areaEnd:Ar,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Cm(e){return new nd(e)}function Hl(e){return e<0?-1:1}function Yl(e,t,r){var i=e._x1-e._x0,s=t-e._x1,a=(e._y1-e._y0)/(i||s<0&&-0),n=(r-e._y1)/(s||i<0&&-0),o=(a*s+n*i)/(i+s);return(Hl(a)+Hl(n))*Math.min(Math.abs(a),Math.abs(n),.5*Math.abs(o))||0}function Ul(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function za(e,t,r){var i=e._x0,s=e._y0,a=e._x1,n=e._y1,o=(a-i)/3;e._context.bezierCurveTo(i+o,s+o*t,a-o,n-o*r,a,n)}function Gs(e){this._context=e}Gs.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:za(this,this._t0,Ul(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,za(this,Ul(this,r=Yl(this,e,t)),r);break;default:za(this,this._t0,r=Yl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function ld(e){this._context=new hd(e)}(ld.prototype=Object.create(Gs.prototype)).point=function(e,t){Gs.prototype.point.call(this,t,e)};function hd(e){this._context=e}hd.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,i,s,a){this._context.bezierCurveTo(t,e,i,r,a,s)}};function cd(e){return new Gs(e)}function dd(e){return new ld(e)}function ud(e){this._context=e}ud.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var i=jl(e),s=jl(t),a=0,n=1;n<r;++a,++n)this._context.bezierCurveTo(i[0][a],s[0][a],i[1][a],s[1][a],e[n],t[n]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function jl(e){var t,r=e.length-1,i,s=new Array(r),a=new Array(r),n=new Array(r);for(s[0]=0,a[0]=2,n[0]=e[0]+2*e[1],t=1;t<r-1;++t)s[t]=1,a[t]=4,n[t]=4*e[t]+2*e[t+1];for(s[r-1]=2,a[r-1]=7,n[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)i=s[t]/a[t-1],a[t]-=i,n[t]-=i*n[t-1];for(s[r-1]=n[r-1]/a[r-1],t=r-2;t>=0;--t)s[t]=(n[t]-s[t+1])/a[t];for(a[r-1]=(e[r]+s[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-s[t+1];return[s,a]}function gd(e){return new ud(e)}function pa(e,t){this._context=e,this._t=t}pa.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function pd(e){return new pa(e,.5)}function fd(e){return new pa(e,0)}function md(e){return new pa(e,1)}var yd=Object.defineProperty,p=(e,t)=>yd(e,"name",{value:t,configurable:!0}),xm=(e,t)=>{for(var r in t)yd(e,r,{get:t[r],enumerable:!0})},Ds={exports:{}},bm=Ds.exports,Gl;function km(){return Gl||(Gl=1,(function(e,t){(function(r,i){e.exports=i()})(bm,(function(){var r=1e3,i=6e4,s=36e5,a="millisecond",n="second",o="minute",c="hour",h="day",l="week",d="month",u="quarter",g="year",m="date",y="Invalid Date",x=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,C=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,b={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(E){var M=["th","st","nd","rd"],v=E%100;return"["+E+(M[(v-20)%10]||M[v]||M[0])+"]"}},k=function(E,M,v){var R=String(E);return!R||R.length>=M?E:""+Array(M+1-R.length).join(v)+E},w={s:k,z:function(E){var M=-E.utcOffset(),v=Math.abs(M),R=Math.floor(v/60),$=v%60;return(M<=0?"+":"-")+k(R,2,"0")+":"+k($,2,"0")},m:function E(M,v){if(M.date()<v.date())return-E(v,M);var R=12*(v.year()-M.year())+(v.month()-M.month()),$=M.clone().add(R,d),X=v-$<0,Z=M.clone().add(R+(X?-1:1),d);return+(-(R+(v-$)/(X?$-Z:Z-$))||0)},a:function(E){return E<0?Math.ceil(E)||0:Math.floor(E)},p:function(E){return{M:d,y:g,w:l,d:h,D:m,h:c,m:o,s:n,ms:a,Q:u}[E]||String(E||"").toLowerCase().replace(/s$/,"")},u:function(E){return E===void 0}},_="en",L={};L[_]=b;var A="$isDayjsObject",F=function(E){return E instanceof rt||!(!E||!E[A])},z=function E(M,v,R){var $;if(!M)return _;if(typeof M=="string"){var X=M.toLowerCase();L[X]&&($=X),v&&(L[X]=v,$=X);var Z=M.split("-");if(!$&&Z.length>1)return E(Z[0])}else{var lt=M.name;L[lt]=M,$=lt}return!R&&$&&(_=$),$||!R&&_},q=function(E,M){if(F(E))return E.clone();var v=typeof M=="object"?M:{};return v.date=E,v.args=arguments,new rt(v)},I=w;I.l=z,I.i=F,I.w=function(E,M){return q(E,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var rt=(function(){function E(v){this.$L=z(v.locale,null,!0),this.parse(v),this.$x=this.$x||v.x||{},this[A]=!0}var M=E.prototype;return M.parse=function(v){this.$d=(function(R){var $=R.date,X=R.utc;if($===null)return new Date(NaN);if(I.u($))return new Date;if($ instanceof Date)return new Date($);if(typeof $=="string"&&!/Z$/i.test($)){var Z=$.match(x);if(Z){var lt=Z[2]-1||0,ht=(Z[7]||"0").substring(0,3);return X?new Date(Date.UTC(Z[1],lt,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ht)):new Date(Z[1],lt,Z[3]||1,Z[4]||0,Z[5]||0,Z[6]||0,ht)}}return new Date($)})(v),this.init()},M.init=function(){var v=this.$d;this.$y=v.getFullYear(),this.$M=v.getMonth(),this.$D=v.getDate(),this.$W=v.getDay(),this.$H=v.getHours(),this.$m=v.getMinutes(),this.$s=v.getSeconds(),this.$ms=v.getMilliseconds()},M.$utils=function(){return I},M.isValid=function(){return this.$d.toString()!==y},M.isSame=function(v,R){var $=q(v);return this.startOf(R)<=$&&$<=this.endOf(R)},M.isAfter=function(v,R){return q(v)<this.startOf(R)},M.isBefore=function(v,R){return this.endOf(R)<q(v)},M.$g=function(v,R,$){return I.u(v)?this[R]:this.set($,v)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(v,R){var $=this,X=!!I.u(R)||R,Z=I.p(v),lt=function(Bt,ct){var xt=I.w($.$u?Date.UTC($.$y,ct,Bt):new Date($.$y,ct,Bt),$);return X?xt:xt.endOf(h)},ht=function(Bt,ct){return I.w($.toDate()[Bt].apply($.toDate("s"),(X?[0,0,0,0]:[23,59,59,999]).slice(ct)),$)},ut=this.$W,bt=this.$M,Tt=this.$D,yt="set"+(this.$u?"UTC":"");switch(Z){case g:return X?lt(1,0):lt(31,11);case d:return X?lt(1,bt):lt(0,bt+1);case l:var At=this.$locale().weekStart||0,It=(ut<At?ut+7:ut)-At;return lt(X?Tt-It:Tt+(6-It),bt);case h:case m:return ht(yt+"Hours",0);case c:return ht(yt+"Minutes",1);case o:return ht(yt+"Seconds",2);case n:return ht(yt+"Milliseconds",3);default:return this.clone()}},M.endOf=function(v){return this.startOf(v,!1)},M.$set=function(v,R){var $,X=I.p(v),Z="set"+(this.$u?"UTC":""),lt=($={},$[h]=Z+"Date",$[m]=Z+"Date",$[d]=Z+"Month",$[g]=Z+"FullYear",$[c]=Z+"Hours",$[o]=Z+"Minutes",$[n]=Z+"Seconds",$[a]=Z+"Milliseconds",$)[X],ht=X===h?this.$D+(R-this.$W):R;if(X===d||X===g){var ut=this.clone().set(m,1);ut.$d[lt](ht),ut.init(),this.$d=ut.set(m,Math.min(this.$D,ut.daysInMonth())).$d}else lt&&this.$d[lt](ht);return this.init(),this},M.set=function(v,R){return this.clone().$set(v,R)},M.get=function(v){return this[I.p(v)]()},M.add=function(v,R){var $,X=this;v=Number(v);var Z=I.p(R),lt=function(bt){var Tt=q(X);return I.w(Tt.date(Tt.date()+Math.round(bt*v)),X)};if(Z===d)return this.set(d,this.$M+v);if(Z===g)return this.set(g,this.$y+v);if(Z===h)return lt(1);if(Z===l)return lt(7);var ht=($={},$[o]=i,$[c]=s,$[n]=r,$)[Z]||1,ut=this.$d.getTime()+v*ht;return I.w(ut,this)},M.subtract=function(v,R){return this.add(-1*v,R)},M.format=function(v){var R=this,$=this.$locale();if(!this.isValid())return $.invalidDate||y;var X=v||"YYYY-MM-DDTHH:mm:ssZ",Z=I.z(this),lt=this.$H,ht=this.$m,ut=this.$M,bt=$.weekdays,Tt=$.months,yt=$.meridiem,At=function(ct,xt,Et,Nt){return ct&&(ct[xt]||ct(R,X))||Et[xt].slice(0,Nt)},It=function(ct){return I.s(lt%12||12,ct,"0")},Bt=yt||function(ct,xt,Et){var Nt=ct<12?"AM":"PM";return Et?Nt.toLowerCase():Nt};return X.replace(C,(function(ct,xt){return xt||(function(Et){switch(Et){case"YY":return String(R.$y).slice(-2);case"YYYY":return I.s(R.$y,4,"0");case"M":return ut+1;case"MM":return I.s(ut+1,2,"0");case"MMM":return At($.monthsShort,ut,Tt,3);case"MMMM":return At(Tt,ut);case"D":return R.$D;case"DD":return I.s(R.$D,2,"0");case"d":return String(R.$W);case"dd":return At($.weekdaysMin,R.$W,bt,2);case"ddd":return At($.weekdaysShort,R.$W,bt,3);case"dddd":return bt[R.$W];case"H":return String(lt);case"HH":return I.s(lt,2,"0");case"h":return It(1);case"hh":return It(2);case"a":return Bt(lt,ht,!0);case"A":return Bt(lt,ht,!1);case"m":return String(ht);case"mm":return I.s(ht,2,"0");case"s":return String(R.$s);case"ss":return I.s(R.$s,2,"0");case"SSS":return I.s(R.$ms,3,"0");case"Z":return Z}return null})(ct)||Z.replace(":","")}))},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(v,R,$){var X,Z=this,lt=I.p(R),ht=q(v),ut=(ht.utcOffset()-this.utcOffset())*i,bt=this-ht,Tt=function(){return I.m(Z,ht)};switch(lt){case g:X=Tt()/12;break;case d:X=Tt();break;case u:X=Tt()/3;break;case l:X=(bt-ut)/6048e5;break;case h:X=(bt-ut)/864e5;break;case c:X=bt/s;break;case o:X=bt/i;break;case n:X=bt/r;break;default:X=bt}return $?X:I.a(X)},M.daysInMonth=function(){return this.endOf(d).$D},M.$locale=function(){return L[this.$L]},M.locale=function(v,R){if(!v)return this.$L;var $=this.clone(),X=z(v,R,!0);return X&&($.$L=X),$},M.clone=function(){return I.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},E})(),W=rt.prototype;return q.prototype=W,[["$ms",a],["$s",n],["$m",o],["$H",c],["$W",h],["$M",d],["$y",g],["$D",m]].forEach((function(E){W[E[1]]=function(M){return this.$g(M,E[0],E[1])}})),q.extend=function(E,M){return E.$i||(E(M,rt,q),E.$i=!0),q},q.locale=z,q.isDayjs=F,q.unix=function(E){return q(1e3*E)},q.en=L[_],q.Ls=L,q.p={},q}))})(Ds)),Ds.exports}var Sm=km();const Tm=hm(Sm);var hr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},J={trace:p((...e)=>{},"trace"),debug:p((...e)=>{},"debug"),info:p((...e)=>{},"info"),warn:p((...e)=>{},"warn"),error:p((...e)=>{},"error"),fatal:p((...e)=>{},"fatal")},kn=p(function(e="fatal"){let t=hr.fatal;typeof e=="string"?e.toLowerCase()in hr&&(t=hr[e]):typeof e=="number"&&(t=e),J.trace=()=>{},J.debug=()=>{},J.info=()=>{},J.warn=()=>{},J.error=()=>{},J.fatal=()=>{},t<=hr.fatal&&(J.fatal=console.error?console.error.bind(console,Ie("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Ie("FATAL"))),t<=hr.error&&(J.error=console.error?console.error.bind(console,Ie("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Ie("ERROR"))),t<=hr.warn&&(J.warn=console.warn?console.warn.bind(console,Ie("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Ie("WARN"))),t<=hr.info&&(J.info=console.info?console.info.bind(console,Ie("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Ie("INFO"))),t<=hr.debug&&(J.debug=console.debug?console.debug.bind(console,Ie("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("DEBUG"))),t<=hr.trace&&(J.trace=console.debug?console.debug.bind(console,Ie("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Ie("TRACE")))},"setLogLevel"),Ie=p(e=>`%c${Tm().format("ss.SSS")} : ${e} : `,"format");const Is={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{const t=e/255;return e>.03928?Math.pow((t+.055)/1.055,2.4):t/12.92},hue2rgb:(e,t,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e),hsl2rgb:({h:e,s:t,l:r},i)=>{if(!t)return r*2.55;e/=360,t/=100,r/=100;const s=r<.5?r*(1+t):r+t-r*t,a=2*r-s;switch(i){case"r":return Is.hue2rgb(a,s,e+1/3)*255;case"g":return Is.hue2rgb(a,s,e)*255;case"b":return Is.hue2rgb(a,s,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:r},i)=>{e/=255,t/=255,r/=255;const s=Math.max(e,t,r),a=Math.min(e,t,r),n=(s+a)/2;if(i==="l")return n*100;if(s===a)return 0;const o=s-a,c=n>.5?o/(2-s-a):o/(s+a);if(i==="s")return c*100;switch(s){case e:return((t-r)/o+(t<r?6:0))*60;case t:return((r-e)/o+2)*60;case r:return((e-t)/o+4)*60;default:return-1}}},wm={clamp:(e,t,r)=>t>r?Math.min(t,Math.max(r,e)):Math.min(r,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},Bm={dec2hex:e=>{const t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}},Dt={channel:Is,lang:wm,unit:Bm},vr={};for(let e=0;e<=255;e++)vr[e]=Dt.unit.dec2hex(e);const Ce={ALL:0,RGB:1,HSL:2};let _m=class{constructor(){this.type=Ce.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=Ce.ALL}is(t){return this.type===t}};class vm{constructor(t,r){this.color=r,this.changed=!1,this.data=t,this.type=new _m}set(t,r){return this.color=r,this.changed=!1,this.data=t,this.type.type=Ce.ALL,this}_ensureHSL(){const t=this.data,{h:r,s:i,l:s}=t;r===void 0&&(t.h=Dt.channel.rgb2hsl(t,"h")),i===void 0&&(t.s=Dt.channel.rgb2hsl(t,"s")),s===void 0&&(t.l=Dt.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r,g:i,b:s}=t;r===void 0&&(t.r=Dt.channel.hsl2rgb(t,"r")),i===void 0&&(t.g=Dt.channel.hsl2rgb(t,"g")),s===void 0&&(t.b=Dt.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,r=t.r;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"r"))}get g(){const t=this.data,r=t.g;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"g"))}get b(){const t=this.data,r=t.b;return!this.type.is(Ce.HSL)&&r!==void 0?r:(this._ensureHSL(),Dt.channel.hsl2rgb(t,"b"))}get h(){const t=this.data,r=t.h;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"h"))}get s(){const t=this.data,r=t.s;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"s"))}get l(){const t=this.data,r=t.l;return!this.type.is(Ce.RGB)&&r!==void 0?r:(this._ensureRGB(),Dt.channel.rgb2hsl(t,"l"))}get a(){return this.data.a}set r(t){this.type.set(Ce.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(Ce.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(Ce.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(Ce.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(Ce.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(Ce.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}const fa=new vm({r:0,g:0,b:0,a:0},"transparent"),ni={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;const t=e.match(ni.re);if(!t)return;const r=t[1],i=parseInt(r,16),s=r.length,a=s%4===0,n=s>4,o=n?1:17,c=n?8:4,h=a?0:-1,l=n?255:15;return fa.set({r:(i>>c*(h+3)&l)*o,g:(i>>c*(h+2)&l)*o,b:(i>>c*(h+1)&l)*o,a:a?(i&l)*o/255:1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`#${vr[Math.round(t)]}${vr[Math.round(r)]}${vr[Math.round(i)]}${vr[Math.round(s*255)]}`:`#${vr[Math.round(t)]}${vr[Math.round(r)]}${vr[Math.round(i)]}`}},qr={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{const t=e.match(qr.hueRe);if(t){const[,r,i]=t;switch(i){case"grad":return Dt.channel.clamp.h(parseFloat(r)*.9);case"rad":return Dt.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return Dt.channel.clamp.h(parseFloat(r)*360)}}return Dt.channel.clamp.h(parseFloat(e))},parse:e=>{const t=e.charCodeAt(0);if(t!==104&&t!==72)return;const r=e.match(qr.re);if(!r)return;const[,i,s,a,n,o]=r;return fa.set({h:qr._hue2deg(i),s:Dt.channel.clamp.s(parseFloat(s)),l:Dt.channel.clamp.l(parseFloat(a)),a:n?Dt.channel.clamp.a(o?parseFloat(n)/100:parseFloat(n)):1},e)},stringify:e=>{const{h:t,s:r,l:i,a:s}=e;return s<1?`hsla(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%, ${s})`:`hsl(${Dt.lang.round(t)}, ${Dt.lang.round(r)}%, ${Dt.lang.round(i)}%)`}},rs={colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyanaqua:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",transparent:"#00000000",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},parse:e=>{e=e.toLowerCase();const t=rs.colors[e];if(t)return ni.parse(t)},stringify:e=>{const t=ni.stringify(e);for(const r in rs.colors)if(rs.colors[r]===t)return r}},Vi={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{const t=e.charCodeAt(0);if(t!==114&&t!==82)return;const r=e.match(Vi.re);if(!r)return;const[,i,s,a,n,o,c,h,l]=r;return fa.set({r:Dt.channel.clamp.r(s?parseFloat(i)*2.55:parseFloat(i)),g:Dt.channel.clamp.g(n?parseFloat(a)*2.55:parseFloat(a)),b:Dt.channel.clamp.b(c?parseFloat(o)*2.55:parseFloat(o)),a:h?Dt.channel.clamp.a(l?parseFloat(h)/100:parseFloat(h)):1},e)},stringify:e=>{const{r:t,g:r,b:i,a:s}=e;return s<1?`rgba(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)}, ${Dt.lang.round(s)})`:`rgb(${Dt.lang.round(t)}, ${Dt.lang.round(r)}, ${Dt.lang.round(i)})`}},er={format:{keyword:rs,hex:ni,rgb:Vi,rgba:Vi,hsl:qr,hsla:qr},parse:e=>{if(typeof e!="string")return e;const t=ni.parse(e)||Vi.parse(e)||qr.parse(e)||rs.parse(e);if(t)return t;throw new Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(Ce.HSL)||e.data.r===void 0?qr.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Vi.stringify(e):ni.stringify(e)},Cd=(e,t)=>{const r=er.parse(e);for(const i in t)r[i]=Dt.channel.clamp[i](t[i]);return er.stringify(r)},Fr=(e,t,r=0,i=1)=>{if(typeof e!="number")return Cd(e,{a:t});const s=fa.set({r:Dt.channel.clamp.r(e),g:Dt.channel.clamp.g(t),b:Dt.channel.clamp.b(r),a:Dt.channel.clamp.a(i)});return er.stringify(s)},Lm=e=>{const{r:t,g:r,b:i}=er.parse(e),s=.2126*Dt.channel.toLinear(t)+.7152*Dt.channel.toLinear(r)+.0722*Dt.channel.toLinear(i);return Dt.lang.round(s)},Fm=e=>Lm(e)>=.5,Fe=e=>!Fm(e),xd=(e,t,r)=>{const i=er.parse(e),s=i[t],a=Dt.channel.clamp[t](s+r);return s!==a&&(i[t]=a),er.stringify(i)},Y=(e,t)=>xd(e,"l",t),U=(e,t)=>xd(e,"l",-t),S=(e,t)=>{const r=er.parse(e),i={};for(const s in t)t[s]&&(i[s]=r[s]+t[s]);return Cd(e,i)},Am=(e,t,r=50)=>{const{r:i,g:s,b:a,a:n}=er.parse(e),{r:o,g:c,b:h,a:l}=er.parse(t),d=r/100,u=d*2-1,g=n-l,y=((u*g===-1?u:(u+g)/(1+u*g))+1)/2,x=1-y,C=i*y+o*x,b=s*y+c*x,k=a*y+h*x,w=n*d+l*(1-d);return Fr(C,b,k,w)},D=(e,t=100)=>{const r=er.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Am(r,e,t)};/*! @license DOMPurify 3.4.17 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.17/LICENSE */function Xl(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function Em(e){if(Array.isArray(e))return e}function Mm(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,a,n,o=[],c=!0,h=!1;try{if(a=(r=r.call(e)).next,t!==0)for(;!(c=(i=a.call(r)).done)&&(o.push(i.value),o.length!==t);c=!0);}catch(l){h=!0,s=l}finally{try{if(!c&&r.return!=null&&(n=r.return(),Object(n)!==n))return}finally{if(h)throw s}}return o}}function Om(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */function $m(e,t){return Em(e)||Mm(e,t)||Dm(e,t)||Om()}function Dm(e,t){if(e){if(typeof e=="string")return Xl(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Xl(e,t):void 0}}const bd=Object.entries,Vl=Object.setPrototypeOf,Im=Object.isFrozen,kd=Object.getPrototypeOf,Sd=Object.getOwnPropertyDescriptor;let ce=Object.freeze,me=Object.seal,ii=Object.create,Td=typeof Reflect<"u"&&Reflect,qo=Td.apply,No=Td.construct;ce||(ce=function(t){return t});me||(me=function(t){return t});qo||(qo=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),a=2;a<i;a++)s[a-2]=arguments[a];return t.apply(r,s)});No||(No=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const cr=Jt(Array.prototype.forEach),Pm=Jt(Array.prototype.lastIndexOf),Zl=Jt(Array.prototype.pop),Ri=Jt(Array.prototype.push),Rm=Jt(Array.prototype.slice),qm=Jt(Array.prototype.splice),li=Array.isArray,Ha=wd(Set),Ya=Jt(Set.prototype.add),qi=Jt(Set.prototype.has),Pr=Jt(String.prototype.toLowerCase),Ua=Jt(String.prototype.toString),Kl=Jt(String.prototype.match),Ni=Jt(String.prototype.replace),Ql=Jt(String.prototype.indexOf),Nm=Jt(String.prototype.trim),Wm=Jt(Number.prototype.toString),zm=Jt(Boolean.prototype.toString),Jl=typeof BigInt>"u"?null:Jt(BigInt.prototype.toString),th=typeof Symbol>"u"?null:Jt(Symbol.prototype.toString),Le=Jt(Object.prototype.hasOwnProperty),Wi=Jt(Object.prototype.toString),ge=Jt(RegExp.prototype.test),dr=wd(TypeError);function Jt(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return qo(e,t,i)}}function wd(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return No(e,r)}}function Ut(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Pr;if(Vl&&Vl(e,null),!li(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const a=r(s);a!==s&&(Im(t)||(t[i]=a),s=a)}e[s]=!0}return e}function Hm(e){for(let t=0;t<e.length;t++)Le(e,t)||(e[t]=null);return e}function Ee(e){const t=ii(null);for(const i of bd(e)){var r=$m(i,2);const s=r[0],a=r[1];Le(e,s)&&(li(a)?t[s]=Hm(a):a&&typeof a=="object"&&a.constructor===Object?t[s]=Ee(a):t[s]=a)}return t}function Ym(e){switch(typeof e){case"string":return e;case"number":return Wm(e);case"boolean":return zm(e);case"bigint":return Jl?Jl(e):"0";case"symbol":return th?th(e):"Symbol()";case"undefined":return Wi(e);case"function":case"object":{if(e===null)return Wi(e);const t=e,r=Pe(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Wi(i)}return Wi(e)}default:return Wi(e)}}function Pe(e,t){for(;e!==null;){const i=Sd(e,t);if(i){if(i.get)return Jt(i.get);if(typeof i.value=="function")return Jt(i.value)}e=kd(e)}function r(){return null}return r}function Um(e,t){for(;e!==null;){const r=Sd(e,t);if(r)return r.get?Jt(r.get):null;e=kd(e)}return null}function jm(e){try{return ge(e,""),!0}catch{return!1}}const eh=ce(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),ja=ce(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Ga=ce(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Gm=ce(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),Xa=ce(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),Xm=ce(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),rh=ce(["#text"]),ih=ce(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),Va=ce(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),sh=ce(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Ts=ce(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Vm=me(/{{[\w\W]*|^[\w\W]*}}/g),Zm=me(/<%[\w\W]*|^[\w\W]*%>/g),Km=me(/\${[\w\W]*/g),Qm=me(/^data-[\-\w.\u00B7-\uFFFF]+$/),Jm=me(/^aria-[\-\w]+$/),ah=me(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),ty=me(/^(?:\w+script|data):/i),ey=me(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ry=me(/^html$/i),iy=me(/^[a-z][.\w]*(-[.\w]+)+$/i),Za=me(/<[/\w!]/g),oh=me(/<[/\w]/g),sy=me(/<\/no(script|embed|frames)/i),nh=me(/\/>/i),se={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},ay=ce(Ut({},["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"])),oy=function(){return typeof window>"u"?null:window},ny=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const a="dompurify"+(i?"#"+i:"");try{return t.createPolicy(a,{createHTML(n){return n},createScriptURL(n){return n}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}},lh=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},Br=function(t,r,i,s){return Le(t,r)&&li(t[r])?Ut(s.base?Ee(s.base):{},t[r],s.transform):i},Ka=function(t,r,i){const s=Le(t,r)?t[r]:void 0;return s&&typeof s=="object"?Ee(s):i()};function Bd(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:oy();const t=at=>Bd(at);if(t.version="3.4.17",t.removed=[],!e||!e.document||e.document.nodeType!==se.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,n=e.Node,o=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,l=e.trustedTypes,d=o.prototype,u=Pe(d,"cloneNode"),g=Pe(d,"remove"),m=Pe(d,"removeAttributeNode"),y=Pe(d,"nextSibling"),x=Pe(d,"childNodes"),C=Pe(d,"parentNode"),b=Pe(d,"shadowRoot"),k=Pe(d,"attributes"),w=n&&n.prototype?Pe(n.prototype,"nodeType"):null,_=n&&n.prototype?Pe(n.prototype,"nodeName"):null,L=n&&n.prototype?Pe(n.prototype,"ownerDocument"):null,A=function(B){return w?w(B):B.nodeType},F=function(B){return _?_(B):B.nodeName},z=Um(d,"namespaceURI"),q=function(B){return z?z(B):B.namespaceURI};if(typeof a=="function"){const at=r.createElement("template");at.content&&at.content.ownerDocument&&(r=at.content.ownerDocument)}let I,rt="",W,E=!1,M=0;const v=function(){if(M>0)throw dr('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},R=function(B){v(),M++;try{return I.createHTML(B)}finally{M--}},$=function(B){v(),M++;try{return I.createScriptURL(B)}finally{M--}},X=function(){return E||(W=ny(l,s),E=!0),W},Z=r,lt=Z.implementation,ht=Z.createNodeIterator,ut=Z.createDocumentFragment,bt=Z.getElementsByTagName,Tt=i.importNode;let yt=lh();t.isSupported=typeof bd=="function"&&typeof C=="function"&<&<.createHTMLDocument!==void 0;const At=Vm,It=Zm,Bt=Km,ct=Qm,xt=Jm,Et=ty,Nt=ey,Gt=iy;let H=ah,kt=null;const ke=Ut({},[...eh,...ja,...Ga,...Xa,...rh]);let Ht=null;const or=Ut({},[...ih,...Va,...sh,...Ts]);let ue=Object.seal(ii(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),De=null,xr=null;const ie=Object.seal(ii(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let br=!0,Xe=!0,nr=!1,lr=!0,f=!1,P=!0,G=!1,K=!1,j=null,nt=null,T=!1,N=!1,it=!1,V=!1,Q=!0,ot=!1;const st="user-content-";let St=!0,ft=!1,wt=null,Lt={},qt=null;const Vt=Ut({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let $i=null;const kr=Ut({},["audio","video","img","source","image","track"]);let Sr=null;const Bl=Ut({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Cs="http://www.w3.org/1998/Math/MathML",xs="http://www.w3.org/2000/svg",Ve="http://www.w3.org/1999/xhtml";let Gr=Ve,La=!1,Fa=null;const Pf=Ut({},[Cs,xs,Ve],Ua),_l=ce(["mi","mo","mn","ms","mtext"]);let Aa=Ut({},_l);const vl=ce(["annotation-xml"]);let Ea=Ut({},vl);const Rf=Ut({},["title","style","font","a","script"]);let Di=null;const qf=["application/xhtml+xml","text/html"],Nf="text/html";let ee=null,Xr=null;const Wf=r.createElement("form"),Ll=function(B){return B instanceof RegExp||B instanceof Function},Ma=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Xr&&Xr===B)return;(!B||typeof B!="object")&&(B={}),B=Ee(B),Di=qf.indexOf(B.PARSER_MEDIA_TYPE)===-1?Nf:B.PARSER_MEDIA_TYPE,ee=Di==="application/xhtml+xml"?Ua:Pr,kt=Br(B,"ALLOWED_TAGS",ke,{transform:ee}),Ht=Br(B,"ALLOWED_ATTR",or,{transform:ee}),Fa=Br(B,"ALLOWED_NAMESPACES",Pf,{transform:Ua}),Sr=Br(B,"ADD_URI_SAFE_ATTR",Bl,{transform:ee,base:Bl}),$i=Br(B,"ADD_DATA_URI_TAGS",kr,{transform:ee,base:kr}),qt=Br(B,"FORBID_CONTENTS",Vt,{transform:ee}),De=Br(B,"FORBID_TAGS",Ee({}),{transform:ee}),xr=Br(B,"FORBID_ATTR",Ee({}),{transform:ee}),Lt=Le(B,"USE_PROFILES")?B.USE_PROFILES&&typeof B.USE_PROFILES=="object"?Ee(B.USE_PROFILES):B.USE_PROFILES:!1,br=B.ALLOW_ARIA_ATTR!==!1,Xe=B.ALLOW_DATA_ATTR!==!1,nr=B.ALLOW_UNKNOWN_PROTOCOLS||!1,lr=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,f=B.SAFE_FOR_TEMPLATES||!1,P=B.SAFE_FOR_XML!==!1,G=B.WHOLE_DOCUMENT||!1,N=B.RETURN_DOM||!1,it=B.RETURN_DOM_FRAGMENT||!1,V=B.RETURN_TRUSTED_TYPE||!1,T=B.FORCE_BODY||!1,Q=B.SANITIZE_DOM!==!1,ot=B.SANITIZE_NAMED_PROPS||!1,St=B.KEEP_CONTENT!==!1,ft=B.IN_PLACE||!1,H=jm(B.ALLOWED_URI_REGEXP)?B.ALLOWED_URI_REGEXP:ah,Gr=typeof B.NAMESPACE=="string"?B.NAMESPACE:Ve,Aa=Ka(B,"MATHML_TEXT_INTEGRATION_POINTS",()=>Ut({},_l)),Ea=Ka(B,"HTML_INTEGRATION_POINTS",()=>Ut({},vl));const O=Ka(B,"CUSTOM_ELEMENT_HANDLING",()=>ii(null));if(ue=ii(null),Le(O,"tagNameCheck")&&Ll(O.tagNameCheck)&&(ue.tagNameCheck=O.tagNameCheck),Le(O,"attributeNameCheck")&&Ll(O.attributeNameCheck)&&(ue.attributeNameCheck=O.attributeNameCheck),Le(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(ue.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),me(ue),f&&(Xe=!1),it&&(N=!0),Lt&&(kt=Ut({},rh),Ht=ii(null),Lt.html===!0&&(Ut(kt,eh),Ut(Ht,ih)),Lt.svg===!0&&(Ut(kt,ja),Ut(Ht,Va),Ut(Ht,Ts)),Lt.svgFilters===!0&&(Ut(kt,Ga),Ut(Ht,Va),Ut(Ht,Ts)),Lt.mathMl===!0&&(Ut(kt,Xa),Ut(Ht,sh),Ut(Ht,Ts))),ie.tagCheck=null,ie.attributeCheck=null,Le(B,"ADD_TAGS")&&(typeof B.ADD_TAGS=="function"?ie.tagCheck=B.ADD_TAGS:li(B.ADD_TAGS)&&(kt===ke&&(kt=Ee(kt)),Ut(kt,B.ADD_TAGS,ee))),Le(B,"ADD_ATTR")&&(typeof B.ADD_ATTR=="function"?ie.attributeCheck=B.ADD_ATTR:li(B.ADD_ATTR)&&(Ht===or&&(Ht=Ee(Ht)),Ut(Ht,B.ADD_ATTR,ee))),Le(B,"ADD_FORBID_CONTENTS")&&li(B.ADD_FORBID_CONTENTS)&&(qt===Vt&&(qt=Ee(qt)),Ut(qt,B.ADD_FORBID_CONTENTS,ee)),St&&(kt["#text"]=!0),G&&Ut(kt,["html","head","body"]),kt.table&&(Ut(kt,["tbody"]),delete De.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw dr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw dr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const tt=I;I=B.TRUSTED_TYPES_POLICY;try{rt=R("")}catch(et){throw I=tt,et}}else B.TRUSTED_TYPES_POLICY===null?(I=void 0,rt=""):(I===void 0&&(I=X()),I&&typeof rt=="string"&&(rt=R("")));ce&&ce(B),Xr=B},Fl=Ut({},[...ja,...Ga,...Gm]),Al=Ut({},[...Xa,...Xm]),zf=function(B,O,tt){return O.namespaceURI===Ve?B==="svg":O.namespaceURI===Cs?B==="svg"&&(tt==="annotation-xml"||Aa[tt]):!!Fl[B]},Hf=function(B,O,tt){return O.namespaceURI===Ve?B==="math":O.namespaceURI===xs?B==="math"&&Ea[tt]:!!Al[B]},Yf=function(B,O,tt){return O.namespaceURI===xs&&!Ea[tt]||O.namespaceURI===Cs&&!Aa[tt]?!1:!Al[B]&&(Rf[B]||!Fl[B])},Uf=function(B){const O=q(B),tt=Pr(F(B)),et=C(B);let Ft,$t;return et&&A(et)===se.element?(Ft={namespaceURI:q(et)},$t=Pr(F(et))):(Ft={namespaceURI:Gr},$t="template"),Fa[O]?O===xs?zf(tt,Ft,$t):O===Cs?Hf(tt,Ft,$t):O===Ve?Yf(tt,Ft,$t):!!(Di==="application/xhtml+xml"&&Fa[O]):!1},Tr=function(B){Ri(t.removed,{element:B});try{C(B).removeChild(B)}catch{if(g(B),!C(B))throw dr("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},El=function(B,O,tt){try{m(B,O)}catch{try{B.removeAttribute(tt)}catch{}}},Oa=function(B){Da(B);const O=x(B);O&&cr(Rm(O),et=>{try{g(et)}catch{}});const tt=A(B)===se.element?k(B):null;if(tt)for(let et=tt.length-1;et>=0;--et){const Ft=tt[et],$t=Ft&&Ft.name;typeof $t=="string"&&El(B,Ft,$t)}},Vr=function(B,O,tt){if(!tt)try{tt=O.getAttributeNode(B)}catch{tt=null}Ri(t.removed,{attribute:tt||null,from:O});try{tt?m(O,tt):O.removeAttribute(B)}catch{try{O.removeAttribute(B)}catch{}}if(B==="is")if(N||it)try{Tr(O)}catch{}else try{O.setAttribute(B,"")}catch{}},Ml=function(B){const O=k(B);if(O)for(let tt=O.length-1;tt>=0;--tt){const et=O[tt],Ft=et&&et.name;typeof Ft!="string"||Ht[ee(Ft)]||El(B,et,Ft)}},$a=function(B,O){let tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;const et=[B];for(;et.length>0;){const Ft=et.pop();if(O(Ft)===!1)continue;if(tt&&A(Ft)===se.element){const zt=b(Ft);wr(zt)&&et.push(zt)}const $t=x(Ft);if($t)for(let zt=$t.length-1;zt>=0;--zt)et.push($t[zt])}},Da=function(B){$a(B,O=>{A(O)===se.element&&Ml(O)})},Ia=function(B){const O=[];return $a(B,tt=>{O.push(tt)},!0),O},jf=function(B,O){const tt=Ha();cr(Ia(B),et=>{A(et)===se.element&&Ya(tt,et)}),cr(O,et=>{A(et)===se.element&&!qi(tt,et)&&Ml(et)})},Ol=function(B,O){let tt=!1;return cr(t.removed,et=>{et.element&&(tt=tt||et.element===B,Da(et.element))}),jf(B,O),tt},Gf=8,Xf=function(B,O){const tt=wt;let et=null;const Ft=()=>(et||(et=Ha(),cr(O,$t=>{Ya(et,$t)})),et);for(let $t=0;;$t++){const zt=Ia(B),le=[B];let Ze=!1;if(cr(zt,Se=>{A(Se)===se.documentFragment?Ri(le,Se):!Ze&&!qi(tt,Se)&&(Ze=qi(Ft(),Se))}),!Ze)return;if($t>=Gf)throw dr("the tree kept changing during in-place sanitization; refusing to return it");cr(le,(Se,Be)=>{Vf(Se,Be>0,B,Ft())})}},Vf=function(B,O,tt,et){const Ft=Pa(B);let $t;for(;$t=Ft.nextNode();)!qi(et,$t)||qi(wt,$t)||(O&&ze(yt.uponSanitizeShadowNode,$t,null),qa($t,tt),Na($t,tt),wr($t.content)&&Pi($t.content))},Zf=function(B){wt&&Ya(wt,B)},$l=function(B,O){return P?B==="patchsrc"?!0:B==="for"&&O!=="label"&&O!=="output":!1},Kf=function(B){P&&$a(B,O=>{const tt=A(O);if(tt===se.processingInstruction||tt===se.comment&&ge(oh,O.data)){try{g(O)}catch{}return!1}if(tt===se.element){const et=O,Ft=ee(F(O));try{et.hasAttribute&&et.hasAttribute("patchsrc")&&et.removeAttribute("patchsrc"),et.hasAttribute&&et.hasAttribute("for")&&$l("for",Ft)&&et.removeAttribute("for")}catch{}}return!0})},Dl=function(B){let O=null,tt=null;if(T)B="<remove></remove>"+B;else{const $t=Kl(B,/^[\r\n\t ]+/);tt=$t&&$t[0]}Di==="application/xhtml+xml"&&Gr===Ve&&(B='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+B+"</body></html>");const et=I?R(B):B;if(Gr===Ve)try{O=new h().parseFromString(et,Di)}catch{}if(!O||!O.documentElement){O=lt.createDocument(Gr,"template",null);try{O.documentElement.innerHTML=La?rt:et}catch{}}const Ft=O.body||O.documentElement;return B&&tt&&Ft.insertBefore(r.createTextNode(tt),Ft.childNodes[0]||null),Gr===Ve?bt.call(O,G?"html":"body")[0]:G?O.documentElement:Ft},Pa=function(B){const O=L?L(B):B.ownerDocument;return ht.call(O||B,B,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},bs=function(B){return B=Ni(B,At," "),B=Ni(B,It," "),B=Ni(B,Bt," "),B},Ra=function(B){var O;Il(B);const tt=(O=B.querySelectorAll)===null||O===void 0?void 0:O.call(B,"template");tt&&cr(tt,et=>{wr(et.content)&&Ra(et.content)})},Il=function(B){B.normalize();const O=L?L(B):B.ownerDocument,tt=ht.call(O||B,B,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let et=tt.nextNode();for(;et;)et.data=bs(et.data),et=tt.nextNode()},ks=function(B){const O=_?_(B):null;return typeof O!="string"||ee(O)!=="form"?!1:typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||B.attributes!==k(B)||typeof B.removeAttribute!="function"||typeof B.removeAttributeNode!="function"||typeof B.getAttributeNode!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function"||B.nodeType!==w(B)||B.childNodes!==x(B)},wr=function(B){if(!w||typeof B!="object"||B===null)return!1;try{return w(B)===se.documentFragment}catch{return!1}},Ii=function(B){if(!w||typeof B!="object"||B===null)return!1;try{return typeof w(B)=="number"}catch{return!1}};function ze(at,B,O){at.length!==0&&cr(at,tt=>{tt.call(t,B,O,Xr)})}const Qf=function(B,O){return!!(P&&B.hasChildNodes()&&!Ii(B.firstElementChild)&&ge(Za,B.textContent)&&ge(Za,B.innerHTML)||P&&ay[O]&&A(B)===se.element&&q(B)===Ve&&(Ii(B.firstElementChild)||typeof B.textContent=="string"&&ge(Za,B.textContent))||B.nodeType===se.processingInstruction||P&&B.nodeType===se.comment&&ge(oh,B.data))},Ss=function(B,O){if(B instanceof RegExp)return ge(B,O);if(B instanceof Function){for(var tt=arguments.length,et=new Array(tt>2?tt-2:0),Ft=2;Ft<tt;Ft++)et[Ft-2]=arguments[Ft];return!!B(O,...et)}return!1},Jf=function(B,O,tt){if(!De[O]&&ql(O)&&Ss(ue.tagNameCheck,O))return!1;if(St&&!qt[O]&&!qt[Pr(O)]){const et=C(B),Ft=x(B);if(Ft&&et){const $t=Ft.length;for(let zt=$t-1;zt>=0;--zt){const le=B===tt?u(Ft[zt],!0):Ft[zt];et.insertBefore(le,y(B))}}}return Tr(B),!0},Pl=function(B,O,tt,et){return B.length===0?O:O===tt||O===et?Ee(O):O},Zr=function(B,O){return B===O||C(B)!==null?!1:(ft&&Da(B),!0)},qa=function(B,O){if(Zf(B),ze(yt.beforeSanitizeElements,B,null),Zr(B,O))return!0;if(ks(B))return Tr(B),!0;const tt=ee(F(B));if(kt=Pl(yt.uponSanitizeElement,kt,ke,j),ze(yt.uponSanitizeElement,B,{tagName:tt,allowedTags:kt}),Zr(B,O))return!0;if(Qf(B,tt))return Tr(B),!0;if(De[tt]||!(ie.tagCheck instanceof Function&&ie.tagCheck(tt))&&!kt[tt]){const et=Jf(B,tt,O);return et===!1&&(ze(yt.afterSanitizeElements,B,null),Zr(B,O))?!0:et}if(A(B)===se.element&&!Uf(B)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&ge(sy,B.innerHTML))return Tr(B),!0;if(f&&B.nodeType===se.text){const et=bs(B.textContent);B.textContent!==et&&(Ri(t.removed,{element:B.cloneNode()}),B.textContent=et)}return ze(yt.afterSanitizeElements,B,null),Zr(B,O)},Rl=function(B,O,tt){if(xr[O]||$l(O,B)||Q&&(O==="id"||O==="name")&&(tt in r||tt in Wf))return!1;const et=Ht[O]||ie.attributeCheck instanceof Function&&ie.attributeCheck(O,B);return Xe&&ge(ct,O)||br&&ge(xt,O)?!0:et?Sr[O]||ge(H,Ni(tt,Nt,""))||(O==="src"||O==="xlink:href"||O==="href")&&B!=="script"&&Ql(tt,"data:")===0&&$i[B]||nr&&!ge(Et,Ni(tt,Nt,""))?!0:!tt:ql(B)&&Ss(ue.tagNameCheck,B)&&Ss(ue.attributeNameCheck,O,B)||O==="is"&&ue.allowCustomizedBuiltInElements&&Ss(ue.tagNameCheck,tt)},tm=Ut({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),ql=function(B){return!tm[Pr(B)]&&ge(Gt,B)},em=function(B,O,tt,et){if(I&&typeof l=="object"&&typeof l.getAttributeType=="function"&&!tt)switch(l.getAttributeType(B,O)){case"TrustedHTML":return R(et);case"TrustedScriptURL":return $(et)}return et},rm=function(B,O,tt,et){try{return tt?B.setAttributeNS(tt,O,et):B.setAttribute(O,et),ks(B)?(Tr(B),!1):!0}catch{return Vr(O,B),!1}},Nl=function(B,O){return P&&ge(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,O)?!0:Pr(B)==="attributename"&&Kl(O,"href")!==null},Na=function(B,O){if(ze(yt.beforeSanitizeAttributes,B,null),Zr(B,O))return;const tt=B.attributes;if(!tt||ks(B))return;Ht=Pl(yt.uponSanitizeAttribute,Ht,or,nt);const et={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:Ht,forceKeepAttr:void 0};let Ft=tt.length;const $t=ee(B.nodeName);for(;Ft--;){const zt=tt[Ft],le=zt.name,Ze=zt.namespaceURI,Se=zt.value,Be=ee(le),Kr=Se;let _e=le==="value"?Kr:Nm(Kr),Wl=!1;if(et.attrName=Be,et.attrValue=_e,et.keepAttr=!0,et.forceKeepAttr=void 0,ze(yt.uponSanitizeAttribute,B,et),_e=et.attrValue,ot&&(Be==="id"||Be==="name")&&Ql(_e,st)!==0&&(Vr(le,B,zt),_e=st+_e,Wl=!0),Nl(le,_e)){Vr(le,B,zt);continue}if(!et.forceKeepAttr){if(!et.keepAttr){Vr(le,B,zt);continue}if(!lr&&ge(nh,_e)){Vr(le,B,zt);continue}if(f&&(_e=bs(_e)),!Rl($t,Be,_e)){Vr(le,B,zt);continue}_e=em($t,Be,Ze,_e),_e!==Kr&&rm(B,le,Ze,_e)&&Wl&&Zl(t.removed)}}ze(yt.afterSanitizeAttributes,B,null),Zr(B,O)},Pi=function(B){let O=null;const tt=Pa(B);for(ze(yt.beforeSanitizeShadowDOM,B,null);O=tt.nextNode();)if(ze(yt.uponSanitizeShadowNode,O,null),qa(O,B),Na(O,B),wr(O.content)&&Pi(O.content),A(O)===se.element){const et=b(O);wr(et)&&(Wa(et),Pi(et))}f&&Il(B),ze(yt.afterSanitizeShadowDOM,B,null)},Wa=function(B){const O=[{node:B,shadow:null}];for(;O.length>0;){const tt=O.pop();if(tt.shadow){Pi(tt.shadow);continue}const et=tt.node,Ft=A(et)===se.element,$t=x(et);if($t)for(let zt=$t.length-1;zt>=0;--zt)O.push({node:$t[zt],shadow:null});if(Ft){const zt=_?_(et):null;if(typeof zt=="string"&&ee(zt)==="template"){const le=et.content;wr(le)&&O.push({node:le,shadow:null})}}if(Ft){const zt=b(et);wr(zt)&&O.push({node:null,shadow:zt},{node:zt,shadow:null})}}};return t.sanitize=function(at){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,tt=null,et=null,Ft=null;if(La=!at,La&&(at="<!-->"),typeof at!="string"&&!Ii(at)&&(at=Ym(at),typeof at!="string"))throw dr("dirty is not a string, aborting");if(!t.isSupported)return at;K?(kt=j,Ht=nt):Ma(B),(yt.uponSanitizeElement.length>0||yt.uponSanitizeAttribute.length>0)&&(kt=Ee(kt)),yt.uponSanitizeAttribute.length>0&&(Ht=Ee(Ht)),t.removed=[];const $t=ft&&typeof at!="string"&&Ii(at);let zt=[];const le=wt;if($t){Kf(at);const Be=F(at);if(typeof Be=="string"){const Kr=ee(Be);if(!kt[Kr]||De[Kr])throw Oa(at),dr("root node is forbidden and cannot be sanitized in-place")}if(ks(at))throw Oa(at),dr("root node is clobbered and cannot be sanitized in-place");zt=Ia(at),wt=Ha()}else if(Ii(at))O=Dl("<!---->"),tt=O.ownerDocument.importNode(at,!0),tt.nodeType===se.element&&tt.nodeName==="BODY"||tt.nodeName==="HTML"?O=tt:O.appendChild(tt),Wa(O);else{if(!N&&!f&&!G&&at.indexOf("<")===-1)return I&&V?R(at):at;if(O=Dl(at),!O)return N?null:V?rt:""}O&&T&&Tr(O.firstChild);const Ze=$t?at:O;try{$t&&Wa(at);const Be=Pa(Ze);for(;et=Be.nextNode();)qa(et,Ze),Na(et,Ze),wr(et.content)&&Pi(et.content);$t&&Xf(at,zt)}catch(Be){throw $t&&(Oa(at),Ol(at,zt)),Be}finally{wt=le}if($t){if(Ol(at,zt))throw dr("a node selected for removal could not be safely returned; refusing to sanitize in place");return f&&Ra(at),at}if(N){if(f&&Ra(O),it)for(Ft=ut.call(O.ownerDocument);O.firstChild;)Ft.appendChild(O.firstChild);else Ft=O;return(Ht.shadowroot||Ht.shadowrootmode)&&(Ft=Tt.call(i,Ft,!0)),Ft}let Se=G?O.outerHTML:O.innerHTML;return G&&kt["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&ge(ry,O.ownerDocument.doctype.name)&&(Se="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
4
|
+
`+Se),f&&(Se=bs(Se)),I&&V?R(Se):Se},t.setConfig=function(){let at=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};Ma(at),K=!0,j=kt,nt=Ht},t.clearConfig=function(){Xr=null,K=!1,j=null,nt=null,I=W,rt=""},t.isValidAttribute=function(at,B,O){Xr||Ma({});const tt=ee(at),et=ee(B);return typeof O=="string"&&(Nl(B,O)||!lr&&ge(nh,O))?!1:Rl(tt,et,O)},t.addHook=function(at,B){typeof B=="function"&&Le(yt,at)&&Ri(yt[at],B)},t.removeHook=function(at,B){if(Le(yt,at)){if(B!==void 0){const O=Pm(yt[at],B);return O===-1?void 0:qm(yt[at],O,1)[0]}return Zl(yt[at])}},t.removeHooks=function(at){Le(yt,at)&&(yt[at]=[])},t.removeAllHooks=function(){yt=lh()},t}var Bi=Bd(),is=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xs=/\s/,ly=p(e=>{let t="",r=0,i=0;for(;i<e.length;){const s=e.indexOf("%%",i);if(s===-1)break;const a=e.indexOf(`
|
|
5
|
+
`,s);if(a===-1)break;let n=s;for(;n>r&&Xs.test(e[n-1]);)n--;t+=e.slice(r,n)+`
|
|
6
|
+
`,r=a+1,i=r}return t+e.slice(r)},"stripAnyComments"),Ps=p(e=>e===`
|
|
7
|
+
`||e==="\r","isLineBreak"),hy=p((e,t)=>{let r=-1;for(let i=t;i<e.length&&Xs.test(e[i]);i++)Ps(e[i])&&(r=i);return r},"lastLineBreakInWhitespaceRun"),_d=p(e=>{let t=0;for(;t<e.length&&Xs.test(e[t])&&!Ps(e[t]);)t++;const r=e.slice(0,t);if(!e.startsWith("---",t))return;const i=[];for(let l=t+3;l<e.length&&Xs.test(e[l]);l++)Ps(e[l])&&i.push(l);if(i.length===0)return;const s=`${r}---`,a=p(l=>Ps(e[l])&&e.startsWith(s,l+1)?hy(e,l+1+s.length):-1,"closingEnd"),n=i[0]+1;let o=-1;for(let l=n;l<e.length;l++)a(l)!==-1&&(o=l);if(o===-1)return;let c=i[0];for(const l of i)l<o&&(c=l);const h=c+1;for(let l=h;l<=o;l++){const d=a(l);if(d!==-1)return{indent:r,body:e.slice(h,l),length:d+1}}},"matchFrontMatter"),ci,vd=(ci=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},p(ci,"UnknownDiagramError"),ci),zr={},ma=p(function(e,t){const r=_d(e);e=ly((r?e.slice(r.length):e).replace(is,""));for(const[i,{detector:s}]of Object.entries(zr))if(s(e,t))return i;throw new vd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Wo=p((...e)=>{for(const{id:t,detector:r,loader:i}of e)Ld(t,r,i)},"registerLazyLoadedDiagrams"),Ld=p((e,t,r)=>{zr[e]&&J.warn(`Detector with key ${e} already exists. Overwriting.`),zr[e]={detector:t,loader:r},J.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),cy=p(e=>zr[e].loader,"getDiagramLoader"),zo=p((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>zo(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([a,n])=>{if(typeof n=="object"){if(n===null)return;Object.hasOwn(e,a)||Object.defineProperty(e,a,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[a]===void 0&&(s[a]=Array.isArray(n)?[]:{}),typeof s[a]=="object"&&(s[a]=zo(s[a],n,{depth:r-1}))}else typeof s[a]!="object"&&(Object.hasOwn(e,a)?s[a]=n:Object.defineProperty(e,a,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),oe=zo,rr="#ffffff",ir="#f2f2f2",Ot=p((e,t)=>t?S(e,{s:-40,l:10}):S(e,{s:-40,l:-10}),"mkBorder"),hh=p(e=>typeof e=="object"&&e!==null&&!Array.isArray(e),"isPlainObject"),Ge=p((e,t)=>hh(e)&&hh(t)?{...e,...t}:t,"applyOverride"),di,dy=(di=class{constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var r,i,s,a,n,o,c,h,l,d,u,g,m,y,x,C,b,k,w,_,L,A,F,z,q,I,rt,W,E,M,v,R,$,X,Z,lt,ht,ut,bt,Tt,yt,At,It,Bt,ct,xt,Et,Nt,Gt,H;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||U(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10)):(this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],75);else for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScale"+kt]=U(this["cScale"+kt],25);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleInv"+kt]=this["cScaleInv"+kt]||D(this["cScale"+kt]);for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this.darkMode?this["cScalePeer"+kt]=this["cScalePeer"+kt]||Y(this["cScale"+kt],10):this["cScalePeer"+kt]=this["cScalePeer"+kt]||U(this["cScale"+kt],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let kt=0;kt<this.THEME_COLOR_LIMIT;kt++)this["cScaleLabel"+kt]=this["cScaleLabel"+kt]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let kt=0;kt<5;kt++)this["surface"+kt]=this["surface"+kt]||S(this.mainBkg,{h:180,s:-15,l:t*(5+kt*3)}),this["surfacePeer"+kt]=this["surfacePeer"+kt]||S(this.mainBkg,{h:180,s:-15,l:t*(8+kt*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((a=this.cynefin)==null?void 0:a.boundaryWidth)||2,cliffColor:((n=this.cynefin)==null?void 0:n.cliffColor)||"#8B0000",cliffWidth:((o=this.cynefin)==null?void 0:o.cliffWidth)||4,arrowColor:((c=this.cynefin)==null?void 0:c.arrowColor)||this.lineColor,arrowWidth:((h=this.cynefin)==null?void 0:h.arrowWidth)||2,complexBg:((l=this.cynefin)==null?void 0:l.complexBg)||"#E8F5E9",complicatedBg:((d=this.cynefin)==null?void 0:d.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((m=this.cynefin)==null?void 0:m.confusionBg)||"#F3E5F5",textColor:((y=this.cynefin)==null?void 0:y.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((C=this.radar)==null?void 0:C.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((k=this.radar)==null?void 0:k.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((_=this.radar)==null?void 0:_.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((F=this.radar)==null?void 0:F.graticuleOpacity)||.3,legendBoxSize:((z=this.radar)==null?void 0:z.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((I=this.wardley)==null?void 0:I.backgroundColor)||this.background,axisColor:((rt=this.wardley)==null?void 0:rt.axisColor)||this.lineColor,axisTextColor:((W=this.wardley)==null?void 0:W.axisTextColor)||this.primaryTextColor,gridColor:((E=this.wardley)==null?void 0:E.gridColor)||this.gridColor,componentFill:((M=this.wardley)==null?void 0:M.componentFill)||this.background,componentStroke:((v=this.wardley)==null?void 0:v.componentStroke)||this.lineColor,componentLabelColor:((R=this.wardley)==null?void 0:R.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((X=this.wardley)==null?void 0:X.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Z=this.wardley)==null?void 0:Z.annotationStroke)||this.lineColor,annotationTextColor:((lt=this.wardley)==null?void 0:lt.annotationTextColor)||this.primaryTextColor,annotationFill:((ht=this.wardley)==null?void 0:ht.annotationFill)||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((ut=this.xyChart)==null?void 0:ut.backgroundColor)||this.background,titleColor:((bt=this.xyChart)==null?void 0:bt.titleColor)||this.primaryTextColor,dataLabelColor:((Tt=this.xyChart)==null?void 0:Tt.dataLabelColor)||this.primaryTextColor,legendTextColor:((yt=this.xyChart)==null?void 0:yt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((At=this.xyChart)==null?void 0:At.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((It=this.xyChart)==null?void 0:It.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((ct=this.xyChart)==null?void 0:ct.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((xt=this.xyChart)==null?void 0:xt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Et=this.xyChart)==null?void 0:Et.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Gt=this.xyChart)==null?void 0:Gt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((H=this.xyChart)==null?void 0:H.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])}),Object.hasOwn(t,"nodeBorder")&&!Object.hasOwn(t,"useGradient")&&(this.useGradient=!1)}},p(di,"Theme"),di),uy=p(e=>{const t=new dy;return t.calculate(e),t},"getThemeVariables"),ui,gy=(ui=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.lineColor=D(this.background),this.textColor=D(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(D("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Fr(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=U("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=U(this.sectionBkgColor,10),this.taskBorderColor=Fr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Fr(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||Y(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||U(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){var t,r,i,s,a,n,o,c,h,l,d,u,g,m,y,x,C,b,k,w,_,L,A,F,z,q,I,rt,W,E,M,v,R,$,X,Z,lt,ht,ut,bt,Tt,yt,At,It,Bt,ct,xt,Et,Nt,Gt;this.secondBkg=Y(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=Y(this.labelBackground,25),this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=Y(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=D(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||"#0b0000",this.cScale2=this.cScale2||"#4d1037",this.cScale3=this.cScale3||"#3f5258",this.cScale4=this.cScale4||"#4f2f1b",this.cScale5=this.cScale5||"#6e0a0a",this.cScale6=this.cScale6||"#3b0048",this.cScale7=this.cScale7||"#995a01",this.cScale8=this.cScale8||"#154706",this.cScale9=this.cScale9||"#161722",this.cScale10=this.cScale10||"#00296f",this.cScale11=this.cScale11||"#01629c",this.cScale12=this.cScale12||"#010029",this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||D(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10);for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||S(this.mainBkg,{h:30,s:-30,l:-(-10+H*4)}),this["surfacePeer"+H]=this["surfacePeer"+H]||S(this.mainBkg,{h:30,s:-30,l:-(-7+H*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??Y(this["cScale"+H],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#FF6B6B",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#1B5E20",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#0D47A1",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#BF360C",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#F57F17",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#4A148C",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.plotColorPalette)||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((X=this.radar)==null?void 0:X.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((ut=this.wardley)==null?void 0:ut.backgroundColor)||this.background,axisColor:((bt=this.wardley)==null?void 0:bt.axisColor)||this.lineColor,axisTextColor:((Tt=this.wardley)==null?void 0:Tt.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.mainBkg,componentStroke:((It=this.wardley)==null?void 0:It.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((xt=this.wardley)==null?void 0:xt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Gt=this.wardley)==null?void 0:Gt.annotationFill)||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=Y(this.secondaryColor,20),this.git1=Y(this.pie2||this.secondaryColor,20),this.git2=Y(this.pie3||this.tertiaryColor,20),this.git3=Y(this.pie4||S(this.primaryColor,{h:-30}),20),this.git4=Y(this.pie5||S(this.primaryColor,{h:-60}),20),this.git5=Y(this.pie6||S(this.primaryColor,{h:-90}),10),this.git6=Y(this.pie7||S(this.primaryColor,{h:60}),10),this.git7=Y(this.pie8||S(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||D(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||D(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||Y("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||Y("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||Y("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||Y("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||Y(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||Y(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Y(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||Y(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(ui,"Theme"),ui),py=p(e=>{const t=new gy;return t.calculate(e),t},"getThemeVariables"),gi,fy=(gi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=S(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.lineColor=D(this.background),this.textColor=D(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Fr(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){var t,r,i,s,a,n,o,c,h,l,d,u,g,m,y,x,C,b,k,w,_,L,A,F,z,q,I,rt,W,E,M,v,R,$,X,Z,lt,ht,ut,bt,Tt,yt,At,It,Bt,ct,xt,Et,Nt,Gt;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||S(this["cScale"+H],{h:180});for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||S(this.mainBkg,{h:30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||S(this.mainBkg,{h:30,l:-(7+H*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||D(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||D(this.labelTextColor);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||S(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||S(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((ut=this.xyChart)==null?void 0:ut.titleColor)||this.primaryTextColor,dataLabelColor:((bt=this.xyChart)==null?void 0:bt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Tt=this.xyChart)==null?void 0:Tt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((It=this.xyChart)==null?void 0:It.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Gt=this.xyChart)==null?void 0:Gt.plotColorPalette)||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||U(D(this.git0),25),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||D(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||D(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(gi,"Theme"),gi),my=p(e=>{const t=new fy;return t.calculate(e),t},"getThemeVariables"),pi,yy=(pi=class{constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=Y("#cde498",10),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.primaryColor),this.lineColor=D(this.background),this.textColor=D(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){var t,r,i,s,a,n,o,c,h,l,d,u,g,m,y,x,C,b,k,w,_,L,A,F,z,q,I,rt,W,E,M,v,R,$,X,Z,lt,ht,ut,bt,Tt,yt,At,It,Bt,ct,xt,Et,Nt,Gt;this.actorBorder=U(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||U(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||U(this.tertiaryColor,40);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScale"+H]=U(this["cScale"+H],10),this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],25);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||S(this["cScale"+H],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||S(this.mainBkg,{h:30,s:-30,l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||S(this.mainBkg,{h:30,s:-30,l:-(8+H*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||Y(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-30}),this.pie5=this.pie5||S(this.secondaryColor,{l:-30}),this.pie6=this.pie6||S(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??S(this.primaryColor,{l:-30}),this.venn2=this.venn2??S(this.secondaryColor,{l:-30}),this.venn3=this.venn3??S(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??S(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??S(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??S(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??S(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??S(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B4513",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#C8E6C9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#DCEDC8",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FFE0B2",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF9C4",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#D7CCC8",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((C=this.radar)==null?void 0:C.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((k=this.radar)==null?void 0:k.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((_=this.radar)==null?void 0:_.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((L=this.radar)==null?void 0:L.graticuleStrokeWidth)||1,graticuleOpacity:((A=this.radar)==null?void 0:A.graticuleOpacity)||.3,legendBoxSize:((F=this.radar)==null?void 0:F.legendBoxSize)||12,legendFontSize:((z=this.radar)==null?void 0:z.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((I=this.wardley)==null?void 0:I.axisColor)||this.lineColor,axisTextColor:((rt=this.wardley)==null?void 0:rt.axisTextColor)||this.primaryTextColor,gridColor:((W=this.wardley)==null?void 0:W.gridColor)||this.gridColor,componentFill:((E=this.wardley)==null?void 0:E.componentFill)||this.background,componentStroke:((M=this.wardley)==null?void 0:M.componentStroke)||this.lineColor,componentLabelColor:((v=this.wardley)==null?void 0:v.componentLabelColor)||this.primaryTextColor,linkStroke:((R=this.wardley)==null?void 0:R.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((X=this.wardley)==null?void 0:X.annotationStroke)||this.lineColor,annotationTextColor:((Z=this.wardley)==null?void 0:Z.annotationTextColor)||this.primaryTextColor,annotationFill:((lt=this.wardley)==null?void 0:lt.annotationFill)||this.background},this.xyChart={backgroundColor:((ht=this.xyChart)==null?void 0:ht.backgroundColor)||this.background,titleColor:((ut=this.xyChart)==null?void 0:ut.titleColor)||this.primaryTextColor,dataLabelColor:((bt=this.xyChart)==null?void 0:bt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Tt=this.xyChart)==null?void 0:Tt.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((At=this.xyChart)==null?void 0:At.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((It=this.xyChart)==null?void 0:It.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((Bt=this.xyChart)==null?void 0:Bt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((ct=this.xyChart)==null?void 0:ct.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Et=this.xyChart)==null?void 0:Et.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Nt=this.xyChart)==null?void 0:Nt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((Gt=this.xyChart)==null?void 0:Gt.plotColorPalette)||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||D(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||D(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(pi,"Theme"),pi),Cy=p(e=>{const t=new yy;return t.calculate(e),t},"getThemeVariables"),fi,xy=(fi=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=Y(this.contrast,55),this.background="#ffffff",this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.lineColor=D(this.background),this.textColor=D(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||Y(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){var t,r,i,s,a,n,o,c,h,l,d,u,g,m,y,x,C,b,k,w,_,L,A,F,z,q,I,rt,W,E,M,v,R,$,X,Z,lt,ht,ut,bt,Tt,yt,At,It,Bt,ct,xt,Et,Nt,Gt;this.secondBkg=Y(this.contrast,55),this.border2=this.contrast,this.actorBorder=Y(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleInv"+H]=this["cScaleInv"+H]||D(this["cScale"+H]);for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this.darkMode?this["cScalePeer"+H]=this["cScalePeer"+H]||Y(this["cScale"+H],10):this["cScalePeer"+H]=this["cScalePeer"+H]||U(this["cScale"+H],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["cScaleLabel"+H]=this["cScaleLabel"+H]||this.scaleLabelColor;for(let H=0;H<5;H++)this["surface"+H]=this["surface"+H]||S(this.mainBkg,{l:-(5+H*5)}),this["surfacePeer"+H]=this["surfacePeer"+H]||S(this.mainBkg,{l:-(8+H*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.sectionBkgColor=Y(this.contrast,30),this.sectionBkgColor2=Y(this.contrast,30),this.taskBorderColor=U(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=Y(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=U(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=S(this.primaryColor,{h:64}),this.fillType3=S(this.secondaryColor,{h:64}),this.fillType4=S(this.primaryColor,{h:-64}),this.fillType5=S(this.secondaryColor,{h:-64}),this.fillType6=S(this.primaryColor,{h:128}),this.fillType7=S(this.secondaryColor,{h:128});for(let H=0;H<this.THEME_COLOR_LIMIT;H++)this["pie"+H]=this["cScale"+H];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let H=0;H<8;H++)this["venn"+(H+1)]=this["venn"+(H+1)]??this["cScale"+H];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((o=this.cynefin)==null?void 0:o.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((l=this.cynefin)==null?void 0:l.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((m=this.cynefin)==null?void 0:m.textColor)||this.textColor,labelColor:((y=this.cynefin)==null?void 0:y.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((C=this.xyChart)==null?void 0:C.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((k=this.xyChart)==null?void 0:k.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_=this.xyChart)==null?void 0:_.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((L=this.xyChart)==null?void 0:L.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((A=this.xyChart)==null?void 0:A.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((F=this.xyChart)==null?void 0:F.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((z=this.xyChart)==null?void 0:z.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((I=this.xyChart)==null?void 0:I.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((rt=this.xyChart)==null?void 0:rt.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((W=this.radar)==null?void 0:W.axisColor)||this.lineColor,axisStrokeWidth:((E=this.radar)==null?void 0:E.axisStrokeWidth)||2,axisLabelFontSize:((M=this.radar)==null?void 0:M.axisLabelFontSize)||12,curveOpacity:((v=this.radar)==null?void 0:v.curveOpacity)||.5,curveStrokeWidth:((R=this.radar)==null?void 0:R.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((X=this.radar)==null?void 0:X.graticuleStrokeWidth)||1,graticuleOpacity:((Z=this.radar)==null?void 0:Z.graticuleOpacity)||.3,legendBoxSize:((lt=this.radar)==null?void 0:lt.legendBoxSize)||12,legendFontSize:((ht=this.radar)==null?void 0:ht.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((ut=this.wardley)==null?void 0:ut.backgroundColor)||this.background,axisColor:((bt=this.wardley)==null?void 0:bt.axisColor)||this.lineColor,axisTextColor:((Tt=this.wardley)==null?void 0:Tt.axisTextColor)||this.primaryTextColor,gridColor:((yt=this.wardley)==null?void 0:yt.gridColor)||this.gridColor,componentFill:((At=this.wardley)==null?void 0:At.componentFill)||this.background,componentStroke:((It=this.wardley)==null?void 0:It.componentStroke)||this.lineColor,componentLabelColor:((Bt=this.wardley)==null?void 0:Bt.componentLabelColor)||this.primaryTextColor,linkStroke:((ct=this.wardley)==null?void 0:ct.linkStroke)||this.lineColor,evolutionStroke:((xt=this.wardley)==null?void 0:xt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Et=this.wardley)==null?void 0:Et.annotationStroke)||this.lineColor,annotationTextColor:((Nt=this.wardley)==null?void 0:Nt.annotationTextColor)||this.primaryTextColor,annotationFill:((Gt=this.wardley)==null?void 0:Gt.annotationFill)||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=U(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||S(this.primaryColor,{h:-30}),this.git4=this.pie5||S(this.primaryColor,{h:-60}),this.git5=this.pie6||S(this.primaryColor,{h:-90}),this.git6=this.pie7||S(this.primaryColor,{h:60}),this.git7=this.pie8||S(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(fi,"Theme"),fi),by=p(e=>{const t=new xy;return t.calculate(e),t},"getThemeVariables"),mi,ky=(mi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=Ot(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var a,n,o,c,h,l,d,u,g,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Fe(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||S(t,{h:30}),this.cScale4=this.cScale4||S(t,{h:60}),this.cScale5=this.cScale5||S(t,{h:90}),this.cScale6=this.cScale6||S(t,{h:120}),this.cScale7=this.cScale7||S(t,{h:150}),this.cScale8=this.cScale8||S(t,{h:210,l:150}),this.cScale9=this.cScale9||S(t,{h:270}),this.cScale10=this.cScale10||S(t,{h:300}),this.cScale11=this.cScale11||S(t,{h:330}),this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||D(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||S(t,{h:64}),this.fillType3=this.fillType3||S(r,{h:64}),this.fillType4=this.fillType4||S(t,{h:-64}),this.fillType5=this.fillType5||S(r,{h:-64}),this.fillType6=this.fillType6||S(t,{h:128}),this.fillType7=this.fillType7||S(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||S(t,{l:-10}),this.pie5=this.pie5||S(r,{l:-10}),this.pie6=this.pie6||S(i,{l:-10}),this.pie7=this.pie7||S(t,{h:60,l:-10}),this.pie8=this.pie8||S(t,{h:-60,l:-10}),this.pie9=this.pie9||S(t,{h:120,l:0}),this.pie10=this.pie10||S(t,{h:60,l:-20}),this.pie11=this.pie11||S(t,{h:-60,l:-20}),this.pie12=this.pie12||S(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(mi,"Theme"),mi),Sy=p(e=>{const t=new ky;return t.calculate(e),t},"getThemeVariables"),yi,Ty=(yi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(D("#323D47"),10),this.border1="#ccc",this.border2=Fr(255,255,255,.25),this.arrowheadColor=D(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){var r,i,s,a,n,o,c,h,l,d,u,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||D(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||S(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||S(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(yi,"Theme"),yi),wy=p(e=>{const t=new Ty;return t.calculate(e),t},"getThemeVariables"),Ci,By=(Ci=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){var a,n,o,c,h,l,d,u,g,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Fe(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=this.mainBkg;if(this.darkMode)for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],75);else for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScale"+C]=U(this["cScale"+C],25);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||D(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||S(t,{h:64}),this.fillType3=this.fillType3||S(r,{h:64}),this.fillType4=this.fillType4||S(t,{h:-64}),this.fillType5=this.fillType5||S(r,{h:-64}),this.fillType6=this.fillType6||S(t,{h:128}),this.fillType7=this.fillType7||S(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||S(t,{l:-10}),this.pie5=this.pie5||S(r,{l:-10}),this.pie6=this.pie6||S(i,{l:-10}),this.pie7=this.pie7||S(t,{h:60,l:-10}),this.pie8=this.pie8||S(t,{h:-60,l:-10}),this.pie9=this.pie9||S(t,{h:120,l:0}),this.pie10=this.pie10||S(t,{h:60,l:-20}),this.pie11=this.pie11||S(t,{h:-60,l:-20}),this.pie12=this.pie12||S(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(Ci,"Theme"),Ci),_y=p(e=>{const t=new By;return t.calculate(e),t},"getThemeVariables"),xi,vy=(xi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(D("#323D47"),10),this.border1="#ccc",this.border2=Fr(255,255,255,.25),this.arrowheadColor=D(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){var r,i,s,a,n,o,c,h,l,d,u,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||S(this.primaryColor,{h:30}),this.cScale4=this.cScale4||S(this.primaryColor,{h:60}),this.cScale5=this.cScale5||S(this.primaryColor,{h:90}),this.cScale6=this.cScale6||S(this.primaryColor,{h:120}),this.cScale7=this.cScale7||S(this.primaryColor,{h:150}),this.cScale8=this.cScale8||S(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||S(this.primaryColor,{h:270}),this.cScale10=this.cScale10||S(this.primaryColor,{h:300}),this.cScale11=this.cScale11||S(this.primaryColor,{h:330}),this.darkMode)for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],75);else for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScale"+m]=U(this["cScale"+m],25);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleInv"+m]=this["cScaleInv"+m]||D(this["cScale"+m]);for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this.darkMode?this["cScalePeer"+m]=this["cScalePeer"+m]||Y(this["cScale"+m],10):this["cScalePeer"+m]=this["cScalePeer"+m]||U(this["cScale"+m],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let m=0;m<this.THEME_COLOR_LIMIT;m++)this["cScaleLabel"+m]=this["cScaleLabel"+m]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let m=0;m<5;m++)this["surface"+m]=this["surface"+m]||S(this.mainBkg,{h:180,s:-15,l:t*(5+m*3)}),this["surfacePeer"+m]=this["surfacePeer"+m]||S(this.mainBkg,{h:180,s:-15,l:t*(8+m*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||S(this.primaryColor,{h:64}),this.fillType3=this.fillType3||S(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||S(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||S(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||S(this.primaryColor,{h:128}),this.fillType7=this.fillType7||S(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||S(this.primaryColor,{l:-10}),this.pie5=this.pie5||S(this.secondaryColor,{l:-10}),this.pie6=this.pie6||S(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||S(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||S(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||S(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||S(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||S(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||S(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((a=this.xyChart)==null?void 0:a.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((n=this.xyChart)==null?void 0:n.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((o=this.xyChart)==null?void 0:o.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((c=this.xyChart)==null?void 0:c.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((h=this.xyChart)==null?void 0:h.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((l=this.xyChart)==null?void 0:l.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(xi,"Theme"),xi),Ly=p(e=>{const t=new vy;return t.calculate(e),t},"getThemeVariables"),bi,Fy=(bi=class{constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=Ot("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.usecaseActorBorder="#A78BFA",this.usecaseActorBkg="#F5F3FF",this.usecaseBorder="#2DD4BF",this.usecaseBkg="#F0FDFA",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseBoundaryBkg="#FAFAFC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#000000"}updateColors(){var a,n,o,c,h,l,d,u,g,m,y,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||(Fe(this.background)?Y(this.background,4):U(this.background,4));const t="#ECECFE",r="#E9E9F1",i=S(t,{h:180,l:5});this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#FFFFFF",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#F9F9FB",this.compositeTitleBackground=this.compositeTitleBackground||"#F9F9FB",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||"white";for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleInv"+C]=this["cScaleInv"+C]||D(this["cScale"+C]);for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this.darkMode?this["cScalePeer"+C]=this["cScalePeer"+C]||Y(this["cScale"+C],10):this["cScalePeer"+C]=this["cScalePeer"+C]||U(this["cScale"+C],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["cScaleLabel"+C]=this["cScaleLabel"+C]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let C=0;C<5;C++)this["surface"+C]=this["surface"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(5+C*3)}),this["surfacePeer"+C]=this["surfacePeer"+C]||S(this.mainBkg,{h:180,s:-15,l:s*(8+C*3)});this.classText=this.classText||this.textColor;for(let C=0;C<8;C++)this["fillType"+C]=this["fillType"+C]||this.bkgColorArray[C];for(let C=0;C<this.THEME_COLOR_LIMIT;C++)this["pie"+(C+1)]=this["pie"+(C+1)]||this["cScale"+C];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let C=0;C<8;C++)this["venn"+(C+1)]=this["venn"+(C+1)]??this.borderColorArray[C%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||S(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((a=this.xyChart)==null?void 0:a.backgroundColor)||this.background,titleColor:((n=this.xyChart)==null?void 0:n.titleColor)||this.primaryTextColor,legendTextColor:((o=this.xyChart)==null?void 0:o.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((c=this.xyChart)==null?void 0:c.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((h=this.xyChart)==null?void 0:h.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((l=this.xyChart)==null?void 0:l.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((m=this.xyChart)==null?void 0:m.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((y=this.xyChart)==null?void 0:y.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||S(t,{h:-30}),this.git4=this.git4||S(t,{h:-60}),this.git5=this.git5||S(t,{h:-90}),this.git6=this.git6||S(t,{h:60}),this.git7=this.git7||S(t,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(bi,"Theme"),bi),Ay=p(e=>{const t=new Fy;return t.calculate(e),t},"getThemeVariables"),ki,Ey=(ki=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Y(this.primaryColor,16),this.tertiaryColor=S(this.primaryColor,{h:-160}),this.primaryBorderColor=D(this.background),this.secondaryBorderColor=Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Ot(this.tertiaryColor,this.darkMode),this.primaryTextColor=D(this.primaryColor),this.secondaryTextColor=D(this.secondaryColor),this.tertiaryTextColor=D(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Y(D("#323D47"),10),this.border1="#ccc",this.border2=Fr(255,255,255,.25),this.arrowheadColor=D(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.usecaseActorBorder="#A78BFA",this.usecaseBorder="#2DD4BF",this.usecaseBoundaryBorder="#BDBCCC",this.usecaseIncludeLine="#38BDF8",this.usecaseExtendLine="#FB923C",this.filterColor="#FFFFFF"}updateColors(){var i,s,a,n,o,c,h,l,d,u,g,m;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||S(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||S(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Ot(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Ot(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Ot(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Ot(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||D(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||D(this.tertiaryColor),this.lineColor=this.lineColor||D(this.background),this.arrowheadColor=this.arrowheadColor||D(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.secondBkg=this.secondBkg==="calculated"?Y(this.mainBkg,16):this.secondBkg,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.flowContainerStroke=this.flowContainerStroke||this.secondaryBorderColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||U(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||D(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Y(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||this.secondBkg,this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateEdgeLabelBackground=this.stateEdgeLabelBackground||"#16141F",this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||"#16141F",this.altBackground=this.altBackground||"#16141F",this.compositeTitleBackground=this.compositeTitleBackground||"#16141F",this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad",this.sectionBkgColor=this.sectionBkgColor||this.cScale0,this.sectionBkgColor2=this.sectionBkgColor2||this.cScale1,this.altSectionBkgColor=this.altSectionBkgColor||this.background;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||D(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||Y(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||U(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=U(this["cScale"+y],75);const t=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||S(this.mainBkg,{h:180,s:-15,l:t*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||S(this.mainBkg,{h:180,s:-15,l:t*(8+y*3)});this.classText=this.classText||this.textColor,["#701a75","#134e4a","#7c2d12","#581c87","#14532d","#4c1d95","#7f1d1d","#713f12"].forEach((y,x)=>{this["fillType"+x]=this["fillType"+x]||y});for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["pie"+(y+1)]=this["pie"+(y+1)]||this["cScale"+y];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||"#28253D",this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let y=0;y<8;y++)this["venn"+(y+1)]=this["venn"+(y+1)]??this.borderColorArray[y%this.borderColorArray.length];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||S(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||S(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||S(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||S(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||S(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||S(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Fe(this.quadrant1Fill)?Y(this.quadrant1Fill):U(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:((i=this.xyChart)==null?void 0:i.backgroundColor)||this.background,titleColor:((s=this.xyChart)==null?void 0:s.titleColor)||this.primaryTextColor,legendTextColor:((a=this.xyChart)==null?void 0:a.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((n=this.xyChart)==null?void 0:n.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((o=this.xyChart)==null?void 0:o.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((c=this.xyChart)==null?void 0:c.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((h=this.xyChart)==null?void 0:h.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((l=this.xyChart)==null?void 0:l.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((d=this.xyChart)==null?void 0:d.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((u=this.xyChart)==null?void 0:u.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((g=this.xyChart)==null?void 0:g.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((m=this.xyChart)==null?void 0:m.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?U(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||S(this.primaryColor,{h:-30}),this.git4=this.git4||S(this.primaryColor,{h:-60}),this.git5=this.git5||S(this.primaryColor,{h:-90}),this.git6=this.git6||S(this.primaryColor,{h:60}),this.git7=this.git7||S(this.primaryColor,{h:120}),this.darkMode?(this.git0=Y(this.git0,25),this.git1=Y(this.git1,25),this.git2=Y(this.git2,25),this.git3=Y(this.git3,25),this.git4=Y(this.git4,25),this.git5=Y(this.git5,25),this.git6=Y(this.git6,25),this.git7=Y(this.git7,25)):(this.git0=U(this.git0,25),this.git1=U(this.git1,25),this.git2=U(this.git2,25),this.git3=U(this.git3,25),this.git4=U(this.git4,25),this.git5=U(this.git5,25),this.git6=U(this.git6,25),this.git7=U(this.git7,25)),this.gitInv0=this.gitInv0||D(this.git0),this.gitInv1=this.gitInv1||D(this.git1),this.gitInv2=this.gitInv2||D(this.git2),this.gitInv3=this.gitInv3||D(this.git3),this.gitInv4=this.gitInv4||D(this.git4),this.gitInv5=this.gitInv5||D(this.git5),this.gitInv6=this.gitInv6||D(this.git6),this.gitInv7=this.gitInv7||D(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||rr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ir}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=Ge(this[i],t[i])})}},p(ki,"Theme"),ki),My=p(e=>{const t=new Ey;return t.calculate(e),t},"getThemeVariables"),fr={base:{getThemeVariables:uy},dark:{getThemeVariables:py},default:{getThemeVariables:my},forest:{getThemeVariables:Cy},neutral:{getThemeVariables:by},neo:{getThemeVariables:Sy},"neo-dark":{getThemeVariables:wy},redux:{getThemeVariables:_y},"redux-dark":{getThemeVariables:Ly},"redux-color":{getThemeVariables:Ay},"redux-dark-color":{getThemeVariables:My}},re={flowchart:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,wrappingWidth:120,minNodeWidth:120,inheritDir:!1},swimlane:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"swimlane",lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},agentflow:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:8,nodeSpacing:50,rankSpacing:50,wrappingWidth:120,minNodeWidth:120},sequence:{useMaxWidth:!0,theme:"redux-color",look:"neo",hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,theme:"redux-color",look:"neo",layout:"elk",wrappingWidth:120,minNodeWidth:120,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5},er:{useMaxWidth:!0,theme:"redux-color",look:"neo",titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,theme:"redux-color",look:"neo",rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,colorBy:"branch",padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,bitOrder:"ascending",paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},usecase:{useMaxWidth:!0,theme:"redux-color",look:"neo",wrappingWidth:120,minNodeWidth:120,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:"normal",usecaseFontSize:12,usecaseFontFamily:'"Open Sans", sans-serif',usecaseFontWeight:"normal",nodeSpacing:50,rankSpacing:50,diagramPadding:20,colorScheme:"role"},venn:{useMaxWidth:!0,theme:"redux-color",look:"neo",width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"elk",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},Gc,Xc,Vc,Fd={...re,deterministicIDSeed:void 0,elk:{mergeEdges:!1,straightenEdges:!0,lineHops:!0,preset:"default",nodePlacementStrategy:void 0,layeringStrategy:void 0,cycleBreakingStrategy:void 0,layeringLayerBound:4,nodePlacementAlignment:void 0,forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1,orientFeedbackEdges:!0},themeCSS:void 0,themeVariables:fr.default.getThemeVariables(),sequence:{...re.sequence,messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:p(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:p(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{theme:(Gc=re.class)==null?void 0:Gc.theme,look:(Xc=re.class)==null?void 0:Xc.look,layout:(Vc=re.class)==null?void 0:Vc.layout,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...re.gantt,tickInterval:void 0,useWidth:void 0},c4:{...re.c4,useWidth:void 0,personFont:p(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...re.flowchart,inheritDir:!1},external_personFont:p(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:p(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:p(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:p(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:p(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:p(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:p(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:p(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:p(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:p(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:p(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:p(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:p(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:p(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:p(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:p(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:p(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:p(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:p(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:p(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:p(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...re.pie,useWidth:984},xyChart:{...re.xyChart,useWidth:void 0},requirement:{...re.requirement,useWidth:void 0},packet:{...re.packet},eventmodeling:{...re.eventmodeling},treeView:{...re.treeView,useWidth:void 0},radar:{...re.radar},usecase:{...re.usecase},railroad:{...re.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...re.ishikawa},sankey:{...re.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...re.venn},cynefin:{...re.cynefin}},Ad=p((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...Ad(e[i],"")]:[...r,t+i],[]),"keyify"),Oy=new Set(Ad(Fd,"")),Sn=Fd,$y={"flowchart-v2":"flowchart","flowchart-elk":"flowchart",classDiagram:"class",stateDiagram:"state",xychart:"xyChart",railroadAbnf:"railroad",railroadEbnf:"railroad",railroadPeg:"railroad"},Dy=p(e=>$y[e]??e,"getDiagramConfigKey"),Iy={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},Py=p((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(J.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Vs=p(e=>{if(J.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Vs(t));return}for(const t of Object.keys(e)){if(J.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!Oy.has(t)||e[t]==null){J.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=Iy[t];i?Py(e[t],i):(J.debug("sanitizing object",t),Vs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(J.debug("sanitizing css option",t),e[t]=Ed(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}J.debug("After sanitization",e)}},"sanitizeDirective"),Ed=p(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Er=Object.freeze(Sn),Ry=["theme","look","layout"],qy=new Set(["classic","handDrawn","neo"]),Ny=p((e,t)=>e==="theme"?t==="null"||Object.hasOwn(fr,t):e!=="look"||qy.has(t),"isUsableAppearance"),Wy=p((e,t,r)=>{if(!e)return;const i=e[t];return[i==null?void 0:i[r],e[r]].find(s=>s!==void 0&&Ny(r,s))},"readAppearance"),sr=p(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Te=oe({},Er),Zs,Ks={},mr=[],ss=oe({},Er),as,zy=p((e,t)=>{if(!as)return;const r=[t,...[...mr].reverse(),Ks,Er],i=e[as];for(const s of Ry)for(const a of r){const n=Wy(a,as,s);if(n!==void 0){e[s]=n,(i==null?void 0:i[s])!==void 0&&(i[s]=n);break}}},"resolveAppearance"),Li=p((e,t)=>{let r=oe({},e),i={};for(const a of t)$d(a),i=oe(i,a);if(r=oe(r,i),zy(r,i),(!!i.theme||r.theme!==e.theme)&&r.theme&&Object.hasOwn(fr,r.theme)){const a=oe({},Zs),n=oe(a.themeVariables||{},i.themeVariables);r.themeVariables=fr[r.theme].getThemeVariables(n)}return ss=r,Xy(ss),ss},"updateCurrentConfig"),Tn=p(e=>{as=e===void 0?void 0:Dy(e),Li(Te,mr)},"setDiagramConfigScope"),Hy=p(e=>(Te=oe({},Er),Te=oe(Te,e),Ks=oe({},e),e.theme&&Object.hasOwn(fr,e.theme)&&(Te.themeVariables=fr[e.theme].getThemeVariables(e.themeVariables)),Li(Te,mr),Te),"setSiteConfig"),Yy=p(e=>{Zs=oe({},e)},"saveConfigFromInitialize"),Uy=p(e=>(Te=oe(Te,e),Ks=oe(Ks,e),Li(Te,mr),Te),"updateSiteConfig"),Md=p(()=>oe({},Te),"getSiteConfig"),Od=p(e=>(Li(ss,[e]),Qt()),"setConfig"),Qt=p(()=>oe({},ss),"getConfig"),$d=p(e=>{e&&(["secure",...Te.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(J.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]=="string"&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],typeof e[t]=="object"&&$d(e[t])}))},"sanitize"),jy=p(e=>{var t;Vs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),mr.push(e),Li(Te,mr)},"addDirective"),Qs=p((e=Te)=>{mr=[],as=void 0,Li(e,mr)},"reset"),Gy={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},ch={},Dd=p(e=>{ch[e]||(J.warn(Gy[e]),ch[e]=!0)},"issueWarning"),Xy=p(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Dd("LAZY_LOAD_DEPRECATED")},"checkConfig"),HT=p(()=>{let e={};Zs&&(e=oe(e,Zs));for(const t of mr)e=oe(e,t);return e},"getUserDefinedConfig"),de=p(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&Dd("FLOWCHART_HTML_LABELS_DEPRECATED"),sr(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),ds=/<\/?br\s*\/?>/gi,Vy=new RegExp(ds.source,"i"),Zy=p(e=>e?Rd(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ky=(()=>{let e=!1;return()=>{e||(Id(),e=!0)}})();function Id(){const e="data-temp-href-target";Bi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Bi.addHook("afterSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),t.getAttribute("target")==="_blank"&&t.setAttribute("rel","noopener"))})}p(Id,"setupDompurifyHooks");var Pd=p(e=>(Ky(),Bi.sanitize(e)),"removeScript"),dh=p((e,t)=>{if(de(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Pd(e):r!=="loose"&&(e=Rd(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=eC(e))}return e},"sanitizeMore"),qe=p((e,t)=>e&&(t.dompurifyConfig?e=Bi.sanitize(dh(e,t),t.dompurifyConfig).toString():e=Bi.sanitize(dh(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),Qy=p((e,t)=>typeof e=="string"?qe(e,t):e.flat().map(r=>qe(r,t)),"sanitizeTextOrArray"),Jy=p(e=>Vy.test(e),"hasBreaks"),tC=p(e=>e.split(ds),"splitBreaks"),eC=p(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Rd=p(e=>e.replace(ds,"#br#"),"breakToPlaceholder"),rC=p(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),iC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),sC=p(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),uh=p(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const a=t[i-1],n=t[i+1];aC(a,n)&&(s=a+","+n,i++,r.pop())}r.push(oC(s))}return r.join("")},"parseGenericTypes"),Ho=p((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),aC=p((e,t)=>{const r=Ho(e,"~"),i=Ho(t,"~");return r===1&&i===1},"shouldCombineSets"),oC=p(e=>{const t=Ho(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),a=i.lastIndexOf("~");for(;s!==-1&&a!==-1&&s!==a;)i[s]="<",i[a]=">",s=i.indexOf("~"),a=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),gh=p(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Yo=/\$\$(.*?)\$\$/g,ls=p(e=>{var t;return(((t=e.match(Yo))==null?void 0:t.length)??0)>0},"hasKatex"),YT=p(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await qd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),nC=p(async(e,t)=>{if(!ls(e))return e;if(!(gh()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Yo,"MathML is unsupported in this environment.");{const{default:r}=await Wt(async()=>{const{default:s}=await import("./explorer-katex.js");return{default:s}},[],import.meta.url),i=t.forceLegacyMathML||!gh()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ds).map(s=>ls(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Yo,(s,a)=>r.renderToString(a,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),qd=p(async(e,t)=>qe(await nC(e,t),t),"renderKatexSanitized"),us={getRows:Zy,sanitizeText:qe,sanitizeTextOrArray:Qy,hasBreaks:Jy,splitBreaks:tC,lineBreakRegex:ds,removeScript:Pd,getUrl:rC,evaluate:sr,getMax:iC,getMin:sC},lC=p(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),hC=p(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Nd=p(function(e,t,r,i){const s=hC(t,r,i);lC(e,s)},"configureSvgSize"),cC=p(function(e,t,r,i){const s=t.node().getBBox(),a=s.width,n=s.height;J.info(`SVG bounds: ${a}x${n}`,s);let o=0,c=0;J.info(`Graph bounds: ${o}x${c}`,e),o=a+r*2,c=n+r*2,J.info(`Calculated bounds: ${o}x${c}`),Nd(t,c,o,i);const h=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",h)},"setupGraphViewbox"),Rs={};function Uo(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
8
|
+
`)}p(Uo,"cssStyleSheetToString");var dC=p((e,t,r,i)=>{let s="";return e in Rs&&Rs[e]?s=Rs[e]({...r,svgId:i}):J.warn(`No theme found for ${e}`),`& {
|
|
7
9
|
font-family: ${r.fontFamily};
|
|
8
10
|
font-size: ${r.fontSize};
|
|
9
11
|
fill: ${r.textColor}
|
|
@@ -124,189 +126,189 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
124
126
|
}
|
|
125
127
|
|
|
126
128
|
${t}
|
|
127
|
-
`},"getStyles"),
|
|
128
|
-
`)},"setAccDescription"),O0=f(()=>Un,"getAccDescription"),$0=f(e=>{Yn=Gn(e)},"setDiagramTitle"),D0=f(()=>Yn,"getDiagramTitle"),jh=W,P0=Wn,zt=te,FL=_d,EL=Di,Xn=f(e=>ze(e,zt()),"sanitizeText"),I0=_0,R0=f(()=>Pd,"getCommonDb"),ga={},ma=f((e,t,r)=>{var i;ga[e]&&jh.warn(`Diagram with id ${e} already registered. Overwriting.`),ga[e]=t,r&&Ed(e,r),v0(e,t.styles),(i=t.injectUtils)==null||i.call(t,jh,P0,zt,Xn,I0,R0(),()=>{})},"registerDiagram"),cn=f(e=>{if(e in ga)return ga[e];throw new q0(e)},"getDiagram"),Ai,q0=(Ai=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(Ai,"DiagramNotFoundError"),Ai),N0=f(e=>{var s;const{securityLevel:t}=zt();let r=Pt("body");if(t==="sandbox"){const o=((s=Pt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Pt(o.body)}return r.select(`#${e}`)},"selectSvgElement"),z0=f(e=>{const{handDrawnSeed:t}=zt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),W0=f(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),qi=f(e=>{const t=H0([...e.cssCompiledStyles||[],...e.cssStyles||[],...W0(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),H0=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Id=f(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),xt=f(e=>{const{stylesArray:t}=qi(e),r=[],i=[],s=[],a=[];return t.forEach(o=>{const n=o[0];Id(n)?r.push(o.join(":")+" !important"):(i.push(o.join(":")+" !important"),n.includes("stroke")&&s.push(o.join(":")+" !important"),n==="fill"&&a.push(o.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),dt=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=zt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:o}=qi(e);return Object.assign({roughness:.7,fill:o.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:o.get("stroke")||s,seed:i,strokeWidth:((l=o.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:j0(o.get("stroke-dasharray"))},t)},"userNodeOverrides"),j0=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const Y0=Object.freeze({left:0,top:0,width:16,height:16}),ya=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Rd=Object.freeze({...Y0,...ya}),U0=Object.freeze({...Rd,body:"",hidden:!1}),G0=Object.freeze({width:null,height:null}),X0=Object.freeze({...G0,...ya}),V0=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return fo(c)?c:null}const a=s[0],o=a.split("-");if(o.length>1){const n={provider:i,prefix:o.shift(),name:o.join("-")};return fo(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:a};return fo(n,r)?n:null}return null},fo=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function Z0(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Yh(e,t){const r=Z0(e,t);for(const i in U0)i in ya?i in e&&!(i in r)&&(r[i]=ya[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function K0(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(o){if(r[o])return s[o]=[];if(!(o in s)){s[o]=null;const n=i[o]&&i[o].parent,l=n&&a(n);l&&(s[o]=[n].concat(l))}return s[o]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Uh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function o(n){a=Yh(i[n]||s[n],a)}return o(t),r.forEach(o),Yh(e,a)}function Q0(e,t){if(e.icons[t])return Uh(e,t,[]);const r=K0(e,[t])[t];return r?Uh(e,t,r):null}const J0=/(-?[0-9.]*[0-9]+[0-9.]*)/g,tx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Gh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(J0);if(i===null||!i.length)return e;const s=[];let a=i.shift(),o=tx.test(a);for(;;){if(o){const n=parseFloat(a);isNaN(n)?s.push(a):s.push(Math.ceil(n*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");o=!o}}function ex(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const o=e.indexOf(">",a);if(o===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(o+1)}return{defs:r,content:e}}function rx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function ix(e,t,r){const i=ex(e);return rx(i.defs,t+i.content+r)}const sx=e=>e==="unset"||e==="undefined"||e==="none";function ax(e,t){const r={...Rd,...e},i={...X0,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,k=y.vFlip;let S=y.rotate;C?k?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):k&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let w;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:w=s.height/2+s.top,x.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,x.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}S%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),x.length&&(a=ix(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const o=i.width,n=i.height,l=s.width,c=s.height;let h,u;o===null?(u=n===null?"1em":n==="auto"?c:n,h=Gh(u,l/c)):(h=o==="auto"?l:o,u=n===null?Gh(h,c/l):n==="auto"?c:n);const p={},d=(y,x)=>{sx(x)||(p[y]=x.toString())};d("width",h),d("height",u);const m=[s.left,s.top,l,c];return p.viewBox=m.join(" "),{attributes:p,viewBox:m,body:a}}const ox=/\sid="(\S+)"/g,Xh=new Map;function nx(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Xh.get(e)||0;return Xh.set(e,t+1),t?`${e}${t}`:e}function lx(e){const t=[];let r;for(;r=ox.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=nx(s),o=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function hx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var cx={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},un=new Map,qd=new Map,ux=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(W.debug("Registering icon pack:",t.name),"loader"in t)qd.set(t.name,t.loader);else if("icons"in t)un.set(t.name,t.icons);else throw W.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Nd=f(async(e,t)=>{const r=V0(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=un.get(i);if(!s){const o=qd.get(i);if(!o)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await o(),prefix:i},un.set(i,s)}catch(n){throw W.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=Q0(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),dx=f(async e=>{try{return await Nd(e),!0}catch{return!1}},"isIconAvailable"),Fs=f(async(e,t,r)=>{let i;try{i=await Nd(e,t==null?void 0:t.fallbackPrefix)}catch(o){W.error(o),i=cx}const s=ax(i,t),a=hx(lx(s.body),{...s.attributes,...r});return ze(a,te())},"getIconSVG"),zs={},le={},Vh;function px(){return Vh||(Vh=1,Object.defineProperty(le,"__esModule",{value:!0}),le.BLANK_URL=le.relativeFirstCharacters=le.whitespaceEscapeCharsRegex=le.urlSchemeRegex=le.ctrlCharactersRegex=le.htmlCtrlEntityRegex=le.htmlEntitiesRegex=le.invalidProtocolRegex=void 0,le.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,le.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,le.htmlCtrlEntityRegex=/&(newline|tab);/gi,le.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,le.urlSchemeRegex=/^.+(:|:)/gim,le.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,le.relativeFirstCharacters=[".","/"],le.BLANK_URL="about:blank"),le}var Zh;function fx(){if(Zh)return zs;Zh=1,Object.defineProperty(zs,"__esModule",{value:!0}),zs.sanitizeUrl=a;var e=px();function t(o){return e.relativeFirstCharacters.indexOf(o[0])>-1}function r(o){var n=o.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(o){return URL.canParse(o)}function s(o){try{return decodeURIComponent(o)}catch{return o}}function a(o){if(!o)return e.BLANK_URL;var n,l=s(o.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),u=h.match(e.urlSchemeRegex);if(!u)return c;var p=u[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(p))return e.BLANK_URL;var d=h.replace(/\\/g,"/");if(p==="mailto:"||p.includes("://"))return d;if(p==="http:"||p==="https:"){if(!i(d))return e.BLANK_URL;var m=new URL(d);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return d}return zs}var gx=fx();function go(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function mx(){}function zd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Vn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const yx="[object RegExp]",Wd="[object String]",Hd="[object Number]",jd="[object Boolean]",Yd="[object Arguments]",Cx="[object Symbol]",xx="[object Date]",bx="[object Map]",kx="[object Set]",Tx="[object Array]",Sx="[object ArrayBuffer]",wx="[object Object]",_x="[object DataView]",Bx="[object Uint8Array]",vx="[object Uint8ClampedArray]",Lx="[object Uint16Array]",Fx="[object Uint32Array]",Ex="[object Int8Array]",Ax="[object Int16Array]",Mx="[object Int32Array]",Ox="[object Float32Array]",$x="[object Float64Array]",Kh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})()||Function("return this")();function Zn(e){return typeof Kh.Buffer<"u"&&Kh.Buffer.isBuffer(e)}function Dx(e){return Number.isSafeInteger(e)&&e>=0}function Ud(e){return e!=null&&typeof e!="function"&&Dx(e.length)}function Px(e){return e==="__proto__"}function Kn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Qn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ix(e,t){return fi(e,void 0,e,new Map,t)}function fi(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Kn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const o=new Array(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=fi(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(o.index=e.index),Object.hasOwn(e,"input")&&(o.input=e.input),o}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const o=new RegExp(e.source,e.flags);return o.lastIndex=e.lastIndex,o}if(e instanceof Map){const o=new Map;i.set(e,o);for(const[n,l]of e)o.set(n,fi(l,n,r,i,s));return o}if(e instanceof Set){const o=new Set;i.set(e,o);for(const n of e)o.add(fi(n,void 0,r,i,s));return o}if(Zn(e))return e.subarray();if(Qn(e)){const o=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,o);for(let n=0;n<e.length;n++)o[n]=fi(e[n],n,r,i,s);return o}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const o=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,o),je(o,e,r,i,s),o}if(typeof File<"u"&&e instanceof File){const o=new File([e],e.name,{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(typeof Blob<"u"&&e instanceof Blob){const o=new Blob([e],{type:e.type});return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Error){const o=structuredClone(e);return i.set(e,o),o.message=e.message,o.name=e.name,o.stack=e.stack,o.cause=e.cause,o.constructor=e.constructor,je(o,e,r,i,s),o}if(e instanceof Boolean){const o=new Boolean(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof Number){const o=new Number(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(e instanceof String){const o=new String(e.valueOf());return i.set(e,o),je(o,e,r,i,s),o}if(typeof e=="object"&&Rx(e)){const o=Object.create(Object.getPrototypeOf(e));return i.set(e,o),je(o,e,r,i,s),o}return e}function je(e,t,r=e,i,s){const a=[...Object.keys(t),...zd(t)];for(let o=0;o<a.length;o++){const n=a[o],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=fi(t[n],n,r,i,s))}}function Rx(e){switch(Vn(e)){case Yd:case Tx:case Sx:case _x:case jd:case xx:case Ox:case $x:case Ex:case Ax:case Mx:case bx:case Hd:case wx:case yx:case kx:case Wd:case Cx:case Bx:case vx:case Lx:case Fx:return!0;default:return!1}}function qx(e,t){return Ix(e,(r,i,s,a)=>{if(typeof e=="object"){if(Vn(e)==="[object Object]"&&typeof e.constructor!="function"){const o={};return a.set(e,o),je(o,e,s,a),o}switch(Object.prototype.toString.call(e)){case Hd:case Wd:case jd:{const o=new e.constructor(e==null?void 0:e.valueOf());return je(o,e),o}case Yd:{const o={};return je(o,e),o.length=e.length,o[Symbol.iterator]=e[Symbol.iterator],o}default:return}}})}function Qh(e){return qx(e)}function dn(e){return e!==null&&typeof e=="object"&&Vn(e)==="[object Arguments]"}function pn(e){return typeof e=="object"&&e!==null}function Nx(e){return pn(e)&&Ud(e)}function Es(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Es.Cache||Map),r}Es.Cache=Map;function ra(e){return Qn(e)}function zx(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function Wx(e){if(Kn(e))return e;if(Array.isArray(e)||Qn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function Hx(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const o=r[a];s=ia(s,o,i,new Map)}return s}function ia(e,t,r,i){if(Kn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return Wx(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)t[a]=t[a]??void 0}const s=[...Object.keys(t),...zd(t)];for(let a=0;a<s.length;a++){const o=s[a];if(Px(o))continue;let n=t[o],l=e[o];if(dn(n)&&(n={...n}),dn(l)&&(l={...l}),Zn(n)&&(n=Qh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],u=Reflect.ownKeys(l);for(let p=0;p<u.length;p++){const d=u[p];h[d]=l[d]}l=h}else if(Nx(l)){const h=[];for(let u=0;u<l.length;u++)h[u]=l[u];l=h}else l=[];const c=r(l,n,o,e,t,i);c!==void 0?e[o]=c:Array.isArray(n)||pn(l)&&pn(n)&&(go(l)||go(n)||ra(l)||ra(n))?e[o]=ia(l,n,r,i):l==null&&go(n)?e[o]=ia({},n,r,i):l==null&&ra(n)?e[o]=Qh(n):(l===void 0||n!==void 0)&&(e[o]=n)}return e}function jx(e,...t){return Hx(e,...t,mx)}function Jh(e){if(e==null)return!0;if(Ud(e))return typeof e.splice!="function"&&typeof e!="string"&&!Zn(e)&&!ra(e)&&!dn(e)?!1:e.length===0;if(typeof e=="object"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return zx(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var Yx="",Ux={curveBasis:en,curveBasisClosed:My,curveBasisOpen:Oy,curveBumpX:Gu,curveBumpY:Uu,curveBundle:$y,curveCardinalClosed:Dy,curveCardinalOpen:Py,curveCardinal:Qu,curveCatmullRomClosed:Iy,curveCatmullRomOpen:Ry,curveCatmullRom:td,curveLinear:ds,curveLinearClosed:qy,curveMonotoneX:od,curveMonotoneY:nd,curveNatural:hd,curveStep:cd,curveStepAfter:dd,curveStepBefore:ud},Gx=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Xx=f(function(e,t){const r=Gd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const o=r.map(n=>n.args);da(o),i=ce(i,[...o])}else i=r.args;if(!i)return;let s=Hn(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),Gd=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${Gx.source})(?=[}][%]{2}).*
|
|
129
|
-
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),W.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const o=[];for(;(a=gs.exec(e))!==null;)if(a.index===gs.lastIndex&&gs.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const n=a[1]?a[1]:a[2],l=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;o.push({type:n,args:l})}return o.length===0?{type:e,args:null}:o.length===1?o[0]:o}catch(s){return W.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),Vx=f(function(e){return e.replace(gs,"")},"removeDirectives"),Zx=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Jn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return Ux[r]??t}f(Jn,"interpolateToCurve");function Xd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?gx.sanitizeUrl(r):r}f(Xd,"formatUrl");var Kx=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let o=0;o<i;o++)if(a=a[r[o]],!a){W.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function tl(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(tl,"distance");function Vd(e){let t,r=0;e.forEach(s=>{r+=tl(s,t),t=s});const i=r/2;return el(e,i)}f(Vd,"traverseEdge");function Zd(e){return e.length===1?e[0]:Vd(e)}f(Zd,"calcLabelPosition");var tc=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),el=f((e,t)=>{let r,i=t;for(const s of e){if(r){const a=tl(s,r);if(a===0)return r;if(a<i)i-=a;else{const o=i/a;if(o<=0)return r;if(o>=1)return{x:s.x,y:s.y};if(o>0&&o<1)return{x:tc((1-o)*r.x+o*s.x,5),y:tc((1-o)*r.y+o*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),Qx=f((e,t,r)=>{W.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=el(t,25),a=e?10:5,o=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(o)*a+(t[0].x+s.x)/2,n.y=-Math.cos(o)*a+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Kd(e,t,r){const i=structuredClone(r);W.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=el(i,s),o=10+e*.5,n=Math.atan2(i[0].y-a.y,i[0].x-a.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n+Math.PI)*o+(i[0].y+a.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n-Math.PI)*o+(i[0].y+a.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*o+(i[0].x+a.x)/2-5,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2-5):(l.x=Math.sin(n)*o+(i[0].x+a.x)/2,l.y=-Math.cos(n)*o+(i[0].y+a.y)/2),l}f(Kd,"calcTerminalLabelPosition");function Qd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(Qd,"getStylesFromArray");var ec=0,Jx=f(()=>(ec++,"id-"+Math.random().toString(36).substr(2,12)+"-"+ec),"generateId");function Jd(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Jd,"makeRandomHex");var tb=f(e=>Jd(e.length),"random"),eb=f(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),rb=f(function(e,t){const r=t.text.replace(Ls.lineBreakRegex," "),[,i]=Oa(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),ib=Es((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),Ls.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((o,n)=>{const l=br(`${o} `,r),c=br(a,r);if(l>t){const{hyphenatedStrings:p,remainingWord:d}=sb(o,t,"-",r);s.push(a,...p),a=d}else c+l>=t?(s.push(a),a=o):a=[a,o].filter(Boolean).join(" ");n+1===i.length&&s.push(a)}),s.filter(o=>o!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),sb=Es((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let o="";return s.forEach((n,l)=>{const c=`${o}${n}`;if(br(c,i)>=t){const u=l+1,p=s.length===u,d=`${c}${r}`;a.push(p?c:d),o=""}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function tp(e,t){return rl(e,t).height}f(tp,"calculateTextHeight");function br(e,t){return rl(e,t).width}f(br,"calculateTextWidth");var rl=Es((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Oa(r),o=["sans-serif",i],n=e.split(Ls.lineBreakRegex),l=[],c=Pt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const p of o){let d=0;const m={width:0,height:0,lineHeight:0};for(const y of n){const x=eb();x.text=y||Yx;const C=rb(h,x).style("font-size",a).style("font-weight",s).style("font-family",p),k=(C._groups||C)[0][0].getBBox();if(k.width===0&&k.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,k.width)),d=Math.round(k.height),m.height+=d,m.lineHeight=Math.round(Math.max(m.lineHeight,d))}l.push(m)}h.remove();const u=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[u]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Mi,ab=(Mi=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(Mi,"InitIDGenerator"),Mi),Ws,ob=f(function(e){return Ws=Ws||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ws.innerHTML=e,unescape(Ws.textContent)},"entityDecode");function il(e){return"str"in e}f(il,"isDetailedError");var nb=f((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Oa=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function sl(e,t){return jx({},e,t)}f(sl,"cleanAndMerge");var xe={assignWithDepth:ce,wrapLabel:ib,calculateTextHeight:tp,calculateTextWidth:br,calculateTextDimensions:rl,cleanAndMerge:sl,detectInit:Xx,detectDirective:Gd,isSubstringInArray:Zx,interpolateToCurve:Jn,calcLabelPosition:Zd,calcCardinalityPosition:Qx,calcTerminalLabelPosition:Kd,formatUrl:Xd,getStylesFromArray:Qd,generateId:Jx,random:tb,runFunc:Kx,entityDecode:ob,insertTitle:nb,isLabelCoordinateInPath:ep,parseFontSize:Oa,InitIDGenerator:ab},lb=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Or=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),AL=f((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function oe(e){return e??null}f(oe,"handleUndefinedAttr");function ep(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(ep,"isLabelCoordinateInPath");var sa={exports:{}},rc=sa.exports,ic;function hb(){return ic||(ic=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var u;u=h.shift();)u()},measure:function(h,u){var p=u?h.bind(u):h;return this.reads.push(p),a(this),p},mutate:function(h,u){var p=u?h.bind(u):h;return this.writes.push(p),a(this),p},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var u=Object.create(this);return l(u,h),u.fastdom=this,u.initialize&&u.initialize(),u},catch:null};function a(h){h.scheduled||(h.scheduled=!0,h.raf(o.bind(null,h)))}function o(h){var u=h.writes,p=h.reads,d;try{r("flushing reads",p.length),h.runTasks(p),r("flushing writes",u.length),h.runTasks(u)}catch(m){d=m}if(h.scheduled=!1,(p.length||u.length)&&a(h),d)if(r("task errored",d.message),h.catch)h.catch(d);else throw d}function n(h,u){var p=h.indexOf(u);return!!~p&&!!h.splice(p,1)}function l(h,u){for(var p in u)u.hasOwnProperty(p)&&(h[p]=u[p])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof rc<"u"?rc:globalThis)})(sa)),sa.exports}var cb=hb();const ub=In(cb);var mo={exports:{}},sc;function db(){return sc||(sc=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,a=s.get(i);this.fastdom.clear(a),s.delete(i)}};function r(i,s,a,o){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(u,p){c=l[s](function(){n.delete(h);try{u(o?a.call(o):a())}catch(d){p(d)}},o)});return n.set(h,c),h}e.exports=t})()})(mo)),mo.exports}var pb=db();const fb=In(pb);function al(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Jr=al();function rp(e){Jr=e}var ms={exec:()=>null};function Gt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(Se.caret,"$1"),r=r.replace(s,o),i},getRegex:()=>new RegExp(r,t)};return i}var gb=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),Se={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},mb=/^(?:[ \t]*(?:\n|$))+/,yb=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Cb=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,As=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,xb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ol=/(?:[*+-]|\d{1,9}[.)])/,ip=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,sp=Gt(ip).replace(/bull/g,ol).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),bb=Gt(ip).replace(/bull/g,ol).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),nl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,kb=/^[^\n]+/,ll=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Tb=Gt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",ll).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Sb=Gt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ol).getRegex(),$a="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",hl=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,wb=Gt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",hl).replace("tag",$a).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ap=Gt(nl).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),_b=Gt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ap).getRegex(),cl={blockquote:_b,code:yb,def:Tb,fences:Cb,heading:xb,hr:As,html:wb,lheading:sp,list:Sb,newline:mb,paragraph:ap,table:ms,text:kb},ac=Gt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex(),Bb={...cl,lheading:bb,table:ac,paragraph:Gt(nl).replace("hr",As).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ac).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",$a).getRegex()},vb={...cl,html:Gt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",hl).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:ms,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Gt(nl).replace("hr",As).replace("heading",` *#{1,6} *[^
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Qi(r[0],`
|
|
129
|
+
`},"getStyles"),uC=p((e,t)=>{t!==void 0&&(Rs[e]=t)},"addStylesForDiagram"),gC=dC,Wd={};xm(Wd,{clear:()=>pC,getAccDescription:()=>CC,getAccTitle:()=>mC,getDiagramTitle:()=>bC,setAccDescription:()=>yC,setAccTitle:()=>fC,setDiagramTitle:()=>xC});var wn="",Bn="",_n="",vn=p(e=>qe(e,Qt()),"sanitizeText"),pC=p(()=>{wn="",_n="",Bn=""},"clear"),fC=p(e=>{wn=vn(e).replace(/^\s+/g,"")},"setAccTitle"),mC=p(()=>wn,"getAccTitle"),yC=p(e=>{_n=vn(e).replace(/\n\s+/g,`
|
|
130
|
+
`)},"setAccDescription"),CC=p(()=>_n,"getAccDescription"),xC=p(e=>{Bn=vn(e)},"setDiagramTitle"),bC=p(()=>Bn,"getDiagramTitle"),ph=J,kC=kn,Rt=Qt,UT=Od,jT=Er,Ln=p(e=>qe(e,Rt()),"sanitizeText"),SC=cC,TC=p(()=>Wd,"getCommonDb"),Js={},ta=p((e,t,r)=>{var i;Js[e]&&ph.warn(`Diagram with id ${e} already registered. Overwriting.`),Js[e]=t,r&&Ld(e,r),uC(e,t.styles),(i=t.injectUtils)==null||i.call(t,ph,kC,Rt,Ln,SC,TC(),()=>{})},"registerDiagram"),jo=p(e=>{if(e in Js)return Js[e];throw new wC(e)},"getDiagram"),Si,wC=(Si=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},p(Si,"DiagramNotFoundError"),Si),BC=p(e=>{var s;const{securityLevel:t}=Rt();let r=Pt("body");if(t==="sandbox"){const n=((s=Pt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Pt(n.body)}return r.select(`#${e}`)},"selectSvgElement");function zd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}p(zd,"getDefaultExportFromCjs");var ye={},ws={},_r={},fh;function Fi(){if(fh)return _r;fh=1;function e(n){return typeof n>"u"||n===null}p(e,"isNothing");function t(n){return typeof n=="object"&&n!==null}p(t,"isObject");function r(n){return Array.isArray(n)?n:e(n)?[]:[n]}p(r,"toArray");function i(n,o){if(o){const c=Object.keys(o);for(let h=0,l=c.length;h<l;h+=1){const d=c[h];n[d]=o[d]}}return n}p(i,"extend");function s(n,o){let c="";for(let h=0;h<o;h+=1)c+=n;return c}p(s,"repeat");function a(n){return n===0&&Number.NEGATIVE_INFINITY===1/n}return p(a,"isNegativeZero"),_r.isNothing=e,_r.isObject=t,_r.toArray=r,_r.repeat=s,_r.isNegativeZero=a,_r.extend=i,_r}p(Fi,"requireCommon");var Qa,mh;function Ai(){if(mh)return Qa;mh=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
131
|
+
|
|
132
|
+
`+r.mark.snippet),a+" "+s):a}p(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return p(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=p(function(i){return this.name+": "+e(this,i)},"toString"),Qa=t,Qa}p(Ai,"requireException");var Ja,yh;function Hd(){if(yh)return Ja;yh=1;const e=Fi();function t(s,a,n,o,c){let h="",l="";const d=Math.floor(c/2)-1;return o-a>d&&(h=" ... ",a=o-d+h.length),n-o>d&&(l=" ...",n=o+d-l.length),{str:h+s.slice(a,n).replace(/\t/g,"→")+l,pos:o-a+h.length}}p(t,"getLine");function r(s,a){return e.repeat(" ",a-s.length)+s}p(r,"padStart");function i(s,a){if(a=Object.create(a||null),!s.buffer)return null;a.maxLength||(a.maxLength=79),typeof a.indent!="number"&&(a.indent=1),typeof a.linesBefore!="number"&&(a.linesBefore=3),typeof a.linesAfter!="number"&&(a.linesAfter=2);const n=/\r?\n|\r|\0/g,o=[0],c=[];let h,l=-1;for(;h=n.exec(s.buffer);)c.push(h.index),o.push(h.index+h[0].length),s.position<=h.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);let d="";const u=Math.min(s.line+a.linesAfter,c.length).toString().length,g=a.maxLength-(a.indent+u+3);for(let y=1;y<=a.linesBefore&&!(l-y<0);y++){const x=t(s.buffer,o[l-y],c[l-y],s.position-(o[l]-o[l-y]),g);d=e.repeat(" ",a.indent)+r((s.line-y+1).toString(),u)+" | "+x.str+`
|
|
133
|
+
`+d}const m=t(s.buffer,o[l],c[l],s.position,g);d+=e.repeat(" ",a.indent)+r((s.line+1).toString(),u)+" | "+m.str+`
|
|
134
|
+
`,d+=e.repeat("-",a.indent+u+3+m.pos)+`^
|
|
135
|
+
`;for(let y=1;y<=a.linesAfter&&!(l+y>=c.length);y++){const x=t(s.buffer,o[l+y],c[l+y],s.position-(o[l]-o[l+y]),g);d+=e.repeat(" ",a.indent)+r((s.line+y+1).toString(),u)+" | "+x.str+`
|
|
136
|
+
`}return d.replace(/\n$/,"")}return p(i,"makeSnippet"),Ja=i,Ja}p(Hd,"requireSnippet");var to,Ch;function be(){if(Ch)return to;Ch=1;const e=Ai(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const n={};return a!==null&&Object.keys(a).forEach(function(o){a[o].forEach(function(c){n[String(c)]=o})}),n}p(i,"compileStyleAliases");function s(a,n){if(n=n||{},Object.keys(n).forEach(function(o){if(t.indexOf(o)===-1)throw new e('Unknown option "'+o+'" is met in definition of "'+a+'" YAML type.')}),this.options=n,this.tag=a,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(o){return o},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=i(n.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return p(s,"Type2"),to=s,to}p(be,"requireType");var eo,xh;function Fn(){if(xh)return eo;xh=1;const e=Ai(),t=be();function r(a,n){const o=[];return a[n].forEach(function(c){let h=o.length;o.forEach(function(l,d){l.tag===c.tag&&l.kind===c.kind&&l.multi===c.multi&&(h=d)}),o[h]=c}),o}p(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function n(o){o.multi?(a.multi[o.kind].push(o),a.multi.fallback.push(o)):a[o.kind][o.tag]=a.fallback[o.tag]=o}p(n,"collectType");for(let o=0,c=arguments.length;o<c;o+=1)arguments[o].forEach(n);return a}p(i,"compileMap");function s(a){return this.extend(a)}return p(s,"Schema2"),s.prototype.extend=p(function(n){let o=[],c=[];if(n instanceof t)c.push(n);else if(Array.isArray(n))c=c.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(o=o.concat(n.implicit)),n.explicit&&(c=c.concat(n.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");o.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(l.loadKind&&l.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(l.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),c.forEach(function(l){if(!(l instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const h=Object.create(s.prototype);return h.implicit=(this.implicit||[]).concat(o),h.explicit=(this.explicit||[]).concat(c),h.compiledImplicit=r(h,"implicit"),h.compiledExplicit=r(h,"explicit"),h.compiledTypeMap=i(h.compiledImplicit,h.compiledExplicit),h},"extend"),eo=s,eo}p(Fn,"requireSchema");var ro,bh;function An(){if(bh)return ro;bh=1;const e=be();return ro=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:p(function(t){return t!==null?t:""},"construct")}),ro}p(An,"requireStr");var io,kh;function En(){if(kh)return io;kh=1;const e=be();return io=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:p(function(t){return t!==null?t:[]},"construct")}),io}p(En,"requireSeq");var so,Sh;function Mn(){if(Sh)return so;Sh=1;const e=be();return so=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:p(function(t){return t!==null?t:{}},"construct")}),so}p(Mn,"requireMap");var ao,Th;function On(){if(Th)return ao;Th=1;const e=Fn();return ao=new e({explicit:[An(),En(),Mn()]}),ao}p(On,"requireFailsafe");var oo,wh;function $n(){if(wh)return oo;wh=1;const e=be();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}p(t,"resolveYamlNull");function r(){return null}p(r,"constructYamlNull");function i(s){return s===null}return p(i,"isNull"),oo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:p(function(){return"~"},"canonical"),lowercase:p(function(){return"null"},"lowercase"),uppercase:p(function(){return"NULL"},"uppercase"),camelcase:p(function(){return"Null"},"camelcase"),empty:p(function(){return""},"empty")},defaultStyle:"lowercase"}),oo}p($n,"require_null");var no,Bh;function Dn(){if(Bh)return no;Bh=1;const e=be();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}p(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}p(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return p(i,"isBoolean"),no=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:p(function(s){return s?"true":"false"},"lowercase"),uppercase:p(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:p(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),no}p(Dn,"requireBool");var lo,_h;function In(){if(_h)return lo;_h=1;const e=Fi(),t=be();function r(h){return h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102}p(r,"isHexCode");function i(h){return h>=48&&h<=55}p(i,"isOctCode");function s(h){return h>=48&&h<=57}p(s,"isDecCode");function a(h){if(h===null)return!1;const l=h.length;let d=0,u=!1;if(!l)return!1;let g=h[d];if((g==="-"||g==="+")&&(g=h[++d]),g==="0"){if(d+1===l)return!0;if(g=h[++d],g==="b"){for(d++;d<l;d++){if(g=h[d],g!=="0"&&g!=="1")return!1;u=!0}return u&&isFinite(n(h))}if(g==="x"){for(d++;d<l;d++){if(!r(h.charCodeAt(d)))return!1;u=!0}return u&&isFinite(n(h))}if(g==="o"){for(d++;d<l;d++){if(!i(h.charCodeAt(d)))return!1;u=!0}return u&&isFinite(n(h))}}for(;d<l;d++){if(!s(h.charCodeAt(d)))return!1;u=!0}return u?isFinite(n(h)):!1}p(a,"resolveYamlInteger");function n(h){let l=h,d=1,u=l[0];if((u==="-"||u==="+")&&(u==="-"&&(d=-1),l=l.slice(1),u=l[0]),l==="0")return 0;if(u==="0"){if(l[1]==="b")return d*parseInt(l.slice(2),2);if(l[1]==="x")return d*parseInt(l.slice(2),16);if(l[1]==="o")return d*parseInt(l.slice(2),8)}return d*parseInt(l,10)}p(n,"parseYamlInteger");function o(h){return n(h)}p(o,"constructYamlInteger");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&h%1===0&&!e.isNegativeZero(h)}return p(c,"isInteger"),lo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:o,predicate:c,represent:{binary:p(function(h){return h>=0?"0b"+h.toString(2):"-0b"+h.toString(2).slice(1)},"binary"),octal:p(function(h){return h>=0?"0o"+h.toString(8):"-0o"+h.toString(8).slice(1)},"octal"),decimal:p(function(h){return h.toString(10)},"decimal"),hexadecimal:p(function(h){return h>=0?"0x"+h.toString(16).toUpperCase():"-0x"+h.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),lo}p(In,"requireInt");var ho,vh;function Pn(){if(vh)return ho;vh=1;const e=Fi(),t=be(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(h){return h===null||!r.test(h)?!1:isFinite(parseFloat(h,10))?!0:i.test(h)}p(s,"resolveYamlFloat");function a(h){let l=h.toLowerCase();const d=l[0]==="-"?-1:1;return"+-".indexOf(l[0])>=0&&(l=l.slice(1)),l===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:l===".nan"?NaN:d*parseFloat(l,10)}p(a,"constructYamlFloat");const n=/^[-+]?[0-9]+e/;function o(h,l){if(isNaN(h))switch(l){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===h)switch(l){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===h)switch(l){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(h))return"-0.0";const d=h.toString(10);return n.test(d)?d.replace("e",".e"):d}p(o,"representYamlFloat");function c(h){return Object.prototype.toString.call(h)==="[object Number]"&&(h%1!==0||e.isNegativeZero(h))}return p(c,"isFloat"),ho=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:c,represent:o,defaultStyle:"lowercase"}),ho}p(Pn,"requireFloat");var co,Lh;function Rn(){return Lh||(Lh=1,co=On().extend({implicit:[$n(),Dn(),In(),Pn()]})),co}p(Rn,"requireJson");var uo,Fh;function qn(){return Fh||(Fh=1,uo=Rn()),uo}p(qn,"requireCore");var go,Ah;function Nn(){if(Ah)return go;Ah=1;const e=be(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(n){return n===null?!1:t.exec(n)!==null||r.exec(n)!==null}p(i,"resolveYamlTimestamp");function s(n){let o=0,c=null,h=t.exec(n);if(h===null&&(h=r.exec(n)),h===null)throw new Error("Date resolve error");const l=+h[1],d=+h[2]-1,u=+h[3];if(!h[4])return new Date(Date.UTC(l,d,u));const g=+h[4],m=+h[5],y=+h[6];if(h[7]){for(o=h[7].slice(0,3);o.length<3;)o+="0";o=+o}if(h[9]){const C=+h[10],b=+(h[11]||0);c=(C*60+b)*6e4,h[9]==="-"&&(c=-c)}const x=new Date(Date.UTC(l,d,u,g,m,y,o));return c&&x.setTime(x.getTime()-c),x}p(s,"constructYamlTimestamp");function a(n){return n.toISOString()}return p(a,"representYamlTimestamp"),go=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),go}p(Nn,"requireTimestamp");var po,Eh;function Wn(){if(Eh)return po;Eh=1;const e=be();function t(r){return r==="<<"||r===null}return p(t,"resolveYamlMerge"),po=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),po}p(Wn,"requireMerge");var fo,Mh;function zn(){if(Mh)return fo;Mh=1;const e=be(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
137
|
+
\r`;function r(n){if(n===null)return!1;let o=0;const c=n.length,h=t;for(let l=0;l<c;l++){const d=h.indexOf(n.charAt(l));if(!(d>64)){if(d<0)return!1;o+=6}}return o%8===0}p(r,"resolveYamlBinary");function i(n){const o=n.replace(/[\r\n=]/g,""),c=o.length,h=t;let l=0;const d=[];for(let g=0;g<c;g++)g%4===0&&g&&(d.push(l>>16&255),d.push(l>>8&255),d.push(l&255)),l=l<<6|h.indexOf(o.charAt(g));const u=c%4*6;return u===0?(d.push(l>>16&255),d.push(l>>8&255),d.push(l&255)):u===18?(d.push(l>>10&255),d.push(l>>2&255)):u===12&&d.push(l>>4&255),new Uint8Array(d)}p(i,"constructYamlBinary");function s(n){let o="",c=0;const h=n.length,l=t;for(let u=0;u<h;u++)u%3===0&&u&&(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]),c=(c<<8)+n[u];const d=h%3;return d===0?(o+=l[c>>18&63],o+=l[c>>12&63],o+=l[c>>6&63],o+=l[c&63]):d===2?(o+=l[c>>10&63],o+=l[c>>4&63],o+=l[c<<2&63],o+=l[64]):d===1&&(o+=l[c>>2&63],o+=l[c<<4&63],o+=l[64],o+=l[64]),o}p(s,"representYamlBinary");function a(n){return Object.prototype.toString.call(n)==="[object Uint8Array]"}return p(a,"isBinary"),fo=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),fo}p(zn,"requireBinary");var mo,Oh;function Hn(){if(Oh)return mo;Oh=1;const e=be(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const n=[],o=a;for(let c=0,h=o.length;c<h;c+=1){const l=o[c];let d=!1;if(r.call(l)!=="[object Object]")return!1;let u;for(u in l)if(t.call(l,u))if(!d)d=!0;else return!1;if(!d)return!1;if(n.indexOf(u)===-1)n.push(u);else return!1}return!0}p(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return p(s,"constructYamlOmap"),mo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),mo}p(Hn,"requireOmap");var yo,$h;function Yn(){if($h)return yo;$h=1;const e=be(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o];if(t.call(h)!=="[object Object]")return!1;const l=Object.keys(h);if(l.length!==1)return!1;n[o]=[l[0],h[l[0]]]}return!0}p(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,n=new Array(a.length);for(let o=0,c=a.length;o<c;o+=1){const h=a[o],l=Object.keys(h);n[o]=[l[0],h[l[0]]]}return n}return p(i,"constructYamlPairs"),yo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),yo}p(Yn,"requirePairs");var Co,Dh;function Un(){if(Dh)return Co;Dh=1;const e=be(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const n in a)if(t.call(a,n)&&a[n]!==null)return!1;return!0}p(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return p(i,"constructYamlSet"),Co=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Co}p(Un,"requireSet");var xo,Ih;function ya(){return Ih||(Ih=1,xo=qn().extend({implicit:[Nn(),Wn()],explicit:[zn(),Hn(),Yn(),Un()]})),xo}p(ya,"require_default");var Ph;function Yd(){if(Ph)return ws;Ph=1;const e=Fi(),t=Ai(),r=Hd(),i=ya(),s=Object.prototype.hasOwnProperty,a=1,n=2,o=3,c=4,h=1,l=2,d=3,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(f){return Object.prototype.toString.call(f)}p(C,"_class");function b(f){return f===10||f===13}p(b,"isEol");function k(f){return f===9||f===32}p(k,"isWhiteSpace");function w(f){return f===9||f===32||f===10||f===13}p(w,"isWsOrEol");function _(f){return f===44||f===91||f===93||f===123||f===125}p(_,"isFlowIndicator");function L(f){if(f>=48&&f<=57)return f-48;const P=f|32;return P>=97&&P<=102?P-97+10:-1}p(L,"fromHexCode");function A(f){return f===120?2:f===117?4:f===85?8:0}p(A,"escapedHexLen");function F(f){return f>=48&&f<=57?f-48:-1}p(F,"fromDecimalCode");function z(f){switch(f){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
138
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}p(z,"simpleEscapeSequence");function q(f){return f<=65535?String.fromCharCode(f):String.fromCharCode((f-65536>>10)+55296,(f-65536&1023)+56320)}p(q,"charFromCodepoint");function I(f,P,G){P==="__proto__"?Object.defineProperty(f,P,{configurable:!0,enumerable:!0,writable:!0,value:G}):f[P]=G}p(I,"setProperty");const rt=new Array(256),W=new Array(256);for(let f=0;f<256;f++)rt[f]=z(f)?1:0,W[f]=z(f);function E(f,P){this.input=f,this.filename=P.filename||null,this.schema=P.schema||i,this.onWarning=P.onWarning||null,this.legacy=P.legacy||!1,this.json=P.json||!1,this.listener=P.listener||null,this.maxDepth=typeof P.maxDepth=="number"?P.maxDepth:100,this.maxTotalMergeKeys=typeof P.maxTotalMergeKeys=="number"?P.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=f.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}p(E,"State");function M(f,P){const G={name:f.filename,buffer:f.input.slice(0,-1),position:f.position,line:f.line,column:f.position-f.lineStart};return G.snippet=r(G),new t(P,G)}p(M,"generateError");function v(f,P){throw M(f,P)}p(v,"throwError");function R(f,P){f.onWarning&&f.onWarning.call(null,M(f,P))}p(R,"throwWarning");function $(f,P,G){const K=f.anchorMapTransactions;if(K.length!==0){const j=K[K.length-1];s.call(j,P)||(j[P]={existed:s.call(f.anchorMap,P),value:f.anchorMap[P]})}f.anchorMap[P]=G}p($,"storeAnchor");function X(f){f.anchorMapTransactions.push(Object.create(null))}p(X,"beginAnchorTransaction");function Z(f){const P=f.anchorMapTransactions.pop(),G=f.anchorMapTransactions;if(G.length===0)return;const K=G[G.length-1],j=Object.keys(P);for(let nt=0,T=j.length;nt<T;nt+=1){const N=j[nt];s.call(K,N)||(K[N]=P[N])}}p(Z,"commitAnchorTransaction");function lt(f){const P=f.anchorMapTransactions.pop(),G=Object.keys(P);for(let K=G.length-1;K>=0;K-=1){const j=P[G[K]];j.existed?f.anchorMap[G[K]]=j.value:delete f.anchorMap[G[K]]}}p(lt,"rollbackAnchorTransaction");function ht(f){return{position:f.position,line:f.line,lineStart:f.lineStart,lineIndent:f.lineIndent,firstTabInLine:f.firstTabInLine,tag:f.tag,anchor:f.anchor,kind:f.kind,result:f.result}}p(ht,"snapshotState");function ut(f,P){f.position=P.position,f.line=P.line,f.lineStart=P.lineStart,f.lineIndent=P.lineIndent,f.firstTabInLine=P.firstTabInLine,f.tag=P.tag,f.anchor=P.anchor,f.kind=P.kind,f.result=P.result}p(ut,"restoreState");const bt={YAML:p(function(P,G,K){P.version!==null&&v(P,"duplication of %YAML directive"),K.length!==1&&v(P,"YAML directive accepts exactly one argument");const j=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);j===null&&v(P,"ill-formed argument of the YAML directive");const nt=parseInt(j[1],10),T=parseInt(j[2],10);nt!==1&&v(P,"unacceptable YAML version of the document"),P.version=K[0],P.checkLineBreaks=T<2,T!==1&&T!==2&&R(P,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:p(function(P,G,K){let j;K.length!==2&&v(P,"TAG directive accepts exactly two arguments");const nt=K[0];j=K[1],y.test(nt)||v(P,"ill-formed tag handle (first argument) of the TAG directive"),s.call(P.tagMap,nt)&&v(P,'there is a previously declared suffix for "'+nt+'" tag handle'),x.test(j)||v(P,"ill-formed tag prefix (second argument) of the TAG directive");try{j=decodeURIComponent(j)}catch{v(P,"tag prefix is malformed: "+j)}P.tagMap[nt]=j},"handleTagDirective")};function Tt(f,P,G,K){if(P<G){const j=f.input.slice(P,G);if(K)for(let nt=0,T=j.length;nt<T;nt+=1){const N=j.charCodeAt(nt);N===9||N>=32&&N<=1114111||v(f,"expected valid JSON character")}else u.test(j)&&v(f,"the stream contains non-printable characters");f.result+=j}}p(Tt,"captureSegment");function yt(f,P,G,K){e.isObject(G)||v(f,"cannot merge mappings; the provided source object is unacceptable");const j=Object.keys(G);for(let nt=0,T=j.length;nt<T;nt+=1){const N=j[nt];f.maxTotalMergeKeys!==-1&&++f.totalMergeKeys>f.maxTotalMergeKeys&&v(f,"merge keys exceeded maxTotalMergeKeys ("+f.maxTotalMergeKeys+")"),s.call(P,N)||(I(P,N,G[N]),K[N]=!0)}}p(yt,"mergeMappings");function At(f,P,G,K,j,nt,T,N,it){if(Array.isArray(j)){j=Array.prototype.slice.call(j);for(let V=0,Q=j.length;V<Q;V+=1)Array.isArray(j[V])&&v(f,"nested arrays are not supported inside keys"),typeof j=="object"&&C(j[V])==="[object Object]"&&(j[V]="[object Object]")}if(typeof j=="object"&&C(j)==="[object Object]"&&(j="[object Object]"),j=String(j),P===null&&(P={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(nt))for(let V=0,Q=nt.length;V<Q;V+=1)yt(f,P,nt[V],G);else yt(f,P,nt,G);else!f.json&&!s.call(G,j)&&s.call(P,j)&&(f.line=T||f.line,f.lineStart=N||f.lineStart,f.position=it||f.position,v(f,"duplicated mapping key")),I(P,j,nt),delete G[j];return P}p(At,"storeMappingPair");function It(f){const P=f.input.charCodeAt(f.position);P===10?f.position++:P===13?(f.position++,f.input.charCodeAt(f.position)===10&&f.position++):v(f,"a line break is expected"),f.line+=1,f.lineStart=f.position,f.firstTabInLine=-1}p(It,"readLineBreak");function Bt(f,P,G){let K=0,j=f.input.charCodeAt(f.position);for(;j!==0;){for(;k(j);)j===9&&f.firstTabInLine===-1&&(f.firstTabInLine=f.position),j=f.input.charCodeAt(++f.position);if(P&&j===35)do j=f.input.charCodeAt(++f.position);while(j!==10&&j!==13&&j!==0);if(b(j))for(It(f),j=f.input.charCodeAt(f.position),K++,f.lineIndent=0;j===32;)f.lineIndent++,j=f.input.charCodeAt(++f.position);else break}return G!==-1&&K!==0&&f.lineIndent<G&&R(f,"deficient indentation"),K}p(Bt,"skipSeparationSpace");function ct(f){let P=f.position,G=f.input.charCodeAt(P);return!!((G===45||G===46)&&G===f.input.charCodeAt(P+1)&&G===f.input.charCodeAt(P+2)&&(P+=3,G=f.input.charCodeAt(P),G===0||w(G)))}p(ct,"testDocumentSeparator");function xt(f,P){P===1?f.result+=" ":P>1&&(f.result+=e.repeat(`
|
|
139
|
+
`,P-1))}p(xt,"writeFoldedLines");function Et(f,P,G){let K,j,nt,T,N,it;const V=f.kind,Q=f.result;let ot=f.input.charCodeAt(f.position);if(w(ot)||_(ot)||ot===35||ot===38||ot===42||ot===33||ot===124||ot===62||ot===39||ot===34||ot===37||ot===64||ot===96)return!1;if(ot===63||ot===45){const st=f.input.charCodeAt(f.position+1);if(w(st)||G&&_(st))return!1}for(f.kind="scalar",f.result="",K=j=f.position,nt=!1;ot!==0;){if(ot===58){const st=f.input.charCodeAt(f.position+1);if(w(st)||G&&_(st))break}else if(ot===35){const st=f.input.charCodeAt(f.position-1);if(w(st))break}else{if(f.position===f.lineStart&&ct(f)||G&&_(ot))break;if(b(ot))if(T=f.line,N=f.lineStart,it=f.lineIndent,Bt(f,!1,-1),f.lineIndent>=P){nt=!0,ot=f.input.charCodeAt(f.position);continue}else{f.position=j,f.line=T,f.lineStart=N,f.lineIndent=it;break}}nt&&(Tt(f,K,j,!1),xt(f,f.line-T),K=j=f.position,nt=!1),k(ot)||(j=f.position+1),ot=f.input.charCodeAt(++f.position)}return Tt(f,K,j,!1),f.result?!0:(f.kind=V,f.result=Q,!1)}p(Et,"readPlainScalar");function Nt(f,P){let G,K,j=f.input.charCodeAt(f.position);if(j!==39)return!1;for(f.kind="scalar",f.result="",f.position++,G=K=f.position;(j=f.input.charCodeAt(f.position))!==0;)if(j===39)if(Tt(f,G,f.position,!0),j=f.input.charCodeAt(++f.position),j===39)G=f.position,f.position++,K=f.position;else return!0;else b(j)?(Tt(f,G,K,!0),xt(f,Bt(f,!1,P)),G=K=f.position):f.position===f.lineStart&&ct(f)?v(f,"unexpected end of the document within a single quoted scalar"):(f.position++,k(j)||(K=f.position));v(f,"unexpected end of the stream within a single quoted scalar")}p(Nt,"readSingleQuotedScalar");function Gt(f,P){let G,K,j,nt=f.input.charCodeAt(f.position);if(nt!==34)return!1;for(f.kind="scalar",f.result="",f.position++,G=K=f.position;(nt=f.input.charCodeAt(f.position))!==0;){if(nt===34)return Tt(f,G,f.position,!0),f.position++,!0;if(nt===92){if(Tt(f,G,f.position,!0),nt=f.input.charCodeAt(++f.position),b(nt))Bt(f,!1,P);else if(nt<256&&rt[nt])f.result+=W[nt],f.position++;else if((j=A(nt))>0){let T=j,N=0;for(;T>0;T--)nt=f.input.charCodeAt(++f.position),(j=L(nt))>=0?N=(N<<4)+j:v(f,"expected hexadecimal character");f.result+=q(N),f.position++}else v(f,"unknown escape sequence");G=K=f.position}else b(nt)?(Tt(f,G,K,!0),xt(f,Bt(f,!1,P)),G=K=f.position):f.position===f.lineStart&&ct(f)?v(f,"unexpected end of the document within a double quoted scalar"):(f.position++,k(nt)||(K=f.position))}v(f,"unexpected end of the stream within a double quoted scalar")}p(Gt,"readDoubleQuotedScalar");function H(f,P){let G=!0,K,j,nt;const T=f.tag;let N;const it=f.anchor;let V,Q,ot,st;const St=Object.create(null);let ft,wt,Lt,qt=f.input.charCodeAt(f.position);if(qt===91)V=93,st=!1,N=[];else if(qt===123)V=125,st=!0,N={};else return!1;for(f.anchor!==null&&$(f,f.anchor,N),qt=f.input.charCodeAt(++f.position);qt!==0;){if(Bt(f,!0,P),qt=f.input.charCodeAt(f.position),qt===V)return f.position++,f.tag=T,f.anchor=it,f.kind=st?"mapping":"sequence",f.result=N,!0;if(G?qt===44&&v(f,"expected the node content, but found ','"):v(f,"missed comma between flow collection entries"),wt=ft=Lt=null,Q=ot=!1,qt===63){const Vt=f.input.charCodeAt(f.position+1);w(Vt)&&(Q=ot=!0,f.position++,Bt(f,!0,P))}K=f.line,j=f.lineStart,nt=f.position,ie(f,P,a,!1,!0),wt=f.tag,ft=f.result,Bt(f,!0,P),qt=f.input.charCodeAt(f.position),(ot||f.line===K)&&qt===58&&(Q=!0,qt=f.input.charCodeAt(++f.position),Bt(f,!0,P),ie(f,P,a,!1,!0),Lt=f.result),st?At(f,N,St,wt,ft,Lt,K,j,nt):Q?N.push(At(f,null,St,wt,ft,Lt,K,j,nt)):N.push(ft),Bt(f,!0,P),qt=f.input.charCodeAt(f.position),qt===44?(G=!0,qt=f.input.charCodeAt(++f.position)):G=!1}v(f,"unexpected end of the stream within a flow collection")}p(H,"readFlowCollection");function kt(f,P){let G,K=h,j=!1,nt=!1,T=P,N=0,it=!1,V,Q=f.input.charCodeAt(f.position);if(Q===124)G=!1;else if(Q===62)G=!0;else return!1;for(f.kind="scalar",f.result="";Q!==0;)if(Q=f.input.charCodeAt(++f.position),Q===43||Q===45)h===K?K=Q===43?d:l:v(f,"repeat of a chomping mode identifier");else if((V=F(Q))>=0)V===0?v(f,"bad explicit indentation width of a block scalar; it cannot be less than one"):nt?v(f,"repeat of an indentation width identifier"):(T=P+V-1,nt=!0);else break;if(k(Q)){do Q=f.input.charCodeAt(++f.position);while(k(Q));if(Q===35)do Q=f.input.charCodeAt(++f.position);while(!b(Q)&&Q!==0)}for(;Q!==0;){for(It(f),f.lineIndent=0,Q=f.input.charCodeAt(f.position);(!nt||f.lineIndent<T)&&Q===32;)f.lineIndent++,Q=f.input.charCodeAt(++f.position);if(!nt&&f.lineIndent>T&&(T=f.lineIndent),b(Q)){N++;continue}if(!nt&&T===0&&v(f,"missing indentation for block scalar"),f.lineIndent<T){K===d?f.result+=e.repeat(`
|
|
140
|
+
`,j?1+N:N):K===h&&j&&(f.result+=`
|
|
141
|
+
`);break}G?k(Q)?(it=!0,f.result+=e.repeat(`
|
|
142
|
+
`,j?1+N:N)):it?(it=!1,f.result+=e.repeat(`
|
|
143
|
+
`,N+1)):N===0?j&&(f.result+=" "):f.result+=e.repeat(`
|
|
144
|
+
`,N):f.result+=e.repeat(`
|
|
145
|
+
`,j?1+N:N),j=!0,nt=!0,N=0;const ot=f.position;for(;!b(Q)&&Q!==0;)Q=f.input.charCodeAt(++f.position);Tt(f,ot,f.position,!1)}return!0}p(kt,"readBlockScalar");function ke(f,P){const G=f.tag,K=f.anchor,j=[];let nt=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&$(f,f.anchor,j);let T=f.input.charCodeAt(f.position);for(;T!==0&&(f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,v(f,"tab characters must not be used in indentation")),T===45);){const N=f.input.charCodeAt(f.position+1);if(!w(N))break;if(nt=!0,f.position++,Bt(f,!0,-1)&&f.lineIndent<=P){j.push(null),T=f.input.charCodeAt(f.position);continue}const it=f.line;if(ie(f,P,o,!1,!0),j.push(f.result),Bt(f,!0,-1),T=f.input.charCodeAt(f.position),(f.line===it||f.lineIndent>P)&&T!==0)v(f,"bad indentation of a sequence entry");else if(f.lineIndent<P)break}return nt?(f.tag=G,f.anchor=K,f.kind="sequence",f.result=j,!0):!1}p(ke,"readBlockSequence");function Ht(f,P,G){let K,j,nt,T;const N=f.tag,it=f.anchor,V={},Q=Object.create(null);let ot=null,st=null,St=null,ft=!1,wt=!1;if(f.firstTabInLine!==-1)return!1;f.anchor!==null&&$(f,f.anchor,V);let Lt=f.input.charCodeAt(f.position);for(;Lt!==0;){!ft&&f.firstTabInLine!==-1&&(f.position=f.firstTabInLine,v(f,"tab characters must not be used in indentation"));const qt=f.input.charCodeAt(f.position+1),Vt=f.line;if((Lt===63||Lt===58)&&w(qt))Lt===63?(ft&&(At(f,V,Q,ot,st,null,j,nt,T),ot=st=St=null),wt=!0,ft=!0,K=!0):ft?(ft=!1,K=!0):v(f,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),f.position+=1,Lt=qt;else{if(j=f.line,nt=f.lineStart,T=f.position,!ie(f,G,n,!1,!0))break;if(f.line===Vt){for(Lt=f.input.charCodeAt(f.position);k(Lt);)Lt=f.input.charCodeAt(++f.position);if(Lt===58)Lt=f.input.charCodeAt(++f.position),w(Lt)||v(f,"a whitespace character is expected after the key-value separator within a block mapping"),ft&&(At(f,V,Q,ot,st,null,j,nt,T),ot=st=St=null),wt=!0,ft=!1,K=!1,ot=f.tag,st=f.result;else if(wt)v(f,"can not read an implicit mapping pair; a colon is missed");else return f.tag=N,f.anchor=it,!0}else if(wt)v(f,"can not read a block mapping entry; a multiline key may not be an implicit key");else return f.tag=N,f.anchor=it,!0}if((f.line===Vt||f.lineIndent>P)&&(ft&&(j=f.line,nt=f.lineStart,T=f.position),ie(f,P,c,!0,K)&&(ft?st=f.result:St=f.result),ft||(At(f,V,Q,ot,st,St,j,nt,T),ot=st=St=null),Bt(f,!0,-1),Lt=f.input.charCodeAt(f.position)),(f.line===Vt||f.lineIndent>P)&&Lt!==0)v(f,"bad indentation of a mapping entry");else if(f.lineIndent<P)break}return ft&&At(f,V,Q,ot,st,null,j,nt,T),wt&&(f.tag=N,f.anchor=it,f.kind="mapping",f.result=V),wt}p(Ht,"readBlockMapping");function or(f){let P=!1,G=!1,K,j,nt=f.input.charCodeAt(f.position);if(nt!==33)return!1;f.tag!==null&&v(f,"duplication of a tag property"),nt=f.input.charCodeAt(++f.position),nt===60?(P=!0,nt=f.input.charCodeAt(++f.position)):nt===33?(G=!0,K="!!",nt=f.input.charCodeAt(++f.position)):K="!";let T=f.position;if(P){do nt=f.input.charCodeAt(++f.position);while(nt!==0&&nt!==62);f.position<f.length?(j=f.input.slice(T,f.position),nt=f.input.charCodeAt(++f.position)):v(f,"unexpected end of the stream within a verbatim tag")}else{for(;nt!==0&&!w(nt);)nt===33&&(G?v(f,"tag suffix cannot contain exclamation marks"):(K=f.input.slice(T-1,f.position+1),y.test(K)||v(f,"named tag handle cannot contain such characters"),G=!0,T=f.position+1)),nt=f.input.charCodeAt(++f.position);j=f.input.slice(T,f.position),m.test(j)&&v(f,"tag suffix cannot contain flow indicator characters")}j&&!x.test(j)&&v(f,"tag name cannot contain such characters: "+j);try{j=decodeURIComponent(j)}catch{v(f,"tag name is malformed: "+j)}return P?f.tag=j:s.call(f.tagMap,K)?f.tag=f.tagMap[K]+j:K==="!"?f.tag="!"+j:K==="!!"?f.tag="tag:yaml.org,2002:"+j:v(f,'undeclared tag handle "'+K+'"'),!0}p(or,"readTagProperty");function ue(f){let P=f.input.charCodeAt(f.position);if(P!==38)return!1;f.anchor!==null&&v(f,"duplication of an anchor property"),P=f.input.charCodeAt(++f.position);const G=f.position;for(;P!==0&&!w(P)&&!_(P);)P=f.input.charCodeAt(++f.position);return f.position===G&&v(f,"name of an anchor node must contain at least one character"),f.anchor=f.input.slice(G,f.position),!0}p(ue,"readAnchorProperty");function De(f){let P=f.input.charCodeAt(f.position);if(P!==42)return!1;P=f.input.charCodeAt(++f.position);const G=f.position;for(;P!==0&&!w(P)&&!_(P);)P=f.input.charCodeAt(++f.position);f.position===G&&v(f,"name of an alias node must contain at least one character");const K=f.input.slice(G,f.position);return s.call(f.anchorMap,K)||v(f,'unidentified alias "'+K+'"'),f.result=f.anchorMap[K],Bt(f,!0,-1),!0}p(De,"readAlias");function xr(f,P,G,K){const j=ht(f);return X(f),ut(f,P),f.tag=null,f.anchor=null,f.kind=null,f.result=null,Ht(f,G,K)&&f.kind==="mapping"?(Z(f),!0):(lt(f),ut(f,j),!1)}p(xr,"tryReadBlockMappingFromProperty");function ie(f,P,G,K,j){let nt,T,N=1,it=!1,V=!1,Q=null,ot,st,St;f.depth>=f.maxDepth&&v(f,"nesting exceeded maxDepth ("+f.maxDepth+")"),f.depth+=1,f.listener!==null&&f.listener("open",f),f.tag=null,f.anchor=null,f.kind=null,f.result=null;const ft=nt=T=c===G||o===G;if(K&&Bt(f,!0,-1)&&(it=!0,f.lineIndent>P?N=1:f.lineIndent===P?N=0:f.lineIndent<P&&(N=-1)),N===1)for(;;){const wt=f.input.charCodeAt(f.position),Lt=ht(f);if(it&&(wt===33&&f.tag!==null||wt===38&&f.anchor!==null)||!or(f)&&!ue(f))break;Q===null&&(Q=Lt),Bt(f,!0,-1)?(it=!0,T=ft,f.lineIndent>P?N=1:f.lineIndent===P?N=0:f.lineIndent<P&&(N=-1)):T=!1}if(T&&(T=it||j),N===1||c===G)if(a===G||n===G?st=P:st=P+1,St=f.position-f.lineStart,N===1)if(T&&(ke(f,St)||Ht(f,St,st))||H(f,st))V=!0;else{const wt=f.input.charCodeAt(f.position);Q!==null&&ft&&!T&&wt!==124&&wt!==62&&xr(f,Q,Q.position-Q.lineStart,st)||nt&&kt(f,st)||Nt(f,st)||Gt(f,st)?V=!0:De(f)?(V=!0,(f.tag!==null||f.anchor!==null)&&v(f,"alias node should not have any properties")):Et(f,st,a===G)&&(V=!0,f.tag===null&&(f.tag="?")),f.anchor!==null&&$(f,f.anchor,f.result)}else N===0&&(V=T&&ke(f,St));if(f.tag===null)f.anchor!==null&&$(f,f.anchor,f.result);else if(f.tag==="?"){f.result!==null&&f.kind!=="scalar"&&v(f,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+f.kind+'"');for(let wt=0,Lt=f.implicitTypes.length;wt<Lt;wt+=1)if(ot=f.implicitTypes[wt],ot.resolve(f.result)){f.result=ot.construct(f.result),f.tag=ot.tag,f.anchor!==null&&$(f,f.anchor,f.result);break}}else if(f.tag!=="!"){if(s.call(f.typeMap[f.kind||"fallback"],f.tag))ot=f.typeMap[f.kind||"fallback"][f.tag];else{ot=null;const wt=f.typeMap.multi[f.kind||"fallback"];for(let Lt=0,qt=wt.length;Lt<qt;Lt+=1)if(f.tag.slice(0,wt[Lt].tag.length)===wt[Lt].tag){ot=wt[Lt];break}}ot||v(f,"unknown tag !<"+f.tag+">"),f.result!==null&&ot.kind!==f.kind&&v(f,"unacceptable node kind for !<"+f.tag+'> tag; it should be "'+ot.kind+'", not "'+f.kind+'"'),ot.resolve(f.result,f.tag)?(f.result=ot.construct(f.result,f.tag),f.anchor!==null&&$(f,f.anchor,f.result)):v(f,"cannot resolve a node with !<"+f.tag+"> explicit tag")}return f.listener!==null&&f.listener("close",f),f.depth-=1,f.tag!==null||f.anchor!==null||V}p(ie,"composeNode");function br(f){const P=f.position;let G=!1,K;for(f.version=null,f.checkLineBreaks=f.legacy,f.tagMap=Object.create(null),f.anchorMap=Object.create(null);(K=f.input.charCodeAt(f.position))!==0&&(Bt(f,!0,-1),K=f.input.charCodeAt(f.position),!(f.lineIndent>0||K!==37));){G=!0,K=f.input.charCodeAt(++f.position);let j=f.position;for(;K!==0&&!w(K);)K=f.input.charCodeAt(++f.position);const nt=f.input.slice(j,f.position),T=[];for(nt.length<1&&v(f,"directive name must not be less than one character in length");K!==0;){for(;k(K);)K=f.input.charCodeAt(++f.position);if(K===35){do K=f.input.charCodeAt(++f.position);while(K!==0&&!b(K));break}if(b(K))break;for(j=f.position;K!==0&&!w(K);)K=f.input.charCodeAt(++f.position);T.push(f.input.slice(j,f.position))}K!==0&&It(f),s.call(bt,nt)?bt[nt](f,nt,T):R(f,'unknown document directive "'+nt+'"')}if(Bt(f,!0,-1),f.lineIndent===0&&f.input.charCodeAt(f.position)===45&&f.input.charCodeAt(f.position+1)===45&&f.input.charCodeAt(f.position+2)===45?(f.position+=3,Bt(f,!0,-1)):G&&v(f,"directives end mark is expected"),ie(f,f.lineIndent-1,c,!1,!0),Bt(f,!0,-1),f.checkLineBreaks&&g.test(f.input.slice(P,f.position))&&R(f,"non-ASCII line breaks are interpreted as content"),f.documents.push(f.result),f.position===f.lineStart&&ct(f)){f.input.charCodeAt(f.position)===46&&(f.position+=3,Bt(f,!0,-1));return}f.position<f.length-1&&v(f,"end of the stream or a document separator is expected")}p(br,"readDocument");function Xe(f,P){f=String(f),P=P||{},f.length!==0&&(f.charCodeAt(f.length-1)!==10&&f.charCodeAt(f.length-1)!==13&&(f+=`
|
|
146
|
+
`),f.charCodeAt(0)===65279&&(f=f.slice(1)));const G=new E(f,P),K=f.indexOf("\0");for(K!==-1&&(G.position=K,v(G,"null byte is not allowed in input")),G.input+="\0";G.input.charCodeAt(G.position)===32;)G.lineIndent+=1,G.position+=1;for(;G.position<G.length-1;)br(G);return G.documents}p(Xe,"loadDocuments");function nr(f,P,G){P!==null&&typeof P=="object"&&typeof G>"u"&&(G=P,P=null);const K=Xe(f,G);if(typeof P!="function")return K;for(let j=0,nt=K.length;j<nt;j+=1)P(K[j])}p(nr,"loadAll2");function lr(f,P){const G=Xe(f,P);if(G.length!==0){if(G.length===1)return G[0];throw new t("expected a single document in the stream, but found more")}}return p(lr,"load2"),ws.loadAll=nr,ws.load=lr,ws}p(Yd,"requireLoader");var bo={},Rh;function Ud(){if(Rh)return bo;Rh=1;const e=Fi(),t=Ai(),r=ya(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,n=9,o=10,c=13,h=32,l=33,d=34,u=35,g=37,m=38,y=39,x=42,C=44,b=45,k=58,w=61,_=62,L=63,A=64,F=91,z=93,q=96,I=123,rt=124,W=125,E={};E[0]="\\0",E[7]="\\a",E[8]="\\b",E[9]="\\t",E[10]="\\n",E[11]="\\v",E[12]="\\f",E[13]="\\r",E[27]="\\e",E[34]='\\"',E[92]="\\\\",E[133]="\\N",E[160]="\\_",E[8232]="\\L",E[8233]="\\P";const M=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(T,N){if(N===null)return{};const it={},V=Object.keys(N);for(let Q=0,ot=V.length;Q<ot;Q+=1){let st=V[Q],St=String(N[st]);st.slice(0,2)==="!!"&&(st="tag:yaml.org,2002:"+st.slice(2));const ft=T.compiledTypeMap.fallback[st];ft&&s.call(ft.styleAliases,St)&&(St=ft.styleAliases[St]),it[st]=St}return it}p(R,"compileStyleMap");function $(T){let N,it;const V=T.toString(16).toUpperCase();if(T<=255)N="x",it=2;else if(T<=65535)N="u",it=4;else if(T<=4294967295)N="U",it=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+N+e.repeat("0",it-V.length)+V}p($,"encodeHex");const X=1,Z=2;function lt(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=R(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?Z:X,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}p(lt,"State");function ht(T,N){const it=e.repeat(" ",N);let V=0,Q="";const ot=T.length;for(;V<ot;){let st;const St=T.indexOf(`
|
|
147
|
+
`,V);St===-1?(st=T.slice(V),V=ot):(st=T.slice(V,St+1),V=St+1),st.length&&st!==`
|
|
148
|
+
`&&(Q+=it),Q+=st}return Q}p(ht,"indentString");function ut(T,N){return`
|
|
149
|
+
`+e.repeat(" ",T.indent*N)}p(ut,"generateNextLine");function bt(T,N){for(let it=0,V=T.implicitTypes.length;it<V;it+=1)if(T.implicitTypes[it].resolve(N))return!0;return!1}p(bt,"testImplicitResolving");function Tt(T){return T===h||T===n}p(Tt,"isWhitespace");function yt(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==a||T>=65536&&T<=1114111}p(yt,"isPrintable");function At(T){return yt(T)&&T!==a&&T!==c&&T!==o}p(At,"isNsCharOrWhitespace");function It(T,N,it){const V=At(T),Q=V&&!Tt(T);return(it?V:V&&T!==C&&T!==F&&T!==z&&T!==I&&T!==W)&&T!==u&&!(N===k&&!Q)||At(N)&&!Tt(N)&&T===u||N===k&&Q}p(It,"isPlainSafe");function Bt(T){return yt(T)&&T!==a&&!Tt(T)&&T!==b&&T!==L&&T!==k&&T!==C&&T!==F&&T!==z&&T!==I&&T!==W&&T!==u&&T!==m&&T!==x&&T!==l&&T!==rt&&T!==w&&T!==_&&T!==y&&T!==d&&T!==g&&T!==A&&T!==q}p(Bt,"isPlainSafeFirst");function ct(T){return!Tt(T)&&T!==k}p(ct,"isPlainSafeLast");function xt(T,N){const it=T.charCodeAt(N);let V;return it>=55296&&it<=56319&&N+1<T.length&&(V=T.charCodeAt(N+1),V>=56320&&V<=57343)?(it-55296)*1024+V-56320+65536:it}p(xt,"codePointAt");function Et(T){return/^\n* /.test(T)}p(Et,"needIndentIndicator");const Nt=1,Gt=2,H=3,kt=4,ke=5;function Ht(T,N,it,V,Q,ot,st,St){let ft,wt=0,Lt=null,qt=!1,Vt=!1;const $i=V!==-1;let kr=-1,Sr=Bt(xt(T,0))&&ct(xt(T,T.length-1));if(N||st)for(ft=0;ft<T.length;wt>=65536?ft+=2:ft++){if(wt=xt(T,ft),!yt(wt))return ke;Sr=Sr&&It(wt,Lt,St),Lt=wt}else{for(ft=0;ft<T.length;wt>=65536?ft+=2:ft++){if(wt=xt(T,ft),wt===o)qt=!0,$i&&(Vt=Vt||ft-kr-1>V&&T[kr+1]!==" ",kr=ft);else if(!yt(wt))return ke;Sr=Sr&&It(wt,Lt,St),Lt=wt}Vt=Vt||$i&&ft-kr-1>V&&T[kr+1]!==" "}return!qt&&!Vt?Sr&&!st&&!Q(T)?Nt:ot===Z?ke:Gt:it>9&&Et(T)?ke:st?ot===Z?ke:Gt:Vt?kt:H}p(Ht,"chooseScalarStyle");function or(T,N,it,V,Q){T.dump=(function(){if(N.length===0)return T.quotingType===Z?'""':"''";if(!T.noCompatMode&&(M.indexOf(N)!==-1||v.test(N)))return T.quotingType===Z?'"'+N+'"':"'"+N+"'";const ot=T.indent*Math.max(1,it),st=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-ot),St=V||T.flowLevel>-1&&it>=T.flowLevel;function ft(wt){return bt(T,wt)}switch(p(ft,"testAmbiguity"),Ht(N,St,T.indent,st,ft,T.quotingType,T.forceQuotes&&!V,Q)){case Nt:return N;case Gt:return"'"+N.replace(/'/g,"''")+"'";case H:return"|"+ue(N,T.indent)+De(ht(N,ot));case kt:return">"+ue(N,T.indent)+De(ht(xr(N,st),ot));case ke:return'"'+br(N)+'"';default:throw new t("impossible error: invalid scalar style")}})()}p(or,"writeScalar");function ue(T,N){const it=Et(T)?String(N):"",V=T[T.length-1]===`
|
|
150
|
+
`,ot=V&&(T[T.length-2]===`
|
|
151
|
+
`||T===`
|
|
152
|
+
`)?"+":V?"":"-";return it+ot+`
|
|
153
|
+
`}p(ue,"blockHeader");function De(T){return T[T.length-1]===`
|
|
154
|
+
`?T.slice(0,-1):T}p(De,"dropEndingNewline");function xr(T,N){const it=/(\n+)([^\n]*)/g;let V=(function(){let St=T.indexOf(`
|
|
155
|
+
`);return St=St!==-1?St:T.length,it.lastIndex=St,ie(T.slice(0,St),N)})(),Q=T[0]===`
|
|
156
|
+
`||T[0]===" ",ot,st;for(;st=it.exec(T);){const St=st[1],ft=st[2];ot=ft[0]===" ",V+=St+(!Q&&!ot&&ft!==""?`
|
|
157
|
+
`:"")+ie(ft,N),Q=ot}return V}p(xr,"foldString");function ie(T,N){if(T===""||T[0]===" ")return T;const it=/ [^ ]/g;let V,Q=0,ot,st=0,St=0,ft="";for(;V=it.exec(T);)St=V.index,St-Q>N&&(ot=st>Q?st:St,ft+=`
|
|
158
|
+
`+T.slice(Q,ot),Q=ot+1),st=St;return ft+=`
|
|
159
|
+
`,T.length-Q>N&&st>Q?ft+=T.slice(Q,st)+`
|
|
160
|
+
`+T.slice(st+1):ft+=T.slice(Q),ft.slice(1)}p(ie,"foldLine");function br(T){let N="",it=0;for(let V=0;V<T.length;it>=65536?V+=2:V++){it=xt(T,V);const Q=E[it];!Q&&yt(it)?(N+=T[V],it>=65536&&(N+=T[V+1])):N+=Q||$(it)}return N}p(br,"escapeString");function Xe(T,N,it){let V="";const Q=T.tag;for(let ot=0,st=it.length;ot<st;ot+=1){let St=it[ot];T.replacer&&(St=T.replacer.call(it,String(ot),St)),(G(T,N,St,!1,!1)||typeof St>"u"&&G(T,N,null,!1,!1))&&(V!==""&&(V+=","+(T.condenseFlow?"":" ")),V+=T.dump)}T.tag=Q,T.dump="["+V+"]"}p(Xe,"writeFlowSequence");function nr(T,N,it,V){let Q="";const ot=T.tag;for(let st=0,St=it.length;st<St;st+=1){let ft=it[st];T.replacer&&(ft=T.replacer.call(it,String(st),ft)),(G(T,N+1,ft,!0,!0,!1,!0)||typeof ft>"u"&&G(T,N+1,null,!0,!0,!1,!0))&&((!V||Q!=="")&&(Q+=ut(T,N)),T.dump&&o===T.dump.charCodeAt(0)?Q+="-":Q+="- ",Q+=T.dump)}T.tag=ot,T.dump=Q||"[]"}p(nr,"writeBlockSequence");function lr(T,N,it){let V="";const Q=T.tag,ot=Object.keys(it);for(let st=0,St=ot.length;st<St;st+=1){let ft="";V!==""&&(ft+=", "),T.condenseFlow&&(ft+='"');const wt=ot[st];let Lt=it[wt];T.replacer&&(Lt=T.replacer.call(it,wt,Lt)),G(T,N,wt,!1,!1)&&(T.dump.length>1024&&(ft+="? "),ft+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),G(T,N,Lt,!1,!1)&&(ft+=T.dump,V+=ft))}T.tag=Q,T.dump="{"+V+"}"}p(lr,"writeFlowMapping");function f(T,N,it,V){let Q="";const ot=T.tag,st=Object.keys(it);if(T.sortKeys===!0)st.sort();else if(typeof T.sortKeys=="function")st.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let St=0,ft=st.length;St<ft;St+=1){let wt="";(!V||Q!=="")&&(wt+=ut(T,N));const Lt=st[St];let qt=it[Lt];if(T.replacer&&(qt=T.replacer.call(it,Lt,qt)),!G(T,N+1,Lt,!0,!0,!0))continue;const Vt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Vt&&(T.dump&&o===T.dump.charCodeAt(0)?wt+="?":wt+="? "),wt+=T.dump,Vt&&(wt+=ut(T,N)),G(T,N+1,qt,!0,Vt)&&(T.dump&&o===T.dump.charCodeAt(0)?wt+=":":wt+=": ",wt+=T.dump,Q+=wt)}T.tag=ot,T.dump=Q||"{}"}p(f,"writeBlockMapping");function P(T,N,it){const V=it?T.explicitTypes:T.implicitTypes;for(let Q=0,ot=V.length;Q<ot;Q+=1){const st=V[Q];if((st.instanceOf||st.predicate)&&(!st.instanceOf||typeof N=="object"&&N instanceof st.instanceOf)&&(!st.predicate||st.predicate(N))){if(it?st.multi&&st.representName?T.tag=st.representName(N):T.tag=st.tag:T.tag="?",st.represent){const St=T.styleMap[st.tag]||st.defaultStyle;let ft;if(i.call(st.represent)==="[object Function]")ft=st.represent(N,St);else if(s.call(st.represent,St))ft=st.represent[St](N,St);else throw new t("!<"+st.tag+'> tag resolver accepts not "'+St+'" style');T.dump=ft}return!0}}return!1}p(P,"detectType");function G(T,N,it,V,Q,ot,st){T.tag=null,T.dump=it,P(T,it,!1)||P(T,it,!0);const St=i.call(T.dump),ft=V;V&&(V=T.flowLevel<0||T.flowLevel>N);const wt=St==="[object Object]"||St==="[object Array]";let Lt,qt;if(wt&&(Lt=T.duplicates.indexOf(it),qt=Lt!==-1),(T.tag!==null&&T.tag!=="?"||qt||T.indent!==2&&N>0)&&(Q=!1),qt&&T.usedDuplicates[Lt])T.dump="*ref_"+Lt;else{if(wt&&qt&&!T.usedDuplicates[Lt]&&(T.usedDuplicates[Lt]=!0),St==="[object Object]")V&&Object.keys(T.dump).length!==0?(f(T,N,T.dump,Q),qt&&(T.dump="&ref_"+Lt+T.dump)):(lr(T,N,T.dump),qt&&(T.dump="&ref_"+Lt+" "+T.dump));else if(St==="[object Array]")V&&T.dump.length!==0?(T.noArrayIndent&&!st&&N>0?nr(T,N-1,T.dump,Q):nr(T,N,T.dump,Q),qt&&(T.dump="&ref_"+Lt+T.dump)):(Xe(T,N,T.dump),qt&&(T.dump="&ref_"+Lt+" "+T.dump));else if(St==="[object String]")T.tag!=="?"&&or(T,T.dump,N,ot,ft);else{if(St==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+St)}if(T.tag!==null&&T.tag!=="?"){let Vt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",T.dump=Vt+" "+T.dump}}return!0}p(G,"writeNode");function K(T,N){const it=[],V=[];j(T,it,V);const Q=V.length;for(let ot=0;ot<Q;ot+=1)N.duplicates.push(it[V[ot]]);N.usedDuplicates=new Array(Q)}p(K,"getDuplicateReferences");function j(T,N,it){if(T!==null&&typeof T=="object"){const V=N.indexOf(T);if(V!==-1)it.indexOf(V)===-1&&it.push(V);else if(N.push(T),Array.isArray(T))for(let Q=0,ot=T.length;Q<ot;Q+=1)j(T[Q],N,it);else{const Q=Object.keys(T);for(let ot=0,st=Q.length;ot<st;ot+=1)j(T[Q[ot]],N,it)}}}p(j,"inspectNode");function nt(T,N){N=N||{};const it=new lt(N);it.noRefs||K(T,it);let V=T;return it.replacer&&(V=it.replacer.call({"":V},"",V)),G(it,0,V,!0,!0)?it.dump+`
|
|
161
|
+
`:""}return p(nt,"dump2"),bo.dump=nt,bo}p(Ud,"requireDumper");var qh;function jd(){if(qh)return ye;qh=1;const e=Yd(),t=Ud();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return p(r,"renamed"),ye.Type=be(),ye.Schema=Fn(),ye.FAILSAFE_SCHEMA=On(),ye.JSON_SCHEMA=Rn(),ye.CORE_SCHEMA=qn(),ye.DEFAULT_SCHEMA=ya(),ye.load=e.load,ye.loadAll=e.loadAll,ye.dump=t.dump,ye.YAMLException=Ai(),ye.types={binary:zn(),float:Pn(),map:Mn(),null:$n(),pairs:Yn(),set:Un(),timestamp:Nn(),bool:Dn(),int:In(),merge:Wn(),omap:Hn(),seq:En(),str:An()},ye.safeLoad=r("safeLoad","load"),ye.safeLoadAll=r("safeLoadAll","loadAll"),ye.safeDump=r("safeDump","dump"),ye}p(jd,"requireJsYaml");var _C=jd(),vC=zd(_C),{Type:GT,Schema:XT,FAILSAFE_SCHEMA:VT,JSON_SCHEMA:LC,CORE_SCHEMA:ZT,DEFAULT_SCHEMA:KT,load:FC,loadAll:QT,dump:JT,YAMLException:tw,types:ew,safeLoad:rw,safeLoadAll:iw,safeDump:sw}=vC,AC=p((e,t)=>{const{theme:r,themeVariables:i}=t,{useGradient:s,gradientStart:a,gradientStop:n}=i??{},o=e.attr("id"),c=r!=null&&r.includes("dark")?"#FFFFFF":"#000000",h=p((d,u,g)=>e.append("defs").append("filter").attr("id",d).attr("height",u).attr("width",u).append("feDropShadow").attr("dx",g).attr("dy",g).attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",c),"dropShadow");if(h(`${o}-drop-shadow`,"130%","4"),h(`${o}-drop-shadow-small`,"150%","2"),!s)return;const l=e.append("linearGradient").attr("id",`${o}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");l.append("svg:stop").attr("offset","0%").attr("stop-color",a).attr("stop-opacity",1),l.append("svg:stop").attr("offset","100%").attr("stop-color",n).attr("stop-opacity",1)},"insertLookDefs"),EC=p(e=>{const{handDrawnSeed:t}=Rt();return{fill:e,hachureAngle:120,hachureGap:1.5,fillWeight:1.5,roughness:.7,stroke:e,seed:t}},"solidStateFill"),MC=p(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Dr=p(e=>{const t=OC([...e.cssCompiledStyles||[],...e.cssStyles||[],...MC(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),OC=p(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),Gd=p(e=>e==="color"||e==="font-size"||e==="font-family"||e==="font-weight"||e==="font-style"||e==="text-decoration"||e==="text-align"||e==="text-transform"||e==="line-height"||e==="letter-spacing"||e==="word-spacing"||e==="text-shadow"||e==="text-overflow"||e==="white-space"||e==="word-wrap"||e==="word-break"||e==="overflow-wrap"||e==="hyphens","isLabelStyle"),mt=p(e=>{const{stylesArray:t}=Dr(e),r=[],i=[],s=[],a=[];return t.forEach(n=>{const o=n[0];Gd(o)?r.push(n.join(":")+" !important"):(i.push(n.join(":")+" !important"),o.includes("stroke")&&s.push(n.join(":")+" !important"),o==="fill"&&a.push(n.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:a}},"styles2String"),gt=p((e,t)=>{var c;const{themeVariables:r,handDrawnSeed:i}=Rt(),{nodeBorder:s,mainBkg:a}=r,{stylesMap:n}=Dr(e);return Object.assign({roughness:.7,fill:n.get("fill")||a,fillStyle:"hachure",fillWeight:1.5,hachureGap:1.5,stroke:n.get("stroke")||s,seed:i,strokeWidth:((c=n.get("stroke-width"))==null?void 0:c.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:$C(n.get("stroke-dasharray"))},t)},"userNodeOverrides"),$C=p(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const DC=Object.freeze({left:0,top:0,width:16,height:16}),ea=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Xd=Object.freeze({...DC,...ea}),IC=Object.freeze({...Xd,body:"",hidden:!1}),PC=Object.freeze({width:null,height:null}),RC=Object.freeze({...PC,...ea}),qC=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const o=s.pop(),c=s.pop(),h={provider:s.length>0?s[0]:i,prefix:c,name:o};return ko(h)?h:null}const a=s[0],n=a.split("-");if(n.length>1){const o={provider:i,prefix:n.shift(),name:n.join("-")};return ko(o)?o:null}if(r&&i===""){const o={provider:i,prefix:"",name:a};return ko(o,r)?o:null}return null},ko=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function NC(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Nh(e,t){const r=NC(e,t);for(const i in IC)i in ea?i in e&&!(i in r)&&(r[i]=ea[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function WC(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function a(n){if(r[n])return s[n]=[];if(!(n in s)){s[n]=null;const o=i[n]&&i[n].parent,c=o&&a(o);c&&(s[n]=[o].concat(c))}return s[n]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(a),s}function Wh(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let a={};function n(o){a=Nh(i[o]||s[o],a)}return n(t),r.forEach(n),Nh(e,a)}function zC(e,t){if(e.icons[t])return Wh(e,t,[]);const r=WC(e,[t])[t];return r?Wh(e,t,r):null}const HC=/(-?[0-9.]*[0-9]+[0-9.]*)/g,YC=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function zh(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(HC);if(i===null||!i.length)return e;const s=[];let a=i.shift(),n=YC.test(a);for(;;){if(n){const o=parseFloat(a);isNaN(o)?s.push(a):s.push(Math.ceil(o*t*r)/r)}else s.push(a);if(a=i.shift(),a===void 0)return s.join("");n=!n}}function UC(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),a=e.indexOf("</"+t);if(s===-1||a===-1)break;const n=e.indexOf(">",a);if(n===-1)break;r+=e.slice(s+1,a).trim(),e=e.slice(0,i).trim()+e.slice(n+1)}return{defs:r,content:e}}function jC(e,t){return e?"<defs>"+e+"</defs>"+t:t}function GC(e,t,r){const i=UC(e);return jC(i.defs,t+i.content+r)}const XC=e=>e==="unset"||e==="undefined"||e==="none";function VC(e,t){const r={...Xd,...e},i={...RC,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let a=r.body;[r,i].forEach(y=>{const x=[],C=y.hFlip,b=y.vFlip;let k=y.rotate;C?b?k+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):b&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let w;switch(k<0&&(k-=Math.floor(k/4)*4),k=k%4,k){case 1:w=s.height/2+s.top,x.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,x.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")")}k%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),x.length&&(a=GC(a,'<g transform="'+x.join(" ")+'">',"</g>"))});const n=i.width,o=i.height,c=s.width,h=s.height;let l,d;n===null?(d=o===null?"1em":o==="auto"?h:o,l=zh(d,c/h)):(l=n==="auto"?c:n,d=o===null?zh(l,h/c):o==="auto"?h:o);const u={},g=(y,x)=>{XC(x)||(u[y]=x.toString())};g("width",l),g("height",d);const m=[s.left,s.top,c,h];return u.viewBox=m.join(" "),{attributes:u,viewBox:m,body:a}}const ZC=/\sid="(\S+)"/g,Hh=new Map;function KC(e){e=e.replace(/[0-9]+$/,"")||"a";const t=Hh.get(e)||0;return Hh.set(e,t+1),t?`${e}${t}`:e}function QC(e){const t=[];let r;for(;r=ZC.exec(e);)t.push(r[1]);if(!t.length)return e;const i="suffix"+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(s=>{const a=KC(s),n=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+i+"$3")}),e=e.replace(new RegExp(i,"g"),""),e}function JC(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var t0={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},Go=new Map,Vd=new Map,e0=p(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(J.debug("Registering icon pack:",t.name),"loader"in t)Vd.set(t.name,t.loader);else if("icons"in t)Go.set(t.name,t.icons);else throw J.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Zd=p(async(e,t)=>{const r=qC(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Go.get(i);if(!s){const n=Vd.get(i);if(!n)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await n(),prefix:i},Go.set(i,s)}catch(o){throw J.error(o),new Error(`Failed to load icon set: ${r.prefix}`)}}const a=zC(s,r.name);if(!a)throw new Error(`Icon not found: ${e}`);return a},"getRegisteredIconData"),Kd=p(async e=>{try{return await Zd(e),!0}catch{return!1}},"isIconAvailable"),Ei=p(async(e,t,r)=>{let i;try{i=await Zd(e,t==null?void 0:t.fallbackPrefix)}catch(n){J.error(n),i=t0}const s=VC(i,t),a=JC(QC(s.body),{...s.attributes,...r});return qe(a,Qt())},"getIconSVG"),Bs={},he={},Yh;function r0(){return Yh||(Yh=1,Object.defineProperty(he,"__esModule",{value:!0}),he.BLANK_URL=he.relativeFirstCharacters=he.whitespaceEscapeCharsRegex=he.urlSchemeRegex=he.ctrlCharactersRegex=he.htmlCtrlEntityRegex=he.htmlEntitiesRegex=he.invalidProtocolRegex=void 0,he.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,he.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,he.htmlCtrlEntityRegex=/&(newline|tab);/gi,he.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,he.urlSchemeRegex=/^.+(:|:)/gim,he.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,he.relativeFirstCharacters=[".","/"],he.BLANK_URL="about:blank"),he}var Uh;function i0(){if(Uh)return Bs;Uh=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.sanitizeUrl=a;var e=r0();function t(n){return e.relativeFirstCharacters.indexOf(n[0])>-1}function r(n){var o=n.replace(e.ctrlCharactersRegex,"");return o.replace(e.htmlEntitiesRegex,function(c,h){return String.fromCharCode(h)})}function i(n){return URL.canParse(n)}function s(n){try{return decodeURIComponent(n)}catch{return n}}function a(n){if(!n)return e.BLANK_URL;var o,c=s(n.trim());do c=r(c).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),c=s(c),o=c.match(e.ctrlCharactersRegex)||c.match(e.htmlEntitiesRegex)||c.match(e.htmlCtrlEntityRegex)||c.match(e.whitespaceEscapeCharsRegex);while(o&&o.length>0);var h=c;if(!h)return e.BLANK_URL;if(t(h))return h;var l=h.trimStart(),d=l.match(e.urlSchemeRegex);if(!d)return h;var u=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var g=l.replace(/\\/g,"/");if(u==="mailto:"||u.includes("://"))return g;if(u==="http:"||u==="https:"){if(!i(g))return e.BLANK_URL;var m=new URL(g);return m.protocol=m.protocol.toLowerCase(),m.hostname=m.hostname.toLowerCase(),m.toString()}return g}return Bs}var s0=i0();function So(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function a0(){}function Qd(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function jn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const o0="[object RegExp]",Jd="[object String]",tu="[object Number]",eu="[object Boolean]",ru="[object Arguments]",n0="[object Symbol]",l0="[object Date]",h0="[object Map]",c0="[object Set]",d0="[object Array]",u0="[object ArrayBuffer]",g0="[object Object]",p0="[object DataView]",f0="[object Uint8Array]",m0="[object Uint8ClampedArray]",y0="[object Uint16Array]",C0="[object Uint32Array]",x0="[object Int8Array]",b0="[object Int16Array]",k0="[object Int32Array]",S0="[object Float32Array]",T0="[object Float64Array]",jh=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function Gn(e){return typeof jh.Buffer<"u"&&jh.Buffer.isBuffer(e)}function w0(e){return Number.isSafeInteger(e)&&e>=0}function iu(e){return e!=null&&typeof e!="function"&&w0(e.length)}function B0(e){return e==="__proto__"}function Xn(e){return e==null||typeof e!="object"&&typeof e!="function"}function Vn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function _0(e,t){return oi(e,void 0,e,new Map,t)}function oi(e,t,r,i=new Map,s=void 0){const a=s==null?void 0:s(e,t,r,i);if(a!==void 0)return a;if(Xn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const n=new Array(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=oi(e[o],o,r,i,s);return Object.hasOwn(e,"index")&&(n.index=e.index),Object.hasOwn(e,"input")&&(n.input=e.input),n}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const n=new RegExp(e.source,e.flags);return n.lastIndex=e.lastIndex,n}if(e instanceof Map){const n=new Map;i.set(e,n);for(const[o,c]of e)n.set(o,oi(c,o,r,i,s));return n}if(e instanceof Set){const n=new Set;i.set(e,n);for(const o of e)n.add(oi(o,void 0,r,i,s));return n}if(Gn(e))return e.subarray();if(Vn(e)){const n=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,n);for(let o=0;o<e.length;o++)n[o]=oi(e[o],o,r,i,s);return n}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const n=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,n),He(n,e,r,i,s),n}if(typeof File<"u"&&e instanceof File){const n=new File([e],e.name,{type:e.type});return i.set(e,n),He(n,e,r,i,s),n}if(typeof Blob<"u"&&e instanceof Blob){const n=new Blob([e],{type:e.type});return i.set(e,n),He(n,e,r,i,s),n}if(e instanceof Error){const n=structuredClone(e);return i.set(e,n),n.message=e.message,n.name=e.name,n.stack=e.stack,n.cause=e.cause,n.constructor=e.constructor,He(n,e,r,i,s),n}if(e instanceof Boolean){const n=new Boolean(e.valueOf());return i.set(e,n),He(n,e,r,i,s),n}if(e instanceof Number){const n=new Number(e.valueOf());return i.set(e,n),He(n,e,r,i,s),n}if(e instanceof String){const n=new String(e.valueOf());return i.set(e,n),He(n,e,r,i,s),n}if(typeof e=="object"&&v0(e)){const n=Object.create(Object.getPrototypeOf(e));return i.set(e,n),He(n,e,r,i,s),n}return e}function He(e,t,r=e,i,s){const a=[...Object.keys(t),...Qd(t)];for(let n=0;n<a.length;n++){const o=a[n],c=Object.getOwnPropertyDescriptor(e,o);(c==null||c.writable)&&(e[o]=oi(t[o],o,r,i,s))}}function v0(e){switch(jn(e)){case ru:case d0:case u0:case p0:case eu:case l0:case S0:case T0:case x0:case b0:case k0:case h0:case tu:case g0:case o0:case c0:case Jd:case n0:case f0:case m0:case y0:case C0:return!0;default:return!1}}function L0(e,t){return _0(e,(r,i,s,a)=>{if(typeof e=="object"){if(jn(e)==="[object Object]"&&typeof e.constructor!="function"){const n={};return a.set(e,n),He(n,e,s,a),n}switch(Object.prototype.toString.call(e)){case tu:case Jd:case eu:{const n=new e.constructor(e==null?void 0:e.valueOf());return He(n,e),n}case ru:{const n={};return He(n,e),n.length=e.length,n[Symbol.iterator]=e[Symbol.iterator],n}default:return}}})}function Gh(e){return L0(e)}function Xo(e){return e!==null&&typeof e=="object"&&jn(e)==="[object Arguments]"}function Vo(e){return typeof e=="object"&&e!==null}function F0(e){return Vo(e)&&iu(e)}function qs(e){return Vn(e)}function A0(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function gs(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);const n=e.apply(this,i);return r.cache=a.set(s,n)||a,n};return r.cache=new(gs.Cache||Map),r}gs.Cache=Map;function E0(e){if(Xn(e))return e;if(Array.isArray(e)||Vn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function M0(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let a=0;a<r.length;a++){const n=r[a];s=Ns(s,n,i,new Map)}return s}function Ns(e,t,r,i){if(Xn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return E0(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let a=0;a<t.length;a++)a in t||(t[a]=void 0)}const s=[...Object.keys(t),...Qd(t)];for(let a=0;a<s.length;a++){const n=s[a];if(B0(n))continue;let o=t[n],c=e[n];if(Xo(o)&&(o={...o}),Xo(c)&&(c={...c}),Gn(o)&&(o=Gh(o)),Array.isArray(o))if(Array.isArray(c)){const l=[],d=Reflect.ownKeys(c);for(let u=0;u<d.length;u++){const g=d[u];l[g]=c[g]}c=l}else if(F0(c)){const l=[];for(let d=0;d<c.length;d++)l[d]=c[d];c=l}else c=[];const h=r(c,o,n,e,t,i);h!==void 0?e[n]=h:Array.isArray(o)||Vo(c)&&Vo(o)&&(So(c)||So(o)||qs(c)||qs(o))?e[n]=Ns(c,o,r,i):c==null&&So(o)?e[n]=Ns({},o,r,i):c==null&&qs(o)?e[n]=Gh(o):(c===void 0||o!==void 0)&&(e[n]=o)}return e}function O0(e,...t){return M0(e,...t,a0)}function Xh(e){if(e==null)return!0;if(iu(e))return typeof e.splice!="function"&&typeof e!="string"&&!Gn(e)&&!qs(e)&&!Xo(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return A0(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var $0="",D0={curveBasis:Ro,curveBasisClosed:dm,curveBasisOpen:um,curveBumpX:Kc,curveBumpY:Zc,curveBundle:gm,curveCardinalClosed:pm,curveCardinalOpen:fm,curveCardinal:rd,curveCatmullRomClosed:mm,curveCatmullRomOpen:ym,curveCatmullRom:sd,curveLinear:es,curveLinearClosed:Cm,curveMonotoneX:cd,curveMonotoneY:dd,curveNatural:gd,curveStep:pd,curveStepAfter:md,curveStepBefore:fd},I0=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,P0=p(function(e,t){const r=su(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(o=>o.args);Vs(n),i=oe(i,[...n])}else i=r.args;if(!i)return;let s=ma(e,t);const a="config";return i[a]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[a],delete i[a]),i},"detectInit"),su=p(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${I0.source})(?=[}][%]{2}).*
|
|
162
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),J.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let a;const n=[];for(;(a=is.exec(e))!==null;)if(a.index===is.lastIndex&&is.lastIndex++,a&&!t||t&&((r=a[1])!=null&&r.match(t))||t&&((i=a[2])!=null&&i.match(t))){const o=a[1]?a[1]:a[2],c=a[3]?a[3].trim():a[4]?JSON.parse(a[4].trim()):null;n.push({type:o,args:c})}return n.length===0?{type:e,args:null}:n.length===1?n[0]:n}catch(s){return J.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),R0=p(function(e){return e.replace(is,"")},"removeDirectives"),q0=p(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function Zn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return D0[r]??t}p(Zn,"interpolateToCurve");function au(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?s0.sanitizeUrl(r):r}p(au,"formatUrl");var N0=p((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let a=window;for(let n=0;n<i;n++)if(a=a[r[n]],!a){J.error(`Function name: ${e} not found in window`);return}a[s](...t)},"runFunc");function Kn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}p(Kn,"distance");function ou(e){let t,r=0;e.forEach(s=>{r+=Kn(s,t),t=s});const i=r/2;return Qn(e,i)}p(ou,"traverseEdge");function nu(e){return e.length===1?e[0]:ou(e)}p(nu,"calcLabelPosition");var Vh=p((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),Qn=p((e,t)=>{let r,i=t;for(const s of e){if(r){const a=Kn(s,r);if(a===0)return r;if(a<i)i-=a;else{const n=i/a;if(n<=0)return r;if(n>=1)return{x:s.x,y:s.y};if(n>0&&n<1)return{x:Vh((1-n)*r.x+n*s.x,5),y:Vh((1-n)*r.y+n*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),W0=p((e,t,r)=>{J.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=Qn(t,25),a=e?10:5,n=Math.atan2(t[0].y-s.y,t[0].x-s.x),o={x:0,y:0};return o.x=Math.sin(n)*a+(t[0].x+s.x)/2,o.y=-Math.cos(n)*a+(t[0].y+s.y)/2,o},"calcCardinalityPosition");function lu(e,t,r){const i=structuredClone(r);J.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,a=Qn(i,s),n=10+e*.5,o=Math.atan2(i[0].y-a.y,i[0].x-a.x),c={x:0,y:0};return t==="start_left"?(c.x=Math.sin(o+Math.PI)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o+Math.PI)*n+(i[0].y+a.y)/2):t==="end_right"?(c.x=Math.sin(o-Math.PI)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o-Math.PI)*n+(i[0].y+a.y)/2):(c.x=Math.sin(o)*n+(i[0].x+a.x)/2,c.y=-Math.cos(o)*n+(i[0].y+a.y)/2),c}p(lu,"calcTerminalLabelPosition");function hu(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}p(hu,"getStylesFromArray");var Zh=0,z0=p(()=>(Zh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+Zh),"generateId");function cu(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}p(cu,"makeRandomHex");var H0=p(e=>cu(e.length),"random"),Y0=p(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),U0=p(function(e,t){const r=t.text.replace(us.lineBreakRegex," "),[,i]=Ca(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const a=s.append("tspan");return a.attr("x",t.x+t.textMargin*2),a.attr("fill",t.fill),a.text(r),s},"drawSimpleText"),j0=gs((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),us.hasBreaks(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let a="";return i.forEach((n,o)=>{const c=yr(`${n} `,r),h=yr(a,r);if(c>t){const{hyphenatedStrings:u,remainingWord:g}=G0(n,t,"-",r);s.push(a,...u),a=g}else h+c>=t?(s.push(a),a=n):a=[a,n].filter(Boolean).join(" ");o+1===i.length&&s.push(a)}),s.filter(n=>n!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),G0=gs((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],a=[];let n="";return s.forEach((o,c)=>{const h=`${n}${o}`;if(yr(h,i)>=t){const d=c+1,u=s.length===d,g=`${h}${r}`;a.push(u?h:g),n=""}else n=h}),{hyphenatedStrings:a,remainingWord:n}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function du(e,t){return Jn(e,t).height}p(du,"calculateTextHeight");function yr(e,t){return Jn(e,t).width}p(yr,"calculateTextWidth");var Jn=gs((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,a]=Ca(r),n=["sans-serif",i],o=e.split(us.lineBreakRegex),c=[],h=Pt("body");if(!h.remove)return{width:0,height:0,lineHeight:0};const l=h.append("svg");for(const u of n){let g=0;const m={width:0,height:0,lineHeight:0};for(const y of o){const x=Y0();x.text=y||$0;const C=U0(l,x).style("font-size",a).style("font-weight",s).style("font-family",u),b=(C._groups||C)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");m.width=Math.round(Math.max(m.width,b.width)),g=Math.round(b.height),m.height+=g,m.lineHeight=Math.round(Math.max(m.lineHeight,g))}c.push(m)}l.remove();const d=isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1;return c[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Ti,X0=(Ti=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},p(Ti,"InitIDGenerator"),Ti),_s,V0=p(function(e){return _s=_s||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),_s.innerHTML=e,unescape(_s.textContent)},"entityDecode");function tl(e){return"str"in e}p(tl,"isDetailedError");function uu(e){return e instanceof Error?e.message:String(e)}p(uu,"getErrorMessage");var Z0=p((e,t,r,i)=>{var a;if(!i)return;const s=(a=e.node())==null?void 0:a.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),Ca=p(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function el(e,t){return O0({},e,t)}p(el,"cleanAndMerge");var Re={assignWithDepth:oe,wrapLabel:j0,calculateTextHeight:du,calculateTextWidth:yr,calculateTextDimensions:Jn,cleanAndMerge:el,detectInit:P0,detectDirective:su,isSubstringInArray:q0,interpolateToCurve:Zn,calcLabelPosition:nu,calcCardinalityPosition:W0,calcTerminalLabelPosition:lu,formatUrl:au,getStylesFromArray:hu,generateId:z0,random:H0,runFunc:N0,entityDecode:V0,insertTitle:Z0,isLabelCoordinateInPath:gu,parseFontSize:Ca,InitIDGenerator:X0},K0=p(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Mr=p(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),aw=p((e,t,{counter:r=0,prefix:i,suffix:s},a)=>a||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function ne(e){return e??null}p(ne,"handleUndefinedAttr");function gu(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,a=>Math.round(parseFloat(a)).toString());return s.includes(r.toString())||s.includes(i.toString())}p(gu,"isLabelCoordinateInPath");function rl(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var jr=rl();function pu(e){jr=e}var os={exec:()=>null};function jt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,a)=>{let n=typeof a=="string"?a:a.source;return n=n.replace(we.caret,"$1"),r=r.replace(s,n),i},getRegex:()=>new RegExp(r,t)};return i}var Q0=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),we={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},J0=/^(?:[ \t]*(?:\n|$))+/,tx=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ex=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,ps=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,rx=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,il=/(?:[*+-]|\d{1,9}[.)])/,fu=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,mu=jt(fu).replace(/bull/g,il).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ix=jt(fu).replace(/bull/g,il).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),sl=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,sx=/^[^\n]+/,al=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ax=jt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",al).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ox=jt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,il).getRegex(),xa="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",ol=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,nx=jt("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",ol).replace("tag",xa).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),yu=jt(sl).replace("hr",ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xa).getRegex(),lx=jt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",yu).getRegex(),nl={blockquote:lx,code:tx,def:ax,fences:ex,heading:rx,hr:ps,html:nx,lheading:mu,list:ox,newline:J0,paragraph:yu,table:os,text:sx},Kh=jt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xa).getRegex(),hx={...nl,lheading:ix,table:Kh,paragraph:jt(sl).replace("hr",ps).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Kh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",xa).getRegex()},cx={...nl,html:jt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",ol).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:os,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:jt(sl).replace("hr",ps).replace("heading",` *#{1,6} *[^
|
|
163
|
+
]`).replace("lheading",mu).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dx=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,ux=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Cu=/^( {2,}|\\)\n(?!\s*$)/,gx=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ba=/[\p{P}\p{S}]/u,ll=/[\s\p{P}\p{S}]/u,xu=/[^\s\p{P}\p{S}]/u,px=jt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,ll).getRegex(),bu=/(?!~)[\p{P}\p{S}]/u,fx=/(?!~)[\s\p{P}\p{S}]/u,mx=/(?:[^\s\p{P}\p{S}]|~)/u,yx=jt(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",Q0?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ku=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Cx=jt(ku,"u").replace(/punct/g,ba).getRegex(),xx=jt(ku,"u").replace(/punct/g,bu).getRegex(),Su="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",bx=jt(Su,"gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,ll).replace(/punct/g,ba).getRegex(),kx=jt(Su,"gu").replace(/notPunctSpace/g,mx).replace(/punctSpace/g,fx).replace(/punct/g,bu).getRegex(),Sx=jt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,xu).replace(/punctSpace/g,ll).replace(/punct/g,ba).getRegex(),Tx=jt(/\\(punct)/,"gu").replace(/punct/g,ba).getRegex(),wx=jt(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Bx=jt(ol).replace("(?:-->|$)","-->").getRegex(),_x=jt("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Bx).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ra=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,vx=jt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ra).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Tu=jt(/^!?\[(label)\]\[(ref)\]/).replace("label",ra).replace("ref",al).getRegex(),wu=jt(/^!?\[(ref)\](?:\[\])?/).replace("ref",al).getRegex(),Lx=jt("reflink|nolink(?!\\()","g").replace("reflink",Tu).replace("nolink",wu).getRegex(),Qh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,hl={_backpedal:os,anyPunctuation:Tx,autolink:wx,blockSkip:yx,br:Cu,code:ux,del:os,emStrongLDelim:Cx,emStrongRDelimAst:bx,emStrongRDelimUnd:Sx,escape:dx,link:vx,nolink:wu,punctuation:px,reflink:Tu,reflinkSearch:Lx,tag:_x,text:gx,url:os},Fx={...hl,link:jt(/^!?\[(label)\]\((.*?)\)/).replace("label",ra).getRegex(),reflink:jt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ra).getRegex()},Zo={...hl,emStrongRDelimAst:kx,emStrongLDelim:xx,url:jt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Qh).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:jt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Qh).getRegex()},Ax={...Zo,br:jt(Cu).replace("{2,}","*").getRegex(),text:jt(Zo.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vs={normal:nl,gfm:hx,pedantic:cx},zi={normal:hl,gfm:Zo,breaks:Ax,pedantic:Fx},Ex={"&":"&","<":"<",">":">",'"':""","'":"'"},Jh=e=>Ex[e];function Ke(e,t){if(t){if(we.escapeTest.test(e))return e.replace(we.escapeReplace,Jh)}else if(we.escapeTestNoEncode.test(e))return e.replace(we.escapeReplaceNoEncode,Jh);return e}function tc(e){try{e=encodeURI(e).replace(we.percentDecode,"%")}catch{return null}return e}function ec(e,t){var a;let r=e.replace(we.findPipe,(n,o,c)=>{let h=!1,l=o;for(;--l>=0&&c[l]==="\\";)h=!h;return h?"|":" |"}),i=r.split(we.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((a=i.at(-1))!=null&&a.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(we.slashPipe,"|");return i}function Hi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function Mx(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function rc(e,t,r,i,s){let a=t.href,n=t.title||null,o=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let c={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:a,title:n,text:o,tokens:i.inlineTokens(o)};return i.state.inLink=!1,c}function Ox(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
164
|
+
`).map(a=>{let n=a.match(r.other.beginningSpace);if(n===null)return a;let[o]=n;return o.length>=s.length?a.slice(s.length):a}).join(`
|
|
165
|
+
`)}var ia=class{constructor(t){Zt(this,"options");Zt(this,"rules");Zt(this,"lexer");this.options=t||jr}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:Hi(i,`
|
|
166
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=Ox(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=Hi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:Hi(r[0],`
|
|
167
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=Hi(r[0],`
|
|
135
168
|
`).split(`
|
|
136
|
-
`),s="",a="",
|
|
137
|
-
`),
|
|
169
|
+
`),s="",a="",n=[];for(;i.length>0;){let o=!1,c=[],h;for(h=0;h<i.length;h++)if(this.rules.other.blockquoteStart.test(i[h]))c.push(i[h]),o=!0;else if(!o)c.push(i[h]);else break;i=i.slice(h);let l=c.join(`
|
|
170
|
+
`),d=l.replace(this.rules.other.blockquoteSetextReplace,`
|
|
138
171
|
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
139
|
-
${
|
|
140
|
-
${
|
|
172
|
+
${l}`:l,a=a?`${a}
|
|
173
|
+
${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,n,!0),this.lexer.state.top=u,i.length===0)break;let g=n.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let m=g,y=m.raw+`
|
|
141
174
|
`+i.join(`
|
|
142
|
-
`),x=this.blockquote(y);
|
|
175
|
+
`),x=this.blockquote(y);n[n.length-1]=x,s=s.substring(0,s.length-m.raw.length)+x.raw,a=a.substring(0,a.length-m.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let m=g,y=m.raw+`
|
|
143
176
|
`+i.join(`
|
|
144
|
-
`),x=this.list(y);
|
|
145
|
-
`);continue}}return{type:"blockquote",raw:s,tokens:
|
|
146
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,
|
|
147
|
-
`,1)[0],m=!
|
|
148
|
-
`,t=t.substring(
|
|
149
|
-
`,1)[0],F;if(
|
|
150
|
-
`+F.slice(y);else{if(m||
|
|
151
|
-
`+
|
|
152
|
-
`,t=t.substring(
|
|
153
|
-
`):[],
|
|
154
|
-
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let
|
|
155
|
-
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,
|
|
156
|
-
`:r.push(
|
|
177
|
+
`),x=this.list(y);n[n.length-1]=x,s=s.substring(0,s.length-g.raw.length)+x.raw,a=a.substring(0,a.length-m.raw.length)+x.raw,i=y.substring(n.at(-1).raw.length).split(`
|
|
178
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:n,text:a}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,a={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let n=this.rules.other.listItemRegex(i),o=!1;for(;t;){let h=!1,l="",d="";if(!(r=n.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let u=r[2].split(`
|
|
179
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=t.split(`
|
|
180
|
+
`,1)[0],m=!u.trim(),y=0;if(this.options.pedantic?(y=2,d=u.trimStart()):m?y=r[1].length+1:(y=r[2].search(this.rules.other.nonSpaceChar),y=y>4?1:y,d=u.slice(y),y+=r[1].length),m&&this.rules.other.blankLine.test(g)&&(l+=g+`
|
|
181
|
+
`,t=t.substring(g.length+1),h=!0),!h){let b=this.rules.other.nextBulletRegex(y),k=this.rules.other.hrRegex(y),w=this.rules.other.fencesBeginRegex(y),_=this.rules.other.headingBeginRegex(y),L=this.rules.other.htmlBeginRegex(y);for(;t;){let A=t.split(`
|
|
182
|
+
`,1)[0],F;if(g=A,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),F=g):F=g.replace(this.rules.other.tabCharGlobal," "),w.test(g)||_.test(g)||L.test(g)||b.test(g)||k.test(g))break;if(F.search(this.rules.other.nonSpaceChar)>=y||!g.trim())d+=`
|
|
183
|
+
`+F.slice(y);else{if(m||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(u)||_.test(u)||k.test(u))break;d+=`
|
|
184
|
+
`+g}!m&&!g.trim()&&(m=!0),l+=A+`
|
|
185
|
+
`,t=t.substring(A.length+1),u=F.slice(y)}}a.loose||(o?a.loose=!0:this.rules.other.doubleBlankLine.test(l)&&(o=!0));let x=null,C;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(C=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),a.items.push({type:"list_item",raw:l,task:!!x,checked:C,loose:!1,text:d,tokens:[]}),a.raw+=l}let c=a.items.at(-1);if(c)c.raw=c.raw.trimEnd(),c.text=c.text.trimEnd();else return;a.raw=a.raw.trimEnd();for(let h=0;h<a.items.length;h++)if(this.lexer.state.top=!1,a.items[h].tokens=this.lexer.blockTokens(a.items[h].text,[]),!a.loose){let l=a.items[h].tokens.filter(u=>u.type==="space"),d=l.length>0&&l.some(u=>this.rules.other.anyLine.test(u.raw));a.loose=d}if(a.loose)for(let h=0;h<a.items.length;h++)a.items[h].loose=!0;return a}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:a}}}table(t){var o;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=ec(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),a=(o=r[3])!=null&&o.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
186
|
+
`):[],n={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let c of s)this.rules.other.tableAlignRight.test(c)?n.align.push("right"):this.rules.other.tableAlignCenter.test(c)?n.align.push("center"):this.rules.other.tableAlignLeft.test(c)?n.align.push("left"):n.align.push(null);for(let c=0;c<i.length;c++)n.header.push({text:i[c],tokens:this.lexer.inline(i[c]),header:!0,align:n.align[c]});for(let c of a)n.rows.push(ec(c,n.header.length).map((h,l)=>({text:h,tokens:this.lexer.inline(h),header:!1,align:n.align[l]})));return n}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
187
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let n=Hi(i.slice(0,-1),"\\");if((i.length-n.length)%2===0)return}else{let n=Mx(r[2],"()");if(n===-2)return;if(n>-1){let o=(r[0].indexOf("!")===0?5:4)+r[1].length+n;r[2]=r[2].substring(0,n),r[0]=r[0].substring(0,o).trim(),r[3]=""}}let s=r[2],a="";if(this.options.pedantic){let n=this.rules.other.pedanticHrefTitle.exec(s);n&&(s=n[1],a=n[3])}else a=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),rc(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),a=r[s.toLowerCase()];if(!a){let n=i[0].charAt(0);return{type:"text",raw:n,text:n}}return rc(i,a,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let a=[...s[0]].length-1,n,o,c=a,h=0,l=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,r=r.slice(-1*t.length+a);(s=l.exec(r))!=null;){if(n=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!n)continue;if(o=[...n].length,s[3]||s[4]){c+=o;continue}else if((s[5]||s[6])&&a%3&&!((a+o)%3)){h+=o;continue}if(c-=o,c>0)continue;o=Math.min(o,o+c+h);let d=[...s[0]][0].length,u=t.slice(0,a+s.index+d+o);if(Math.min(a,o)%2){let m=u.slice(1,-1);return{type:"em",raw:u,text:m,tokens:this.lexer.inlineTokens(m)}}let g=u.slice(2,-2);return{type:"strong",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),a=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&a&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,a;if(r[2]==="@")s=r[0],a="mailto:"+s;else{let n;do n=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(n!==r[0]);s=r[0],r[1]==="www."?a="http://"+r[0]:a=r[0]}return{type:"link",raw:r[0],text:s,href:a,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ye=class Ko{constructor(t){Zt(this,"tokens");Zt(this,"options");Zt(this,"state");Zt(this,"tokenizer");Zt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jr,this.options.tokenizer=this.options.tokenizer||new ia,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:we,block:vs.normal,inline:zi.normal};this.options.pedantic?(r.block=vs.pedantic,r.inline=zi.pedantic):this.options.gfm&&(r.block=vs.gfm,this.options.breaks?r.inline=zi.breaks:r.inline=zi.gfm),this.tokenizer.rules=r}static get rules(){return{block:vs,inline:zi}}static lex(t,r){return new Ko(r).lex(t)}static lexInline(t,r){return new Ko(r).inlineTokens(t)}lex(t){t=t.replace(we.carriageReturn,`
|
|
188
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,a,n;for(this.options.pedantic&&(t=t.replace(we.tabCharGlobal," ").replace(we.spaceLine,""));t;){let o;if((a=(s=this.options.extensions)==null?void 0:s.block)!=null&&a.some(h=>(o=h.call({lexer:this},t,r))?(t=t.substring(o.raw.length),r.push(o),!0):!1))continue;if(o=this.tokenizer.space(t)){t=t.substring(o.raw.length);let h=r.at(-1);o.raw.length===1&&h!==void 0?h.raw+=`
|
|
189
|
+
`:r.push(o);continue}if(o=this.tokenizer.code(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
157
190
|
`)?"":`
|
|
158
|
-
`)+
|
|
159
|
-
`+
|
|
191
|
+
`)+o.raw,h.text+=`
|
|
192
|
+
`+o.text,this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(o=this.tokenizer.fences(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.heading(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.hr(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.blockquote(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.list(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.html(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.def(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="paragraph"||(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
160
193
|
`)?"":`
|
|
161
|
-
`)+
|
|
162
|
-
`+
|
|
194
|
+
`)+o.raw,h.text+=`
|
|
195
|
+
`+o.raw,this.inlineQueue.at(-1).src=h.text):this.tokens.links[o.tag]||(this.tokens.links[o.tag]={href:o.href,title:o.title},r.push(o));continue}if(o=this.tokenizer.table(t)){t=t.substring(o.raw.length),r.push(o);continue}if(o=this.tokenizer.lheading(t)){t=t.substring(o.raw.length),r.push(o);continue}let c=t;if((n=this.options.extensions)!=null&&n.startBlock){let h=1/0,l=t.slice(1),d;this.options.extensions.startBlock.forEach(u=>{d=u.call({lexer:this},l),typeof d=="number"&&d>=0&&(h=Math.min(h,d))}),h<1/0&&h>=0&&(c=t.substring(0,h+1))}if(this.state.top&&(o=this.tokenizer.paragraph(c))){let h=r.at(-1);i&&(h==null?void 0:h.type)==="paragraph"?(h.raw+=(h.raw.endsWith(`
|
|
163
196
|
`)?"":`
|
|
164
|
-
`)+
|
|
165
|
-
`+
|
|
197
|
+
`)+o.raw,h.text+=`
|
|
198
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o),i=c.length!==t.length,t=t.substring(o.raw.length);continue}if(o=this.tokenizer.text(t)){t=t.substring(o.raw.length);let h=r.at(-1);(h==null?void 0:h.type)==="text"?(h.raw+=(h.raw.endsWith(`
|
|
166
199
|
`)?"":`
|
|
167
|
-
`)+
|
|
168
|
-
`+
|
|
169
|
-
`;return s?'<pre><code class="language-'+
|
|
170
|
-
`:"<pre><code>"+(i?a:
|
|
200
|
+
`)+o.raw,h.text+=`
|
|
201
|
+
`+o.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=h.text):r.push(o);continue}if(t){let h="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(h);break}else throw new Error(h)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var c,h,l,d,u;let i=t,s=null;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)g.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let a;for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)a=s[2]?s[2].length:0,i=i.slice(0,s.index+a)+"["+"a".repeat(s[0].length-a-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((h=(c=this.options.hooks)==null?void 0:c.emStrongMask)==null?void 0:h.call({lexer:this},i))??i;let n=!1,o="";for(;t;){n||(o=""),n=!1;let g;if((d=(l=this.options.extensions)==null?void 0:l.inline)!=null&&d.some(y=>(g=y.call({lexer:this},t,r))?(t=t.substring(g.raw.length),r.push(g),!0):!1))continue;if(g=this.tokenizer.escape(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.tag(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.link(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(g.raw.length);let y=r.at(-1);g.type==="text"&&(y==null?void 0:y.type)==="text"?(y.raw+=g.raw,y.text+=g.text):r.push(g);continue}if(g=this.tokenizer.emStrong(t,i,o)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.codespan(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.br(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.del(t)){t=t.substring(g.raw.length),r.push(g);continue}if(g=this.tokenizer.autolink(t)){t=t.substring(g.raw.length),r.push(g);continue}if(!this.state.inLink&&(g=this.tokenizer.url(t))){t=t.substring(g.raw.length),r.push(g);continue}let m=t;if((u=this.options.extensions)!=null&&u.startInline){let y=1/0,x=t.slice(1),C;this.options.extensions.startInline.forEach(b=>{C=b.call({lexer:this},x),typeof C=="number"&&C>=0&&(y=Math.min(y,C))}),y<1/0&&y>=0&&(m=t.substring(0,y+1))}if(g=this.tokenizer.inlineText(m)){t=t.substring(g.raw.length),g.raw.slice(-1)!=="_"&&(o=g.raw.slice(-1)),n=!0;let y=r.at(-1);(y==null?void 0:y.type)==="text"?(y.raw+=g.raw,y.text+=g.text):r.push(g);continue}if(t){let y="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(y);break}else throw new Error(y)}}return r}},sa=class{constructor(t){Zt(this,"options");Zt(this,"parser");this.options=t||jr}space(t){return""}code({text:t,lang:r,escaped:i}){var n;let s=(n=(r||"").match(we.notSpaceStart))==null?void 0:n[0],a=t.replace(we.endingNewline,"")+`
|
|
202
|
+
`;return s?'<pre><code class="language-'+Ke(s)+'">'+(i?a:Ke(a,!0))+`</code></pre>
|
|
203
|
+
`:"<pre><code>"+(i?a:Ke(a,!0))+`</code></pre>
|
|
171
204
|
`}blockquote({tokens:t}){return`<blockquote>
|
|
172
205
|
${this.parser.parse(t)}</blockquote>
|
|
173
206
|
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
174
207
|
`}hr(t){return`<hr>
|
|
175
|
-
`}list(t){let r=t.ordered,i=t.start,s="";for(let
|
|
208
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let o=0;o<t.items.length;o++){let c=t.items[o];s+=this.listitem(c)}let a=r?"ol":"ul",n=r&&i!==1?' start="'+i+'"':"";return"<"+a+n+`>
|
|
176
209
|
`+s+"</"+a+`>
|
|
177
|
-
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+
|
|
210
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+Ke(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
178
211
|
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
179
|
-
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let
|
|
212
|
+
`}table(t){let r="",i="";for(let a=0;a<t.header.length;a++)i+=this.tablecell(t.header[a]);r+=this.tablerow({text:i});let s="";for(let a=0;a<t.rows.length;a++){let n=t.rows[a];i="";for(let o=0;o<n.length;o++)i+=this.tablecell(n[o]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
180
213
|
<thead>
|
|
181
214
|
`+r+`</thead>
|
|
182
215
|
`+s+`</table>
|
|
183
216
|
`}tablerow({text:t}){return`<tr>
|
|
184
217
|
${t}</tr>
|
|
185
218
|
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
186
|
-
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${
|
|
187
|
-
`+this.renderer.text(
|
|
188
|
-
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+
|
|
189
|
-
[ ]{
|
|
190
|
-
`)})}i[0]=i[0].replace(/^\r?\n/,"");var
|
|
191
|
-
`)&&(
|
|
192
|
-
`).map(function(
|
|
193
|
-
`)),
|
|
219
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${Ke(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),a=tc(t);if(a===null)return s;t=a;let n='<a href="'+t+'"';return r&&(n+=' title="'+Ke(r)+'"'),n+=">"+s+"</a>",n}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let a=tc(t);if(a===null)return Ke(i);t=a;let n=`<img src="${t}" alt="${i}"`;return r&&(n+=` title="${Ke(r)}"`),n+=">",n}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:Ke(t.text)}},cl=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ue=class Qo{constructor(t){Zt(this,"options");Zt(this,"renderer");Zt(this,"textRenderer");this.options=t||jr,this.options.renderer=this.options.renderer||new sa,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new cl}static parse(t,r){return new Qo(r).parse(t)}static parseInline(t,r){return new Qo(r).parseInline(t)}parse(t,r=!0){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=o,l=this.options.extensions.renderers[h.type].call({parser:this},h);if(l!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(h.type)){i+=l||"";continue}}let c=o;switch(c.type){case"space":{i+=this.renderer.space(c);continue}case"hr":{i+=this.renderer.hr(c);continue}case"heading":{i+=this.renderer.heading(c);continue}case"code":{i+=this.renderer.code(c);continue}case"table":{i+=this.renderer.table(c);continue}case"blockquote":{i+=this.renderer.blockquote(c);continue}case"list":{i+=this.renderer.list(c);continue}case"html":{i+=this.renderer.html(c);continue}case"def":{i+=this.renderer.def(c);continue}case"paragraph":{i+=this.renderer.paragraph(c);continue}case"text":{let h=c,l=this.renderer.text(h);for(;n+1<t.length&&t[n+1].type==="text";)h=t[++n],l+=`
|
|
220
|
+
`+this.renderer.text(h);r?i+=this.renderer.paragraph({type:"paragraph",raw:l,text:l,tokens:[{type:"text",raw:l,text:l,escaped:!0}]}):i+=l;continue}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}parseInline(t,r=this.renderer){var s,a;let i="";for(let n=0;n<t.length;n++){let o=t[n];if((a=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&a[o.type]){let h=this.options.extensions.renderers[o.type].call({parser:this},o);if(h!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type)){i+=h||"";continue}}let c=o;switch(c.type){case"escape":{i+=r.text(c);break}case"html":{i+=r.html(c);break}case"link":{i+=r.link(c);break}case"image":{i+=r.image(c);break}case"strong":{i+=r.strong(c);break}case"em":{i+=r.em(c);break}case"codespan":{i+=r.codespan(c);break}case"br":{i+=r.br(c);break}case"del":{i+=r.del(c);break}case"text":{i+=r.text(c);break}default:{let h='Token with "'+c.type+'" type was not found.';if(this.options.silent)return console.error(h),"";throw new Error(h)}}}return i}},$s,Zi=($s=class{constructor(t){Zt(this,"options");Zt(this,"block");this.options=t||jr}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ye.lex:Ye.lexInline}provideParser(){return this.block?Ue.parse:Ue.parseInline}},Zt($s,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Zt($s,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),$s),$x=class{constructor(...t){Zt(this,"defaults",rl());Zt(this,"options",this.setOptions);Zt(this,"parse",this.parseMarkdown(!0));Zt(this,"parseInline",this.parseMarkdown(!1));Zt(this,"Parser",Ue);Zt(this,"Renderer",sa);Zt(this,"TextRenderer",cl);Zt(this,"Lexer",Ye);Zt(this,"Tokenizer",ia);Zt(this,"Hooks",Zi);this.use(...t)}walkTokens(t,r){var s,a;let i=[];for(let n of t)switch(i=i.concat(r.call(this,n)),n.type){case"table":{let o=n;for(let c of o.header)i=i.concat(this.walkTokens(c.tokens,r));for(let c of o.rows)for(let h of c)i=i.concat(this.walkTokens(h.tokens,r));break}case"list":{let o=n;i=i.concat(this.walkTokens(o.items,r));break}default:{let o=n;(a=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&a[o.type]?this.defaults.extensions.childTokens[o.type].forEach(c=>{let h=o[c].flat(1/0);i=i.concat(this.walkTokens(h,r))}):o.tokens&&(i=i.concat(this.walkTokens(o.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(a=>{if(!a.name)throw new Error("extension name required");if("renderer"in a){let n=r.renderers[a.name];n?r.renderers[a.name]=function(...o){let c=a.renderer.apply(this,o);return c===!1&&(c=n.apply(this,o)),c}:r.renderers[a.name]=a.renderer}if("tokenizer"in a){if(!a.level||a.level!=="block"&&a.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let n=r[a.level];n?n.unshift(a.tokenizer):r[a.level]=[a.tokenizer],a.start&&(a.level==="block"?r.startBlock?r.startBlock.push(a.start):r.startBlock=[a.start]:a.level==="inline"&&(r.startInline?r.startInline.push(a.start):r.startInline=[a.start]))}"childTokens"in a&&a.childTokens&&(r.childTokens[a.name]=a.childTokens)}),s.extensions=r),i.renderer){let a=this.defaults.renderer||new sa(this.defaults);for(let n in i.renderer){if(!(n in a))throw new Error(`renderer '${n}' does not exist`);if(["options","parser"].includes(n))continue;let o=n,c=i.renderer[o],h=a[o];a[o]=(...l)=>{let d=c.apply(a,l);return d===!1&&(d=h.apply(a,l)),d||""}}s.renderer=a}if(i.tokenizer){let a=this.defaults.tokenizer||new ia(this.defaults);for(let n in i.tokenizer){if(!(n in a))throw new Error(`tokenizer '${n}' does not exist`);if(["options","rules","lexer"].includes(n))continue;let o=n,c=i.tokenizer[o],h=a[o];a[o]=(...l)=>{let d=c.apply(a,l);return d===!1&&(d=h.apply(a,l)),d}}s.tokenizer=a}if(i.hooks){let a=this.defaults.hooks||new Zi;for(let n in i.hooks){if(!(n in a))throw new Error(`hook '${n}' does not exist`);if(["options","block"].includes(n))continue;let o=n,c=i.hooks[o],h=a[o];Zi.passThroughHooks.has(n)?a[o]=l=>{if(this.defaults.async&&Zi.passThroughHooksRespectAsync.has(n))return(async()=>{let u=await c.call(a,l);return h.call(a,u)})();let d=c.call(a,l);return h.call(a,d)}:a[o]=(...l)=>{if(this.defaults.async)return(async()=>{let u=await c.apply(a,l);return u===!1&&(u=await h.apply(a,l)),u})();let d=c.apply(a,l);return d===!1&&(d=h.apply(a,l)),d}}s.hooks=a}if(i.walkTokens){let a=this.defaults.walkTokens,n=i.walkTokens;s.walkTokens=function(o){let c=[];return c.push(n.call(this,o)),a&&(c=c.concat(a.call(this,o))),c}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ye.lex(t,r??this.defaults)}parser(t,r){return Ue.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},a={...this.defaults,...s},n=this.onError(!!a.silent,!!a.async);if(this.defaults.async===!0&&s.async===!1)return n(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof r>"u"||r===null)return n(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return n(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(a.hooks&&(a.hooks.options=a,a.hooks.block=t),a.async)return(async()=>{let o=a.hooks?await a.hooks.preprocess(r):r,c=await(a.hooks?await a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(o,a),h=a.hooks?await a.hooks.processAllTokens(c):c;a.walkTokens&&await Promise.all(this.walkTokens(h,a.walkTokens));let l=await(a.hooks?await a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(h,a);return a.hooks?await a.hooks.postprocess(l):l})().catch(n);try{a.hooks&&(r=a.hooks.preprocess(r));let o=(a.hooks?a.hooks.provideLexer():t?Ye.lex:Ye.lexInline)(r,a);a.hooks&&(o=a.hooks.processAllTokens(o)),a.walkTokens&&this.walkTokens(o,a.walkTokens);let c=(a.hooks?a.hooks.provideParser():t?Ue.parse:Ue.parseInline)(o,a);return a.hooks&&(c=a.hooks.postprocess(c)),c}catch(o){return n(o)}}}onError(t,r){return i=>{if(i.message+=`
|
|
221
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+Ke(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},Hr=new $x;function Xt(e,t){return Hr.parse(e,t)}Xt.options=Xt.setOptions=function(e){return Hr.setOptions(e),Xt.defaults=Hr.defaults,pu(Xt.defaults),Xt};Xt.getDefaults=rl;Xt.defaults=jr;Xt.use=function(...e){return Hr.use(...e),Xt.defaults=Hr.defaults,pu(Xt.defaults),Xt};Xt.walkTokens=function(e,t){return Hr.walkTokens(e,t)};Xt.parseInline=Hr.parseInline;Xt.Parser=Ue;Xt.parser=Ue.parse;Xt.Renderer=sa;Xt.TextRenderer=cl;Xt.Lexer=Ye;Xt.lexer=Ye.lex;Xt.Tokenizer=ia;Xt.Hooks=Zi;Xt.parse=Xt;Xt.options;Xt.setOptions;Xt.use;Xt.walkTokens;Xt.parseInline;Ue.parse;Ye.lex;function Bu(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=Array.from(typeof e=="string"?[e]:e);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var s=i.reduce(function(o,c){var h=c.match(/\n([\t ]+|(?!\s).)/g);return h?o.concat(h.map(function(l){var d,u;return(u=(d=l.match(/[\t ]/g))===null||d===void 0?void 0:d.length)!==null&&u!==void 0?u:0})):o},[]);if(s.length){var a=new RegExp(`
|
|
222
|
+
[ ]{`.concat(Math.min.apply(Math,s),"}"),"g");i=i.map(function(o){return o.replace(a,`
|
|
223
|
+
`)})}i[0]=i[0].replace(/^\r?\n/,"");var n=i[0];return t.forEach(function(o,c){var h=n.match(/(?:^|\n)( *)$/),l=h?h[1]:"",d=o;typeof o=="string"&&o.includes(`
|
|
224
|
+
`)&&(d=String(o).split(`
|
|
225
|
+
`).map(function(u,g){return g===0?u:"".concat(l).concat(u)}).join(`
|
|
226
|
+
`)),n+=d+i[c+1]}),n}var Jo=typeof performance<"u"&&typeof performance.now=="function",Jr=p(()=>Jo?performance.now():0,"now"),To="🧜 ",Dx="Mermaid render",Ix="Mermaid",Px={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},wi;wi=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=Jr();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Jr()-i)}}async tick(t,r){if(!this.enabled)return r();const i=Jr();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Jr()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:Jr(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Jo&&typeof performance.mark=="function")try{performance.mark(`${To}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Jr();if(t.duration=r-t.start,Jo&&typeof performance.measure=="function")try{performance.measure(`${To}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:Dx,trackGroup:Ix,color:Px[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,a=["ms % phase"],n=p((c,h)=>{const l=" ".repeat(h),d=c.duration.toFixed(1).padStart(8),u=i>0?`${(c.duration/i*100).toFixed(0).padStart(3)}%`:" -";a.push(`${d} ${u} ${l}${c.name}`);for(const g of c.children)n(g,h+1);if(c.children.length>0){const g=c.children.reduce((y,x)=>y+x.duration,0),m=c.duration-g;if(m>.5){const y=m.toFixed(1).padStart(8);a.push(`${y} ${l} (self)`)}}},"walk");n(t,0);const o=Object.keys(this.buckets);if(o.length>0){a.push("—— buckets (summed) ——");for(const c of o)a.push(`${this.buckets[c].toFixed(1).padStart(8)} ${c}`)}console.log(`${To}mermaid render profile · ${s}
|
|
194
227
|
${a.join(`
|
|
195
|
-
`)}`)}},
|
|
228
|
+
`)}`)}},p(wi,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});function _u(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
196
229
|
`).replace(/\n{2,}/g,`
|
|
197
|
-
`);return
|
|
198
|
-
`).forEach((
|
|
199
|
-
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return
|
|
200
|
-
`),a):ze(t.label,a),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),Cn(h,t.labelStyle),h.attr("class",`${c} ${i}`),Cn(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await Vr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),o.node()}f(Tp,"addHtmlSpan");function Pa(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(Pa,"createTspan");function Sp(e,t,r){const i=e.append("text"),s=Pa(i,1,t);Ia(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}f(Sp,"computeWidthOfText");function rk(e,t,r){var o;const i=e.append("text"),s=Pa(i,1,t);Ia(s,[{content:r,type:"normal"}]);const a=(o=s.node())==null?void 0:o.getBoundingClientRect();return a&&i.remove(),a}f(rk,"computeDimensionOfText");function wp(e,t,r,i=!1,s=!1){const o=t.append("g"),n=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const u=f(d=>Sp(o,1.1,d)<=e,"checkWidth"),p=u(h)?[h]:kp(h,u);for(const d of p){const m=Pa(l,c,1.1,s);Ia(m,d),c++}}if(i){const h=l.node().getBBox(),u=2;return n.attr("x",h.x-u).attr("y",h.y-u).attr("width",h.width+2*u).attr("height",h.height+2*u),o.node()}else return l.node()}f(wp,"createFormattedText");function xn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(xn,"decodeHTMLEntities");function Ia(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(xn(r.content)):s.text(" "+xn(r.content))})}f(Ia,"updateTextContentAndStyles");async function _p(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,o)=>(r.push((async()=>{const n=`${a}:${o}`;return await dx(n)?await Fs(n,void 0,{class:"label-icon"}):`<i class='${ze(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(_p,"replaceIconSubstring");var Ve=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:o=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(W.debug("XYZ createText",t,r,i,s,a,n,"addSvgBackground: ",c),a){const u=o?Cp(t,h):yp(t),p=await _p(Or(u),h),d=t.replace(/\\\\/g,"\\"),m={isNode:n,label:xs(t)?d:p,labelStyle:r.replace("fill:","color:")};return await Tp(e,m,l,s,c,h)}else{const u=Or(t.replace(/<br\s*\/?>/g,"<br/>")),p=o?mp(u.replace("<br>","<br/>"),h):gp(u),d=wp(l,e,p,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(d).attr("style",m)}else{const m=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Pt(d).select("rect").attr("style",m.replace(/background:/g,"fill:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(d).select("text").attr("style",y)}return i?Pt(d).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Pt(d).selectAll("tspan.text-outer-tspan").classed("row",!0),d}},"createText");function Co(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,o=Math.cos(a),n=Math.sin(a);for(const l of e){const[c,h]=l;l[0]=(c-i)*o-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*o+s}}}function ik(e,t){return e[0]===t[0]&&e[1]===t[1]}function sk(e,t,r,i=1){const s=r,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of o)Co(c,n,s);const l=(function(c,h,u){const p=[];for(const k of c){const S=[...k];ik(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&p.push(S)}const d=[];h=Math.max(h,.1);const m=[];for(const k of p)for(let S=0;S<k.length-1;S++){const w=k[S],B=k[S+1];if(w[1]!==B[1]){const L=Math.min(w[1],B[1]);m.push({ymin:L,ymax:Math.max(w[1],B[1]),x:L===w[1]?w[0]:B[0],islope:(B[0]-w[0])/(B[1]-w[1])})}}if(m.sort(((k,S)=>k.ymin<S.ymin?-1:k.ymin>S.ymin?1:k.x<S.x?-1:k.x>S.x?1:k.ymax===S.ymax?0:(k.ymax-S.ymax)/Math.abs(k.ymax-S.ymax))),!m.length)return d;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let k=-1;for(let S=0;S<m.length&&!(m[S].ymin>x);S++)k=S;m.splice(0,k+1).forEach((S=>{y.push({s:x,edge:S})}))}if(y=y.filter((k=>!(k.edge.ymax<=x))),y.sort(((k,S)=>k.edge.x===S.edge.x?0:(k.edge.x-S.edge.x)/Math.abs(k.edge.x-S.edge.x))),(u!==1||C%h==0)&&y.length>1)for(let k=0;k<y.length;k+=2){const S=k+1;if(S>=y.length)break;const w=y[k].edge,B=y[S].edge;d.push([[Math.round(w.x),x],[Math.round(B.x),x]])}x+=u,y.forEach((k=>{k.edge.x=k.edge.x+u*k.edge.islope})),C++}return d})(o,a,i);if(s){for(const c of o)Co(c,n,-s);(function(c,h,u){const p=[];c.forEach((d=>p.push(...d))),Co(p,h,u)})(l,n,-s)}return l}function Ms(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),sk(e,s,i,a||1)}class gl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=Ms(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ra(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class ak extends gl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=Ms(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,o=[],n=.5*i*Math.cos(a),l=.5*i*Math.sin(a);for(const[c,h]of s)Ra([c,h])&&o.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(o,r)}}}class ok extends gl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class nk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ms(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const o=s/4;for(const n of t){const l=Ra(n),c=l/s,h=Math.ceil(c)-1,u=l-h*s,p=(n[0][0]+n[1][0])/2-s/4,d=Math.min(n[0][1],n[1][1]);for(let m=0;m<h;m++){const y=d+u+m*s,x=p-o+2*Math.random()*o,C=y-o+2*Math.random()*o,k=this.helper.ellipse(x,C,a,a,r);i.push(...k.ops)}}return{type:"fillSketch",ops:i}}}class lk{constructor(t){this.helper=t}fillPolygons(t,r){const i=Ms(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((o=>{const n=Ra(o),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=o[0],u=o[1];h[0]>u[0]&&(h=o[1],u=o[0]);const p=Math.atan((u[1]-h[1])/(u[0]-h[0]));for(let d=0;d<l;d++){const m=d*(i+s),y=m+i,x=[h[0]+m*Math.cos(p)+c*Math.cos(p),h[1]+m*Math.sin(p)+c*Math.sin(p)],C=[h[0]+y*Math.cos(p)+c*Math.cos(p),h[1]+y*Math.sin(p)+c*Math.sin(p)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class hk{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=Ms(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const o=Ra(a),n=Math.round(o/(2*r));let l=a[0],c=a[1];l[0]>c[0]&&(l=a[1],c=a[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let u=0;u<n;u++){const p=2*u*r,d=2*(u+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[l[0]+p*Math.cos(h),l[1]+p*Math.sin(h)],x=[l[0]+d*Math.cos(h),l[1]+d*Math.sin(h)],C=[y[0]+m*Math.cos(h+Math.PI/4),y[1]+m*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const Ee={};class ck{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const uk=0,xo=1,dc=2,js={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 bo(e,t){return e.type===t}function ml(e){const t=[],r=(function(o){const n=new Array;for(;o!=="";)if(o.match(/^([ \t\r\n,]+)/))o=o.substr(RegExp.$1.length);else if(o.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:uk,text:RegExp.$1},o=o.substr(RegExp.$1.length);else{if(!o.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:xo,text:`${parseFloat(RegExp.$1)}`},o=o.substr(RegExp.$1.length)}return n[n.length]={type:dc,text:""},n})(e);let i="BOD",s=0,a=r[s];for(;!bo(a,dc);){let o=0;const n=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return ml("M0,0"+e);s++,o=js[a.text],i=a.text}else bo(a,xo)?o=js[i]:(s++,o=js[a.text],i=a.text);if(!(s+o<r.length))throw new Error("Path data ended short");for(let l=s;l<s+o;l++){const c=r[l];if(!bo(c,xo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof js[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=o,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Bp(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:o,data:n}of e)switch(o){case"M":a.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":a.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":a.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],a.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":a.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));a.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":a.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function vp(e){const t=[];let r="",i=0,s=0,a=0,o=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[a,o]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let u=0,p=0;r==="C"||r==="S"?(u=i+(i-n),p=s+(s-l)):(u=i,p=s),t.push({key:"C",data:[u,p,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[u,p]=h;let d=0,m=0;r==="Q"||r==="T"?(d=i+(i-n),m=s+(s-l)):(d=i,m=s);const y=i+2*(d-i)/3,x=s+2*(m-s)/3,C=u+2*(d-u)/3,k=p+2*(m-p)/3;t.push({key:"C",data:[y,x,C,k,u,p]}),n=d,l=m,i=u,s=p;break}case"Q":{const[u,p,d,m]=h,y=i+2*(u-i)/3,x=s+2*(p-s)/3,C=d+2*(u-d)/3,k=m+2*(p-m)/3;t.push({key:"C",data:[y,x,C,k,d,m]}),n=u,l=p,i=d,s=m;break}case"A":{const u=Math.abs(h[0]),p=Math.abs(h[1]),d=h[2],m=h[3],y=h[4],x=h[5],C=h[6];u===0||p===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(Lp(i,s,x,C,u,p,d,m,y).forEach((function(k){t.push({key:"C",data:k})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=o}r=c}return t}function Ji(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function Lp(e,t,r,i,s,a,o,n,l,c){const h=(u=o,Math.PI*u/180);var u;let p=[],d=0,m=0,y=0,x=0;if(c)[d,m,y,x]=c;else{[e,t]=Ji(e,t,-h),[r,i]=Ji(r,i,-h);const j=(e-r)/2,A=(t-i)/2;let O=j*j/(s*s)+A*A/(a*a);O>1&&(O=Math.sqrt(O),s*=O,a*=O);const v=s*s,R=a*a,P=v*R-v*A*A-R*j*j,H=v*A*A+R*j*j,Z=(n===l?-1:1)*Math.sqrt(Math.abs(P/H));y=Z*s*A/a+(e+r)/2,x=Z*-a*j/s+(t+i)/2,d=Math.asin(parseFloat(((t-x)/a).toFixed(9))),m=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(d=Math.PI-d),r<y&&(m=Math.PI-m),d<0&&(d=2*Math.PI+d),m<0&&(m=2*Math.PI+m),l&&d>m&&(d-=2*Math.PI),!l&&m>d&&(m-=2*Math.PI)}let C=m-d;if(Math.abs(C)>120*Math.PI/180){const j=m,A=r,O=i;m=l&&m>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,p=Lp(r=y+s*Math.cos(m),i=x+a*Math.sin(m),A,O,s,a,o,0,l,[m,j,y,x])}C=m-d;const k=Math.cos(d),S=Math.sin(d),w=Math.cos(m),B=Math.sin(m),L=Math.tan(C/4),E=4/3*s*L,F=4/3*a*L,X=[e,t],N=[e+E*S,t-F*k],z=[r+E*B,i-F*w],at=[r,i];if(N[0]=2*X[0]-N[0],N[1]=2*X[1]-N[1],c)return[N,z,at].concat(p);{p=[N,z,at].concat(p);const j=[];for(let A=0;A<p.length;A+=3){const O=Ji(p[A][0],p[A][1],h),v=Ji(p[A+1][0],p[A+1][1],h),R=Ji(p[A+2][0],p[A+2][1],h);j.push([O[0],O[1],v[0],v[1],R[0],R[1]])}return j}}const dk={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return Ta(e,t,r)},ellipse:function(e,t,r,i,s){const a=Ep(r,i,s);return bn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return $r(e,t,r,i,s,!0)}};function Fp(e,t,r,i,s){return{type:"path",ops:$r(e,t,r,i,s)}}function aa(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...$r(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...$r(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Fp(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function pk(e,t,r,i,s){return(function(a,o){return aa(a,!0,o)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function pc(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Ys(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Ys(r[0],1.5*(1+.22*t.roughness),mc(t));for(let a=1;a<r.length;a++){const o=r[a];if(o.length){const n=Ys(o,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Ys(o,1.5*(1+.22*t.roughness),mc(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Ep(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let o=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return o+=Mt(o*l,r),n+=Mt(n*l,r),{increment:a,rx:o,ry:n}}function bn(e,t,r,i){const[s,a]=yc(i.increment,e,t,i.rx,i.ry,1,i.increment*Ta(.1,Ta(.4,1,r),r),r);let o=Sa(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=yc(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=Sa(n,null,r);o=o.concat(l)}return{estimatedPoints:a,opset:{type:"path",ops:o}}}function fc(e,t,r,i,s,a,o,n,l){const c=e,h=t;let u=Math.abs(r/2),p=Math.abs(i/2);u+=Mt(.01*u,l),p+=Mt(.01*p,l);let d=s,m=a;for(;d<0;)d+=2*Math.PI,m+=2*Math.PI;m-d>2*Math.PI&&(d=0,m=2*Math.PI);const y=2*Math.PI/l.curveStepCount,x=Math.min(y/2,(m-d)/2),C=Cc(x,c,h,u,p,d,m,1,l);if(!l.disableMultiStroke){const k=Cc(x,c,h,u,p,d,m,1.5,l);C.push(...k)}return o&&(n?C.push(...$r(c,h,c+u*Math.cos(d),h+p*Math.sin(d),l),...$r(c,h,c+u*Math.cos(m),h+p*Math.sin(m),l)):C.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+u*Math.cos(d),h+p*Math.sin(d)]})),{type:"path",ops:C}}function gc(e,t){const r=vp(Bp(ml(e))),i=[];let s=[0,0],a=[0,0];for(const{key:o,data:n}of r)switch(o){case"M":a=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...$r(a[0],a[1],n[0],n[1],t)),a=[n[0],n[1]];break;case"C":{const[l,c,h,u,p,d]=n;i.push(...fk(l,c,h,u,p,d,a,t)),a=[p,d];break}case"Z":i.push(...$r(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function ko(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let o=1;o<a;o++)r.push({op:"lineTo",data:[i[o][0]+Mt(s,t),i[o][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function li(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Ee[s])switch(s){case"zigzag":Ee[s]||(Ee[s]=new ak(i));break;case"cross-hatch":Ee[s]||(Ee[s]=new ok(i));break;case"dots":Ee[s]||(Ee[s]=new nk(i));break;case"dashed":Ee[s]||(Ee[s]=new lk(i));break;case"zigzag-line":Ee[s]||(Ee[s]=new hk(i));break;default:s="hachure",Ee[s]||(Ee[s]=new gl(i))}return Ee[s]})(t,dk).fillPolygons(e,t)}function mc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Ap(e){return e.randomizer||(e.randomizer=new ck(e.seed||0)),e.randomizer.next()}function Ta(e,t,r,i=1){return r.roughness*i*(Ap(r)*(t-e)+e)}function Mt(e,t,r=1){return Ta(-e,e,t,r)}function $r(e,t,r,i,s,a=!1){const o=a?s.disableMultiStrokeFill:s.disableMultiStroke,n=kn(e,t,r,i,s,!0,!1);if(o)return n;const l=kn(e,t,r,i,s,!0,!0);return n.concat(l)}function kn(e,t,r,i,s,a,o){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const u=h/2,p=.2+.2*Ap(s);let d=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;d=Mt(d,s,c),m=Mt(m,s,c);const y=[],x=()=>Mt(u,s,c),C=()=>Mt(h,s,c),k=s.preserveVertices;return o?y.push({op:"move",data:[e+(k?0:x()),t+(k?0:x())]}):y.push({op:"move",data:[e+(k?0:Mt(h,s,c)),t+(k?0:Mt(h,s,c))]}),o?y.push({op:"bcurveTo",data:[d+e+(r-e)*p+x(),m+t+(i-t)*p+x(),d+e+2*(r-e)*p+x(),m+t+2*(i-t)*p+x(),r+(k?0:x()),i+(k?0:x())]}):y.push({op:"bcurveTo",data:[d+e+(r-e)*p+C(),m+t+(i-t)*p+C(),d+e+2*(r-e)*p+C(),m+t+2*(i-t)*p+C(),r+(k?0:C()),i+(k?0:C())]}),y}function Ys(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return Sa(i,null,r)}function Sa(e,t,r){const i=e.length,s=[];if(i>3){const a=[],o=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*e[n+1][0]-o*e[n-1][0])/6,l[1]+(o*e[n+1][1]-o*e[n-1][1])/6],a[2]=[e[n+1][0]+(o*e[n][0]-o*e[n+2][0])/6,e[n+1][1]+(o*e[n][1]-o*e[n+2][1])/6],a[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...kn(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function yc(e,t,r,i,s,a,o,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const u=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(u),c.push(u)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=Mt(.5,n)-Math.PI/2;c.push([Mt(a,n)+t+.9*i*Math.cos(h-e),Mt(a,n)+r+.9*s*Math.sin(h-e)]);const u=2*Math.PI+h-.01;for(let p=h;p<u;p+=e){const d=[Mt(a,n)+t+i*Math.cos(p),Mt(a,n)+r+s*Math.sin(p)];l.push(d),c.push(d)}c.push([Mt(a,n)+t+i*Math.cos(h+2*Math.PI+.5*o),Mt(a,n)+r+s*Math.sin(h+2*Math.PI+.5*o)]),c.push([Mt(a,n)+t+.98*i*Math.cos(h+o),Mt(a,n)+r+.98*s*Math.sin(h+o)]),c.push([Mt(a,n)+t+.9*i*Math.cos(h+.5*o),Mt(a,n)+r+.9*s*Math.sin(h+.5*o)])}return[c,l]}function Cc(e,t,r,i,s,a,o,n,l){const c=a+Mt(.1,l),h=[];h.push([Mt(n,l)+t+.9*i*Math.cos(c-e),Mt(n,l)+r+.9*s*Math.sin(c-e)]);for(let u=c;u<=o;u+=e)h.push([Mt(n,l)+t+i*Math.cos(u),Mt(n,l)+r+s*Math.sin(u)]);return h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),h.push([t+i*Math.cos(o),r+s*Math.sin(o)]),Sa(h,null,l)}function fk(e,t,r,i,s,a,o,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const u=n.disableMultiStroke?1:2,p=n.preserveVertices;for(let d=0;d<u;d++)d===0?l.push({op:"move",data:[o[0],o[1]]}):l.push({op:"move",data:[o[0]+(p?0:Mt(c[0],n)),o[1]+(p?0:Mt(c[0],n))]}),h=p?[s,a]:[s+Mt(c[d],n),a+Mt(c[d],n)],l.push({op:"bcurveTo",data:[e+Mt(c[d],n),t+Mt(c[d],n),r+Mt(c[d],n),i+Mt(c[d],n),h[0],h[1]]});return l}function ts(e){return[...e]}function xc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(ts(e[0]),ts(e[1]),ts(e[2]),ts(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const a=[],o=1-t;i.push(ts(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];a[0]=[l[0],l[1]],a[1]=[l[0]+(o*s[n+1][0]-o*s[n-1][0])/6,l[1]+(o*s[n+1][1]-o*s[n-1][1])/6],a[2]=[s[n+1][0]+(o*s[n][0]-o*s[n+2][0])/6,s[n+1][1]+(o*s[n][1]-o*s[n+2][1])/6],a[3]=[s[n+1][0],s[n+1][1]],i.push(a[1],a[2],a[3])}}return i}function oa(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function gk(e,t,r){const i=oa(t,r);if(i===0)return oa(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),oa(e,Wr(t,r,s))}function Wr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function Tn(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],u=n[l+2],p=n[l+3];let d=3*h[0]-2*c[0]-p[0];d*=d;let m=3*h[1]-2*c[1]-p[1];m*=m;let y=3*u[0]-2*p[0]-c[0];y*=y;let x=3*u[1]-2*p[1]-c[1];return x*=x,d<y&&(d=y),m<x&&(m=x),d+m})(e,t)<r){const n=e[t+0];s.length?(a=s[s.length-1],o=n,Math.sqrt(oa(a,o))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],u=e[t+3],p=Wr(l,c,.5),d=Wr(c,h,.5),m=Wr(h,u,.5),y=Wr(p,d,.5),x=Wr(d,m,.5),C=Wr(y,x,.5);Tn([l,p,y,C],0,r,s),Tn([C,x,m,u],0,r,s)}var a,o;return s}function mk(e,t){return wa(e,0,e.length,t)}function wa(e,t,r,i,s){const a=s||[],o=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const u=gk(e[h],o,n);u>l&&(l=u,c=h)}return Math.sqrt(l)>i?(wa(e,t,c+1,i,a),wa(e,c,r,i,a)):(a.length||a.push(o),a.push(n)),a}function To(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)Tn(e,3*a,t,i);return r&&r>0?wa(i,0,i.length,r):i}const De="none";class _a{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(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const o=this._o(a);return this._d("line",[Fp(t,r,i,s,o)],o)}rectangle(t,r,i,s,a){const o=this._o(a),n=[],l=pk(t,r,i,s,o);if(o.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];o.fillStyle==="solid"?n.push(ko([c],o)):n.push(li([c],o))}return o.stroke!==De&&n.push(l),this._d("rectangle",n,o)}ellipse(t,r,i,s,a){const o=this._o(a),n=[],l=Ep(i,s,o),c=bn(t,r,o,l);if(o.fill)if(o.fillStyle==="solid"){const h=bn(t,r,o,l).opset;h.type="fillPath",n.push(h)}else n.push(li([c.estimatedPoints],o));return o.stroke!==De&&n.push(c.opset),this._d("ellipse",n,o)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[aa(t,!1,i)],i)}arc(t,r,i,s,a,o,n=!1,l){const c=this._o(l),h=[],u=fc(t,r,i,s,a,o,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const p=Object.assign({},c);p.disableMultiStroke=!0;const d=fc(t,r,i,s,a,o,!0,!1,p);d.type="fillPath",h.push(d)}else h.push((function(p,d,m,y,x,C,k){const S=p,w=d;let B=Math.abs(m/2),L=Math.abs(y/2);B+=Mt(.01*B,k),L+=Mt(.01*L,k);let E=x,F=C;for(;E<0;)E+=2*Math.PI,F+=2*Math.PI;F-E>2*Math.PI&&(E=0,F=2*Math.PI);const X=(F-E)/k.curveStepCount,N=[];for(let z=E;z<=F;z+=X)N.push([S+B*Math.cos(z),w+L*Math.sin(z)]);return N.push([S+B*Math.cos(F),w+L*Math.sin(F)]),N.push([S,w]),li([N],k)})(t,r,i,s,a,o,c));return c.stroke!==De&&h.push(u),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],a=pc(t,i);if(i.fill&&i.fill!==De)if(i.fillStyle==="solid"){const o=pc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(o.ops)})}else{const o=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?o.push(...c):c.length===3?o.push(...To(xc([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):o.push(...To(xc(c),10,(1+i.roughness)/2))}o.length&&s.push(li([o],i))}return i.stroke!==De&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=aa(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(ko([t],i)):s.push(li([t],i))),i.stroke!==De&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==De,o=i.stroke!==De,n=!!(i.simplification&&i.simplification<1),l=(function(h,u,p){const d=vp(Bp(ml(h))),m=[];let y=[],x=[0,0],C=[];const k=()=>{C.length>=4&&y.push(...To(C,u)),C=[]},S=()=>{k(),y.length&&(m.push(y),y=[])};for(const{key:B,data:L}of d)switch(B){case"M":S(),x=[L[0],L[1]],y.push(x);break;case"L":k(),y.push([L[0],L[1]]);break;case"C":if(!C.length){const E=y.length?y[y.length-1]:x;C.push([E[0],E[1]])}C.push([L[0],L[1]]),C.push([L[2],L[3]]),C.push([L[4],L[5]]);break;case"Z":k(),y.push([x[0],x[1]])}if(S(),!p)return m;const w=[];for(const B of m){const L=mk(B,p);L.length&&w.push(L)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=gc(t,i);if(a)if(i.fillStyle==="solid")if(l.length===1){const h=gc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(ko(l,i));else s.push(li(l,i));return o&&(n?l.forEach((h=>{s.push(aa(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((o=>+o.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let o=null;switch(a.type){case"path":o={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:De};break;case"fillPath":o={d:this.opsToPath(a),stroke:De,strokeWidth:0,fill:i.fill||De};break;case"fillSketch":o=this.fillSketch(a,i)}o&&s.push(o)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||De,strokeWidth:i,fill:De}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class yk{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const o of r)switch(o.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,o,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,o,a,n),s.restore();break}case"fillSketch":this.fillSketch(s,o,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const o=typeof i=="number"&&i>=0?a.data.map((n=>+n.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(o[0],o[1]);break;case"bcurveTo":t.bezierCurveTo(o[0],o[1],o[2],o[3],o[4],o[5]);break;case"lineTo":t.lineTo(o[0],o[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o),o}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o),o}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o),o}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const Us="http://www.w3.org/2000/svg";class Ck{constructor(t,r){this.svg=t,this.gen=new _a(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(Us,"g"),o=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(Us,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(Us,"path"),l.setAttribute("d",this.opsToPath(n,o)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&a.appendChild(l)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(Us,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const o=this.gen.line(t,r,i,s,a);return this.draw(o)}rectangle(t,r,i,s,a){const o=this.gen.rectangle(t,r,i,s,a);return this.draw(o)}ellipse(t,r,i,s,a){const o=this.gen.ellipse(t,r,i,s,a);return this.draw(o)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,o,n=!1,l){const c=this.gen.arc(t,r,i,s,a,o,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var ft={canvas:(e,t)=>new yk(e,t),svg:(e,t)=>new Ck(e,t),generator:e=>new _a(e),newSeed:()=>_a.newSeed()},xk=1,bk=3;async function yl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Cl(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const o=zt().fontSize?zt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=Td.fontSize]=Oa(o),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}f(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}f(yl,"configureLabelImages");function Cl(e){var r;return e.nodeType===bk?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==xk||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Cl)}f(Cl,"hasTextBesidesImages");var bc=3,kk=32,Tk=f(async(e,t,r)=>{var C,k,S;const i=zt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",oe(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(w=>({text:w,cssClass:"c4-descr"}))].filter(w=>w.text),l=t.width?Math.max(t.width-2*(t.padding??0),kk):((k=zt().flowchart)==null?void 0:k.wrappingWidth)??200,h=((S=i.c4)==null?void 0:S.wrap)??!0?l:Number.POSITIVE_INFINITY,u=await Promise.all(n.map(async w=>{const B=a.append("g").attr("class",w.cssClass),L=await Ve(B,ze(Or(w.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:h,style:t.labelStyle},i);return Pt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Pt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:B,box:B.node().getBBox()}})),p=Math.max(...u.map(({box:w})=>w.width),0);let d=0;for(const{el:w,box:B}of u)w.attr("transform",`translate(${p/2-B.x-B.width/2}, ${d-B.y})`),d+=B.height+bc;const m=u.length>0?d-bc:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-p/2}, ${-m/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),St=f(async(e,t,r)=>{var d,m;if(t.stereotype!==void 0)return Tk(e,t,r);let i;const s=t.useHtmlLabels||lr((d=zt())==null?void 0:d.htmlLabels);r?i=r:i="node default";const a=e.insert("g").attr("class",i).attr("id",t.domId||t.id),o=a.insert("g").attr("class","label").attr("style",oe(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ve(o,ze(Or(n),zt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((m=zt().flowchart)==null?void 0:m.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},zt()),u=((t==null?void 0:t.padding)??0)/2;let p;if(s){const y=h.children[0],x=Pt(h);await yl(y),p=await Vr.measure(()=>y.getBoundingClientRect()),x.attr("width",p.width),x.attr("height",p.height)}else p=await Vr.measure(()=>h.getBBox());return s?o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"):o.attr("transform","translate(0, "+-p.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-p.width/2+", "+-p.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:a,bbox:p,halfPadding:u,label:o}},"labelHelper"),So=f(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??be(zt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Ve(s,ze(Or(t),zt()),{useHtmlLabels:i,width:r.width||((c=(l=zt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),o=r.padding/2;let n;if(be(zt())){const h=a.children[0],u=Pt(a);n=await Vr.measure(()=>h.getBoundingClientRect()),u.attr("width",n.width),u.attr("height",n.height)}else n=await Vr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:o,label:s}},"insertLabel"),Ct=f((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),wt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function jt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(jt,"createPathFromPoints");function Dr(e,t,r,i,s,a){const o=[],l=r-e,c=i-t,h=l/a,u=2*Math.PI/h,p=t+c/2;for(let d=0;d<=50;d++){const m=d/50,y=e+m*l,x=p+s*Math.sin(u*(y-e));o.push({x:y,y:x})}return o}f(Dr,"generateFullSineWavePoints");function ir(e,t,r,i,s,a){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(ir,"generateCirclePoints");function Sn(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),a=t.find(l=>l.getAttribute("stroke")!=="none"),o=f((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:o(s,"fill"),"fill-opacity":o(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(a){const l={stroke:o(a,"stroke"),"stroke-width":o(a,"stroke-width")??"1","stroke-opacity":o(a,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Sn,"mergePaths");var Sk=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,o=e.width/2,n=e.height/2,l,c;return Math.abs(a)*o>Math.abs(s)*n?(a<0&&(n=-n),l=a===0?0:n*s/a,c=n):(s<0&&(o=-o),l=o,c=s===0?0:o*a/s),{x:r+l,y:i+c}},"intersectRect"),ti=Sk,He=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),wk=f(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const o=zt(),n=be(o);return await Ve(e,a,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},o)},"createLabel"),Fr=wk;function Mp(e,t){return e.intersect(t)}f(Mp,"intersectNode");var _k=Mp;function Op(e,t,r,i){var s=e.x,a=e.y,o=s-i.x,n=a-i.y,l=Math.sqrt(t*t*n*n+r*r*o*o),c=Math.abs(t*r*o/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<a&&(h=-h),{x:s+c,y:a+h}}f(Op,"intersectEllipse");var $p=Op;function Dp(e,t,r){return $p(e,t,t,r)}f(Dp,"intersectCircle");var Bk=Dp;function Pp(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,n=s*r.x+a*r.y+o,l=s*i.x+a*i.y+o,c=1e-6;if(n!==0&&l!==0&&wn(n,l))return;const h=i.y-r.y,u=r.x-i.x,p=i.x*r.y-r.x*i.y,d=h*e.x+u*e.y+p,m=h*t.x+u*t.y+p;if(Math.abs(d)<c&&Math.abs(m)<c&&wn(d,m))return;const y=s*u-h*a;if(y===0)return;const x=Math.abs(y/2);let C=a*p-u*o;const k=C<0?(C-x)/y:(C+x)/y;C=h*o-s*p;const S=C<0?(C-x)/y:(C+x)/y;return{x:k,y:S}}}f(Pp,"intersectLine");function wn(e,t){return e*t>0}f(wn,"sameSign");var vk=Pp;function Ip(e,t,r){let i=e.x,s=e.y,a=[],o=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){o=Math.min(o,h.x),n=Math.min(n,h.y)}):(o=Math.min(o,t.x),n=Math.min(n,t.y));let l=i-e.width/2-o,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let u=t[h],p=t[h<t.length-1?h+1:0],d=vk(e,r,{x:l+u.x,y:c+u.y},{x:l+p.x,y:c+p.y});d&&a.push(d)}return a.length?(a.length>1&&a.sort(function(h,u){let p=h.x-r.x,d=h.y-r.y,m=Math.sqrt(p*p+d*d),y=u.x-r.x,x=u.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),a[0]):e}f(Ip,"intersectPolygon");var Lk=Ip,ht={node:_k,circle:Bk,ellipse:$p,polygon:Lk,rect:ti};function Rp(e,t){const{labelStyles:r}=xt(t);t.labelStyle=r;const i=wt(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=1,{cssStyles:n}=t,l=ft.svg(a),c=dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,o*2,c),u=a.insert(()=>h,":first-child");return u.attr("class","anchor").attr("style",oe(n)),Ct(t,u),t.intersect=function(p){return W.info("Circle intersect",t,o,p),ht.circle(t,o,p)},a}f(Rp,"anchor");function _n(e,t,r,i,s,a,o){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),u=(r-e)/2,p=(i-t)/2,d=u/s,m=p/a,y=Math.sqrt(d**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=l+x*a*Math.sin(h)*(o?-1:1),k=c-x*s*Math.cos(h)*(o?-1:1),S=Math.atan2((t-k)/a,(e-C)/s);let B=Math.atan2((i-k)/a,(r-C)/s)-S;o&&B<0&&(B+=2*Math.PI),!o&&B>0&&(B-=2*Math.PI);const L=[];for(let E=0;E<20;E++){const F=E/19,X=S+F*B,N=C+s*Math.cos(X),z=k+a*Math.sin(X);L.push({x:N,y:z})}return L}f(_n,"generateArcPoints");function qp(e,t,r){const[i,s]=[t,r].sort((a,o)=>o-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(qp,"calculateArcSagitta");async function Np(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=f(X=>X+o,"calcTotalHeight"),l=f(X=>{const N=X/2;return[N/(2.5+X/50),N]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[p,d]=l(u),m=qp(u,p,d),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+m-m,C=u,{cssStyles:k}=t,S=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},..._n(-x/2,-C/2,-x/2,C/2,p,d,!1),{x:x/2,y:C/2},..._n(x/2,C/2,x/2,-C/2,p,d,!0)],w=ft.svg(c),B=dt(t,{});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=jt(S),E=w.path(L,B),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${p/2}, 0)`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,S,X)},c}f(Np,"bowTieRect");async function zp(e,t,{config:{themeVariables:r}}){var E;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(o.width+c*2,t.width??0,80),u=Math.max(Math.min(h*.08,12),5),p=Math.max(o.height+c*2+u,t.height??0),d=-p/2+u,m=p/2,y=h*.72,x=[`M${-h/2},${d}`,`L${-y/2},${m}`,`A${y/2},${u} 0 0 0 ${y/2},${m}`,`L${h/2},${d}`,`A${h/2},${u} 0 0 0 ${-h/2},${d}`,"Z"].join(" "),{cssStyles:C}=t,k=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const X=ft.svg(a).path(x,dt(t,{}));(E=k.node())==null||E.appendChild(X),C&&k.attr("style",C)}else k.append("path").attr("d",x).attr("style",s);k.append("ellipse").attr("cx",0).attr("cy",d).attr("rx",h/2).attr("ry",u).attr("style",`fill:none;stroke:${l};stroke-width:1px`),Ct(t,k);const S=d+(m-d)/2;n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`);const w=12,B=f((F,X,N)=>Array.from({length:w+1},(z,at)=>{const j=Math.PI-at*Math.PI/w;return{x:F*Math.cos(j),y:X+N*u*Math.sin(j)}}),"arc"),L=[...B(h/2,d,-1),...B(y/2,m,1).reverse()];return t.intersect=function(F){return ht.polygon(t,L,F)},a}f(zp,"bucket");var kc=20,Tc=8,Fk=80,wo=8;async function Wp(e,t){const{themeVariables:r}=zt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:a}=xt(t),{shapeSvg:o,bbox:n}=await St(e,t,wt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,Fk,(t==null?void 0:t.width)??0),u=Math.max(c+Tc+kc+l*2,(t==null?void 0:t.height)??0),p=-h/2,d=-u/2,m=-28/2,y=o.select(".label");y&&(t.useHtmlLabels??be(zt())?y.attr("transform",`translate(${-n.width/2}, ${-n.height/2+m})`):y.attr("transform",`translate(0, ${-n.height/2+m})`));let x;if(t.look==="handDrawn"){const B=ft.svg(o),L=dt(t,{fill:i,stroke:s,fillStyle:"solid"}),E=B.path(He(p,d,h,u,wo),L);x=o.insert(()=>E,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",oe(t.cssStyles))}else x=o.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",a).attr("rx",wo).attr("ry",wo).attr("x",p).attr("y",d).attr("width",h).attr("height",u).attr("fill",i).attr("stroke",s);const C=d+l+c+Tc;o.append("line").attr("class","collapsed-separator").attr("x1",p+8).attr("y1",C).attr("x2",p+h-8).attr("y2",C).attr("stroke",s).attr("stroke-dasharray","3, 3");const k=C+kc/2,S=2.5,w=10;for(let B=-1;B<=1;B++)o.append("circle").attr("class","collapsed-indicator").attr("cx",B*w).attr("cy",k).attr("r",S).attr("fill",s);return Ct(t,x),t.calcIntersect=function(B,L){return ht.rect(B,L)},t.intersect=function(B){return ht.rect(t,B)},o}f(Wp,"collapsedGroup");function hr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(hr,"insertPolygonShape");var Ek=["right","left","up","down"],xl="point",Ak=f(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),Mk=f(e=>Ek.filter(t=>e.has(t)).join("|")||xl,"getDirectionKey"),Sc={"right|left|up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":f(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":f(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":f(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[xl]:()=>[{x:0,y:0}]},Ok=f((e,t,r,i)=>{const s=Ak(e),a=(r.padding??0)/2,o=t.height+4*a,n=o/2,l=i??t.width+2*n+2*a,c=Mk(s);return(Sc[c]??Sc[xl])({height:o,midpoint:n,padding:a,width:l})},"getArrowPoints");async function Hp(e,t){const r=t,{shapeSvg:i,bbox:s}=await St(e,r,wt(r)),a=r.padding??0,o=s.height+2*a,n=o/2,l=s.width+2*n+a,c=r.width??0,u=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,p=Ok(r.directions??[],s,r,u),d=hr(i,u,o,p);return d.attr("style",r.style??null),Ct(r,d),r.intersect=function(m){return ht.polygon(r,p,m)},i}f(Hp,"block_arrow");async function jp(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,u=12,p=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=ft.svg(a).path(He(-p/2,m,p,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("line").attr("x1",-p/2).attr("y1",m+h).attr("x2",p/2).attr("y2",m+h).attr("style",`stroke:${l};stroke-width:1px`);for(let S=0;S<3;S++)x.append("circle").attr("cx",-p/2+12+S*9).attr("cy",m+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-p/2+44).attr("y",m+4).attr("width",Math.max(p-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}f(jp,"browser");var Gs=12;async function Yp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,o=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?a*2:a+Gs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?o*2:o),u=0,p=c,d=-h,m=0,y=[{x:u+Gs,y:d},{x:p,y:d},{x:p,y:m},{x:u,y:m},{x:u,y:d+Gs},{x:u+Gs,y:d}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=ft.svg(n),S=dt(t,{}),w=jt(y),B=k.path(w,S);x=n.insert(()=>B,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),C&&x.attr("style",C)}else x=hr(n,c,h,y);return i&&x.attr("style",i),Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},n}f(Yp,"card");function Up(e,t){const{nodeStyles:r}=xt(t);t.label="";const i=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],n=ft.svg(i),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=jt(o),h=n.path(c,l),u=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(p){return ht.polygon(t,o,p)},i}f(Up,"choice");async function bl(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,halfPadding:n}=await St(e,t,wt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?o.width/2+l*2:o.width/2+c;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=ft.svg(a),m=dt(t,{}),y=d.circle(0,0,h*2,m);u=a.insert(()=>y,":first-child"),u.attr("class","basic label-container").attr("style",oe(p))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return Ct(t,u),t.calcIntersect=function(d,m){const y=d.width/2;return ht.circle(d,y,m)},t.intersect=function(d){return W.info("Circle intersect",t,h,d),ht.circle(t,h,d)},a}f(bl,"circle");async function Gp(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:o}=await St(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:a.width+l,h=r.positioned?r.height??0:a.height+l,u=r.positioned?-c/2:-a.width/2-o,p=r.positioned?-h/2:-a.height/2-o;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",p).attr("width",c).attr("height",h),Ct(r,n),r.intersect=function(d){return ht.rect(r,d)},s}f(Gp,"composite");async function Xp(e,t,{config:{themeVariables:r}}){var k;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o,label:n}=await St(e,t,wt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,u=12,p=Math.max(o.width+c*2,t.width??0,90),d=Math.max(o.height+c*2+h,t.height??0),m=-d/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=ft.svg(a).path(He(-p/2,m,p,d,u),dt(t,{}));(k=x.node())==null||k.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-p/2).attr("y",m).attr("width",p).attr("height",d).attr("rx",u).attr("ry",u).attr("style",s);x.append("text").attr("x",-p/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),Ct(t,x);const C=m+h+(d-h)/2;return n.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${C-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(S){return ht.rect(t,S)},a}f(Xp,"consoleWindow");function Vp(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},o={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${n.x},${n.y}
|
|
201
|
-
M ${s.x},${s.y} L ${o.x},${o.y}`}f(Vp,"createLine");function Zp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:o}=t,n=ft.svg(s),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,a*2,l),h=Vp(a),u=n.path(h,l),p=s.insert(()=>c,":first-child");return p.insert(()=>u),p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),Ct(t,p),t.intersect=function(d){return W.info("crossedCircle intersect",t,{radius:a,point:d}),ht.circle(t,a,d)},s}f(Zp,"crossedCircle");function gr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(gr,"generateCirclePoints");async function Kp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+n,h=a.height+l,u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...gr(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...gr(c/2+u*2,-u,u,20,-180,-270),...gr(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...gr(c/2,h/2,u,20,0,90)],m=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...gr(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...gr(c/2+c*.1,-u,u,20,-180,-270),...gr(c/2+c*.1,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...gr(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2,y:h/2+u}],y=ft.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),B=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${u}, 0)`),o.attr("transform",`translate(${-c/2+u-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,m,E)},s}f(Kp,"curlyBraceLeft");function mr(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:d,y:m})}return o}f(mr,"generateCirclePoints");async function Qp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90)],m=[{x:-c/2,y:-h/2-u},{x:c/2,y:-h/2-u},...mr(c/2,-h/2,u,20,-90,0),{x:c/2+u,y:-u},...mr(c/2+u*2,-u,u,20,-180,-270),...mr(c/2+u*2,u,u,20,-90,-180),{x:c/2+u,y:h/2},...mr(c/2,h/2,u,20,0,90),{x:c/2,y:h/2+u},{x:-c/2,y:h/2+u}],y=ft.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const k=jt(d).replace("Z",""),S=y.path(k,x),w=jt(m),B=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>B,":first-child").attr("stroke-opacity",0),L.insert(()=>S,":first-child"),L.attr("class","text"),p&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-u}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,m,E)},s}f(Qp,"curlyBraceRight");function pe(e,t,r,i=100,s=0,a=180){const o=[],n=s*Math.PI/180,h=(a*Math.PI/180-n)/(i-1);for(let u=0;u<i;u++){const p=n+u*h,d=e+r*Math.cos(p),m=t+r*Math.sin(p);o.push({x:-d,y:-m})}return o}f(pe,"generateCirclePoints");async function Jp(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=a.width+(t.look==="neo"?n*2:n),h=a.height+(t.look==="neo"?l*2:l),u=Math.max(5,h*.1),{cssStyles:p}=t,d=[...pe(c/2,-h/2,u,30,-90,0),{x:-c/2-u,y:u},...pe(c/2+u*2,-u,u,20,-180,-270),...pe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:-h/2},...pe(c/2,h/2,u,20,0,90)],m=[...pe(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...pe(-c/2-u/2,-u,u,20,0,90),...pe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...pe(-c/2+u+u/2,h/2,u,30,-180,-270)],y=[{x:c/2,y:-h/2-u},{x:-c/2,y:-h/2-u},...pe(c/2,-h/2,u,20,-90,0),{x:-c/2-u,y:-u},...pe(c/2+u*2,-u,u,20,-180,-270),...pe(c/2+u*2,u,u,20,-90,-180),{x:-c/2-u,y:h/2},...pe(c/2,h/2,u,20,0,90),{x:-c/2,y:h/2+u},{x:c/2-u-u/2,y:h/2+u},...pe(-c/2+u+u/2,-h/2,u,20,-90,-180),{x:c/2-u/2,y:u},...pe(-c/2-u/2,-u,u,20,0,90),...pe(-c/2-u/2,u,u,20,-90,0),{x:c/2-u/2,y:-u},...pe(-c/2+u+u/2,h/2,u,30,-180,-270)],x=ft.svg(s),C=dt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const S=jt(d).replace("Z",""),w=x.path(S,C),L=jt(m).replace("Z",""),E=x.path(L,C),F=jt(y),X=x.path(F,{...C}),N=s.insert("g",":first-child");return N.insert(()=>X,":first-child").attr("stroke-opacity",0),N.insert(()=>w,":first-child"),N.insert(()=>E,":first-child"),N.attr("class","text"),p&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(${u-u/4}, 0)`),o.attr("transform",`translate(${-c/2+(t.padding??0)/2-(a.x-(a.left??0))},${-h/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,N),t.intersect=function(z){return ht.polygon(t,y,z)},s}f(Jp,"curlyBraces");async function tf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await St(e,t,wt(t)),u=Math.max(n,(h.width+a*2)*1.25,(t==null?void 0:t.width)??0),p=Math.max(l,h.height+o*2,(t==null?void 0:t.height)??0),d=p/2,{cssStyles:m}=t,y=ft.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=u,k=p,S=C-d,w=k/4,B=[{x:S,y:0},{x:w,y:0},{x:0,y:k/2},{x:w,y:k},{x:S,y:k},...ir(-S,-k/2,d,50,270,90)],L=jt(B),E=y.path(L,x),F=c.insert(()=>E,":first-child");return F.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&F.selectChildren("path").attr("style",i),F.attr("transform",`translate(${-u/2}, ${-p/2})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,B,X)},c}f(tf,"curvedTrapezoid");async function ef(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??20,l=Math.max(a.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,u=Math.max(a.height+n*2,t.height?t.height-(2*c-h):0),p=Math.min(l*.177,u*.45),d=u+2*c-h,m=-d/2,y=m+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const F=ft.svg(s),X=dt(t,{}),N=F.path(He(-l/2,y,l,u,p),X),z=F.circle(0,m+c,c*2,X);x.insert(()=>z,":first-child"),x.insert(()=>N,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-l/2).attr("y",y).attr("width",l).attr("height",u).attr("rx",p).attr("ry",p).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+c).attr("r",c).attr("style",i);Ct(t,x);const k=y+u/2;o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`);const S=m+c,w=Math.asin(Math.min(1,(y-S)/c))*180/Math.PI,E=[...ir(0,-S,c,24,180+w,-w),...ir(-(-l/2+p),-(y+p),p,12,90,0),...ir(-(-l/2+p),-(d/2-p),p,12,360,270),...ir(-(l/2-p),-(d/2-p),p,12,270,180),...ir(-(l/2-p),-(y+p),p,12,180,90)];return t.intersect=function(F){return ht.polygon(t,E,F)},s}f(ef,"person");var $k=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Dk=f((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),Pk=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),wc=8,_c=8;async function rf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,o=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-o,t.width<_c&&(t.width=_c)),t.height){const k=n/2/(2.5+n/50);t.height=t.height-a-k*3,t.height<wc&&(t.height=wc)}const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=Math.max(t.width??0,c.width)+o,p=u/2,d=p/(2.5+u/50),m=Math.max(t.height??0,c.height)+a+d;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ft.svg(l),k=Dk(0,0,u,m,p,d),S=Pk(0,d,u,m,p,d),w=dt(t,{}),B=C.path(k,w),L=C.path(S,dt(t,{fill:"none"}));y=l.insert(()=>L,":first-child"),y=l.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=$k(0,0,u,m,p,d);y=l.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",d),y.attr("transform",`translate(${-u/2}, ${-(m/2+d)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(p!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-d)){let w=d*d*(1-S*S/(p*p));w>0&&(w=Math.sqrt(w)),w=d-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},l}f(rf,"cylinder");async function Ni(e,t,r){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{shapeSvg:a,bbox:o}=await St(e,t,wt(t)),n=Math.max(o.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(o.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let u,{rx:p,ry:d}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(p=r.rx,d=r.ry),t.look==="handDrawn"){const y=ft.svg(a),x=dt(t,{}),C=p||d?y.path(He(c,h,n,l,p||0),x):y.rectangle(c,h,n,l,x);u=a.insert(()=>C,":first-child"),u.attr("class","basic label-container").attr("style",oe(m))}else u=a.insert("rect",":first-child"),u.attr("class","basic label-container").attr("style",s).attr("rx",oe(p)).attr("ry",oe(d)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return Ct(t,u,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(y,x){return ht.rect(y,x)},t.intersect=function(y){return ht.rect(t,y)},a}f(Ni,"drawRect");async function sf(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:o,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},c=await Ni(e,t,l);if(t.look==="handDrawn"){const d=ft.svg(c),m=dt(t,{}),y=c.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return c;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return c;return c.insert(()=>d.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),c.insert(()=>d.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),c}const h=c.select(".basic.label-container"),u=(Number(h.attr("width"))||o)??0,p=(Number(h.attr("height"))||n)??0;return u>0&&p>0&&h.attr("stroke-dasharray",`${u} ${p}`),c}f(sf,"datastore");async function af(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=n.width+s,h=n.height+a,u=h*.2,p=-c/2,d=-h/2-u/2,{cssStyles:m}=t,y=ft.svg(o),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:p,y:d+u},{x:-p,y:d+u},{x:-p,y:-d},{x:p,y:-d},{x:p,y:d},{x:-p,y:d},{x:-p,y:d+u}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=o.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${p+(t.padding??0)/2-(n.x-(n.left??0))}, ${d+u+(t.padding??0)/2-(n.y-(n.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.rect(t,w)},o}f(af,"dividedRectangle");async function of(e,t){var d,m;const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,o=t.look==="neo"?16:a,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(o??0),h=c-s;let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const y=ft.svg(n),x=dt(t,{roughness:.2,strokeWidth:2.5}),C=dt(t,{roughness:.2,strokeWidth:1.5}),k=y.circle(0,0,c*2,x),S=y.circle(0,0,h*2,C);u=n.insert("g",":first-child"),u.attr("class",oe(t.cssClasses)).attr("style",oe(p)),(d=u.node())==null||d.appendChild(k),(m=u.node())==null||m.appendChild(S)}else{u=n.insert("g",":first-child");const y=u.insert("circle",":first-child"),x=u.insert("circle");u.attr("class","basic label-container").attr("style",i),y.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return Ct(t,u),t.intersect=function(y){return W.info("DoubleCircle intersect",t,c,y),ht.circle(t,c,y)},n}f(of,"doublecircle");function nf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),o=7,{cssStyles:n}=t,l=ft.svg(a),{nodeBorder:c}=r,h=dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const u=l.circle(0,0,o*2,h),p=a.insert(()=>u,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",s),Ct(t,p),t.intersect=function(d){return W.info("filledCircle intersect",t,{radius:o,point:d}),ht.circle(t,o,d)},a}f(nf,"filledCircle");var Bc=10,vc=10;async function lf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Bc&&(t.height=Bc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<vc&&(t.width=vc));const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(a??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,u=h,p=[{x:0,y:-h},{x:u,y:-h},{x:u/2,y:0}],{cssStyles:d}=t,m=ft.svg(o),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=jt(p),C=m.path(x,y),k=o.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return d&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=c,t.height=h,Ct(t,k),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return W.info("Triangle intersect",t,p,S),ht.polygon(t,p,S)},o}f(lf,"flippedTriangle");async function hf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??12,l=Math.max(a.width+n*2,t.width??0,90),c=a.height+n*2,h=Math.max(Math.min(c*.16,14),8),u=Math.max(c+h,t.height??0),p=u-h,d=Math.max(l*.38,28),m=-u/2,y=[{x:-l/2,y:m},{x:-l/2+d,y:m},{x:-l/2+d,y:m+h},{x:l/2,y:m+h},{x:l/2,y:u/2},{x:-l/2,y:u/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(w=>`L${w.x},${w.y}`),"Z"].join(" "),{cssStyles:C}=t;let k;if(t.look==="handDrawn"){const B=ft.svg(s).path(x,dt(t,{}));k=s.insert(()=>B,":first-child").attr("class","basic label-container"),C&&k.attr("style",C)}else k=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,k):Ct(t,k,{width:l,height:u});const S=m+h+p/2;return o.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return ht.polygon(t,y,w)},s}f(hf,"folder");function cf(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=xt(t);t.label="";const o=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,u=-1*c/2,p=ft.svg(o),d=dt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const m=p.rectangle(h,u,l,c,d),y=o.insert(()=>m,":first-child");n&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",n),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ct(t,y);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return ht.rect(t,C)},o}f(cf,"forkJoin");async function uf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=15,a=10,o=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-o*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,c.height))+n*2,p=u/2,{cssStyles:d}=t,m=ft.svg(l),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:-u/2},{x:h/2-p,y:-u/2},...ir(-h/2+p,0,p,50,90,270),{x:h/2-p,y:u/2},{x:-h/2,y:u/2}],C=jt(x),k=m.path(C,y),S=l.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",d),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),Ct(t,S),t.intersect=function(w){return W.info("Pill intersect",t,{radius:p,point:w}),ht.polygon(t,x,w)},l}f(uf,"halfRoundedRectangle");var Ik=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function df(e,t){const{labelStyles:r,nodeStyles:i}=xt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,o=70,n=32,l=t.look==="neo"?o:a,c=t.look==="neo"?n:a;if(t.width||t.height){const S=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:u}=await St(e,t,wt(t)),p=(t!=null&&t.height?t==null?void 0:t.height:u.height)+l,d=p/s,m=(t!=null&&t.width?t==null?void 0:t.width:u.width)+2*d+c,y=[{x:d,y:0},{x:m-d,y:0},{x:m,y:-p/2},{x:m-d,y:-p},{x:d,y:-p},{x:0,y:-p/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const k=ft.svg(h),S=dt(t,{}),w=Ik(0,0,m,p,d),B=k.path(w,S);x=h.insert(()=>B,":first-child").attr("transform",`translate(${-m/2}, ${p/2})`),C&&x.attr("style",C)}else x=hr(h,m,p,y);return i&&x.attr("style",i),t.width=m,t.height=p,Ct(t,x),t.intersect=function(k){return ht.polygon(t,y,k)},h}f(df,"hexagon");async function pf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await St(e,t,wt(t)),a=Math.max(30,(t==null?void 0:t.width)??0),o=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=ft.svg(s),c=dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],u=jt(h),p=l.path(u,c),d=s.insert(()=>p,":first-child");return d.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&d.selectChildren("path").attr("style",i),d.attr("transform",`translate(${-a/2}, ${-o/2})`),Ct(t,d),t.intersect=function(m){return W.info("Pill intersect",t,{points:h}),ht.polygon(t,h,m)},s}f(pf,"hourglass");async function ff(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),p=t.pos==="t",d=n,m=n,{nodeBorder:y}=r,{stylesMap:x}=qi(t),C=-m/2,k=-d/2,S=t.label?8:0,w=ft.svg(c),B=dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(B.roughness=0,B.fillStyle="solid");const L=w.rectangle(C,k,m,d,B),E=Math.max(m,h.width),F=d+h.height+S,X=w.rectangle(-E/2,-F/2,E,F,{...B,fill:"transparent",stroke:"none"}),N=c.insert(()=>L,":first-child"),z=c.insert(()=>X);if(t.icon){const at=c.append("g");at.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const j=at.node().getBBox(),A=j.width,O=j.height,v=j.x,R=j.y;at.attr("transform",`translate(${-A/2-v},${p?h.height/2+S/2-O/2-R:-h.height/2-S/2-O/2-R})`),at.attr("style",`color: ${x.get("stroke")??y};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-F/2:F/2-h.height})`),N.attr("transform",`translate(0,${p?h.height/2+S/2:-h.height/2-S/2})`),Ct(t,z),t.intersect=function(at){if(W.info("iconSquare intersect",t,at),!t.label)return ht.rect(t,at);const j=t.x??0,A=t.y??0,O=t.height??0;let v=[];return p?v=[{x:j-h.width/2,y:A-O/2},{x:j+h.width/2,y:A-O/2},{x:j+h.width/2,y:A-O/2+h.height+S},{x:j+m/2,y:A-O/2+h.height+S},{x:j+m/2,y:A+O/2},{x:j-m/2,y:A+O/2},{x:j-m/2,y:A-O/2+h.height+S},{x:j-h.width/2,y:A-O/2+h.height+S}]:v=[{x:j-m/2,y:A-O/2},{x:j+m/2,y:A-O/2},{x:j+m/2,y:A-O/2+d},{x:j+h.width/2,y:A-O/2+d},{x:j+h.width/2/2,y:A+O/2},{x:j-h.width/2,y:A+O/2},{x:j-h.width/2,y:A-O/2+d},{x:j-m/2,y:A-O/2+d}],ht.polygon(t,v,at)},c}f(ff,"icon");async function gf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:u}=await St(e,t,"icon-shape default"),p=20,d=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=qi(t),k=ft.svg(c),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=C.get("fill");S.stroke=w??x;const B=c.append("g");t.icon&&B.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const L=B.node().getBBox(),E=L.width,F=L.height,X=L.x,N=L.y,z=Math.max(E,F)*Math.SQRT2+p*2,at=k.circle(0,0,z,S),j=Math.max(z,h.width),A=z+h.height+d,O=k.rectangle(-j/2,-A/2,j,A,{...S,fill:"transparent",stroke:"none"}),v=c.insert(()=>at,":first-child"),R=c.insert(()=>O);return B.attr("transform",`translate(${-E/2-X},${m?h.height/2+d/2-F/2-N:-h.height/2-d/2-F/2-N})`),B.attr("style",`color: ${C.get("stroke")??y};`),u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${m?-A/2:A/2-h.height})`),v.attr("transform",`translate(0,${m?h.height/2+d/2:-h.height/2-d/2})`),Ct(t,R),t.intersect=function(P){return W.info("iconSquare intersect",t,P),ht.rect(t,P)},c}f(gf,"iconCircle");async function mf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=qi(t),S=-y/2,w=-m/2,B=t.label?8:0,L=ft.svg(c),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??C;const X=L.path(He(S,w,y,m,5),E),N=Math.max(y,h.width),z=m+h.height+B,at=L.rectangle(-N/2,-z/2,N,z,{...E,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child").attr("class","icon-shape2"),A=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=O.node().getBBox(),R=v.width,P=v.height,H=v.x,Z=v.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+B/2-P/2-Z:-h.height/2-B/2-P/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-z/2:z/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+B/2:-h.height/2-B/2})`),Ct(t,A),t.intersect=function(O){if(W.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const v=t.x??0,R=t.y??0,P=t.height??0;let H=[];return d?H=[{x:v-h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2+h.height+B},{x:v+y/2,y:R-P/2+h.height+B},{x:v+y/2,y:R+P/2},{x:v-y/2,y:R+P/2},{x:v-y/2,y:R-P/2+h.height+B},{x:v-h.width/2,y:R-P/2+h.height+B}]:H=[{x:v-y/2,y:R-P/2},{x:v+y/2,y:R-P/2},{x:v+y/2,y:R-P/2+m},{x:v+h.width/2,y:R-P/2+m},{x:v+h.width/2/2,y:R+P/2},{x:v-h.width/2,y:R+P/2},{x:v-h.width/2,y:R-P/2+m},{x:v-y/2,y:R-P/2+m}],ht.polygon(t,H,O)},c}f(mf,"iconRounded");async function yf(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=xt(t);t.labelStyle=s;const a=t.assetHeight??48,o=t.assetWidth??48,n=Math.max(a,o),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:u,label:p}=await St(e,t,"icon-shape default"),d=t.pos==="t",m=n+u*2,y=n+u*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:k}=qi(t),S=-y/2,w=-m/2,B=t.label?8:0,L=ft.svg(c),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const F=k.get("fill");E.stroke=F??C;const X=L.path(He(S,w,y,m,.1),E),N=Math.max(y,h.width),z=m+h.height+B,at=L.rectangle(-N/2,-z/2,N,z,{...E,fill:"transparent",stroke:"none"}),j=c.insert(()=>X,":first-child"),A=c.insert(()=>at);if(t.icon){const O=c.append("g");O.html(`<g>${await Fs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const v=O.node().getBBox(),R=v.width,P=v.height,H=v.x,Z=v.y;O.attr("transform",`translate(${-R/2-H},${d?h.height/2+B/2-P/2-Z:-h.height/2-B/2-P/2-Z})`),O.attr("style",`color: ${k.get("stroke")??x};`)}return p.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${d?-z/2:z/2-h.height})`),j.attr("transform",`translate(0,${d?h.height/2+B/2:-h.height/2-B/2})`),Ct(t,A),t.intersect=function(O){if(W.info("iconSquare intersect",t,O),!t.label)return ht.rect(t,O);const v=t.x??0,R=t.y??0,P=t.height??0;let H=[];return d?H=[{x:v-h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2},{x:v+h.width/2,y:R-P/2+h.height+B},{x:v+y/2,y:R-P/2+h.height+B},{x:v+y/2,y:R+P/2},{x:v-y/2,y:R+P/2},{x:v-y/2,y:R-P/2+h.height+B},{x:v-h.width/2,y:R-P/2+h.height+B}]:H=[{x:v-y/2,y:R-P/2},{x:v+y/2,y:R-P/2},{x:v+y/2,y:R-P/2+m},{x:v+h.width/2,y:R-P/2+m},{x:v+h.width/2/2,y:R+P/2},{x:v-h.width/2,y:R+P/2},{x:v-h.width/2,y:R-P/2+m},{x:v-y/2,y:R-P/2+m}],ht.polygon(t,H,O)},c}f(yf,"iconSquare");async function Cf(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:o}=xt(t);t.labelStyle=o;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(c,n??0);const{shapeSvg:u,bbox:p,label:d}=await St(e,t,"image-shape default"),m=t.pos==="t",y=-c/2,x=-h/2,C=t.label?8:0,k=ft.svg(u),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=k.rectangle(y,x,c,h,S),B=Math.max(c,p.width),L=h+p.height+C,E=k.rectangle(-B/2,-L/2,B,L,{...S,fill:"none",stroke:"none"}),F=u.insert(()=>w,":first-child"),X=u.insert(()=>E);if(t.img){const N=u.append("image");N.attr("href",t.img),N.attr("width",c),N.attr("height",h),N.attr("preserveAspectRatio","none"),N.attr("transform",`translate(${-c/2},${m?L/2-h:-L/2})`)}return d.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${m?-h/2-p.height/2-C/2:h/2-p.height/2+C/2})`),F.attr("transform",`translate(0,${m?p.height/2+C/2:-p.height/2-C/2})`),Ct(t,X),t.intersect=function(N){if(W.info("iconSquare intersect",t,N),!t.label)return ht.rect(t,N);const z=t.x??0,at=t.y??0,j=t.height??0;let A=[];return m?A=[{x:z-p.width/2,y:at-j/2},{x:z+p.width/2,y:at-j/2},{x:z+p.width/2,y:at-j/2+p.height+C},{x:z+c/2,y:at-j/2+p.height+C},{x:z+c/2,y:at+j/2},{x:z-c/2,y:at+j/2},{x:z-c/2,y:at-j/2+p.height+C},{x:z-p.width/2,y:at-j/2+p.height+C}]:A=[{x:z-c/2,y:at-j/2},{x:z+c/2,y:at-j/2},{x:z+c/2,y:at-j/2+h},{x:z+p.width/2,y:at-j/2+h},{x:z+p.width/2/2,y:at+j/2},{x:z-p.width/2,y:at+j/2},{x:z-p.width/2,y:at-j/2+h},{x:z-c/2,y:at-j/2+h}],ht.polygon(t,A,N)},u}f(Cf,"imageSquare");async function xf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a*2,t.height??0),h=Math.max(l.width+o*2,(t.width??0)-c),u=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(xf,"inv_trapezoid");async function bf(e,t){const{shapeSvg:r,bbox:i,label:s}=await St(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ct(t,a),t.intersect=function(l){return ht.rect(t,l)},r}f(bf,"labelRect");async function kf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(kf,"lean_left");async function Tf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=s,o=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.height+a,t.height??0),h=Math.max(l.width+o,(t.width??0)-c),u=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:d}=t;if(t.look==="handDrawn"){const m=ft.svg(n),y=dt(t,{}),x=jt(u),C=m.path(x,y);p=n.insert(()=>C,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),d&&p.attr("style",d)}else p=hr(n,h,c,u);return i&&p.attr("style",i),t.width=h,t.height=c,Ct(t,p),t.intersect=function(m){return ht.polygon(t,u,m)},n}f(Tf,"lean_right");function Sf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",wt(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:o,y:0},{x:0,y:n+l/2},{x:o-2*l,y:n+l/2},{x:0,y:2*n},{x:o,y:n-l/2},{x:2*l,y:n-l/2}],h=ft.svg(s),u=dt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const p=jt(c),d=h.path(p,u),m=s.insert(()=>d,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${o/2},${-n})`),Ct(t,m),t.intersect=function(y){return W.info("lightningBolt intersect",t,y),ht.polygon(t,c,y)},s}f(Sf,"lightningBolt");var Rk=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),qk=f((e,t,r,i,s,a,o)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+o}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Nk=f((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Lc=10,Fc=10;async function wf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Fc&&(t.width=Fc);const S=C/2/(2.5+C/50);t.height=(t.height??0)-o-S*3,t.height<Lc&&(t.height=Lc)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=h/2,p=u/(2.5+h/50),d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+p+o*2,m=d*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=ft.svg(n),k=qk(0,0,h,d,u,p,m),S=Nk(0,p,h,d,u,p),w=dt(t,{}),B=C.path(k,w),L=C.path(S,w);n.insert(()=>L,":first-child").attr("class","line"),y=n.insert(()=>B,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Rk(0,0,h,d,u,p,m);y=n.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return y.attr("label-offset-y",p),y.attr("transform",`translate(${-h/2}, ${-(d/2+p)})`),Ct(t,y),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+p-(l.y-(l.top??0))})`),t.intersect=function(C){const k=ht.rect(t,C),S=k.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(k.y-(t.y??0))>(t.height??0)/2-p)){let w=p*p*(1-S*S/(u*u));w>0&&(w=Math.sqrt(w)),w=p-w,C.y-(t.y??0)>0&&(w=-w),k.y+=w}return k},n}f(wf,"linedCylinder");async function _f(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-o*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(o??0)*2,p=t.look==="neo"?u/4:u/8,d=u+p,{cssStyles:m}=t,y=ft.svg(n),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-h/2-h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:d/2},...Dr(-h/2-h/2*.1,d/2,h/2+h/2*.1,d/2,p,.8),{x:h/2+h/2*.1,y:-d/2},{x:-h/2-h/2*.1,y:-d/2},{x:-h/2,y:-d/2},{x:-h/2,y:d/2*1.1},{x:-h/2,y:-d/2}],k=y.polygon(C.map(w=>[w.x,w.y]),x),S=n.insert(()=>k,":first-child");return S.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-u/2+(t.padding??0)-p/2-(l.y-(l.top??0))})`),Ct(t,S),t.intersect=function(w){return ht.polygon(t,C,w)},n}f(_f,"linedWaveEdgedRect");async function Bf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,wt(t)),u=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+2*n,p=(t!=null&&t.height?t==null?void 0:t.height:c.height)+o*2+2*n,d=u-2*n,m=p-2*n,y=-d/2,x=-m/2,{cssStyles:C}=t,k=ft.svg(l),S=dt(t,{}),w=[{x:y-n,y:x+n},{x:y-n,y:x+m+n},{x:y+d-n,y:x+m+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x+m-n},{x:y+d+n,y:x+m-n},{x:y+d+n,y:x-n},{x:y+n,y:x-n},{x:y+n,y:x},{x:y,y:x},{x:y,y:x+n}],B=[{x:y,y:x+n},{x:y+d-n,y:x+n},{x:y+d-n,y:x+m},{x:y+d,y:x+m},{x:y+d,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=jt(w);let E=k.path(L,S);const F=jt(B);let X=k.path(F,S);t.look!=="handDrawn"&&(E=Sn(E),X=Sn(X));const N=l.insert("g",":first-child");return N.insert(()=>E),N.insert(()=>X),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),Ct(t,N),t.intersect=function(z){return ht.polygon(t,w,z)},l}f(Bf,"multiRect");async function vf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const u=Math.max(a.width,(t==null?void 0:t.width)??0)+l*2,p=Math.max(a.height,(t==null?void 0:t.height)??0)+c*3,d=t.look==="neo"?p/4:p/8,m=p+(h?d/2:-d/2),y=-u/2,x=-m/2,C=10,{cssStyles:k}=t,S=Dr(y-C,x+m+C,y+u-C,x+m+C,d,.8),w=S==null?void 0:S[S.length-1],B=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...S,{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:w.y-2*C},{x:y+u+C,y:w.y-2*C},{x:y+u+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],L=[{x:y,y:x+C},{x:y+u-C,y:x+C},{x:y+u-C,y:w.y-C},{x:y+u,y:w.y-C},{x:y+u,y:x},{x:y,y:x}],E=ft.svg(s),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=jt(B),N=E.path(X,F),z=jt(L),at=E.path(z,F),j=s.insert(()=>N,":first-child");return j.insert(()=>at),j.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&j.selectAll("path").attr("style",i),j.attr("transform",`translate(0,${-d/2})`),o.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-d/2-(a.y-(a.top??0))})`),Ct(t,j),t.intersect=function(A){return ht.polygon(t,B,A)},s}f(vf,"multiWaveEdgedRectangle");async function Lf(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i,t.useHtmlLabels||be(te())||(t.centerLabel=!0);const{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),u=-c/2,p=-h/2,{cssStyles:d}=t,m=ft.svg(o),y=dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(u,p,c,h,y),C=o.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),d&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",d),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,C),t.intersect=function(k){return ht.rect(t,k)},o}f(Lf,"note");var zk=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Ff(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=a.width+(t.padding??0),n=a.height+(t.padding??0),l=o+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let u;const{cssStyles:p}=t;if(t.look==="handDrawn"){const d=ft.svg(s),m=dt(t,{}),y=zk(0,0,l),x=d.path(y,m);u=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),p&&u.attr("style",p)}else u=hr(s,l,l,h),u.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&u.attr("style",i),Ct(t,u),t.calcIntersect=function(d,m){const y=d.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}],C=ht.polygon(d,x,m);return{x:C.x-.5,y:C.y-.5}},t.intersect=function(d){return this.calcIntersect(t,d)},s}f(Ff,"question");async function Ef(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,o=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=l.width+(t.look==="neo"?a*2:a),u=Math.max(l.height+(t.look==="neo"?o*2:o),t.height??0),p=u/4,m=-Math.max(h,(t.width??0)-p)/2,y=-u/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:k}=t,S=ft.svg(n),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const B=jt(C),L=S.path(B,w),E=n.insert(()=>L,":first-child");return E.attr("class","basic label-container outer-path"),k&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",k),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),Ct(t,E),t.intersect=function(F){return ht.polygon(t,C,F)},n}f(Ef,"rect_left_inv_arrow");async function Af(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=a.insert("g"),n=a.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Fr(n,c,t.labelStyle,!0,!0);let u={width:0,height:0};if(be(zt())){const F=h.children[0],X=Pt(h);u=F.getBoundingClientRect(),X.attr("width",u.width),X.attr("height",u.height)}W.info("Text 2",l);const p=l||[],d=h.getBBox(),m=await Fr(n,Array.isArray(p)?p.join("<br/>"):p,t.labelStyle,!0,!0),y=m.children[0],x=Pt(m);u=y.getBoundingClientRect(),x.attr("width",u.width),x.attr("height",u.height);const C=(t.padding||0)/2;Pt(m).attr("transform","translate( "+(u.width>d.width?0:(d.width-u.width)/2)+", "+(d.height+C+5)+")"),Pt(h).attr("transform","translate( "+(u.width<d.width?0:-(d.width-u.width)/2)+", 0)"),u=n.node().getBBox(),n.attr("transform","translate("+-u.width/2+", "+(-u.height/2-C+3)+")");const k=u.width+(t.padding||0),S=u.height+(t.padding||0),w=-u.width/2-C,B=-u.height/2-C;let L,E;if(t.look==="handDrawn"){const F=ft.svg(a),X=dt(t,{}),N=F.path(He(w,B,k,S,t.rx||0),X),z=F.line(-u.width/2-C,-u.height/2-C+d.height+C,u.width/2+C,-u.height/2-C+d.height+C,X);E=a.insert(()=>(W.debug("Rough node insert CXC",N),z),":first-child"),L=a.insert(()=>(W.debug("Rough node insert CXC",N),N),":first-child")}else L=o.insert("rect",":first-child"),E=o.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-u.width/2-C).attr("y",-u.height/2-C).attr("width",u.width+(t.padding||0)).attr("height",u.height+(t.padding||0)),E.attr("class","divider").attr("x1",-u.width/2-C).attr("x2",u.width/2+C).attr("y1",-u.height/2-C+d.height+C).attr("y2",-u.height/2-C+d.height+C);return Ct(t,L),t.intersect=function(F){return ht.rect(t,F)},a}f(Af,"rectWithTitle");async function Mf(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ni(e,t,s)}f(Mf,"roundedRect");var Rr=8;async function Of(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:o,bbox:n,label:l}=await St(e,t,wt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?Rr:Rr*2),h=((t==null?void 0:t.height)??n.height)+a*2,u=c-Rr,p=h,d=Rr-c/2,m=-h/2,{cssStyles:y}=t,x=ft.svg(o),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=[{x:d,y:m},{x:d+u,y:m},{x:d+u,y:m+p},{x:d-Rr,y:m+p},{x:d-Rr,y:m},{x:d,y:m},{x:d,y:m+p}],S=x.polygon(k.map(B=>[B.x,B.y]),C),w=o.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path").attr("style",oe(y)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${Rr/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),Ct(t,w),t.intersect=function(B){return ht.rect(t,B)},o}f(Of,"shadedProcess");async function $f(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-o*2,10));const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=((t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2)*1.5,p=h,d=u/1.5,m=-p/2,y=-d/2,{cssStyles:x}=t,C=ft.svg(n),k=dt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const S=[{x:m,y},{x:m,y:y+d},{x:m+p,y:y+d},{x:m+p,y:y-d/2}],w=jt(S),B=C.path(w,k),L=n.insert(()=>B,":first-child");return L.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${d/4})`),c.attr("transform",`translate(${-p/2+(t.padding??0)-(l.x-(l.left??0))}, ${-d/4+(t.padding??0)-(l.y-(l.top??0))})`),Ct(t,L),t.intersect=function(E){return ht.polygon(t,S,E)},n}f($f,"slopedRect");async function Df(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ni(e,t,a)}f(Df,"squareRect");async function Pf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?20:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=l.height+(t.look==="neo"?o*2:o),h=l.width+c/4+(t.look==="neo"?a*2:a),u=c/2,{cssStyles:p}=t,d=ft.svg(n),m=dt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+u,y:-c/2},{x:h/2-u,y:-c/2},...ir(-h/2+u,0,u,50,90,270),{x:h/2-u,y:c/2},...ir(h/2-u,0,u,50,270,450)],x=jt(y),C=d.path(x,m),k=n.insert(()=>C,":first-child");return k.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ct(t,k),t.intersect=function(S){return ht.polygon(t,y,S)},n}f(Pf,"stadium");async function If(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ni(e,t,r)}f(If,"state");function Rf(e,t,{config:{themeVariables:r}}){var k,S;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:o,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),u=ft.svg(h),p=dt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const d=u.circle(0,0,t.width,{...p,stroke:o,strokeWidth:2}),m=n??l,y=(t.width??0)*5/14,x=u.circle(0,0,y,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=h.insert(()=>d,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((S=(k=e.node())==null?void 0:k.ownerSVGElement)==null?void 0:S.id)??"",B=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${B})`)}return Ct(t,C),t.intersect=function(w){return ht.circle(t,(t.width??0)/2,w)},h}f(Rf,"stateEnd");function qf(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let o;if(t.look==="handDrawn"){const h=ft.svg(a).circle(0,0,t.width,z0(i));o=a.insert(()=>h),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else o=a.insert("circle",":first-child"),o.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";o.attr("style",`filter:url(#${h})`)}return Ct(t,o),t.intersect=function(c){return ht.circle(t,(t.width??7)/2,c)},a}f(qf,"stateStart");var hi=8;async function Nf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,o=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=Math.max(l.width+2*hi+a,t.width??0),h=Math.max(l.height+o,t.height??0),u=c-2*hi,p=h,d=-c/2,m=-h/2,y=[{x:0,y:0},{x:u,y:0},{x:u,y:-p},{x:0,y:-p},{x:0,y:0},{x:-8,y:0},{x:u+8,y:0},{x:u+8,y:-p},{x:-8,y:-p},{x:-8,y:0}];if(t.look==="handDrawn"){const x=ft.svg(n),C=dt(t,{}),k=x.rectangle(d,m,u+16,p,C),S=x.line(d+hi,m,d+hi,m+p,C),w=x.line(d+hi+u,m,d+hi+u,m+p,C);n.insert(()=>S,":first-child"),n.insert(()=>w,":first-child");const B=n.insert(()=>k,":first-child"),{cssStyles:L}=t;B.attr("class","basic label-container").attr("style",oe(L)),Ct(t,B)}else{const x=hr(n,u,p,y);i&&x.attr("style",i),Ct(t,x)}return t.intersect=function(x){return ht.polygon(t,y,x)},n}f(Nf,"subroutine");var _o=.2;async function zf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,o=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-o*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-_o*(t.height+o*2),10));const{shapeSvg:n,bbox:l}=await St(e,t,wt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+o*2,h=_o*c,u=_o*c,d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+h-h,m=c,y=-d/2,x=-m/2,{cssStyles:C}=t,k=ft.svg(n),S=dt(t,{}),w=[{x:y-h/2,y:x},{x:y+d+h/2,y:x},{x:y+d+h/2,y:x+m},{x:y-h/2,y:x+m}],B=[{x:y+d-h/2,y:x+m},{x:y+d+h/2,y:x+m},{x:y+d+h/2,y:x+m-u}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const L=jt(w),E=k.path(L,S),F=jt(B),X=k.path(F,{...S,fillStyle:"solid"}),N=n.insert(()=>X,":first-child");return N.insert(()=>E,":first-child"),N.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),Ct(t,N),t.intersect=function(z){return ht.polygon(t,w,z)},n}f(zf,"taggedRect");async function Wf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:o}=await St(e,t,wt(t)),n=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,u=.2*l,p=l+c,{cssStyles:d}=t,m=ft.svg(s),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:p/2},...Dr(-n/2-n/2*.1,p/2,n/2+n/2*.1,p/2,c,.8),{x:n/2+n/2*.1,y:-p/2},{x:-n/2-n/2*.1,y:-p/2}],C=-n/2+n/2*.1,k=-p/2-u*.4,S=[{x:C+n-h,y:(k+l)*1.3},{x:C+n,y:k+l-u},{x:C+n,y:(k+l)*.9},...Dr(C+n,(k+l)*1.25,C+n-h,(k+l)*1.3,-l*.02,.5)],w=jt(x),B=m.path(w,y),L=jt(S),E=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>E,":first-child");return F.insert(()=>B,":first-child"),F.attr("class","basic label-container outer-path"),d&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",d),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-c/2})`),o.attr("transform",`translate(${-n/2+(t.padding??0)-(a.x-(a.left??0))},${-l/2+(t.padding??0)-c/2-(a.y-(a.top??0))})`),Ct(t,F),t.intersect=function(X){return ht.polygon(t,x,X)},s}f(Wf,"taggedWaveEdgedRectangle");async function Hf(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await St(e,t,wt(t)),o=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-o/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",o).attr("height",n),Ct(t,h),t.intersect=function(u){return ht.rect(t,u)},s}f(Hf,"text");var Wk=f((e,t,r,i,s,a)=>`M${e},${t}
|
|
230
|
+
`);return Bu(i)}p(_u,"preprocessMarkdown");function vu(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}p(vu,"nonMarkdownToLines");function Lu(e,t={}){const r=_u(e,t),i=Xt.lexer(r),s=[[]];let a=0;function n(o,c="normal"){o.type==="text"?o.text.split(`
|
|
231
|
+
`).forEach((l,d)=>{d!==0&&(a++,s.push([])),l.split(" ").forEach(u=>{u=u.replace(/'/g,"'"),u&&s[a].push({content:u,type:c})})}):o.type==="strong"||o.type==="em"?o.tokens.forEach(h=>{n(h,o.type)}):o.type==="html"&&s[a].push({content:o.text,type:"normal"})}return p(n,"processNode"),i.forEach(o=>{var c;o.type==="paragraph"?(c=o.tokens)==null||c.forEach(h=>{n(h)}):o.type==="html"?s[a].push({content:o.text,type:"normal"}):s[a].push({content:o.raw,type:"normal"})}),s}p(Lu,"markdownToLines");function Fu(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}p(Fu,"nonMarkdownToHTML");function Au(e,{markdownAutoWrap:t}={}){const r=Xt.lexer(e);function i(s){var a,n,o;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(a=s.tokens)==null?void 0:a.map(i).join("")}</strong>`:s.type==="em"?`<em>${(n=s.tokens)==null?void 0:n.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(o=s.tokens)==null?void 0:o.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(J.warn(`Unsupported markdown: ${s.type}`),s.raw)}return p(i,"output"),r.map(i).join("")}p(Au,"markdownToHTML");var Rx=(function(e){var t=function(){},r=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function i(){var h=this;h.reads=[],h.writes=[],h.raf=r.bind(e)}p(i,"FastDom"),i.prototype={constructor:i,runTasks:p(function(h){for(var l;l=h.shift();)l()},"runTasks"),measure:p(function(h,l){var d=l?h.bind(l):h;return this.reads.push(d),s(this),d},"measure"),mutate:p(function(h,l){var d=l?h.bind(l):h;return this.writes.push(d),s(this),d},"mutate"),clear:p(function(h){return n(this.reads,h)||n(this.writes,h)},"clear"),extend:p(function(h){if(typeof h!="object")throw new Error("expected object");var l=Object.create(this);return o(l,h),l.fastdom=this,l.initialize&&l.initialize(),l},"extend"),catch:null};function s(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}p(s,"scheduleFlush");function a(h){var l=h.writes,d=h.reads,u;try{t("flushing reads",d.length),h.runTasks(d),t("flushing writes",l.length),h.runTasks(l)}catch(g){u=g}if(h.scheduled=!1,(d.length||l.length)&&s(h),u)if(t("task errored",u.message),h.catch)h.catch(u);else throw u}p(a,"flush");function n(h,l){var d=h.indexOf(l);return!!~d&&!!h.splice(d,1)}p(n,"remove");function o(h,l){for(var d in l)l.hasOwnProperty(d)&&(h[d]=l[d])}p(o,"mixin");var c=e.fastdom=e.fastdom||new i;return c})(typeof window<"u"?window:globalThis),Eu={initialize:p(function(){this._tasks=new Map},"initialize"),mutate:p(function(e,t){return tn(this,"mutate",e,t)},"mutate"),measure:p(function(e,t){return tn(this,"measure",e,t)},"measure"),clear:p(function(e){var t=this._tasks,r=t.get(e);this.fastdom.clear(r),t.delete(e)},"clear")};function tn(e,t,r,i){var s=e._tasks,a=e.fastdom,n,o=new Promise(function(c,h){n=a[t](function(){s.delete(o);try{c(i?r.call(i):r())}catch(l){h(l)}},i)});return s.set(o,n),o}p(tn,"create");var{initialize:dw,mutate:uw,measure:gw,clear:pw}=Eu,qx=Eu,Nx=Rx.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(qx),Yr=Nx;function Mu(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}p(Mu,"splitTextToChars");function Ou(e,t){const r=Mu(t.content);return dl(e,[],r,t.type)}p(Ou,"splitWordToFitWidth");function dl(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...a]=r,n=[...t,s];return e([{content:n.join(""),type:i}])?dl(e,n,a,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}p(dl,"splitWordToFitWidthRecursion");function $u(e,t){if(e.some(({content:r})=>r.includes(`
|
|
232
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return aa(e,t)}p($u,"splitLineToFitWidth");function aa(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const a=e.shift()??{content:" ",type:"normal"},n=[...i];if(s!==""&&n.push({content:s,type:"normal"}),n.push(a),t(n))return aa(e,t,r,n);if(i.length>0)r.push(i),e.unshift(a);else if(a.content){const[o,c]=Ou(t,a);r.push([o]),c.content&&e.unshift(c)}return aa(e,t,r)}p(aa,"splitLineToFitWidthRecursion");function en(e,t){t&&e.attr("style",t)}p(en,"applyStyle");var ic=16384;async function Du(e,t,r,i,s=!1,a=Qt(),n=0){const o=e.append("foreignObject");o.attr("width",`${Math.min(10*r,ic)}px`),o.attr("height",`${Math.min(10*r,ic)}px`);const c=o.append("xhtml:div"),h=ls(t.label)?await qd(t.label.replace(us.lineBreakRegex,`
|
|
233
|
+
`),a):qe(t.label,a),l=t.isNode?"nodeLabel":"edgeLabel",d=c.append("span");d.html(h),en(d,t.labelStyle),d.attr("class",`${l} ${i}`),en(c,t.labelStyle),c.style("display","table-cell"),c.style("white-space","nowrap"),c.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(c.style("max-width",r+"px"),c.style("text-align","center")),c.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&c.attr("class","labelBkg");const u=await Yr.measure(()=>c.node().getBoundingClientRect());return u.width===r?(c.style("display","table"),c.style("white-space","break-spaces"),c.style("width",r+"px")):u.width<n&&(c.style("display","table"),c.style("width",n+"px"),c.style("text-align","center")),o.node()}p(Du,"addHtmlSpan");function ka(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}p(ka,"createTspan");function Iu(e,t,r){const i=e.append("text"),s=ka(i,1,t);Sa(s,r);const a=s.node().getComputedTextLength();return i.remove(),a}p(Iu,"computeWidthOfText");function Wx(e,t,r){var n;const i=e.append("text"),s=ka(i,1,t);Sa(s,[{content:r,type:"normal"}]);const a=(n=s.node())==null?void 0:n.getBoundingClientRect();return a&&i.remove(),a}p(Wx,"computeDimensionOfText");function Pu(e,t,r,i=!1,s=!1){const n=t.append("g"),o=n.insert("rect").attr("class","background").attr("style","stroke: none"),c=n.append("text").attr("y","-10.1");s&&c.attr("text-anchor","middle");let h=0;for(const l of r){const d=p(g=>Iu(n,1.1,g)<=e,"checkWidth"),u=d(l)?[l]:$u(l,d);for(const g of u){const m=ka(c,h,1.1,s);Sa(m,g),h++}}if(i){const l=c.node().getBBox(),d=2;return o.attr("x",l.x-d).attr("y",l.y-d).attr("width",l.width+2*d).attr("height",l.height+2*d),n.node()}else return c.node()}p(Pu,"createFormattedText");function rn(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}p(rn,"decodeHTMLEntities");function Sa(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(rn(r.content)):s.text(" "+rn(r.content))})}p(Sa,"updateTextContentAndStyles");async function Ru(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,a,n)=>(r.push((async()=>{const o=`${a}:${n}`;return await Kd(o)?await Ei(o,void 0,{class:"label-icon"}):`<i class='${qe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}p(Ru,"replaceIconSubstring");var Oe=p(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:a=!0,markdown:n=!0,isNode:o=!0,width:c=200,minWidth:h=0,addSvgBackground:l=!1}={},d)=>{if(J.debug("XYZ createText",t,r,i,s,a,o,"addSvgBackground: ",l),a){const u=n?Au(t,d):Fu(t),g=await Ru(Mr(u),d),m=t.replace(/\\\\/g,"\\"),y={isNode:o,label:ls(t)?m:g,labelStyle:r.replace("fill:","color:")};return await Du(e,y,c,s,l,d,h)}else{const u=Mr(t.replace(/<br\s*\/?>/g,"<br/>")),g=n?Lu(u.replace("<br>","<br/>"),d):vu(u),m=Pu(c,e,g,t?l:!1,!o);if(o){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(m).attr("style",y)}else{const y=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Pt(m).select("rect").attr("style",y.replace(/background:/g,"fill:"));const x=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Pt(m).select("text").attr("style",x)}return i?Pt(m).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Pt(m).selectAll("tspan.text-outer-tspan").classed("row",!0),m}},"createText"),zx=new Set(["redux-color","redux-dark-color"]),Hx=12,Yx=64,ul=p(e=>Array.isArray(e)&&e.length>0,"hasPalette"),Ux=p((e,t)=>e!=null&&zx.has(e)&&ul(t),"isColorTheme"),jx=/^[\w-]+$/,fw=p(e=>{const t=typeof e=="string"||typeof e=="number"?String(e):"";return jx.test(t)?t:"classic"},"safeLook"),qu=p(e=>ul(e)?e.length:0,"paletteSlotCount"),mw=p((e,t)=>ul(t)?qu(t):typeof e=="number"&&Number.isInteger(e)&&e>0&&e<=Yx?e:Hx,"colorSlotCount"),We=p((e,t,r,i)=>{if(t===void 0||!Ux(r,i))return;const s=t%qu(i);e.attr("data-color-id",`color-${s}`)},"stampColorSlot");function wo(e,t,r){if(e&&e.length){const[i,s]=t,a=Math.PI/180*r,n=Math.cos(a),o=Math.sin(a);for(const c of e){const[h,l]=c;c[0]=(h-i)*n-(l-s)*o+i,c[1]=(h-i)*o+(l-s)*n+s}}}function Gx(e,t){return e[0]===t[0]&&e[1]===t[1]}function Xx(e,t,r,i=1){const s=r,a=Math.max(t,.1),n=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,o=[0,0];if(s)for(const h of n)wo(h,o,s);const c=(function(h,l,d){const u=[];for(const b of h){const k=[...b];Gx(k[0],k[k.length-1])||k.push([k[0][0],k[0][1]]),k.length>2&&u.push(k)}const g=[];l=Math.max(l,.1);const m=[];for(const b of u)for(let k=0;k<b.length-1;k++){const w=b[k],_=b[k+1];if(w[1]!==_[1]){const L=Math.min(w[1],_[1]);m.push({ymin:L,ymax:Math.max(w[1],_[1]),x:L===w[1]?w[0]:_[0],islope:(_[0]-w[0])/(_[1]-w[1])})}}if(m.sort(((b,k)=>b.ymin<k.ymin?-1:b.ymin>k.ymin?1:b.x<k.x?-1:b.x>k.x?1:b.ymax===k.ymax?0:(b.ymax-k.ymax)/Math.abs(b.ymax-k.ymax))),!m.length)return g;let y=[],x=m[0].ymin,C=0;for(;y.length||m.length;){if(m.length){let b=-1;for(let k=0;k<m.length&&!(m[k].ymin>x);k++)b=k;m.splice(0,b+1).forEach((k=>{y.push({s:x,edge:k})}))}if(y=y.filter((b=>!(b.edge.ymax<=x))),y.sort(((b,k)=>b.edge.x===k.edge.x?0:(b.edge.x-k.edge.x)/Math.abs(b.edge.x-k.edge.x))),(d!==1||C%l==0)&&y.length>1)for(let b=0;b<y.length;b+=2){const k=b+1;if(k>=y.length)break;const w=y[b].edge,_=y[k].edge;g.push([[Math.round(w.x),x],[Math.round(_.x),x]])}x+=d,y.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),C++}return g})(n,a,i);if(s){for(const h of n)wo(h,o,-s);(function(h,l,d){const u=[];h.forEach((g=>u.push(...g))),wo(u,l,d)})(c,o,-s)}return c}function fs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let a=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(a=s),Xx(e,s,i,a||1)}class gl{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=fs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function Ta(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class Vx extends gl{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=fs(t,Object.assign({},r,{hachureGap:i})),a=Math.PI/180*r.hachureAngle,n=[],o=.5*i*Math.cos(a),c=.5*i*Math.sin(a);for(const[h,l]of s)Ta([h,l])&&n.push([[h[0]-o,h[1]+c],[...l]],[[h[0]+o,h[1]-c],[...l]]);return{type:"fillSketch",ops:this.renderLines(n,r)}}}class Zx extends gl{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),a=this._fillPolygons(t,s);return i.ops=i.ops.concat(a.ops),i}}class Kx{constructor(t){this.helper=t}fillPolygons(t,r){const i=fs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let a=r.fillWeight;a<0&&(a=r.strokeWidth/2);const n=s/4;for(const o of t){const c=Ta(o),h=c/s,l=Math.ceil(h)-1,d=c-l*s,u=(o[0][0]+o[1][0])/2-s/4,g=Math.min(o[0][1],o[1][1]);for(let m=0;m<l;m++){const y=g+d+m*s,x=u-n+2*Math.random()*n,C=y-n+2*Math.random()*n,b=this.helper.ellipse(x,C,a,a,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class Qx{constructor(t){this.helper=t}fillPolygons(t,r){const i=fs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,a=[];return t.forEach((n=>{const o=Ta(n),c=Math.floor(o/(i+s)),h=(o+s-c*(i+s))/2;let l=n[0],d=n[1];l[0]>d[0]&&(l=n[1],d=n[0]);const u=Math.atan((d[1]-l[1])/(d[0]-l[0]));for(let g=0;g<c;g++){const m=g*(i+s),y=m+i,x=[l[0]+m*Math.cos(u)+h*Math.cos(u),l[1]+m*Math.sin(u)+h*Math.sin(u)],C=[l[0]+y*Math.cos(u)+h*Math.cos(u),l[1]+y*Math.sin(u)+h*Math.sin(u)];a.push(...this.helper.doubleLineOps(x[0],x[1],C[0],C[1],r))}})),a}}class Jx{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,a=fs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(a,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((a=>{const n=Ta(a),o=Math.round(n/(2*r));let c=a[0],h=a[1];c[0]>h[0]&&(c=a[1],h=a[0]);const l=Math.atan((h[1]-c[1])/(h[0]-c[0]));for(let d=0;d<o;d++){const u=2*d*r,g=2*(d+1)*r,m=Math.sqrt(2*Math.pow(r,2)),y=[c[0]+u*Math.cos(l),c[1]+u*Math.sin(l)],x=[c[0]+g*Math.cos(l),c[1]+g*Math.sin(l)],C=[y[0]+m*Math.cos(l+Math.PI/4),y[1]+m*Math.sin(l+Math.PI/4)];s.push(...this.helper.doubleLineOps(y[0],y[1],C[0],C[1],i),...this.helper.doubleLineOps(C[0],C[1],x[0],x[1],i))}})),s}}const ve={};class tb{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const eb=0,Bo=1,sc=2,Ls={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 _o(e,t){return e.type===t}function pl(e){const t=[],r=(function(n){const o=new Array;for(;n!=="";)if(n.match(/^([ \t\r\n,]+)/))n=n.substr(RegExp.$1.length);else if(n.match(/^([aAcChHlLmMqQsStTvVzZ])/))o[o.length]={type:eb,text:RegExp.$1},n=n.substr(RegExp.$1.length);else{if(!n.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];o[o.length]={type:Bo,text:`${parseFloat(RegExp.$1)}`},n=n.substr(RegExp.$1.length)}return o[o.length]={type:sc,text:""},o})(e);let i="BOD",s=0,a=r[s];for(;!_o(a,sc);){let n=0;const o=[];if(i==="BOD"){if(a.text!=="M"&&a.text!=="m")return pl("M0,0"+e);s++,n=Ls[a.text],i=a.text}else _o(a,Bo)?n=Ls[i]:(s++,n=Ls[a.text],i=a.text);if(!(s+n<r.length))throw new Error("Path data ended short");for(let c=s;c<s+n;c++){const h=r[c];if(!_o(h,Bo))throw new Error("Param not a number: "+i+","+h.text);o[o.length]=+h.text}if(typeof Ls[i]!="number")throw new Error("Bad segment: "+i);{const c={key:i,data:o};t.push(c),s+=n,a=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Nu(e){let t=0,r=0,i=0,s=0;const a=[];for(const{key:n,data:o}of e)switch(n){case"M":a.push({key:"M",data:[...o]}),[t,r]=o,[i,s]=o;break;case"m":t+=o[0],r+=o[1],a.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":a.push({key:"L",data:[...o]}),[t,r]=o;break;case"l":t+=o[0],r+=o[1],a.push({key:"L",data:[t,r]});break;case"C":a.push({key:"C",data:[...o]}),t=o[4],r=o[5];break;case"c":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"C",data:c}),t=c[4],r=c[5];break}case"Q":a.push({key:"Q",data:[...o]}),t=o[2],r=o[3];break;case"q":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"Q",data:c}),t=c[2],r=c[3];break}case"A":a.push({key:"A",data:[...o]}),t=o[5],r=o[6];break;case"a":t+=o[5],r+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],t,r]});break;case"H":a.push({key:"H",data:[...o]}),t=o[0];break;case"h":t+=o[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...o]}),r=o[0];break;case"v":r+=o[0],a.push({key:"V",data:[r]});break;case"S":a.push({key:"S",data:[...o]}),t=o[2],r=o[3];break;case"s":{const c=o.map(((h,l)=>l%2?h+r:h+t));a.push({key:"S",data:c}),t=c[2],r=c[3];break}case"T":a.push({key:"T",data:[...o]}),t=o[0],r=o[1];break;case"t":t+=o[0],r+=o[1],a.push({key:"T",data:[t,r]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,r=s}return a}function Wu(e){const t=[];let r="",i=0,s=0,a=0,n=0,o=0,c=0;for(const{key:h,data:l}of e){switch(h){case"M":t.push({key:"M",data:[...l]}),[i,s]=l,[a,n]=l;break;case"C":t.push({key:"C",data:[...l]}),i=l[4],s=l[5],o=l[2],c=l[3];break;case"L":t.push({key:"L",data:[...l]}),[i,s]=l;break;case"H":i=l[0],t.push({key:"L",data:[i,s]});break;case"V":s=l[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,u=0;r==="C"||r==="S"?(d=i+(i-o),u=s+(s-c)):(d=i,u=s),t.push({key:"C",data:[d,u,...l]}),o=l[0],c=l[1],i=l[2],s=l[3];break}case"T":{const[d,u]=l;let g=0,m=0;r==="Q"||r==="T"?(g=i+(i-o),m=s+(s-c)):(g=i,m=s);const y=i+2*(g-i)/3,x=s+2*(m-s)/3,C=d+2*(g-d)/3,b=u+2*(m-u)/3;t.push({key:"C",data:[y,x,C,b,d,u]}),o=g,c=m,i=d,s=u;break}case"Q":{const[d,u,g,m]=l,y=i+2*(d-i)/3,x=s+2*(u-s)/3,C=g+2*(d-g)/3,b=m+2*(u-m)/3;t.push({key:"C",data:[y,x,C,b,g,m]}),o=d,c=u,i=g,s=m;break}case"A":{const d=Math.abs(l[0]),u=Math.abs(l[1]),g=l[2],m=l[3],y=l[4],x=l[5],C=l[6];d===0||u===0?(t.push({key:"C",data:[i,s,x,C,x,C]}),i=x,s=C):(i!==x||s!==C)&&(zu(i,s,x,C,d,u,g,m,y).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=C);break}case"Z":t.push({key:"Z",data:[]}),i=a,s=n}r=h}return t}function Yi(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function zu(e,t,r,i,s,a,n,o,c,h){const l=(d=n,Math.PI*d/180);var d;let u=[],g=0,m=0,y=0,x=0;if(h)[g,m,y,x]=h;else{[e,t]=Yi(e,t,-l),[r,i]=Yi(r,i,-l);const W=(e-r)/2,E=(t-i)/2;let M=W*W/(s*s)+E*E/(a*a);M>1&&(M=Math.sqrt(M),s*=M,a*=M);const v=s*s,R=a*a,$=v*R-v*E*E-R*W*W,X=v*E*E+R*W*W,Z=(o===c?-1:1)*Math.sqrt(Math.abs($/X));y=Z*s*E/a+(e+r)/2,x=Z*-a*W/s+(t+i)/2,g=Math.asin(parseFloat(((t-x)/a).toFixed(9))),m=Math.asin(parseFloat(((i-x)/a).toFixed(9))),e<y&&(g=Math.PI-g),r<y&&(m=Math.PI-m),g<0&&(g=2*Math.PI+g),m<0&&(m=2*Math.PI+m),c&&g>m&&(g-=2*Math.PI),!c&&m>g&&(m-=2*Math.PI)}let C=m-g;if(Math.abs(C)>120*Math.PI/180){const W=m,E=r,M=i;m=c&&m>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,u=zu(r=y+s*Math.cos(m),i=x+a*Math.sin(m),E,M,s,a,n,0,c,[m,W,y,x])}C=m-g;const b=Math.cos(g),k=Math.sin(g),w=Math.cos(m),_=Math.sin(m),L=Math.tan(C/4),A=4/3*s*L,F=4/3*a*L,z=[e,t],q=[e+A*k,t-F*b],I=[r+A*_,i-F*w],rt=[r,i];if(q[0]=2*z[0]-q[0],q[1]=2*z[1]-q[1],h)return[q,I,rt].concat(u);{u=[q,I,rt].concat(u);const W=[];for(let E=0;E<u.length;E+=3){const M=Yi(u[E][0],u[E][1],l),v=Yi(u[E+1][0],u[E+1][1],l),R=Yi(u[E+2][0],u[E+2][1],l);W.push([M[0],M[1],v[0],v[1],R[0],R[1]])}return W}}const rb={randOffset:function(e,t){return Mt(e,t)},randOffsetWithRange:function(e,t,r){return oa(e,t,r)},ellipse:function(e,t,r,i,s){const a=Yu(r,i,s);return sn(e,t,s,a).opset},doubleLineOps:function(e,t,r,i,s){return Or(e,t,r,i,s,!0)}};function Hu(e,t,r,i,s){return{type:"path",ops:Or(e,t,r,i,s)}}function Ws(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let a=0;a<i-1;a++)s.push(...Or(e[a][0],e[a][1],e[a+1][0],e[a+1][1],r));return t&&s.push(...Or(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?Hu(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function ib(e,t,r,i,s){return(function(a,n){return Ws(a,!0,n)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function ac(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Fs(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Fs(r[0],1.5*(1+.22*t.roughness),lc(t));for(let a=1;a<r.length;a++){const n=r[a];if(n.length){const o=Fs(n,1*(1+.2*t.roughness),t),c=t.disableMultiStroke?[]:Fs(n,1.5*(1+.22*t.roughness),lc(t));for(const h of o)h.op!=="move"&&i.push(h);for(const h of c)h.op!=="move"&&s.push(h)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Yu(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),a=2*Math.PI/s;let n=Math.abs(e/2),o=Math.abs(t/2);const c=1-r.curveFitting;return n+=Mt(n*c,r),o+=Mt(o*c,r),{increment:a,rx:n,ry:o}}function sn(e,t,r,i){const[s,a]=hc(i.increment,e,t,i.rx,i.ry,1,i.increment*oa(.1,oa(.4,1,r),r),r);let n=na(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[o]=hc(i.increment,e,t,i.rx,i.ry,1.5,0,r),c=na(o,null,r);n=n.concat(c)}return{estimatedPoints:a,opset:{type:"path",ops:n}}}function oc(e,t,r,i,s,a,n,o,c){const h=e,l=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Mt(.01*d,c),u+=Mt(.01*u,c);let g=s,m=a;for(;g<0;)g+=2*Math.PI,m+=2*Math.PI;m-g>2*Math.PI&&(g=0,m=2*Math.PI);const y=2*Math.PI/c.curveStepCount,x=Math.min(y/2,(m-g)/2),C=cc(x,h,l,d,u,g,m,1,c);if(!c.disableMultiStroke){const b=cc(x,h,l,d,u,g,m,1.5,c);C.push(...b)}return n&&(o?C.push(...Or(h,l,h+d*Math.cos(g),l+u*Math.sin(g),c),...Or(h,l,h+d*Math.cos(m),l+u*Math.sin(m),c)):C.push({op:"lineTo",data:[h,l]},{op:"lineTo",data:[h+d*Math.cos(g),l+u*Math.sin(g)]})),{type:"path",ops:C}}function nc(e,t){const r=Wu(Nu(pl(e))),i=[];let s=[0,0],a=[0,0];for(const{key:n,data:o}of r)switch(n){case"M":a=[o[0],o[1]],s=[o[0],o[1]];break;case"L":i.push(...Or(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case"C":{const[c,h,l,d,u,g]=o;i.push(...sb(c,h,l,d,u,g,a,t)),a=[u,g];break}case"Z":i.push(...Or(a[0],a[1],s[0],s[1],t)),a=[s[0],s[1]]}return{type:"path",ops:i}}function vo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,a=i.length;if(a>2){r.push({op:"move",data:[i[0][0]+Mt(s,t),i[0][1]+Mt(s,t)]});for(let n=1;n<a;n++)r.push({op:"lineTo",data:[i[n][0]+Mt(s,t),i[n][1]+Mt(s,t)]})}}return{type:"fillPath",ops:r}}function ti(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!ve[s])switch(s){case"zigzag":ve[s]||(ve[s]=new Vx(i));break;case"cross-hatch":ve[s]||(ve[s]=new Zx(i));break;case"dots":ve[s]||(ve[s]=new Kx(i));break;case"dashed":ve[s]||(ve[s]=new Qx(i));break;case"zigzag-line":ve[s]||(ve[s]=new Jx(i));break;default:s="hachure",ve[s]||(ve[s]=new gl(i))}return ve[s]})(t,rb).fillPolygons(e,t)}function lc(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Uu(e){return e.randomizer||(e.randomizer=new tb(e.seed||0)),e.randomizer.next()}function oa(e,t,r,i=1){return r.roughness*i*(Uu(r)*(t-e)+e)}function Mt(e,t,r=1){return oa(-e,e,t,r)}function Or(e,t,r,i,s,a=!1){const n=a?s.disableMultiStrokeFill:s.disableMultiStroke,o=an(e,t,r,i,s,!0,!1);if(n)return o;const c=an(e,t,r,i,s,!0,!0);return o.concat(c)}function an(e,t,r,i,s,a,n){const o=Math.pow(e-r,2)+Math.pow(t-i,2),c=Math.sqrt(o);let h=1;h=c<200?1:c>500?.4:-.0016668*c+1.233334;let l=s.maxRandomnessOffset||0;l*l*100>o&&(l=c/10);const d=l/2,u=.2+.2*Uu(s);let g=s.bowing*s.maxRandomnessOffset*(i-t)/200,m=s.bowing*s.maxRandomnessOffset*(e-r)/200;g=Mt(g,s,h),m=Mt(m,s,h);const y=[],x=()=>Mt(d,s,h),C=()=>Mt(l,s,h),b=s.preserveVertices;return n?y.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):y.push({op:"move",data:[e+(b?0:Mt(l,s,h)),t+(b?0:Mt(l,s,h))]}),n?y.push({op:"bcurveTo",data:[g+e+(r-e)*u+x(),m+t+(i-t)*u+x(),g+e+2*(r-e)*u+x(),m+t+2*(i-t)*u+x(),r+(b?0:x()),i+(b?0:x())]}):y.push({op:"bcurveTo",data:[g+e+(r-e)*u+C(),m+t+(i-t)*u+C(),g+e+2*(r-e)*u+C(),m+t+2*(i-t)*u+C(),r+(b?0:C()),i+(b?0:C())]}),y}function Fs(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]),i.push([e[0][0]+Mt(t,r),e[0][1]+Mt(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]),s===e.length-1&&i.push([e[s][0]+Mt(t,r),e[s][1]+Mt(t,r)]);return na(i,null,r)}function na(e,t,r){const i=e.length,s=[];if(i>3){const a=[],n=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let o=1;o+2<i;o++){const c=e[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*e[o+1][0]-n*e[o-1][0])/6,c[1]+(n*e[o+1][1]-n*e[o-1][1])/6],a[2]=[e[o+1][0]+(n*e[o][0]-n*e[o+2][0])/6,e[o+1][1]+(n*e[o][1]-n*e[o+2][1])/6],a[3]=[e[o+1][0],e[o+1][1]],s.push({op:"bcurveTo",data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...an(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function hc(e,t,r,i,s,a,n,o){const c=[],h=[];if(o.roughness===0){e/=4,h.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let l=0;l<=2*Math.PI;l+=e){const d=[t+i*Math.cos(l),r+s*Math.sin(l)];c.push(d),h.push(d)}h.push([t+i*Math.cos(0),r+s*Math.sin(0)]),h.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const l=Mt(.5,o)-Math.PI/2;h.push([Mt(a,o)+t+.9*i*Math.cos(l-e),Mt(a,o)+r+.9*s*Math.sin(l-e)]);const d=2*Math.PI+l-.01;for(let u=l;u<d;u+=e){const g=[Mt(a,o)+t+i*Math.cos(u),Mt(a,o)+r+s*Math.sin(u)];c.push(g),h.push(g)}h.push([Mt(a,o)+t+i*Math.cos(l+2*Math.PI+.5*n),Mt(a,o)+r+s*Math.sin(l+2*Math.PI+.5*n)]),h.push([Mt(a,o)+t+.98*i*Math.cos(l+n),Mt(a,o)+r+.98*s*Math.sin(l+n)]),h.push([Mt(a,o)+t+.9*i*Math.cos(l+.5*n),Mt(a,o)+r+.9*s*Math.sin(l+.5*n)])}return[h,c]}function cc(e,t,r,i,s,a,n,o,c){const h=a+Mt(.1,c),l=[];l.push([Mt(o,c)+t+.9*i*Math.cos(h-e),Mt(o,c)+r+.9*s*Math.sin(h-e)]);for(let d=h;d<=n;d+=e)l.push([Mt(o,c)+t+i*Math.cos(d),Mt(o,c)+r+s*Math.sin(d)]);return l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),l.push([t+i*Math.cos(n),r+s*Math.sin(n)]),na(l,null,c)}function sb(e,t,r,i,s,a,n,o){const c=[],h=[o.maxRandomnessOffset||1,(o.maxRandomnessOffset||1)+.3];let l=[0,0];const d=o.disableMultiStroke?1:2,u=o.preserveVertices;for(let g=0;g<d;g++)g===0?c.push({op:"move",data:[n[0],n[1]]}):c.push({op:"move",data:[n[0]+(u?0:Mt(h[0],o)),n[1]+(u?0:Mt(h[0],o))]}),l=u?[s,a]:[s+Mt(h[g],o),a+Mt(h[g],o)],c.push({op:"bcurveTo",data:[e+Mt(h[g],o),t+Mt(h[g],o),r+Mt(h[g],o),i+Mt(h[g],o),l[0],l[1]]});return c}function Ui(e){return[...e]}function dc(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Ui(e[0]),Ui(e[1]),Ui(e[2]),Ui(e[2]));else{const s=[];s.push(e[0],e[0]);for(let o=1;o<e.length;o++)s.push(e[o]),o===e.length-1&&s.push(e[o]);const a=[],n=1-t;i.push(Ui(s[0]));for(let o=1;o+2<s.length;o++){const c=s[o];a[0]=[c[0],c[1]],a[1]=[c[0]+(n*s[o+1][0]-n*s[o-1][0])/6,c[1]+(n*s[o+1][1]-n*s[o-1][1])/6],a[2]=[s[o+1][0]+(n*s[o][0]-n*s[o+2][0])/6,s[o+1][1]+(n*s[o][1]-n*s[o+2][1])/6],a[3]=[s[o+1][0],s[o+1][1]],i.push(a[1],a[2],a[3])}}return i}function zs(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function ab(e,t,r){const i=zs(t,r);if(i===0)return zs(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),zs(e,Rr(t,r,s))}function Rr(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function on(e,t,r,i){const s=i||[];if((function(o,c){const h=o[c+0],l=o[c+1],d=o[c+2],u=o[c+3];let g=3*l[0]-2*h[0]-u[0];g*=g;let m=3*l[1]-2*h[1]-u[1];m*=m;let y=3*d[0]-2*u[0]-h[0];y*=y;let x=3*d[1]-2*u[1]-h[1];return x*=x,g<y&&(g=y),m<x&&(m=x),g+m})(e,t)<r){const o=e[t+0];s.length?(a=s[s.length-1],n=o,Math.sqrt(zs(a,n))>1&&s.push(o)):s.push(o),s.push(e[t+3])}else{const c=e[t+0],h=e[t+1],l=e[t+2],d=e[t+3],u=Rr(c,h,.5),g=Rr(h,l,.5),m=Rr(l,d,.5),y=Rr(u,g,.5),x=Rr(g,m,.5),C=Rr(y,x,.5);on([c,u,y,C],0,r,s),on([C,x,m,d],0,r,s)}var a,n;return s}function ob(e,t){return la(e,0,e.length,t)}function la(e,t,r,i,s){const a=s||[],n=e[t],o=e[r-1];let c=0,h=1;for(let l=t+1;l<r-1;++l){const d=ab(e[l],n,o);d>c&&(c=d,h=l)}return Math.sqrt(c)>i?(la(e,t,h+1,i,a),la(e,h,r,i,a)):(a.length||a.push(n),a.push(o)),a}function Lo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let a=0;a<s;a++)on(e,3*a,t,i);return r&&r>0?la(i,0,i.length,r):i}const Ae="none";class ha{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(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,a){const n=this._o(a);return this._d("line",[Hu(t,r,i,s,n)],n)}rectangle(t,r,i,s,a){const n=this._o(a),o=[],c=ib(t,r,i,s,n);if(n.fill){const h=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];n.fillStyle==="solid"?o.push(vo([h],n)):o.push(ti([h],n))}return n.stroke!==Ae&&o.push(c),this._d("rectangle",o,n)}ellipse(t,r,i,s,a){const n=this._o(a),o=[],c=Yu(i,s,n),h=sn(t,r,n,c);if(n.fill)if(n.fillStyle==="solid"){const l=sn(t,r,n,c).opset;l.type="fillPath",o.push(l)}else o.push(ti([h.estimatedPoints],n));return n.stroke!==Ae&&o.push(h.opset),this._d("ellipse",o,n)}circle(t,r,i,s){const a=this.ellipse(t,r,i,i,s);return a.shape="circle",a}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ws(t,!1,i)],i)}arc(t,r,i,s,a,n,o=!1,c){const h=this._o(c),l=[],d=oc(t,r,i,s,a,n,o,!0,h);if(o&&h.fill)if(h.fillStyle==="solid"){const u=Object.assign({},h);u.disableMultiStroke=!0;const g=oc(t,r,i,s,a,n,!0,!1,u);g.type="fillPath",l.push(g)}else l.push((function(u,g,m,y,x,C,b){const k=u,w=g;let _=Math.abs(m/2),L=Math.abs(y/2);_+=Mt(.01*_,b),L+=Mt(.01*L,b);let A=x,F=C;for(;A<0;)A+=2*Math.PI,F+=2*Math.PI;F-A>2*Math.PI&&(A=0,F=2*Math.PI);const z=(F-A)/b.curveStepCount,q=[];for(let I=A;I<=F;I+=z)q.push([k+_*Math.cos(I),w+L*Math.sin(I)]);return q.push([k+_*Math.cos(F),w+L*Math.sin(F)]),q.push([k,w]),ti([q],b)})(t,r,i,s,a,n,h));return h.stroke!==Ae&&l.push(d),this._d("arc",l,h)}curve(t,r){const i=this._o(r),s=[],a=ac(t,i);if(i.fill&&i.fill!==Ae)if(i.fillStyle==="solid"){const n=ac(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(n.ops)})}else{const n=[],o=t;if(o.length){const c=typeof o[0][0]=="number"?[o]:o;for(const h of c)h.length<3?n.push(...h):h.length===3?n.push(...Lo(dc([h[0],h[0],h[1],h[2]]),10,(1+i.roughness)/2)):n.push(...Lo(dc(h),10,(1+i.roughness)/2))}n.length&&s.push(ti([n],i))}return i.stroke!==Ae&&s.push(a),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],a=Ws(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(vo([t],i)):s.push(ti([t],i))),i.stroke!==Ae&&s.push(a),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const a=i.fill&&i.fill!=="transparent"&&i.fill!==Ae,n=i.stroke!==Ae,o=!!(i.simplification&&i.simplification<1),c=(function(l,d,u){const g=Wu(Nu(pl(l))),m=[];let y=[],x=[0,0],C=[];const b=()=>{C.length>=4&&y.push(...Lo(C,d)),C=[]},k=()=>{b(),y.length&&(m.push(y),y=[])};for(const{key:_,data:L}of g)switch(_){case"M":k(),x=[L[0],L[1]],y.push(x);break;case"L":b(),y.push([L[0],L[1]]);break;case"C":if(!C.length){const A=y.length?y[y.length-1]:x;C.push([A[0],A[1]])}C.push([L[0],L[1]]),C.push([L[2],L[3]]),C.push([L[4],L[5]]);break;case"Z":b(),y.push([x[0],x[1]])}if(k(),!u)return m;const w=[];for(const _ of m){const L=ob(_,u);L.length&&w.push(L)}return w})(t,1,o?4-4*(i.simplification||1):(1+i.roughness)/2),h=nc(t,i);if(a)if(i.fillStyle==="solid")if(c.length===1){const l=nc(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(l.ops)})}else s.push(vo(c,i));else s.push(ti(c,i));return n&&(o?c.forEach((l=>{s.push(Ws(l,!1,i))})):s.push(h)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const a=typeof r=="number"&&r>=0?s.data.map((n=>+n.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${a[0]} ${a[1]} `;break;case"bcurveTo":i+=`C${a[0]} ${a[1]}, ${a[2]} ${a[3]}, ${a[4]} ${a[5]} `;break;case"lineTo":i+=`L${a[0]} ${a[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const a of r){let n=null;switch(a.type){case"path":n={d:this.opsToPath(a),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ae};break;case"fillPath":n={d:this.opsToPath(a),stroke:Ae,strokeWidth:0,fill:i.fill||Ae};break;case"fillSketch":n=this.fillSketch(a,i)}n&&s.push(n)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ae,strokeWidth:i,fill:Ae}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class nb{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(const n of r)switch(n.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,n,a),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const o=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,n,a,o),s.restore();break}case"fillSketch":this.fillSketch(s,n,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const a of r.ops){const n=typeof i=="number"&&i>=0?a.data.map((o=>+o.toFixed(i))):a.data;switch(a.op){case"move":t.moveTo(n[0],n[1]);break;case"bcurveTo":t.bezierCurveTo(n[0],n[1],n[2],n[3],n[4],n[5]);break;case"lineTo":t.lineTo(n[0],n[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n),n}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n),n}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n),n}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a),a}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h),h}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const As="http://www.w3.org/2000/svg";class lb{constructor(t,r){this.svg=t,this.gen=new ha(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,a=s.createElementNS(As,"g"),n=t.options.fixedDecimalPlaceDigits;for(const o of r){let c=null;switch(o.type){case"path":c=s.createElementNS(As,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke",i.stroke),c.setAttribute("stroke-width",i.strokeWidth+""),c.setAttribute("fill","none"),i.strokeLineDash&&c.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&c.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":c=s.createElementNS(As,"path"),c.setAttribute("d",this.opsToPath(o,n)),c.setAttribute("stroke","none"),c.setAttribute("stroke-width","0"),c.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||c.setAttribute("fill-rule","evenodd");break;case"fillSketch":c=this.fillSketch(s,o,i)}c&&a.appendChild(c)}return a}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const a=t.createElementNS(As,"path");return a.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),a.setAttribute("stroke",i.fill||""),a.setAttribute("stroke-width",s+""),a.setAttribute("fill","none"),i.fillLineDash&&a.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&a.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),a}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,a){const n=this.gen.line(t,r,i,s,a);return this.draw(n)}rectangle(t,r,i,s,a){const n=this.gen.rectangle(t,r,i,s,a);return this.draw(n)}ellipse(t,r,i,s,a){const n=this.gen.ellipse(t,r,i,s,a);return this.draw(n)}circle(t,r,i,s){const a=this.gen.circle(t,r,i,s);return this.draw(a)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,a,n,o=!1,c){const h=this.gen.arc(t,r,i,s,a,n,o,c);return this.draw(h)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var pt={canvas:(e,t)=>new nb(e,t),svg:(e,t)=>new lb(e,t),generator:e=>new ha(e),newSeed:()=>ha.newSeed()},hb=1,cb=3;async function fl(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!ml(e);await Promise.all([...t].map(i=>new Promise(s=>{function a(){if(i.style.display="flex",i.style.flexDirection="column",r){const n=Rt().fontSize?Rt().fontSize:window.getComputedStyle(document.body).fontSize,o=5,[c=Sn.fontSize]=Ca(n),h=c*o+"px";i.style.minWidth=h,i.style.maxWidth=h}else i.style.width="100%";s(i)}p(a,"setupImage"),setTimeout(()=>{i.complete&&a()}),i.addEventListener("error",a),i.addEventListener("load",a)})))}p(fl,"configureLabelImages");function ml(e){var r;return e.nodeType===cb?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==hb||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(ml)}p(ml,"hasTextBesidesImages");var uc=3,db=32,ub=p(async(e,t,r)=>{var C,b,k;const i=Rt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),a=s.insert("g").attr("class","label").attr("style",ne(t.labelStyle)),o=[{text:typeof t.label=="string"?t.label:((C=t.label)==null?void 0:C[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(w=>({text:w,cssClass:"c4-descr"}))].filter(w=>w.text),c=t.width?Math.max(t.width-2*(t.padding??0),db):((b=Rt().flowchart)==null?void 0:b.wrappingWidth)??200,l=((k=i.c4)==null?void 0:k.wrap)??!0?c:Number.POSITIVE_INFINITY,d=await Promise.all(o.map(async w=>{const _=a.append("g").attr("class",w.cssClass),L=await Oe(_,qe(Mr(w.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:l,style:t.labelStyle},i);return Pt(L).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Pt(L).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:_,box:_.node().getBBox()}})),u=Math.max(...d.map(({box:w})=>w.width),0);let g=0;for(const{el:w,box:_}of d)w.attr("transform",`translate(${u/2-_.x-_.width/2}, ${g-_.y})`),g+=_.height+uc;const m=d.length>0?g-uc:0;a.insert("rect",":first-child"),a.attr("transform",`translate(${-u/2}, ${-m/2})`);const y=a.node().getBBox(),x=(t.padding??0)/2;return{shapeSvg:s,bbox:y,halfPadding:x,label:a}},"c4LabelHelper"),gc=p((e,t)=>{const{x:r,y:i,width:s,height:a}=e;return s>=t?e:"left"in e?{x:r,y:i,width:t,height:a,top:i,left:r,bottom:i+a,right:r+t,toJSON:p(()=>({}),"toJSON")}:{x:r-(t-s)/2,y:i,width:t,height:a}},"withMinWidth"),vt=p(async(e,t,r,{ignoreMinWidth:i=!1}={})=>{var y,x;if(t.stereotype!==void 0)return ub(e,t,r);let s;const a=t.useHtmlLabels||sr((y=Rt())==null?void 0:y.htmlLabels);r?s=r:s="node default";const n=e.insert("g").attr("class",s).attr("id",t.domId||t.id),o=n.insert("g").attr("class","label").attr("style",ne(t.labelStyle));let c;t.label===void 0?c="":c=typeof t.label=="string"?t.label:t.label[0];const h=!!t.icon||!!t.img,l=t.labelType==="markdown",d=c&&!t.width&&!i?t.minWidth??0:0,u=await Oe(o,qe(Mr(c),Rt()),{useHtmlLabels:a,width:t.width||t.wrappingWidth||((x=Rt().flowchart)==null?void 0:x.wrappingWidth),minWidth:d,classes:l?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:h,markdown:l},Rt()),g=((t==null?void 0:t.padding)??0)/2;let m;if(a){const C=u.children[0],b=Pt(u);await fl(C),m=await Yr.measure(()=>C.getBoundingClientRect()),m=gc(m,d),b.attr("width",m.width),b.attr("height",m.height)}else m=await Yr.measure(()=>u.getBBox()),m=gc(m,d);return a?o.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"):o.attr("transform","translate(0, "+-m.height/2+")"),t.centerLabel&&o.attr("transform","translate("+-m.width/2+", "+-m.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:n,bbox:m,halfPadding:g,label:o}},"labelHelper"),Nr=p(async(e,t,r)=>{var c,h;const i=r.useHtmlLabels??de(Rt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await Oe(s,qe(Mr(t),Rt()),{useHtmlLabels:i,width:r.width||((h=(c=Rt())==null?void 0:c.flowchart)==null?void 0:h.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),n=r.padding/2;let o;if(de(Rt())){const l=a.children[0],d=Pt(a);o=await Yr.measure(()=>l.getBoundingClientRect()),d.attr("width",o.width),d.attr("height",o.height)}else o=await Yr.measure(()=>a.getBBox());return i?s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"):s.attr("transform","translate(0, "+-o.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:o,halfPadding:n,label:s}},"insertLabel"),Ct=p((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),_t=p((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Yt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}p(Yt,"createPathFromPoints");function $r(e,t,r,i,s,a){const n=[],c=r-e,h=i-t,l=c/a,d=2*Math.PI/l,u=t+h/2;for(let g=0;g<=50;g++){const m=g/50,y=e+m*c,x=u+s*Math.sin(d*(y-e));n.push({x:y,y:x})}return n}p($r,"generateFullSineWavePoints");function tr(e,t,r,i,s,a){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const u=o+d*l,g=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-g,y:-m})}return n}p(tr,"generateCirclePoints");function nn(e){const t=Array.from(e.childNodes).filter(c=>c.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(c=>c.getAttribute("d")).filter(c=>c!==null).join(" ");r.setAttribute("d",i);const s=t.find(c=>c.getAttribute("fill")!=="none"),a=t.find(c=>c.getAttribute("stroke")!=="none"),n=p((c,h)=>(c==null?void 0:c.getAttribute(h))??void 0,"getAttr");if(s){const c={fill:n(s,"fill"),"fill-opacity":n(s,"fill-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}if(a){const c={stroke:n(a,"stroke"),"stroke-width":n(a,"stroke-width")??"1","stroke-opacity":n(a,"stroke-opacity")??"1"};Object.entries(c).forEach(([h,l])=>{l&&r.setAttribute(h,l)})}const o=document.createElementNS("http://www.w3.org/2000/svg","g");return o.appendChild(r),o}p(nn,"mergePaths");var gb=p((e,t)=>{var r=e.x,i=e.y,s=t.x-r,a=t.y-i,n=e.width/2,o=e.height/2,c,h;return Math.abs(a)*n>Math.abs(s)*o?(a<0&&(o=-o),c=a===0?0:o*s/a,h=o):(s<0&&(n=-n),c=n,h=s===0?0:n*a/s),{x:r+c,y:i+h}},"intersectRect"),Cr=gb;function ju(e,t){return e.intersect(t)}p(ju,"intersectNode");var pb=ju;function Gu(e,t,r,i){var s=e.x,a=e.y,n=s-i.x,o=a-i.y,c=Math.sqrt(t*t*o*o+r*r*n*n),h=Math.abs(t*r*n/c);i.x<s&&(h=-h);var l=Math.abs(t*r*o/c);return i.y<a&&(l=-l),{x:s+h,y:a+l}}p(Gu,"intersectEllipse");var Xu=Gu;function Vu(e,t,r){return Xu(e,t,t,r)}p(Vu,"intersectCircle");var fb=Vu;function Zu(e,t,r,i){{const s=t.y-e.y,a=e.x-t.x,n=t.x*e.y-e.x*t.y,o=s*r.x+a*r.y+n,c=s*i.x+a*i.y+n,h=1e-6;if(o!==0&&c!==0&&ln(o,c))return;const l=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,g=l*e.x+d*e.y+u,m=l*t.x+d*t.y+u;if(Math.abs(g)<h&&Math.abs(m)<h&&ln(g,m))return;const y=s*d-l*a;if(y===0)return;const x=(a*u-d*n)/y,C=(l*n-s*u)/y;return{x,y:C}}}p(Zu,"intersectLine");function ln(e,t){return e*t>0}p(ln,"sameSign");var mb=Zu;function Ku(e,t,r){let i=e.x,s=e.y,a=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(l){n=Math.min(n,l.x),o=Math.min(o,l.y)}):(n=Math.min(n,t.x),o=Math.min(o,t.y));let c=i-e.width/2-n,h=s-e.height/2-o;for(let l=0;l<t.length;l++){let d=t[l],u=t[l<t.length-1?l+1:0],g=mb(e,r,{x:c+d.x,y:h+d.y},{x:c+u.x,y:h+u.y});g&&a.push(g)}return a.length?(a.length>1&&a.sort(function(l,d){let u=l.x-r.x,g=l.y-r.y,m=Math.sqrt(u*u+g*g),y=d.x-r.x,x=d.y-r.y,C=Math.sqrt(y*y+x*x);return m<C?-1:m===C?0:1}),a[0]):e}p(Ku,"intersectPolygon");var yb=Ku,dt={node:pb,circle:fb,ellipse:Xu,polygon:yb,rect:Cr},$e=p((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),Cb=p(async(e,t,r,i=!1,s=!1)=>{let a=t||"";typeof a=="object"&&(a=a[0]);const n=Rt(),o=de(n);return await Oe(e,a,{style:r,isTitle:i,useHtmlLabels:o,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},n)},"createLabel"),pr=Cb;function Qu(e,t){const{labelStyles:r}=mt(t);t.labelStyle=r;const i=_t(t);let s=i;i||(s="anchor");const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=1,{cssStyles:o}=t,c=pt.svg(a),h=gt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const l=c.circle(0,0,n*2,h),d=a.insert(()=>l,":first-child");return d.attr("class","anchor").attr("style",ne(o)),Ct(t,d),t.intersect=function(u){return J.info("Circle intersect",t,n,u),dt.circle(t,n,u)},a}p(Qu,"anchor");function hn(e,t,r,i,s,a,n){const c=(e+r)/2,h=(t+i)/2,l=Math.atan2(i-t,r-e),d=(r-e)/2,u=(i-t)/2,g=d/s,m=u/a,y=Math.sqrt(g**2+m**2);if(y>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-y**2),C=c+x*a*Math.sin(l)*(n?-1:1),b=h-x*s*Math.cos(l)*(n?-1:1),k=Math.atan2((t-b)/a,(e-C)/s);let _=Math.atan2((i-b)/a,(r-C)/s)-k;n&&_<0&&(_+=2*Math.PI),!n&&_>0&&(_-=2*Math.PI);const L=[];for(let A=0;A<20;A++){const F=A/19,z=k+F*_,q=C+s*Math.cos(z),I=b+a*Math.sin(z);L.push({x:q,y:I})}return L}p(hn,"generateArcPoints");function Ju(e,t,r){const[i,s]=[t,r].sort((a,n)=>n-a);return s*(1-Math.sqrt(1-(e/i/2)**2))}p(Ju,"calculateArcSagitta");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=p(z=>z+n,"calcTotalHeight"),c=p(z=>{const q=z/2;return[q/(2.5+z/50),q]},"calcEllipseRadius"),{shapeSvg:h,bbox:l}=await vt(e,t,_t(t)),d=o(t!=null&&t.height?t==null?void 0:t.height:l.height),[u,g]=c(d),m=Ju(d,u,g),x=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2+m-m,C=d,{cssStyles:b}=t,k=[{x:x/2,y:-C/2},{x:-x/2,y:-C/2},...hn(-x/2,-C/2,-x/2,C/2,u,g,!1),{x:x/2,y:C/2},...hn(x/2,C/2,x/2,-C/2,u,g,!0)],w=pt.svg(h),_=gt(t,{});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=Yt(k),A=w.path(L,_),F=h.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(${u/2}, 0)`),Ct(t,F),t.intersect=function(z){return dt.polygon(t,k,z)},h}p(tg,"bowTieRect");async function eg(e,t,{config:{themeVariables:r}}){var A;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,_t(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=Math.max(n.width+h*2,t.width??0,80),d=Math.max(Math.min(l*.08,12),5),u=Math.max(n.height+h*2+d,t.height??0),g=-u/2+d,m=u/2,y=l*.72,x=[`M${-l/2},${g}`,`L${-y/2},${m}`,`A${y/2},${d} 0 0 0 ${y/2},${m}`,`L${l/2},${g}`,`A${l/2},${d} 0 0 0 ${-l/2},${g}`,"Z"].join(" "),{cssStyles:C}=t,b=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const z=pt.svg(a).path(x,gt(t,{}));(A=b.node())==null||A.appendChild(z),C&&b.attr("style",C)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",l/2).attr("ry",d).attr("style",`fill:none;stroke:${c};stroke-width:1px`),Ct(t,b);const k=g+(m-g)/2;o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${k-n.height/2-(n.y-(n.top??0))})`);const w=12,_=p((F,z,q)=>Array.from({length:w+1},(I,rt)=>{const W=Math.PI-rt*Math.PI/w;return{x:F*Math.cos(W),y:z+q*d*Math.sin(W)}}),"arc"),L=[..._(l/2,g,-1),..._(y/2,m,1).reverse()];return t.intersect=function(F){return dt.polygon(t,L,F)},a}p(eg,"bucket");var pc=20,fc=8,xb=80,bb=8;function rg(e){const{themeVariables:t}=Rt(),r=t.clusterBkg,i=t.clusterBorder;switch(e){case"flow":return{rx:10,fill:"none",stroke:t.flowContainerStroke||t.secondaryBorderColor,strokeWidth:.75,cssClass:"flow-collapsed"};default:return{rx:bb,fill:r,stroke:i,cssClass:"collapsed-group"}}}p(rg,"getCollapsedStyle");async function ig(e,t){var A;const r=rg((A=t.metadata)==null?void 0:A.containerType),{fill:i,stroke:s}=r,{nodeStyles:a}=mt(t),{shapeSvg:n,bbox:o}=await vt(e,t,_t(t)),{theme:c,themeVariables:h}=Rt();We(n,t.colorIndex,c,h.borderColorArray);const l=t.padding??8,d=o.height,u=Math.max(o.width+l*2,xb,(t==null?void 0:t.width)??0),g=Math.max(d+fc+pc+l*2,(t==null?void 0:t.height)??0),m=-u/2,y=-g/2,x=-28/2,C=n.select(".label");C&&(t.useHtmlLabels??de(Rt())?C.attr("transform",`translate(${-o.width/2}, ${-o.height/2+x})`):C.attr("transform",`translate(0, ${-o.height/2+x})`));let b;if(t.look==="handDrawn"){const F=pt.svg(n),z=gt(t,{fill:i,stroke:s,...r.strokeWidth===void 0?{}:{strokeWidth:r.strokeWidth},...i==="none"?{fillWeight:0}:{fillStyle:"solid"}}),q=F.path($e(m,y,u,g,r.rx),z);b=n.insert(()=>q,":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",ne(t.cssStyles))}else b=n.insert("rect",":first-child"),b.attr("class","basic label-container "+r.cssClass).attr("style",a).attr("rx",r.rx).attr("ry",r.rx).attr("x",m).attr("y",y).attr("width",u).attr("height",g).attr("fill",i).attr("stroke",s),r.strokeWidth!==void 0&&b.attr("stroke-width",r.strokeWidth+"px");const k=y+l+d+fc;n.append("line").attr("class","collapsed-separator").attr("x1",m+8).attr("y1",k).attr("x2",m+u-8).attr("y2",k).attr("stroke",s).attr("stroke-dasharray","3, 3");const w=k+pc/2,_=2.5,L=10;for(let F=-1;F<=1;F++)n.append("circle").attr("class","collapsed-indicator").attr("cx",F*L).attr("cy",w).attr("r",_).attr("fill",s);return Ct(t,b),t.calcIntersect=function(F,z){return dt.rect(F,z)},t.intersect=function(F){return dt.rect(t,F)},n}p(ig,"collapsedGroup");function ar(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}p(ar,"insertPolygonShape");var kb=["right","left","up","down"],yl="point",Sb=p(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),Tb=p(e=>kb.filter(t=>e.has(t)).join("|")||yl,"getDirectionKey"),mc={"right|left|up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":p(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":p(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":p(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":p(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":p(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:p(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[yl]:()=>[{x:0,y:0}]},wb=p((e,t,r,i)=>{const s=Sb(e),a=(r.padding??0)/2,n=t.height+4*a,o=n/2,c=i??t.width+2*o+2*a,h=Tb(s);return(mc[h]??mc[yl])({height:n,midpoint:o,padding:a,width:c})},"getArrowPoints");async function sg(e,t){const r=t,{shapeSvg:i,bbox:s}=await vt(e,r,_t(r)),a=r.padding??0,n=s.height+2*a,o=n/2,c=s.width+2*o+a,h=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&h>c?h:c,u=wb(r.directions??[],s,r,d),g=ar(i,d,n,u);return g.attr("style",r.style??null),Ct(r,g),r.intersect=function(m){return dt.polygon(r,u,m)},i}p(sg,"block_arrow");async function ag(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,_t(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=18,d=12,u=Math.max(n.width+h*2,t.width??0,90),g=Math.max(n.height+h*2+l,t.height??0),m=-g/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=pt.svg(a).path($e(-u/2,m,u,g,d),gt(t,{}));(b=x.node())==null||b.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);x.append("line").attr("x1",-u/2).attr("y1",m+l).attr("x2",u/2).attr("y2",m+l).attr("style",`stroke:${c};stroke-width:1px`);for(let k=0;k<3;k++)x.append("circle").attr("cx",-u/2+12+k*9).attr("cy",m+l/2).attr("r",2.5).attr("style",`fill:${c};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-u/2+44).attr("y",m+4).attr("width",Math.max(u-56,10)).attr("height",l-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${c};stroke-width:1px;opacity:0.6`),Ct(t,x);const C=m+l+(g-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return dt.rect(t,k)},a}p(ag,"browser");var Es=12;async function og(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?28:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=((t==null?void 0:t.width)??c.width)+(t.look==="neo"?a*2:a+Es),l=((t==null?void 0:t.height)??c.height)+(t.look==="neo"?n*2:n),d=0,u=h,g=-l,m=0,y=[{x:d+Es,y:g},{x:u,y:g},{x:u,y:m},{x:d,y:m},{x:d,y:g+Es},{x:d+Es,y:g}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=pt.svg(o),k=gt(t,{}),w=Yt(y),_=b.path(w,k);x=o.insert(()=>_,":first-child").attr("transform",`translate(${-h/2}, ${l/2})`),C&&x.attr("style",C)}else x=ar(o,h,l,y);return i&&x.attr("style",i),Ct(t,x),t.intersect=function(b){return dt.polygon(t,y,b)},o}p(og,"card");function ng(e,t){const{nodeStyles:r}=mt(t);t.label="";const i=e.insert("g").attr("class",_t(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,a=Math.max(28,t.width??0),n=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=pt.svg(i),c=gt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=Yt(n),l=o.path(h,c),d=i.insert(()=>l,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return dt.polygon(t,n,u)},i}p(ng,"choice");async function Cl(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,halfPadding:o}=await vt(e,t,_t(t),{ignoreMinWidth:!0}),c=16,h=(r==null?void 0:r.padding)??o,l=Math.sqrt(n.width**2+n.height**2)/2,d=t.look==="neo"?l+c:l+h;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(a),y=gt(t,{}),x=m.circle(0,0,d*2,y);u=a.insert(()=>x,":first-child"),u.attr("class","basic label-container").attr("style",ne(g))}else u=a.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",d).attr("cx",0).attr("cy",0);return Ct(t,u),t.calcIntersect=function(m,y){const x=m.width/2;return dt.circle(m,x,y)},t.intersect=function(m){return J.info("Circle intersect",t,d,m),dt.circle(t,d,m)},a}p(Cl,"circle");async function lg(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:a,halfPadding:n}=await vt(e,r,i),o=s.insert("rect",":first-child"),c=r.padding??0,h=r.positioned?r.width??0:a.width+c,l=r.positioned?r.height??0:a.height+c,d=r.positioned?-h/2:-a.width/2-n,u=r.positioned?-l/2:-a.height/2-n;return o.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",h).attr("height",l),Ct(r,o),r.intersect=function(g){return dt.rect(r,g)},s}p(lg,"composite");async function hg(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n,label:o}=await vt(e,t,_t(t)),c=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",h=t.padding??12,l=20,d=12,u=Math.max(n.width+h*2,t.width??0,90),g=Math.max(n.height+h*2+l,t.height??0),m=-g/2,{cssStyles:y}=t,x=a.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=pt.svg(a).path($e(-u/2,m,u,g,d),gt(t,{}));(b=x.node())==null||b.appendChild(w),y&&x.attr("style",y)}else x.append("rect").attr("x",-u/2).attr("y",m).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);x.append("text").attr("x",-u/2+12).attr("y",m+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${c}`).text(">_"),Ct(t,x);const C=m+l+(g-l)/2;return o.attr("transform",`translate(${-(n.width/2)-(n.x-(n.left??0))}, ${C-n.height/2-(n.y-(n.top??0))})`),t.intersect=function(k){return dt.rect(t,k)},a}p(hg,"consoleWindow");function cg(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},a={x:-(i/2)*t,y:i/2*r},n={x:-(i/2)*t,y:-(i/2)*r},o={x:i/2*t,y:-(i/2)*r};return`M ${a.x},${a.y} L ${o.x},${o.y}
|
|
234
|
+
M ${s.x},${s.y} L ${n.x},${n.y}`}p(cg,"createLine");function dg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",_t(t)).attr("id",t.domId??t.id),a=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:n}=t,o=pt.svg(s),c=gt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=o.circle(0,0,a*2,c),l=cg(a),d=o.path(l,c),u=s.insert(()=>h,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),n&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),Ct(t,u),t.intersect=function(g){return J.info("crossedCircle intersect",t,{radius:a,point:g}),dt.circle(t,a,g)},s}p(dg,"crossedCircle");function ur(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const u=o+d*l,g=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-g,y:-m})}return n}p(ur,"generateCirclePoints");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+o,l=a.height+c,d=Math.max(5,l*.1),{cssStyles:u}=t,g=[...ur(h/2,-l/2,d,30,-90,0),{x:-h/2-d,y:d},...ur(h/2+d*2,-d,d,20,-180,-270),...ur(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-l/2},...ur(h/2,l/2,d,20,0,90)],m=[{x:h/2,y:-l/2-d},{x:-h/2,y:-l/2-d},...ur(h/2,-l/2,d,20,-90,0),{x:-h/2-d,y:-d},...ur(h/2+h*.1,-d,d,20,-180,-270),...ur(h/2+h*.1,d,d,20,-90,-180),{x:-h/2-d,y:l/2},...ur(h/2,l/2,d,20,0,90),{x:-h/2,y:l/2+d},{x:h/2,y:l/2+d}],y=pt.svg(s),x=gt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Yt(g).replace("Z",""),k=y.path(b,x),w=Yt(m),_=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>_,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${d}, 0)`),n.attr("transform",`translate(${-h/2+d-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(A){return dt.polygon(t,m,A)},s}p(ug,"curlyBraceLeft");function gr(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const u=o+d*l,g=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:g,y:m})}return n}p(gr,"generateCirclePoints");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),d=Math.max(5,l*.1),{cssStyles:u}=t,g=[...gr(h/2,-l/2,d,20,-90,0),{x:h/2+d,y:-d},...gr(h/2+d*2,-d,d,20,-180,-270),...gr(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:l/2},...gr(h/2,l/2,d,20,0,90)],m=[{x:-h/2,y:-l/2-d},{x:h/2,y:-l/2-d},...gr(h/2,-l/2,d,20,-90,0),{x:h/2+d,y:-d},...gr(h/2+d*2,-d,d,20,-180,-270),...gr(h/2+d*2,d,d,20,-90,-180),{x:h/2+d,y:l/2},...gr(h/2,l/2,d,20,0,90),{x:h/2,y:l/2+d},{x:-h/2,y:l/2+d}],y=pt.svg(s),x=gt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Yt(g).replace("Z",""),k=y.path(b,x),w=Yt(m),_=y.path(w,{...x}),L=s.insert("g",":first-child");return L.insert(()=>_,":first-child").attr("stroke-opacity",0),L.insert(()=>k,":first-child"),L.attr("class","text"),u&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),L.attr("transform",`translate(${-d}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,L),t.intersect=function(A){return dt.polygon(t,m,A)},s}p(gg,"curlyBraceRight");function pe(e,t,r,i=100,s=0,a=180){const n=[],o=s*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let d=0;d<i;d++){const u=o+d*l,g=e+r*Math.cos(u),m=t+r*Math.sin(u);n.push({x:-g,y:-m})}return n}p(pe,"generateCirclePoints");async function pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.look==="neo"?18:t.padding??0,c=t.look==="neo"?12:t.padding??0,h=a.width+(t.look==="neo"?o*2:o),l=a.height+(t.look==="neo"?c*2:c),d=Math.max(5,l*.1),{cssStyles:u}=t,g=[...pe(h/2,-l/2,d,30,-90,0),{x:-h/2-d,y:d},...pe(h/2+d*2,-d,d,20,-180,-270),...pe(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:-l/2},...pe(h/2,l/2,d,20,0,90)],m=[...pe(-h/2+d+d/2,-l/2,d,20,-90,-180),{x:h/2-d/2,y:d},...pe(-h/2-d/2,-d,d,20,0,90),...pe(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...pe(-h/2+d+d/2,l/2,d,30,-180,-270)],y=[{x:h/2,y:-l/2-d},{x:-h/2,y:-l/2-d},...pe(h/2,-l/2,d,20,-90,0),{x:-h/2-d,y:-d},...pe(h/2+d*2,-d,d,20,-180,-270),...pe(h/2+d*2,d,d,20,-90,-180),{x:-h/2-d,y:l/2},...pe(h/2,l/2,d,20,0,90),{x:-h/2,y:l/2+d},{x:h/2-d-d/2,y:l/2+d},...pe(-h/2+d+d/2,-l/2,d,20,-90,-180),{x:h/2-d/2,y:d},...pe(-h/2-d/2,-d,d,20,0,90),...pe(-h/2-d/2,d,d,20,-90,0),{x:h/2-d/2,y:-d},...pe(-h/2+d+d/2,l/2,d,30,-180,-270)],x=pt.svg(s),C=gt(t,{fill:"none"});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const k=Yt(g).replace("Z",""),w=x.path(k,C),L=Yt(m).replace("Z",""),A=x.path(L,C),F=Yt(y),z=x.path(F,{...C}),q=s.insert("g",":first-child");return q.insert(()=>z,":first-child").attr("stroke-opacity",0),q.insert(()=>w,":first-child"),q.insert(()=>A,":first-child"),q.attr("class","text"),u&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(${d-d/4}, 0)`),n.attr("transform",`translate(${-h/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Ct(t,q),t.intersect=function(I){return dt.polygon(t,y,I)},s}p(pg,"curlyBraces");async function fg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=20,c=5,{shapeSvg:h,bbox:l}=await vt(e,t,_t(t)),d=Math.max(c,l.height+n*2,(t==null?void 0:t.height)??0),u=d/2,g=u-Math.sqrt(Math.max(0,u**2-(l.height/2)**2)),m=Math.max(d/4,g),y=Math.max(o,l.width+a*2+m*2,(l.width+a*2)*1.25,(t==null?void 0:t.width)??0),{cssStyles:x}=t,C=pt.svg(h),b=gt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=y,w=d,_=k-u,L=w/4,A=[{x:_,y:0},{x:L,y:0},{x:0,y:w/2},{x:L,y:w},{x:_,y:w},...tr(-_,-w/2,u,50,270,90)],F=Yt(A),z=C.path(F,b),q=h.insert(()=>z,":first-child");return q.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&q.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&q.selectChildren("path").attr("style",i),q.attr("transform",`translate(${-y/2}, ${-d/2})`),Ct(t,q),t.intersect=function(I){return dt.polygon(t,A,I)},h}p(fg,"curvedTrapezoid");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.padding??20,c=Math.max(a.width+o*2,t.width??0,100),h=Math.min(Math.max(c*.23,16),56),l=h*.27,d=Math.max(a.height+o*2,t.height?t.height-(2*h-l):0),u=Math.min(c*.177,d*.45),g=d+2*h-l,m=-g/2,y=m+2*h-l,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:C}=t;if(t.look==="handDrawn"){const F=pt.svg(s),z=gt(t,{}),q=F.path($e(-c/2,y,c,d,u),z),I=F.circle(0,m+h,h*2,z);x.insert(()=>I,":first-child"),x.insert(()=>q,":first-child"),C&&x.attr("style",C)}else x.append("rect").attr("x",-c/2).attr("y",y).attr("width",c).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),x.append("circle").attr("cx",0).attr("cy",m+h).attr("r",h).attr("style",i);Ct(t,x);const b=y+d/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${b-a.height/2-(a.y-(a.top??0))})`);const k=m+h,w=Math.asin(Math.min(1,(y-k)/h))*180/Math.PI,A=[...tr(0,-k,h,24,180+w,-w),...tr(-(-c/2+u),-(y+u),u,12,90,0),...tr(-(-c/2+u),-(g/2-u),u,12,360,270),...tr(-(c/2-u),-(g/2-u),u,12,270,180),...tr(-(c/2-u),-(y+u),u,12,180,90)];return t.intersect=function(F){return dt.polygon(t,A,F)},s}p(mg,"person");var Bb=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),_b=p((e,t,r,i,s,a)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),vb=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),yc=8,Cc=8;async function yg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?24:s,n=t.look==="neo"?24:s,o=t.width??0;if(t.width&&(t.width=t.width-n,t.width<Cc&&(t.width=Cc)),t.height){const b=o/2/(2.5+o/50);t.height=t.height-a-b*3,t.height<yc&&(t.height=yc)}const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,_t(t)),d=Math.max(t.width??0,h.width)+n,u=d/2,g=u/(2.5+d/50),m=Math.max(t.height??0,h.height)+a+g;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(c),b=_b(0,0,d,m,u,g),k=vb(0,g,d,m,u,g),w=gt(t,{}),_=C.path(b,w),L=C.path(k,gt(t,{fill:"none"}));y=c.insert(()=>L,":first-child"),y=c.insert(()=>_,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Bb(0,0,d,m,u,g);y=c.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ne(x)).attr("style",i)}return y.attr("label-offset-y",g),y.attr("transform",`translate(${-d/2}, ${-(m/2+g)})`),Ct(t,y),l.attr("transform",`translate(${-(h.width/2)-(h.x-(h.left??0))}, ${-(h.height/2)+(t.padding??0)/1.5-(h.y-(h.top??0))})`),t.intersect=function(C){const b=dt.rect(t,C),k=b.x-(t.x??0);if(u!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let w=g*g*(1-k*k/(u*u));w>0&&(w=Math.sqrt(w)),w=g-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},c}p(yg,"cylinder");async function Mi(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:a,bbox:n}=await vt(e,t,_t(t)),o=Math.max(n.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),c=Math.max(n.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),h=-o/2,l=-c/2;let d,{rx:u,ry:g}=t;const{cssStyles:m}=t;if(r!=null&&r.rx&&r.ry&&(u=r.rx,g=r.ry),t.look==="handDrawn"){const y=pt.svg(a),x=gt(t,{}),C=u||g?y.path($e(h,l,o,c,u||0),x):y.rectangle(h,l,o,c,x);d=a.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",ne(m))}else d=a.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",ne(u)).attr("ry",ne(g)).attr("x",h).attr("y",l).attr("width",o).attr("height",c);return Ct(t,d,t.look==="handDrawn"?void 0:{width:o,height:c}),t.calcIntersect=function(y,x){return dt.rect(y,x)},t.intersect=function(y){return dt.rect(t,y)},a}p(Mi,"drawRect");async function Cg(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:a,width:n,height:o}=t,c={rx:0,ry:0,labelPaddingX:i??(a??0)*2,labelPaddingY:s??a??0},h=await Mi(e,t,c);if(t.look==="handDrawn"){const g=pt.svg(h),m=gt(t,{}),y=h.select(".basic.label-container > path:nth-child(2)"),x=y.node();if(!x)return h;let C=null;if(x instanceof SVGGraphicsElement)C=x.getBBox();else return h;return h.insert(()=>g.line(C.x,C.y,C.x+C.width,C.y,m),".basic.label-container g.label"),h.insert(()=>g.line(C.x,C.y+C.height,C.x+C.width,C.y+C.height,m),".basic.label-container g.label"),y.remove(),h}const l=h.select(".basic.label-container"),d=(Number(l.attr("width"))||n)??0,u=(Number(l.attr("height"))||o)??0;return d>0&&u>0&&l.attr("stroke-dasharray",`${d} ${u}`),h}p(Cg,"datastore");async function xg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?16:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=o.width+s,l=o.height+a,d=l*.2,u=-h/2,g=-l/2-d/2,{cssStyles:m}=t,y=pt.svg(n),x=gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:u,y:g+d},{x:-u,y:g+d},{x:-u,y:-g},{x:u,y:-g},{x:u,y:g},{x:-u,y:g},{x:-u,y:g+d}],b=y.polygon(C.map(w=>[w.x,w.y]),x),k=n.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),c.attr("transform",`translate(${u+(t.padding??0)/2-(o.x-(o.left??0))}, ${g+d+(t.padding??0)/2-(o.y-(o.top??0))})`),Ct(t,k),t.intersect=function(w){return dt.rect(t,w)},n}p(xg,"dividedRectangle");async function bg(e,t){var m,y;const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const a=t.padding??0,n=t.look==="neo"?16:a,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t),{ignoreMinWidth:!0}),h=Math.sqrt(c.width**2+c.height**2)/2,l=(t!=null&&t.width?(t==null?void 0:t.width)/2:h)+(n??0),d=l+s;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const x=pt.svg(o),C=gt(t,{roughness:.2,strokeWidth:2.5}),b=gt(t,{roughness:.2,strokeWidth:1.5}),k=x.circle(0,0,d*2,C),w=x.circle(0,0,l*2,b);u=o.insert("g",":first-child"),u.attr("class",ne(t.cssClasses)).attr("style",ne(g)),(m=u.node())==null||m.appendChild(k),(y=u.node())==null||y.appendChild(w)}else{u=o.insert("g",":first-child");const x=u.insert("circle",":first-child"),C=u.insert("circle");u.attr("class","basic label-container").attr("style",i),x.attr("class","outer-circle").attr("style",i).attr("r",d).attr("cx",0).attr("cy",0),C.attr("class","inner-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0)}return Ct(t,u),t.intersect=function(x){return J.info("DoubleCircle intersect",t,d,x),dt.circle(t,d,x)},o}p(bg,"doublecircle");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n}=await vt(e,t,_t(t)),{theme:o,themeVariables:c}=Rt();We(s,t.colorIndex,o,c.borderColorArray);const h=n??10,l=a.width/2+h*2,d=a.height/2+h*2;let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(s),y=gt(t,{}),x=m.ellipse(0,0,l*2,d*2,y);u=s.insert(()=>x,":first-child"),u.attr("class","basic label-container"),g&&u.attr("style",g)}else u=s.insert("ellipse",":first-child").attr("class","basic label-container").attr("style",i).attr("rx",l).attr("ry",d).attr("cx",0).attr("cy",0);return t.width=l*2,t.height=d*2,Ct(t,u),t.calcIntersect=function(m,y){const x=m.width/2,C=m.height/2;return dt.ellipse(m,x,C,y)},t.intersect=function(m){return dt.ellipse(t,l,d,m)},s}p(kg,"usecaseEllipse");function Sg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.label="",t.labelStyle=i;const a=e.insert("g").attr("class",_t(t)).attr("id",t.domId??t.id),n=7,{cssStyles:o}=t,c=pt.svg(a),{nodeBorder:h}=r,l=gt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(l.roughness=0);const d=c.circle(0,0,n*2,l),u=a.insert(()=>d,":first-child");return u.selectAll("path").attr("style",`fill: ${h} !important;`),o&&o.length>0&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",o),s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),Ct(t,u),t.intersect=function(g){return J.info("filledCircle intersect",t,{radius:n,point:g}),dt.circle(t,n,g)},a}p(Sg,"filledCircle");var xc=10,bc=10;async function Tg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<xc&&(t.height=xc),t.width=((t==null?void 0:t.width)??0)-a-a/2,t.width<bc&&(t.width=bc));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+(a??0),l=t!=null&&t.height?t==null?void 0:t.height:h+o.height,d=l,u=[{x:0,y:-l},{x:d,y:-l},{x:d/2,y:0}],{cssStyles:g}=t,m=pt.svg(n),y=gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=Yt(u),C=m.path(x,y),b=n.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=h,t.height=l,Ct(t,b),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-l/2+(t.padding??0)/2+(o.y-(o.top??0))})`),t.intersect=function(k){return J.info("Triangle intersect",t,u,k),dt.polygon(t,u,k)},n}p(Tg,"flippedTriangle");async function wg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.padding??12,c=Math.max(a.width+o*2,t.width??0,90),h=a.height+o*2,l=Math.max(Math.min(h*.16,14),8),d=Math.max(h+l,t.height??0),u=d-l,g=Math.max(c*.38,28),m=-d/2,y=[{x:-c/2,y:m},{x:-c/2+g,y:m},{x:-c/2+g,y:m+l},{x:c/2,y:m+l},{x:c/2,y:d/2},{x:-c/2,y:d/2}],x=[`M${y[0].x},${y[0].y}`,...y.slice(1).map(w=>`L${w.x},${w.y}`),"Z"].join(" "),{cssStyles:C}=t;let b;if(t.look==="handDrawn"){const _=pt.svg(s).path(x,gt(t,{}));b=s.insert(()=>_,":first-child").attr("class","basic label-container"),C&&b.attr("style",C)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?Ct(t,b):Ct(t,b,{width:c,height:d});const k=m+l+u/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${k-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(w){return dt.polygon(t,y,w)},s}p(wg,"folder");function Bg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:a}=mt(t);t.label="";const n=e.insert("g").attr("class",_t(t)).attr("id",t.domId??t.id),{cssStyles:o}=t;let c=Math.max(70,(t==null?void 0:t.width)??0),h=Math.max(10,(t==null?void 0:t.height)??0);(r==="LR"||r==="RL")&&(c=Math.max(10,(t==null?void 0:t.width)??0),h=Math.max(70,(t==null?void 0:t.height)??0));const l=-1*c/2,d=-1*h/2,u=pt.svg(n),g=gt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const m=u.rectangle(l,d,c,h,g),y=n.insert(()=>m,":first-child");o&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",o),a&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",a),Ct(t,y);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(C){return dt.rect(t,C)},n}p(Bg,"forkJoin");async function _g(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=15,a=10,n=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-o*2,t.height<a&&(t.height=a),t.width=((t==null?void 0:t.width)??0)-n*2,t.width<s&&(t.width=s));const{shapeSvg:c,bbox:h}=await vt(e,t,_t(t)),l=(t!=null&&t.height?t==null?void 0:t.height:Math.max(a,h.height))+o*2,d=l/2,u=d-Math.sqrt(Math.max(0,d**2-(h.height/2)**2)),g=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,h.width)+u*2)+n*2,{cssStyles:m}=t,y=pt.svg(c),x=gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-g/2,y:-l/2},{x:g/2-d,y:-l/2},...tr(-g/2+d,0,d,50,90,270),{x:g/2-d,y:l/2},{x:-g/2,y:l/2}],b=Yt(C),k=y.path(b,x),w=c.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&w.selectChildren("path").attr("style",i),Ct(t,w),t.intersect=function(_){return J.info("Pill intersect",t,{radius:d,point:_}),dt.polygon(t,C,_)},c}p(_g,"halfRoundedRectangle");var Lb=p((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const a=t.padding??0,n=70,o=32,c=t.look==="neo"?n:a,h=t.look==="neo"?o:a;if(t.width||t.height){const k=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*k-h,t.height=(t.height??0)-c}const{shapeSvg:l,bbox:d}=await vt(e,t,_t(t)),u=(t!=null&&t.height?t==null?void 0:t.height:d.height)+c,g=u/s,m=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*g+h,y=[{x:g,y:0},{x:m-g,y:0},{x:m,y:-u/2},{x:m-g,y:-u},{x:g,y:-u},{x:0,y:-u/2}];let x;const{cssStyles:C}=t;if(t.look==="handDrawn"){const b=pt.svg(l),k=gt(t,{}),w=Lb(0,0,m,u,g),_=b.path(w,k);x=l.insert(()=>_,":first-child").attr("transform",`translate(${-m/2}, ${u/2})`),C&&x.attr("style",C)}else x=ar(l,m,u,y);return i&&x.attr("style",i),t.width=m,t.height=u,Ct(t,x),t.intersect=function(b){return dt.polygon(t,y,b)},l}p(vg,"hexagon");async function Lg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await vt(e,t,_t(t)),a=Math.max(30,(t==null?void 0:t.width)??0),n=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:o}=t,c=pt.svg(s),h=gt(t,{});t.look!=="handDrawn"&&(h.roughness=0,h.fillStyle="solid");const l=[{x:0,y:0},{x:a,y:0},{x:0,y:n},{x:a,y:n}],d=Yt(l),u=c.path(d,h),g=s.insert(()=>u,":first-child");return g.attr("class","basic label-container outer-path"),o&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",o),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-a/2}, ${-n/2})`),Ct(t,g),t.intersect=function(m){return J.info("Pill intersect",t,{points:l}),dt.polygon(t,l,m)},s}p(Lg,"hourglass");async function Fg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:d}=await vt(e,t,"icon-shape default"),u=t.pos==="t",g=o,m=o,{nodeBorder:y}=r,{stylesMap:x}=Dr(t),C=-m/2,b=-g/2,k=t.label?8:0,w=pt.svg(h),_=gt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(_.roughness=0,_.fillStyle="solid");const L=w.rectangle(C,b,m,g,_),A=Math.max(m,l.width),F=g+l.height+k,z=w.rectangle(-A/2,-F/2,A,F,{..._,fill:"transparent",stroke:"none"}),q=h.insert(()=>L,":first-child"),I=h.insert(()=>z);if(t.icon){const rt=h.append("g");rt.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const W=rt.node().getBBox(),E=W.width,M=W.height,v=W.x,R=W.y;rt.attr("transform",`translate(${-E/2-v},${u?l.height/2+k/2-M/2-R:-l.height/2-k/2-M/2-R})`),rt.attr("style",`color: ${x.get("stroke")??y};`)}return d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${u?-F/2:F/2-l.height})`),q.attr("transform",`translate(0,${u?l.height/2+k/2:-l.height/2-k/2})`),Ct(t,I),t.intersect=function(rt){if(J.info("iconSquare intersect",t,rt),!t.label)return dt.rect(t,rt);const W=t.x??0,E=t.y??0,M=t.height??0;let v=[];return u?v=[{x:W-l.width/2,y:E-M/2},{x:W+l.width/2,y:E-M/2},{x:W+l.width/2,y:E-M/2+l.height+k},{x:W+m/2,y:E-M/2+l.height+k},{x:W+m/2,y:E+M/2},{x:W-m/2,y:E+M/2},{x:W-m/2,y:E-M/2+l.height+k},{x:W-l.width/2,y:E-M/2+l.height+k}]:v=[{x:W-m/2,y:E-M/2},{x:W+m/2,y:E-M/2},{x:W+m/2,y:E-M/2+g},{x:W+l.width/2,y:E-M/2+g},{x:W+l.width/2/2,y:E+M/2},{x:W-l.width/2,y:E+M/2},{x:W-l.width/2,y:E-M/2+g},{x:W-m/2,y:E-M/2+g}],dt.polygon(t,v,rt)},h}p(Fg,"icon");async function Ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,label:d}=await vt(e,t,"icon-shape default"),u=20,g=t.label?8:0,m=t.pos==="t",{nodeBorder:y,mainBkg:x}=r,{stylesMap:C}=Dr(t),b=pt.svg(h),k=gt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=C.get("fill");k.stroke=w??x;const _=h.append("g");t.icon&&_.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const L=_.node().getBBox(),A=L.width,F=L.height,z=L.x,q=L.y,I=Math.max(A,F)*Math.SQRT2+u*2,rt=b.circle(0,0,I,k),W=Math.max(I,l.width),E=I+l.height+g,M=b.rectangle(-W/2,-E/2,W,E,{...k,fill:"transparent",stroke:"none"}),v=h.insert(()=>rt,":first-child"),R=h.insert(()=>M);return _.attr("transform",`translate(${-A/2-z},${m?l.height/2+g/2-F/2-q:-l.height/2-g/2-F/2-q})`),_.attr("style",`color: ${C.get("stroke")??y};`),d.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${m?-E/2:E/2-l.height})`),v.attr("transform",`translate(0,${m?l.height/2+g/2:-l.height/2-g/2})`),Ct(t,R),t.intersect=function($){return J.info("iconSquare intersect",t,$),dt.rect(t,$)},h}p(Ag,"iconCircle");async function Eg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:d,label:u}=await vt(e,t,"icon-shape default"),g=t.pos==="t",m=o+d*2,y=o+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Dr(t),k=-y/2,w=-m/2,_=t.label?8:0,L=pt.svg(h),A=gt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??C;const z=L.path($e(k,w,y,m,5),A),q=Math.max(y,l.width),I=m+l.height+_,rt=L.rectangle(-q/2,-I/2,q,I,{...A,fill:"transparent",stroke:"none"}),W=h.insert(()=>z,":first-child").attr("class","icon-shape2"),E=h.insert(()=>rt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),R=v.width,$=v.height,X=v.x,Z=v.y;M.attr("transform",`translate(${-R/2-X},${g?l.height/2+_/2-$/2-Z:-l.height/2-_/2-$/2-Z})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${g?-I/2:I/2-l.height})`),W.attr("transform",`translate(0,${g?l.height/2+_/2:-l.height/2-_/2})`),Ct(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return dt.rect(t,M);const v=t.x??0,R=t.y??0,$=t.height??0;let X=[];return g?X=[{x:v-l.width/2,y:R-$/2},{x:v+l.width/2,y:R-$/2},{x:v+l.width/2,y:R-$/2+l.height+_},{x:v+y/2,y:R-$/2+l.height+_},{x:v+y/2,y:R+$/2},{x:v-y/2,y:R+$/2},{x:v-y/2,y:R-$/2+l.height+_},{x:v-l.width/2,y:R-$/2+l.height+_}]:X=[{x:v-y/2,y:R-$/2},{x:v+y/2,y:R-$/2},{x:v+y/2,y:R-$/2+m},{x:v+l.width/2,y:R-$/2+m},{x:v+l.width/2/2,y:R+$/2},{x:v-l.width/2,y:R+$/2},{x:v-l.width/2,y:R-$/2+m},{x:v-y/2,y:R-$/2+m}],dt.polygon(t,X,M)},h}p(Eg,"iconRounded");async function Mg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const a=t.assetHeight??48,n=t.assetWidth??48,o=Math.max(a,n),c=i==null?void 0:i.wrappingWidth;t.width=Math.max(o,c??0);const{shapeSvg:h,bbox:l,halfPadding:d,label:u}=await vt(e,t,"icon-shape default"),g=t.pos==="t",m=o+d*2,y=o+d*2,{nodeBorder:x,mainBkg:C}=r,{stylesMap:b}=Dr(t),k=-y/2,w=-m/2,_=t.label?8:0,L=pt.svg(h),A=gt(t,{});t.look!=="handDrawn"&&(A.roughness=0,A.fillStyle="solid");const F=b.get("fill");A.stroke=F??C;const z=L.path($e(k,w,y,m,.1),A),q=Math.max(y,l.width),I=m+l.height+_,rt=L.rectangle(-q/2,-I/2,q,I,{...A,fill:"transparent",stroke:"none"}),W=h.insert(()=>z,":first-child"),E=h.insert(()=>rt);if(t.icon){const M=h.append("g");M.html(`<g>${await Ei(t.icon,{height:o,width:o,fallbackPrefix:""})}</g>`);const v=M.node().getBBox(),R=v.width,$=v.height,X=v.x,Z=v.y;M.attr("transform",`translate(${-R/2-X},${g?l.height/2+_/2-$/2-Z:-l.height/2-_/2-$/2-Z})`),M.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))},${g?-I/2:I/2-l.height})`),W.attr("transform",`translate(0,${g?l.height/2+_/2:-l.height/2-_/2})`),Ct(t,E),t.intersect=function(M){if(J.info("iconSquare intersect",t,M),!t.label)return dt.rect(t,M);const v=t.x??0,R=t.y??0,$=t.height??0;let X=[];return g?X=[{x:v-l.width/2,y:R-$/2},{x:v+l.width/2,y:R-$/2},{x:v+l.width/2,y:R-$/2+l.height+_},{x:v+y/2,y:R-$/2+l.height+_},{x:v+y/2,y:R+$/2},{x:v-y/2,y:R+$/2},{x:v-y/2,y:R-$/2+l.height+_},{x:v-l.width/2,y:R-$/2+l.height+_}]:X=[{x:v-y/2,y:R-$/2},{x:v+y/2,y:R-$/2},{x:v+y/2,y:R-$/2+m},{x:v+l.width/2,y:R-$/2+m},{x:v+l.width/2/2,y:R+$/2},{x:v-l.width/2,y:R+$/2},{x:v-l.width/2,y:R-$/2+m},{x:v-y/2,y:R-$/2+m}],dt.polygon(t,X,M)},h}p(Mg,"iconSquare");async function Og(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),a=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/a;const{labelStyles:n}=mt(t);t.labelStyle=n;const o=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const c=Math.max(t.label?o??0:0,(t==null?void 0:t.assetWidth)??s),h=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:c,l=t.constraint==="on"?h/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??a;t.width=Math.max(h,o??0);const{shapeSvg:d,bbox:u,label:g}=await vt(e,t,"image-shape default"),m=t.pos==="t",y=-h/2,x=-l/2,C=t.label?8:0,b=pt.svg(d),k=gt(t,{});t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const w=b.rectangle(y,x,h,l,k),_=Math.max(h,u.width),L=l+u.height+C,A=b.rectangle(-_/2,-L/2,_,L,{...k,fill:"none",stroke:"none"}),F=d.insert(()=>w,":first-child"),z=d.insert(()=>A);if(t.img){const q=d.append("image");q.attr("href",t.img),q.attr("width",h),q.attr("height",l),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-h/2},${m?L/2-l:-L/2})`)}return g.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${m?-l/2-u.height/2-C/2:l/2-u.height/2+C/2})`),F.attr("transform",`translate(0,${m?u.height/2+C/2:-u.height/2-C/2})`),Ct(t,z),t.intersect=function(q){if(J.info("iconSquare intersect",t,q),!t.label)return dt.rect(t,q);const I=t.x??0,rt=t.y??0,W=t.height??0;let E=[];return m?E=[{x:I-u.width/2,y:rt-W/2},{x:I+u.width/2,y:rt-W/2},{x:I+u.width/2,y:rt-W/2+u.height+C},{x:I+h/2,y:rt-W/2+u.height+C},{x:I+h/2,y:rt+W/2},{x:I-h/2,y:rt+W/2},{x:I-h/2,y:rt-W/2+u.height+C},{x:I-u.width/2,y:rt-W/2+u.height+C}]:E=[{x:I-h/2,y:rt-W/2},{x:I+h/2,y:rt-W/2},{x:I+h/2,y:rt-W/2+l},{x:I+u.width/2,y:rt-W/2+l},{x:I+u.width/2/2,y:rt+W/2},{x:I-u.width/2,y:rt+W/2},{x:I-u.width/2,y:rt-W/2+l},{x:I-h/2,y:rt-W/2+l}],dt.polygon(t,E,q)},d}p(Og,"imageSquare");async function $g(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=Math.max(c.height+a*2,t.height??0),l=Math.max(c.width+n*2,(t.width??0)-h),d=[{x:0,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:-3*h/6,y:-h}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=gt(t,{}),x=Yt(d),C=m.path(x,y);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),g&&u.attr("style",g)}else u=ar(o,l,h,d);return i&&u.attr("style",i),t.width=l,t.height=h,Ct(t,u),t.intersect=function(m){return dt.polygon(t,d,m)},o}p($g,"inv_trapezoid");async function Dg(e,t){const{shapeSvg:r,bbox:i,label:s}=await vt(e,t,"label"),a=r.insert("rect",":first-child");return a.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),Ct(t,a),t.intersect=function(c){return dt.rect(t,c)},r}p(Dg,"labelRect");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),d=[{x:0,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:-(3*h)/6,y:-h}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=gt(t,{}),x=Yt(d),C=m.path(x,y);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),g&&u.attr("style",g)}else u=ar(o,l,h,d);return i&&u.attr("style",i),t.width=l,t.height=h,Ct(t,u),t.intersect=function(m){return dt.polygon(t,d,m)},o}p(Ig,"lean_left");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=s,n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),d=[{x:-3*h/6,y:0},{x:l,y:0},{x:l+3*h/6,y:-h},{x:0,y:-h}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=gt(t,{}),x=Yt(d),C=m.path(x,y);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),g&&u.attr("style",g)}else u=ar(o,l,h,d);return i&&u.attr("style",i),t.width=l,t.height=h,Ct(t,u),t.intersect=function(m){return dt.polygon(t,d,m)},o}p(Pg,"lean_right");function Rg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",_t(t)).attr("id",t.domId??t.id),{cssStyles:a}=t,n=Math.max(35,(t==null?void 0:t.width)??0),o=Math.max(35,(t==null?void 0:t.height)??0),c=7,h=[{x:n,y:0},{x:0,y:o+c/2},{x:n-2*c,y:o+c/2},{x:0,y:2*o},{x:n,y:o-c/2},{x:2*c,y:o-c/2}],l=pt.svg(s),d=gt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=Yt(h),g=l.path(u,d),m=s.insert(()=>g,":first-child");return m.attr("class","outer-path"),a&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&m.selectAll("path").attr("style",i),m.attr("transform",`translate(-${n/2},${-o})`),Ct(t,m),t.intersect=function(y){return J.info("lightningBolt intersect",t,y),dt.polygon(t,h,y)},s}p(Rg,"lightningBolt");var Fb=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`a${s},${a} 0,0,0 ${r},0`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),Ab=p((e,t,r,i,s,a,n)=>[`M${e},${t+a}`,`M${e+r},${t+a}`,`a${s},${a} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${a} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+a+n}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Eb=p((e,t,r,i,s,a)=>[`M${e-r/2},${-i/2}`,`a${s},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),kc=10,Sc=10;async function qg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?24:s;if(t.width||t.height){const C=t.width??0;t.width=(t.width??0)-a,t.width<Sc&&(t.width=Sc);const k=C/2/(2.5+C/50);t.height=(t.height??0)-n-k*3,t.height<kc&&(t.height=kc)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,d=l/2,u=d/(2.5+l/50),g=(t!=null&&t.height?t==null?void 0:t.height:c.height)+u+n*2,m=g*.1;let y;const{cssStyles:x}=t;if(t.look==="handDrawn"){const C=pt.svg(o),b=Ab(0,0,l,g,d,u,m),k=Eb(0,u,l,g,d,u),w=gt(t,{}),_=C.path(b,w),L=C.path(k,w);o.insert(()=>L,":first-child").attr("class","line"),y=o.insert(()=>_,":first-child"),y.attr("class","basic label-container"),x&&y.attr("style",x)}else{const C=Fb(0,0,l,g,d,u,m);y=o.insert("path",":first-child").attr("d",C).attr("class","basic label-container outer-path").attr("style",ne(x)).attr("style",i)}return y.attr("label-offset-y",u),y.attr("transform",`translate(${-l/2}, ${-(g/2+u)})`),Ct(t,y),h.attr("transform",`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+u-(c.y-(c.top??0))})`),t.intersect=function(C){const b=dt.rect(t,C),k=b.x-(t.x??0);if(d!=0&&(Math.abs(k)<(t.width??0)/2||Math.abs(k)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-u)){let w=u*u*(1-k*k/(d*d));w>0&&(w=Math.sqrt(w)),w=u-w,C.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},o}p(qg,"linedCylinder");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(a??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(n??0)*2,u=t.look==="neo"?d/4:d/8,g=d+u,{cssStyles:m}=t,y=pt.svg(o),x=gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=[{x:-l/2-l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:g/2},...$r(-l/2-l/2*.1,g/2,l/2+l/2*.1,g/2,u,.8),{x:l/2+l/2*.1,y:-g/2},{x:-l/2-l/2*.1,y:-g/2},{x:-l/2,y:-g/2},{x:-l/2,y:g/2*1.1},{x:-l/2,y:-g/2}],b=y.polygon(C.map(w=>[w.x,w.y]),x),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),m&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),k.attr("transform",`translate(0,${-u/2})`),h.attr("transform",`translate(${-l/2+(t.padding??0)+l/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-u-(c.y-(c.top??0))})`),Ct(t,k),t.intersect=function(w){return dt.polygon(t,C,w)},o}p(Ng,"linedWaveEdgedRect");var Mb=56,Fo=72,Tc=8,wc=2,Ob=8,$b={normal:"usecase-actor-shape usecase-actor-normal",hollow:"usecase-actor-hollow",awesome:"usecase-actor-awesome",icon:"usecase-actor-icon"},Bc=Math.PI/3,_c=.6,Ao=p((e,t)=>{const r=t*_c,i=t*Math.sqrt(1-_c**2),s=Math.cos(Bc),a=-Math.sin(Bc),n=r*-a,o=e+r*s,c=i*s,h=i*a;return`M ${n-c} ${o-h} L ${n+c} ${o+h}`},"businessMarkerPathForCircle"),Db={normal:Ao(-24,12),hollow:Ao(-23,9),awesome:Ao(-21,13),icon:"M 12 -8 L 26 -26"},vc=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel"),xl=p((e,t,r,i,s=!1)=>{if(t.look==="handDrawn"){const o=pt.svg(e).path(r,gt(t,s?{fill:"none"}:{}));return e.insert(()=>o,":first-child").attr("class",i)}const a=e.append("path").attr("class",i).attr("d",r);return s&&a.attr("fill","none"),a},"appendActorPath"),Ib=p((e,t,r,i,s,a,n=!1)=>{if(t.look==="handDrawn"){const h=pt.svg(e).circle(r,i,s*2,gt(t,n?{fill:"none"}:{}));return e.insert(()=>h,":first-child").attr("class",a)}const o=e.append("circle").attr("class",a).attr("cx",r).attr("cy",i).attr("r",s);return n&&o.attr("fill","none"),o},"appendActorCircle"),Pb=p((e,t,r)=>{t.business&&e.append("path").attr("class","usecase-business-marker usecase-actor-business-marker").attr("d",Db[r]).attr("fill","none").attr("style","stroke: inherit !important; stroke-width: inherit !important")},"appendBusinessActorMarker");async function ms(e,t,r,i){const{labelStyles:s,nodeStyles:a}=mt(t);t.labelStyle=s;const n=r==="icon"||t.stereotype!==void 0?{...t,icon:r==="icon"?void 0:t.icon,stereotype:void 0}:t,{shapeSvg:o,bbox:c,label:h}=await vt(e,n,_t(t,`usecase-actor-variant usecase-actor-${r}`)),l=t.accessibleName??t.label;l&&o.attr("role","img").attr("aria-label",l),h.attr("class","label actor-label usecase-actor-label");const{theme:d,themeVariables:u}=Rt();We(o,t.colorIndex,d,u.borderColorArray);let g,m;if(t.stereotype){const F=await Nr(o,`«${t.stereotype}»`,{labelStyle:s,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});g=F.label.attr("class","label usecase-stereotype"),m=F.bbox}const y=o.append("g").attr("class",`usecase-actor-glyph ${$b[r]}`).attr("style",a||null);await i(y,t),Pb(y,t,r);const x=t.padding??Ob,C=(m==null?void 0:m.height)??0,b=Fo+Tc+c.height+(m?C+wc:0),k=Math.max(Mb,c.width,(m==null?void 0:m.width)??0)+x*2,w=b+x*2,_=-b/2;y.attr("transform",`translate(0,${_+Fo/2})`);let L=_+Fo+Tc;g&&m&&(L+=C/2,vc(g,m,L),L+=C/2+wc),vc(h,c,L+c.height/2);const A=o.insert("rect",":first-child").attr("class","usecase-actor-outline").attr("x",-k/2).attr("y",-w/2).attr("width",k).attr("height",w).attr("opacity",0).attr("aria-hidden","true");return Ct(t,A),t.intersect=F=>dt.rect(t,F),o}p(ms,"renderUsecaseActor");var Rb=["M 0 -12","C 6.627 -12 12 -17.373 12 -24","C 12 -30.627 6.627 -36 0 -36","C -6.627 -36 -12 -30.627 -12 -24","C -12 -17.373 -6.627 -12 0 -12 Z","M 0 -12 V 8","M -17 -5 H 17","M 0 8 L -15 28","M 0 8 L 15 28"].join(" ");async function Wg(e,t){return ms(e,t,"normal",(r,i)=>{xl(r,i,Rb,"usecase-actor-stick")})}p(Wg,"usecaseActor");var qb=["M 0 -34","C 7.18 -34 13 -28.18 13 -21","C 13 -13.82 7.18 -8 0 -8","C -7.18 -8 -13 -13.82 -13 -21","C -13 -28.18 -7.18 -34 0 -34 Z","M -24 25","C -24 7 -14 -3 0 -3","C 14 -3 24 7 24 25","C 24 28 21 30 18 30","H -18","C -21 30 -24 28 -24 25 Z"].join(" ");async function zg(e,t){return ms(e,t,"awesome",(r,i)=>{xl(r,i,qb,"usecase-actor-awesome-silhouette")})}p(zg,"usecaseActorAwesome");var Nb=["M -22 -10","H 22","V 0","H 6","L 22 17","L 13 28","L 0 13","L -13 28","L -22 17","L -6 0","H -22","Z"].join(" ");async function Hg(e,t){return ms(e,t,"hollow",(r,i)=>{Ib(r,i,0,-23,9,"usecase-actor-hollow-head",!0),xl(r,i,Nb,"usecase-actor-hollow-body",!0)})}p(Hg,"usecaseActorHollow");var ei=52,Lc=42,Fc=-2,Wb=p(async(e,t)=>{var h;const r=-ei/2,i=Fc-ei/2;if(t.look==="handDrawn"){const d=pt.svg(e).rectangle(r,i,ei,ei,gt(t,{}));e.insert(()=>d,":first-child").attr("class","usecase-actor-icon-frame")}else e.append("rect").attr("class","usecase-actor-icon-frame").attr("x",r).attr("y",i).attr("width",ei).attr("height",ei).attr("rx",4).attr("ry",4);const s=t.icon??"",a=await Kd(s.includes(":")?s:`fa:${s}`),n=await Ei(s,{height:Lc,width:Lc,fallbackPrefix:"fa"}),o=e.append("g").attr("class",`usecase-actor-icon-symbol${a?"":" usecase-actor-icon-fallback"}`).attr("aria-hidden","true").html(`<g>${n}</g>`),c=(h=o.node())==null?void 0:h.getBBox();c&&o.attr("transform",`translate(${-c.width/2-c.x},${Fc-c.height/2-c.y})`)},"drawIconActor");async function Yg(e,t){return ms(e,t,"icon",Wb)}p(Yg,"usecaseActorIcon");var Ac=p((e,t,r)=>{const i=(t.x??0)-(t.left??0),s=(t.y??0)-(t.top??0);e.attr("transform",`translate(${-t.width/2-i},${r-t.height/2-s})`)},"positionLabel");async function Ug(e,t){const r=t,{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const a=r.stereotype?{...t,stereotype:void 0}:t,{shapeSvg:n,bbox:o,halfPadding:c,label:h}=await vt(e,a,_t(t,"usecase-business-shape"));h.attr("class","label usecase-label");const{theme:l,themeVariables:d}=Rt();We(n,t.colorIndex,l,d.borderColorArray);let u,g;if(r.stereotype){const W=await Nr(n,`«${r.stereotype}»`,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0,width:t.wrappingWidth});u=W.label.attr("class","label usecase-stereotype"),g=W.bbox}const m=g?2:0,y=o.height+((g==null?void 0:g.height)??0)+m,x=Math.max(o.width,(g==null?void 0:g.width)??0),C=c??10,b=x/2+C*2,k=y/2+C*2,w=Math.min(Math.max(C/5,1),C/2),_=x/2+w,L=b-w,A=_/b,F=L/b,z=k*Math.sqrt(Math.max(0,1-A*A)),q=-k*Math.sqrt(Math.max(0,1-F*F));u&&g&&Ac(u,g,-y/2+g.height/2),Ac(h,o,y/2-o.height/2);let I;if(t.look==="handDrawn"){const E=pt.svg(n).ellipse(0,0,b*2,k*2,gt(t,{}));I=n.insert(()=>E,":first-child").attr("class","basic label-container usecase-business-ellipse")}else I=n.insert("ellipse",":first-child").attr("class","basic label-container usecase-business-ellipse").attr("style",s).attr("rx",b).attr("ry",k).attr("cx",0).attr("cy",0);n.append("path").attr("class","usecase-business-marker").attr("d",`M ${_} ${z} L ${L} ${q}`).attr("fill","none").attr("style",s||null);const rt=r.accessibleName??r.label;return rt&&n.attr("role","img").attr("aria-label",rt),Ct(t,I),t.calcIntersect=(W,E)=>dt.ellipse(W,W.width/2,W.height/2,E),t.intersect=W=>dt.ellipse(t,b,k,W),n}p(Ug,"usecaseBusiness");var Eo=8,Ec=4,zb=1,Mo=p((e,t,r,i)=>{const s=(t.x??0)-(t.left??0),a=(t.y??0)-(t.top??0);e.attr("transform",`translate(${r-t.width/2-s},${i-t.height/2-a})`)},"positionLabel"),Hb=p(e=>{const t=Number.parseFloat(e??"");return Number.isFinite(t)&&t>=0?t:zb},"numericStrokeWidth");async function jg(e,t){var W;const r=t,{labelStyles:i,nodeStyles:s}=mt(t),{stylesMap:a}=Dr(t);t.labelStyle=i;const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t,"usecase-json-table"));n.attr("role","img"),r.accessibleName&&n.attr("aria-label",r.accessibleName),c.attr("class","label usecase-json-title");const h=n.append("g").attr("class","usecase-json-table-grid"),l=[];for(const E of r.jsonRows??[]){const M=await Nr(h,E.key,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0}),v=await Nr(h,E.value,{labelStyle:i,useHtmlLabels:t.useHtmlLabels,padding:0,centerLabel:!0});l.push({key:{label:M.label.attr("class","label usecase-json-key"),bbox:M.bbox},value:{label:v.label.attr("class","label usecase-json-value"),bbox:v.bbox}})}const d=Math.max(0,...l.map(({key:E})=>E.bbox.width))+Eo*2,u=Math.max(0,...l.map(({value:E})=>E.bbox.width))+Eo*2,g=o.width+Eo*2,m=Math.max(g,d+u),y=u+Math.max(0,m-d-u),x=o.height+Ec*2,C=l.map(({key:E,value:M})=>Math.max(E.bbox.height,M.bbox.height)+Ec*2),b=x+C.reduce((E,M)=>E+M,0),k=Hb(a.get("stroke-width")),w=m+k*2,_=b+k*2,L=-m/2,A=-b/2,F=t.look==="handDrawn"?pt.svg(n):void 0,z=F?gt(t,{}):void 0,q=p((E,M,v,R,$,X)=>{if(F&&z){const Z=F.rectangle(v,R,$,X,z);return E.insert(()=>Z,":first-child").attr("class",M)}return E.insert("rect",":first-child").attr("class",M).attr("x",v).attr("y",R).attr("width",$).attr("height",X).attr("style",s)},"insertCell"),I=q(n,"label-container usecase-json-border",-w/2,-_/2,w,_);q(h,"usecase-json-cell usecase-json-title-cell",L,A,m,x),(W=h.node())==null||W.append(c.node()),Mo(c,o,0,A+x/2);let rt=A+x;return l.forEach(({key:E,value:M},v)=>{var X;const R=C[v],$=h.append("g").attr("class","usecase-json-row").attr("data-row-index",v).attr("transform",`translate(0,${rt})`);q($,"usecase-json-cell usecase-json-key-cell",L,0,d,R),q($,"usecase-json-cell usecase-json-value-cell",L+d,0,y,R),(X=$.node())==null||X.append(E.label.node(),M.label.node()),Mo(E.label,E.bbox,L+d/2,R/2),Mo(M.label,M.bbox,L+d+y/2,R/2),rt+=R}),Ct(t,I),t.intersect=E=>dt.rect(t,E),n}p(jg,"usecaseJsonTable");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-2*o,10),t.height=Math.max(((t==null?void 0:t.height)??0)-n*2-2*o,10));const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,_t(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+a*2+2*o,u=(t!=null&&t.height?t==null?void 0:t.height:h.height)+n*2+2*o,g=d-2*o,m=u-2*o,y=-g/2,x=-m/2,{cssStyles:C}=t,b=pt.svg(c),k=gt(t,{}),w=[{x:y-o,y:x+o},{x:y-o,y:x+m+o},{x:y+g-o,y:x+m+o},{x:y+g-o,y:x+m},{x:y+g,y:x+m},{x:y+g,y:x+m-o},{x:y+g+o,y:x+m-o},{x:y+g+o,y:x-o},{x:y+o,y:x-o},{x:y+o,y:x},{x:y,y:x},{x:y,y:x+o}],_=[{x:y,y:x+o},{x:y+g-o,y:x+o},{x:y+g-o,y:x+m},{x:y+g,y:x+m},{x:y+g,y:x},{x:y,y:x}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Yt(w);let A=b.path(L,k);const F=Yt(_);let z=b.path(F,k);t.look!=="handDrawn"&&(A=nn(A),z=nn(z));const q=c.insert("g",":first-child");return q.insert(()=>A),q.insert(()=>z),q.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(h.width/2)-o-(h.x-(h.left??0))}, ${-(h.height/2)+o-(h.y-(h.top??0))})`),Ct(t,q),t.intersect=function(I){return dt.polygon(t,w,I)},c}p(Gg,"multiRect");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=t.padding??0,c=t.look==="neo"?16:o,h=t.look==="neo"?12:o;let l=!0;(t.width||t.height)&&(l=!1,t.width=((t==null?void 0:t.width)??0)-c*2,t.height=((t==null?void 0:t.height)??0)-h*3);const d=Math.max(a.width,(t==null?void 0:t.width)??0)+c*2,u=Math.max(a.height,(t==null?void 0:t.height)??0)+h*3,g=t.look==="neo"?u/4:u/8,m=u+(l?g/2:-g/2),y=-d/2,x=-m/2,C=10,{cssStyles:b}=t,k=$r(y-C,x+m+C,y+d-C,x+m+C,g,.8),w=k==null?void 0:k[k.length-1],_=[{x:y-C,y:x+C},{x:y-C,y:x+m+C},...k,{x:y+d-C,y:w.y-C},{x:y+d,y:w.y-C},{x:y+d,y:w.y-2*C},{x:y+d+C,y:w.y-2*C},{x:y+d+C,y:x-C},{x:y+C,y:x-C},{x:y+C,y:x},{x:y,y:x},{x:y,y:x+C}],L=[{x:y,y:x+C},{x:y+d-C,y:x+C},{x:y+d-C,y:w.y-C},{x:y+d,y:w.y-C},{x:y+d,y:x},{x:y,y:x}],A=pt.svg(s),F=gt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=Yt(_),q=A.path(z,F),I=Yt(L),rt=A.path(I,F),W=s.insert(()=>q,":first-child");return W.insert(()=>rt),W.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&W.selectAll("path").attr("style",i),W.attr("transform",`translate(0,${-g/2})`),n.attr("transform",`translate(${-(a.width/2)-C-(a.x-(a.left??0))}, ${-(a.height/2)+C-g-(a.y-(a.top??0))})`),Ct(t,W),t.intersect=function(E){return dt.polygon(t,_,E)},s}p(Xg,"multiWaveEdgedRectangle");async function Vg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i,t.useHtmlLabels||de(Qt())||(t.centerLabel=!0);const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-h/2,u=-l/2,{cssStyles:g}=t,m=pt.svg(n),y=gt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=m.rectangle(d,u,h,l,y),C=n.insert(()=>x,":first-child");return C.attr("class","basic label-container outer-path"),c.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",g),s&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",s),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ct(t,C),t.intersect=function(b){return dt.rect(t,b)},n}p(Vg,"note");var Yb=p((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Zg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await vt(e,t,_t(t)),n=a.width+(t.padding??0),o=a.height+(t.padding??0),c=n+o,h=.5,l=[{x:c/2,y:0},{x:c,y:-c/2},{x:c/2,y:-c},{x:0,y:-c/2}];let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=pt.svg(s),m=gt(t,{}),y=Yb(0,0,c),x=g.path(y,m);d=s.insert(()=>x,":first-child").attr("transform",`translate(${-c/2+h}, ${c/2})`),u&&d.attr("style",u)}else d=ar(s,c,c,l),d.attr("transform",`translate(${-c/2+h}, ${c/2})`);return i&&d.attr("style",i),Ct(t,d),t.calcIntersect=function(g,m){const y=g.width,x=[{x:y/2,y:0},{x:y,y:-y/2},{x:y/2,y:-y},{x:0,y:-y/2}];return dt.polygon(g,x,m)},t.intersect=function(g){return this.calcIntersect(t,g)},s}p(Zg,"question");async function Kg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?21:s??0,n=t.look==="neo"?12:s??0,{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=c.width+(t.look==="neo"?a*2:a),d=Math.max(c.height+(t.look==="neo"?n*2:n),t.height??0),u=d/4,m=-Math.max(l,(t.width??0)-u)/2,y=-d/2,x=y/2,C=[{x:m+x,y},{x:m,y:0},{x:m+x,y:-y},{x:-m,y:-y},{x:-m,y}],{cssStyles:b}=t,k=pt.svg(o),w=gt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=Yt(C),L=k.path(_,w),A=o.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-x/2},0)`),h.attr("transform",`translate(${-x/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Ct(t,A),t.intersect=function(F){return dt.polygon(t,C,F)},o}p(Kg,"rect_left_inv_arrow");async function Qg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const a=e.insert("g").attr("class",s).attr("id",t.domId||t.id),n=a.insert("g"),o=a.insert("g").attr("class","label").attr("style",i),c=t.description,h=t.label,l=await pr(o,h,t.labelStyle,!0,!0);let d={width:0,height:0};if(de(Rt())){const F=l.children[0],z=Pt(l);d=F.getBoundingClientRect(),z.attr("width",d.width),z.attr("height",d.height)}J.info("Text 2",c);const u=c||[],g=l.getBBox(),m=await pr(o,Array.isArray(u)?u.join("<br/>"):u,t.labelStyle,!0,!0),y=m.children[0],x=Pt(m);d=y.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const C=(t.padding||0)/2;Pt(m).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+C+5)+")"),Pt(l).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=o.node().getBBox(),o.attr("transform","translate("+-d.width/2+", "+(-d.height/2-C+3)+")");const b=d.width+(t.padding||0),k=d.height+(t.padding||0),w=-d.width/2-C,_=-d.height/2-C;let L,A;if(t.look==="handDrawn"){const F=pt.svg(a),z=gt(t,{}),q=F.path($e(w,_,b,k,t.rx||0),z),I=F.line(-d.width/2-C,-d.height/2-C+g.height+C,d.width/2+C,-d.height/2-C+g.height+C,z);A=a.insert(()=>(J.debug("Rough node insert CXC",q),I),":first-child"),L=a.insert(()=>(J.debug("Rough node insert CXC",q),q),":first-child")}else L=n.insert("rect",":first-child"),A=n.insert("line"),L.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-C).attr("y",-d.height/2-C).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),A.attr("class","divider").attr("x1",-d.width/2-C).attr("x2",d.width/2+C).attr("y1",-d.height/2-C+g.height+C).attr("y2",-d.height/2-C+g.height+C);return Ct(t,L),t.intersect=function(F){return dt.rect(t,F)},a}p(Qg,"rectWithTitle");async function Jg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Mi(e,t,s)}p(Jg,"roundedRect");var Ir=8;async function tp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0,{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=((t==null?void 0:t.width)??o.width)+s*2+(t.look==="neo"?Ir:Ir*2),l=((t==null?void 0:t.height)??o.height)+a*2,d=h-Ir,u=l,g=Ir-h/2,m=-l/2,{cssStyles:y}=t,x=pt.svg(n),C=gt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const b=[{x:g,y:m},{x:g+d,y:m},{x:g+d,y:m+u},{x:g-Ir,y:m+u},{x:g-Ir,y:m},{x:g,y:m},{x:g,y:m+u}],k=x.polygon(b.map(_=>[_.x,_.y]),C),w=n.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path").attr("style",ne(y)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),y&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),c.attr("transform",`translate(${Ir/2-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Ct(t,w),t.intersect=function(_){return dt.rect(t,_)},n}p(tp,"shadedProcess");async function ep(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-a*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-n*2,10));const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,d=((t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2)*1.5,u=l,g=d/1.5,m=-u/2,y=-g/2,{cssStyles:x}=t,C=pt.svg(o),b=gt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=[{x:m,y},{x:m,y:y+g},{x:m+u,y:y+g},{x:m+u,y:y-g/2}],w=Yt(k),_=C.path(w,b),L=o.insert(()=>_,":first-child");return L.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&L.selectChildren("path").attr("style",i),L.attr("transform",`translate(0, ${g/4})`),h.attr("transform",`translate(${-u/2+(t.padding??0)-(c.x-(c.left??0))}, ${-g/4+(t.padding??0)-(c.y-(c.top??0))})`),Ct(t,L),t.intersect=function(A){return dt.polygon(t,k,A)},o}p(ep,"slopedRect");async function rp(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,a={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s},n=await Mi(e,t,a);if(t.colorIndex!==void 0){const{theme:o,themeVariables:c}=Rt();We(n,t.colorIndex,o,c.borderColorArray)}return n}p(rp,"squareRect");var cn=50,Ub=p((e,t,r)=>{const i=e.height+r,s=i*Math.cos(Math.PI/(2*(cn-1))),a=Math.sqrt(Math.max(0,s**2-e.height**2));return{w:Math.max(e.width+i/4+t,1.5*i+(i-s),e.width+t+i-a),h:i}},"stadiumDimensions");async function ip(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?40:s,n=t.look==="neo"?24:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),{w:h,h:l}=Ub(c,a,n),d=l/2,{cssStyles:u}=t,g=pt.svg(o),m=gt(t,{});t.look!=="handDrawn"&&(m.roughness=0,m.fillStyle="solid");const y=[{x:-h/2+d,y:-l/2},{x:h/2-d,y:-l/2},...tr(-h/2+d,0,d,cn,90,270),{x:h/2-d,y:l/2},...tr(h/2-d,0,d,cn,270,450)],x=Yt(y),C=g.path(x,m),b=o.insert(()=>C,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),Ct(t,b),t.intersect=function(k){return dt.polygon(t,y,k)},o}p(ip,"stadium");async function sp(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Mi(e,t,r)}p(sp,"state");function ap(e,t,{config:{themeVariables:r}}){var b,k;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{cssStyles:a}=t,{lineColor:n,stateBorder:o,nodeBorder:c,nodeShadow:h}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const l=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=pt.svg(l),u=gt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=d.circle(0,0,t.width,{...u,stroke:n,strokeWidth:2}),m=o??c,y=(t.width??0)*5/14,x=d.circle(0,0,y,{...u,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=l.insert(()=>g,":first-child");if(C.insert(()=>x),t.look!=="handDrawn"&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),s&&C.selectAll("path").attr("style",s),t.width<25&&h&&t.look!=="handDrawn"){const w=((k=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:k.id)??"",_=w?`${w}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${_})`)}return Ct(t,C),t.intersect=function(w){return dt.circle(t,(t.width??0)/2,w)},l}p(ap,"stateEnd");function op(e,t,{config:{themeVariables:r}}){var o,c;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const a=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let n;if(t.look==="handDrawn"){const l=pt.svg(a).circle(0,0,t.width,EC(i));n=a.insert(()=>l),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else n=a.insert("circle",":first-child"),n.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const h=((c=(o=e.node())==null?void 0:o.ownerSVGElement)==null?void 0:c.id)??"",l=h?`${h}-drop-shadow-small`:"drop-shadow-small";n.attr("style",`filter:url(#${l})`)}return Ct(t,n),t.intersect=function(h){return dt.circle(t,(t.width??7)/2,h)},a}p(op,"stateStart");var ri=8;async function np(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,a=t.look==="neo"?28:s,n=t.look==="neo"?12:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=Math.max(c.width+2*ri+a,t.width??0),l=Math.max(c.height+n,t.height??0),d=h-2*ri,u=l,g=-h/2,m=-l/2,y=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){const x=pt.svg(o),C=gt(t,{}),b=x.rectangle(g,m,d+16,u,C),k=x.line(g+ri,m,g+ri,m+u,C),w=x.line(g+ri+d,m,g+ri+d,m+u,C);o.insert(()=>k,":first-child"),o.insert(()=>w,":first-child");const _=o.insert(()=>b,":first-child"),{cssStyles:L}=t;_.attr("class","basic label-container").attr("style",ne(L)),Ct(t,_)}else{const x=ar(o,d,u,y);i&&x.attr("style",i),Ct(t,x)}return t.intersect=function(x){return dt.polygon(t,y,x)},o}p(np,"subroutine");var Oo=.2;async function lp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-n*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-a*2-Oo*(t.height+n*2),10));const{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n*2,l=Oo*h,d=Oo*h,g=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2+l-l,m=h,y=-g/2,x=-m/2,{cssStyles:C}=t,b=pt.svg(o),k=gt(t,{}),w=[{x:y-l/2,y:x},{x:y+g+l/2,y:x},{x:y+g+l/2,y:x+m},{x:y-l/2,y:x+m}],_=[{x:y+g-l/2,y:x+m},{x:y+g+l/2,y:x+m},{x:y+g+l/2,y:x+m-d}];t.look!=="handDrawn"&&(k.roughness=0,k.fillStyle="solid");const L=Yt(w),A=b.path(L,k),F=Yt(_),z=b.path(F,{...k,fillStyle:"solid"}),q=o.insert(()=>z,":first-child");return q.insert(()=>A,":first-child"),q.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),Ct(t,q),t.intersect=function(I){return dt.polygon(t,w,I)},o}p(lp,"taggedRect");async function hp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,label:n}=await vt(e,t,_t(t)),o=Math.max(a.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),c=Math.max(a.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),h=c/8,l=.2*o,d=.2*c,u=c+h,{cssStyles:g}=t,m=pt.svg(s),y=gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-o/2-o/2*.1,y:u/2},...$r(-o/2-o/2*.1,u/2,o/2+o/2*.1,u/2,h,.8),{x:o/2+o/2*.1,y:-u/2},{x:-o/2-o/2*.1,y:-u/2}],C=-o/2+o/2*.1,b=-u/2-d*.4,k=[{x:C+o-l,y:(b+c)*1.3},{x:C+o,y:b+c-d},{x:C+o,y:(b+c)*.9},...$r(C+o,(b+c)*1.25,C+o-l,(b+c)*1.3,-c*.02,.5)],w=Yt(x),_=m.path(w,y),L=Yt(k),A=m.path(L,{...y,fillStyle:"solid"}),F=s.insert(()=>A,":first-child");return F.insert(()=>_,":first-child"),F.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-h/2})`),n.attr("transform",`translate(${-o/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-h/2-(a.y-(a.top??0))})`),Ct(t,F),t.intersect=function(z){return dt.polygon(t,x,z)},s}p(hp,"taggedWaveEdgedRectangle");async function cp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a}=await vt(e,t,_t(t)),n=Math.max(a.width+(t.padding??0),(t==null?void 0:t.width)||0),o=Math.max(a.height+(t.padding??0),(t==null?void 0:t.height)||0),c=-n/2,h=-o/2,l=s.insert("rect",":first-child");return l.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",c).attr("y",h).attr("width",n).attr("height",o),Ct(t,l),t.intersect=function(d){return dt.rect(t,d)},s}p(cp,"text");var jb=p((e,t,r,i,s,a)=>`M${e},${t}
|
|
202
235
|
a${s},${a} 0,0,1 0,${-i}
|
|
203
236
|
l${r},0
|
|
204
237
|
a${s},${a} 0,0,1 0,${i}
|
|
205
238
|
M${r},${-i}
|
|
206
239
|
a${s},${a} 0,0,0 0,${i}
|
|
207
|
-
l${-r},0`,"createCylinderPathD"),
|
|
208
|
-
M${
|
|
209
|
-
M${d},${m-re} L${d},${m+p}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.path(S,C),B=o.insert(()=>w,":first-child");return B.attr("transform",`translate(${re/2}, ${re/2})`),B.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&B.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+re/2-(n.x-(n.left??0))}, ${-(n.height/2)+re/2-(n.y-(n.top??0))})`),Ct(t,B),t.intersect=function(L){return ht.polygon(t,k,L)},o}f(Zf,"windowPane");var $c=new Set(["redux-color","redux-dark-color"]),Yk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function kl(e,t){var At,Lt,qt,vt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=te(),{rowEven:a,rowOdd:o,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:lt}=te(),{background:gt}=lt,Et={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${gt}`]};await kl(e,Et)}const c=te();t.useHtmlLabels=c.htmlLabels;let h=((At=c.er)==null?void 0:At.diagramPadding)??10,u=((Lt=c.er)==null?void 0:Lt.entityPadding)??6;const{cssStyles:p}=t,{labelStyles:d,nodeStyles:m}=xt(t);if(r.attributes.length===0&&t.label){const lt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};br(t.label,c)+lt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const gt=await Ni(e,t,lt);if(i!=null&&$c.has(i)){const Et=r.colorIndex??0;gt.attr("data-color-id",`color-${Et%l.length}`)}if(!lr(c.htmlLabels)){const Et=gt.select("text"),Rt=(qt=Et.node())==null?void 0:qt.getBBox();Et.attr("transform",`translate(${-Rt.width/2}, 0)`)}return gt}c.htmlLabels||(h*=1.25,u*=1.25);let y=wt(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await ui(x,t.label??"",c,0,0,["name"],d);C.height+=u;let k=0;const S=[],w=[];let B=0,L=0,E=0,F=0,X=!0,N=!0;for(const lt of r.attributes){const gt=await ui(x,lt.type,c,0,k,["attribute-type"],d);B=Math.max(B,gt.width+h);const Et=await ui(x,lt.name,c,0,k,["attribute-name"],d);L=Math.max(L,Et.width+h);const Rt=await ui(x,lt.keys.join(),c,0,k,["attribute-keys"],d);E=Math.max(E,Rt.width+h);const Ut=await ui(x,lt.comment,c,0,k,["attribute-comment"],d);F=Math.max(F,Ut.width+h);const D=Math.max(gt.height,Et.height,Rt.height,Ut.height)+u;w.push({yOffset:k,rowHeight:D}),k+=D}let z=4;E<=h&&(X=!1,E=0,z--),F<=h&&(N=!1,F=0,z--);const at=x.node().getBBox();if(C.width+h*2-(B+L+E+F)>0){const lt=C.width+h*2-(B+L+E+F);B+=lt/z,L+=lt/z,E>0&&(E+=lt/z),F>0&&(F+=lt/z)}const j=B+L+E+F,A=ft.svg(x),O=dt(t,{});t.look!=="handDrawn"&&(O.roughness=0,O.fillStyle="solid");let v=0;w.length>0&&(v=w.reduce((lt,gt)=>lt+((gt==null?void 0:gt.rowHeight)??0),0));const R=Math.max(at.width+h*2,(t==null?void 0:t.width)||0,j),P=Math.max((v??0)+C.height,(t==null?void 0:t.height)||0),H=-R/2,Z=-P/2;if(x.selectAll("g:not(:first-child)").each((lt,gt,Et)=>{const Rt=Pt(Et[gt]),Ut=Rt.attr("transform");let D=0,Ft=0;if(Ut){const we=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Ut);we&&(D=parseFloat(we[1]),Ft=parseFloat(we[2]),Rt.attr("class").includes("attribute-name")?D+=B:Rt.attr("class").includes("attribute-keys")?D+=B+L:Rt.attr("class").includes("attribute-comment")&&(D+=B+L+E))}Rt.attr("transform",`translate(${H+h/2+D}, ${Ft+Z+C.height+u/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(Z+u/2)+")"),i!=null&&$c.has(i)){const lt=r.colorIndex??0;x.attr("data-color-id",`color-${lt%l.length}`)}const ut=A.rectangle(H,Z,R,P,O),pt=x.insert(()=>ut,":first-child").attr("class","outer-path").attr("style",p.join(""));S.push(0);for(const[lt,gt]of w.entries()){const Rt=(lt+1)%2===0&>.yOffset!==0,Ut=A.rectangle(H,C.height+Z+(gt==null?void 0:gt.yOffset),R,gt==null?void 0:gt.rowHeight,{...O,fill:Rt?a:o,stroke:n});x.insert(()=>Ut,"g.label").attr("style",p.join("")).attr("class",`row-rect-${Rt?"even":"odd"}`)}const bt=1e-4;let Tt=di(H,C.height+Z,R+H,C.height+Z,bt),nt=A.polygon(Tt.map(lt=>[lt.x,lt.y]),O);if(x.insert(()=>nt).attr("class","divider"),Tt=di(B+H,C.height+Z,B+H,P+Z,bt),nt=A.polygon(Tt.map(lt=>[lt.x,lt.y]),O),x.insert(()=>nt).attr("class","divider"),X){const lt=B+L+H;Tt=di(lt,C.height+Z,lt,P+Z,bt),nt=A.polygon(Tt.map(gt=>[gt.x,gt.y]),O),x.insert(()=>nt).attr("class","divider")}if(N){const lt=B+L+E+H;Tt=di(lt,C.height+Z,lt,P+Z,bt),nt=A.polygon(Tt.map(gt=>[gt.x,gt.y]),O),x.insert(()=>nt).attr("class","divider")}for(const lt of S){const gt=C.height+Z+lt;Tt=di(H,gt,R+H,gt,bt),nt=A.polygon(Tt.map(Et=>[Et.x,Et.y]),O),x.insert(()=>nt).attr("class","divider")}if(Ct(t,pt),m&&t.look!=="handDrawn")if(i!=null&&Yk.has(i))x.selectAll("path").attr("style",m);else{const lt=m.split(";"),gt=(vt=lt==null?void 0:lt.filter(Et=>Et.includes("stroke")))==null?void 0:vt.map(Et=>`${Et}`).join("; ");x.selectAll("path").attr("style",gt??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(lt){return ht.rect(t,lt)},x}f(kl,"erBox");async function ui(e,t,r,i=0,s=0,a=[],o=""){const n=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",o);t!==Wh(t)&&(t=Wh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ve(n,t,{width:br(t,r)+100,style:o,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(lr(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const u=Pt(l);c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}return c}f(ui,"addText");function di(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(di,"lineToPolygon");async function Kf(e,t,r,i,s=r.class.padding??12){const a=i?0:3,o=e.insert("g").attr("class",wt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,u=0,p=0,d=0;if(n=o.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const k=t.annotations[0];await ns(n,{text:`«${k}»`},0),u=n.node().getBBox().height}l=o.insert("g").attr("class","label-group text"),await ns(l,t,0,["font-weight: bolder"]);const m=l.node().getBBox();p=m.height,c=o.insert("g").attr("class","members-group text");let y=0;for(const k of t.members){const S=await ns(c,k,y,[k.parseClassifier()]);y+=S+a}d=c.node().getBBox().height,d<=0&&(d=s/2),h=o.insert("g").attr("class","methods-group text");let x=0;for(const k of t.methods){const S=await ns(h,k,x,[k.parseClassifier()]);x+=S+a}let C=o.node().getBBox();if(n!==null){const k=n.node().getBBox();n.attr("transform",`translate(${-k.width/2})`)}return l.attr("transform",`translate(${-m.width/2}, ${u})`),C=o.node().getBBox(),c.attr("transform",`translate(0, ${u+p+s*2})`),C=o.node().getBBox(),h.attr("transform",`translate(0, ${u+p+(d?d+s*4:s*2)})`),C=o.node().getBBox(),{shapeSvg:o,bbox:C}}f(Kf,"textHelper");async function ns(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=te();let o="useHtmlLabels"in t?t.useHtmlLabels:lr(a.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!o&&n.startsWith("\\")&&(n=n.substring(1)),xs(n)&&(o=!0);const l=await Ve(s,Xn(Or(n)),{width:br(n,a)+50,classes:"markdown-node-label",useHtmlLabels:o},a);let c,h=1;if(o){const u=l.children[0],p=Pt(l);h=u.innerHTML.split("<br>").length,u.innerHTML.includes("</math>")&&(h+=u.innerHTML.split("<mrow>").length-1),await yl(u),c=u.getBoundingClientRect(),p.attr("width",c.width),p.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Pt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const u=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(u.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(u.textContent=u.textContent[0]+" "+u.textContent.substring(1))),u.textContent==="undefined"&&(u.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(ns,"addText");async function Qf(e,t){var A,O;const r=zt(),{themeVariables:i}=r,{useGradient:s}=i,a=r.class.padding??12,o=a,n=t.useHtmlLabels??lr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await Kf(e,t,r,n,o),{labelStyles:u,nodeStyles:p}=xt(t);t.labelStyle=u,t.cssStyles=l.styles||"";const d=((A=l.styles)==null?void 0:A.join(";"))||p||"";t.cssStyles||(t.cssStyles=d.replaceAll("!important","").split(";"));const m=l.members.length===0&&l.methods.length===0&&!((O=r.class)!=null&&O.hideEmptyMembersBox),y=ft.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Math.max(t.width??0,h.width);let k=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?k+=o:l.members.length>0&&l.methods.length===0&&(k+=o*2);const w=-C/2,B=-k/2;let L=m?a*2:l.members.length===0&&l.methods.length===0?-a:0;S&&(L=a*2);const E=y.rectangle(w-a,B-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0),C+2*a,k+2*a+L,x),F=c.insert(()=>E,":first-child");F.attr("class","basic label-container outer-path");const X=F.node().getBBox(),N=c.select(".annotation-group").node().getBBox().height-(m?a/2:0)||0,z=c.select(".label-group").node().getBBox().height-(m?a/2:0)||0,at=c.select(".members-group").node().getBBox().height-(m?a/2:0)||0,j=(N+z+B+a-(B-a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0)))/2;if(c.selectAll(".text").each((v,R,P)=>{var Tt,nt;const H=Pt(P[R]),Z=H.attr("transform");let ut=0;if(Z){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Z);Lt&&(ut=parseFloat(Lt[2]))}let pt=ut+B+a-(m?a:l.members.length===0&&l.methods.length===0?-a/2:0);if(H.attr("class").includes("methods-group")){const At=Math.max(at,o/2);S?pt=Math.max(j,N+z+At+B+o*2+a)+o*2:pt=N+z+At+B+o*4+a}l.members.length===0&&l.methods.length===0&&((Tt=r.class)!=null&&Tt.hideEmptyMembersBox)&&(l.annotations.length>0?pt=ut-o:pt=ut),n||(pt-=4);let bt=w;(H.attr("class").includes("label-group")||H.attr("class").includes("annotation-group"))&&(bt=-((nt=H.node())==null?void 0:nt.getBBox().width)/2||0,c.selectAll("text").each(function(At,Lt,qt){window.getComputedStyle(qt[Lt]).textAnchor==="middle"&&(bt=0)})),H.attr("transform",`translate(${bt}, ${pt})`)}),l.members.length>0||l.methods.length>0||m){const v=N+z+B+a,R=y.line(X.x,v,X.x+X.width,v+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(m||l.members.length>0||l.methods.length>0){const v=N+z+at+B+o*2+a,R=y.line(X.x,S?Math.max(j,v):v,X.x+X.width,(S?Math.max(j,v):v)+.001,x);c.insert(()=>R).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",d)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",d),F.select(":nth-child(2)").attr("style",d),c.selectAll(".divider").select("path").attr("style",d),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",d),!n){const v=RegExp(/color\s*:\s*([^;]*)/),R=v.exec(d);if(R){const P=R[0].replace("color","fill");c.selectAll("tspan").attr("style",P)}else if(u){const P=v.exec(u);if(P){const H=P[0].replace("color","fill");c.selectAll("tspan").attr("style",H)}}}return Ct(t,F),t.intersect=function(v){return ht.rect(t,v)},c}f(Qf,"classBox");async function Jf(e,t){var z,at;const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const s=t,a=t,o=20,n=20,l="verifyMethod"in t,c=wt(t),h=zt(),{themeVariables:u}=h,{borderColorArray:p,requirementEdgeLabelBackground:d}=u,m=h.layout==="elk"?"start":"center",y=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await tr(y,`<<${s.type}>>`,0,t.labelStyle):x=await tr(y,"<<Element>>",0,t.labelStyle);let C=x;const k=await tr(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=k+n,l){const j=await tr(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=j;const A=await tr(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=A;const O=await tr(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=O,await tr(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const j=await tr(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,m);C+=j,await tr(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,m)}const S=(((z=y.node())==null?void 0:z.getBBox().width)??200)+o,w=(((at=y.node())==null?void 0:at.getBBox().height)??200)+o,B=-S/2,L=-w/2,E=ft.svg(y),F=dt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const X=E.rectangle(B,L,S,w,F),N=y.insert(()=>X,":first-child");if(N.attr("class","basic label-container outer-path").attr("style",i),p!=null&&p.length){const j=t.colorIndex??0;y.attr("data-color-id",`color-${j%p.length}`)}if(y.selectAll(".label").each((j,A,O)=>{const v=Pt(O[A]),R=v.attr("transform");let P=0,H=0;if(R){const bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);bt&&(P=parseFloat(bt[1]),H=parseFloat(bt[2]))}const Z=H-w/2;let ut=B+o/2;(A===0||A===1)&&(ut=P),v.attr("transform",`translate(${ut}, ${Z+o})`)}),C>x+k+n){const j=L+x+k+n;let A;if(t.look==="neo"){const R=[[B,j],[B+S,j],[B+S,j+.001],[B,j+.001]];A=E.polygon(R,F)}else A=E.line(B,j,B+S,j,F);y.insert(()=>A).attr("class","divider")}return Ct(t,N),t.intersect=function(j){return ht.rect(t,j)},i&&t.look!=="handDrawn"&&(d||p!=null&&p.length)&&y.selectAll("path").attr("style",i),y}f(Jf,"requirementBox");async function tr(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),o=zt(),n=o.htmlLabels??!0,l=await Ve(a,Xn(Or(t)),{width:br(t,o)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},o);let c;if(n){const h=l.children[0],u=Pt(l);s==="start"&&Pt(h).style("text-align","left"),c=h.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{const h=l.children[0];for(const u of h.children)i&&u.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const u of h.children)u.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return a.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}f(tr,"addText");var Uk=f(e=>{switch(e){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 tg(e,t,{config:r}){var at,j;const{labelStyles:i,nodeStyles:s}=xt(t);t.labelStyle=i||"";const a=10,o=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await St(e,t,wt(t)),h=t.padding||10;let u="",p;"ticket"in t&&t.ticket&&((at=r==null?void 0:r.kanban)!=null&&at.ticketBaseUrl)&&(u=(j=r==null?void 0:r.kanban)==null?void 0:j.ticketBaseUrl.replace("#TICKET#",t.ticket),p=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",u).attr("target","_blank"));const d={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;p?{label:m,bbox:y}=await So(p,"ticket"in t&&t.ticket||"",d):{label:m,bbox:y}=await So(n,"ticket"in t&&t.ticket||"",d);const{label:x,bbox:C}=await So(n,"assigned"in t&&t.assigned||"",d);t.width=o;const k=10,S=(t==null?void 0:t.width)||0,w=Math.max(y.height,C.height)/2,B=Math.max(l.height+k*2,(t==null?void 0:t.height)||0)+w,L=-S/2,E=-B/2;c.attr("transform","translate("+(h-S/2)+", "+(-w-l.height/2)+")"),m.attr("transform","translate("+(h-S/2)+", "+(-w+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-C.width-2*a)+", "+(-w+l.height/2)+")");let F;const{rx:X,ry:N}=t,{cssStyles:z}=t;if(t.look==="handDrawn"){const A=ft.svg(n),O=dt(t,{}),v=X||N?A.path(He(L,E,S,B,X||0),O):A.rectangle(L,E,S,B,O);F=n.insert(()=>v,":first-child"),F.attr("class","basic label-container").attr("style",z||null)}else{F=n.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",X??5).attr("ry",N??5).attr("x",L).attr("y",E).attr("width",S).attr("height",B);const A="priority"in t&&t.priority;if(A){const O=n.append("line"),v=L+2,R=E+Math.floor((X??0)/2),P=E+B-Math.floor((X??0)/2);O.attr("x1",v).attr("y1",R).attr("x2",v).attr("y2",P).attr("stroke-width","4").attr("stroke",Uk(A))}}return Ct(t,F),t.height=B,t.intersect=function(A){return ht.rect(t,A)},n}f(tg,"kanbanItem");async function eg(e,t){const{labelStyles:r,nodeStyles:i}=xt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:o,label:n}=await St(e,t,wt(t)),l=a.width+10*o,c=a.height+8*o,h=.15*l,{cssStyles:u}=t,p=a.width+20,d=a.height+20,m=Math.max(l,p),y=Math.max(c,d);n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
|
|
210
|
-
a${
|
|
211
|
-
a${
|
|
212
|
-
a${
|
|
213
|
-
a${
|
|
240
|
+
l${-r},0`,"createCylinderPathD"),Gb=p((e,t,r,i,s,a)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${a} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${a} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),Xb=p((e,t,r,i,s,a)=>[`M${e+r/2},${-i/2}`,`a${s},${a} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Mc=5,Oc=10;async function dp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?12:s/2,n=t.height??0;if(t.height&&(t.height=t.height-a,t.height<Mc&&(t.height=Mc)),t.width){const C=n/2/(2.5+n/50);t.width=t.width-a-C*3,t.width<Oc&&(t.width=Oc)}const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=Math.max(t.height??0,c.height)+a,d=l/2,u=d/(2.5+l/50),g=Math.max(t.width??0,c.width)+u+a,{cssStyles:m}=t;let y;if(t.look==="handDrawn"){const x=pt.svg(o),C=Gb(0,0,g,l,u,d),b=Xb(0,0,g,l,u,d),k=x.path(C,gt(t,{})),w=x.path(b,gt(t,{fill:"none"}));y=o.insert(()=>w,":first-child"),y=o.insert(()=>k,":first-child"),y.attr("class","basic label-container"),m&&y.attr("style",m)}else{const x=jb(0,0,g,l,u,d);y=o.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",ne(m)).attr("style",i),y.attr("class","basic label-container outer-path"),m&&y.selectAll("path").attr("style",m),i&&y.selectAll("path").attr("style",i)}return y.attr("label-offset-x",u),y.attr("transform",`translate(${-g/2}, ${l/2} )`),h.attr("transform",`translate(${-(c.width/2)-u-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Ct(t,y),t.intersect=function(x){const C=dt.rect(t,x),b=C.y-(t.y??0);if(d!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(C.x-(t.x??0))>(t.width??0)/2-u)){let k=u*u*(1-b*b/(d*d));k!=0&&(k=Math.sqrt(Math.abs(k))),k=u-k,x.x-(t.x??0)>0&&(k=-k),C.x+=k}return C},o}p(dp,"tiltedCylinder");async function up(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=(t.look==="neo",s),n=t.look==="neo"?s*2:s,{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=Math.max(c.height+a,t.height??0),l=Math.max(c.width+n,(t.width??0)-h),d=[{x:-3*h/6,y:0},{x:l+3*h/6,y:0},{x:l,y:-h},{x:0,y:-h}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const m=pt.svg(o),y=gt(t,{}),x=Yt(d),C=m.path(x,y);u=o.insert(()=>C,":first-child").attr("transform",`translate(${-l/2}, ${h/2})`),g&&u.attr("style",g)}else u=ar(o,l,h,d);return i&&u.attr("style",i),t.width=l,t.height=h,Ct(t,u),t.intersect=function(m){return dt.polygon(t,d,m)},o}p(up,"trapezoid");async function gp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s,o=15,c=5;(t.width||t.height)&&(t.height=(t.height??0)-n*2,t.height<c&&(t.height=c),t.width=(t.width??0)-a*2,t.width<o&&(t.width=o));const{shapeSvg:h,bbox:l}=await vt(e,t,_t(t)),d=(t!=null&&t.width?t==null?void 0:t.width:l.width)+a*2,u=(t!=null&&t.height?t==null?void 0:t.height:l.height)+n*2,{cssStyles:g}=t,m=pt.svg(h),y=gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-d/2*.8,y:-u/2},{x:d/2*.8,y:-u/2},{x:d/2,y:-u/2*.6},{x:d/2,y:u/2},{x:-d/2,y:u/2},{x:-d/2,y:-u/2*.6}],C=Yt(x),b=m.path(C,y),k=h.insert(()=>b,":first-child");return k.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),Ct(t,k),t.intersect=function(w){return dt.polygon(t,x,w)},h}p(gp,"trapezoidalPentagon");var $c=10,Dc=10;async function pp(e,t){var w;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-a)/2,t.width<Dc&&(t.width=Dc),t.height=(t==null?void 0:t.height)??0,t.height<$c&&(t.height=$c));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=sr((w=Rt().flowchart)==null?void 0:w.htmlLabels),l=(t!=null&&t.width?t==null?void 0:t.width:o.width)+a,d=t!=null&&t.height?t==null?void 0:t.height:l+o.height,u=d,g=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-d}],{cssStyles:m}=t,y=pt.svg(n),x=gt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const C=Yt(g),b=y.path(C,x),k=n.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return m&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",m),i&&t.look!=="handDrawn"&&k.selectChildren("path").attr("style",i),t.width=l,t.height=d,Ct(t,k),c.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))}, ${d/2-(o.height+(t.padding??0)/(h?2:1)-(o.y-(o.top??0)))})`),t.intersect=function(_){return J.info("Triangle intersect",t,g,_),dt.polygon(t,g,_)},n}p(pp,"triangle");async function fp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?12:s;let o=!0;(t.width||t.height)&&(o=!1,t.width=((t==null?void 0:t.width)??0)-a*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-n*2,t.height<10&&(t.height=10));const{shapeSvg:c,bbox:h,label:l}=await vt(e,t,_t(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+(a??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:h.height)+(n??0)*2,g=t.look==="neo"?u/4:u/8,m=u+(o?g:-g),{cssStyles:y}=t,C=14-d,b=C>0?C/2:0,k=pt.svg(c),w=gt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const _=[{x:-d/2-b,y:m/2},...$r(-d/2-b,m/2,d/2+b,m/2,g,.8),{x:d/2+b,y:-m/2},{x:-d/2-b,y:-m/2}],L=Yt(_),A=k.path(L,w),F=c.insert(()=>A,":first-child");return F.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&F.selectAll("path").attr("style",i),F.attr("transform",`translate(0,${-g/2})`),l.attr("transform",`translate(${-d/2+(t.padding??0)-(h.x-(h.left??0))},${-u/2+(t.padding??0)-g-(h.y-(h.top??0))})`),Ct(t,F),t.intersect=function(z){return dt.polygon(t,_,z)},c}p(fp,"waveEdgedRectangle");async function mp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,a=t.look==="neo"?16:s,n=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-n-w*(20/9)),t.width=t.width-a*2}const{shapeSvg:o,bbox:c}=await vt(e,t,_t(t)),h=(t!=null&&t.width?t==null?void 0:t.width:c.width)+a*2,l=(t!=null&&t.height?t==null?void 0:t.height:c.height)+n,d=l/8,u=l+d*2,{cssStyles:g}=t,m=pt.svg(o),y=gt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const x=[{x:-h/2,y:u/2},...$r(-h/2,u/2,h/2,u/2,d,1),{x:h/2,y:-u/2},...$r(h/2,-u/2,-h/2,-u/2,d,-1)],C=Yt(x),b=m.path(C,y),k=o.insert(()=>b,":first-child");return k.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&k.selectAll("path").attr("style",i),Ct(t,k),t.intersect=function(w){return dt.polygon(t,x,w)},o}p(mp,"waveRectangle");var te=10;async function yp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,a=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-te,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-te,10));const{shapeSvg:n,bbox:o,label:c}=await vt(e,t,_t(t)),h=(t!=null&&t.width?t==null?void 0:t.width:o.width)+s*2+te,l=(t!=null&&t.height?t==null?void 0:t.height:o.height)+a*2+te,d=h-te,u=l-te,g=-d/2,m=-u/2,{cssStyles:y}=t,x=pt.svg(n),C=gt(t,{}),b=[{x:g-te,y:m-te},{x:g-te,y:m+u},{x:g+d,y:m+u},{x:g+d,y:m-te}],k=`M${g-te},${m-te} L${g+d},${m-te} L${g+d},${m+u} L${g-te},${m+u} L${g-te},${m-te}
|
|
241
|
+
M${g-te},${m} L${g+d},${m}
|
|
242
|
+
M${g},${m-te} L${g},${m+u}`;t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const w=x.path(k,C),_=n.insert(()=>w,":first-child");return _.attr("transform",`translate(${te/2}, ${te/2})`),_.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&_.selectAll("path").attr("style",i),c.attr("transform",`translate(${-(o.width/2)+te/2-(o.x-(o.left??0))}, ${-(o.height/2)+te/2-(o.y-(o.top??0))})`),Ct(t,_),t.intersect=function(L){return dt.polygon(t,b,L)},n}p(yp,"windowPane");var Ic=new Set(["redux-color","redux-dark-color"]),Vb=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function bl(e,t){var yt,At,It,Bt;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Qt(),{rowEven:a,rowOdd:n,nodeBorder:o,borderColorArray:c}=s;if(t.look==="handDrawn"){const{themeVariables:ct}=Qt(),{background:xt}=ct,Et={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${xt}`]};await bl(e,Et)}const h=Qt();t.useHtmlLabels=h.htmlLabels;let l=((yt=h.er)==null?void 0:yt.diagramPadding)??10,d=((At=h.er)==null?void 0:At.entityPadding)??6;const{cssStyles:u}=t,{labelStyles:g,nodeStyles:m}=mt(t);if(r.attributes.length===0&&t.label){const ct={rx:0,ry:0,labelPaddingX:l,labelPaddingY:l*1.5};yr(t.label,h)+ct.labelPaddingX*2<h.er.minEntityWidth&&(t.width=h.er.minEntityWidth);const xt=await Mi(e,t,ct);if(i!=null&&Ic.has(i)){const Et=r.colorIndex??0;xt.attr("data-color-id",`color-${Et%c.length}`)}if(!sr(h.htmlLabels)){const Et=xt.select("text"),Nt=(It=Et.node())==null?void 0:It.getBBox();Et.attr("transform",`translate(${-Nt.width/2}, 0)`)}return xt}h.htmlLabels||(l*=1.25,d*=1.25);let y=_t(t);y||(y="node default");const x=e.insert("g").attr("class",y).attr("id",t.domId||t.id),C=await si(x,t.label??"",h,0,0,["name"],g);C.height+=d;let b=0;const k=[],w=[];let _=0,L=0,A=0,F=0,z=!0,q=!0;for(const ct of r.attributes){const xt=await si(x,ct.type,h,0,b,["attribute-type"],g);_=Math.max(_,xt.width+l);const Et=await si(x,ct.name,h,0,b,["attribute-name"],g);L=Math.max(L,Et.width+l);const Nt=await si(x,ct.keys.join(),h,0,b,["attribute-keys"],g);A=Math.max(A,Nt.width+l);const Gt=await si(x,ct.comment,h,0,b,["attribute-comment"],g);F=Math.max(F,Gt.width+l);const H=Math.max(xt.height,Et.height,Nt.height,Gt.height)+d;w.push({yOffset:b,rowHeight:H}),b+=H}let I=4;A<=l&&(z=!1,A=0,I--),F<=l&&(q=!1,F=0,I--);const rt=x.node().getBBox();if(C.width+l*2-(_+L+A+F)>0){const ct=C.width+l*2-(_+L+A+F);_+=ct/I,L+=ct/I,A>0&&(A+=ct/I),F>0&&(F+=ct/I)}const W=_+L+A+F,E=pt.svg(x),M=gt(t,{});t.look!=="handDrawn"&&(M.roughness=0,M.fillStyle="solid");let v=0;w.length>0&&(v=w.reduce((ct,xt)=>ct+((xt==null?void 0:xt.rowHeight)??0),0));const R=Math.max(rt.width+l*2,(t==null?void 0:t.width)||0,W),$=Math.max((v??0)+C.height,(t==null?void 0:t.height)||0),X=-R/2,Z=-$/2;if(x.selectAll("g:not(:first-child)").each((ct,xt,Et)=>{const Nt=Pt(Et[xt]),Gt=Nt.attr("transform");let H=0,kt=0;if(Gt){const Ht=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Gt);Ht&&(H=parseFloat(Ht[1]),kt=parseFloat(Ht[2]),Nt.attr("class").includes("attribute-name")?H+=_:Nt.attr("class").includes("attribute-keys")?H+=_+L:Nt.attr("class").includes("attribute-comment")&&(H+=_+L+A))}Nt.attr("transform",`translate(${X+l/2+H}, ${kt+Z+C.height+d/2})`)}),x.select(".name").attr("transform","translate("+-C.width/2+", "+(Z+d/2)+")"),i!=null&&Ic.has(i)){const ct=r.colorIndex??0;x.attr("data-color-id",`color-${ct%c.length}`)}const lt=E.rectangle(X,Z,R,$,M),ht=x.insert(()=>lt,":first-child").attr("class","outer-path").attr("style",u.join(""));k.push(0);for(const[ct,xt]of w.entries()){const Nt=(ct+1)%2===0&&xt.yOffset!==0,Gt=E.rectangle(X,C.height+Z+(xt==null?void 0:xt.yOffset),R,xt==null?void 0:xt.rowHeight,{...M,fill:Nt?a:n,stroke:o});x.insert(()=>Gt,"g.label").attr("style",u.join("")).attr("class",`row-rect-${Nt?"even":"odd"}`)}const ut=1e-4;let bt=ai(X,C.height+Z,R+X,C.height+Z,ut),Tt=E.polygon(bt.map(ct=>[ct.x,ct.y]),M);if(x.insert(()=>Tt).attr("class","divider"),bt=ai(_+X,C.height+Z,_+X,$+Z,ut),Tt=E.polygon(bt.map(ct=>[ct.x,ct.y]),M),x.insert(()=>Tt).attr("class","divider"),z){const ct=_+L+X;bt=ai(ct,C.height+Z,ct,$+Z,ut),Tt=E.polygon(bt.map(xt=>[xt.x,xt.y]),M),x.insert(()=>Tt).attr("class","divider")}if(q){const ct=_+L+A+X;bt=ai(ct,C.height+Z,ct,$+Z,ut),Tt=E.polygon(bt.map(xt=>[xt.x,xt.y]),M),x.insert(()=>Tt).attr("class","divider")}for(const ct of k){const xt=C.height+Z+ct;bt=ai(X,xt,R+X,xt,ut),Tt=E.polygon(bt.map(Et=>[Et.x,Et.y]),M),x.insert(()=>Tt).attr("class","divider")}if(Ct(t,ht),m&&t.look!=="handDrawn")if(i!=null&&Vb.has(i))x.selectAll("path").attr("style",m);else{const ct=m.split(";"),xt=(Bt=ct==null?void 0:ct.filter(Et=>Et.includes("stroke")))==null?void 0:Bt.map(Et=>`${Et}`).join("; ");x.selectAll("path").attr("style",xt??""),x.selectAll(".row-rect-even path").attr("style",m)}return t.intersect=function(ct){return dt.rect(t,ct)},x}p(bl,"erBox");async function si(e,t,r,i=0,s=0,a=[],n=""){const o=e.insert("g").attr("class",`label ${a.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",n);t!==uh(t)&&(t=uh(t),t=t.replaceAll("<","<").replaceAll(">",">"));const c=o.node().appendChild(await Oe(o,t,{width:yr(t,r)+100,style:n,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let l=c.children[0];for(l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">");l.childNodes[0];)l=l.childNodes[0],l.textContent=l.textContent.replaceAll("<","<").replaceAll(">",">")}let h=c.getBBox();if(sr(r.htmlLabels)){const l=c.children[0];l.style.textAlign="start";const d=Pt(c);h=l.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}return h}p(si,"addText");function ai(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}p(ai,"lineToPolygon");async function Cp(e,t,r,i,s=r.class.padding??12){const a=i?0:3,n=e.insert("g").attr("class",_t(t)).attr("id",t.domId||t.id);let o=null,c=null,h=null,l=null,d=0,u=0,g=0;if(o=n.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Ki(o,{text:`«${b}»`},0),d=o.node().getBBox().height}c=n.insert("g").attr("class","label-group text"),await Ki(c,t,0,["font-weight: bolder"]);const m=c.node().getBBox();u=m.height,h=n.insert("g").attr("class","members-group text");let y=0;for(const b of t.members){const k=await Ki(h,b,y,[b.parseClassifier()]);y+=k+a}g=h.node().getBBox().height,g<=0&&(g=s/2),l=n.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const k=await Ki(l,b,x,[b.parseClassifier()]);x+=k+a}let C=n.node().getBBox();if(o!==null){const b=o.node().getBBox();o.attr("transform",`translate(${-b.width/2})`)}return c.attr("transform",`translate(${-m.width/2}, ${d})`),C=n.node().getBBox(),h.attr("transform",`translate(0, ${d+u+s*2})`),C=n.node().getBBox(),l.attr("transform",`translate(0, ${d+u+(g?g+s*4:s*2)})`),C=n.node().getBBox(),{shapeSvg:n,bbox:C}}p(Cp,"textHelper");async function Ki(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),a=Qt();let n="useHtmlLabels"in t?t.useHtmlLabels:sr(a.htmlLabels)??!0,o="";"text"in t?o=t.text:o=t.label,!n&&o.startsWith("\\")&&(o=o.substring(1)),ls(o)&&(n=!0);const c=await Oe(s,Ln(Mr(o)),{width:yr(o,a)+50,classes:"markdown-node-label",useHtmlLabels:n},a);let h,l=1;if(n){const d=c.children[0],u=Pt(c);l=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(l+=d.innerHTML.split("<mrow>").length-1),await fl(d),h=d.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)}else{i.includes("font-weight: bolder")&&Pt(c).selectAll("tspan").attr("font-weight",""),l=c.children.length;const d=c.children[0];(c.textContent===""||c.textContent.includes(">"))&&(d.textContent=o[0]+o.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),o[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),h=c.getBBox()}return s.attr("transform","translate(0,"+(-h.height/(2*l)+r)+")"),h.height}p(Ki,"addText");async function xp(e,t){var v,R;const r=Rt(),{theme:i,themeVariables:s}=r,{useGradient:a,borderColorArray:n}=s,o=r.class.padding??12,c=o,h=t.useHtmlLabels??sr(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:d,bbox:u}=await Cp(e,t,r,h,c);We(d,t.colorIndex,i,n);const{labelStyles:g,nodeStyles:m}=mt(t);t.labelStyle=g,t.cssStyles=l.styles||"";const y=((v=l.styles)==null?void 0:v.join(";"))||m||"";t.cssStyles||(t.cssStyles=y.replaceAll("!important","").split(";"));const x=l.members.length===0&&l.methods.length===0&&!((R=r.class)!=null&&R.hideEmptyMembersBox),C=pt.svg(d),b=gt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const k=Math.max(t.width??0,u.width);let w=Math.max(t.height??0,u.height);const _=(t.height??0)>u.height;l.members.length===0&&l.methods.length===0?w+=c:l.members.length>0&&l.methods.length===0&&(w+=c*2);const L=-k/2,A=-w/2;let F=x?o*2:l.members.length===0&&l.methods.length===0?-o:0;_&&(F=o*2);const z=C.rectangle(L-o,A-o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0),k+2*o,w+2*o+F,b),q=d.insert(()=>z,":first-child");q.attr("class","basic label-container outer-path");const I=q.node().getBBox(),rt=d.select(".annotation-group").node().getBBox().height-(x?o/2:0)||0,W=d.select(".label-group").node().getBBox().height-(x?o/2:0)||0,E=d.select(".members-group").node().getBBox().height-(x?o/2:0)||0,M=(rt+W+A+o-(A-o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(d.selectAll(".text").each(($,X,Z)=>{var yt,At;const lt=Pt(Z[X]),ht=lt.attr("transform");let ut=0;if(ht){const Bt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(ht);Bt&&(ut=parseFloat(Bt[2]))}let bt=ut+A+o-(x?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(lt.attr("class").includes("methods-group")){const It=Math.max(E,c/2);_?bt=Math.max(M,rt+W+It+A+c*2+o)+c*2:bt=rt+W+It+A+c*4+o}l.members.length===0&&l.methods.length===0&&((yt=r.class)!=null&&yt.hideEmptyMembersBox)&&(l.annotations.length>0?bt=ut-c:bt=ut),h||(bt-=4);let Tt=L;(lt.attr("class").includes("label-group")||lt.attr("class").includes("annotation-group"))&&(Tt=-((At=lt.node())==null?void 0:At.getBBox().width)/2||0,d.selectAll("text").each(function(It,Bt,ct){window.getComputedStyle(ct[Bt]).textAnchor==="middle"&&(Tt=0)})),lt.attr("transform",`translate(${Tt}, ${bt})`)}),l.members.length>0||l.methods.length>0||x){const $=rt+W+A+o,X=C.line(I.x,$,I.x+I.width,$+.001,b);d.insert(()=>X).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(x||l.members.length>0||l.methods.length>0){const $=rt+W+E+A+c*2+o,X=C.line(I.x,_?Math.max(M,$):$,I.x+I.width,(_?Math.max(M,$):$)+.001,b);d.insert(()=>X).attr("class",`divider${t.look==="neo"&&!a?" neo-line":""}`).attr("style",y)}if(l.look!=="handDrawn"&&d.selectAll("path").attr("style",y),q.select(":nth-child(2)").attr("style",y),d.selectAll(".divider").select("path").attr("style",y),t.labelStyle?d.selectAll("span").attr("style",t.labelStyle):d.selectAll("span").attr("style",y),!h){const $=RegExp(/color\s*:\s*([^;]*)/),X=$.exec(y);if(X){const Z=X[0].replace("color","fill");d.selectAll("tspan").attr("style",Z)}else if(g){const Z=$.exec(g);if(Z){const lt=Z[0].replace("color","fill");d.selectAll("tspan").attr("style",lt)}}}return Ct(t,q),t.intersect=function($){return dt.rect(t,$)},d}p(xp,"classBox");async function bp(e,t){var I,rt;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t,a=t,n=20,o=20,c="verifyMethod"in t,h=_t(t),l=Rt(),{themeVariables:d}=l,{borderColorArray:u,requirementEdgeLabelBackground:g}=d,m=l.layout==="elk"?"start":"center",y=e.insert("g").attr("class",h).attr("id",t.domId??t.id);let x;c?x=await Qe(y,`<<${s.type}>>`,0,t.labelStyle):x=await Qe(y,"<<Element>>",0,t.labelStyle);let C=x;const b=await Qe(y,s.name,C,t.labelStyle+"; font-weight: bold;");if(C+=b+o,c){const W=await Qe(y,`${s.requirementId?`ID: ${s.requirementId}`:""}`,C,t.labelStyle,m);C+=W;const E=await Qe(y,`${s.text?`Text: ${s.text}`:""}`,C,t.labelStyle,m);C+=E;const M=await Qe(y,`${s.risk?`Risk: ${s.risk}`:""}`,C,t.labelStyle,m);C+=M,await Qe(y,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,C,t.labelStyle,m)}else{const W=await Qe(y,`${a.type?`Type: ${a.type}`:""}`,C,t.labelStyle,m);C+=W,await Qe(y,`${a.docRef?`Doc Ref: ${a.docRef}`:""}`,C,t.labelStyle,m)}const k=(((I=y.node())==null?void 0:I.getBBox().width)??200)+n,w=(((rt=y.node())==null?void 0:rt.getBBox().height)??200)+n,_=-k/2,L=-w/2,A=pt.svg(y),F=gt(t,{});t.look!=="handDrawn"&&(F.roughness=0,F.fillStyle="solid");const z=A.rectangle(_,L,k,w,F),q=y.insert(()=>z,":first-child");if(q.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const W=t.colorIndex??0;y.attr("data-color-id",`color-${W%u.length}`)}if(y.selectAll(".label").each((W,E,M)=>{const v=Pt(M[E]),R=v.attr("transform");let $=0,X=0;if(R){const ut=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(R);ut&&($=parseFloat(ut[1]),X=parseFloat(ut[2]))}const Z=X-w/2;let lt=_+n/2;(E===0||E===1)&&(lt=$),v.attr("transform",`translate(${lt}, ${Z+n})`)}),C>x+b+o){const W=L+x+b+o;let E;if(t.look==="neo"){const R=[[_,W],[_+k,W],[_+k,W+.001],[_,W+.001]];E=A.polygon(R,F)}else E=A.line(_,W,_+k,W,F);y.insert(()=>E).attr("class","divider")}return Ct(t,q),t.intersect=function(W){return dt.rect(t,W)},i&&t.look!=="handDrawn"&&(g||u!=null&&u.length)&&y.selectAll("path").attr("style",i),y}p(bp,"requirementBox");async function Qe(e,t,r,i="",s="center"){if(t==="")return 0;const a=e.insert("g").attr("class","label").attr("style",i),n=Rt(),o=n.htmlLabels??!0,c=await Oe(a,Ln(Mr(t)),{width:yr(t,n)+50,classes:"markdown-node-label",useHtmlLabels:o,style:i},n);let h;if(o){const l=c.children[0],d=Pt(c);s==="start"&&Pt(l).style("text-align","left"),h=l.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)}else{const l=c.children[0];for(const d of l.children)i&&d.setAttribute("style",i);if(s==="start"){l.setAttribute("text-anchor","start");for(const d of l.children)d.setAttribute("text-anchor","start")}h=c.getBBox(),h.height+=6}return a.attr("transform",`translate(${-h.width/2},${-h.height/2+r})`),h.height}p(Qe,"addText");var Zb=p(e=>{switch(e){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 kp(e,t,{config:r}){var rt,W;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i||"";const a=10,n=t.width;t.width=(t.width??200)-10;const{shapeSvg:o,bbox:c,label:h}=await vt(e,t,_t(t)),l=t.padding||10;let d="",u;"ticket"in t&&t.ticket&&((rt=r==null?void 0:r.kanban)!=null&&rt.ticketBaseUrl)&&(d=(W=r==null?void 0:r.kanban)==null?void 0:W.ticketBaseUrl.replace("#TICKET#",t.ticket),u=o.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let m,y;u?{label:m,bbox:y}=await Nr(u,"ticket"in t&&t.ticket||"",g):{label:m,bbox:y}=await Nr(o,"ticket"in t&&t.ticket||"",g);const{label:x,bbox:C}=await Nr(o,"assigned"in t&&t.assigned||"",g);t.width=n;const b=10,k=(t==null?void 0:t.width)||0,w=Math.max(y.height,C.height)/2,_=Math.max(c.height+b*2,(t==null?void 0:t.height)||0)+w,L=-k/2,A=-_/2;h.attr("transform","translate("+(l-k/2)+", "+(-w-c.height/2)+")"),m.attr("transform","translate("+(l-k/2)+", "+(-w+c.height/2)+")"),x.attr("transform","translate("+(l+k/2-C.width-2*a)+", "+(-w+c.height/2)+")");let F;const{rx:z,ry:q}=t,{cssStyles:I}=t;if(t.look==="handDrawn"){const E=pt.svg(o),M=gt(t,{}),v=z||q?E.path($e(L,A,k,_,z||0),M):E.rectangle(L,A,k,_,M);F=o.insert(()=>v,":first-child"),F.attr("class","basic label-container").attr("style",I||null)}else{F=o.insert("rect",":first-child"),F.attr("class","basic label-container __APA__").attr("style",s).attr("rx",z??5).attr("ry",q??5).attr("x",L).attr("y",A).attr("width",k).attr("height",_);const E="priority"in t&&t.priority;if(E){const M=o.append("line"),v=L+2,R=A+Math.floor((z??0)/2),$=A+_-Math.floor((z??0)/2);M.attr("x1",v).attr("y1",R).attr("x2",v).attr("y2",$).attr("stroke-width","4").attr("stroke",Zb(E))}}return Ct(t,F),t.height=_,t.intersect=function(E){return dt.rect(t,E)},o}p(kp,"kanbanItem");async function Sp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,_t(t)),c=a.width+10*n,h=a.height+8*n,l=.15*c,{cssStyles:d}=t,u=a.width+20,g=a.height+20,m=Math.max(c,u),y=Math.max(h,g);o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`);let x;const C=`M0 0
|
|
243
|
+
a${l},${l} 1 0,0 ${m*.25},${-1*y*.1}
|
|
244
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
245
|
+
a${l},${l} 1 0,0 ${m*.25},0
|
|
246
|
+
a${l},${l} 1 0,0 ${m*.25},${y*.1}
|
|
214
247
|
|
|
215
|
-
a${
|
|
216
|
-
a${
|
|
217
|
-
a${
|
|
248
|
+
a${l},${l} 1 0,0 ${m*.15},${y*.33}
|
|
249
|
+
a${l*.8},${l*.8} 1 0,0 0,${y*.34}
|
|
250
|
+
a${l},${l} 1 0,0 ${-1*m*.15},${y*.33}
|
|
218
251
|
|
|
219
|
-
a${
|
|
220
|
-
a${
|
|
221
|
-
a${
|
|
222
|
-
a${
|
|
252
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${y*.15}
|
|
253
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
254
|
+
a${l},${l} 1 0,0 ${-1*m*.25},0
|
|
255
|
+
a${l},${l} 1 0,0 ${-1*m*.25},${-1*y*.15}
|
|
223
256
|
|
|
224
|
-
a${
|
|
225
|
-
a${
|
|
226
|
-
a${
|
|
227
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const
|
|
228
|
-
a${
|
|
229
|
-
a${
|
|
230
|
-
a${
|
|
257
|
+
a${l},${l} 1 0,0 ${-1*m*.1},${-1*y*.33}
|
|
258
|
+
a${l*.8},${l*.8} 1 0,0 0,${-1*y*.34}
|
|
259
|
+
a${l},${l} 1 0,0 ${m*.1},${-1*y*.33}
|
|
260
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=pt.svg(s),k=gt(t,{}),w=b.path(C,k);x=s.insert(()=>w,":first-child"),x.attr("class","basic label-container").attr("style",ne(d))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",C);return x.attr("transform",`translate(${-m/2}, ${-y/2})`),Ct(t,x),t.calcIntersect=function(b,k){return dt.rect(b,k)},t.intersect=function(b){return J.info("Bang intersect",t,b),dt.rect(t,b)},s}p(Sp,"bang");async function Tp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,_t(t)),c=a.width+2*n,h=a.height+2*n,l=.15*c,d=.25*c,u=.35*c,g=.2*c,{cssStyles:m}=t;let y;const x=`M0 0
|
|
261
|
+
a${l},${l} 0 0,1 ${c*.25},${-1*c*.1}
|
|
262
|
+
a${u},${u} 1 0,1 ${c*.4},${-1*c*.1}
|
|
263
|
+
a${d},${d} 1 0,1 ${c*.35},${c*.2}
|
|
231
264
|
|
|
232
|
-
a${
|
|
233
|
-
a${
|
|
265
|
+
a${l},${l} 1 0,1 ${c*.15},${h*.35}
|
|
266
|
+
a${g},${g} 1 0,1 ${-1*c*.15},${h*.65}
|
|
234
267
|
|
|
235
|
-
a${
|
|
236
|
-
a${
|
|
237
|
-
a${
|
|
268
|
+
a${d},${l} 1 0,1 ${-1*c*.25},${c*.15}
|
|
269
|
+
a${u},${u} 1 0,1 ${-1*c*.5},0
|
|
270
|
+
a${l},${l} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
238
271
|
|
|
239
|
-
a${
|
|
240
|
-
a${
|
|
241
|
-
H0 V0 Z`;if(t.look==="handDrawn"){const C=
|
|
242
|
-
M${-
|
|
243
|
-
v${-
|
|
244
|
-
q0,-${
|
|
245
|
-
h${
|
|
246
|
-
q${
|
|
247
|
-
v${
|
|
248
|
-
H${-
|
|
272
|
+
a${l},${l} 1 0,1 ${-1*c*.1},${-1*h*.35}
|
|
273
|
+
a${g},${g} 1 0,1 ${c*.1},${-1*h*.65}
|
|
274
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const C=pt.svg(s),b=gt(t,{}),k=C.path(x,b);y=s.insert(()=>k,":first-child"),y.attr("class","basic label-container").attr("style",ne(m))}else y=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),y.attr("transform",`translate(${-c/2}, ${-h/2})`),Ct(t,y),t.calcIntersect=function(C,b){return dt.rect(C,b)},t.intersect=function(C){return J.info("Cloud intersect",t,C),dt.rect(t,C)},s}p(Tp,"cloud");async function wp(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:a,halfPadding:n,label:o}=await vt(e,t,_t(t)),c=a.width+8*n,h=a.height+2*n,l=5,d=t.look==="neo"?`
|
|
275
|
+
M${-c/2} ${h/2-l}
|
|
276
|
+
v${-h+2*l}
|
|
277
|
+
q0,-${l} ${l},-${l}
|
|
278
|
+
h${c-2*l}
|
|
279
|
+
q${l},0 ${l},${l}
|
|
280
|
+
v${h-l}
|
|
281
|
+
H${-c/2}
|
|
249
282
|
Z
|
|
250
283
|
`:`
|
|
251
|
-
M${-
|
|
252
|
-
v${-
|
|
253
|
-
q0,-${
|
|
254
|
-
h${
|
|
255
|
-
q${
|
|
256
|
-
v${
|
|
257
|
-
q0,${
|
|
258
|
-
h${-(
|
|
259
|
-
q${-
|
|
284
|
+
M${-c/2} ${h/2-l}
|
|
285
|
+
v${-h+2*l}
|
|
286
|
+
q0,-${l} ${l},-${l}
|
|
287
|
+
h${c-2*l}
|
|
288
|
+
q${l},0 ${l},${l}
|
|
289
|
+
v${h-2*l}
|
|
290
|
+
q0,${l} ${-l},${l}
|
|
291
|
+
h${-(c-2*l)}
|
|
292
|
+
q${-l},0 ${-l},${-l}
|
|
260
293
|
Z
|
|
261
|
-
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const p=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",u);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>n.node()),Ct(t,p),t.calcIntersect=function(d,m){return ht.rect(d,m)},t.intersect=function(d){return ht.rect(t,d)},s}f(ig,"defaultMindmapNode");async function sg(e,t){const r={padding:t.padding??0};return bl(e,t,r)}f(sg,"mindmapCircle");var Gk=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Df},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Mf},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:Pf},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Nf},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:rf},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:sf},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:hf},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:zp},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Xp},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:jp},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:ef},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:bl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:eg},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:rg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Ff},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:df},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Tf},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:kf},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Yf},{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:xf},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:of},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Hf},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Yp},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Of},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:qf},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Rf},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:cf},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:pf},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Kp},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Qp},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:Jp},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Sf},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:Xf},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:uf},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:jf},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:wf},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:tf},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:af},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:Gf},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Zf},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:nf},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Uf},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:lf},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:$f},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:vf},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Bf},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Np},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:Zp},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Wf},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:zf},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Vf},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Ef},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:_f}],Xk=f(()=>{const t=[...Object.entries({state:If,choice:Up,note:Lf,composite:Gp,rectWithTitle:Af,labelRect:bf,block_arrow:Hp,collapsedGroup:Wp,iconSquare:yf,iconCircle:gf,icon:ff,iconRounded:mf,imageSquare:Cf,anchor:Rp,kanbanItem:tg,mindmapCircle:sg,defaultMindmapNode:ig,classBox:Qf,erBox:kl,requirementBox:Jf}),...Gk.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),ag=Xk();function Vk(e){return e in ag}f(Vk,"isValidShape");var qa=f(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),Na=new Map;async function Tl(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?ag[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;r.config.securityLevel==="sandbox"?o="_top":t.linkTarget&&(o=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",o??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",oe(t.look)),t.tooltip&&s.attr("title",t.tooltip),Na.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Tl,"insertNode");var IL=f((e,t)=>{Na.set(t.id,e)},"setNodeElem"),Zk=f(()=>{Na.clear()},"clear"),Dc=f(e=>{const t=Na.get(e.id);W.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),Kk=f(async(e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,n=o,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:u}=xt(t),p=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),d=lr(r.flowchart.htmlLabels),m=t.direction==="LR",y=p.insert("g").attr("class","cluster-label swimlane-label"),x=await Ve(y,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width});let C=x.getBBox();if(d){const j=x.children[0],A=Pt(x);C=j.getBoundingClientRect(),A.attr("width",C.width),A.attr("height",C.height)}const k=t.padding??0,S=t.width<=C.width+k?C.width+k:t.width;t.width<=C.width+k?t.diff=(S-t.width)/2-k:t.diff=-k;const w=t.height,B=t.y-w/2,L=t.y+w/2,E=t.x-S/2,F=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:B+w/3,X=m?4:0,N=C.height+2*X;let z,at;if(m){const j=Math.max(N,C.height+2*X),A=E+j,O=Math.max(0,S-j);if(t.look==="handDrawn"){const P=ft.svg(p),H=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),Z=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),ut=P.rectangle(E,B,j,w,H);z=p.insert(()=>ut,":first-child");const pt=P.rectangle(A,B,O,w,Z);at=p.insert(()=>pt,":first-child"),z.select("path:nth-child(2)").attr("style",h.join(";")),z.select("path").attr("style",u.join(";").replace("fill","stroke"))}else z=p.insert("rect",":first-child"),at=p.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",c).attr("x",E).attr("y",B).attr("width",j).attr("height",w).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",A).attr("y",B).attr("width",O).attr("height",w).attr("fill","none").attr("stroke",n);const v=E+j/2,R=t.y;y.attr("transform",`translate(${v}, ${R}) rotate(-90) translate(${-C.width/2}, ${-C.height/2})`)}else{const j=Math.max(0,F-B),A=Math.min(N,j),O=B+A,v=Math.max(0,L-O),R=t.x-S/2;if(t.look==="handDrawn"){const Z=ft.svg(p),ut=dt(t,{roughness:.7,fill:a,stroke:n,fillWeight:3,seed:s}),pt=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),bt=Z.rectangle(R,B,S,A,ut);z=p.insert(()=>bt,":first-child");const Tt=Z.rectangle(R,O,S,v,pt);at=p.insert(()=>Tt,":first-child"),z.select("path:nth-child(2)").attr("style",h.join(";")),z.select("path").attr("style",u.join(";").replace("fill","stroke"))}else z=p.insert("rect",":first-child"),at=p.insert("rect",":first-child"),z.attr("class","swimlane-title").attr("style",c).attr("x",R).attr("y",B).attr("width",S).attr("height",A).attr("fill",a).attr("stroke",n),at.attr("class","swimlane-body").attr("style",c).attr("x",R).attr("y",O).attr("width",S).attr("height",v).attr("fill","none").attr("stroke",n);const P=t.x-C.width/2,H=B+(A-C.height)/2;y.attr("transform",`translate(${P}, ${H})`)}if(W.trace("Swimlane data ",t,JSON.stringify(t)),l){const j=y.select("span");j&&j.attr("style",l)}return t.offsetX=0,t.width=S,t.height=w,t.offsetY=C.height-k/2,t.intersect=function(j){return ti(t,j)},{cluster:p,labelBBox:C}},"swimlane"),og=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=be(r),d=u.insert("g").attr("class","cluster-label ");let m;t.labelType==="markdown"?m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):m=await Fr(d,t.label,t.labelStyle||"",!1,!0);let y=m.getBBox();if(be(r)){const E=m.children[0],F=Pt(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=ft.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:s}),X=E.path(He(k,S,x,C,0),F);w=u.insert(()=>(W.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=qa(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=d.select("span");E&&E.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return ti(t,E)},{cluster:u,labelBBox:y}},"rect"),Qk=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const o=i.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(n){return ti(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),Jk=f(async(e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:a,compositeBackground:o,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),u=c.insert("g").attr("class","cluster-label");let p=c.append("rect");const d=await Fr(u,t.label,t.labelStyle,void 0,!0);let m=d.getBBox();if(be(r)){const X=d.children[0],N=Pt(d);m=X.getBoundingClientRect(),N.attr("width",m.width),N.attr("height",m.height)}const y=0*t.padding,x=y/2,C=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+y;t.width<=m.width+t.padding?t.diff=(C-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height+y,S=t.height+y-m.height-6,w=t.x-C/2,B=t.y-k/2;t.width=C;const L=t.y-t.height/2-x+m.height+2;let E;if(t.look==="handDrawn"){const X=t.cssClasses.includes("statediagram-cluster-alt"),N=ft.svg(c),z=t.rx||t.ry?N.path(He(w,B,C,k,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):N.rectangle(w,B,C,k,{seed:s});E=c.insert(()=>z,":first-child");const at=N.rectangle(w,L,C,S,{fill:X?a:o,fillStyle:X?"hachure":"solid",stroke:l,seed:s});E=c.insert(()=>z,":first-child"),p=c.insert(()=>at)}else E=h.insert("rect",":first-child"),E.attr("class","outer").attr("x",w).attr("y",B).attr("width",C).attr("height",k).attr("data-look",t.look),p.attr("class","inner").attr("x",w).attr("y",L).attr("width",C).attr("height",S);u.attr("transform",`translate(${t.x-m.width/2}, ${B+1-(be(r)?0:3)})`);const F=E.node().getBBox();return t.height=F.height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(X){return ti(t,X)},{cluster:c,labelBBox:m}},"roundedWithTitle"),t1=f(async(e,t)=>{W.info("Creating subgraph rect for ",t.id,t);const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:o}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=xt(t),u=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),p=be(r),d=u.insert("g").attr("class","cluster-label "),m=await Ve(d,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width});let y=m.getBBox();if(be(r)){const E=m.children[0],F=Pt(m);y=E.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,k=t.x-x/2,S=t.y-C/2;W.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const E=ft.svg(u),F=dt(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:s}),X=E.path(He(k,S,x,C,t.rx),F);w=u.insert(()=>(W.debug("Rough node insert CXC",X),X),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=u.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",k).attr("y",S).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:B}=qa(r);if(d.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+B})`),n){const E=d.select("span");E&&E.attr("style",n)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(E){return ti(t,E)},{cluster:u,labelBBox:y}},"kanbanSection"),e1=f((e,t)=>{const r=zt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:a}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=o.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,u=t.x-c/2,p=t.y-h/2;t.width=c;let d;if(t.look==="handDrawn"){const x=ft.svg(o).rectangle(u,p,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:s});d=o.insert(()=>x,":first-child")}else{d=n.insert("rect",":first-child");let y="outer";t.look,y="divider",d.attr("class",y).attr("x",u).attr("y",p).attr("width",c).attr("height",h).attr("data-look",t.look)}const m=d.node().getBBox();return t.height=m.height,t.offsetX=0,t.offsetY=0,t.intersect=function(y){return ti(t,y)},{cluster:o,labelBBox:{}}},"divider"),r1=og,i1={rect:og,squareRect:r1,roundedWithTitle:Jk,noteGroup:Qk,divider:e1,kanbanSection:t1,swimlane:Kk},ng=new Map,lg=f(async(e,t)=>{const r=t.shape||"rect",i=await i1[r](e,t);return ng.set(t.id,i),i},"insertCluster"),s1=f(()=>{ng=new Map},"clear"),es=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),Ce={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Pc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function ls(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Jt(e),t=Jt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],o=s-r,n=a-i;return{angle:Math.atan(n/o),deltaX:o,deltaY:n}}f(ls,"calculateDeltaAndAngle");var Jt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),a1=f(e=>({x:f(function(t,r,i){let s=0;const a=Jt(i[0]).x<Jt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaX:m}=ls(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.cos(d)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaX:m}=ls(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.cos(d)*(m>=0?1:-1)}const o=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),n=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),l=Math.abs(Jt(t).x-Jt(i[0]).x),c=Math.abs(Jt(t).y-Jt(i[0]).y),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="right"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=a==="right"?-1:1,s+=d}return Jt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const a=Jt(i[0]).y<Jt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(Ce,e.arrowTypeStart)){const{angle:d,deltaY:m}=ls(i[0],i[1]);s=Ce[e.arrowTypeStart]*Math.abs(Math.sin(d))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(Ce,e.arrowTypeEnd)){const{angle:d,deltaY:m}=ls(i[i.length-1],i[i.length-2]);s=Ce[e.arrowTypeEnd]*Math.abs(Math.sin(d))*(m>=0?1:-1)}const o=Math.abs(Jt(t).y-Jt(i[i.length-1]).y),n=Math.abs(Jt(t).x-Jt(i[i.length-1]).x),l=Math.abs(Jt(t).y-Jt(i[0]).y),c=Math.abs(Jt(t).x-Jt(i[0]).x),h=Ce[e.arrowTypeStart],u=Ce[e.arrowTypeEnd],p=1;if(o<u&&o>0&&n<u){let d=u+p-o;d*=a==="up"?-1:1,s-=d}if(l<h&&l>0&&c<h){let d=h+p-l;d*=a==="up"?-1:1,s+=d}return Jt(t).y+s},"y")}),"getLineFunctionsWithOffset"),o1=f((e,t,r,i,s,a=!1,o)=>{t.arrowTypeStart&&Ic(e,"start",t.arrowTypeStart,r,i,s,a,o),t.arrowTypeEnd&&Ic(e,"end",t.arrowTypeEnd,r,i,s,a,o)},"addEdgeMarkers"),n1={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},l1=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Ic=f((e,t,r,i,s,a,o=!1,n)=>{var m;if(!r||r==="none")return;const l=n1[r],c=l&&l1.includes(l.type);if(!l){W.warn(`Unknown arrow type: ${r}`);return}const h=l.type,d=`${s}_${a}-${h}${t==="start"?"Start":"End"}${o&&c?"-margin":""}`;if(n&&n.trim()!==""){const y=n.replace(/[^\dA-Za-z]/g,"_"),x=`${d}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(d);if(C){const k=C.cloneNode(!0);k.id=x,k.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(m=C.parentNode)==null||m.appendChild(k)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${d})`)},"addEdgeMarker"),h1=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=zt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Pi=new Map,se=new Map,c1=f(()=>{Pi.clear(),se.clear()},"clear"),hg=f(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),rs=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Sl=f(async(e,t)=>{const r=zt();let i=be(r);const{labelStyles:s}=xt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),o=a.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ve(e,t.label,{style:rs(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);o.node().appendChild(c),W.info("abc82",t,t.labelType);let h,u;if(i){const d=c.children[0],m=Pt(c);h=await Vr.measure(()=>d.getBoundingClientRect()),u=h,m.attr("width",h.width),m.attr("height",h.height)}else{const d=Pt(c).select("text").node();await Vr.measure(()=>{h=c.getBBox(),d&&typeof d.getBBox=="function"?u=d.getBBox():u=h})}o.attr("transform",es(u,i)),Pi.set(t.id,a),t.width=h.width,t.height=h.height;let p;if(t.startLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelLeft,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startLeft=d,hs(p,t.startLabelLeft)}if(t.startLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(m,t.startLabelRight,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startRight=d,hs(p,t.startLabelRight)}if(t.endLabelLeft){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelLeft,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endLeft=d,hs(p,t.endLabelLeft)}if(t.endLabelRight){const d=e.insert("g").attr("class","edgeTerminals"),m=d.insert("g").attr("class","inner"),y=await Fr(d,t.endLabelRight,rs(t.labelStyle)||"",!1,!1);p=y;let x=y.getBBox();if(i){const C=y.children[0],k=Pt(y);x=C.getBoundingClientRect(),k.attr("width",x.width),k.attr("height",x.height)}m.attr("transform",es(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endRight=d,hs(p,t.endLabelRight)}return c},"insertEdgeLabel");function hs(e,t){be(zt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(hs,"setTerminalWidth");var u1=f((e,t)=>{W.debug("Moving label abc88 ",e.id,e.label,Pi.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=zt(),{subGraphTitleTotalMargin:s}=qa(i);if(e.label){const a=Pi.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}},"positionEdgeLabel"),d1=f((e,t)=>{var o;if(!(e!=null&&e.isLabelEdge)||!((o=e==null?void 0:e.id)!=null&&o.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),p1=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),o=e.width/2,n=e.height/2;return s>=o||a>=n},"outsideNode"),f1=f((e,t,r)=>{W.debug(`intersection calc abc89:
|
|
294
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-c/2).attr("y1",h/2).attr("x2",c/2).attr("y2",h/2),o.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),s.append(()=>o.node()),Ct(t,u),t.calcIntersect=function(g,m){return dt.rect(g,m)},t.intersect=function(g){return dt.rect(t,g)},s}p(wp,"defaultMindmapNode");async function Bp(e,t){const r={padding:t.padding??0};return Cl(e,t,r)}p(Bp,"mindmapCircle");var Kb=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:rp},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Jg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ip},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:np},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:yg},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Cg},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:eg},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:hg},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:ag},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:mg},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:Cl},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Sp},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Tp},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Zg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:vg},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Pg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:Ig},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:up},{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:$g},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:bg},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:cp},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:og},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:tp},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:op},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ap},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:Bg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Lg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:ug},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:gg},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:pg},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Rg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:fp},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:_g},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:dp},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:qg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:fg},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xg},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:pp},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:yp},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Sg},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:gp},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Tg},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:ep},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Xg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Gg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:tg},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:dg},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:hp},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:lp},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:mp},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Kg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Ng}],Qb=p(()=>{const t=[...Object.entries({state:sp,choice:ng,note:Vg,composite:lg,rectWithTitle:Qg,labelRect:Dg,block_arrow:sg,collapsedGroup:ig,iconSquare:Mg,iconCircle:Ag,icon:Fg,iconRounded:Eg,imageSquare:Og,anchor:Qu,kanbanItem:kp,mindmapCircle:Bp,defaultMindmapNode:wp,classBox:xp,erBox:bl,requirementBox:bp,usecaseActor:Wg,usecaseActorHollow:Hg,usecaseActorAwesome:zg,usecaseActorIcon:Yg,usecaseBusiness:Ug,usecaseEllipse:kg,usecaseJsonTable:jg}),...Kb.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),_p=Qb();function Jb(e){return e in _p}p(Jb,"isValidShape");var ys=p(({flowchart:e})=>{var s,a;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((a=e==null?void 0:e.subGraphTitleMargin)==null?void 0:a.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),wa=new Map;async function vp(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const a=t.shape?_p[t.shape]:void 0;if(!a)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let n;r.config.securityLevel==="sandbox"?n="_top":t.linkTarget&&(n=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",n??null),s=await a(i,t,r)}else s=await a(e,t,r),i=s;return i.attr("data-look",ne(t.look)),t.tooltip&&s.attr("title",t.tooltip),wa.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}p(vp,"insertNode");var yw=p((e,t)=>{wa.set(t.id,e)},"setNodeElem"),Cw=p(()=>{wa.clear()},"clear"),xw=p(e=>{const t=wa.get(e.id);J.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),tk=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,h=o,{labelStyles:l,nodeStyles:d,borderStyles:u,backgroundStyles:g}=mt(t),m=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.domId??t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look);We(m,t.colorIndex,i,c);const y=sr(r.flowchart.htmlLabels),x=t.direction==="LR",C=m.insert("g").attr("class","cluster-label swimlane-label"),b=await Oe(C,t.label,{style:t.labelStyle,useHtmlLabels:y,isNode:!0,width:t.width});let k=b.getBBox();if(y){const M=b.children[0],v=Pt(b);k=M.getBoundingClientRect(),v.attr("width",k.width),v.attr("height",k.height)}const w=t.padding??0,_=t.width<=k.width+w?k.width+w:t.width;t.width<=k.width+w?t.diff=(_-t.width)/2-w:t.diff=-w;const L=t.height,A=t.y-L/2,F=t.y+L/2,z=t.x-_/2,q=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:A+L/3,I=x?4:0,rt=k.height+2*I;let W,E;if(x){const M=Math.max(rt,k.height+2*I),v=z+M,R=Math.max(0,_-M);if(t.look==="handDrawn"){const Z=pt.svg(m),lt=gt(t,{roughness:.7,fill:n,stroke:h,seed:a}),ht=gt(t,{roughness:.7,fill:"none",stroke:h,seed:a}),ut=Z.rectangle(z,A,M,L,lt);W=m.insert(()=>ut,":first-child").attr("class","swimlane-title");const bt=Z.rectangle(v,A,R,L,ht);E=m.insert(()=>bt,":first-child").attr("class","swimlane-body"),W.select("path:nth-child(2)").attr("style",u.join(";")),W.select("path").attr("style",g.join(";").replace("fill","stroke"))}else W=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",d).attr("x",z).attr("y",A).attr("width",M).attr("height",L).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",d).attr("x",v).attr("y",A).attr("width",R).attr("height",L).attr("fill","none").attr("stroke",h);const $=z+M/2,X=t.y;C.attr("transform",`translate(${$}, ${X}) rotate(-90) translate(${-k.width/2}, ${-k.height/2})`)}else{const M=Math.max(0,q-A),v=Math.min(rt,M),R=A+v,$=Math.max(0,F-R),X=t.x-_/2;if(t.look==="handDrawn"){const ht=pt.svg(m),ut=gt(t,{roughness:.7,fill:n,stroke:h,fillWeight:3,seed:a}),bt=gt(t,{roughness:.7,fill:"none",stroke:h,seed:a}),Tt=ht.rectangle(X,A,_,v,ut);W=m.insert(()=>Tt,":first-child").attr("class","swimlane-title");const yt=ht.rectangle(X,R,_,$,bt);E=m.insert(()=>yt,":first-child").attr("class","swimlane-body"),W.select("path:nth-child(2)").attr("style",u.join(";")),W.select("path").attr("style",g.join(";").replace("fill","stroke"))}else W=m.insert("rect",":first-child"),E=m.insert("rect",":first-child"),W.attr("class","swimlane-title").attr("style",d).attr("x",X).attr("y",A).attr("width",_).attr("height",v).attr("fill",n).attr("stroke",h),E.attr("class","swimlane-body").attr("style",d).attr("x",X).attr("y",R).attr("width",_).attr("height",$).attr("fill","none").attr("stroke",h);const Z=t.x-k.width/2,lt=A+(v-k.height)/2;C.attr("transform",`translate(${Z}, ${lt})`)}if(J.trace("Swimlane data ",t,JSON.stringify(t)),l){const M=C.select("span");M&&M.attr("style",l)}return t.offsetX=0,t.width=_,t.height=L,t.offsetY=k.height-w/2,t.intersect=function(M){return Cr(t,M)},{cluster:m,labelBBox:k}},"swimlane"),Lp=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l,borderStyles:d,backgroundStyles:u}=mt(t),g=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look);We(g,t.colorIndex,i,c);const m=de(r),y=g.insert("g").attr("class","cluster-label ");let x;t.labelType==="markdown"?x=await Oe(y,t.label,{style:t.labelStyle,useHtmlLabels:m,isNode:!0,width:t.width}):x=await pr(y,t.label,t.labelStyle||"",!1,!0);let C=x.getBBox();if(de(r)){const z=x.children[0],q=Pt(x);C=z.getBoundingClientRect(),q.attr("width",C.width),q.attr("height",C.height)}const b=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(b-t.width)/2-t.padding:t.diff=-t.padding;const k=t.height,w=t.x-b/2,_=t.y-k/2;J.trace("Data ",t,JSON.stringify(t));let L;if(t.look==="handDrawn"){const z=pt.svg(g),q=gt(t,{roughness:.7,fill:n,stroke:o,fillWeight:3,seed:a}),I=z.path($e(w,_,b,k,0),q);L=g.insert(()=>(J.debug("Rough node insert CXC",I),I),":first-child"),L.select("path:nth-child(2)").attr("style",d.join(";")),L.select("path").attr("style",u.join(";").replace("fill","stroke"))}else L=g.insert("rect",":first-child"),L.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",w).attr("y",_).attr("width",b).attr("height",k);const{subGraphTitleTopMargin:A}=ys(r);if(y.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+A})`),h){const z=y.select("span");z&&z.attr("style",h)}const F=L.node().getBBox();return t.offsetX=0,t.width=F.width,t.height=F.height,t.offsetY=C.height-t.padding/2,t.intersect=function(z){return Cr(t,z)},{cluster:g,labelBBox:C}},"rect"),ek=p((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,a=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-a).attr("y",t.y-t.height/2-a).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(o){return Cr(t,o)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),rk=p(async(e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,borderColorArray:o,compositeBackground:c,compositeTitleBackground:h,nodeBorder:l}=s,d=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look);We(d,t.colorIndex,i,o);const u=d.insert("g",":first-child"),g=d.insert("g").attr("class","cluster-label");let m=d.append("rect");const y=await pr(g,t.label,t.labelStyle,void 0,!0);let x=y.getBBox();if(de(r)){const I=y.children[0],rt=Pt(y);x=I.getBoundingClientRect(),rt.attr("width",x.width),rt.attr("height",x.height)}const C=0*t.padding,b=C/2,k=(t.width<=x.width+t.padding?x.width+t.padding:t.width)+C;t.width<=x.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;const w=t.height+C,_=t.height+C-x.height-6,L=t.x-k/2,A=t.y-w/2;t.width=k;const F=t.y-t.height/2-b+x.height+2;let z;if(t.look==="handDrawn"){const I=t.cssClasses.includes("statediagram-cluster-alt"),rt=pt.svg(d),W=t.rx||t.ry?rt.path($e(L,A,k,w,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:l,seed:a}):rt.rectangle(L,A,k,w,{seed:a});z=d.insert(()=>W,":first-child");const E=rt.rectangle(L,F,k,_,{fill:I?n:c,fillStyle:I?"hachure":"solid",stroke:l,seed:a});z=d.insert(()=>W,":first-child"),m=d.insert(()=>E),z.attr("class","outer"),m.attr("class","inner")}else z=u.insert("rect",":first-child"),z.attr("class","outer").attr("x",L).attr("y",A).attr("width",k).attr("height",w).attr("data-look",t.look),m.attr("class","inner").attr("x",L).attr("y",F).attr("width",k).attr("height",_);g.attr("transform",`translate(${t.x-x.width/2}, ${A+1-(de(r)?0:3)})`);const q=z.node().getBBox();return t.height=q.height,t.offsetX=0,t.offsetY=x.height-t.padding/2,t.labelBBox=x,t.intersect=function(I){return Cr(t,I)},{cluster:d,labelBBox:x}},"roundedWithTitle"),ik=p(async(e,t)=>{J.info("Creating subgraph rect for ",t.id,t);const r=Rt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:a,clusterBorder:n}=i,{labelStyles:o,nodeStyles:c,borderStyles:h,backgroundStyles:l}=mt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=de(r),g=d.insert("g").attr("class","cluster-label "),m=await Oe(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let y=m.getBBox();if(de(r)){const A=m.children[0],F=Pt(m);y=A.getBoundingClientRect(),F.attr("width",y.width),F.attr("height",y.height)}const x=t.width<=y.width+t.padding?y.width+t.padding:t.width;t.width<=y.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const C=t.height,b=t.x-x/2,k=t.y-C/2;J.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const A=pt.svg(d),F=gt(t,{roughness:.7,fill:a,stroke:n,fillWeight:4,seed:s}),z=A.path($e(b,k,x,C,t.rx),F);w=d.insert(()=>(J.debug("Rough node insert CXC",z),z),":first-child"),w.select("path:nth-child(2)").attr("style",h.join(";")),w.select("path").attr("style",l.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",c).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",k).attr("width",x).attr("height",C);const{subGraphTitleTopMargin:_}=ys(r);if(g.attr("transform",`translate(${t.x-y.width/2}, ${t.y-t.height/2+_})`),o){const A=g.select("span");A&&A.attr("style",o)}const L=w.node().getBBox();return t.offsetX=0,t.width=L.width,t.height=L.height,t.offsetY=y.height-t.padding/2,t.intersect=function(A){return Cr(t,A)},{cluster:d,labelBBox:y}},"kanbanSection"),sk=p((e,t)=>{const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{altBackground:n,nodeBorder:o,borderColorArray:c}=s,h=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look);We(h,t.colorIndex,i,c);const l=h.insert("g",":first-child"),d=0*t.padding,u=t.width+d;t.diff=-t.padding;const g=t.height+d,m=t.x-u/2,y=t.y-g/2;t.width=u;let x;if(t.look==="handDrawn"){const k=pt.svg(h).rectangle(m,y,u,g,{fill:n??"#efefef",fillStyle:"solid",roughness:.5,strokeLineDash:[5],stroke:o,seed:a});x=h.insert(()=>k,":first-child").attr("class","divider")}else{x=l.insert("rect",":first-child");let b="outer";t.look,b="divider",x.attr("class",b).attr("x",m).attr("y",y).attr("width",u).attr("height",g).attr("data-look",t.look)}const C=x.node().getBBox();return t.height=C.height,t.offsetX=0,t.offsetY=0,t.intersect=function(b){return Cr(t,b)},{cluster:h,labelBBox:{}}},"divider"),ak=p(async(e,t,r)=>{var _;J.info(`Creating ${r.cssClass} for `,t.id,t);const i=Rt(),{theme:s,themeVariables:a,handDrawnSeed:n}=i,{borderColorArray:o}=a,{labelStyles:c,borderStyles:h}=mt(t),l=e.insert("g").attr("class","cluster "+r.cssClass+" "+t.cssClasses).attr("id",t.domId??t.id).attr("data-look",t.look);We(l,t.colorIndex,s,o);const d=de(i),u=l.insert("g").attr("class","cluster-label");let g={width:0,height:0};const m=(_=t.label)==null?void 0:_.trim();if(m){let L;if(t.labelType==="markdown"?L=await Oe(u,t.label,{style:t.labelStyle,useHtmlLabels:d,isNode:!0,width:t.width}):L=await pr(u,t.label,t.labelStyle||"",!1,!0),g=L.getBBox(),d){const A=L.children[0],F=Pt(L);g=A.getBoundingClientRect(),F.attr("width",g.width),F.attr("height",g.height)}}const y=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const x=t.height,C=t.x-y/2,b=t.y-x/2;let k;if(t.look==="handDrawn"){const L=pt.svg(l),A=gt(t,{roughness:r.roughness,fill:r.fill,stroke:r.stroke,strokeWidth:r.strokeWidth,seed:n,...r.fill==="none"?{fillWeight:0}:{fillStyle:"solid"},...r.strokeDash?{strokeLineDash:r.strokeDash}:{}}),F=L.path($e(C,b,y,x,r.rx),A);k=l.insert(()=>F,":first-child"),k.select("path:nth-child(2)").attr("style",h.join(";"))}else k=l.insert("rect",":first-child"),k.attr("rx",r.rx).attr("ry",r.rx).attr("x",C).attr("y",b).attr("width",y).attr("height",x).attr("fill",r.fill).attr("stroke",r.stroke).attr("stroke-width",r.strokeWidth+"px"),r.strokeDash&&k.attr("stroke-dasharray",r.strokeDash.join(", "));if(m){const{subGraphTitleTopMargin:L}=ys(i);if(u.attr("transform",`translate(${t.x-g.width/2}, ${t.y-t.height/2+L})`),c){const A=u.select("span");A&&A.attr("style",c)}}const w=k.node().getBBox();return t.offsetX=0,t.width=w.width,t.height=w.height,t.offsetY=g.height-t.padding/2,t.intersect=function(L){return Cr(t,L)},{cluster:l,labelBBox:g}},"createContainerGroup"),ok=p(async(e,t)=>{const{themeVariables:r}=Rt(),i=r.flowContainerStroke||r.secondaryBorderColor;return ak(e,t,{cssClass:"flow-cluster",rx:10,fill:"none",stroke:i,strokeWidth:.75,roughness:.7})},"flowGroup"),nk=p((e,t)=>{const r=e.boundaryType||"rect",i=r==="package"?20:e.padding,s=r==="package"?t.height+10:0,a=Math.max(e.width,t.width+i),n=r==="package"?Math.max(e.height,s+e.padding*2):e.height,o=e.x-a/2,c=e.y-n/2;return{boundaryType:r,width:a,height:n,x:o,y:c,bodyY:c+s,bodyHeight:n-s,tabHeight:s,tabWidth:r==="package"?Math.min(a,Math.max(80,t.width+20)):0}},"getUsecaseSystemBoundaryGeometry"),lk=p(async(e,t)=>{var W;J.info("Creating usecase system boundary for ",t.id,t);const r=Rt(),{theme:i,themeVariables:s,handDrawnSeed:a}=r,{clusterBkg:n,clusterBorder:o,borderColorArray:c}=s,{labelStyles:h,nodeStyles:l}=mt(t),{stylesMap:d}=Dr(t),u=t.boundaryType||"rect",g=e.insert("g").attr("class",`cluster usecase-system-boundary usecase-system-boundary-${u} ${t.cssClasses}`).attr("id",typeof t.domId=="string"?t.domId:t.id).attr("data-boundary-type",u).attr("data-look",t.look);We(g,t.colorIndex,i,c);const m=de(r),y=g.insert("g").attr("class","cluster-label system-boundary-title"),x=await Oe(y,t.label,{style:h,useHtmlLabels:m,isNode:!0});let C=x.getBBox();if(m){const E=x.children[0],M=Pt(x);C=E.getBoundingClientRect(),M.attr("width",C.width),M.attr("height",C.height)}const b=nk(t,C),{width:k,height:w,x:_,y:L,bodyY:A,bodyHeight:F,tabHeight:z,tabWidth:q}=b;t.diff=t.width<=C.width+t.padding?(k-t.width)/2-t.padding:-t.padding;const I=gt(t,{fill:d.get("fill")||n,stroke:d.get("stroke")||o,strokeWidth:((W=d.get("stroke-width"))==null?void 0:W.replace("px",""))||1,seed:a});if(t.look==="handDrawn"){const E=pt.svg(g),M=E.rectangle(_,A,k,F,I);if(g.insert(()=>M,":first-child").attr("class","boundary-body label-container"),u==="package"){const v=E.rectangle(_,L,q,z,I);g.insert(()=>v,":first-child").attr("class","boundary-tab system-boundary-package-tab label-container")}}else g.insert("rect",":first-child").attr("class","boundary-body label-container").attr("style",l).attr("x",_).attr("y",A).attr("width",k).attr("height",F),u==="package"&&g.insert("rect",":first-child").attr("class","boundary-tab system-boundary-package-tab label-container").attr("style",l).attr("x",_).attr("y",L).attr("width",q).attr("height",z);const{subGraphTitleTopMargin:rt}=ys(r);return u==="package"?y.attr("transform",`translate(${_+(q-C.width)/2}, ${L+(z-C.height)/2})`):y.attr("transform",`translate(${t.x-C.width/2}, ${L+rt})`),h&&(y.attr("style",h),y.select("span").attr("style",h)),t.offsetX=0,t.width=k,t.height=w,t.offsetY=C.height-t.padding/2,t.labelBBox=C,t.intersect=function(E){return Cr(t,E)},{cluster:g,labelBBox:C}},"usecaseSystemBoundary"),hk=Lp,ck={rect:Lp,squareRect:hk,roundedWithTitle:rk,noteGroup:ek,divider:sk,kanbanSection:ik,flowGroup:ok,usecaseSystemBoundary:lk,swimlane:tk},dk=new Set(["noteGroup","divider"]),bw=p(e=>!dk.has(e??"rect"),"clusterPaintsTitle"),Fp=new Map,uk=p(async(e,t)=>{const r=t.shape||"rect",i=await ck[r](e,t);return Fp.set(t.id,i),i},"insertCluster"),kw=p(()=>{Fp=new Map},"clear"),ji=p((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),xe={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},Pc={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Qi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Kt(e),t=Kt(t);const[r,i]=[e.x,e.y],[s,a]=[t.x,t.y],n=s-r,o=a-i;return{angle:Math.atan(o/n),deltaX:n,deltaY:o}}p(Qi,"calculateDeltaAndAngle");var Kt=p(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),gk=p(e=>({x:p(function(t,r,i){let s=0;const a=Kt(i[0]).x<Kt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(xe,e.arrowTypeStart)){const{angle:g,deltaX:m}=Qi(i[0],i[1]);s=xe[e.arrowTypeStart]*Math.cos(g)*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(xe,e.arrowTypeEnd)){const{angle:g,deltaX:m}=Qi(i[i.length-1],i[i.length-2]);s=xe[e.arrowTypeEnd]*Math.cos(g)*(m>=0?1:-1)}const n=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),o=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),c=Math.abs(Kt(t).x-Kt(i[0]).x),h=Math.abs(Kt(t).y-Kt(i[0]).y),l=xe[e.arrowTypeStart],d=xe[e.arrowTypeEnd],u=1;if(n<d&&n>0&&o<d){let g=d+u-n;g*=a==="right"?-1:1,s-=g}if(c<l&&c>0&&h<l){let g=l+u-c;g*=a==="right"?-1:1,s+=g}return Kt(t).x+s},"x"),y:p(function(t,r,i){let s=0;const a=Kt(i[0]).y<Kt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(xe,e.arrowTypeStart)){const{angle:g,deltaY:m}=Qi(i[0],i[1]);s=xe[e.arrowTypeStart]*Math.abs(Math.sin(g))*(m>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(xe,e.arrowTypeEnd)){const{angle:g,deltaY:m}=Qi(i[i.length-1],i[i.length-2]);s=xe[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(m>=0?1:-1)}const n=Math.abs(Kt(t).y-Kt(i[i.length-1]).y),o=Math.abs(Kt(t).x-Kt(i[i.length-1]).x),c=Math.abs(Kt(t).y-Kt(i[0]).y),h=Math.abs(Kt(t).x-Kt(i[0]).x),l=xe[e.arrowTypeStart],d=xe[e.arrowTypeEnd],u=1;if(n<d&&n>0&&o<d){let g=d+u-n;g*=a==="up"?-1:1,s-=g}if(c<l&&c>0&&h<l){let g=l+u-c;g*=a==="up"?-1:1,s+=g}return Kt(t).y+s},"y")}),"getLineFunctionsWithOffset"),pk=p((e,t,r,i,s,a=!1,n)=>{t.arrowTypeStart&&Rc(e,"start",t.arrowTypeStart,r,i,s,a,n),t.arrowTypeEnd&&Rc(e,"end",t.arrowTypeEnd,r,i,s,a,n)},"addEdgeMarkers"),fk={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},arrow_hierarchy:{type:"hierarchy",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},mk=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Rc=p((e,t,r,i,s,a,n=!1,o)=>{var m;if(!r||r==="none")return;const c=fk[r],h=c&&mk.includes(c.type);if(!c){J.warn(`Unknown arrow type: ${r}`);return}const l=c.type,g=`${s}_${a}-${l}${t==="start"?"Start":"End"}${n&&h?"-margin":""}`;if(o&&o.trim()!==""){const y=o.replace(/[^\dA-Za-z]/g,"_"),x=`${g}_${y}`;if(!document.getElementById(x)){const C=document.getElementById(g);if(C){const b=C.cloneNode(!0);b.id=x,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",o),c.fill&&w.setAttribute("fill",o)}),(m=C.parentNode)==null||m.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),yk=p(e=>{var t,r;return typeof e=="string"?e:(r=(t=Rt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),ca=new Map,fe=new Map,Sw=p(()=>{ca.clear(),fe.clear()},"clear"),Tw=p(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Gi=p(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Ck=p(async(e,t)=>{const r=Rt();let i=de(r);const{labelStyles:s}=mt(t);t.labelStyle=s;const a=e.insert("g").attr("class","edgeLabel"),n=a.insert("g").attr("class","label").attr("data-id",t.id),o=t.labelType==="markdown",h=await Oe(e,t.label,{style:Gi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:o,width:o?void 0:void 0},r);n.node().appendChild(h),J.info("abc82",t,t.labelType);let l,d;if(i){const g=h.children[0],m=Pt(h);l=await Yr.measure(()=>g.getBoundingClientRect()),d=l,m.attr("width",l.width),m.attr("height",l.height)}else{const g=Pt(h).select("text").node();await Yr.measure(()=>{l=h.getBBox(),g&&typeof g.getBBox=="function"?d=g.getBBox():d=l})}n.attr("transform",ji(d,i)),ca.set(t.id,a),t.width=l.width,t.height=l.height;let u;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await pr(m,t.startLabelLeft,Gi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],b=Pt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",ji(x,i)),fe.get(t.id)||fe.set(t.id,{}),fe.get(t.id).startLeft=g,ts(u,t.startLabelLeft,x),Ji(t,"startLeft",x)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await pr(m,t.startLabelRight,Gi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],b=Pt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",ji(x,i)),fe.get(t.id)||fe.set(t.id,{}),fe.get(t.id).startRight=g,ts(u,t.startLabelRight,x),Ji(t,"startRight",x)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await pr(m,t.endLabelLeft,Gi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],b=Pt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",ji(x,i)),fe.get(t.id)||fe.set(t.id,{}),fe.get(t.id).endLeft=g,ts(u,t.endLabelLeft,x),Ji(t,"endLeft",x)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),m=g.insert("g").attr("class","inner"),y=await pr(m,t.endLabelRight,Gi(t.labelStyle)||"",!1,!1);u=y;let x=y.getBBox();if(i){const C=y.children[0],b=Pt(y);x=C.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}m.attr("transform",ji(x,i)),fe.get(t.id)||fe.set(t.id,{}),fe.get(t.id).endRight=g,ts(u,t.endLabelRight,x),Ji(t,"endRight",x)}return h},"insertEdgeLabel");function Ji(e,t,r){e.terminalLabelSizes??(e.terminalLabelSizes={}),e.terminalLabelSizes[t]={width:r.width,height:r.height}}p(Ji,"recordTerminalLabelSize");function ts(e,t,r){de(Rt())&&e&&(e.style.width=Math.max(t.length*9,r.width)+"px",e.style.height=r.height+"px")}p(ts,"setTerminalWidth");var xk=p((e,t)=>{let r=e.x,i=e.y;if(t!=null&&t.updatedPath){const s=Re.calcLabelPosition(t.updatedPath);if(t.originalPath){const a=Re.calcLabelPosition(t.originalPath);r=e.x+(s.x-a.x),i=e.y+(s.y-a.y)}else r=s.x,i=s.y}return{x:r,y:i}},"resolveEdgeLabelPosition"),bk=p((e,t)=>{J.debug("Moving label abc88 ",e.id,e.label,ca.get(e.id),t);const r=Rt(),{subGraphTitleTotalMargin:i}=ys(r);if(e.label){const a=ca.get(e.id),{x:n,y:o}=xk(e,t);J.debug("Moving label "+e.label+" from (",e.x,",",e.y,") to (",n,",",o,") abc88"),a.attr("transform",`translate(${n}, ${o+i/2})`)}const s=t.updatedPath?t.updatedPath:t.originalPath;if(e.startLabelLeft){const a=fe.get(e.id).startLeft;let n=e.x,o=e.y;if(s){const c=Re.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.startLabelRight){const a=fe.get(e.id).startRight;let n=e.x,o=e.y;if(s){const c=Re.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelLeft){const a=fe.get(e.id).endLeft;let n=e.x,o=e.y;if(s){const c=Re.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}if(e.endLabelRight){const a=fe.get(e.id).endRight;let n=e.x,o=e.y;if(s){const c=Re.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",s);n=c.x,o=c.y}a.attr("transform",`translate(${n}, ${o})`)}},"positionEdgeLabel"),kk=p((e,t)=>{var n;if(!(e!=null&&e.isLabelEdge)||!((n=e==null?void 0:e.id)!=null&&n.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),a=Math.abs(i.y-r.y);return s<.001||a<.001?t:a>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),Sk=p((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),a=Math.abs(t.y-i),n=e.width/2,o=e.height/2;return s>=n||a>=o},"outsideNode"),Tk=p((e,t,r)=>{J.debug(`intersection calc abc89:
|
|
262
295
|
outsidePoint: ${JSON.stringify(t)}
|
|
263
296
|
insidePoint : ${JSON.stringify(r)}
|
|
264
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),o=e.width/2;let n=r.x<t.x?o-a:o+a;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*o>Math.abs(i-t.x)*l){let u=r.y<t.y?t.y-l-s:s-l-t.y;n=h*u/c;const p={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-u:r.y-c+u};return n===0&&(p.x=t.x,p.y=t.y),h===0&&(p.x=t.x),c===0&&(p.y=t.y),W.debug(`abc89 top/bottom calc, Q ${c}, q ${u}, R ${h}, r ${n}`,p),p}else{r.x<t.x?n=t.x-o-i:n=i-o-t.x;let u=c*n/h,p=r.x<t.x?r.x+h-n:r.x-h+n,d=r.y<t.y?r.y+u:r.y-u;return W.debug(`sides calc abc89, Q ${c}, q ${u}, R ${h}, r ${n}`,{_x:p,_y:d}),n===0&&(p=t.x,d=t.y),h===0&&(p=t.x),c===0&&(d=t.y),{x:p,y:d}}},"intersection"),Rc=f((e,t)=>{W.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(W.info("abc88 checking point",a,t),!p1(t,a)&&!s){const o=f1(t,i,a);W.debug("abc88 inside",a,i,o),W.debug("abc88 intersection",o,t);let n=!1;r.forEach(l=>{n=n||l.x===o.x&&l.y===o.y}),r.some(l=>l.x===o.x&&l.y===o.y)?W.warn("abc88 no intersect",o,r):r.push(o),s=!0}else W.warn("abc88 outside",a,i),i=a,s||r.push(a)}),W.debug("returning points",r),r},"cutPathAtIntersect");function cg(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],o=e[i+1];(s.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===o.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(cg,"extractCornerPoints");var qc=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),o=r/a;return{x:t.x-o*i,y:t.y-o*s}},"findAdjacentPoint"),g1=f(function(e){const{cornerPointPositions:t}=cg(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],o=e[i],n=qc(s,o,5),l=qc(a,o,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const u=Math.sqrt(2)*2;let p={x:o.x,y:o.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){W.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const d=5;o.x===n.x?p={x:c<0?n.x-d+u:n.x+d-u,y:h<0?n.y-u:n.y+u}:p={x:c<0?n.x-u:n.x+u,y:h<0?n.y-d+u:n.y+d-u}}else W.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(p,l)}else r.push(e[i]);return r},"fixCorners"),m1=f((e,t,r)=>{const i=e-t-r,s=2,a=2,o=s+a,n=Math.floor(i/o),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${a}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),ug=f(function(e,t,r,i,s,a,o,n=!1){var P;if(!o)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=zt();let h=t.points,u=!1;const p=s;var d=a;const m=[];for(const H in t.cssCompiledStyles)Id(H)||m.push(t.cssCompiledStyles[H]);if(c==="swimlane"){if(d.intersect&&p.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[p.intersect(h[0]),d.intersect(h[1])];else{const H=h.slice(1,-1),Z=H[0],ut=H[H.length-1],pt=.5,bt=Math.abs(h[h.length-1].x-ut.x)<pt&&Math.abs(h[h.length-1].y-ut.y)<pt,Tt=p.intersect(Z),nt=bt?ut:d.intersect(ut),At=Math.abs(nt.x-ut.x)<pt&&Math.abs(nt.y-ut.y)<pt,qt=Math.abs(Tt.x-Z.x)<pt&&Math.abs(Tt.y-Z.y)<pt?[]:[Tt],vt=At?[]:[nt];h=[...qt,...H,...vt]}h=d1(t,h)}else d.intersect&&p.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(p.intersect(h[0])),h.push(d.intersect(h[h.length-1])));const y=btoa(JSON.stringify(h));t.toCluster&&(W.info("to cluster abc88",r.get(t.toCluster)),h=Rc(t.points,r.get(t.toCluster).node),u=!0),t.fromCluster&&(W.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Rc(h.reverse(),r.get(t.fromCluster).node).reverse(),u=!0);let x=h.filter(H=>!Number.isNaN(H.y));const C=h1(t.curve);C!=="rounded"&&(x=g1(x));let k=ds;switch(C){case"linear":k=ds;break;case"basis":k=en;break;case"cardinal":k=Qu;break;case"bumpX":k=Gu;break;case"bumpY":k=Uu;break;case"catmullRom":k=td;break;case"monotoneX":k=od;break;case"monotoneY":k=nd;break;case"natural":k=hd;break;case"step":k=cd;break;case"stepAfter":k=dd;break;case"stepBefore":k=ud;break;case"rounded":k=ds;break;default:k=en}const{x:S,y:w}=a1(t),B=Ay().x(S).y(w).curve(k);let L;switch(t.thickness){case"normal":L="edge-thickness-normal";break;case"thick":L="edge-thickness-thick";break;case"invisible":L="edge-thickness-invisible";break;default:L="edge-thickness-normal"}switch(t.pattern){case"solid":L+=" edge-pattern-solid";break;case"dotted":L+=" edge-pattern-dotted";break;case"dashed":L+=" edge-pattern-dashed";break;default:L+=" edge-pattern-solid"}let E,F=C==="rounded"?dg(pg(x,t),5):B(x);const X=Array.isArray(t.style)?t.style:[t.style];let N=X.find(H=>H==null?void 0:H.startsWith("stroke:")),z="";t.animate&&(z="edge-animation-fast"),t.animation&&(z="edge-animation-"+t.animation);let at=!1;if(t.look==="handDrawn"){const H=ft.svg(e);Object.assign([],x);const Z=H.path(F,{roughness:.3,seed:l});L+=" transition",E=Pt(Z).select("path").attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(z?" "+z:"")).attr("style",X?X.reduce((pt,bt)=>pt+";"+bt,""):"");let ut=E.attr("d");E.attr("d",ut),e.node().appendChild(E.node())}else{const H=m.join(";"),Z=X?X.reduce((At,Lt)=>At+Lt+";",""):"",ut=(H?H+";"+Z+";":Z)+";"+(X?X.reduce((At,Lt)=>At+";"+Lt,""):"");E=e.append("path").attr("d",F).attr("id",`${o}-${t.id}`).attr("class"," "+L+(t.classes?" "+t.classes:"")+(z?" "+z:"")).attr("style",ut),N=(P=ut.match(/stroke:([^;]+)/))==null?void 0:P[1],at=t.animate===!0||!!t.animation||H.includes("animation");const pt=E.node(),bt=typeof pt.getTotalLength=="function"?pt.getTotalLength():0,Tt=Pc[t.arrowTypeStart]||0,nt=Pc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!at){const Lt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?m1(bt,Tt,nt):`0 ${Tt} ${bt-Tt-nt} ${nt}`}; stroke-dashoffset: 0;`;E.attr("style",Lt+E.attr("style"))}}E.attr("data-edge",!0),E.attr("data-et","edge"),E.attr("data-id",t.id),E.attr("data-points",y),E.attr("data-look",oe(t.look)),t.showPoints&&x.forEach(H=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",H.x).attr("cy",H.y)});let j="";(zt().flowchart.arrowMarkerAbsolute||zt().state.arrowMarkerAbsolute)&&(j=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,j=j.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),W.info("arrowTypeStart",t.arrowTypeStart),W.info("arrowTypeEnd",t.arrowTypeEnd);const A=!at&&(t==null?void 0:t.look)==="neo";o1(E,t,j,o,i,A,N);const O=Math.floor(h.length/2),v=h[O];xe.isLabelCoordinateInPath(v,E.attr("d"))||(u=!0);let R={};return u&&(R.updatedPath=h),R.originalPath=t.points,R},"insertEdge");function dg(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const o=e[a],n=e[a-1],l=e[a+1];if(a===0)r+=`M${o.x},${o.y}`;else if(a===i-1)r+=`L${o.x},${o.y}`;else{const c=o.x-n.x,h=o.y-n.y,u=l.x-o.x,p=l.y-o.y,d=Math.hypot(c,h),m=Math.hypot(u,p);if(d<s||m<s){r+=`L${o.x},${o.y}`;continue}const y=c/d,x=h/d,C=u/m,k=p/m,S=y*C+x*k,w=Math.max(-1,Math.min(1,S)),B=Math.acos(w);if(B<s||Math.abs(Math.PI-B)<s){r+=`L${o.x},${o.y}`;continue}const L=Math.min(t/Math.sin(B/2),d/2,m/2),E=o.x-y*L,F=o.y-x*L,X=o.x+C*L,N=o.y+k*L;r+=`L${E},${F}`,r+=`Q${o.x},${o.y} ${X},${N}`}}return r}f(dg,"generateRoundedPath");function Bn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(Bn,"calculateDeltaAndAngle");function pg(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&Ce[t.arrowTypeStart]){const s=Ce[t.arrowTypeStart],a=e[0],o=e[1],{angle:n}=Bn(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=a.x+l,r[0].y=a.y+c}const i=e.length;if(i>=2&&Ce[t.arrowTypeEnd]){const s=Ce[t.arrowTypeEnd],a=e[i-1],o=e[i-2],{angle:n}=Bn(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=a.x-l,r[i-1].y=a.y-c}return r}f(pg,"applyMarkerOffsetsToPoints");var y1=f((e,t,r,i)=>{t.forEach(s=>{N1[s](e,r,i)})},"insertMarkers"),C1=f((e,t,r)=>{W.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),x1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),b1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),k1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),T1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),S1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),w1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),_1=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),B1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),v1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),L1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),F1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),E1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),A1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),M1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),O1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");n.append("circle").attr("fill",o??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");l.append("circle").attr("fill",o??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),$1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),D1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:o}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");n.append("circle").attr("fill",o??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const l=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");l.append("circle").attr("fill",o??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),P1=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
297
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,a=Math.abs(i-r.x),n=e.width/2;let o=r.x<t.x?n-a:n+a;const c=e.height/2,h=Math.abs(t.y-r.y),l=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*n>Math.abs(i-t.x)*c){let d=r.y<t.y?t.y-c-s:s-c-t.y;o=l*d/h;const u={x:r.x<t.x?r.x+o:r.x-l+o,y:r.y<t.y?r.y+h-d:r.y-h+d};return o===0&&(u.x=t.x,u.y=t.y),l===0&&(u.x=t.x),h===0&&(u.y=t.y),J.debug(`abc89 top/bottom calc, Q ${h}, q ${d}, R ${l}, r ${o}`,u),u}else{r.x<t.x?o=t.x-n-i:o=i-n-t.x;let d=h*o/l,u=r.x<t.x?r.x+l-o:r.x-l+o,g=r.y<t.y?r.y+d:r.y-d;return J.debug(`sides calc abc89, Q ${h}, q ${d}, R ${l}, r ${o}`,{_x:u,_y:g}),o===0&&(u=t.x,g=t.y),l===0&&(u=t.x),h===0&&(g=t.y),{x:u,y:g}}},"intersection"),qc=p((e,t)=>{J.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(a=>{if(J.info("abc88 checking point",a,t),!Sk(t,a)&&!s){const n=Tk(t,i,a);J.debug("abc88 inside",a,i,n),J.debug("abc88 intersection",n,t);let o=!1;r.forEach(c=>{o=o||c.x===n.x&&c.y===n.y}),r.some(c=>c.x===n.x&&c.y===n.y)?J.warn("abc88 no intersect",n,r):r.push(n),s=!0}else J.warn("abc88 outside",a,i),i=a,s||r.push(a)}),J.debug("returning points",r),r},"cutPathAtIntersect");function Ap(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],a=e[i],n=e[i+1];(s.x===a.x&&a.y===n.y&&Math.abs(a.x-n.x)>5&&Math.abs(a.y-s.y)>5||s.y===a.y&&a.x===n.x&&Math.abs(a.x-s.x)>5&&Math.abs(a.y-n.y)>5)&&(t.push(a),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}p(Ap,"extractCornerPoints");var Nc=p(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,a=Math.sqrt(i*i+s*s),n=r/a;return{x:t.x-n*i,y:t.y-n*s}},"findAdjacentPoint"),wk=p(function(e){const{cornerPointPositions:t}=Ap(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],a=e[i+1],n=e[i],o=Nc(s,n,5),c=Nc(a,n,5),h=c.x-o.x,l=c.y-o.y;r.push(o);const d=Math.sqrt(2)*2;let u={x:n.x,y:n.y};if(Math.abs(a.x-s.x)>10&&Math.abs(a.y-s.y)>=10){J.debug("Corner point fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));const g=5;n.x===o.x?u={x:h<0?o.x-g+d:o.x+g-d,y:l<0?o.y-d:o.y+d}:u={x:h<0?o.x-d:o.x+d,y:l<0?o.y-g+d:o.y+g-d}}else J.debug("Corner point skipping fixing",Math.abs(a.x-s.x),Math.abs(a.y-s.y));r.push(u,c)}else r.push(e[i]);return r},"fixCorners"),Bk=p((e,t,r)=>{const i=e-t-r,s=2,a=2,n=s+a,o=Math.floor(i/n),c=Number.isFinite(o)?Math.max(0,o):0,h=Array(c).fill(`${s} ${a}`).join(" ");return`0 ${t} ${h} ${r}`},"generateDashArray"),_k=p(function(e,t,r,i,s,a,n,o=!1,c=void 0){var Z;if(!n)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:h,layout:l}=Rt(),d=c??l;let u=t.points,g=!1;const m=s;var y=a;const x=[];for(const lt in t.cssCompiledStyles)Gd(lt)||x.push(t.cssCompiledStyles[lt]);if(d==="swimlane"){if(!o&&y.intersect&&m.intersect&&Array.isArray(u)&&u.length>=2)if(u.length===2)u=[m.intersect(u[0]),y.intersect(u[1])];else{const lt=u.slice(1,-1),ht=lt[0],ut=lt[lt.length-1],bt=.5,Tt=Math.abs(u[u.length-1].x-ut.x)<bt&&Math.abs(u[u.length-1].y-ut.y)<bt,yt=m.intersect(ht),At=Tt?ut:y.intersect(ut),It=Math.abs(At.x-ut.x)<bt&&Math.abs(At.y-ut.y)<bt,ct=Math.abs(yt.x-ht.x)<bt&&Math.abs(yt.y-ht.y)<bt?[]:[yt],xt=It?[]:[At];u=[...ct,...lt,...xt]}u=kk(t,u)}else y.intersect&&m.intersect&&!o&&(u=u.slice(1,t.points.length-1),u.unshift(m.intersect(u[0])),u.push(y.intersect(u[u.length-1])));const C=btoa(JSON.stringify(u));t.toCluster&&(J.info("to cluster abc88",r.get(t.toCluster)),u=qc(t.points,r.get(t.toCluster).node),g=!0),t.fromCluster&&(J.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(u,null,2)),u=qc(u.reverse(),r.get(t.fromCluster).node).reverse(),g=!0);let b=u.filter(lt=>!Number.isNaN(lt.y));const k=yk(t.curve);k!=="rounded"&&(b=wk(b));let w=es;switch(k){case"linear":w=es;break;case"basis":w=Ro;break;case"cardinal":w=rd;break;case"bumpX":w=Kc;break;case"bumpY":w=Zc;break;case"catmullRom":w=sd;break;case"monotoneX":w=cd;break;case"monotoneY":w=dd;break;case"natural":w=gd;break;case"step":w=pd;break;case"stepAfter":w=md;break;case"stepBefore":w=fd;break;case"rounded":w=es;break;default:w=Ro}const{x:_,y:L}=gk(t),A=cm().x(_).y(L).curve(w);let F;switch(t.thickness){case"normal":F="edge-thickness-normal";break;case"thick":F="edge-thickness-thick";break;case"invisible":F="edge-thickness-invisible";break;default:F="edge-thickness-normal"}switch(t.pattern){case"solid":F+=" edge-pattern-solid";break;case"dotted":F+=" edge-pattern-dotted";break;case"dashed":F+=" edge-pattern-dashed";break;default:F+=" edge-pattern-solid"}let z,q=k==="rounded"?Ep(Mp(b,t),5):A(b);const I=Array.isArray(t.style)?t.style:[t.style];let rt=I.find(lt=>lt==null?void 0:lt.startsWith("stroke:")),W="";t.animate&&(W="edge-animation-fast"),t.animation&&(W="edge-animation-"+t.animation);let E=!1;if(t.look==="handDrawn"){const lt=pt.svg(e);Object.assign([],b);const ht=lt.path(q,{roughness:.3,seed:h});F+=" transition",z=Pt(ht).select("path").attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",I?I.reduce((bt,Tt)=>bt+";"+Tt,""):"");let ut=z.attr("d");z.attr("d",ut),e.node().appendChild(z.node())}else{const lt=x.join(";"),ht=I?I.reduce((It,Bt)=>It+Bt+";",""):"",ut=(lt?lt+";"+ht+";":ht)+";"+(I?I.reduce((It,Bt)=>It+";"+Bt,""):"");z=e.append("path").attr("d",q).attr("id",`${n}-${t.id}`).attr("class"," "+F+(t.classes?" "+t.classes:"")+(W?" "+W:"")).attr("style",ut),rt=(Z=ut.match(/stroke:([^;]+)/))==null?void 0:Z[1],E=t.animate===!0||!!t.animation||lt.includes("animation");const bt=z.node(),Tt=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,yt=Pc[t.arrowTypeStart]||0,At=Pc[t.arrowTypeEnd]||0;if(t.look==="neo"&&!E){const Bt=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Bk(Tt,yt,At):`0 ${yt} ${Tt-yt-At} ${At}`}; stroke-dashoffset: 0;`;z.attr("style",Bt+z.attr("style"))}}z.attr("data-edge",!0),z.attr("data-et","edge"),z.attr("data-id",t.id),z.attr("data-points",C),z.attr("data-look",ne(t.look)),t.showPoints&&b.forEach(lt=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",lt.x).attr("cy",lt.y)});let M="";(Rt().flowchart.arrowMarkerAbsolute||Rt().state.arrowMarkerAbsolute)&&(M=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,M=M.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),J.info("arrowTypeStart",t.arrowTypeStart),J.info("arrowTypeEnd",t.arrowTypeEnd);const v=!E&&(t==null?void 0:t.look)==="neo";pk(z,t,M,n,i,v,rt);const R=Math.floor(u.length/2),$=u[R];Re.isLabelCoordinateInPath($,z.attr("d"))||(g=!0);let X={};return g&&(X.updatedPath=u),X.originalPath=t.points,X},"insertEdge");function Ep(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let a=0;a<i;a++){const n=e[a],o=e[a-1],c=e[a+1];if(a===0)r+=`M${n.x},${n.y}`;else if(a===i-1)r+=`L${n.x},${n.y}`;else{const h=n.x-o.x,l=n.y-o.y,d=c.x-n.x,u=c.y-n.y,g=Math.hypot(h,l),m=Math.hypot(d,u);if(g<s||m<s){r+=`L${n.x},${n.y}`;continue}const y=h/g,x=l/g,C=d/m,b=u/m,k=y*C+x*b,w=Math.max(-1,Math.min(1,k)),_=Math.acos(w);if(_<s||Math.abs(Math.PI-_)<s){r+=`L${n.x},${n.y}`;continue}const L=Math.min(t/Math.sin(_/2),g/2,m/2),A=n.x-y*L,F=n.y-x*L,z=n.x+C*L,q=n.y+b*L;r+=`L${A},${F}`,r+=`Q${n.x},${n.y} ${z},${q}`}}return r}p(Ep,"generateRoundedPath");function dn(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}p(dn,"calculateDeltaAndAngle");function Mp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&xe[t.arrowTypeStart]){const s=xe[t.arrowTypeStart],a=e[0],n=e[1],{angle:o}=dn(a,n),c=s*Math.cos(o),h=s*Math.sin(o);r[0].x=a.x+c,r[0].y=a.y+h}const i=e.length;if(i>=2&&xe[t.arrowTypeEnd]){const s=xe[t.arrowTypeEnd],a=e[i-1],n=e[i-2],{angle:o}=dn(n,a),c=s*Math.cos(o),h=s*Math.sin(o);r[i-1].x=a.x-c,r[i-1].y=a.y-h}return r}p(Mp,"applyMarkerOffsetsToPoints");var vk=p((e,t,r,i)=>{t.forEach(s=>{Kk[s](e,r,i)})},"insertMarkers"),Lk=p((e,t,r)=>{J.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionStart").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd").attr("class","marker extension "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,1 V 13 L18,7 Z"),e.append("marker").attr("id",r+"_"+t+"-extensionStart-margin").attr("class","marker extension "+t).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),e.append("defs").append("marker").attr("id",r+"_"+t+"-extensionEnd-margin").attr("class","marker extension "+t).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Fk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart").attr("class","marker composition "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd").attr("class","marker composition "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionStart-margin").attr("class","marker composition "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-compositionEnd-margin").attr("class","marker composition "+t).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Ak=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart").attr("class","marker aggregation "+t).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationStart-margin").attr("class","marker aggregation "+t).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-aggregationEnd-margin").attr("class","marker aggregation "+t).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ek=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart").attr("class","marker dependency "+t).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd").attr("class","marker dependency "+t).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyStart-margin").attr("class","marker dependency "+t).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-dependencyEnd-margin").attr("class","marker dependency "+t).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Mk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopStart-margin").attr("class","marker lollipop "+t).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),e.append("defs").append("marker").attr("id",r+"_"+t+"-lollipopEnd-margin").attr("class","marker lollipop "+t).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Ok=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-pointEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-pointStart-margin").attr("class","marker "+t).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),$k=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-circleEnd").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleEnd-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-circleStart-margin").attr("class","marker "+t).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),Dk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-crossEnd").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossStart").attr("class","marker cross "+t).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),e.append("marker").attr("id",r+"_"+t+"-crossEnd-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),e.append("marker").attr("id",r+"_"+t+"-crossStart-margin").attr("class","marker cross "+t).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),Ik=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Pk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{transitionColor:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),e.append("defs").append("marker").attr("id",r+"_"+t+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${a}`)},"barbNeo"),Rk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),qk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Nk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),Wk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),zk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneStart").attr("class","marker onlyOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-onlyOneEnd").attr("class","marker onlyOne "+t).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${a}`)},"only_one_neo"),Hk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");o.append("circle").attr("fill",n??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),o.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${a}`);const c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");c.append("circle").attr("fill",n??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${a}`).attr("r",6),c.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${a}`)},"zero_or_one_neo"),Yk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreStart").attr("class","marker oneOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${a}`),e.append("defs").append("marker").attr("id",r+"_"+t+"-oneOrMoreEnd").attr("class","marker oneOrMore "+t).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${a}`)},"one_or_more_neo"),Uk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a,mainBkg:n}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");o.append("circle").attr("fill",n??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),o.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${a}`);const c=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");c.append("circle").attr("fill",n??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${a}`),c.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${a}`)},"zero_or_more_neo"),jk=p((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
265
298
|
L20,10
|
|
266
299
|
M20,10
|
|
267
|
-
L0,20`)},"requirement_arrow"),
|
|
300
|
+
L0,20`)},"requirement_arrow"),Gk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${a}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
268
301
|
L20,10
|
|
269
302
|
M20,10
|
|
270
|
-
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),R1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),q1=f((e,t,r)=>{const i=te(),{themeVariables:s}=i,{strokeWidth:a}=s,o=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");o.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),o.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),o.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),o.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),N1={extension:C1,composition:x1,aggregation:b1,dependency:k1,lollipop:T1,point:S1,circle:w1,cross:_1,barb:B1,barbNeo:v1,only_one:L1,zero_or_one:F1,one_or_more:E1,zero_or_more:A1,only_one_neo:M1,zero_or_one_neo:O1,one_or_more_neo:$1,zero_or_more_neo:D1,requirement_arrow:P1,requirement_contains:R1,requirement_arrow_neo:I1,requirement_contains_neo:q1},fg=y1,gg=typeof global=="object"&&global&&global.Object===Object&&global,z1=typeof self=="object"&&self&&self.Object===Object&&self,kr=gg||z1||Function("return this")(),ar=kr.Symbol,mg=Object.prototype,W1=mg.hasOwnProperty,H1=mg.toString,is=ar?ar.toStringTag:void 0;function j1(e){var t=W1.call(e,is),r=e[is];try{e[is]=void 0;var i=!0}catch{}var s=H1.call(e);return i&&(t?e[is]=r:delete e[is]),s}var Y1=Object.prototype,U1=Y1.toString;function G1(e){return U1.call(e)}var X1="[object Null]",V1="[object Undefined]",Nc=ar?ar.toStringTag:void 0;function zi(e){return e==null?e===void 0?V1:X1:Nc&&Nc in Object(e)?j1(e):G1(e)}function Zr(e){return e!=null&&typeof e=="object"}var Z1="[object Symbol]";function wl(e){return typeof e=="symbol"||Zr(e)&&zi(e)==Z1}function yg(e,t){for(var r=-1,i=e==null?0:e.length,s=Array(i);++r<i;)s[r]=t(e[r],r,e);return s}var Oe=Array.isArray,zc=ar?ar.prototype:void 0,Wc=zc?zc.toString:void 0;function Cg(e){if(typeof e=="string")return e;if(Oe(e))return yg(e,Cg)+"";if(wl(e))return Wc?Wc.call(e):"";var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function _l(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}function za(e){return e}var K1="[object AsyncFunction]",Q1="[object Function]",J1="[object GeneratorFunction]",t2="[object Proxy]";function Ba(e){if(!_l(e))return!1;var t=zi(e);return t==Q1||t==J1||t==K1||t==t2}var Bo=kr["__core-js_shared__"],Hc=(function(){var e=/[^.]+$/.exec(Bo&&Bo.keys&&Bo.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function e2(e){return!!Hc&&Hc in e}var r2=Function.prototype,i2=r2.toString;function ei(e){if(e!=null){try{return i2.call(e)}catch{}try{return e+""}catch{}}return""}var s2=/[\\^$.*+?()[\]{}|]/g,a2=/^\[object .+?Constructor\]$/,o2=Function.prototype,n2=Object.prototype,l2=o2.toString,h2=n2.hasOwnProperty,c2=RegExp("^"+l2.call(h2).replace(s2,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function u2(e){if(!_l(e)||e2(e))return!1;var t=Ba(e)?c2:a2;return t.test(ei(e))}function d2(e,t){return e==null?void 0:e[t]}function ri(e,t){var r=d2(e,t);return u2(r)?r:void 0}var vn=ri(kr,"WeakMap");function p2(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}function f2(){}var g2=800,m2=16,y2=Date.now;function C2(e){var t=0,r=0;return function(){var i=y2(),s=m2-(i-r);if(r=i,s>0){if(++t>=g2)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}function cs(e){return function(){return e}}var jc=(function(){try{var e=ri(Object,"defineProperty");return e({},"",{}),e}catch{}})(),x2=jc?function(e,t){return jc(e,"toString",{configurable:!0,enumerable:!1,value:cs(t),writable:!0})}:za,b2=C2(x2);function k2(e,t){for(var r=-1,i=e==null?0:e.length;++r<i&&t(e[r],r,e)!==!1;);return e}function T2(e,t,r,i){for(var s=e.length,a=r+-1;++a<s;)if(t(e[a],a,e))return a;return-1}function S2(e){return e!==e}function w2(e,t,r){for(var i=r-1,s=e.length;++i<s;)if(e[i]===t)return i;return-1}function _2(e,t,r){return t===t?w2(e,t,r):T2(e,S2,r)}function B2(e,t){var r=e==null?0:e.length;return!!r&&_2(e,t,0)>-1}var v2=9007199254740991,L2=/^(?:0|[1-9]\d*)$/;function xg(e,t){var r=typeof e;return t=t??v2,!!t&&(r=="number"||r!="symbol"&&L2.test(e))&&e>-1&&e%1==0&&e<t}function bg(e,t){return e===t||e!==e&&t!==t}var Yc=Math.max;function F2(e,t,r){return t=Yc(t===void 0?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=Yc(i.length-t,0),o=Array(a);++s<a;)o[s]=i[t+s];s=-1;for(var n=Array(t+1);++s<t;)n[s]=i[s];return n[t]=r(o),p2(e,this,n)}}function E2(e,t){return b2(F2(e,t,za),e+"")}var A2=9007199254740991;function Bl(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=A2}function Wa(e){return e!=null&&Bl(e.length)&&!Ba(e)}var M2=Object.prototype;function kg(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||M2;return e===r}function O2(e,t){for(var r=-1,i=Array(e);++r<e;)i[r]=t(r);return i}var $2="[object Arguments]";function Uc(e){return Zr(e)&&zi(e)==$2}var Tg=Object.prototype,D2=Tg.hasOwnProperty,P2=Tg.propertyIsEnumerable,Ha=Uc((function(){return arguments})())?Uc:function(e){return Zr(e)&&D2.call(e,"callee")&&!P2.call(e,"callee")};function I2(){return!1}var Sg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Gc=Sg&&typeof module=="object"&&module&&!module.nodeType&&module,R2=Gc&&Gc.exports===Sg,Xc=R2?kr.Buffer:void 0,q2=Xc?Xc.isBuffer:void 0,va=q2||I2,N2="[object Arguments]",z2="[object Array]",W2="[object Boolean]",H2="[object Date]",j2="[object Error]",Y2="[object Function]",U2="[object Map]",G2="[object Number]",X2="[object Object]",V2="[object RegExp]",Z2="[object Set]",K2="[object String]",Q2="[object WeakMap]",J2="[object ArrayBuffer]",tT="[object DataView]",eT="[object Float32Array]",rT="[object Float64Array]",iT="[object Int8Array]",sT="[object Int16Array]",aT="[object Int32Array]",oT="[object Uint8Array]",nT="[object Uint8ClampedArray]",lT="[object Uint16Array]",hT="[object Uint32Array]",Qt={};Qt[eT]=Qt[rT]=Qt[iT]=Qt[sT]=Qt[aT]=Qt[oT]=Qt[nT]=Qt[lT]=Qt[hT]=!0;Qt[N2]=Qt[z2]=Qt[J2]=Qt[W2]=Qt[tT]=Qt[H2]=Qt[j2]=Qt[Y2]=Qt[U2]=Qt[G2]=Qt[X2]=Qt[V2]=Qt[Z2]=Qt[K2]=Qt[Q2]=!1;function cT(e){return Zr(e)&&Bl(e.length)&&!!Qt[zi(e)]}function uT(e){return function(t){return e(t)}}var wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ys=wg&&typeof module=="object"&&module&&!module.nodeType&&module,dT=ys&&ys.exports===wg,vo=dT&&gg.process,Vc=(function(){try{var e=ys&&ys.require&&ys.require("util").types;return e||vo&&vo.binding&&vo.binding("util")}catch{}})(),Zc=Vc&&Vc.isTypedArray,vl=Zc?uT(Zc):cT,pT=Object.prototype,fT=pT.hasOwnProperty;function gT(e,t){var r=Oe(e),i=!r&&Ha(e),s=!r&&!i&&va(e),a=!r&&!i&&!s&&vl(e),o=r||i||s||a,n=o?O2(e.length,String):[],l=n.length;for(var c in e)(t||fT.call(e,c))&&!(o&&(c=="length"||s&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||xg(c,l)))&&n.push(c);return n}function mT(e,t){return function(r){return e(t(r))}}var yT=mT(Object.keys,Object),CT=Object.prototype,xT=CT.hasOwnProperty;function _g(e){if(!kg(e))return yT(e);var t=[];for(var r in Object(e))xT.call(e,r)&&r!="constructor"&&t.push(r);return t}function rr(e){return Wa(e)?gT(e):_g(e)}var bT=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,kT=/^\w*$/;function Ll(e,t){if(Oe(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||wl(e)?!0:kT.test(e)||!bT.test(e)||t!=null&&e in Object(t)}var bs=ri(Object,"create");function TT(){this.__data__=bs?bs(null):{},this.size=0}function ST(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var wT="__lodash_hash_undefined__",_T=Object.prototype,BT=_T.hasOwnProperty;function vT(e){var t=this.__data__;if(bs){var r=t[e];return r===wT?void 0:r}return BT.call(t,e)?t[e]:void 0}var LT=Object.prototype,FT=LT.hasOwnProperty;function ET(e){var t=this.__data__;return bs?t[e]!==void 0:FT.call(t,e)}var AT="__lodash_hash_undefined__";function MT(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=bs&&t===void 0?AT:t,this}function Kr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Kr.prototype.clear=TT;Kr.prototype.delete=ST;Kr.prototype.get=vT;Kr.prototype.has=ET;Kr.prototype.set=MT;function OT(){this.__data__=[],this.size=0}function ja(e,t){for(var r=e.length;r--;)if(bg(e[r][0],t))return r;return-1}var $T=Array.prototype,DT=$T.splice;function PT(e){var t=this.__data__,r=ja(t,e);if(r<0)return!1;var i=t.length-1;return r==i?t.pop():DT.call(t,r,1),--this.size,!0}function IT(e){var t=this.__data__,r=ja(t,e);return r<0?void 0:t[r][1]}function RT(e){return ja(this.__data__,e)>-1}function qT(e,t){var r=this.__data__,i=ja(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}function Tr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Tr.prototype.clear=OT;Tr.prototype.delete=PT;Tr.prototype.get=IT;Tr.prototype.has=RT;Tr.prototype.set=qT;var ks=ri(kr,"Map");function NT(){this.size=0,this.__data__={hash:new Kr,map:new(ks||Tr),string:new Kr}}function zT(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}function Ya(e,t){var r=e.__data__;return zT(t)?r[typeof t=="string"?"string":"hash"]:r.map}function WT(e){var t=Ya(this,e).delete(e);return this.size-=t?1:0,t}function HT(e){return Ya(this,e).get(e)}function jT(e){return Ya(this,e).has(e)}function YT(e,t){var r=Ya(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}function Sr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var i=e[t];this.set(i[0],i[1])}}Sr.prototype.clear=NT;Sr.prototype.delete=WT;Sr.prototype.get=HT;Sr.prototype.has=jT;Sr.prototype.set=YT;var UT="Expected a function";function Fl(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(UT);var r=function(){var i=arguments,s=t?t.apply(this,i):i[0],a=r.cache;if(a.has(s))return a.get(s);var o=e.apply(this,i);return r.cache=a.set(s,o)||a,o};return r.cache=new(Fl.Cache||Sr),r}Fl.Cache=Sr;var GT=500;function XT(e){var t=Fl(e,function(i){return r.size===GT&&r.clear(),i}),r=t.cache;return t}var VT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ZT=/\\(\\)?/g,KT=XT(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(VT,function(r,i,s,a){t.push(s?a.replace(ZT,"$1"):i||r)}),t});function QT(e){return e==null?"":Cg(e)}function Bg(e,t){return Oe(e)?e:Ll(e,t)?[e]:KT(QT(e))}function Ua(e){if(typeof e=="string"||wl(e))return e;var t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function vg(e,t){t=Bg(t,e);for(var r=0,i=t.length;e!=null&&r<i;)e=e[Ua(t[r++])];return r&&r==i?e:void 0}function JT(e,t,r){var i=e==null?void 0:vg(e,t);return i===void 0?r:i}function Lg(e,t){for(var r=-1,i=t.length,s=e.length;++r<i;)e[s+r]=t[r];return e}var Kc=ar?ar.isConcatSpreadable:void 0;function tS(e){return Oe(e)||Ha(e)||!!(Kc&&e&&e[Kc])}function eS(e,t,r,i,s){var a=-1,o=e.length;for(r||(r=tS),s||(s=[]);++a<o;){var n=e[a];r(n)?Lg(s,n):i||(s[s.length]=n)}return s}function rS(e,t,r,i){var s=-1,a=e==null?0:e.length;for(i&&a&&(r=e[++s]);++s<a;)r=t(r,e[s],s,e);return r}function iS(){this.__data__=new Tr,this.size=0}function sS(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}function aS(e){return this.__data__.get(e)}function oS(e){return this.__data__.has(e)}var nS=200;function lS(e,t){var r=this.__data__;if(r instanceof Tr){var i=r.__data__;if(!ks||i.length<nS-1)return i.push([e,t]),this.size=++r.size,this;r=this.__data__=new Sr(i)}return r.set(e,t),this.size=r.size,this}function xr(e){var t=this.__data__=new Tr(e);this.size=t.size}xr.prototype.clear=iS;xr.prototype.delete=sS;xr.prototype.get=aS;xr.prototype.has=oS;xr.prototype.set=lS;function Fg(e,t){for(var r=-1,i=e==null?0:e.length,s=0,a=[];++r<i;){var o=e[r];t(o,r,e)&&(a[s++]=o)}return a}function hS(){return[]}var cS=Object.prototype,uS=cS.propertyIsEnumerable,Qc=Object.getOwnPropertySymbols,dS=Qc?function(e){return e==null?[]:(e=Object(e),Fg(Qc(e),function(t){return uS.call(e,t)}))}:hS;function pS(e,t,r){var i=t(e);return Oe(e)?i:Lg(i,r(e))}function Jc(e){return pS(e,rr,dS)}var Ln=ri(kr,"DataView"),Fn=ri(kr,"Promise"),yi=ri(kr,"Set"),tu="[object Map]",fS="[object Object]",eu="[object Promise]",ru="[object Set]",iu="[object WeakMap]",su="[object DataView]",gS=ei(Ln),mS=ei(ks),yS=ei(Fn),CS=ei(yi),xS=ei(vn),yr=zi;(Ln&&yr(new Ln(new ArrayBuffer(1)))!=su||ks&&yr(new ks)!=tu||Fn&&yr(Fn.resolve())!=eu||yi&&yr(new yi)!=ru||vn&&yr(new vn)!=iu)&&(yr=function(e){var t=zi(e),r=t==fS?e.constructor:void 0,i=r?ei(r):"";if(i)switch(i){case gS:return su;case mS:return tu;case yS:return eu;case CS:return ru;case xS:return iu}return t});var au=kr.Uint8Array,bS="__lodash_hash_undefined__";function kS(e){return this.__data__.set(e,bS),this}function TS(e){return this.__data__.has(e)}function Ts(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Sr;++t<r;)this.add(e[t])}Ts.prototype.add=Ts.prototype.push=kS;Ts.prototype.has=TS;function SS(e,t){for(var r=-1,i=e==null?0:e.length;++r<i;)if(t(e[r],r,e))return!0;return!1}function Eg(e,t){return e.has(t)}var wS=1,_S=2;function Ag(e,t,r,i,s,a){var o=r&wS,n=e.length,l=t.length;if(n!=l&&!(o&&l>n))return!1;var c=a.get(e),h=a.get(t);if(c&&h)return c==t&&h==e;var u=-1,p=!0,d=r&_S?new Ts:void 0;for(a.set(e,t),a.set(t,e);++u<n;){var m=e[u],y=t[u];if(i)var x=o?i(y,m,u,t,e,a):i(m,y,u,e,t,a);if(x!==void 0){if(x)continue;p=!1;break}if(d){if(!SS(t,function(C,k){if(!Eg(d,k)&&(m===C||s(m,C,r,i,a)))return d.push(k)})){p=!1;break}}else if(!(m===y||s(m,y,r,i,a))){p=!1;break}}return a.delete(e),a.delete(t),p}function BS(e){var t=-1,r=Array(e.size);return e.forEach(function(i,s){r[++t]=[s,i]}),r}function El(e){var t=-1,r=Array(e.size);return e.forEach(function(i){r[++t]=i}),r}var vS=1,LS=2,FS="[object Boolean]",ES="[object Date]",AS="[object Error]",MS="[object Map]",OS="[object Number]",$S="[object RegExp]",DS="[object Set]",PS="[object String]",IS="[object Symbol]",RS="[object ArrayBuffer]",qS="[object DataView]",ou=ar?ar.prototype:void 0,Lo=ou?ou.valueOf:void 0;function NS(e,t,r,i,s,a,o){switch(r){case qS:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case RS:return!(e.byteLength!=t.byteLength||!a(new au(e),new au(t)));case FS:case ES:case OS:return bg(+e,+t);case AS:return e.name==t.name&&e.message==t.message;case $S:case PS:return e==t+"";case MS:var n=BS;case DS:var l=i&vS;if(n||(n=El),e.size!=t.size&&!l)return!1;var c=o.get(e);if(c)return c==t;i|=LS,o.set(e,t);var h=Ag(n(e),n(t),i,s,a,o);return o.delete(e),h;case IS:if(Lo)return Lo.call(e)==Lo.call(t)}return!1}var zS=1,WS=Object.prototype,HS=WS.hasOwnProperty;function jS(e,t,r,i,s,a){var o=r&zS,n=Jc(e),l=n.length,c=Jc(t),h=c.length;if(l!=h&&!o)return!1;for(var u=l;u--;){var p=n[u];if(!(o?p in t:HS.call(t,p)))return!1}var d=a.get(e),m=a.get(t);if(d&&m)return d==t&&m==e;var y=!0;a.set(e,t),a.set(t,e);for(var x=o;++u<l;){p=n[u];var C=e[p],k=t[p];if(i)var S=o?i(k,C,p,t,e,a):i(C,k,p,e,t,a);if(!(S===void 0?C===k||s(C,k,r,i,a):S)){y=!1;break}x||(x=p=="constructor")}if(y&&!x){var w=e.constructor,B=t.constructor;w!=B&&"constructor"in e&&"constructor"in t&&!(typeof w=="function"&&w instanceof w&&typeof B=="function"&&B instanceof B)&&(y=!1)}return a.delete(e),a.delete(t),y}var YS=1,nu="[object Arguments]",lu="[object Array]",Xs="[object Object]",US=Object.prototype,hu=US.hasOwnProperty;function GS(e,t,r,i,s,a){var o=Oe(e),n=Oe(t),l=o?lu:yr(e),c=n?lu:yr(t);l=l==nu?Xs:l,c=c==nu?Xs:c;var h=l==Xs,u=c==Xs,p=l==c;if(p&&va(e)){if(!va(t))return!1;o=!0,h=!1}if(p&&!h)return a||(a=new xr),o||vl(e)?Ag(e,t,r,i,s,a):NS(e,t,l,r,i,s,a);if(!(r&YS)){var d=h&&hu.call(e,"__wrapped__"),m=u&&hu.call(t,"__wrapped__");if(d||m){var y=d?e.value():e,x=m?t.value():t;return a||(a=new xr),s(y,x,r,i,a)}}return p?(a||(a=new xr),jS(e,t,r,i,s,a)):!1}function Al(e,t,r,i,s){return e===t?!0:e==null||t==null||!Zr(e)&&!Zr(t)?e!==e&&t!==t:GS(e,t,r,i,Al,s)}var XS=1,VS=2;function ZS(e,t,r,i){var s=r.length,a=s;if(e==null)return!a;for(e=Object(e);s--;){var o=r[s];if(o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++s<a;){o=r[s];var n=o[0],l=e[n],c=o[1];if(o[2]){if(l===void 0&&!(n in e))return!1}else{var h=new xr,u;if(!(u===void 0?Al(c,l,XS|VS,i,h):u))return!1}}return!0}function Mg(e){return e===e&&!_l(e)}function KS(e){for(var t=rr(e),r=t.length;r--;){var i=t[r],s=e[i];t[r]=[i,s,Mg(s)]}return t}function Og(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}function QS(e){var t=KS(e);return t.length==1&&t[0][2]?Og(t[0][0],t[0][1]):function(r){return r===e||ZS(r,e,t)}}function JS(e,t){return e!=null&&t in Object(e)}function tw(e,t,r){t=Bg(t,e);for(var i=-1,s=t.length,a=!1;++i<s;){var o=Ua(t[i]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++i!=s?a:(s=e==null?0:e.length,!!s&&Bl(s)&&xg(o,s)&&(Oe(e)||Ha(e)))}function ew(e,t){return e!=null&&tw(e,t,JS)}var rw=1,iw=2;function sw(e,t){return Ll(e)&&Mg(t)?Og(Ua(e),t):function(r){var i=JT(r,e);return i===void 0&&i===t?ew(r,e):Al(t,i,rw|iw)}}function aw(e){return function(t){return t==null?void 0:t[e]}}function ow(e){return function(t){return vg(t,e)}}function nw(e){return Ll(e)?aw(Ua(e)):ow(e)}function $g(e){return typeof e=="function"?e:e==null?za:typeof e=="object"?Oe(e)?sw(e[0],e[1]):QS(e):nw(e)}function lw(e){return function(t,r,i){for(var s=-1,a=Object(t),o=i(t),n=o.length;n--;){var l=o[++s];if(r(a[l],l,a)===!1)break}return t}}var hw=lw();function cw(e,t){return e&&hw(e,t,rr)}function uw(e,t){return function(r,i){if(r==null)return r;if(!Wa(r))return e(r,i);for(var s=r.length,a=-1,o=Object(r);++a<s&&i(o[a],a,o)!==!1;);return r}}var Ml=uw(cw);function dw(e){return Zr(e)&&Wa(e)}function pw(e){return typeof e=="function"?e:za}function qr(e,t){var r=Oe(e)?k2:Ml;return r(e,pw(t))}function fw(e,t){var r=[];return Ml(e,function(i,s,a){t(i,s,a)&&r.push(i)}),r}function Vs(e,t){var r=Oe(e)?Fg:fw;return r(e,$g(t))}function gw(e,t){return yg(t,function(r){return e[r]})}function Fo(e){return e==null?[]:gw(e,rr(e))}var mw="[object Map]",yw="[object Set]",Cw=Object.prototype,xw=Cw.hasOwnProperty;function cu(e){if(e==null)return!0;if(Wa(e)&&(Oe(e)||typeof e=="string"||typeof e.splice=="function"||va(e)||vl(e)||Ha(e)))return!e.length;var t=yr(e);if(t==mw||t==yw)return!e.size;if(kg(e))return!_g(e).length;for(var r in e)if(xw.call(e,r))return!1;return!0}function pi(e){return e===void 0}function bw(e,t,r,i,s){return s(e,function(a,o,n){r=i?(i=!1,a):t(r,a,o,n)}),r}function kw(e,t,r){var i=Oe(e)?rS:bw,s=arguments.length<3;return i(e,$g(t),r,s,Ml)}var Tw=1/0,Sw=yi&&1/El(new yi([,-0]))[1]==Tw?function(e){return new yi(e)}:f2,ww=200;function _w(e,t,r){var i=-1,s=B2,a=e.length,o=!0,n=[],l=n;if(a>=ww){var c=Sw(e);if(c)return El(c);o=!1,s=Eg,l=new Ts}else l=n;t:for(;++i<a;){var h=e[i],u=h;if(h=h!==0?h:0,o&&u===u){for(var p=l.length;p--;)if(l[p]===u)continue t;n.push(h)}else s(l,u,r)||(l!==n&&l.push(u),n.push(h))}return n}var Bw=E2(function(e){return _w(eS(e,1,dw,!0))}),vw="\0",Nr="\0",uu="";class Ga{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=cs(void 0),this._defaultEdgeLabelFn=cs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Nr]={}),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(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Ba(t)||(t=cs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return rr(this._nodes)}sources(){var t=this;return Vs(this.nodes(),function(r){return cu(t._in[r])})}sinks(){var t=this;return Vs(this.nodes(),function(r){return cu(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return qr(t,function(a){i.length>1?s.setNode(a,r):s.setNode(a)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Nr,this._children[t]={},this._children[Nr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],qr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),qr(rr(this._in[t]),r),delete this._in[t],delete this._preds[t],qr(rr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(pi(r))r=Nr;else{r+="";for(var i=r;!pi(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Nr)return r}}children(t){if(pi(t)&&(t=Nr),this._isCompound){var r=this._children[t];if(r)return rr(r)}else{if(t===Nr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return rr(r)}successors(t){var r=this._sucs[t];if(r)return rr(r)}neighbors(t){var r=this.predecessors(t);if(r)return Bw(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;qr(this._nodes,function(o,n){t(n)&&r.setNode(n,o)}),qr(this._edgeObjs,function(o){r.hasNode(o.v)&&r.hasNode(o.w)&&r.setEdge(o,i.edge(o))});var s={};function a(o){var n=i.parent(o);return n===void 0||r.hasNode(n)?(s[o]=n,n):n in s?s[n]:a(n)}return this._isCompound&&qr(r.nodes(),function(o){r.setParent(o,a(o))}),r}setDefaultEdgeLabel(t){return Ba(t)||(t=cs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Fo(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return kw(t,function(a,o){return s.length>1?i.setEdge(a,o,r):i.setEdge(a,o),o}),this}setEdge(){var t,r,i,s,a=!1,o=arguments[0];typeof o=="object"&&o!==null&&"v"in o?(t=o.v,r=o.w,i=o.name,arguments.length===2&&(s=arguments[1],a=!0)):(t=o,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],a=!0)),t=""+t,r=""+r,pi(i)||(i=""+i);var n=us(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return a&&(this._edgeLabels[n]=s),this;if(!pi(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=a?s:this._defaultEdgeLabelFn(t,r,i);var l=Lw(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,du(this._preds[r],t),du(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Eo(this._isDirected,arguments[0]):us(this._isDirected,t,r,i),a=this._edgeObjs[s];return a&&(t=a.v,r=a.w,delete this._edgeLabels[s],delete this._edgeObjs[s],pu(this._preds[r],t),pu(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=Fo(i);return r?Vs(s,function(a){return a.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=Fo(i);return r?Vs(s,function(a){return a.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}Ga.prototype._nodeCount=0;Ga.prototype._edgeCount=0;function du(e,t){e[t]?e[t]++:e[t]=1}function pu(e,t){--e[t]||delete e[t]}function us(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}return s+uu+a+uu+(pi(i)?vw:i)}function Lw(e,t,r,i){var s=""+t,a=""+r;if(!e&&s>a){var o=s;s=a,a=o}var n={v:s,w:a};return i&&(n.name=i),n}function Eo(e,t){return us(e,t.v,t.w,t.name)}function Dg(e,{edgePathsClass:t="edges edgePaths"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),a=r.insert("g").attr("class","edgeLabels"),o=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:a,nodes:o,rootGroups:r}}f(Dg,"createLayoutElementGroups");async function Pg(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await St(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}f(Pg,"measureGroupLabel");async function Ig(e,t,r){var a;const i=await Tl(e,t,r),s=((a=i.node())==null?void 0:a.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}f(Ig,"insertMeasuredNode");async function Rg(e,t){const r=new Ga({multigraph:!0,compound:!0}),i=[...t.edges],s=zt(),a=Dg(e),{edgeLabels:o,nodes:n}=a,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await Pg(n,h),r.setNode(h.id,{...h});else{if(c){const u=await Ig(n,h,{config:s,dir:h.dir});l.set(h.id,u)}r.setNode(h.id,{...h})}}));for(const h of i)c&&hg(h)&&await Sl(o,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(p=>p.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await It(async()=>{const{captureNodeSizes:u}=await import("./explorer-sizeCapture-INFHLROL.js");return{captureNodeSizes:u}},__vite__mapDeps([0,1,2]),import.meta.url);h(e,t)}return{graph:r,groups:a,nodeElements:l}}f(Rg,"createGraphWithElements");var Ht=new Map,jr=new Map,qg=new Map,Fw=f(()=>{jr.clear(),qg.clear(),Ht.clear()},"clear"),Ss=f((e,t)=>{const r=jr.get(t)||[];return W.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),Ew=f((e,t)=>{const r=jr.get(t)||[];return W.info("Descendants of ",t," is ",r),W.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||Ss(e.v,t)||Ss(e.w,t)||r.includes(e.w):(W.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),Ng=f((e,t,r,i)=>{W.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),W.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(a=>{if(t.children(a).length>0)Ng(a,t,r,i);else{const o=t.node(a);W.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),i!==t.parent(a)&&(W.debug("Setting parent",a,t.parent(a)),r.setParent(a,t.parent(a))),e!==i&&a!==e?(W.debug("Setting parent",a,e),r.setParent(a,e)):(W.info("In copy ",e,"root",i,"data",t.node(e),i),W.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));const n=t.edges(a);W.debug("Copying Edges",n),n.forEach(l=>{W.info("Edge",l);const c=t.edge(l.v,l.w,l.name);W.info("Edge data",c,i);try{Ew(l,i)?(W.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),W.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):W.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){W.error(h)}})}W.debug("Removing node",a),t.removeNode(a)})},"copy"),zg=f((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)qg.set(s,e),i=[...i,...zg(s,t)];return i},"extractDescendants"),Aw=f((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),a=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),o=s.map(l=>({v:l.v,w:l.w}));return a.filter(l=>o.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),La=f((e,t,r)=>{const i=t.children(e);if(W.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const a of i){const o=La(a,t,r),n=Aw(t,r,o);if(o)if(n.length>0)s=o;else return o}return s},"findNonClusterChild"),fu=f(e=>!Ht.has(e)||!Ht.get(e).externalConnections?e:Ht.has(e)?Ht.get(e).id:e,"getAnchorId"),RL=f((e,t)=>{var r;if(!e||t>10){W.debug("Opting out, no graph ");return}else W.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(W.debug("Cluster identified",i," Replacement id in edges: ",La(i,e,i)),jr.set(i,zg(i,e)),Ht.set(i,{id:La(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),a=e.edges();s.length>0?(W.debug("Cluster identified",i,jr),a.forEach(o=>{const n=Ss(o.v,i),l=Ss(o.w,i);n^l&&(W.debug("Edge: ",o," leaves cluster ",i),W.debug("Descendants of XXX ",i,": ",jr.get(i)),Ht.get(i).externalConnections=!0)})):W.debug("Not a cluster ",i,jr)});for(let i of Ht.keys()){const s=Ht.get(i).id,a=e.parent(s);a!==i&&Ht.has(a)&&!Ht.get(a).externalConnections&&(Ht.get(i).id=a);const o=e.edges().some(n=>n.v===i);if(s&&((r=Ht.get(i))!=null&&r.externalConnections)&&o&&jg(e,s,i)){const n=Mw(e,i,e.parent(s));n&&(Ht.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);W.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),W.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let a=i.v,o=i.w;if(W.debug("Fix XXX",Ht,"ids:",i.v,i.w,"Translating: ",Ht.get(i.v)," --- ",Ht.get(i.w)),Ht.get(i.v)||Ht.get(i.w)){if(W.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),a=fu(i.v),o=fu(i.w),e.removeEdge(i.v,i.w,i.name),a!==i.v){const n=e.parent(a);Ht.get(n).externalConnections=!0,s.fromCluster=i.v}if(o!==i.w){const n=e.parent(o);Ht.get(n).externalConnections=!0,s.toCluster=i.w}W.debug("Fix Replacing with XXX",a,o,i.name),e.setEdge(a,o,s,i.name)}}),Wg(e,0),W.trace(Ht)},"adjustClustersAndEdges"),Wg=f((e,t)=>{var s,a;if(t>10){W.error("Bailing out");return}let r=e.nodes(),i=!1;for(const o of r){const n=e.children(o);i=i||n.length>0}if(!i){W.debug("Done, no node has children",e.nodes());return}W.debug("Nodes = ",r,t);for(const o of r)if(W.debug("Extracting node",o,Ht,Ht.has(o)&&!Ht.get(o).externalConnections,!e.parent(o),e.node(o),e.children("D")," Depth ",t),!Ht.has(o))W.debug("Not a cluster",o,t);else if(!Ht.get(o).externalConnections&&e.children(o)&&e.children(o).length>0){W.debug("Cluster without external connections, without a parent and with children",o,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(a=(s=Ht.get(o))==null?void 0:s.clusterData)!=null&&a.dir&&(l=Ht.get(o).clusterData.dir,W.debug("Fixing dir",Ht.get(o).clusterData.dir,l));const c=new Ga({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Ng(o,e,c,o),e.setNode(o,{clusterNode:!0,id:o,clusterData:Ht.get(o).clusterData,label:Ht.get(o).label,graph:c})}else W.debug("Cluster ** ",o," **not meeting the criteria !externalConnections:",!Ht.get(o).externalConnections," no parent: ",!e.parent(o)," children ",e.children(o)&&e.children(o).length>0,e.children("D"),t),W.debug(Ht);r=e.nodes(),W.debug("New list of nodes",r);for(const o of r){const n=e.node(o);W.debug(" Now next level",o,n),n!=null&&n.clusterNode&&Wg(n.graph,t+1)}},"extractor"),Hg=f((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),a=Hg(e,s);r=[...r,...a]}),r},"sorter"),qL=f(e=>Hg(e,e.children()),"sortNodesByHierarchy"),jg=f((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ht.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),Mw=f((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||Ss(s,r))continue;const a=La(s,e,t);if(a&&!jg(e,a,t))return a}return null},"findSafeAnchorNode");function Yg({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:a}){const o=t??$l;return f(async function(l,c,h,u){const p=c.select("g");((h==null?void 0:h.insertMarkers)??fg)(p,l.markers,l.type,l.diagramId),Ol();const d={element:p,helpers:h,options:u};d.preparedLayout=await(e==null?void 0:e(l,d));const m=await o(l,d),y=await r(l,d),x={...d,measure:m};i?await i(l,x,y):await Dl(l,x,a),await(s==null?void 0:s(l,x,y))},"render")}f(Yg,"createCommonLayoutRenderer");function Ol(){Zk(),c1(),s1(),Fw()}f(Ol,"clearLayoutRenderState");async function $l(e,{element:t}){return await Rg(t,e)}f($l,"defaultMeasureLayout");async function Dl(e,t,r={}){var o,n;const{measure:i}=t,{groups:s}=i;for(const l of((o=r.getNodes)==null?void 0:o.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await Ug(s,l,t,r);const a=Xg(e.nodes);for(const l of e.edges)Vg(l,r)||await Zg(s,l,a,e,r,t)}f(Dl,"paintLayoutData");async function Ug(e,t,r,i){t.clusterNode?Dc(t):Gg(t,r,i)?await lg(e.clusters,t):Dc(t)}f(Ug,"paintLayoutNode");function Gg(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}f(Gg,"shouldPaintAsCluster");function Xg(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}f(Xg,"buildNodeLookup");function Vg(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}f(Vg,"shouldSkipPaintEdge");async function Zg(e,t,r,i,s,a){const o=ug(e.edgePaths,{...t},s.clusterDb??new Map,i.type,En(t.start,t,r,a,s),En(t.end,t,r,a,s),i.diagramId,Kg(t,s));hg(t)&&(Pi.has(t.id)||await Sl(e.edgeLabels,t),Qg(t,o))}f(Zg,"paintLayoutEdge");function En(e,t,r,i,s){var a;return((a=s.getEdgeNode)==null?void 0:a.call(s,e,t,i))??(e?r.get(e)??{}:{})}f(En,"getRenderedNode");function Kg(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}f(Kg,"shouldSkipIntersect");function Qg(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=te(),{subGraphTitleTotalMargin:s}=qa({flowchart:i.flowchart??{}});if(e.label){const a=Pi.get(e.id);let o=e.x,n=e.y;if(r){const l=xe.calcLabelPosition(r);W.debug("Moving label "+e.label+" from (",o,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(o=l.x,n=l.y)}a.attr("transform",`translate(${o}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const a=se.get(e.id).startLeft;let o=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.startLabelRight){const a=se.get(e.id).startRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelLeft){const a=se.get(e.id).endLeft;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}if(e.endLabelRight){const a=se.get(e.id).endRight;let o=e.x,n=e.y;if(r){const l=xe.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);o=l.x,n=l.y}a.attr("transform",`translate(${o}, ${n})`)}}f(Qg,"positionRenderedEdgeLabel");function Jg(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}f(Jg,"getDefaultExportFromCjs");var ge={},Zs={},vr={},gu;function Wi(){if(gu)return vr;gu=1;function e(o){return typeof o>"u"||o===null}f(e,"isNothing");function t(o){return typeof o=="object"&&o!==null}f(t,"isObject");function r(o){return Array.isArray(o)?o:e(o)?[]:[o]}f(r,"toArray");function i(o,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const u=l[c];o[u]=n[u]}}return o}f(i,"extend");function s(o,n){let l="";for(let c=0;c<n;c+=1)l+=o;return l}f(s,"repeat");function a(o){return o===0&&Number.NEGATIVE_INFINITY===1/o}return f(a,"isNegativeZero"),vr.isNothing=e,vr.isObject=t,vr.toArray=r,vr.repeat=s,vr.isNegativeZero=a,vr.extend=i,vr}f(Wi,"requireCommon");var Ao,mu;function Hi(){if(mu)return Ao;mu=1;function e(r,i){let s="";const a=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
`}return u.replace(/\n$/,"")}return f(i,"makeSnippet"),Mo=i,Mo}f(tm,"requireSnippet");var Oo,Cu;function ke(){if(Cu)return Oo;Cu=1;const e=Hi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(a){const o={};return a!==null&&Object.keys(a).forEach(function(n){a[n].forEach(function(l){o[String(l)]=n})}),o}f(i,"compileStyleAliases");function s(a,o){if(o=o||{},Object.keys(o).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+a+'" YAML type.')}),this.options=o,this.tag=a,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(n){return n},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=i(o.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+a+'" YAML type.')}return f(s,"Type2"),Oo=s,Oo}f(ke,"requireType");var $o,xu;function Pl(){if(xu)return $o;xu=1;const e=Hi(),t=ke();function r(a,o){const n=[];return a[o].forEach(function(l){let c=n.length;n.forEach(function(h,u){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=u)}),n[c]=l}),n}f(r,"compileList");function i(){const a={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function o(n){n.multi?(a.multi[n.kind].push(n),a.multi.fallback.push(n)):a[n.kind][n.tag]=a.fallback[n.tag]=n}f(o,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(o);return a}f(i,"compileMap");function s(a){return this.extend(a)}return f(s,"Schema2"),s.prototype.extend=f(function(o){let n=[],l=[];if(o instanceof t)l.push(o);else if(Array.isArray(o))l=l.concat(o);else if(o&&(Array.isArray(o.implicit)||Array.isArray(o.explicit)))o.implicit&&(n=n.concat(o.implicit)),o.explicit&&(l=l.concat(o.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),$o=s,$o}f(Pl,"requireSchema");var Do,bu;function Il(){if(bu)return Do;bu=1;const e=ke();return Do=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(t){return t!==null?t:""},"construct")}),Do}f(Il,"requireStr");var Po,ku;function Rl(){if(ku)return Po;ku=1;const e=ke();return Po=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(t){return t!==null?t:[]},"construct")}),Po}f(Rl,"requireSeq");var Io,Tu;function ql(){if(Tu)return Io;Tu=1;const e=ke();return Io=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(t){return t!==null?t:{}},"construct")}),Io}f(ql,"requireMap");var Ro,Su;function Nl(){if(Su)return Ro;Su=1;const e=Pl();return Ro=new e({explicit:[Il(),Rl(),ql()]}),Ro}f(Nl,"requireFailsafe");var qo,wu;function zl(){if(wu)return qo;wu=1;const e=ke();function t(s){if(s===null)return!0;const a=s.length;return a===1&&s==="~"||a===4&&(s==="null"||s==="Null"||s==="NULL")}f(t,"resolveYamlNull");function r(){return null}f(r,"constructYamlNull");function i(s){return s===null}return f(i,"isNull"),qo=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"}),qo}f(zl,"require_null");var No,_u;function Wl(){if(_u)return No;_u=1;const e=ke();function t(s){if(s===null)return!1;const a=s.length;return a===4&&(s==="true"||s==="True"||s==="TRUE")||a===5&&(s==="false"||s==="False"||s==="FALSE")}f(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}f(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return f(i,"isBoolean"),No=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:f(function(s){return s?"true":"false"},"lowercase"),uppercase:f(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),No}f(Wl,"requireBool");var zo,Bu;function Hl(){if(Bu)return zo;Bu=1;const e=Wi(),t=ke();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}f(r,"isHexCode");function i(c){return c>=48&&c<=55}f(i,"isOctCode");function s(c){return c>=48&&c<=57}f(s,"isDecCode");function a(c){if(c===null)return!1;const h=c.length;let u=0,p=!1;if(!h)return!1;let d=c[u];if((d==="-"||d==="+")&&(d=c[++u]),d==="0"){if(u+1===h)return!0;if(d=c[++u],d==="b"){for(u++;u<h;u++){if(d=c[u],d!=="0"&&d!=="1")return!1;p=!0}return p&&isFinite(o(c))}if(d==="x"){for(u++;u<h;u++){if(!r(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(o(c))}if(d==="o"){for(u++;u<h;u++){if(!i(c.charCodeAt(u)))return!1;p=!0}return p&&isFinite(o(c))}}for(;u<h;u++){if(!s(c.charCodeAt(u)))return!1;p=!0}return p?isFinite(o(c)):!1}f(a,"resolveYamlInteger");function o(c){let h=c,u=1,p=h[0];if((p==="-"||p==="+")&&(p==="-"&&(u=-1),h=h.slice(1),p=h[0]),h==="0")return 0;if(p==="0"){if(h[1]==="b")return u*parseInt(h.slice(2),2);if(h[1]==="x")return u*parseInt(h.slice(2),16);if(h[1]==="o")return u*parseInt(h.slice(2),8)}return u*parseInt(h,10)}f(o,"parseYamlInteger");function n(c){return o(c)}f(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return f(l,"isInteger"),zo=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:n,predicate:l,represent:{binary:f(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:f(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:f(function(c){return c.toString(10)},"decimal"),hexadecimal:f(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),zo}f(Hl,"requireInt");var Wo,vu;function jl(){if(vu)return Wo;vu=1;const e=Wi(),t=ke(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}f(s,"resolveYamlFloat");function a(c){let h=c.toLowerCase();const u=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?u===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:u*parseFloat(h,10)}f(a,"constructYamlFloat");const o=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const u=c.toString(10);return o.test(u)?u.replace("e",".e"):u}f(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return f(l,"isFloat"),Wo=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:a,predicate:l,represent:n,defaultStyle:"lowercase"}),Wo}f(jl,"requireFloat");var Ho,Lu;function Yl(){return Lu||(Lu=1,Ho=Nl().extend({implicit:[zl(),Wl(),Hl(),jl()]})),Ho}f(Yl,"requireJson");var jo,Fu;function Ul(){return Fu||(Fu=1,jo=Yl()),jo}f(Ul,"requireCore");var Yo,Eu;function Gl(){if(Eu)return Yo;Eu=1;const e=ke(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function i(o){return o===null?!1:t.exec(o)!==null||r.exec(o)!==null}f(i,"resolveYamlTimestamp");function s(o){let n=0,l=null,c=t.exec(o);if(c===null&&(c=r.exec(o)),c===null)throw new Error("Date resolve error");const h=+c[1],u=+c[2]-1,p=+c[3];if(!c[4])return new Date(Date.UTC(h,u,p));const d=+c[4],m=+c[5],y=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const C=+c[10],k=+(c[11]||0);l=(C*60+k)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,u,p,d,m,y,n));return l&&x.setTime(x.getTime()-l),x}f(s,"constructYamlTimestamp");function a(o){return o.toISOString()}return f(a,"representYamlTimestamp"),Yo=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:a}),Yo}f(Gl,"requireTimestamp");var Uo,Au;function Xl(){if(Au)return Uo;Au=1;const e=ke();function t(r){return r==="<<"||r===null}return f(t,"resolveYamlMerge"),Uo=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),Uo}f(Xl,"requireMerge");var Go,Mu;function Vl(){if(Mu)return Go;Mu=1;const e=ke(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
277
|
-
\r`;function r(o){if(o===null)return!1;let n=0;const l=o.length,c=t;for(let h=0;h<l;h++){const u=c.indexOf(o.charAt(h));if(!(u>64)){if(u<0)return!1;n+=6}}return n%8===0}f(r,"resolveYamlBinary");function i(o){const n=o.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const u=[];for(let d=0;d<l;d++)d%4===0&&d&&(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)),h=h<<6|c.indexOf(n.charAt(d));const p=l%4*6;return p===0?(u.push(h>>16&255),u.push(h>>8&255),u.push(h&255)):p===18?(u.push(h>>10&255),u.push(h>>2&255)):p===12&&u.push(h>>4&255),new Uint8Array(u)}f(i,"constructYamlBinary");function s(o){let n="",l=0;const c=o.length,h=t;for(let p=0;p<c;p++)p%3===0&&p&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+o[p];const u=c%3;return u===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):u===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):u===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}f(s,"representYamlBinary");function a(o){return Object.prototype.toString.call(o)==="[object Uint8Array]"}return f(a,"isBinary"),Go=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:a,represent:s}),Go}f(Vl,"requireBinary");var Xo,Ou;function Zl(){if(Ou)return Xo;Ou=1;const e=ke(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(a){if(a===null)return!0;const o=[],n=a;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let u=!1;if(r.call(h)!=="[object Object]")return!1;let p;for(p in h)if(t.call(h,p))if(!u)u=!0;else return!1;if(!u)return!1;if(o.indexOf(p)===-1)o.push(p);else return!1}return!0}f(i,"resolveYamlOmap");function s(a){return a!==null?a:[]}return f(s,"constructYamlOmap"),Xo=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),Xo}f(Zl,"requireOmap");var Vo,$u;function Kl(){if($u)return Vo;$u=1;const e=ke(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;o[n]=[h[0],c[h[0]]]}return!0}f(r,"resolveYamlPairs");function i(s){if(s===null)return[];const a=s,o=new Array(a.length);for(let n=0,l=a.length;n<l;n+=1){const c=a[n],h=Object.keys(c);o[n]=[h[0],c[h[0]]]}return o}return f(i,"constructYamlPairs"),Vo=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),Vo}f(Kl,"requirePairs");var Zo,Du;function Ql(){if(Du)return Zo;Du=1;const e=ke(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const a=s;for(const o in a)if(t.call(a,o)&&a[o]!==null)return!1;return!0}f(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return f(i,"constructYamlSet"),Zo=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),Zo}f(Ql,"requireSet");var Ko,Pu;function Xa(){return Pu||(Pu=1,Ko=Ul().extend({implicit:[Gl(),Xl()],explicit:[Vl(),Zl(),Kl(),Ql()]})),Ko}f(Xa,"require_default");var Iu;function em(){if(Iu)return Zs;Iu=1;const e=Wi(),t=Hi(),r=tm(),i=Xa(),s=Object.prototype.hasOwnProperty,a=1,o=2,n=3,l=4,c=1,h=2,u=3,p=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,d=/[\x85\u2028\u2029]/,m=/[,\[\]{}]/,y=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function C(g){return Object.prototype.toString.call(g)}f(C,"_class");function k(g){return g===10||g===13}f(k,"isEol");function S(g){return g===9||g===32}f(S,"isWhiteSpace");function w(g){return g===9||g===32||g===10||g===13}f(w,"isWsOrEol");function B(g){return g===44||g===91||g===93||g===123||g===125}f(B,"isFlowIndicator");function L(g){if(g>=48&&g<=57)return g-48;const $=g|32;return $>=97&&$<=102?$-97+10:-1}f(L,"fromHexCode");function E(g){return g===120?2:g===117?4:g===85?8:0}f(E,"escapedHexLen");function F(g){return g>=48&&g<=57?g-48:-1}f(F,"fromDecimalCode");function X(g){switch(g){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
278
|
-
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}f(X,"simpleEscapeSequence");function N(g){return g<=65535?String.fromCharCode(g):String.fromCharCode((g-65536>>10)+55296,(g-65536&1023)+56320)}f(N,"charFromCodepoint");function z(g,$,V){$==="__proto__"?Object.defineProperty(g,$,{configurable:!0,enumerable:!0,writable:!0,value:V}):g[$]=V}f(z,"setProperty");const at=new Array(256),j=new Array(256);for(let g=0;g<256;g++)at[g]=X(g)?1:0,j[g]=X(g);function A(g,$){this.input=g,this.filename=$.filename||null,this.schema=$.schema||i,this.onWarning=$.onWarning||null,this.legacy=$.legacy||!1,this.json=$.json||!1,this.listener=$.listener||null,this.maxDepth=typeof $.maxDepth=="number"?$.maxDepth:100,this.maxTotalMergeKeys=typeof $.maxTotalMergeKeys=="number"?$.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=g.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}f(A,"State");function O(g,$){const V={name:g.filename,buffer:g.input.slice(0,-1),position:g.position,line:g.line,column:g.position-g.lineStart};return V.snippet=r(V),new t($,V)}f(O,"generateError");function v(g,$){throw O(g,$)}f(v,"throwError");function R(g,$){g.onWarning&&g.onWarning.call(null,O(g,$))}f(R,"throwWarning");function P(g,$,V){const Q=g.anchorMapTransactions;if(Q.length!==0){const G=Q[Q.length-1];s.call(G,$)||(G[$]={existed:s.call(g.anchorMap,$),value:g.anchorMap[$]})}g.anchorMap[$]=V}f(P,"storeAnchor");function H(g){g.anchorMapTransactions.push(Object.create(null))}f(H,"beginAnchorTransaction");function Z(g){const $=g.anchorMapTransactions.pop(),V=g.anchorMapTransactions;if(V.length===0)return;const Q=V[V.length-1],G=Object.keys($);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];s.call(Q,q)||(Q[q]=$[q])}}f(Z,"commitAnchorTransaction");function ut(g){const $=g.anchorMapTransactions.pop(),V=Object.keys($);for(let Q=V.length-1;Q>=0;Q-=1){const G=$[V[Q]];G.existed?g.anchorMap[V[Q]]=G.value:delete g.anchorMap[V[Q]]}}f(ut,"rollbackAnchorTransaction");function pt(g){return{position:g.position,line:g.line,lineStart:g.lineStart,lineIndent:g.lineIndent,firstTabInLine:g.firstTabInLine,tag:g.tag,anchor:g.anchor,kind:g.kind,result:g.result}}f(pt,"snapshotState");function bt(g,$){g.position=$.position,g.line=$.line,g.lineStart=$.lineStart,g.lineIndent=$.lineIndent,g.firstTabInLine=$.firstTabInLine,g.tag=$.tag,g.anchor=$.anchor,g.kind=$.kind,g.result=$.result}f(bt,"restoreState");const Tt={YAML:f(function($,V,Q){$.version!==null&&v($,"duplication of %YAML directive"),Q.length!==1&&v($,"YAML directive accepts exactly one argument");const G=/^([0-9]+)\.([0-9]+)$/.exec(Q[0]);G===null&&v($,"ill-formed argument of the YAML directive");const st=parseInt(G[1],10),T=parseInt(G[2],10);st!==1&&v($,"unacceptable YAML version of the document"),$.version=Q[0],$.checkLineBreaks=T<2,T!==1&&T!==2&&R($,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function($,V,Q){let G;Q.length!==2&&v($,"TAG directive accepts exactly two arguments");const st=Q[0];G=Q[1],y.test(st)||v($,"ill-formed tag handle (first argument) of the TAG directive"),s.call($.tagMap,st)&&v($,'there is a previously declared suffix for "'+st+'" tag handle'),x.test(G)||v($,"ill-formed tag prefix (second argument) of the TAG directive");try{G=decodeURIComponent(G)}catch{v($,"tag prefix is malformed: "+G)}$.tagMap[st]=G},"handleTagDirective")};function nt(g,$,V,Q){if($<V){const G=g.input.slice($,V);if(Q)for(let st=0,T=G.length;st<T;st+=1){const q=G.charCodeAt(st);q===9||q>=32&&q<=1114111||v(g,"expected valid JSON character")}else p.test(G)&&v(g,"the stream contains non-printable characters");g.result+=G}}f(nt,"captureSegment");function At(g,$,V,Q){e.isObject(V)||v(g,"cannot merge mappings; the provided source object is unacceptable");const G=Object.keys(V);for(let st=0,T=G.length;st<T;st+=1){const q=G[st];g.maxTotalMergeKeys!==-1&&++g.totalMergeKeys>g.maxTotalMergeKeys&&v(g,"merge keys exceeded maxTotalMergeKeys ("+g.maxTotalMergeKeys+")"),s.call($,q)||(z($,q,V[q]),Q[q]=!0)}}f(At,"mergeMappings");function Lt(g,$,V,Q,G,st,T,q,et){if(Array.isArray(G)){G=Array.prototype.slice.call(G);for(let K=0,J=G.length;K<J;K+=1)Array.isArray(G[K])&&v(g,"nested arrays are not supported inside keys"),typeof G=="object"&&C(G[K])==="[object Object]"&&(G[K]="[object Object]")}if(typeof G=="object"&&C(G)==="[object Object]"&&(G="[object Object]"),G=String(G),$===null&&($={}),Q==="tag:yaml.org,2002:merge")if(Array.isArray(st))for(let K=0,J=st.length;K<J;K+=1)At(g,$,st[K],V);else At(g,$,st,V);else!g.json&&!s.call(V,G)&&s.call($,G)&&(g.line=T||g.line,g.lineStart=q||g.lineStart,g.position=et||g.position,v(g,"duplicated mapping key")),z($,G,st),delete V[G];return $}f(Lt,"storeMappingPair");function qt(g){const $=g.input.charCodeAt(g.position);$===10?g.position++:$===13?(g.position++,g.input.charCodeAt(g.position)===10&&g.position++):v(g,"a line break is expected"),g.line+=1,g.lineStart=g.position,g.firstTabInLine=-1}f(qt,"readLineBreak");function vt(g,$,V){let Q=0,G=g.input.charCodeAt(g.position);for(;G!==0;){for(;S(G);)G===9&&g.firstTabInLine===-1&&(g.firstTabInLine=g.position),G=g.input.charCodeAt(++g.position);if($&&G===35)do G=g.input.charCodeAt(++g.position);while(G!==10&&G!==13&&G!==0);if(k(G))for(qt(g),G=g.input.charCodeAt(g.position),Q++,g.lineIndent=0;G===32;)g.lineIndent++,G=g.input.charCodeAt(++g.position);else break}return V!==-1&&Q!==0&&g.lineIndent<V&&R(g,"deficient indentation"),Q}f(vt,"skipSeparationSpace");function lt(g){let $=g.position,V=g.input.charCodeAt($);return!!((V===45||V===46)&&V===g.input.charCodeAt($+1)&&V===g.input.charCodeAt($+2)&&($+=3,V=g.input.charCodeAt($),V===0||w(V)))}f(lt,"testDocumentSeparator");function gt(g,$){$===1?g.result+=" ":$>1&&(g.result+=e.repeat(`
|
|
279
|
-
`,$-1))}f(gt,"writeFoldedLines");function Et(g,$,V){let Q,G,st,T,q,et;const K=g.kind,J=g.result;let it=g.input.charCodeAt(g.position);if(w(it)||B(it)||it===35||it===38||it===42||it===33||it===124||it===62||it===39||it===34||it===37||it===64||it===96)return!1;if(it===63||it===45){const tt=g.input.charCodeAt(g.position+1);if(w(tt)||V&&B(tt))return!1}for(g.kind="scalar",g.result="",Q=G=g.position,st=!1;it!==0;){if(it===58){const tt=g.input.charCodeAt(g.position+1);if(w(tt)||V&&B(tt))break}else if(it===35){const tt=g.input.charCodeAt(g.position-1);if(w(tt))break}else{if(g.position===g.lineStart&<(g)||V&&B(it))break;if(k(it))if(T=g.line,q=g.lineStart,et=g.lineIndent,vt(g,!1,-1),g.lineIndent>=$){st=!0,it=g.input.charCodeAt(g.position);continue}else{g.position=G,g.line=T,g.lineStart=q,g.lineIndent=et;break}}st&&(nt(g,Q,G,!1),gt(g,g.line-T),Q=G=g.position,st=!1),S(it)||(G=g.position+1),it=g.input.charCodeAt(++g.position)}return nt(g,Q,G,!1),g.result?!0:(g.kind=K,g.result=J,!1)}f(Et,"readPlainScalar");function Rt(g,$){let V,Q,G=g.input.charCodeAt(g.position);if(G!==39)return!1;for(g.kind="scalar",g.result="",g.position++,V=Q=g.position;(G=g.input.charCodeAt(g.position))!==0;)if(G===39)if(nt(g,V,g.position,!0),G=g.input.charCodeAt(++g.position),G===39)V=g.position,g.position++,Q=g.position;else return!0;else k(G)?(nt(g,V,Q,!0),gt(g,vt(g,!1,$)),V=Q=g.position):g.position===g.lineStart&<(g)?v(g,"unexpected end of the document within a single quoted scalar"):(g.position++,S(G)||(Q=g.position));v(g,"unexpected end of the stream within a single quoted scalar")}f(Rt,"readSingleQuotedScalar");function Ut(g,$){let V,Q,G,st=g.input.charCodeAt(g.position);if(st!==34)return!1;for(g.kind="scalar",g.result="",g.position++,V=Q=g.position;(st=g.input.charCodeAt(g.position))!==0;){if(st===34)return nt(g,V,g.position,!0),g.position++,!0;if(st===92){if(nt(g,V,g.position,!0),st=g.input.charCodeAt(++g.position),k(st))vt(g,!1,$);else if(st<256&&at[st])g.result+=j[st],g.position++;else if((G=E(st))>0){let T=G,q=0;for(;T>0;T--)st=g.input.charCodeAt(++g.position),(G=L(st))>=0?q=(q<<4)+G:v(g,"expected hexadecimal character");g.result+=N(q),g.position++}else v(g,"unknown escape sequence");V=Q=g.position}else k(st)?(nt(g,V,Q,!0),gt(g,vt(g,!1,$)),V=Q=g.position):g.position===g.lineStart&<(g)?v(g,"unexpected end of the document within a double quoted scalar"):(g.position++,S(st)||(Q=g.position))}v(g,"unexpected end of the stream within a double quoted scalar")}f(Ut,"readDoubleQuotedScalar");function D(g,$){let V=!0,Q,G,st;const T=g.tag;let q;const et=g.anchor;let K,J,it,tt;const mt=Object.create(null);let ct,kt,Bt,Nt=g.input.charCodeAt(g.position);if(Nt===91)K=93,tt=!1,q=[];else if(Nt===123)K=125,tt=!0,q={};else return!1;for(g.anchor!==null&&P(g,g.anchor,q),Nt=g.input.charCodeAt(++g.position);Nt!==0;){if(vt(g,!0,$),Nt=g.input.charCodeAt(g.position),Nt===K)return g.position++,g.tag=T,g.anchor=et,g.kind=tt?"mapping":"sequence",g.result=q,!0;if(V?Nt===44&&v(g,"expected the node content, but found ','"):v(g,"missed comma between flow collection entries"),kt=ct=Bt=null,J=it=!1,Nt===63){const Vt=g.input.charCodeAt(g.position+1);w(Vt)&&(J=it=!0,g.position++,vt(g,!0,$))}Q=g.line,G=g.lineStart,st=g.position,Be(g,$,a,!1,!0),kt=g.tag,ct=g.result,vt(g,!0,$),Nt=g.input.charCodeAt(g.position),(it||g.line===Q)&&Nt===58&&(J=!0,Nt=g.input.charCodeAt(++g.position),vt(g,!0,$),Be(g,$,a,!1,!0),Bt=g.result),tt?Lt(g,q,mt,kt,ct,Bt,Q,G,st):J?q.push(Lt(g,null,mt,kt,ct,Bt,Q,G,st)):q.push(ct),vt(g,!0,$),Nt=g.input.charCodeAt(g.position),Nt===44?(V=!0,Nt=g.input.charCodeAt(++g.position)):V=!1}v(g,"unexpected end of the stream within a flow collection")}f(D,"readFlowCollection");function Ft(g,$){let V,Q=c,G=!1,st=!1,T=$,q=0,et=!1,K,J=g.input.charCodeAt(g.position);if(J===124)V=!1;else if(J===62)V=!0;else return!1;for(g.kind="scalar",g.result="";J!==0;)if(J=g.input.charCodeAt(++g.position),J===43||J===45)c===Q?Q=J===43?u:h:v(g,"repeat of a chomping mode identifier");else if((K=F(J))>=0)K===0?v(g,"bad explicit indentation width of a block scalar; it cannot be less than one"):st?v(g,"repeat of an indentation width identifier"):(T=$+K-1,st=!0);else break;if(S(J)){do J=g.input.charCodeAt(++g.position);while(S(J));if(J===35)do J=g.input.charCodeAt(++g.position);while(!k(J)&&J!==0)}for(;J!==0;){for(qt(g),g.lineIndent=0,J=g.input.charCodeAt(g.position);(!st||g.lineIndent<T)&&J===32;)g.lineIndent++,J=g.input.charCodeAt(++g.position);if(!st&&g.lineIndent>T&&(T=g.lineIndent),k(J)){q++;continue}if(!st&&T===0&&v(g,"missing indentation for block scalar"),g.lineIndent<T){Q===u?g.result+=e.repeat(`
|
|
280
|
-
`,G?1+q:q):Q===c&&G&&(g.result+=`
|
|
281
|
-
`);break}V?S(J)?(et=!0,g.result+=e.repeat(`
|
|
282
|
-
`,G?1+q:q)):et?(et=!1,g.result+=e.repeat(`
|
|
283
|
-
`,q+1)):q===0?G&&(g.result+=" "):g.result+=e.repeat(`
|
|
284
|
-
`,q):g.result+=e.repeat(`
|
|
285
|
-
`,G?1+q:q),G=!0,st=!0,q=0;const it=g.position;for(;!k(J)&&J!==0;)J=g.input.charCodeAt(++g.position);nt(g,it,g.position,!1)}return!0}f(Ft,"readBlockScalar");function Wt(g,$){const V=g.tag,Q=g.anchor,G=[];let st=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,G);let T=g.input.charCodeAt(g.position);for(;T!==0&&(g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation")),T===45);){const q=g.input.charCodeAt(g.position+1);if(!w(q))break;if(st=!0,g.position++,vt(g,!0,-1)&&g.lineIndent<=$){G.push(null),T=g.input.charCodeAt(g.position);continue}const et=g.line;if(Be(g,$,n,!1,!0),G.push(g.result),vt(g,!0,-1),T=g.input.charCodeAt(g.position),(g.line===et||g.lineIndent>$)&&T!==0)v(g,"bad indentation of a sequence entry");else if(g.lineIndent<$)break}return st?(g.tag=V,g.anchor=Q,g.kind="sequence",g.result=G,!0):!1}f(Wt,"readBlockSequence");function we(g,$,V){let Q,G,st,T;const q=g.tag,et=g.anchor,K={},J=Object.create(null);let it=null,tt=null,mt=null,ct=!1,kt=!1;if(g.firstTabInLine!==-1)return!1;g.anchor!==null&&P(g,g.anchor,K);let Bt=g.input.charCodeAt(g.position);for(;Bt!==0;){!ct&&g.firstTabInLine!==-1&&(g.position=g.firstTabInLine,v(g,"tab characters must not be used in indentation"));const Nt=g.input.charCodeAt(g.position+1),Vt=g.line;if((Bt===63||Bt===58)&&w(Nt))Bt===63?(ct&&(Lt(g,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!0,Q=!0):ct?(ct=!1,Q=!0):v(g,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),g.position+=1,Bt=Nt;else{if(G=g.line,st=g.lineStart,T=g.position,!Be(g,V,o,!1,!0))break;if(g.line===Vt){for(Bt=g.input.charCodeAt(g.position);S(Bt);)Bt=g.input.charCodeAt(++g.position);if(Bt===58)Bt=g.input.charCodeAt(++g.position),w(Bt)||v(g,"a whitespace character is expected after the key-value separator within a block mapping"),ct&&(Lt(g,K,J,it,tt,null,G,st,T),it=tt=mt=null),kt=!0,ct=!1,Q=!1,it=g.tag,tt=g.result;else if(kt)v(g,"can not read an implicit mapping pair; a colon is missed");else return g.tag=q,g.anchor=et,!0}else if(kt)v(g,"can not read a block mapping entry; a multiline key may not be an implicit key");else return g.tag=q,g.anchor=et,!0}if((g.line===Vt||g.lineIndent>$)&&(ct&&(G=g.line,st=g.lineStart,T=g.position),Be(g,$,l,!0,Q)&&(ct?tt=g.result:mt=g.result),ct||(Lt(g,K,J,it,tt,mt,G,st,T),it=tt=mt=null),vt(g,!0,-1),Bt=g.input.charCodeAt(g.position)),(g.line===Vt||g.lineIndent>$)&&Bt!==0)v(g,"bad indentation of a mapping entry");else if(g.lineIndent<$)break}return ct&&Lt(g,K,J,it,tt,null,G,st,T),kt&&(g.tag=q,g.anchor=et,g.kind="mapping",g.result=K),kt}f(we,"readBlockMapping");function fe(g){let $=!1,V=!1,Q,G,st=g.input.charCodeAt(g.position);if(st!==33)return!1;g.tag!==null&&v(g,"duplication of a tag property"),st=g.input.charCodeAt(++g.position),st===60?($=!0,st=g.input.charCodeAt(++g.position)):st===33?(V=!0,Q="!!",st=g.input.charCodeAt(++g.position)):Q="!";let T=g.position;if($){do st=g.input.charCodeAt(++g.position);while(st!==0&&st!==62);g.position<g.length?(G=g.input.slice(T,g.position),st=g.input.charCodeAt(++g.position)):v(g,"unexpected end of the stream within a verbatim tag")}else{for(;st!==0&&!w(st);)st===33&&(V?v(g,"tag suffix cannot contain exclamation marks"):(Q=g.input.slice(T-1,g.position+1),y.test(Q)||v(g,"named tag handle cannot contain such characters"),V=!0,T=g.position+1)),st=g.input.charCodeAt(++g.position);G=g.input.slice(T,g.position),m.test(G)&&v(g,"tag suffix cannot contain flow indicator characters")}G&&!x.test(G)&&v(g,"tag name cannot contain such characters: "+G);try{G=decodeURIComponent(G)}catch{v(g,"tag name is malformed: "+G)}return $?g.tag=G:s.call(g.tagMap,Q)?g.tag=g.tagMap[Q]+G:Q==="!"?g.tag="!"+G:Q==="!!"?g.tag="tag:yaml.org,2002:"+G:v(g,'undeclared tag handle "'+Q+'"'),!0}f(fe,"readTagProperty");function Re(g){let $=g.input.charCodeAt(g.position);if($!==38)return!1;g.anchor!==null&&v(g,"duplication of an anchor property"),$=g.input.charCodeAt(++g.position);const V=g.position;for(;$!==0&&!w($)&&!B($);)$=g.input.charCodeAt(++g.position);return g.position===V&&v(g,"name of an anchor node must contain at least one character"),g.anchor=g.input.slice(V,g.position),!0}f(Re,"readAnchorProperty");function cr(g){let $=g.input.charCodeAt(g.position);if($!==42)return!1;$=g.input.charCodeAt(++g.position);const V=g.position;for(;$!==0&&!w($)&&!B($);)$=g.input.charCodeAt(++g.position);g.position===V&&v(g,"name of an alias node must contain at least one character");const Q=g.input.slice(V,g.position);return s.call(g.anchorMap,Q)||v(g,'unidentified alias "'+Q+'"'),g.result=g.anchorMap[Q],vt(g,!0,-1),!0}f(cr,"readAlias");function _e(g,$,V,Q){const G=pt(g);return H(g),bt(g,$),g.tag=null,g.anchor=null,g.kind=null,g.result=null,we(g,V,Q)&&g.kind==="mapping"?(Z(g),!0):(ut(g),bt(g,G),!1)}f(_e,"tryReadBlockMappingFromProperty");function Be(g,$,V,Q,G){let st,T,q=1,et=!1,K=!1,J=null,it,tt,mt;g.depth>=g.maxDepth&&v(g,"nesting exceeded maxDepth ("+g.maxDepth+")"),g.depth+=1,g.listener!==null&&g.listener("open",g),g.tag=null,g.anchor=null,g.kind=null,g.result=null;const ct=st=T=l===V||n===V;if(Q&&vt(g,!0,-1)&&(et=!0,g.lineIndent>$?q=1:g.lineIndent===$?q=0:g.lineIndent<$&&(q=-1)),q===1)for(;;){const kt=g.input.charCodeAt(g.position),Bt=pt(g);if(et&&(kt===33&&g.tag!==null||kt===38&&g.anchor!==null)||!fe(g)&&!Re(g))break;J===null&&(J=Bt),vt(g,!0,-1)?(et=!0,T=ct,g.lineIndent>$?q=1:g.lineIndent===$?q=0:g.lineIndent<$&&(q=-1)):T=!1}if(T&&(T=et||G),q===1||l===V)if(a===V||o===V?tt=$:tt=$+1,mt=g.position-g.lineStart,q===1)if(T&&(Wt(g,mt)||we(g,mt,tt))||D(g,tt))K=!0;else{const kt=g.input.charCodeAt(g.position);J!==null&&ct&&!T&&kt!==124&&kt!==62&&_e(g,J,J.position-J.lineStart,tt)||st&&Ft(g,tt)||Rt(g,tt)||Ut(g,tt)?K=!0:cr(g)?(K=!0,(g.tag!==null||g.anchor!==null)&&v(g,"alias node should not have any properties")):Et(g,tt,a===V)&&(K=!0,g.tag===null&&(g.tag="?")),g.anchor!==null&&P(g,g.anchor,g.result)}else q===0&&(K=T&&Wt(g,mt));if(g.tag===null)g.anchor!==null&&P(g,g.anchor,g.result);else if(g.tag==="?"){g.result!==null&&g.kind!=="scalar"&&v(g,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+g.kind+'"');for(let kt=0,Bt=g.implicitTypes.length;kt<Bt;kt+=1)if(it=g.implicitTypes[kt],it.resolve(g.result)){g.result=it.construct(g.result),g.tag=it.tag,g.anchor!==null&&P(g,g.anchor,g.result);break}}else if(g.tag!=="!"){if(s.call(g.typeMap[g.kind||"fallback"],g.tag))it=g.typeMap[g.kind||"fallback"][g.tag];else{it=null;const kt=g.typeMap.multi[g.kind||"fallback"];for(let Bt=0,Nt=kt.length;Bt<Nt;Bt+=1)if(g.tag.slice(0,kt[Bt].tag.length)===kt[Bt].tag){it=kt[Bt];break}}it||v(g,"unknown tag !<"+g.tag+">"),g.result!==null&&it.kind!==g.kind&&v(g,"unacceptable node kind for !<"+g.tag+'> tag; it should be "'+it.kind+'", not "'+g.kind+'"'),it.resolve(g.result,g.tag)?(g.result=it.construct(g.result,g.tag),g.anchor!==null&&P(g,g.anchor,g.result)):v(g,"cannot resolve a node with !<"+g.tag+"> explicit tag")}return g.listener!==null&&g.listener("close",g),g.depth-=1,g.tag!==null||g.anchor!==null||K}f(Be,"composeNode");function ur(g){const $=g.position;let V=!1,Q;for(g.version=null,g.checkLineBreaks=g.legacy,g.tagMap=Object.create(null),g.anchorMap=Object.create(null);(Q=g.input.charCodeAt(g.position))!==0&&(vt(g,!0,-1),Q=g.input.charCodeAt(g.position),!(g.lineIndent>0||Q!==37));){V=!0,Q=g.input.charCodeAt(++g.position);let G=g.position;for(;Q!==0&&!w(Q);)Q=g.input.charCodeAt(++g.position);const st=g.input.slice(G,g.position),T=[];for(st.length<1&&v(g,"directive name must not be less than one character in length");Q!==0;){for(;S(Q);)Q=g.input.charCodeAt(++g.position);if(Q===35){do Q=g.input.charCodeAt(++g.position);while(Q!==0&&!k(Q));break}if(k(Q))break;for(G=g.position;Q!==0&&!w(Q);)Q=g.input.charCodeAt(++g.position);T.push(g.input.slice(G,g.position))}Q!==0&&qt(g),s.call(Tt,st)?Tt[st](g,st,T):R(g,'unknown document directive "'+st+'"')}if(vt(g,!0,-1),g.lineIndent===0&&g.input.charCodeAt(g.position)===45&&g.input.charCodeAt(g.position+1)===45&&g.input.charCodeAt(g.position+2)===45?(g.position+=3,vt(g,!0,-1)):V&&v(g,"directives end mark is expected"),Be(g,g.lineIndent-1,l,!1,!0),vt(g,!0,-1),g.checkLineBreaks&&d.test(g.input.slice($,g.position))&&R(g,"non-ASCII line breaks are interpreted as content"),g.documents.push(g.result),g.position===g.lineStart&<(g)){g.input.charCodeAt(g.position)===46&&(g.position+=3,vt(g,!0,-1));return}g.position<g.length-1&&v(g,"end of the stream or a document separator is expected")}f(ur,"readDocument");function dr(g,$){g=String(g),$=$||{},g.length!==0&&(g.charCodeAt(g.length-1)!==10&&g.charCodeAt(g.length-1)!==13&&(g+=`
|
|
286
|
-
`),g.charCodeAt(0)===65279&&(g=g.slice(1)));const V=new A(g,$),Q=g.indexOf("\0");for(Q!==-1&&(V.position=Q,v(V,"null byte is not allowed in input")),V.input+="\0";V.input.charCodeAt(V.position)===32;)V.lineIndent+=1,V.position+=1;for(;V.position<V.length-1;)ur(V);return V.documents}f(dr,"loadDocuments");function pr(g,$,V){$!==null&&typeof $=="object"&&typeof V>"u"&&(V=$,$=null);const Q=dr(g,V);if(typeof $!="function")return Q;for(let G=0,st=Q.length;G<st;G+=1)$(Q[G])}f(pr,"loadAll2");function ve(g,$){const V=dr(g,$);if(V.length!==0){if(V.length===1)return V[0];throw new t("expected a single document in the stream, but found more")}}return f(ve,"load2"),Zs.loadAll=pr,Zs.load=ve,Zs}f(em,"requireLoader");var Qo={},Ru;function rm(){if(Ru)return Qo;Ru=1;const e=Wi(),t=Hi(),r=Xa(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,a=65279,o=9,n=10,l=13,c=32,h=33,u=34,p=35,d=37,m=38,y=39,x=42,C=44,k=45,S=58,w=61,B=62,L=63,E=64,F=91,X=93,N=96,z=123,at=124,j=125,A={};A[0]="\\0",A[7]="\\a",A[8]="\\b",A[9]="\\t",A[10]="\\n",A[11]="\\v",A[12]="\\f",A[13]="\\r",A[27]="\\e",A[34]='\\"',A[92]="\\\\",A[133]="\\N",A[160]="\\_",A[8232]="\\L",A[8233]="\\P";const O=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],v=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function R(T,q){if(q===null)return{};const et={},K=Object.keys(q);for(let J=0,it=K.length;J<it;J+=1){let tt=K[J],mt=String(q[tt]);tt.slice(0,2)==="!!"&&(tt="tag:yaml.org,2002:"+tt.slice(2));const ct=T.compiledTypeMap.fallback[tt];ct&&s.call(ct.styleAliases,mt)&&(mt=ct.styleAliases[mt]),et[tt]=mt}return et}f(R,"compileStyleMap");function P(T){let q,et;const K=T.toString(16).toUpperCase();if(T<=255)q="x",et=2;else if(T<=65535)q="u",et=4;else if(T<=4294967295)q="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+q+e.repeat("0",et-K.length)+K}f(P,"encodeHex");const H=1,Z=2;function ut(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=R(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?Z:H,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(ut,"State");function pt(T,q){const et=e.repeat(" ",q);let K=0,J="";const it=T.length;for(;K<it;){let tt;const mt=T.indexOf(`
|
|
287
|
-
`,K);mt===-1?(tt=T.slice(K),K=it):(tt=T.slice(K,mt+1),K=mt+1),tt.length&&tt!==`
|
|
288
|
-
`&&(J+=et),J+=tt}return J}f(pt,"indentString");function bt(T,q){return`
|
|
289
|
-
`+e.repeat(" ",T.indent*q)}f(bt,"generateNextLine");function Tt(T,q){for(let et=0,K=T.implicitTypes.length;et<K;et+=1)if(T.implicitTypes[et].resolve(q))return!0;return!1}f(Tt,"testImplicitResolving");function nt(T){return T===c||T===o}f(nt,"isWhitespace");function At(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==a||T>=65536&&T<=1114111}f(At,"isPrintable");function Lt(T){return At(T)&&T!==a&&T!==l&&T!==n}f(Lt,"isNsCharOrWhitespace");function qt(T,q,et){const K=Lt(T),J=K&&!nt(T);return(et?K:K&&T!==C&&T!==F&&T!==X&&T!==z&&T!==j)&&T!==p&&!(q===S&&!J)||Lt(q)&&!nt(q)&&T===p||q===S&&J}f(qt,"isPlainSafe");function vt(T){return At(T)&&T!==a&&!nt(T)&&T!==k&&T!==L&&T!==S&&T!==C&&T!==F&&T!==X&&T!==z&&T!==j&&T!==p&&T!==m&&T!==x&&T!==h&&T!==at&&T!==w&&T!==B&&T!==y&&T!==u&&T!==d&&T!==E&&T!==N}f(vt,"isPlainSafeFirst");function lt(T){return!nt(T)&&T!==S}f(lt,"isPlainSafeLast");function gt(T,q){const et=T.charCodeAt(q);let K;return et>=55296&&et<=56319&&q+1<T.length&&(K=T.charCodeAt(q+1),K>=56320&&K<=57343)?(et-55296)*1024+K-56320+65536:et}f(gt,"codePointAt");function Et(T){return/^\n* /.test(T)}f(Et,"needIndentIndicator");const Rt=1,Ut=2,D=3,Ft=4,Wt=5;function we(T,q,et,K,J,it,tt,mt){let ct,kt=0,Bt=null,Nt=!1,Vt=!1;const Yi=K!==-1;let wr=-1,Ze=vt(gt(T,0))&<(gt(T,T.length-1));if(q||tt)for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=gt(T,ct),!At(kt))return Wt;Ze=Ze&&qt(kt,Bt,mt),Bt=kt}else{for(ct=0;ct<T.length;kt>=65536?ct+=2:ct++){if(kt=gt(T,ct),kt===n)Nt=!0,Yi&&(Vt=Vt||ct-wr-1>K&&T[wr+1]!==" ",wr=ct);else if(!At(kt))return Wt;Ze=Ze&&qt(kt,Bt,mt),Bt=kt}Vt=Vt||Yi&&ct-wr-1>K&&T[wr+1]!==" "}return!Nt&&!Vt?Ze&&!tt&&!J(T)?Rt:it===Z?Wt:Ut:et>9&&Et(T)?Wt:tt?it===Z?Wt:Ut:Vt?Ft:D}f(we,"chooseScalarStyle");function fe(T,q,et,K,J){T.dump=(function(){if(q.length===0)return T.quotingType===Z?'""':"''";if(!T.noCompatMode&&(O.indexOf(q)!==-1||v.test(q)))return T.quotingType===Z?'"'+q+'"':"'"+q+"'";const it=T.indent*Math.max(1,et),tt=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-it),mt=K||T.flowLevel>-1&&et>=T.flowLevel;function ct(kt){return Tt(T,kt)}switch(f(ct,"testAmbiguity"),we(q,mt,T.indent,tt,ct,T.quotingType,T.forceQuotes&&!K,J)){case Rt:return q;case Ut:return"'"+q.replace(/'/g,"''")+"'";case D:return"|"+Re(q,T.indent)+cr(pt(q,it));case Ft:return">"+Re(q,T.indent)+cr(pt(_e(q,tt),it));case Wt:return'"'+ur(q)+'"';default:throw new t("impossible error: invalid scalar style")}})()}f(fe,"writeScalar");function Re(T,q){const et=Et(T)?String(q):"",K=T[T.length-1]===`
|
|
290
|
-
`,it=K&&(T[T.length-2]===`
|
|
291
|
-
`||T===`
|
|
292
|
-
`)?"+":K?"":"-";return et+it+`
|
|
293
|
-
`}f(Re,"blockHeader");function cr(T){return T[T.length-1]===`
|
|
294
|
-
`?T.slice(0,-1):T}f(cr,"dropEndingNewline");function _e(T,q){const et=/(\n+)([^\n]*)/g;let K=(function(){let mt=T.indexOf(`
|
|
295
|
-
`);return mt=mt!==-1?mt:T.length,et.lastIndex=mt,Be(T.slice(0,mt),q)})(),J=T[0]===`
|
|
296
|
-
`||T[0]===" ",it,tt;for(;tt=et.exec(T);){const mt=tt[1],ct=tt[2];it=ct[0]===" ",K+=mt+(!J&&!it&&ct!==""?`
|
|
297
|
-
`:"")+Be(ct,q),J=it}return K}f(_e,"foldString");function Be(T,q){if(T===""||T[0]===" ")return T;const et=/ [^ ]/g;let K,J=0,it,tt=0,mt=0,ct="";for(;K=et.exec(T);)mt=K.index,mt-J>q&&(it=tt>J?tt:mt,ct+=`
|
|
298
|
-
`+T.slice(J,it),J=it+1),tt=mt;return ct+=`
|
|
299
|
-
`,T.length-J>q&&tt>J?ct+=T.slice(J,tt)+`
|
|
300
|
-
`+T.slice(tt+1):ct+=T.slice(J),ct.slice(1)}f(Be,"foldLine");function ur(T){let q="",et=0;for(let K=0;K<T.length;et>=65536?K+=2:K++){et=gt(T,K);const J=A[et];!J&&At(et)?(q+=T[K],et>=65536&&(q+=T[K+1])):q+=J||P(et)}return q}f(ur,"escapeString");function dr(T,q,et){let K="";const J=T.tag;for(let it=0,tt=et.length;it<tt;it+=1){let mt=et[it];T.replacer&&(mt=T.replacer.call(et,String(it),mt)),(V(T,q,mt,!1,!1)||typeof mt>"u"&&V(T,q,null,!1,!1))&&(K!==""&&(K+=","+(T.condenseFlow?"":" ")),K+=T.dump)}T.tag=J,T.dump="["+K+"]"}f(dr,"writeFlowSequence");function pr(T,q,et,K){let J="";const it=T.tag;for(let tt=0,mt=et.length;tt<mt;tt+=1){let ct=et[tt];T.replacer&&(ct=T.replacer.call(et,String(tt),ct)),(V(T,q+1,ct,!0,!0,!1,!0)||typeof ct>"u"&&V(T,q+1,null,!0,!0,!1,!0))&&((!K||J!=="")&&(J+=bt(T,q)),T.dump&&n===T.dump.charCodeAt(0)?J+="-":J+="- ",J+=T.dump)}T.tag=it,T.dump=J||"[]"}f(pr,"writeBlockSequence");function ve(T,q,et){let K="";const J=T.tag,it=Object.keys(et);for(let tt=0,mt=it.length;tt<mt;tt+=1){let ct="";K!==""&&(ct+=", "),T.condenseFlow&&(ct+='"');const kt=it[tt];let Bt=et[kt];T.replacer&&(Bt=T.replacer.call(et,kt,Bt)),V(T,q,kt,!1,!1)&&(T.dump.length>1024&&(ct+="? "),ct+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),V(T,q,Bt,!1,!1)&&(ct+=T.dump,K+=ct))}T.tag=J,T.dump="{"+K+"}"}f(ve,"writeFlowMapping");function g(T,q,et,K){let J="";const it=T.tag,tt=Object.keys(et);if(T.sortKeys===!0)tt.sort();else if(typeof T.sortKeys=="function")tt.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let mt=0,ct=tt.length;mt<ct;mt+=1){let kt="";(!K||J!=="")&&(kt+=bt(T,q));const Bt=tt[mt];let Nt=et[Bt];if(T.replacer&&(Nt=T.replacer.call(et,Bt,Nt)),!V(T,q+1,Bt,!0,!0,!0))continue;const Vt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Vt&&(T.dump&&n===T.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=T.dump,Vt&&(kt+=bt(T,q)),V(T,q+1,Nt,!0,Vt)&&(T.dump&&n===T.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=T.dump,J+=kt)}T.tag=it,T.dump=J||"{}"}f(g,"writeBlockMapping");function $(T,q,et){const K=et?T.explicitTypes:T.implicitTypes;for(let J=0,it=K.length;J<it;J+=1){const tt=K[J];if((tt.instanceOf||tt.predicate)&&(!tt.instanceOf||typeof q=="object"&&q instanceof tt.instanceOf)&&(!tt.predicate||tt.predicate(q))){if(et?tt.multi&&tt.representName?T.tag=tt.representName(q):T.tag=tt.tag:T.tag="?",tt.represent){const mt=T.styleMap[tt.tag]||tt.defaultStyle;let ct;if(i.call(tt.represent)==="[object Function]")ct=tt.represent(q,mt);else if(s.call(tt.represent,mt))ct=tt.represent[mt](q,mt);else throw new t("!<"+tt.tag+'> tag resolver accepts not "'+mt+'" style');T.dump=ct}return!0}}return!1}f($,"detectType");function V(T,q,et,K,J,it,tt){T.tag=null,T.dump=et,$(T,et,!1)||$(T,et,!0);const mt=i.call(T.dump),ct=K;K&&(K=T.flowLevel<0||T.flowLevel>q);const kt=mt==="[object Object]"||mt==="[object Array]";let Bt,Nt;if(kt&&(Bt=T.duplicates.indexOf(et),Nt=Bt!==-1),(T.tag!==null&&T.tag!=="?"||Nt||T.indent!==2&&q>0)&&(J=!1),Nt&&T.usedDuplicates[Bt])T.dump="*ref_"+Bt;else{if(kt&&Nt&&!T.usedDuplicates[Bt]&&(T.usedDuplicates[Bt]=!0),mt==="[object Object]")K&&Object.keys(T.dump).length!==0?(g(T,q,T.dump,J),Nt&&(T.dump="&ref_"+Bt+T.dump)):(ve(T,q,T.dump),Nt&&(T.dump="&ref_"+Bt+" "+T.dump));else if(mt==="[object Array]")K&&T.dump.length!==0?(T.noArrayIndent&&!tt&&q>0?pr(T,q-1,T.dump,J):pr(T,q,T.dump,J),Nt&&(T.dump="&ref_"+Bt+T.dump)):(dr(T,q,T.dump),Nt&&(T.dump="&ref_"+Bt+" "+T.dump));else if(mt==="[object String]")T.tag!=="?"&&fe(T,T.dump,q,it,ct);else{if(mt==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+mt)}if(T.tag!==null&&T.tag!=="?"){let Vt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",T.dump=Vt+" "+T.dump}}return!0}f(V,"writeNode");function Q(T,q){const et=[],K=[];G(T,et,K);const J=K.length;for(let it=0;it<J;it+=1)q.duplicates.push(et[K[it]]);q.usedDuplicates=new Array(J)}f(Q,"getDuplicateReferences");function G(T,q,et){if(T!==null&&typeof T=="object"){const K=q.indexOf(T);if(K!==-1)et.indexOf(K)===-1&&et.push(K);else if(q.push(T),Array.isArray(T))for(let J=0,it=T.length;J<it;J+=1)G(T[J],q,et);else{const J=Object.keys(T);for(let it=0,tt=J.length;it<tt;it+=1)G(T[J[it]],q,et)}}}f(G,"inspectNode");function st(T,q){q=q||{};const et=new ut(q);et.noRefs||Q(T,et);let K=T;return et.replacer&&(K=et.replacer.call({"":K},"",K)),V(et,0,K,!0,!0)?et.dump+`
|
|
301
|
-
`:""}return f(st,"dump2"),Qo.dump=st,Qo}f(rm,"requireDumper");var qu;function im(){if(qu)return ge;qu=1;const e=em(),t=rm();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return f(r,"renamed"),ge.Type=ke(),ge.Schema=Pl(),ge.FAILSAFE_SCHEMA=Nl(),ge.JSON_SCHEMA=Yl(),ge.CORE_SCHEMA=Ul(),ge.DEFAULT_SCHEMA=Xa(),ge.load=e.load,ge.loadAll=e.loadAll,ge.dump=t.dump,ge.YAMLException=Hi(),ge.types={binary:Vl(),float:jl(),map:ql(),null:zl(),pairs:Kl(),set:Ql(),timestamp:Gl(),bool:Wl(),int:Hl(),merge:Xl(),omap:Zl(),seq:Rl(),str:Il()},ge.safeLoad=r("safeLoad","load"),ge.safeLoadAll=r("safeLoadAll","loadAll"),ge.safeDump=r("safeDump","dump"),ge}f(im,"requireJsYaml");var Ow=im(),$w=Jg(Ow),{Type:NL,Schema:zL,FAILSAFE_SCHEMA:WL,JSON_SCHEMA:Dw,CORE_SCHEMA:HL,DEFAULT_SCHEMA:jL,load:Pw,loadAll:YL,dump:UL,YAMLException:GL,types:XL,safeLoad:VL,safeLoadAll:ZL,safeDump:KL}=$w,Iw={common:Ls,getConfig:te,insertCluster:lg,insertEdge:ug,insertEdgeLabel:Sl,insertMarkers:fg,insertNode:Tl,interpolateToCurve:Jn,labelHelper:St,log:W,positionEdgeLabel:u1},ws={},sm=f(e=>{for(const t of e)ws[t.name]=t},"registerLayoutLoaders"),Rw=f(()=>{sm([{name:"dagre",loader:f(async()=>await It(()=>import("./explorer-dagre-GXQ25YYZ.js"),__vite__mapDeps([3,4,1,2]),import.meta.url),"loader")},{name:"swimlane",loader:f(async()=>await It(()=>import("./explorer-swimlanes-42K2YHIH.js"),__vite__mapDeps([5,1,2]),import.meta.url),"loader")},{name:"cose-bilkent",loader:f(async()=>await It(()=>import("./explorer-cose-bilkent-JH36ORCC.js"),__vite__mapDeps([6,7,1,2]),import.meta.url),"loader")}])},"registerDefaultLayoutLoaders");Rw();var QL=f(async(e,t)=>{if(!(e.layoutAlgorithm in ws))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const u=h.domId||h.id;h.domId=`${e.diagramId}-${u}`}const r=ws[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:a}=e.config,{useGradient:o,gradientStart:n,gradientStop:l}=a,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),o){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,Iw,{algorithm:r.algorithm})},"render"),JL=f((e="",{fallback:t="dagre"}={})=>{if(e in ws)return e;if(t in ws)return W.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Jl="comm",am="rule",om="decl",qw="@media",Nw="@import",zw="@supports",Ww="@namespace",An="@keyframes",nm="@layer",Hw="@scope",jw=Math.abs,Cs=String.fromCharCode;function lm(e){return e.trim()}function Mn(e,t,r){return e.replace(t,r)}function Ci(e,t){return e.charCodeAt(t)|0}function Ii(e,t,r){return e.slice(t,r)}function er(e){return e.length}function hm(e){return e.length}function Ks(e,t){return t.push(e),e}var Va=1,Ri=1,cm=0,We=0,ae=0,ji="";function th(e,t,r,i,s,a,o,n){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Va,column:Ri,length:o,return:"",siblings:n}}function Yw(){return ae}function Uw(){return ae=We>0?Ci(ji,--We):0,Ri--,ae===10&&(Ri=1,Va--),ae}function Ge(){return ae=We<cm?Ci(ji,We++):0,Ri++,ae===10&&(Ri=1,Va++),ae}function Er(){return Ci(ji,We)}function na(){return We}function Za(e,t){return Ii(ji,e,t)}function _s(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Gw(e){return Va=Ri=1,cm=er(ji=e),We=0,[]}function Xw(e){return ji="",e}function Jo(e){return lm(Za(We-1,On(e===91?e+2:e===40?e+1:e)))}function Vw(e){for(;(ae=Er())&&ae<33;)Ge();return _s(e)>2||_s(ae)>3?"":" "}function Zw(e,t){for(;--t&&Ge()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return Za(e,na()+(t<6&&Er()==32&&Ge()==32))}function On(e){for(;Ge();)switch(ae){case e:return We;case 34:case 39:e!==34&&e!==39&&On(ae);break;case 40:e===41&&On(e);break;case 92:Ge();break}return We}function Kw(e,t){for(;Ge()&&e+ae!==57;)if(e+ae===84&&Er()===47)break;return"/*"+Za(t,We-1)+"*"+Cs(e===47?e:Ge())}function Qw(e){for(;!_s(Er());)Ge();return Za(e,We)}function Jw(e){return Xw(la("",null,null,null,[""],e=Gw(e),0,[0],e))}function la(e,t,r,i,s,a,o,n,l){for(var c=0,h=0,u=o,p=0,d=0,m=0,y=1,x=1,C=1,k=0,S=0,w="",B=s,L=a,E=i,F=w;x;)switch(m=S,S=Ge()){case 40:m!=108&&Ci(F,u-1)==58?(k++,F+="("):F+=Jo(S);break;case 41:k--,F+=")";break;case 34:case 39:case 91:F+=Jo(S);break;case 9:case 10:case 13:case 32:if(k>0){F+=Cs(S);break}F+=Vw(m);break;case 92:F+=Zw(na()-1,7);continue;case 47:switch(Er()){case 42:case 47:Ks(t_(Kw(Ge(),na()),t,r,l),l),(_s(m||1)==5||_s(Er()||1)==5)&&er(F)&&Ii(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:n[c++]=er(F)*C;case 125*y:case 59:case 0:if(k>0&&S){F+=Cs(S);break}switch(S){case 0:case 125:x=0;case 59+h:C==-1&&(F=Mn(F,/\f/g,"")),d>0&&(er(F)-u||y===0)&&Ks(d>32?zu(F+";",i,r,u-1,l):zu(Mn(F," ","")+";",i,r,u-2,l),l);break;case 59:F+=";";default:if(Ks(E=Nu(F,t,r,c,h,s,n,w,B=[],L=[],u,a),a),S===123)if(h===0)la(F,t,E,E,B,a,u,n,L);else{switch(p){case 99:if(Ci(F,3)===110)break;case 108:if(Ci(F,2)===97)break;default:h=0;case 100:case 109:case 115:}h?la(e,E,E,i&&Ks(Nu(e,E,E,0,0,s,n,w,s,B=[],u,L),L),s,L,u,n,i?B:L):la(F,E,E,E,[""],L,0,n,L)}}c=h=d=0,y=C=1,w=F="",u=o;break;case 58:u=1+er(F),d=m;default:if(y<1){if(S==123)--y;else if(S==125&&y++==0&&Uw()==125)continue}switch(F+=Cs(S),S*y){case 38:C=h>0?1:(F+="\f",-1);break;case 44:if(k>0)break;n[c++]=(er(F)-1)*C,C=1;break;case 64:Er()===45&&(F+=Jo(Ge())),p=Er(),h=u=er(w=F+=Qw(na())),S++;break;case 45:m===45&&er(F)==2&&(y=0)}}return a}function Nu(e,t,r,i,s,a,o,n,l,c,h,u){for(var p=s-1,d=s===0?a:[""],m=hm(d),y=0,x=0,C=0;y<i;++y)for(var k=0,S=Ii(e,p+1,p=jw(x=o[y])),w=e;k<m;++k)(w=lm(x>0?d[k]+" "+S:Mn(S,/&\f/g,d[k])))&&(l[C++]=w);return th(e,t,r,s===0?am:n,l,c,h,u)}function t_(e,t,r,i){return th(e,t,r,Jl,Cs(Yw()),Ii(e,2,-2),0,i)}function zu(e,t,r,i,s){return th(e,t,r,om,Ii(e,0,i),Ii(e,i+1,-1),i,s)}function $n(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function e_(e,t,r,i){switch(e.type){case nm:if(e.children.length)break;case Nw:case Ww:case om:return e.return=e.return||e.value;case Jl:return"";case An:return e.return=e.value+"{"+$n(e.children,i)+"}";case am:if(!er(e.value=e.props.join(",")))return""}return er(r=$n(e.children,i))?e.return=e.value+"{"+r+"}":""}function r_(e){var t=hm(e);return function(r,i,s,a){for(var o="",n=0;n<t;n++)o+=e[n](r,i,s,a)||"";return o}}var um="c4",i_=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),s_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-c4Diagram-7LVT6UL2.js");return{diagram:t}},__vite__mapDeps([8,9,1,2]),import.meta.url);return{id:um,diagram:e}},"loader"),a_={id:um,detector:i_,loader:s_},o_=a_,dm="flowchart",n_=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),l_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:dm,diagram:e}},"loader"),h_={id:dm,detector:n_,loader:l_},c_=h_,pm="flowchart-v2",u_=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),d_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:pm,diagram:e}},"loader"),p_={id:pm,detector:u_,loader:d_},f_=p_,fm="swimlane",g_=f(e=>/^\s*swimlane-beta\b/.test(e),"detector"),m_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-swimlanesDiagram-VR7AAH4N.js");return{diagram:t}},__vite__mapDeps([15,10,11,12,1,2,13,9,14]),import.meta.url);return{id:fm,diagram:e}},"loader"),y_={id:fm,detector:g_,loader:m_},C_=y_,gm="er",x_=f(e=>/^\s*erDiagram/.test(e),"detector"),b_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-erDiagram-RLTQ6QDP.js");return{diagram:t}},__vite__mapDeps([16,12,1,2,13,14]),import.meta.url);return{id:gm,diagram:e}},"loader"),k_={id:gm,detector:x_,loader:b_},T_=k_,mm="gitGraph",S_=f(e=>/^\s*gitGraph/.test(e),"detector"),w_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-gitGraphDiagram-WWUBYQGX.js");return{diagram:t}},__vite__mapDeps([17,18,19,20,1,2]),import.meta.url);return{id:mm,diagram:e}},"loader"),__={id:mm,detector:S_,loader:w_},B_=__,ym="gantt",v_=f(e=>/^\s*gantt/.test(e),"detector"),L_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ganttDiagram-EL5Y4UJY.js");return{diagram:t}},__vite__mapDeps([21,1,2,22,23]),import.meta.url);return{id:ym,diagram:e}},"loader"),F_={id:ym,detector:v_,loader:L_},E_=F_,Cm="info",A_=f(e=>/^\s*info/.test(e),"detector"),M_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-infoDiagram-27XIBGKW.js");return{diagram:t}},__vite__mapDeps([24,20,1,2]),import.meta.url);return{id:Cm,diagram:e}},"loader"),O_={id:Cm,detector:A_,loader:M_},xm="pie",$_=f(e=>/^\s*pie/.test(e),"detector"),D_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-pieDiagram-E7YTZNPT.js");return{diagram:t}},__vite__mapDeps([25,19,20,1,2]),import.meta.url);return{id:xm,diagram:e}},"loader"),P_={id:xm,detector:$_,loader:D_},bm="quadrantChart",I_=f(e=>/^\s*quadrantChart/.test(e),"detector"),R_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-quadrantDiagram-AXDQQJYC.js");return{diagram:t}},__vite__mapDeps([26,1,2,22,23]),import.meta.url);return{id:bm,diagram:e}},"loader"),q_={id:bm,detector:I_,loader:R_},N_=q_,km="xychart",z_=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),W_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-xychartDiagram-S5SC5T6Z.js");return{diagram:t}},__vite__mapDeps([27,1,2,22,23]),import.meta.url);return{id:km,diagram:e}},"loader"),H_={id:km,detector:z_,loader:W_},j_=H_,Tm="requirement",Y_=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),U_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-requirementDiagram-BXWQKSXE.js");return{diagram:t}},__vite__mapDeps([28,12,1,2,13]),import.meta.url);return{id:Tm,diagram:e}},"loader"),G_={id:Tm,detector:Y_,loader:U_},X_=G_,Sm="sequence",V_=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),Z_=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-sequenceDiagram-WJ2MYXX4.js");return{diagram:t}},__vite__mapDeps([29,18,9,1,2]),import.meta.url);return{id:Sm,diagram:e}},"loader"),K_={id:Sm,detector:V_,loader:Z_},Q_=K_,wm="class",J_=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),tB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-classDiagram-ZZMXUADV.js");return{diagram:t}},__vite__mapDeps([30,31,11,12,1,2,13,9]),import.meta.url);return{id:wm,diagram:e}},"loader"),eB={id:wm,detector:J_,loader:tB},rB=eB,_m="classDiagram",iB=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),sB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-classDiagram-v2-VYDZK3BY.js");return{diagram:t}},__vite__mapDeps([32,31,11,12,1,2,13,9]),import.meta.url);return{id:_m,diagram:e}},"loader"),aB={id:_m,detector:iB,loader:sB},oB=aB,Bm="state",nB=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),lB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-D77RDMKH.js");return{diagram:t}},__vite__mapDeps([33,34,12,1,2,13,9,4]),import.meta.url);return{id:Bm,diagram:e}},"loader"),hB={id:Bm,detector:nB,loader:lB},cB=hB,vm="stateDiagram",uB=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),dB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-v2-MP3YSRHH.js");return{diagram:t}},__vite__mapDeps([35,34,12,1,2,13,9]),import.meta.url);return{id:vm,diagram:e}},"loader"),pB={id:vm,detector:uB,loader:dB},fB=pB,Lm="journey",gB=f(e=>/^\s*journey/.test(e),"detector"),mB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-journeyDiagram-3NMN7TZE.js");return{diagram:t}},__vite__mapDeps([36,11,9,1,2]),import.meta.url);return{id:Lm,diagram:e}},"loader"),yB={id:Lm,detector:gB,loader:mB},CB=yB,xB=f((e,t,r)=>{W.debug(`rendering svg for syntax error
|
|
302
|
-
`);const i=N0(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Dd(i,100,512,!0),s.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),s.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),s.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),s.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),s.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),s.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),s.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Fm={draw:xB},bB=Fm,kB={db:{},renderer:Fm,parser:{parse:f(()=>{},"parse")}},TB=kB,Em="flowchart-elk",SB=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),wB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-HODETNUW.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([10,11,12,1,2,13,9,14]),import.meta.url);return{id:Em,diagram:e}},"loader"),_B={id:Em,detector:SB,loader:wB},BB=_B,Am="timeline",vB=f(e=>/^\s*timeline/.test(e),"detector"),LB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-timeline-definition-24CTP7MA.js");return{diagram:t}},__vite__mapDeps([37,1,2]),import.meta.url);return{id:Am,diagram:e}},"loader"),FB={id:Am,detector:vB,loader:LB},EB=FB,Mm="mindmap",AB=f(e=>/^\s*mindmap/.test(e),"detector"),MB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-mindmap-definition-YA3MSWOX.js");return{diagram:t}},__vite__mapDeps([38,12,1,2,13]),import.meta.url);return{id:Mm,diagram:e}},"loader"),OB={id:Mm,detector:AB,loader:MB},$B=OB,Om="kanban",DB=f(e=>/^\s*kanban/.test(e),"detector"),PB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-kanban-definition-UXKFOSKX.js");return{diagram:t}},__vite__mapDeps([39,11,1,2]),import.meta.url);return{id:Om,diagram:e}},"loader"),IB={id:Om,detector:DB,loader:PB},RB=IB,$m="sankey",qB=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),NB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-sankeyDiagram-P5KCCOFB.js");return{diagram:t}},__vite__mapDeps([40,1,2]),import.meta.url);return{id:$m,diagram:e}},"loader"),zB={id:$m,detector:qB,loader:NB},WB=zB,Dm="packet",HB=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),jB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-Z3DM3KII.js");return{diagram:t}},__vite__mapDeps([41,19,20,1,2]),import.meta.url);return{id:Dm,diagram:e}},"loader"),YB={id:Dm,detector:HB,loader:jB},Pm="radar",UB=f(e=>/^\s*radar-beta/.test(e),"detector"),GB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-UQ7AKVKN.js");return{diagram:t}},__vite__mapDeps([42,19,20,1,2]),import.meta.url);return{id:Pm,diagram:e}},"loader"),XB={id:Pm,detector:UB,loader:GB},Im="block",VB=f(e=>/^\s*block(-beta)?/.test(e),"detector"),ZB=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-blockDiagram-I7D4REHJ.js");return{diagram:t}},__vite__mapDeps([43,11,1,2,14]),import.meta.url);return{id:Im,diagram:e}},"loader"),KB={id:Im,detector:VB,loader:ZB},QB=KB,Rm="treeView",JB=f(e=>/^\s*treeView-beta/.test(e),"detector"),tv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-S7CK7UJ4.js");return{diagram:t}},__vite__mapDeps([44,18,19,20,1,2]),import.meta.url);return{id:Rm,diagram:e}},"loader"),ev={id:Rm,detector:JB,loader:tv},rv=ev,qm="architecture",iv=f(e=>/^\s*architecture/.test(e),"detector"),sv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-architectureDiagram-5GKGNRK7.js");return{diagram:t}},__vite__mapDeps([45,19,20,1,2,7]),import.meta.url);return{id:qm,diagram:e}},"loader"),av={id:qm,detector:iv,loader:sv},ov=av,Nm="eventmodeling",nv=f(e=>/^\s*eventmodeling/.test(e),"detector"),lv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-VSXAHHWV.js");return{diagram:t}},__vite__mapDeps([46,19,20,1,2]),import.meta.url);return{id:Nm,diagram:e}},"loader"),hv={id:Nm,detector:nv,loader:lv},cv=hv,zm="ishikawa",uv=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),dv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ishikawaDiagram-5VMMS53U.js");return{diagram:t}},__vite__mapDeps([47,1,2]),import.meta.url);return{id:zm,diagram:e}},"loader"),pv={id:zm,detector:uv,loader:dv},Wm="venn",fv=f(e=>/^\s*venn-beta/.test(e),"detector"),gv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-vennDiagram-4TSXK5OY.js");return{diagram:t}},__vite__mapDeps([48,1,2]),import.meta.url);return{id:Wm,diagram:e}},"loader"),mv={id:Wm,detector:fv,loader:gv},yv=mv,Hm="treemap",Cv=f(e=>/^\s*treemap/.test(e),"detector"),xv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-diagram-VX7I27RA.js");return{diagram:t}},__vite__mapDeps([49,19,13,20,1,2,23]),import.meta.url);return{id:Hm,diagram:e}},"loader"),bv={id:Hm,detector:Cv,loader:xv},jm="wardley",kv=f(e=>/^\s*wardley-beta/i.test(e),"detector"),Tv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-wardleyDiagram-VM6X3IG4.js");return{diagram:t}},__vite__mapDeps([50,19,20,1,2]),import.meta.url);return{id:jm,diagram:e}},"loader"),Sv={id:jm,detector:kv,loader:Tv},wv=Sv,Ym="cynefin",_v=f(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),Bv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-cynefinDiagram-5FMLGOSQ.js");return{diagram:t}},__vite__mapDeps([51,19,20,1,2]),import.meta.url);return{id:Ym,diagram:e}},"loader"),vv={id:Ym,detector:_v,loader:Bv},Um="railroad",Lv=f(e=>/^\s*railroad-beta/i.test(e),"detector"),Fv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-railroadDiagram-O6MQD6OU.js");return{diagram:t}},__vite__mapDeps([52,53,19,1,2,20]),import.meta.url);return{id:Um,diagram:e}},"loader"),Ev={id:Um,detector:Lv,loader:Fv},Gm="railroadEbnf",Av=f(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),Mv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-ebnfDiagram-PWID7BFC.js");return{diagram:t}},__vite__mapDeps([54,53,19,1,2,20]),import.meta.url);return{id:Gm,diagram:e}},"loader"),Ov={id:Gm,detector:Av,loader:Mv},Xm="railroadAbnf",$v=f(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),Dv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-abnfDiagram-VCTEODGH.js");return{diagram:t}},__vite__mapDeps([55,53,19,1,2,20]),import.meta.url);return{id:Xm,diagram:e}},"loader"),Pv={id:Xm,detector:$v,loader:Dv},Vm="railroadPeg",Iv=f(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Rv=f(async()=>{const{diagram:e}=await It(async()=>{const{diagram:t}=await import("./explorer-pegDiagram-XKGWAZYB.js");return{diagram:t}},__vite__mapDeps([56,53,19,1,2,20]),import.meta.url);return{id:Vm,diagram:e}},"loader"),qv={id:Vm,detector:Iv,loader:Rv},Wu=!1,Ka=f(()=>{Wu||(Wu=!0,ma("error",TB,e=>e.toLowerCase().trim()==="error"),ma("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),on(BB,$B,ov),on(o_,RB,oB,rB,T_,E_,O_,P_,X_,Q_,C_,f_,c_,EB,B_,fB,cB,CB,N_,WB,YB,j_,QB,cv,rv,XB,pv,bv,Ev,Ov,Pv,qv,yv,wv,vv))},"addDiagrams"),Nv=f(async()=>{W.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Gr).map(async([r,{detector:i,loader:s}])=>{if(s)try{cn(r)}catch{try{const{diagram:a,id:o}=await s();ma(o,a,i)}catch(a){throw W.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Gr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){W.error(`Failed to load ${t.length} external diagrams`);for(const r of t)W.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),zv="graphics-document document";function Zm(e,t){e.attr("role",zv),t!==""&&e.attr("aria-roledescription",t)}f(Zm,"setA11yDiagramInfo");function Km(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(Km,"addSVGa11yTitleDescription");var Yr,Dn=(Yr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var c,h;const i=te(),s=Hn(t,i);t=lb(t)+`
|
|
303
|
-
`;try{cn(s)}catch{const u=c0(s);if(!u)throw new Fd(`Diagram ${s} not found.`);const{id:p,diagram:d}=await u();ma(p,d)}const{db:a,parser:o,renderer:n,init:l}=cn(s);return o.parser&&(o.parser.yy=a),(c=a.clear)==null||c.call(a),l==null||l(i),r.title&&((h=a.setDiagramTitle)==null||h.call(a,r.title)),await o.parse(t),new Yr(s,t,a,o,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(Yr,"Diagram"),Yr),Hu=[],Wv=f(()=>{Hu.forEach(e=>{e()}),Hu=[]},"attachFunctions"),Hv=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Qm(e){const t=e.match(Ld);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
304
|
-
`).map(o=>o.startsWith(r)?o.slice(r.length):o).join(`
|
|
305
|
-
`):t[2];let s=Pw(i,{schema:Dw})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t[0].length),metadata:a}}f(Qm,"extractFrontMatter");var jv=f(e=>e.replace(/\r\n?/g,`
|
|
306
|
-
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),Yv=f(e=>{const{text:t,metadata:r}=Qm(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),Uv=f(e=>{const t=xe.detectInit(e)??{},r=xe.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:Vx(e),directive:t}},"processDirectives");function eh(e){const t=jv(e),r=Yv(t),i=Uv(r.text),s=sl(r.config,i.directive);return e=Hv(i.text),{code:e,title:r.title,config:s}}f(eh,"preprocessDiagram");function Jm(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(Jm,"toBase64");var Gv=5e4,Xv="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",Vv="sandbox",Zv="loose",Kv="http://www.w3.org/2000/svg",Qv="http://www.w3.org/1999/xlink",Jv="http://www.w3.org/1999/xhtml",tL="100%",eL="100%",rL="border:0;margin:0;",iL="margin:0",sL="allow-top-navigation-by-user-activation allow-popups",aL='The "iframe" tag is not supported by your browser.',oL=["foreignobject"],nL=["dominant-baseline"];function rh(e){const t=eh(e);return fa(),o0(t.config??{}),t}f(rh,"processAndSetConfigs");async function ty(e,t){Ka();try{const{code:r,config:i}=rh(e);return{diagramType:(await ry(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(ty,"parse");var ju=f((e,t,r=[])=>{const i=Sd(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),lL=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=be(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{Jh(l.styles)||n.forEach(c=>{r.insertRule(ju(l.id,c,l.styles),r.cssRules.length)}),Jh(l.textStyles)||r.insertRule(ju(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=hn(s)+`
|
|
303
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),Xk=p((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),Vk=p((e,t,r)=>{const i=Qt(),{themeVariables:s}=i,{strokeWidth:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");n.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),n.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),n.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),n.selectAll("*").attr("stroke-width",`${a}`)},"requirement_contains_neo"),Zk=p((e,t,r)=>{e.append("marker").attr("id",r+"_"+t+"-hierarchyEnd").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 0 0 L 6 5 L 0 10 M 4 0 L 10 5 L 4 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none"),e.append("marker").attr("id",r+"_"+t+"-hierarchyStart").attr("class","marker hierarchy "+t).attr("viewBox","0 0 12 10").attr("refX",2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",10).attr("orient","auto").append("path").attr("d","M 12 0 L 6 5 L 12 10 M 8 0 L 2 5 L 8 10").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0").style("fill","none")},"hierarchy"),Kk={extension:Lk,composition:Fk,aggregation:Ak,dependency:Ek,lollipop:Mk,point:Ok,circle:$k,cross:Dk,barb:Ik,barbNeo:Pk,hierarchy:Zk,only_one:Rk,zero_or_one:qk,one_or_more:Nk,zero_or_more:Wk,only_one_neo:zk,zero_or_one_neo:Hk,one_or_more_neo:Yk,zero_or_more_neo:Uk,requirement_arrow:jk,requirement_contains:Xk,requirement_arrow_neo:Gk,requirement_contains_neo:Vk},Qk=vk,Jk={common:us,getConfig:Qt,insertCluster:uk,insertEdge:_k,insertEdgeLabel:Ck,insertMarkers:Qk,insertNode:vp,interpolateToCurve:Zn,labelHelper:vt,log:J,positionEdgeLabel:bk},t1=["elk.stress","elk.force","elk.mrtree","elk.sporeOverlap","elk.box","elk.rectpacking"],hs=Object.create(null),Op=p(e=>{for(const t of e)hs[t.name]=t},"registerLayoutLoaders"),e1=p(()=>{const e=p(async()=>await Wt(()=>import("./explorer-elk-QONTBCTQ.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url),"loader");return[{name:"elk",loader:e,algorithm:"elk.layered"},...t1.map(t=>({name:t,loader:e,algorithm:t}))]},"elkLayoutLoaders"),r1=p(()=>{Op([{name:"dagre",loader:p(async()=>await Wt(()=>import("./explorer-dagre-NK4GIZVX.js"),__vite__mapDeps([6,2,3,4,5]),import.meta.url),"loader")},{name:"swimlane",loader:p(async()=>await Wt(()=>import("./explorer-swimlanes-B3ENRKFQ.js"),__vite__mapDeps([7,1,2,3,4,5]),import.meta.url),"loader")},{name:"cose-bilkent",loader:p(async()=>await Wt(()=>import("./explorer-cose-bilkent-JH36ORCC.js"),__vite__mapDeps([8,9,3,4]),import.meta.url),"loader")},...e1()])},"registerDefaultLayoutLoaders");r1();var ww=p(async(e,t)=>{if(!Object.hasOwn(hs,e.layoutAlgorithm))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const s of e.nodes){const a=s.domId||s.id;s.domId=`${e.diagramId}-${a}`}const r=hs[e.layoutAlgorithm],i=await r.loader();return AC(t,e.config),i.render(e,t,Jk,{algorithm:r.algorithm})},"render"),$o="dagre",Bw=p((e="",{fallback:t=$o}={})=>{if(Object.hasOwn(hs,e))return e;for(const r of[t,$o])if(Object.hasOwn(hs,r))return J.warn(`Layout algorithm ${e} is not registered. Using ${r} as fallback.`),r;throw new Error(`Neither layout algorithm ${e}, ${t}, nor ${$o} is registered.`)},"getRegisteredLayoutAlgorithm"),kl="comm",$p="rule",Dp="decl",i1="@media",s1="@import",a1="@supports",o1="@namespace",un="@keyframes",Ip="@layer",n1="@scope",l1=Math.abs,ns=String.fromCharCode;function Pp(e){return e.trim()}function gn(e,t,r){return e.replace(t,r)}function hi(e,t){return e.charCodeAt(t)|0}function _i(e,t,r){return e.slice(t,r)}function Je(e){return e.length}function Rp(e){return e.length}function Ms(e,t){return t.push(e),e}var Ba=1,vi=1,qp=0,Ne=0,ae=0,Oi="";function Sl(e,t,r,i,s,a,n,o){return{value:e,root:t,parent:r,type:i,props:s,children:a,line:Ba,column:vi,length:n,return:"",siblings:o}}function h1(){return ae}function c1(){return ae=Ne>0?hi(Oi,--Ne):0,vi--,ae===10&&(vi=1,Ba--),ae}function je(){return ae=Ne<qp?hi(Oi,Ne++):0,vi++,ae===10&&(vi=1,Ba++),ae}function Lr(){return hi(Oi,Ne)}function Hs(){return Ne}function _a(e,t){return _i(Oi,e,t)}function cs(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function d1(e){return Ba=vi=1,qp=Je(Oi=e),Ne=0,[]}function u1(e){return Oi="",e}function Do(e){return Pp(_a(Ne-1,pn(e===91?e+2:e===40?e+1:e)))}function g1(e){for(;(ae=Lr())&&ae<33;)je();return cs(e)>2||cs(ae)>3?"":" "}function p1(e,t){for(;--t&&je()&&!(ae<48||ae>102||ae>57&&ae<65||ae>70&&ae<97););return _a(e,Hs()+(t<6&&Lr()==32&&je()==32))}function pn(e){for(;je();)switch(ae){case e:return Ne;case 34:case 39:e!==34&&e!==39&&pn(ae);break;case 40:e===41&&pn(e);break;case 92:je();break}return Ne}function f1(e,t){for(;je()&&e+ae!==57;)if(e+ae===84&&Lr()===47)break;return"/*"+_a(t,Ne-1)+"*"+ns(e===47?e:je())}function m1(e){for(;!cs(Lr());)je();return _a(e,Ne)}function y1(e){return u1(Ys("",null,null,null,[""],e=d1(e),0,[0],e))}function Ys(e,t,r,i,s,a,n,o,c){for(var h=0,l=0,d=n,u=0,g=0,m=0,y=1,x=1,C=1,b=0,k=0,w="",_=s,L=a,A=i,F=w;x;)switch(m=k,k=je()){case 40:m!=108&&hi(F,d-1)==58?(b++,F+="("):F+=Do(k);break;case 41:b--,F+=")";break;case 34:case 39:case 91:F+=Do(k);break;case 9:case 10:case 13:case 32:if(b>0){F+=ns(k);break}F+=g1(m);break;case 92:F+=p1(Hs()-1,7);continue;case 47:switch(Lr()){case 42:case 47:Ms(C1(f1(je(),Hs()),t,r,c),c),(cs(m||1)==5||cs(Lr()||1)==5)&&Je(F)&&_i(F,-1,void 0)!==" "&&(F+=" ");break;default:F+="/"}break;case 123*y:o[h++]=Je(F)*C;case 125*y:case 59:case 0:if(b>0&&k){F+=ns(k);break}switch(k){case 0:case 125:x=0;case 59+l:C==-1&&(F=gn(F,/\f/g,"")),g>0&&(Je(F)-d||y===0)&&Ms(g>32?zc(F+";",i,r,d-1,c):zc(gn(F," ","")+";",i,r,d-2,c),c);break;case 59:F+=";";default:if(Ms(A=Wc(F,t,r,h,l,s,o,w,_=[],L=[],d,a),a),k===123)if(l===0)Ys(F,t,A,A,_,a,d,o,L);else{switch(u){case 99:if(hi(F,3)===110)break;case 108:if(hi(F,2)===97)break;default:l=0;case 100:case 109:case 115:}l?Ys(e,A,A,i&&Ms(Wc(e,A,A,0,0,s,o,w,s,_=[],d,L),L),s,L,d,o,i?_:L):Ys(F,A,A,A,[""],L,0,o,L)}}h=l=g=0,y=C=1,w=F="",d=n;break;case 58:d=1+Je(F),g=m;default:if(y<1){if(k==123)--y;else if(k==125&&y++==0&&c1()==125)continue}switch(F+=ns(k),k*y){case 38:C=l>0?1:(F+="\f",-1);break;case 44:if(b>0)break;o[h++]=(Je(F)-1)*C,C=1;break;case 64:Lr()===45&&(F+=Do(je())),u=Lr(),l=d=Je(w=F+=m1(Hs())),k++;break;case 45:m===45&&Je(F)==2&&(y=0)}}return a}function Wc(e,t,r,i,s,a,n,o,c,h,l,d){for(var u=s-1,g=s===0?a:[""],m=Rp(g),y=0,x=0,C=0;y<i;++y)for(var b=0,k=_i(e,u+1,u=l1(x=n[y])),w=e;b<m;++b)(w=Pp(x>0?g[b]+" "+k:gn(k,/&\f/g,g[b])))&&(c[C++]=w);return Sl(e,t,r,s===0?$p:o,c,h,l,d)}function C1(e,t,r,i){return Sl(e,t,r,kl,ns(h1()),_i(e,2,-2),0,i)}function zc(e,t,r,i,s){return Sl(e,t,r,Dp,_i(e,0,i),_i(e,i+1,-1),i,s)}function fn(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function x1(e,t,r,i){switch(e.type){case Ip:if(e.children.length)break;case s1:case o1:case Dp:return e.return=e.return||e.value;case kl:return"";case un:return e.return=e.value+"{"+fn(e.children,i)+"}";case $p:if(!Je(e.value=e.props.join(",")))return""}return Je(r=fn(e.children,i))?e.return=e.value+"{"+r+"}":""}function b1(e){var t=Rp(e);return function(r,i,s,a){for(var n="",o=0;o<t;o++)n+=e[o](r,i,s,a)||"";return n}}var Np="c4",k1=p(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),S1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-c4Diagram-XDPPPE54.js");return{diagram:t}},__vite__mapDeps([10,11,3,4]),import.meta.url);return{id:Np,diagram:e}},"loader"),T1={id:Np,detector:k1,loader:S1},w1=T1,Wp="flowchart-v2",B1=p(e=>/^\s*(graph|flowchart)/.test(e),"detector"),_1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-IUGLLWBU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,3,4,15,11,16]),import.meta.url);return{id:Wp,diagram:e}},"loader"),v1={id:Wp,detector:B1,loader:_1},L1=v1,zp="agentflow",F1=p(e=>/^\s*agentflow-beta\b/.test(e),"detector"),A1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-TYUNFSNR.js");return{diagram:t}},__vite__mapDeps([17,13,14,3,4,15,11,16]),import.meta.url);return{id:zp,diagram:e}},"loader"),E1={id:zp,detector:F1,loader:A1},M1=E1,Hp="swimlane",O1=p(e=>/^\s*swimlane-beta\b/.test(e),"detector"),$1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-swimlanesDiagram-AYQRV4AK.js");return{diagram:t}},__vite__mapDeps([18,12,13,14,3,4,15,11,16]),import.meta.url);return{id:Hp,diagram:e}},"loader"),D1={id:Hp,detector:O1,loader:$1},I1=D1,Yp="er",P1=p(e=>/^\s*erDiagram/.test(e),"detector"),R1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-erDiagram-KYQIGQAA.js");return{diagram:t}},__vite__mapDeps([19,14,3,4,15,16]),import.meta.url);return{id:Yp,diagram:e}},"loader"),q1={id:Yp,detector:P1,loader:R1},N1=q1,Up="gitGraph",W1=p(e=>/^\s*gitGraph/.test(e),"detector"),z1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-gitGraphDiagram-PDYL7XHY.js");return{diagram:t}},__vite__mapDeps([20,21,22,23,3,4]),import.meta.url);return{id:Up,diagram:e}},"loader"),H1={id:Up,detector:W1,loader:z1},Y1=H1,jp="gantt",U1=p(e=>/^\s*gantt/.test(e),"detector"),j1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-ganttDiagram-R7GPNTJY.js");return{diagram:t}},__vite__mapDeps([24,3,4,25,26]),import.meta.url);return{id:jp,diagram:e}},"loader"),G1={id:jp,detector:U1,loader:j1},X1=G1,Gp="info",V1=p(e=>/^\s*info/.test(e),"detector"),Z1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-infoDiagram-MVDRKAX5.js");return{diagram:t}},__vite__mapDeps([27,23,3,4]),import.meta.url);return{id:Gp,diagram:e}},"loader"),K1={id:Gp,detector:V1,loader:Z1},Xp="pie",Q1=p(e=>/^\s*pie/.test(e),"detector"),J1=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-pieDiagram-GNMPY74T.js");return{diagram:t}},__vite__mapDeps([28,22,23,3,4]),import.meta.url);return{id:Xp,diagram:e}},"loader"),t2={id:Xp,detector:Q1,loader:J1},Vp="quadrantChart",e2=p(e=>/^\s*quadrantChart/.test(e),"detector"),r2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-quadrantDiagram-D57K4MC3.js");return{diagram:t}},__vite__mapDeps([29,3,4,25,26]),import.meta.url);return{id:Vp,diagram:e}},"loader"),i2={id:Vp,detector:e2,loader:r2},s2=i2,Zp="xychart",a2=p(e=>/^\s*xychart(-beta)?/.test(e),"detector"),o2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-xychartDiagram-4URNHDU4.js");return{diagram:t}},__vite__mapDeps([30,3,4,25,26]),import.meta.url);return{id:Zp,diagram:e}},"loader"),n2={id:Zp,detector:a2,loader:o2},l2=n2,Kp="requirement",h2=p(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),c2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-requirementDiagram-EQYSW5RA.js");return{diagram:t}},__vite__mapDeps([31,14,3,4,15]),import.meta.url);return{id:Kp,diagram:e}},"loader"),d2={id:Kp,detector:h2,loader:c2},u2=d2,Qp="sequence",g2=p(e=>/^\s*sequenceDiagram/.test(e),"detector"),p2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-sequenceDiagram-BLEHNHQU.js");return{diagram:t}},__vite__mapDeps([32,21,11,3,4]),import.meta.url);return{id:Qp,diagram:e}},"loader"),f2={id:Qp,detector:g2,loader:p2},m2=f2,Jp="classDiagram",y2=p(e=>/^\s*classDiagram/.test(e),"detector"),C2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-classDiagram-v2-4MYWR3UA.js");return{diagram:t}},__vite__mapDeps([33,13,14,3,4,15,11]),import.meta.url);return{id:Jp,diagram:e}},"loader"),x2={id:Jp,detector:y2,loader:C2},b2=x2,tf="stateDiagram",k2=p(e=>/^\s*stateDiagram/.test(e),"detector"),S2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-stateDiagram-v2-A6IESKWZ.js");return{diagram:t}},__vite__mapDeps([34,14,3,4,15,11]),import.meta.url);return{id:tf,diagram:e}},"loader"),T2={id:tf,detector:k2,loader:S2},w2=T2,ef="journey",B2=p(e=>/^\s*journey/.test(e),"detector"),_2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-journeyDiagram-BOSHW7O7.js");return{diagram:t}},__vite__mapDeps([35,13,11,3,4]),import.meta.url);return{id:ef,diagram:e}},"loader"),v2={id:ef,detector:B2,loader:_2},L2=v2,Os=4,Xi=75,F2=p(e=>{const t=[];for(const s of e.split(/\s+/)){let a=[...s];for(;a.length>Xi;)t.push(a.slice(0,Xi).join("")),a=a.slice(Xi);a.length>0&&t.push(a.join(""))}const r=[];let i="";for(const s of t){const a=i?`${i} ${s}`:s;[...a].length>Xi?(r.push(i),i=s):i=a}if(i&&r.push(i),r.length>Os){r.length=Os;const s=r[Os-1]??"";r[Os-1]=`${[...s].slice(0,Xi-3).join("")}...`}return r},"wrapErrorMessage"),A2=p((e,t,r,i)=>{var c,h;J.debug(`rendering svg for syntax error
|
|
304
|
+
`);const s=BC(t),a=s.append("g"),n=F2(((h=i==null?void 0:(c=i.db).getErrorMessage)==null?void 0:h.call(c))??""),o=n.length>0?500+n.length*56:512;s.attr("viewBox",`0 0 2412 ${o}`),Nd(s,100,o,!0),a.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),a.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),a.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),a.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),a.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),a.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),a.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),a.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`),n.forEach((l,d)=>{a.append("text").attr("class","error-text").attr("x",1440).attr("y",510+d*56).attr("font-size","42px").style("text-anchor","middle").text(l)})},"draw"),rf={draw:A2},E2=rf,Io,M2={clear(){Io=void 0},setErrorMessage(e){Io=e},getErrorMessage(){return Io}},O2={db:M2,renderer:rf,parser:{parse:p(()=>{},"parse")}},$2=O2,sf="flowchart-elk",D2=p((e,t={})=>/^\s*flowchart-elk/.test(e)?(t.layout="elk",!0):!1,"detector"),I2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-flowDiagram-IUGLLWBU.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([12,13,14,3,4,15,11,16]),import.meta.url);return{id:sf,diagram:e}},"loader"),P2={id:sf,detector:D2,loader:I2},R2=P2,af="timeline",q2=p(e=>/^\s*timeline/.test(e),"detector"),N2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-timeline-definition-JXYKGLGB.js");return{diagram:t}},__vite__mapDeps([36,3,4]),import.meta.url);return{id:af,diagram:e}},"loader"),W2={id:af,detector:q2,loader:N2},z2=W2,of="mindmap",H2=p(e=>/^\s*mindmap/.test(e),"detector"),Y2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-mindmap-definition-6OY57UG3.js");return{diagram:t}},__vite__mapDeps([37,14,3,4,15]),import.meta.url);return{id:of,diagram:e}},"loader"),U2={id:of,detector:H2,loader:Y2},j2=U2,nf="kanban",G2=p(e=>/^\s*kanban/.test(e),"detector"),X2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-kanban-definition-FNSA4HC5.js");return{diagram:t}},__vite__mapDeps([38,13,3,4]),import.meta.url);return{id:nf,diagram:e}},"loader"),V2={id:nf,detector:G2,loader:X2},Z2=V2,lf="sankey",K2=p(e=>/^\s*sankey(-beta)?/.test(e),"detector"),Q2=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-sankeyDiagram-SY24JHO5.js");return{diagram:t}},__vite__mapDeps([39,3,4]),import.meta.url);return{id:lf,diagram:e}},"loader"),J2={id:lf,detector:K2,loader:Q2},tS=J2,hf="packet",eS=p(e=>/^\s*packet(-beta)?/.test(e),"detector"),rS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-I5XIIV2D.js");return{diagram:t}},__vite__mapDeps([40,22,23,3,4]),import.meta.url);return{id:hf,diagram:e}},"loader"),iS={id:hf,detector:eS,loader:rS},cf="radar",sS=p(e=>/^\s*radar-beta/.test(e),"detector"),aS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-RJA3I4VV.js");return{diagram:t}},__vite__mapDeps([41,22,23,3,4]),import.meta.url);return{id:cf,diagram:e}},"loader"),oS={id:cf,detector:sS,loader:aS},df="block",nS=p(e=>/^\s*block(-beta)?/.test(e),"detector"),lS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-blockDiagram-RJAE7QA3.js");return{diagram:t}},__vite__mapDeps([42,13,3,4,5,16]),import.meta.url);return{id:df,diagram:e}},"loader"),hS={id:df,detector:nS,loader:lS},cS=hS,uf="treeView",dS=p(e=>/^\s*treeView-beta/.test(e),"detector"),uS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-ODIL2UCW.js");return{diagram:t}},__vite__mapDeps([43,21,22,23,3,4]),import.meta.url);return{id:uf,diagram:e}},"loader"),gS={id:uf,detector:dS,loader:uS},pS=gS,gf="architecture",fS=p(e=>/^\s*architecture/.test(e),"detector"),mS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-architectureDiagram-ZHVYKT53.js");return{diagram:t}},__vite__mapDeps([44,22,23,3,4,9]),import.meta.url);return{id:gf,diagram:e}},"loader"),yS={id:gf,detector:fS,loader:mS},CS=yS,pf="eventmodeling",xS=p(e=>/^\s*eventmodeling/.test(e),"detector"),bS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-PFBEJUXE.js");return{diagram:t}},__vite__mapDeps([45,22,23,3,4]),import.meta.url);return{id:pf,diagram:e}},"loader"),kS={id:pf,detector:xS,loader:bS},SS=kS,ff="ishikawa",TS=p(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),wS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-ishikawaDiagram-HPEHV2GE.js");return{diagram:t}},__vite__mapDeps([46,3,4]),import.meta.url);return{id:ff,diagram:e}},"loader"),BS={id:ff,detector:TS,loader:wS},mf="venn",_S=p(e=>/^\s*venn-beta/.test(e),"detector"),vS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-vennDiagram-Q3Y3IDCW.js");return{diagram:t}},__vite__mapDeps([47,3,4]),import.meta.url);return{id:mf,diagram:e}},"loader"),LS={id:mf,detector:_S,loader:vS},FS=LS,yf="treemap",AS=p(e=>/^\s*treemap/.test(e),"detector"),ES=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-diagram-CBK3MWTC.js");return{diagram:t}},__vite__mapDeps([48,22,15,23,3,4,26]),import.meta.url);return{id:yf,diagram:e}},"loader"),MS={id:yf,detector:AS,loader:ES},Cf="usecase",OS=p(e=>/^\s*usecase-beta(?:\s|$)/.test(e),"detector"),$S=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-usecaseDiagram-WPOLBNNX.js");return{diagram:t}},__vite__mapDeps([49,14,3,4,15]),import.meta.url);return{id:Cf,diagram:e}},"loader"),DS={id:Cf,detector:OS,loader:$S},xf="wardley",IS=p(e=>/^\s*wardley-beta/i.test(e),"detector"),PS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-wardleyDiagram-IVAIDKWA.js");return{diagram:t}},__vite__mapDeps([50,22,23,3,4]),import.meta.url);return{id:xf,diagram:e}},"loader"),RS={id:xf,detector:IS,loader:PS},qS=RS,bf="cynefin",NS=p(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),WS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-cynefinDiagram-WF24UDRP.js");return{diagram:t}},__vite__mapDeps([51,22,23,3,4]),import.meta.url);return{id:bf,diagram:e}},"loader"),zS={id:bf,detector:NS,loader:WS},kf="railroad",HS=p(e=>/^\s*railroad-beta/i.test(e),"detector"),YS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-railroadDiagram-Y72NRBL7.js");return{diagram:t}},__vite__mapDeps([52,53,22,3,4,23]),import.meta.url);return{id:kf,diagram:e}},"loader"),US={id:kf,detector:HS,loader:YS},Sf="railroadEbnf",jS=p(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),GS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-ebnfDiagram-V4P3TTPT.js");return{diagram:t}},__vite__mapDeps([54,53,22,3,4,23]),import.meta.url);return{id:Sf,diagram:e}},"loader"),XS={id:Sf,detector:jS,loader:GS},Tf="railroadAbnf",VS=p(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),ZS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-abnfDiagram-WEYOIA3C.js");return{diagram:t}},__vite__mapDeps([55,53,22,3,4,23]),import.meta.url);return{id:Tf,diagram:e}},"loader"),KS={id:Tf,detector:VS,loader:ZS},wf="railroadPeg",QS=p(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),JS=p(async()=>{const{diagram:e}=await Wt(async()=>{const{diagram:t}=await import("./explorer-pegDiagram-ECIUJNBX.js");return{diagram:t}},__vite__mapDeps([56,53,22,3,4,23]),import.meta.url);return{id:wf,diagram:e}},"loader"),tT={id:wf,detector:QS,loader:JS},Hc=!1,va=p(()=>{Hc||(Hc=!0,ta("error",$2,e=>e.toLowerCase().trim()==="error"),ta("---",{db:{clear:p(()=>{},"clear")},styles:{},renderer:{draw:p(()=>{},"draw")},parser:{parse:p(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:p(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Wo(R2,j2,CS),Wo(M1,w1,Z2,b2,N1,X1,K1,t2,u2,m2,I1,L1,z2,Y1,w2,L2,s2,tS,iS,l2,cS,SS,pS,oS,BS,MS,US,XS,KS,tT,FS,qS,zS,DS))},"addDiagrams"),eT=p(async()=>{J.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(zr).map(async([r,{detector:i,loader:s}])=>{if(s)try{jo(r)}catch{try{const{diagram:a,id:n}=await s();ta(n,a,i)}catch(a){throw J.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete zr[r],a}}}))).filter(r=>r.status==="rejected");if(t.length>0){J.error(`Failed to load ${t.length} external diagrams`);for(const r of t)J.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),rT="graphics-document document";function Bf(e,t){e.attr("role",rT),t!==""&&e.attr("aria-roledescription",t)}p(Bf,"setA11yDiagramInfo");function _f(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}p(_f,"addSVGa11yTitleDescription");var Wr,da=(Wr=class{constructor(t,r,i,s,a){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=a}static async fromText(t,r={}){var u,g,m;const i=typeof t=="string"?{cleaned:t}:t,s=Qt(),a=ma(i.cleaned,s);try{jo(a)}catch{const y=cy(a);if(!y)throw new vd(`Diagram ${a} not found.`);const{id:x,diagram:C}=await y();ta(x,C)}const{db:n,parser:o,renderer:c,init:h}=jo(a);o.parser&&(o.parser.yy=n),(u=n.clear)==null||u.call(n),h==null||h(s),r.title&&((g=n.setDiagramTitle)==null||g.call(n,r.title));let l=i.cleaned;if(n.preserveCommentsWhenParsing&&i.withComments){const y=s.maxTextSize??Sn.maxTextSize;i.withComments.length>y?J.warn(`Comment-preserving source exceeds maxTextSize (${i.withComments.length} > ${y}); parsing the comment-stripped text instead. Reported source positions will not account for comment lines.`):l=i.withComments}const d=K0(l)+`
|
|
305
|
+
`;return i.frontmatterLineOffset&&((m=n.setFrontmatterLineOffset)==null||m.call(n,i.frontmatterLineOffset)),await o.parse(d),new Wr(a,d,n,o,c)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},p(Wr,"Diagram"),Wr),Yc=[],iT=p(()=>{Yc.forEach(e=>{e()}),Yc=[]},"attachFunctions"),sT=p(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function vf(e){const t=_d(e);if(!t)return{text:e,metadata:{}};const r=t.indent,i=r?t.body.split(`
|
|
306
|
+
`).map(n=>n.startsWith(r)?n.slice(r.length):n).join(`
|
|
307
|
+
`):t.body;let s=FC(i,{schema:LC})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const a={};return s.displayMode&&(a.displayMode=s.displayMode.toString()),s.title&&(a.title=s.title.toString()),s.config&&(a.config=s.config),{text:e.slice(t.length),metadata:a}}p(vf,"extractFrontMatter");var aT=p(e=>e.replace(/\r\n?/g,`
|
|
308
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),oT=p(e=>{const{text:t,metadata:r}=vf(e),{displayMode:i,title:s,config:a={}}=r;return i&&(a.gantt||(a.gantt={}),a.gantt.displayMode=i),{title:s,config:a,text:t}},"processFrontmatter"),nT=p(e=>{const t=Re.detectInit(e)??{},r=Re.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:R0(e),directive:t}},"processDirectives");function Tl(e){const t=e,r=aT(e),i=oT(r),s=nT(i.text),a=el(i.config,s.directive),n=s.text,o=sT(n),c=r.length>i.text.length?(r.substring(0,r.length-i.text.length).match(/\n/g)??[]).length:0;return{code:{raw:t,cleaned:o,withComments:n,frontmatterLineOffset:c},title:i.title,config:a}}p(Tl,"preprocessDiagram");function Lf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}p(Lf,"toBase64");var lT=5e4,hT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",cT="sandbox",dT="loose",uT="http://www.w3.org/2000/svg",gT="http://www.w3.org/1999/xlink",pT="http://www.w3.org/1999/xhtml",fT="100%",mT="100%",yT="border:0;margin:0;",CT="margin:0",xT="allow-top-navigation-by-user-activation allow-popups",bT='The "iframe" tag is not supported by your browser.',kT=["foreignobject"],ST=["dominant-baseline"];function wl(e){const t=Tl(e);Qs();let r;try{r=ma(t.code.cleaned,Qt())}catch{r=void 0}return Tn(r),jy(t.config??{}),t}p(wl,"processAndSetConfigs");async function Ff(e,t){va();try{const{code:r,config:i}=wl(e);return{diagramType:(await da.fromText(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}finally{Tn(void 0)}}p(Ff,"parse");var Uc=p((e,t,r=[])=>{const i=Ed(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),TT=p((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const o=de(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(c=>{Xh(c.styles)||o.forEach(h=>{r.insertRule(Uc(c.id,h,c.styles),r.cssRules.length)}),Xh(c.textStyles)||r.insertRule(Uc(c.id,"tspan",((c==null?void 0:c.textStyles)||[]).map(h=>h.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Uo(s)+`
|
|
307
309
|
`}else i+=`${e.themeCSS}
|
|
308
|
-
`;return i+
|
|
309
|
-
${
|
|
310
|
-
</iframe>`},"putIntoIFrame"),
|
|
310
|
+
`;return i+Uo(r)},"createCssStyles"),wT=p((e,t)=>fn(y1(`${e}{${t}}`),b1([p(function(i,s,a,n){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===un)return;i.props=i.props.map(o=>o===e&&Array.isArray(i.children)&&i.children.every(h=>h.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(h.props))||(o.startsWith(`${e} `)||o.startsWith(`${e}>`))&&!o.startsWith(`${e} ||`)?o:`${e} ${o}`)}else i.type.startsWith("@")&&([...[i1,a1,Ip,n1,"@container","@starting-style"],un].includes(i.type)||(J.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=kl))},"addNamespace"),x1])),"compileCSS"),BT=p((e,t,r,i)=>{const s=TT(e,r),a=gC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return wT(i,a)},"createUserStyles"),_T=p((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Mr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),vT=p((e="",t)=>{var s,a;const r=(a=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&a.height?t.viewBox.baseVal.height+"px":mT,i=Lf(`<body style="${CT}">${e}</body>`);return`<iframe style="width:${fT};height:${r};${yT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${xT}">
|
|
311
|
+
${bT}
|
|
312
|
+
</iframe>`},"putIntoIFrame"),jc=p((e,t,r,i,s)=>{const a=e.append("div");a.attr("id",r),i&&a.attr("style",i);const n=a.append("svg").attr("id",t).attr("width","100%").attr("xmlns",uT);return s&&n.attr("xmlns:xlink",s),n.append("g"),e},"appendDivSvgG");function mn(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}p(mn,"sandboxedIframe");var LT=p((e,t,r,i)=>{var s,a,n;(s=e.getElementById(t))==null||s.remove(),(a=e.getElementById(r))==null||a.remove(),(n=e.getElementById(i))==null||n.remove()},"removeExistingElements"),FT=p(async function(e,t,r){var E,M,v,R,$,X,Z,lt;va();const i=wl(t);let s=i.code;t=s.cleaned;const a=Qt();J.debug(a),t.length>((a==null?void 0:a.maxTextSize)??lT)&&(t=hT,s={raw:t,cleaned:t});const n=`#${e}`,o="i"+e,c="#"+o,h="d"+e,l="#"+h,d=p(()=>{const ut=Pt(g?c:l).node();ut&&"remove"in ut&&ut.remove()},"removeTempElements");let u=Pt(document.body);const g=a.securityLevel===cT,m=a.securityLevel===dT,y=a.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),g){const ht=mn(Pt(r),o);u=Pt(ht.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Pt(r);jc(u,e,h,`font-family: ${y}`,gT)}else{if(LT(document,e,h,o),g){const ht=mn(Pt(document.body),o);u=Pt(ht.nodes()[0].contentDocument.body),u.node().style.margin="0"}else u=Pt("body");jc(u,e,h)}let x,C;try{x=await da.fromText(s,{title:i.title})}catch(ht){if(a.suppressErrorRendering)throw d(),ht;x=await da.fromText("error"),C=ht,(M=(E=x.db).setErrorMessage)==null||M.call(E,uu(ht))}const b=u.select(l).node(),k=x.type,w=b.firstChild,_=w.firstChild,L=(R=(v=x.renderer).getClasses)==null?void 0:R.call(v,t,x),A=BT(a,k,L,n),F=document.createElement("style");F.innerHTML=A,w.insertBefore(F,_);try{await x.renderer.draw(t,e,"12.2.0",x)}catch(ht){throw a.suppressErrorRendering?d():E2.draw(t,e,"12.2.0"),ht}const z=u.select(`${l} svg`),q=(X=($=x.db).getAccTitle)==null?void 0:X.call($),I=(lt=(Z=x.db).getAccDescription)==null?void 0:lt.call(Z);Ef(k,z,q,I);const W=p(()=>{u.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",pT);let ht=u.select(l).node().innerHTML;if(J.debug("config.arrowMarkerAbsolute",a.arrowMarkerAbsolute),ht=_T(ht,g,sr(a.arrowMarkerAbsolute)),g){const ut=u.select(l+" svg").node();ht=vT(ht,ut)}else m||(ht=Bi.sanitize(ht,{ADD_TAGS:kT,ADD_ATTR:ST,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return iT(),ht},"serializeSvg")();if(C)throw C;return d(),{diagramType:k,svg:W,bindFunctions:x.db.bindFunctions}},"renderDiagram"),AT=p(async function(e,t,r){try{return await FT(e,t,r)}finally{Tn(void 0)}},"render");function Af(e={}){var s;const t=oe({},e);t!=null&&t.fontFamily&&!((s=t.themeVariables)!=null&&s.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Yy(t);const r=Er.theme;t!=null&&t.theme&&Object.hasOwn(fr,t.theme)?t.themeVariables=fr[t.theme].getThemeVariables(t.themeVariables):t&&(t.theme!=null&&t.theme!=="null"&&(t.theme=r),t.themeVariables=fr[r].getThemeVariables(t.themeVariables));const i=typeof t=="object"?Hy(t):Md();kn(i.logLevel),va()}p(Af,"initialize");var ET=p((e,t={})=>{const{code:r}=Tl(e);return da.fromText(r,t)},"getDiagramFromText");function Ef(e,t,r,i){Bf(t,e),_f(t,r,i,t.attr("id"))}p(Ef,"addA11yInfo");var Ur=Object.freeze({render:AT,parse:Ff,getDiagramFromText:ET,initialize:Af,getConfig:Qt,setConfig:Od,getSiteConfig:Md,updateSiteConfig:Uy,reset:p(()=>{Qs()},"reset"),globalReset:p(()=>{Qs(Er)},"globalReset"),defaultConfig:Er});kn(Qt().logLevel);Qs(Qt());var MT=p((e,t,r)=>{J.warn(e),tl(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Mf=p(async function(e={querySelector:".mermaid"}){try{await OT(e)}catch(t){if(tl(t)&&J.error(t.str),Me.parseError&&Me.parseError(t),!e.suppressErrors)throw J.error("Use the suppressErrors option to suppress these errors"),t}},"run"),OT=p(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Ur.getConfig();J.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");J.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(J.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Ur.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const a=new Re.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let n;const o=[];for(const c of Array.from(s)){if(J.info("Rendering diagram: "+c.id),c.getAttribute("data-processed"))continue;c.setAttribute("data-processed","true");const h=`mermaid-${a.next()}`;n=c.innerHTML,n=Bu(Re.entityDecode(n)).trim().replace(/<br\s*\/?>/gi,"<br/>");const l=Re.detectInit(n);l&&J.debug("Detected early reinit: ",l);try{const{svg:d,bindFunctions:u}=await If(h,n,c);c.innerHTML=d,e&&await e(h),u&&u(c)}catch(d){MT(d,o,Me.parseError)}}if(o.length>0)throw o[0]},"runThrowsErrors"),Of=p(function(e){Ur.initialize(e)},"initialize"),$T=p(async function(e,t,r){J.warn("mermaid.init is deprecated. Please use run instead."),e&&Of(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Mf(i)},"init"),DT=p(async(e,{lazyLoad:t=!0}={})=>{va(),Wo(...e),t===!1&&await eT()},"registerExternalDiagrams"),$f=p(function(){if(Me.startOnLoad){const{startOnLoad:e}=Ur.getConfig();e&&Me.run().catch(t=>J.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",$f,!1);var IT=p(function(e){Me.parseError=e},"setParseErrorHandler"),ua=[],Po=!1,Df=p(async()=>{if(!Po){for(Po=!0;ua.length>0;){const e=ua.shift();if(e)try{await e()}catch(t){J.error("Error executing queue",t)}}Po=!1}},"executeQueue"),PT=p(async(e,t)=>new Promise((r,i)=>{const s=p(()=>new Promise((a,n)=>{Ur.parse(e,t).then(o=>{a(o),r(o)},o=>{var c;J.error("Error parsing",o),(c=Me.parseError)==null||c.call(Me,o),n(o),i(o)})}),"performCall");ua.push(s),Df().catch(i)}),"parse"),If=p((e,t,r)=>new Promise((i,s)=>{const a=p(()=>new Promise((n,o)=>{Ur.render(e,t,r).then(c=>{n(c),i(c)},c=>{var h;J.error("Error parsing",c),(h=Me.parseError)==null||h.call(Me,c),o(c),s(c)})}),"performCall");ua.push(a),Df().catch(s)}),"render"),RT=p(()=>Object.keys(zr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Me={startOnLoad:!0,mermaidAPI:Ur,parse:PT,render:If,init:$T,run:Mf,registerExternalDiagrams:DT,registerLayoutLoaders:Op,initialize:Of,parseError:void 0,contentLoaded:$f,setParseErrorHandler:IT,detectType:ma,registerIconPacks:e0,getRegisteredDiagramsMetadata:RT},qT=Me;/*! Check if previously processed *//*!
|
|
311
313
|
* Wait for document loaded before starting the execution
|
|
312
|
-
*/const
|
|
314
|
+
*/const _w=Object.freeze(Object.defineProperty({__proto__:null,default:qT},Symbol.toStringTag,{value:"Module"}));export{qd as $,Bi as A,pC as B,er as C,jT as D,Ux as E,fw as F,ul as G,mw as H,Fr as I,LC as J,zx as K,qu as L,xm as M,Qt as N,SC as O,el as P,Sn as Q,H0 as R,BC as S,my as T,Dt as U,ls as V,YT as W,Ca as X,rC as Y,$0 as Z,p as _,mC as a,mt as a$,uh as a0,z0 as a1,Fe as a2,Y as a3,U as a4,cC as a5,Wd as a6,uk as a7,vp as a8,xw as a9,n0 as aA,Jd as aB,c0 as aC,o0 as aD,g0 as aE,tu as aF,h0 as aG,k0 as aH,b0 as aI,x0 as aJ,T0 as aK,S0 as aL,l0 as aM,eu as aN,p0 as aO,u0 as aP,d0 as aQ,ru as aR,AC as aS,bk as aT,hu as aU,We as aV,xd as aW,HT as aX,es as aY,bw as aZ,Pc as a_,Ei as aa,e0 as ab,Jn as ac,pt as ad,xe as ae,Qk as af,Cw as ag,Sw as ah,kw as ai,_k as aj,Tw as ak,ca as al,Ck as am,ys as an,xk as ao,fe as ap,vt as aq,Wx as ar,cm as as,Xn as at,jn as au,qs as av,C0 as aw,y0 as ax,m0 as ay,f0 as az,fC as b,Gd as b0,Oe as b1,t0 as b2,Tm as b3,Lu as b4,Ct as b5,yw as b6,_w as b7,Rt as c,Nd as d,oe as e,yr as f,CC as g,_p as h,dt as i,qe as j,us as k,J as l,du as m,ds as n,s0 as o,UT as p,Bw as q,ww as r,yC as s,xC as t,Re as u,bC as v,j0 as w,FC as x,Jb as y,aw as z};
|