@turmind/halo 2.1.1 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -1
- package/admin-out/404.html +1 -1
- package/admin-out/_next/static/chunks/0.700b96fc96b80936.js +1 -0
- package/admin-out/_next/static/chunks/1101-d2f818895a3aa32e.js +1 -0
- package/admin-out/_next/static/chunks/1160.e199e2decb964814.js +1 -0
- package/admin-out/_next/static/chunks/1208.0d86b06cbdf8a97e.js +38 -0
- package/admin-out/_next/static/chunks/1299.9ae1e73c8ca9cc34.js +23 -0
- package/admin-out/_next/static/chunks/1336.3eb7654fcfae2a58.js +1 -0
- package/admin-out/_next/static/chunks/1494.56493f36b01d2bda.js +1 -0
- package/admin-out/_next/static/chunks/1522.7d80e505c25fc865.js +1 -0
- package/admin-out/_next/static/chunks/1650.78e7ab21cb8bbb48.js +62 -0
- package/admin-out/_next/static/chunks/1690.20f8661b1877aa3d.js +1 -0
- package/admin-out/_next/static/chunks/1807.764b0338b13846a5.js +1 -0
- package/admin-out/_next/static/chunks/1989-3aeeefebf77a40f3.js +1 -0
- package/admin-out/_next/static/chunks/199.fca450ee70f089fb.js +1 -0
- package/admin-out/_next/static/chunks/1b86ba38-4193816aebc732b9.js +1 -0
- package/admin-out/_next/static/chunks/{1d2d5650-d8d130c85727fdbb.js → 1d2d5650-c677408087984c7a.js} +1 -1
- package/admin-out/_next/static/chunks/2202.59a95bacad0d8c25.js +1 -0
- package/admin-out/_next/static/chunks/2204.93c869dacb19e384.js +1 -0
- package/admin-out/_next/static/chunks/2329.2f32de914b104261.js +148 -0
- package/admin-out/_next/static/chunks/2449.53d632fa8e412643.js +1 -0
- package/admin-out/_next/static/chunks/2477.79f2f92780311a37.js +94 -0
- package/admin-out/_next/static/chunks/2555.279979b7abe9d67f.js +104 -0
- package/admin-out/_next/static/chunks/2612.427656205dd7d7cc.js +1 -0
- package/admin-out/_next/static/chunks/2938.1555d68665415ace.js +1 -0
- package/admin-out/_next/static/chunks/295.0ef9b18be46f06e5.js +1 -0
- package/admin-out/_next/static/chunks/2979.d5a2293e776ec5de.js +1 -0
- package/admin-out/_next/static/chunks/3023.8f2b6311aae80029.js +36 -0
- package/admin-out/_next/static/chunks/3047.a49ae982be1f9fd4.js +226 -0
- package/admin-out/_next/static/chunks/304eda7d.2c6ab1276b03c10a.js +1 -0
- package/admin-out/_next/static/chunks/3483.cb8f5ba28c565e7f.js +1 -0
- package/admin-out/_next/static/chunks/391.71124432b84c926d.js +24 -0
- package/admin-out/_next/static/chunks/3986.a6181916d2c44515.js +1 -0
- package/admin-out/_next/static/chunks/4120.c271dfe3e1bc082e.js +1 -0
- package/admin-out/_next/static/chunks/4267.030877aaeac1bd71.js +1 -0
- package/admin-out/_next/static/chunks/4362.9d2ee4f9b6facc49.js +1 -0
- package/admin-out/_next/static/chunks/43ad6dab.4911ea318c123311.js +62 -0
- package/admin-out/_next/static/chunks/4613.0985db499409cf22.js +1 -0
- package/admin-out/_next/static/chunks/4794.ba746110cfcbf536.js +1 -0
- package/admin-out/_next/static/chunks/4808.1cbe5b52fa01fc3d.js +1 -0
- package/admin-out/_next/static/chunks/4ec056c8.fe288ac8bd38a73b.js +160 -0
- package/admin-out/_next/static/chunks/5056.a87b1e056ba592b1.js +32 -0
- package/admin-out/_next/static/chunks/5058.8514aa6d6a947cce.js +1 -0
- package/admin-out/_next/static/chunks/545.e760052f10d36a9b.js +1 -0
- package/admin-out/_next/static/chunks/{510.e6c6faeb60ef3c33.js → 5510.f3889206b5768b33.js} +1 -1
- package/admin-out/_next/static/chunks/5593.d4c5f6a0862b4c6c.js +34 -0
- package/admin-out/_next/static/chunks/5700.4189184227fcf178.js +1 -0
- package/admin-out/_next/static/chunks/5741.dd7360163a2374cf.js +8 -0
- package/admin-out/_next/static/chunks/5850.b58c01f1e835d335.js +1 -0
- package/admin-out/_next/static/chunks/6066.1571d105977d528c.js +86 -0
- package/admin-out/_next/static/chunks/61527465.ae14a459dbfc381c.js +1 -0
- package/admin-out/_next/static/chunks/6203.672c38fcc2748c83.js +1 -0
- package/admin-out/_next/static/chunks/6390.4de9361c493b8d29.js +27 -0
- package/admin-out/_next/static/chunks/63c91ae9.ed896f9d6d01dfd4.js +1 -0
- package/admin-out/_next/static/chunks/6476.c7ec7d60350855c8.js +1 -0
- package/admin-out/_next/static/chunks/6574.30661d21e54bb004.js +1 -0
- package/admin-out/_next/static/chunks/6694.91c424de10ee2a24.js +79 -0
- package/admin-out/_next/static/chunks/6927.7f60d259473bb56a.js +193 -0
- package/admin-out/_next/static/chunks/7073.9d5f9dd7a77827b7.js +1 -0
- package/admin-out/_next/static/chunks/7250.a005173b9af23f14.js +1 -0
- package/admin-out/_next/static/chunks/7267.09e9b83beadc4847.js +1 -0
- package/admin-out/_next/static/chunks/72d2e465.c6751b76f1fa1cb3.js +1 -0
- package/admin-out/_next/static/chunks/7423.ce958b2d6a455a2f.js +1 -0
- package/admin-out/_next/static/chunks/7443.ee6684ba397e49da.js +41 -0
- package/admin-out/_next/static/chunks/7482.7f6f11637c008b77.js +1 -0
- package/admin-out/_next/static/chunks/7498.621ff3bc139607ad.js +1 -0
- package/admin-out/_next/static/chunks/7573.7f7f2a6fe7891e68.js +1 -0
- package/admin-out/_next/static/chunks/7613.fe24922a6a839656.js +1 -0
- package/admin-out/_next/static/chunks/7796.052a2a69f9bc0471.js +287 -0
- package/admin-out/_next/static/chunks/8148.156aea8f2a9ce398.js +115 -0
- package/admin-out/_next/static/chunks/8300.6c86a2236d42618f.js +64 -0
- package/admin-out/_next/static/chunks/8555.2e8d51736bfefd63.js +1 -0
- package/admin-out/_next/static/chunks/8558.baa0cf80a6964d20.js +286 -0
- package/admin-out/_next/static/chunks/8608.dba2a172fa47a740.js +77 -0
- package/admin-out/_next/static/chunks/8680.ed502a4a22357230.js +92 -0
- package/admin-out/_next/static/chunks/8698.28ca7821a30dba63.js +1 -0
- package/admin-out/_next/static/chunks/8712.e587efd8a6256aa9.js +1 -0
- package/admin-out/_next/static/chunks/8771.53592f31c08edafa.js +309 -0
- package/admin-out/_next/static/chunks/8878.330238d3d9f33faf.js +1 -0
- package/admin-out/_next/static/chunks/8892.9df3095f6c52e734.js +1 -0
- package/admin-out/_next/static/chunks/9104.6d57df418831714a.js +74 -0
- package/admin-out/_next/static/chunks/9121.574e833259fe9085.js +1 -0
- package/admin-out/_next/static/chunks/9142.0aac6a6c8e06bcaa.js +149 -0
- package/admin-out/_next/static/chunks/9180.3c809798364a0c62.js +1 -0
- package/admin-out/_next/static/chunks/92.788f49cdb265a668.js +217 -0
- package/admin-out/_next/static/chunks/9590.3e1a4754a7e66e84.js +93 -0
- package/admin-out/_next/static/chunks/9599.b2fd519c8a2951c9.js +1 -0
- package/admin-out/_next/static/chunks/9698-0157e7ac70c3f9fc.js +1 -0
- package/admin-out/_next/static/chunks/9837.92abff094b289f98.js +1 -0
- package/admin-out/_next/static/chunks/9839.73433bbeec6e1a51.js +1 -0
- package/admin-out/_next/static/chunks/9868.dcc9fd5f0041ffa8.js +1 -0
- package/admin-out/_next/static/chunks/9937.cff3c28655b07c61.js +24 -0
- package/admin-out/_next/static/chunks/a89fe872.304b3efb308b10a1.js +122 -0
- package/admin-out/_next/static/chunks/app/_not-found/page-e21cd35ca818a886.js +1 -0
- package/admin-out/_next/static/chunks/app/layout-0ed29966e0abc26b.js +1 -0
- package/admin-out/_next/static/chunks/app/page-ee29d11e13ec576e.js +1 -0
- package/admin-out/_next/static/chunks/bf5d185f.735c9f3d05199f97.js +1 -0
- package/admin-out/_next/static/chunks/db534642.8e8a9023cd90863d.js +1 -0
- package/admin-out/_next/static/chunks/fcb912be.a7d93c5f2dd72e30.js +66 -0
- package/admin-out/_next/static/chunks/framework-98918e2142cd6d06.js +1 -0
- package/admin-out/_next/static/chunks/main-93c216652d4113b1.js +1 -0
- package/admin-out/_next/static/chunks/main-app-5e981adb363c52e5.js +1 -0
- package/admin-out/_next/static/chunks/pages/{_app-a3b7e86f97343e7a.js → _app-6fab9bb03f9f4fdf.js} +1 -1
- package/admin-out/_next/static/chunks/pages/_error-ada6d7affab6ebcc.js +1 -0
- package/admin-out/_next/static/chunks/webpack-7f8156dbbdb54868.js +1 -0
- package/admin-out/_next/static/css/6da86a077e119a6c.css +1 -0
- package/admin-out/_next/static/{0cRHmPZfENhrU7Hb0w3n_ → hVkojb3RGS9VYbkj-EX9T}/_buildManifest.js +1 -1
- package/admin-out/index.html +1 -1
- package/admin-out/index.txt +5 -5
- package/bundled-docs/design/a2a.md +43 -13
- package/bundled-docs/design/architecture.md +1 -1
- package/bundled-docs/design/storage.md +2 -2
- package/bundled-docs/dev/add-model-provider.md +2 -2
- package/bundled-docs/dev/api.md +4 -2
- package/bundled-docs/dev/tools.md +10 -5
- package/bundled-docs/guide/chat.md +1 -0
- package/bundled-docs/guide/workspace.md +1 -1
- package/bundled-docs/requirements/chat.md +7 -0
- package/bundled-docs/requirements/editor.md +5 -2
- package/bundled-docs/requirements/explorer.md +5 -0
- package/bundled-docs/requirements/source-control.md +2 -0
- package/dist/index.js +143 -34
- package/package.json +1 -1
- package/templates/models/aws-bedrock-claude-invoke.yaml +3 -3
- package/templates/models/aws-bedrock-mantle.yaml +21 -15
- package/templates/models/aws-bedrock-openai.yaml +7 -3
- package/admin-out/_next/static/chunks/160.c52d3d6cf7bc8286.js +0 -1
- package/admin-out/_next/static/chunks/1b86ba38-c29611e086b2ce25.js +0 -1
- package/admin-out/_next/static/chunks/250.9094fea2325b09a3.js +0 -1
- package/admin-out/_next/static/chunks/304eda7d.f525962766560ba5.js +0 -1
- package/admin-out/_next/static/chunks/336.3171154ecc29c80a.js +0 -1
- package/admin-out/_next/static/chunks/362.a0c58d3bf9b1300b.js +0 -1
- package/admin-out/_next/static/chunks/398-9a8be186767b4504.js +0 -1
- package/admin-out/_next/static/chunks/449.c4b881b9ebdc556e.js +0 -1
- package/admin-out/_next/static/chunks/522.9e25c63e3082cb1c.js +0 -1
- package/admin-out/_next/static/chunks/58.d26b1c4f14404226.js +0 -1
- package/admin-out/_next/static/chunks/613.fb09e55e0a61d3fe.js +0 -1
- package/admin-out/_next/static/chunks/690.6a83d18b488a3e2e.js +0 -1
- package/admin-out/_next/static/chunks/698-19872069fed27164.js +0 -1
- package/admin-out/_next/static/chunks/73.05abce37d312e880.js +0 -1
- package/admin-out/_next/static/chunks/839.a2729fd33013d763.js +0 -1
- package/admin-out/_next/static/chunks/868.bbb91afd48c9eb58.js +0 -1
- package/admin-out/_next/static/chunks/892.a35118e09d8d8efd.js +0 -1
- package/admin-out/_next/static/chunks/989-71c38d29c6672b27.js +0 -1
- package/admin-out/_next/static/chunks/app/_not-found/page-4271518f2746cf73.js +0 -1
- package/admin-out/_next/static/chunks/app/layout-ea161287d934ba96.js +0 -1
- package/admin-out/_next/static/chunks/app/page-67334fcd2175c7ad.js +0 -1
- package/admin-out/_next/static/chunks/db534642.657a5bd93dc1e8c7.js +0 -1
- package/admin-out/_next/static/chunks/framework-c48c994d2190a38e.js +0 -1
- package/admin-out/_next/static/chunks/main-app-340a5b58ed229c4d.js +0 -1
- package/admin-out/_next/static/chunks/main-f1f665fbc24e1033.js +0 -1
- package/admin-out/_next/static/chunks/pages/_error-751fca0c729a7e01.js +0 -1
- package/admin-out/_next/static/chunks/webpack-662d2cae1104f635.js +0 -1
- package/admin-out/_next/static/css/3467b854242306b8.css +0 -1
- /package/admin-out/_next/static/{0cRHmPZfENhrU7Hb0w3n_ → hVkojb3RGS9VYbkj-EX9T}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8680],{8680:(e,t,n)=>{n.d(t,{diagram:()=>_});var i=n(62240),s=n(77996),o=n(40090);n(57380),n(53652),n(77351),n(94712),n(73823),n(39020),n(7322),n(52361),n(55490),n(27058);var r=n(92826),a=n(58442),c=n(88252),l=n(32923),h=n(82858),d=n(70496),g=function(){var e=(0,c.K)(function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},"o"),t=[1,4],n=[1,13],i=[1,12],s=[1,15],o=[1,16],r=[1,20],a=[1,19],l=[6,7,8],h=[1,26],d=[1,24],g=[1,25],p=[6,7,11],u=[1,6,13,15,16,19,22],y=[1,33],m=[1,34],f=[1,6,7,11,13,15,16,19,22],_={trace:(0,c.K)(function(){},"trace"),yy:{},symbols_:{error:2,start:3,mindMap:4,spaceLines:5,SPACELINE:6,NL:7,MINDMAP:8,document:9,stop:10,EOF:11,statement:12,SPACELIST:13,node:14,ICON:15,CLASS:16,nodeWithId:17,nodeWithoutId:18,NODE_DSTART:19,NODE_DESCR:20,NODE_DEND:21,NODE_ID:22,$accept:0,$end:1},terminals_:{2:"error",6:"SPACELINE",7:"NL",8:"MINDMAP",11:"EOF",13:"SPACELIST",15:"ICON",16:"CLASS",19:"NODE_DSTART",20:"NODE_DESCR",21:"NODE_DEND",22:"NODE_ID"},productions_:[0,[3,1],[3,2],[5,1],[5,2],[5,2],[4,2],[4,3],[10,1],[10,1],[10,1],[10,2],[10,2],[9,3],[9,2],[12,2],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[12,1],[14,1],[14,1],[18,3],[17,1],[17,4]],performAction:(0,c.K)(function(e,t,n,i,s,o,r){var a=o.length-1;switch(s){case 6:case 7:return i;case 8:i.getLogger().trace("Stop NL ");break;case 9:i.getLogger().trace("Stop EOF ");break;case 11:i.getLogger().trace("Stop NL2 ");break;case 12:i.getLogger().trace("Stop EOF2 ");break;case 15:i.getLogger().info("Node: ",o[a].id),i.addNode(o[a-1].length,o[a].id,o[a].descr,o[a].type);break;case 16:i.getLogger().trace("Icon: ",o[a]),i.decorateNode({icon:o[a]});break;case 17:case 21:i.decorateNode({class:o[a]});break;case 18:i.getLogger().trace("SPACELIST");break;case 19:i.getLogger().trace("Node: ",o[a].id),i.addNode(0,o[a].id,o[a].descr,o[a].type);break;case 20:i.decorateNode({icon:o[a]});break;case 25:i.getLogger().trace("node found ..",o[a-2]),this.$={id:o[a-1],descr:o[a-1],type:i.getType(o[a-2],o[a])};break;case 26:this.$={id:o[a],descr:o[a],type:i.nodeType.DEFAULT};break;case 27:i.getLogger().trace("node found ..",o[a-3]),this.$={id:o[a-3],descr:o[a-1],type:i.getType(o[a-2],o[a])}}},"anonymous"),table:[{3:1,4:2,5:3,6:[1,5],8:t},{1:[3]},{1:[2,1]},{4:6,6:[1,7],7:[1,8],8:t},{6:n,7:[1,10],9:9,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(l,[2,3]),{1:[2,2]},e(l,[2,4]),e(l,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:n,9:22,12:11,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},{6:h,7:d,10:23,11:g},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:r,22:a}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:d,10:32,11:g},{1:[2,7],6:n,12:21,13:i,14:14,15:s,16:o,17:17,18:18,19:r,22:a},e(u,[2,14],{7:y,11:m}),e(f,[2,8]),e(f,[2,9]),e(f,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(u,[2,13],{7:y,11:m}),e(f,[2,11]),e(f,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:(0,c.K)(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},"parseError"),parse:(0,c.K)(function(e){var t=this,n=[0],i=[],s=[null],o=[],r=this.table,a="",l=0,h=0,d=0,g=o.slice.call(arguments,1),p=Object.create(this.lexer),u={};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u[y]=this.yy[y]);p.setInput(e,u),u.lexer=p,u.parser=this,void 0===p.yylloc&&(p.yylloc={});var m=p.yylloc;o.push(m);var f=p.options&&p.options.ranges;function _(){var e;return"number"!=typeof(e=i.pop()||p.lex()||1)&&(e instanceof Array&&(e=(i=e).pop()),e=t.symbols_[e]||e),e}"function"==typeof u.parseError?this.parseError=u.parseError:this.parseError=Object.getPrototypeOf(this).parseError,(0,c.K)(function(e){n.length=n.length-2*e,s.length=s.length-e,o.length=o.length-e},"popStack"),(0,c.K)(_,"lex");for(var k,E,b,S,N,x,L,D,$,T={};;){if(b=n[n.length-1],this.defaultActions[b]?S=this.defaultActions[b]:(null==k&&(k=_()),S=r[b]&&r[b][k]),void 0===S||!S.length||!S[0]){var I="";for(x in $=[],r[b])this.terminals_[x]&&x>2&&$.push("'"+this.terminals_[x]+"'");I=p.showPosition?"Parse error on line "+(l+1)+":\n"+p.showPosition()+"\nExpecting "+$.join(", ")+", got '"+(this.terminals_[k]||k)+"'":"Parse error on line "+(l+1)+": Unexpected "+(1==k?"end of input":"'"+(this.terminals_[k]||k)+"'"),this.parseError(I,{text:p.match,token:this.terminals_[k]||k,line:p.yylineno,loc:m,expected:$})}if(S[0]instanceof Array&&S.length>1)throw Error("Parse Error: multiple actions possible at state: "+b+", token: "+k);switch(S[0]){case 1:n.push(k),s.push(p.yytext),o.push(p.yylloc),n.push(S[1]),k=null,E?(k=E,E=null):(h=p.yyleng,a=p.yytext,l=p.yylineno,m=p.yylloc,d>0&&d--);break;case 2:if(L=this.productions_[S[1]][1],T.$=s[s.length-L],T._$={first_line:o[o.length-(L||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(L||1)].first_column,last_column:o[o.length-1].last_column},f&&(T._$.range=[o[o.length-(L||1)].range[0],o[o.length-1].range[1]]),void 0!==(N=this.performAction.apply(T,[a,h,l,u,S[1],s,o].concat(g))))return N;L&&(n=n.slice(0,-1*L*2),s=s.slice(0,-1*L),o=o.slice(0,-1*L)),n.push(this.productions_[S[1]][0]),s.push(T.$),o.push(T._$),D=r[n[n.length-2]][n[n.length-1]],n.push(D);break;case 3:return!0}}return!0},"parse")};function k(){this.yy={}}return _.lexer={EOF:1,parseError:(0,c.K)(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},"parseError"),setInput:(0,c.K)(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:(0,c.K)(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},"input"),unput:(0,c.K)(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},"unput"),more:(0,c.K)(function(){return this._more=!0,this},"more"),reject:(0,c.K)(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:(0,c.K)(function(e){this.unput(this.match.slice(e))},"less"),pastInput:(0,c.K)(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?"...":"")+e.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:(0,c.K)(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:(0,c.K)(function(){var e=this.pastInput(),t=Array(e.length+1).join("-");return e+this.upcomingInput()+"\n"+t+"^"},"showPosition"),test_match:(0,c.K)(function(e,t){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=e[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],n=this.performAction.call(this,this.yy,this,t,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack)for(var o in s)this[o]=s[o];return!1},"test_match"),next:(0,c.K)(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e,t,n,i,s=this._currentRules(),o=0;o<s.length;o++)if((n=this._input.match(this.rules[s[o]]))&&(!t||n[0].length>t[0].length)){if(t=n,i=o,this.options.backtrack_lexer){if(!1!==(e=this.test_match(n,s[o])))return e;if(!this._backtrack)return!1;t=!1;continue}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,s[i]))&&e:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:(0,c.K)(function(){var e=this.next();return e||this.lex()},"lex"),begin:(0,c.K)(function(e){this.conditionStack.push(e)},"begin"),popState:(0,c.K)(function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:(0,c.K)(function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},"_currentRules"),topState:(0,c.K)(function(e){return(e=this.conditionStack.length-1-Math.abs(e||0))>=0?this.conditionStack[e]:"INITIAL"},"topState"),pushState:(0,c.K)(function(e){this.begin(e)},"pushState"),stateStackSize:(0,c.K)(function(){return this.conditionStack.length},"stateStackSize"),options:{"case-insensitive":!0},performAction:(0,c.K)(function(e,t,n,i){switch(n){case 0:return e.getLogger().trace("Found comment",t.yytext),6;case 1:return 8;case 2:this.begin("CLASS");break;case 3:return this.popState(),16;case 4:case 23:case 26:this.popState();break;case 5:e.getLogger().trace("Begin icon"),this.begin("ICON");break;case 6:return e.getLogger().trace("SPACELINE"),6;case 7:return 7;case 8:return 15;case 9:e.getLogger().trace("end icon"),this.popState();break;case 10:return e.getLogger().trace("Exploding node"),this.begin("NODE"),19;case 11:return e.getLogger().trace("Cloud"),this.begin("NODE"),19;case 12:return e.getLogger().trace("Explosion Bang"),this.begin("NODE"),19;case 13:return e.getLogger().trace("Cloud Bang"),this.begin("NODE"),19;case 14:case 15:case 16:case 17:return this.begin("NODE"),19;case 18:return 13;case 19:return 22;case 20:return 11;case 21:this.begin("NSTR2");break;case 22:return"NODE_DESCR";case 24:e.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 25:return e.getLogger().trace("description:",t.yytext),"NODE_DESCR";case 27:return this.popState(),e.getLogger().trace("node end ))"),"NODE_DEND";case 28:return this.popState(),e.getLogger().trace("node end )"),"NODE_DEND";case 29:return this.popState(),e.getLogger().trace("node end ...",t.yytext),"NODE_DEND";case 30:case 33:case 34:return this.popState(),e.getLogger().trace("node end (("),"NODE_DEND";case 31:case 32:return this.popState(),e.getLogger().trace("node end (-"),"NODE_DEND";case 35:case 36:return e.getLogger().trace("Long description:",t.yytext),20}},"anonymous"),rules:[/^(?:\s*%%.*)/i,/^(?:mindmap\b)/i,/^(?::::)/i,/^(?:.+)/i,/^(?:\n)/i,/^(?:::icon\()/i,/^(?:[\s]+[\n])/i,/^(?:[\n]+)/i,/^(?:[^\)]+)/i,/^(?:\))/i,/^(?:-\))/i,/^(?:\(-)/i,/^(?:\)\))/i,/^(?:\))/i,/^(?:\(\()/i,/^(?:\{\{)/i,/^(?:\()/i,/^(?:\[)/i,/^(?:[\s]+)/i,/^(?:[^\(\[\n\)\{\}]+)/i,/^(?:$)/i,/^(?:["][`])/i,/^(?:[^`"]+)/i,/^(?:[`]["])/i,/^(?:["])/i,/^(?:[^"]+)/i,/^(?:["])/i,/^(?:[\)]\))/i,/^(?:[\)])/i,/^(?:[\]])/i,/^(?:\}\})/i,/^(?:\(-)/i,/^(?:-\))/i,/^(?:\(\()/i,/^(?:\()/i,/^(?:[^\)\]\(\}]+)/i,/^(?:.+(?!\(\())/i],conditions:{CLASS:{rules:[3,4],inclusive:!1},ICON:{rules:[8,9],inclusive:!1},NSTR2:{rules:[22,23],inclusive:!1},NSTR:{rules:[25,26],inclusive:!1},NODE:{rules:[21,24,27,28,29,30,31,32,33,34,35,36],inclusive:!1},INITIAL:{rules:[0,1,2,5,6,7,10,11,12,13,14,15,16,17,18,19,20],inclusive:!0}}},(0,c.K)(k,"Parser"),k.prototype=_,_.Parser=k,new k}();g.parser=g;var p={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},u=class{constructor(){this.nodes=[],this.count=0,this.elements={},this.getLogger=this.getLogger.bind(this),this.nodeType=p,this.clear(),this.getType=this.getType.bind(this),this.getElementById=this.getElementById.bind(this),this.getParent=this.getParent.bind(this),this.getMindmap=this.getMindmap.bind(this),this.addNode=this.addNode.bind(this),this.decorateNode=this.decorateNode.bind(this)}static{(0,c.K)(this,"MindmapDB")}clear(){this.nodes=[],this.count=0,this.elements={},this.baseLevel=void 0}getParent(e){for(let t=this.nodes.length-1;t>=0;t--)if(this.nodes[t].level<e)return this.nodes[t];return null}getMindmap(){return this.nodes.length>0?this.nodes[0]:null}addNode(e,t,n,i){a.R.info("addNode",e,t,n,i);let s=!1;0===this.nodes.length?(this.baseLevel=e,e=0,s=!0):void 0!==this.baseLevel&&(e-=this.baseLevel,s=!1);let o=(0,r.D7)(),c=o.mindmap?.padding??r.UI.mindmap.padding;switch(i){case this.nodeType.ROUNDED_RECT:case this.nodeType.RECT:case this.nodeType.HEXAGON:c*=2}let l={id:this.count++,nodeId:(0,r.jZ)(t,o),level:e,descr:(0,r.jZ)(n,o),type:i,children:[],width:o.mindmap?.maxNodeWidth??r.UI.mindmap.maxNodeWidth,padding:c,isRoot:s},h=this.getParent(e);if(h)h.children.push(l),this.nodes.push(l);else if(s)this.nodes.push(l);else throw Error(`There can be only one root. No parent could be found for ("${l.descr}")`)}getType(e,t){switch(a.R.debug("In get type",e,t),e){case"[":return this.nodeType.RECT;case"(":return")"===t?this.nodeType.ROUNDED_RECT:this.nodeType.CLOUD;case"((":return this.nodeType.CIRCLE;case")":return this.nodeType.CLOUD;case"))":return this.nodeType.BANG;case"{{":return this.nodeType.HEXAGON;default:return this.nodeType.DEFAULT}}setElementForId(e,t){this.elements[e]=t}getElementById(e){return this.elements[e]}decorateNode(e){if(!e)return;let t=(0,r.D7)(),n=this.nodes[this.nodes.length-1];e.icon&&(n.icon=(0,r.jZ)(e.icon,t)),e.class&&(n.class=(0,r.jZ)(e.class,t))}type2Str(e){switch(e){case this.nodeType.DEFAULT:return"no-border";case this.nodeType.RECT:return"rect";case this.nodeType.ROUNDED_RECT:return"rounded-rect";case this.nodeType.CIRCLE:return"circle";case this.nodeType.CLOUD:return"cloud";case this.nodeType.BANG:return"bang";case this.nodeType.HEXAGON:return"hexgon";default:return"no-border"}}assignSections(e,t,n=0,i=!1){if(0===e.level?e.section=void 0:e.section=i?(n-1)%11:t,e.children)for(let[s,o]of e.children.entries()){let r=0===e.level?s%11:t;this.assignSections(o,r,n+1,i)}}flattenNodes(e,t){let n=(0,r.D7)(),i=["mindmap-node"];!0===e.isRoot?i.push("section-root","section--1"):void 0!==e.section&&i.push(`section-${e.section}`),e.class&&i.push(e.class);let s=i.join(" "),o=(0,c.K)(e=>{let t=(n.theme?.toLowerCase()??"").includes("redux");switch(e){case p.CIRCLE:return"mindmapCircle";case p.RECT:return"rect";case p.ROUNDED_RECT:return"rounded";case p.CLOUD:return"cloud";case p.BANG:return"bang";case p.HEXAGON:return"hexagon";case p.DEFAULT:return t?"rounded":"defaultMindmapNode";case p.NO_BORDER:default:return"rect"}},"getShapeFromType"),a={id:e.id.toString(),domId:"node_"+e.id.toString(),label:e.descr,labelType:"markdown",isGroup:!1,shape:o(e.type),width:e.width,height:e.height??0,padding:e.padding,cssClasses:s,cssStyles:[],centerLabel:!0,look:n.look,icon:e.icon,x:e.x,y:e.y,level:e.level,nodeId:e.nodeId,type:e.type,section:e.section};if(t.push(a),e.children)for(let n of e.children)this.flattenNodes(n,t)}generateEdges(e,t){if(!e.children)return;let n=(0,r.D7)();for(let i of e.children){let s="edge";void 0!==i.section&&(s+=` section-edge-${i.section}`);let o=e.level+1;s+=` edge-depth-${o}`;let r={id:`edge_${e.id}_${i.id}`,start:e.id.toString(),end:i.id.toString(),type:"normal",curve:"basis",thickness:"normal",look:n.look,classes:s,depth:e.level,section:i.section};t.push(r),this.generateEdges(i,t)}}getData(){let e=this.getMindmap(),t=(0,r.D7)();if(void 0!==(0,r.TM)().layout||(t.layout="cose-bilkent"),!e)return{nodes:[],edges:[],config:t};a.R.debug("getData: mindmapRoot",e,t),this.assignSections(e,void 0,0,t.mindmap?.colorBy==="depth");let n=[],i=[];this.flattenNodes(e,n),this.generateEdges(e,i),a.R.debug(`getData: processed ${n.length} nodes and ${i.length} edges`);let s=new Map;for(let e of n)s.set(e.id,{shape:e.shape,width:e.width,height:e.height,padding:e.padding});return{nodes:n,edges:i,config:t,rootNode:e,markers:["point"],direction:"TB",nodeSpacing:50,rankSpacing:50,shapes:Object.fromEntries(s),type:"mindmap"}}getLogger(){return a.R}},y=(0,c.K)(async(e,t,n,c)=>{a.R.debug("Rendering mindmap diagram\n"+e);let l=c.db,h=l.getData(),d=(0,i.A)(t,h.config.securityLevel);if(h.type=c.type,h.layoutAlgorithm=(0,o.q7)(h.config.layout,{fallback:"cose-bilkent"}),h.diagramId=t,!l.getMindmap())return;h.nodes.forEach(e=>{"rounded"===e.shape?(e.radius=15,e.taper=15,e.stroke="none",e.width=0,e.padding=15):"circle"===e.shape?e.padding=10:"rect"===e.shape?(e.width=0,e.padding=10):"hexagon"===e.shape&&(e.width=0,e.height=0)}),await (0,o.XX)(h,d);let{themeVariables:g}=(0,r.zj)(),{useGradient:p,gradientStart:u,gradientStop:y}=g;if(p&&u&&y){let e=d.attr("id"),t=d.append("defs").append("linearGradient").attr("id",`${e}-gradient`).attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",u).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",y).attr("stop-opacity",1)}(0,s.P)(d,h.config.mindmap?.padding??r.UI.mindmap.padding,"mindmapDiagram",h.config.mindmap?.useMaxWidth??r.UI.mindmap.useMaxWidth)},"draw"),m=(0,c.K)(e=>{let{theme:t,look:n}=e,i="";for(let t=0;t<e.THEME_COLOR_LIMIT;t++)e["lineColor"+t]=e["lineColor"+t]||e["cScaleInv"+t],(0,l.A)(e["lineColor"+t])?e["lineColor"+t]=(0,h.A)(e["lineColor"+t],20):e["lineColor"+t]=(0,d.A)(e["lineColor"+t],20);for(let s=0;s<e.THEME_COLOR_LIMIT;s++){let o=""+("neo"===n?Math.max(10-(s-1)*2,2):17-3*s),r="redux"===t||"redux-dark"===t?e.nodeBorder:e["cScaleLabel"+("neutral"===t?1:s)];i+=`
|
|
2
|
+
.section-${s-1} rect, .section-${s-1} path, .section-${s-1} circle, .section-${s-1} polygon, .section-${s-1} path {
|
|
3
|
+
fill: ${e["cScale"+s]};
|
|
4
|
+
}
|
|
5
|
+
.section-${s-1} text {
|
|
6
|
+
fill: ${e["cScaleLabel"+s]};
|
|
7
|
+
}
|
|
8
|
+
.section-${s-1} span {
|
|
9
|
+
color: ${e["cScaleLabel"+s]};
|
|
10
|
+
}
|
|
11
|
+
.node-icon-${s-1} {
|
|
12
|
+
font-size: 40px;
|
|
13
|
+
color: ${e["cScaleLabel"+s]};
|
|
14
|
+
}
|
|
15
|
+
.section-edge-${s-1}{
|
|
16
|
+
stroke: ${e["cScale"+s]};
|
|
17
|
+
}
|
|
18
|
+
.edge-depth-${s-1}{
|
|
19
|
+
stroke-width: ${o};
|
|
20
|
+
}
|
|
21
|
+
.section-${s-1} line {
|
|
22
|
+
stroke: ${e["cScaleInv"+s]} ;
|
|
23
|
+
stroke-width: 3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.disabled, .disabled circle, .disabled text {
|
|
27
|
+
fill: lightgray;
|
|
28
|
+
}
|
|
29
|
+
.disabled text {
|
|
30
|
+
fill: #efefef;
|
|
31
|
+
}
|
|
32
|
+
[data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {
|
|
33
|
+
fill: ${"redux"===t||"redux-dark"===t||"neutral"===t?e.mainBkg:e["cScale"+s]};
|
|
34
|
+
stroke: ${"redux"===t||"redux-dark"===t?e.nodeBorder:e["cScale"+s]};
|
|
35
|
+
stroke-width: ${e.strokeWidth??2}px;
|
|
36
|
+
}
|
|
37
|
+
[data-look="neo"].section-edge-${s-1}{
|
|
38
|
+
stroke: ${t?.includes("redux")||"neo-dark"===t?e.nodeBorder:e["cScale"+s]};
|
|
39
|
+
}
|
|
40
|
+
[data-look="neo"].mindmap-node.section-${s-1} text, [data-look="neo"].mindmap-node.section-${s-1} span {
|
|
41
|
+
fill: ${r};
|
|
42
|
+
color: ${r};
|
|
43
|
+
}
|
|
44
|
+
`}return i},"genSections"),f=(0,c.K)((e,t,n)=>{let i="";for(let s=0;s<e;s++)i+=`
|
|
45
|
+
[data-look="neo"].mindmap-node.section-${s-1} rect, [data-look="neo"].mindmap-node.section-${s-1} path, [data-look="neo"].mindmap-node.section-${s-1} circle, [data-look="neo"].mindmap-node.section-${s-1} polygon {
|
|
46
|
+
stroke: url(${t}-gradient);
|
|
47
|
+
fill: ${n};
|
|
48
|
+
}
|
|
49
|
+
.section-${s-1} line {
|
|
50
|
+
stroke-width: 0;
|
|
51
|
+
}`;return i},"genGradient"),_={get db(){return new u},renderer:{draw:y},parser:g,styles:(0,c.K)(e=>{let{theme:t}=e,n=e.svgId,i=t?.includes("redux")?e.nodeBorder:e["cScaleLabel"+ +("neutral"===t)],s=e.dropShadow?e.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none";return`
|
|
52
|
+
.edge {
|
|
53
|
+
stroke-width: 3;
|
|
54
|
+
}
|
|
55
|
+
${m(e)}
|
|
56
|
+
.section-root rect, .section-root path, .section-root circle, .section-root polygon {
|
|
57
|
+
fill: ${e.git0};
|
|
58
|
+
}
|
|
59
|
+
.section-root text {
|
|
60
|
+
fill: ${e.gitBranchLabel0};
|
|
61
|
+
}
|
|
62
|
+
.section-root span {
|
|
63
|
+
color: ${t?.includes("redux")?e.nodeBorder:e.gitBranchLabel0};
|
|
64
|
+
}
|
|
65
|
+
.icon-container {
|
|
66
|
+
height:100%;
|
|
67
|
+
display: flex;
|
|
68
|
+
justify-content: center;
|
|
69
|
+
align-items: center;
|
|
70
|
+
}
|
|
71
|
+
.edge {
|
|
72
|
+
fill: none;
|
|
73
|
+
}
|
|
74
|
+
.mindmap-node-label {
|
|
75
|
+
dy: 1em;
|
|
76
|
+
alignment-baseline: middle;
|
|
77
|
+
text-anchor: middle;
|
|
78
|
+
dominant-baseline: middle;
|
|
79
|
+
text-align: center;
|
|
80
|
+
}
|
|
81
|
+
[data-look="neo"].mindmap-node {
|
|
82
|
+
filter: ${s};
|
|
83
|
+
}
|
|
84
|
+
[data-look="neo"].mindmap-node.section-root rect, [data-look="neo"].mindmap-node.section-root path, [data-look="neo"].mindmap-node.section-root circle, [data-look="neo"].mindmap-node.section-root polygon {
|
|
85
|
+
fill: ${t?.includes("redux")?e.mainBkg:e.git0};
|
|
86
|
+
}
|
|
87
|
+
[data-look="neo"].mindmap-node.section-root .text-inner-tspan, [data-look="neo"].mindmap-node.section-root span {
|
|
88
|
+
fill: ${i};
|
|
89
|
+
color: ${i};
|
|
90
|
+
}
|
|
91
|
+
${e.useGradient&&n&&e.mainBkg?f(e.THEME_COLOR_LIMIT,n,e.mainBkg):""}
|
|
92
|
+
`},"getStyles")}},62240:(e,t,n)=>{n.d(t,{A:()=>o});var i=n(88252),s=n(93962),o=(0,i.K)((e,t)=>{let n;return"sandbox"===t&&(n=(0,s.Lt)("#i"+e)),("sandbox"===t?(0,s.Lt)(n.nodes()[0].contentDocument.body):(0,s.Lt)("body")).select(`[id="${e}"]`)},"getDiagramElement")},77996:(e,t,n)=>{n.d(t,{P:()=>r});var i=n(92826),s=n(58442),o=n(88252),r=(0,o.K)((e,t,n,o)=>{e.attr("class",n);let{width:r,height:l,x:h,y:d}=a(e,t);(0,i.a$)(e,l,r,o);let g=c(h,d,r,l,t);e.attr("viewBox",g),s.R.debug(`viewBox configured: ${g} with padding: ${t}`)},"setupViewPortForSVG"),a=(0,o.K)((e,t)=>{let n=e.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:n.width+2*t,height:n.height+2*t,x:n.x,y:n.y}},"calculateDimensionsWithPadding"),c=(0,o.K)((e,t,n,i,s)=>`${e-s} ${t-s} ${n} ${i}`,"createViewBox")}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8698],{78698:(e,c,r)=>{r.d(c,{createArchitectureServices:()=>s.S});var s=r(79301);r(42172)}}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[199,8712],{8712:(e,t,n)=>{n.r(t),n.d(t,{render:()=>Q});var r=n(90199),i=n(79180),o=n(53652),l=n(77351);n(94712),n(73823),n(39020),n(7322),n(52361),n(55490),n(27058);var a=n(92826);n(58442);var s=n(88252),d=n(25128),u=n(68008),h=(0,s.K)((e,t,{parentById:n})=>{let r=new Set,i=e;if(e===t)return n[e]||"root";for(;i;){if(r.add(i),i===t)return i;i=n[i]}for(i=t;i;){if(r.has(i))return i;i=n[i]}return"root"},"findCommonAncestor");function g(e,t,{parentById:n}){let r=e;for(;(n[r]??"root")!==t;)r=n[r];return r}function f(e,t){let n=e.map(()=>!1),r=new Map;for(let i of(e.forEach(({source:e,target:n},i)=>{if(e===n)return;let o=h(e,n,t);if(o===e||o===n)return;let l=g(e,o,t),a=g(n,o,t),s=r.get(o)??[];s.push({index:i,from:l,to:a,collapsed:l!==e||a!==n}),r.set(o,s)}),r.values())){let e=new Map,t=[],r=new Map;for(let n of i){for(let i of[n.from,n.to])e.has(i)||(e.set(i,[]),t.push(i),r.set(i,0));e.get(n.from).push(n),r.set(n.to,r.get(n.to)+1)}let o=new Map;for(let i of[...t.filter(e=>0===r.get(e)),...t]){if(o.has(i))continue;o.set(i,1);let t=[{node:i,next:0}];for(;t.length>0;){let r=t[t.length-1],i=e.get(r.node);if(r.next>=i.length){o.set(r.node,2),t.pop();continue}let l=i[r.next++],a=o.get(l.to);1===a?n[l.index]=l.collapsed:void 0===a&&(o.set(l.to,1),t.push({node:l.to,next:0}))}}}return n}function p(e,t,{parentById:n}){let r=n[e];for(;void 0!==r;){if(r===t)return!0;r=n[r]}return!1}function c(e,t){let n=e.map((e,t)=>t);return e.forEach(({source:r,target:i},o)=>{let l=n.indexOf(o),a=n.findIndex((n,o)=>{let a=e[n];return o<l&&(a.target===i&&p(r,a.source,t)||a.source===r&&p(i,a.target,t))});-1!==a&&(n.splice(l,1),n.splice(a,0,o))}),n}function y(e,{measure:t}){let n=e.config?.elk?.lineHops;if(!1===n)return;let i=e.edges.filter(e=>Array.isArray(e.points)&&e.points.length>=2).map(e=>({id:e.id,points:e.points,curve:e.curve,arrowTypeStart:e.arrowTypeStart,arrowTypeEnd:e.arrowTypeEnd}));(0,r.Z)(t.groups.edgePaths,i,{enabled:!0,jumpRadius:6,jumpStyle:"gap"===n?"gap":"arc"})}(0,s.K)(g,"childOnPath"),(0,s.K)(f,"findSubgraphFeedbackEdges"),(0,s.K)(p,"isInside"),(0,s.K)(c,"orderNestedEdgeEnds"),(0,s.K)(y,"applyElkLineJumps");var x={},b={},m={},k={},w=10,E=(0,s.K)((e,t,n=.5)=>{let r=e.width/2,i=e.height/2,o=e.x-r,l=e.x+r,a=e.y-i,s=e.y+i,d=Math.abs(t.x-o)<=n&&t.y>=a-n&&t.y<=s+n,u=Math.abs(t.x-l)<=n&&t.y>=a-n&&t.y<=s+n,h=Math.abs(t.y-a)<=n&&t.x>=o-n&&t.x<=l+n,g=Math.abs(t.y-s)<=n&&t.x>=o-n&&t.x<=l+n;return d||u||h||g},"onBorder"),M=(0,s.K)((e,t,n)=>{let r=e.x,i=e.y,o=Math.abs(r-n.x),l=e.width/2,a=n.x<t.x?l-o:l+o,s=e.height/2,d=Math.abs(t.y-n.y),u=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*l>Math.abs(r-t.x)*s){let e=n.y<t.y?t.y-s-i:i-s-t.y;a=u*e/d;let r={x:n.x<t.x?n.x+a:n.x-u+a,y:n.y<t.y?n.y+d-e:n.y-d+e};return 0===u&&(r.x=t.x),0===d&&(r.y=t.y),r}{let e=d*(a=n.x<t.x?t.x-l-r:r-l-t.x)/u,i=n.x<t.x?n.x+u-a:n.x-u+a,o=n.y<t.y?n.y+e:n.y-e;return 0===u&&(i=t.x),0===d&&(o=t.y),{x:i,y:o}}},"intersection"),K=(0,s.K)((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),o=Math.abs(t.y-r),l=e.width/2,a=e.height/2;return i>=l||o>=a},"outsideNode"),L=(0,s.K)((e,t,n=w)=>{let r=Math.abs(t.x-e.x),i=Math.abs(t.y-e.y),o=e.width/2,l=e.height/2;if(1>Math.abs(r-o)||1>Math.abs(i-l)){let r=t.x-e.x,i=t.y-e.y,o=Math.sqrt(r*r+i*i);if(o>0)return{x:e.x+r/o*(o+n),y:e.y+i/o*(o+n)}}return t},"ensureTrulyOutside"),S=(0,s.K)((e,t,n)=>{let r=1>Math.abs(t.x-e.x),i=1>Math.abs(t.y-e.y);return{x:r?t.x:t.x<e.x?e.x-e.width/4:e.x+e.width/4,y:i?t.y:n.y}},"makeInsidePoint"),O=(0,s.K)((e,t,n)=>{if(!e?.intersect)return null;let r=e.intersect(n);return!r||n.x<t.x&&r.x>t.x||n.x>t.x&&r.x<t.x||1>=Math.hypot(n.x-r.x,n.y-r.y)?null:r},"tryNodeIntersect"),P=(0,s.K)((e,t,n)=>{let r=S(e,t,n);return M(e,t,r)},"fallbackIntersection"),I=(0,s.K)((e,t,n)=>{let r=e.intersect?.(n);return!!r&&Math.hypot(n.x-t.x,n.y-t.y)<=Math.hypot(r.x-t.x,r.y-t.y)+1e-9},"insideOutline"),A=(0,s.K)((e,t,n,r)=>{if(!e?.intersect)return null;let i=r.x-n.x,o=r.y-n.y;if(0===i&&0===o||Math.abs(i)>1e-6&&Math.abs(o)>1e-6)return null;let l={x:t.x,y:t.y},a=Math.abs(i)>Math.abs(o),d=(0,s.K)(e=>a?{x:e,y:n.y}:{x:n.x,y:e},"along"),u=a?l.x:l.y,h=a?n.x:n.y;if(!I(e,l,d(u)))return null;if(I(e,l,d(h)))return{...n};for(let t=0;t<20;t++){let t=(u+h)/2;I(e,l,d(t))?u=t:h=t}return d(u)},"outlineAttachPoint"),v=(0,s.K)((e,t,n,r)=>{let i=L(t,n);return O(e,t,i)??P(t,i,r)},"computeNodeIntersection"),N=(0,s.K)((e,t,n,r=.1)=>{if(n&&0!==e.length)if("start"===t)e.length>0&&Math.abs(e[0].x-n.x)<r&&Math.abs(e[0].y-n.y)<r?e.shift():e[0]=n;else{let t=e.length-1;e.length>0&&Math.abs(e[t].x-n.x)<r&&Math.abs(e[t].y-n.y)<r?e.pop():e[t]=n}},"replaceEndpoint"),T=(0,s.K)(e=>"string"!=typeof e?0:Math.max(l.hq[e]??0,l.Nq[e]??0),"markerPathOffset"),D={arrow_open:["none","none"],arrow_cross:["none","arrow_cross"],double_arrow_cross:["arrow_cross","arrow_cross"],arrow_point:["none","arrow_point"],double_arrow_point:["arrow_point","arrow_point"],arrow_circle:["none","arrow_circle"],double_arrow_circle:["arrow_circle","arrow_circle"]},C="[top=12,left=12,bottom=12,right=12]",_={"spacing.baseValue":15,"spacing.nodeNode":15,"elk.aspectRatio":"1.6","elk.expandNodes":"true","elk.rectpacking.trybox":"true","elk.rectpacking.packing.compaction.rowHeightReevaluation":"true","elk.rectpacking.packing.compaction.iterations":10,"elk.rectpacking.whiteSpaceElimination.strategy":"EQUAL_BETWEEN_STRUCTURES","elk.rectpacking.widthApproximation.strategy":"SCANLINE"},R=["nodeSize.constraints","nodeSize.minimum","elk.algorithm","elk.aspectRatio","elk.contentAlignment","elk.expandNodes","elk.padding",...Object.keys(_)];function B(e){for(let t of R)delete e[t];e["spacing.baseValue"]=24,e["spacing.nodeNode"]=50}(0,s.K)(B,"clearContainerAlgorithmOptions");var $=new Set(["elk.layered","elk.box","elk.rectpacking","elk.stress","elk.force","elk.mrtree","elk.radial","elk.sporeOverlap"]);function X(e,t){if("string"==typeof e)return $.has(e)?e:void t?.warn(`Unknown container layout algorithm "${e}". Supported values: ${[...$].join(", ")}. Falling back to the diagram's layout algorithm.`)}function F(e){switch(e){case"LR":return"RIGHT";case"RL":return"LEFT";case"TB":case"TD":default:return"DOWN";case"BT":return"UP"}}function G(e){return(0,o.qV)(e.shape)?(e.labelData?.width??e.labels?.[0]?.width??0)+(e.padding??0):0}function Y(e){return(0,o.qV)(e.shape)?{"nodeSize.constraints":"[MINIMUM_SIZE, NODE_LABELS]","nodeSize.minimum":`(${G(e)}, 0)`}:{}}function j(e,t,n,r){let i=(e.labelData?.width??0)+2*(e.padding??0),o=e.labelData?.height??0,l=ei(t?.preset),a={...Y(e),"spacing.baseValue":24,"elk.layered.spacing.edgeNodeBetweenLayers":30,"elk.spacing.edgeEdge":20,"spacing.nodeNode":50,"elk.padding":"[top=24,left=24,bottom=24,right=24]","nodeLabels.placement":"[H_CENTER V_TOP, INSIDE]","elk.layered.mergeEdges":t?.mergeEdges,"elk.layered.nodePlacement.bk.fixedAlignment":t?.nodePlacementAlignment??l.alignment,"elk.layered.nodePlacement.strategy":t?.nodePlacementStrategy??l.containerPlacement,"elk.layered.cycleBreaking.strategy":t?.cycleBreakingStrategy??l.cycleBreaking,"elk.layered.nodePlacement.networkSimplex.nodeFlexibility":"PORT_POSITION","elk.spacing.portsSurrounding":C},s=X(e.metadata?.algorithm,r);if(s){let e=o+15;if(a["nodeSize.constraints"]="[MINIMUM_SIZE, NODE_LABELS]",a["nodeSize.minimum"]=`(${i}, ${e+15})`,a["elk.algorithm"]=s,a["elk.hierarchyHandling"]="SEPARATE_CHILDREN",a["elk.aspectRatio"]="2.0",a["elk.contentAlignment"]="H_CENTER V_TOP",a["elk.expandNodes"]="true",a["elk.padding"]=`[top=${e},left=15,bottom=15,right=15]`,"elk.rectpacking"===s){let e=o+10;Object.assign(a,_,{"elk.padding":`[top=${e},left=10,bottom=10,right=10]`,"nodeSize.minimum":`(${i}, ${e+10})`})}}else e.dir&&(a["elk.algorithm"]=n,a["elk.direction"]=F(e.dir),a["elk.hierarchyHandling"]="SEPARATE_CHILDREN");return Object.assign(a,k),a}function H(e,t){let n=new Set,r=new Map;for(let{id:t,parentId:n}of e){let e=r.get(n);e?e.push(t):r.set(n,[t])}for(let e of r.values()){let r=new Set(e),i=new Map(e.map(e=>[e,0])),o=new Map(e.map(e=>[e,[]])),l=[];for(let e of t){let t=null==e.source?void 0:String(e.source),n=null==e.target?void 0:String(e.target);t&&n&&t!==n&&r.has(t)&&r.has(n)&&(i.set(n,(i.get(n)??0)+1),o.get(t).push(n),o.get(n).push(t),l.push([t,n]))}let a=new Map,d=0;for(let t of e){if(a.has(t))continue;let e=[t];for(a.set(t,d);e.length>0;){let t=e.pop();for(let n of o.get(t))a.has(n)||(a.set(n,d),e.push(n))}d++}let u=Array(d).fill(!1);for(let t of e)(i.get(t)??0)===0&&(u[a.get(t)]=!0);if(!u.includes(!1))continue;let h=new Map(e.map(e=>[e,[]])),g=new Map(e.map(e=>[e,0])),f=(0,s.K)((e,t)=>{let n=new Set([e]),r=[e];for(;r.length>0;){let e=r.pop();if(e===t)return!0;for(let t of h.get(e))n.has(t)||(n.add(t),r.push(t))}return!1},"reaches");for(let[e,t]of l)f(t,e)||(h.get(e).push(t),g.set(t,(g.get(t)??0)+1));let p=Array(d).fill(!1);for(let t of e){let e=a.get(t);u[e]||p[e]||0!==g.get(t)||(n.add(t),p[e]=!0)}}return n}function W(e,t){if(e.config.elk?.keepEntryNodeOnTop)for(let n of H(e.nodes,e.edges.map(e=>({source:e.start,target:e.end})))){let e=t[n];e&&(e.layoutOptions={...e.layoutOptions,"elk.layered.layering.layerConstraint":"FIRST"})}}function U(e,t){let n=en(t);return Z(n),eQ(e,n),{algorithm:n.algorithm}}async function z(e,t){let n=en(t),r=V(e,n),i=new u;n.log.info("Drawing flowchart using v4 renderer",i);let o=await ex(i,r.elkGraph,n.log);return eb(e,o,r,n.log),ee(e.nodes),o}function V(e,t){let n={},r=eo(e,t.algorithm,t.rootLayoutOptions),i=e.direction??"DOWN";r.layoutOptions["elk.direction"]=F(i);let o=el(e.nodes,t.log);return ea(e.nodes,r,n,t),eh(e,r,n,t),ep(e,n,o,t),ec(r,n,o,t.log),e.config.elk?.orientFeedbackEdges!==!1&&q(r,o),J(r,o),W(e,n),{elkGraph:r,nodeDb:n,parentLookupDb:o}}function q(e,t){let n=f(e.edges.map(e=>({source:e.sources[0],target:e.targets[0]})),t);e.edges.forEach((e,t)=>{n[t]&&([e.sources,e.targets]=[e.targets,e.sources],e.layoutReversed=!0)})}function J(e,t){let n=c(e.edges.map(e=>({source:e.sources[0],target:e.targets[0]})),t);e.edges=n.map(t=>e.edges[t])}(0,s.K)(X,"resolveContainerAlgorithm"),(0,s.K)(F,"dir2ElkDirection"),(0,s.K)(G,"groupTitleWidth"),(0,s.K)(Y,"groupTitleSizeOptions"),(0,s.K)(j,"buildSubgraphLayoutOptions"),(0,s.K)(H,"findCyclicEntryNodes"),(0,s.K)(W,"applyCyclicEntryConstraint"),(0,s.K)(U,"prepareLayoutForElk"),(0,s.K)(z,"runElkLayoutCore"),(0,s.K)(V,"buildElkGraphFromLayoutData"),(0,s.K)(q,"reverseSubgraphFeedbackEdges"),(0,s.K)(J,"orderEdgesByNesting");var Q=(0,i.xY)({afterPaint:y,prepareLayout:U,measureLayout:(0,s.K)((e,t)=>(0,i.QV)(e,t,{unwrapGroupLabels:!0}),"measureLayout"),runLayoutCore:z,paintOptions:{skipIntersect:!0}});function Z(e){(0,a.XV)(e.getConfig())}function ee(e){let t=new Map(e.map(e=>[e.id,e]));e.sort((e,n)=>e.isGroup!==n.isGroup?e.isGroup?-1:1:e.isGroup&&n.isGroup?et(e,t)-et(n,t):0)}function et(e,t){let n=0,r=new Set,i=e.parentId;for(;i&&!r.has(i);){r.add(i);let e=t.get(i);if(!e?.isGroup)break;n++,i=e.parentId}return n}function en(e){let t=e.helpers;if(!t)throw Error("ELK layout requires Mermaid internal helpers");return{algorithm:e.preparedLayout?.algorithm??e.options?.algorithm,rootLayoutOptions:e.options?.rootLayoutOptions,common:t.common,getConfig:t.getConfig,interpolateToCurve:t.interpolateToCurve,log:t.log}}(0,s.K)(Z,"syncHostConfig"),(0,s.K)(ee,"orderNodesForElkPaint"),(0,s.K)(et,"getGroupDepth"),(0,s.K)(en,"getElkLayoutContext");var er={default:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"BALANCED",cycleBreaking:"DEPTH_FIRST"},legacy:{layering:"NETWORK_SIMPLEX",placement:"BRANDES_KOEPF",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY"},modelOrder:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"GREEDY_MODEL_ORDER"},depthFirst:{layering:"NETWORK_SIMPLEX",placement:"NETWORK_SIMPLEX",containerPlacement:"BRANDES_KOEPF",alignment:"NONE",cycleBreaking:"DEPTH_FIRST"}};function ei(e){return void 0!==e&&Object.hasOwn(er,e)?er[e]:er.default}function eo(e,t,n){let r=ei(e.config.elk?.preset),i={id:"root",layoutOptions:{"elk.hierarchyHandling":"INCLUDE_CHILDREN","elk.algorithm":t,"elk.layered.nodePlacement.strategy":e.config.elk?.nodePlacementStrategy??r.placement,"elk.layered.nodePlacement.bk.fixedAlignment":e.config.elk?.nodePlacementAlignment??r.alignment,"elk.layered.mergeEdges":e.config.elk?.mergeEdges,"elk.direction":"DOWN","spacing.baseValue":40,"elk.layered.crossingMinimization.forceNodeModelOrder":e.config.elk?.forceNodeModelOrder,"elk.layered.considerModelOrder.strategy":e.config.elk?.considerModelOrder,"elk.layered.unnecessaryBendpoints":!0,"elk.layered.cycleBreaking.strategy":e.config.elk?.cycleBreakingStrategy??r.cycleBreaking,"elk.layered.layering.strategy":e.config.elk?.layeringStrategy??r.layering,"elk.layered.layering.coffmanGraham.layerBound":e.config.elk?.layeringLayerBound,"elk.layered.wrapping.multiEdge.improveCuts":!0,"elk.layered.wrapping.multiEdge.improveWrappedEdges":!0,"elk.layered.edgeRouting.selfLoopDistribution":"EQUALLY","elk.layered.mergeHierarchyEdges":!0,"elk.spacing.portsSurrounding":C},children:[],edges:[]};return"elk.rectpacking"===t&&Object.assign(i.layoutOptions,_,{"elk.contentAlignment":"H_CENTER V_TOP","elk.padding":"[top=15,left=15,bottom=15,right=15]"}),n&&Object.assign(i.layoutOptions,n),Object.assign(i.layoutOptions,x,b,m),i}function el(e,t){let n={parentById:{},childrenById:{}},r=e.filter(e=>e.isGroup);return t.info("Subgraphs - ",r),r.forEach(t=>{e.filter(e=>e.parentId===t.id).forEach(e=>{n.parentById[e.id]=t.id,n.childrenById[t.id]??=[],n.childrenById[t.id].push(e.id)})}),n}function ea(e,t,n,r,i){let o=e.filter(e=>e?.parentId===i);return r.log.info("addVertices APA12",o,i),o.forEach(i=>{es(t,e,i,n,r)}),t}function es(e,t,n,r,i){let o=ed(n);e.children.push(o),r[n.id]=o,n.isGroup&&(o.children=[],ea(t,o,r,i,n.id),o.labelData=eu(n,i.getConfig()))}function ed(e){let t={...e};return delete t.domId,e.isGroup?t.children=[]:(t.width=e.width??0,t.height=e.height??0,e.spreadPorts&&(t.layoutOptions={...t.layoutOptions,"elk.portAlignment.default":"CENTER"})),t}function eu(e,t){let n=e.labelData;return n||(e.labelBBox?{width:e.labelBBox.width,height:Math.max(0,e.labelBBox.height-2),wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth}:{width:0,height:0,wrappingWidth:e.wrappingWidth??t.flowchart?.wrappingWidth})}function eh(e,t,n,r){r.log.info("abc78 DAGA edges = ",e);let i={};return e.edges.forEach(e=>{let o=e.id;i[o]=(i[o]??-1)+1,e.id=o,r.log.info("abc78 new link id to be used is",o,o,i[o]);let{source:l,target:a,sourceId:s,targetId:d}=ef(e,n);r.log.debug("abc78 source and target",l,a),t.edges.push({...e,sources:[l],targets:[a],sourceId:s,targetId:d,labels:[{width:e.width??0,height:e.height??0,orgWidth:e.width??0,orgHeight:e.height??0,text:e.label??"",layoutOptions:{"edgeLabels.inline":"true","edgeLabels.placement":"CENTER"}},...(r.rootLayoutOptions?.["elk.algorithm"]??r.algorithm??"elk.layered")==="elk.layered"?eg(e):[]]})}),t}function eg(e){let t={startLeft:e.startLabelLeft,startRight:e.startLabelRight,endLeft:e.endLabelLeft,endRight:e.endLabelRight};return Object.entries(e.terminalLabelSizes??{}).map(([n,r])=>{let i=n.startsWith("start"),o=i?e.arrowTypeStart:e.arrowTypeEnd,l=o&&"none"!==o?6:0;return{terminal:n,text:t[n],width:r.width+2*l,height:r.height+2*l,layoutOptions:{"edgeLabels.placement":i?"TAIL":"HEAD"}}})}function ef(e,t){let n=e.start,r=e.end,i=n?t[n]:void 0,o=r?t[r]:void 0;return i&&o?{source:n,target:r,sourceId:n,targetId:r}:{source:n,target:r}}function ep(e,t,n,r){e.nodes.forEach(i=>{let o=t[i.id];o&&void 0!==n.childrenById[o.id]&&(o.labels=[{text:o.label,width:o?.labelData?.width??50,height:o?.labelData?.height??50}],r.log.debug("UIO node label",o?.labelData?.width,o.padding),o.layoutOptions=j(o,e.config.elk,r.algorithm,r.log),delete o.x,delete o.y,delete o.width,delete o.height)})}function ec(e,t,n,r){r.debug("APA01 processing edges, count:",e.edges.length),e.edges.forEach((e,i)=>{r.debug("APA01 processing edge",i,":",e);let o=e.sources[0],l=e.targets[0];if(r.debug("APA01 source:",o,"target:",l),r.debug("APA01 nodeDb[source]:",t[o]),r.debug("APA01 nodeDb[target]:",t[l]),t[o]&&t[l]&&t[o].parentId!==t[l].parentId){let e=h(o,l,n);ey(t,o,e,r),ey(t,l,e,r)}})}function ey(e,t,n,r){let i=e[t];i&&(i.layoutOptions??={},"SEPARATE_CHILDREN"===i.layoutOptions["elk.hierarchyHandling"]&&X(i.metadata?.algorithm)&&(r.debug("Dropping explicit algorithm for node",i.id,"due to cross-boundary edges"),B(i.layoutOptions),Object.assign(i.layoutOptions,Y(i))),i.layoutOptions["elk.hierarchyHandling"]="INCLUDE_CHILDREN",i.id!==n&&i.parentId&&ey(e,i.parentId,n,r))}async function ex(e,t,n){let r=globalThis.__mermaidProfiler;try{let i;r?.begin("layoutCore");try{i=await e.layout(t)}finally{r?.end()}return n.debug("APA01 after - success"),n.debug("APA01 layout result:",i),i}catch(e){throw n.error("ELK layout error:",e),e}}function eb(e,t,n,r){let i=new Map(e.nodes.map(e=>[e.id,e]));eE(t.children??[],n,i,0,0,0,r),ew(t.children??[],n,i,t),eD(e,t,n,r)}function em(e,t=new Set){for(let n of e.children??[])t.add(n.id),em(n,t);return t}function ek(e,t,n,r){let i=[];for(let o of e.edges??[]){let e=o.sources?.[0]??o.start,l=o.targets?.[0]??o.end,a=t.has(e)&&t.has(l),s=e===r,d=l===r;if(!a&&!s&&!d)continue;let u=ej(e,l,n.parentLookupDb,n.nodeDb);for(let e of o.sections??[])for(let t of a?[e.startPoint,...e.bendPoints??[],e.endPoint]:[s?e.startPoint:null,d?e.endPoint:null])t&&i.push({x:t.x+u.x,y:t.y+u.y})}return i}function ew(e,t,n,r={}){for(let i of e){if(!i?.isGroup)continue;let e=i.children??[];ew(e,t,n,r);let o=t.nodeDb[i.id],l=e.map(e=>t.nodeDb[e.id]).filter(e=>e?.offset&&e.width&&e.height);if(!o?.offset||0===l.length)continue;let a=ek(r,em(i),t,i.id),s=[...l.map(e=>e.offset.posX),...l.map(e=>e.offset.posX+e.width),...a.map(e=>e.x)],d=[...l.map(e=>e.offset.posY),...l.map(e=>e.offset.posY+e.height),...a.map(e=>e.y)],u=o.offset,h=Math.max(u.posX,Math.min(...s)-24),g=Math.min(u.posX+o.width,Math.max(...s)+24),f=Math.min(u.posY+o.height,Math.max(...d)+24),p=u.posY,c=G(i),y=h,x=g-h;if(x<c){y-=(c-x)/2,x=c;let e=u.posX+o.width;y=Math.max(u.posX,Math.min(y,e-x)),x=Math.min(x,o.width)}let b=f-p;if(b<=0||x<=0)continue;o.elkOrigin??={posX:u.posX,posY:u.posY},o.offset.posX=y,o.offset.width=x,o.offset.height=b,o.width=x,o.height=b,o.x=y+x/2,o.y=p+b/2;let m=n.get(i.id);m&&(m.x=o.x,m.y=o.y,m.width=x,m.height=b)}}function eE(e,t,n,r,i,o,l){e.forEach(e=>{if(!e)return;let a=t.nodeDb[e.id]??e,s=Math.max(e.width,e.labels&&e.labels[0]?.width||0),d={posX:e.x+r,posY:e.y+i,x:r,y:i,depth:o,width:s,height:e.height};a.offset=d,a.x=d.posX+e.width/2,a.y=d.posY+e.height/2,a.width=e.width,a.height=e.height;let u=n.get(e.id);u&&(u.x=a.x,u.y=a.y,u.width=e.isGroup?Math.max(e.width,e.labelData?.width??0):e.width,u.height=e.height,u.labelData=e.labelData,u.labels=e.labels),e.isGroup?(l.debug("Id abc88 subgraph = ",e.id,e.x,e.y,e.labelData),eE(e.children??[],t,n,d.posX,d.posY,o+1,l)):l.info("Id NODE = ",e.id,e.x,e.y,r,i,`translate(${a.x}, ${a.y})`)})}function eM(e,t){let n=Math.abs(t.x-e.x),r=Math.abs(t.y-e.y);return n>.01&&r<=.01?"h":r>.01&&n<=.01?"v":void 0}function eK(e){let t=[],n=e,r=eL(n);r&&(n=r.points,t.push(r.run));let i=eL([...n].reverse());return i&&(n=i.points.reverse(),t.push(i.run)),{points:n,runs:t}}function eL(e){if(e.length<5)return null;let[t,n,r,i]=e,o=eM(t,n);if(!o||eM(r,i)!==o||eM(n,r)!==("h"===o?"v":"h")||Math.hypot(n.x-t.x,n.y-t.y)>30)return null;let l="h"===o?Math.abs(r.y-n.y):Math.abs(r.x-n.x);if(l<.01||l>16||!("h"===o?Math.sign(n.x-t.x)===Math.sign(i.x-r.x):Math.sign(n.y-t.y)===Math.sign(i.y-r.y)))return null;let a=3;for(;a+1<e.length&&eM(e[a],e[a+1])===o;)a++;if(a===e.length-1)return null;let s=[...e];for(let n=2;n<=a;n++)s[n]="h"===o?{x:e[n].x,y:t.y}:{x:t.x,y:e[n].y};let d={old:{a:e[2],b:e[a]},new:{a:s[2],b:s[a]}};return s.splice(1,2),{points:s,run:d}}function eS(e,t,n,r){let i=(0,s.K)((e,t,n)=>(t.x-e.x)*(n.y-e.y)-(t.y-e.y)*(n.x-e.x),"side"),o=i(n,r,e),l=i(n,r,t),a=i(e,t,n),d=i(e,t,r);return(o>0&&l<0||o<0&&l>0)&&(a>0&&d<0||a<0&&d>0)}function eO(e,t){let n=0;for(let r=0;r<e.length-1;r++)for(let i=0;i<t.length-1;i++)eS(e[r],e[r+1],t[i],t[i+1])&&n++;return n}function eP(e,t,n){let r=n.x-t.x,i=n.y-t.y,o=r*r+i*i;return 0===o?0:Math.max(0,Math.min(1,((e.x-t.x)*r+(e.y-t.y)*i)/o))}function eI(e,t,n){return{x:e.x+n*(t.x-e.x),y:e.y+n*(t.y-e.y)}}function eA(e,t){let n=null;for(let r of t){let t=eP(e,r.old.a,r.old.b),i=eI(r.old.a,r.old.b,t),o=i.x-e.x,l=i.y-e.y,a=o*o+l*l;(!n||a<n.distSq)&&(n={distSq:a,point:eI(r.new.a,r.new.b,t)})}return n?.point??null}function ev(e,t,n){let r=0,i=1,o=t.x-e.x,l=t.y-e.y;for(let[t,a]of[[-o,e.x-n.x1],[o,n.x2-e.x],[-l,e.y-n.y1],[l,n.y2-e.y]])if(0===t){if(a<0)return!1}else t<0?r=Math.max(r,a/t):i=Math.min(i,a/t);return r<i}(0,s.K)(ei,"resolveElkPreset"),(0,s.K)(eo,"createRootElkGraph"),(0,s.K)(el,"addSubGraphs"),(0,s.K)(ea,"addVertices"),(0,s.K)(es,"addVertex"),(0,s.K)(ed,"createElkNode"),(0,s.K)(eu,"getMeasuredLabelData"),(0,s.K)(eh,"addEdgesToElkGraph"),(0,s.K)(eg,"terminalElkLabels"),(0,s.K)(ef,"getEdgeStartEndPoint"),(0,s.K)(ep,"configureSubgraphNodes"),(0,s.K)(ec,"configureCrossHierarchyEdges"),(0,s.K)(ey,"setIncludeChildrenPolicy"),(0,s.K)(ex,"runElkLayout"),(0,s.K)(eb,"applyElkLayoutResult"),(0,s.K)(em,"collectDescendantIds"),(0,s.K)(ek,"internalEdgePoints"),(0,s.K)(ew,"evenGroupFrames"),(0,s.K)(eE,"applyElkNodePositions"),(0,s.K)(eM,"axisOf"),(0,s.K)(eK,"straightenTerminalJogsWithRuns"),(0,s.K)(eL,"straightenFront"),(0,s.K)(eS,"segmentsCrossStrict"),(0,s.K)(eO,"crossingCount"),(0,s.K)(eP,"paramOnSegment"),(0,s.K)(eI,"pointAtParam"),(0,s.K)(eA,"projectLabelOntoStraightenedRun"),(0,s.K)(ev,"segmentHitsBox");var eN=(0,s.K)((e,t)=>({x1:e.x-t.width/2,y1:e.y-t.height/2,x2:e.x+t.width/2,y2:e.y+t.height/2}),"labelBox");function eT(e){let t=e.map(e=>e.points??[]),n=e.map(e=>null!=e.x&&null!=e.y&&e.label&&e.width&&e.height?{centre:{x:e.x,y:e.y},size:{width:e.width,height:e.height}}:void 0),r=(0,s.K)((e,t)=>{let n=t&&eN(t.centre,t.size);return!!n&&e.some((t,r)=>r<e.length-1&&ev(t,e[r+1],n))},"covers"),i=[];for(let[o,l]of e.entries()){let e=t[o];if(e.length<5)continue;let{points:a,runs:s}=eK(e);if(a===e)continue;let d=n[o],u=d&&eA(d.centre,s),h=d&&u?{centre:u,size:d.size}:d,g=0,f=0,p=0,c=0;for(let[i,l]of t.entries())i===o||l.length<2||(g+=eO(e,l),f+=eO(a,l),p+=Number(r(l,d))+Number(r(e,n[i])),c+=Number(r(l,h))+Number(r(a,n[i])));f>g||c>p||(l.points=a,t[o]=a,n[o]=h,i.push({edge:l,runs:s}))}return i}function eD(e,t,n,r){let i=new Map(e.edges.map(e=>[e.id,e])),o=e.config.elk?.straightenEdges!==!1,l=new Map;for(let t of e.edges)delete t.terminalLabelCenters;let a=new Map(e.nodes.map(e=>[e.id,e])),d=new Set;if(t.edges?.forEach(e=>{if(!e.sections?.length)return;let t=n.nodeDb[e.sources?.[0]??e.start],r=n.nodeDb[e.targets?.[0]??e.end];if(!t||!r)return;let i=ej(e.start??e.sourceId??e.sources?.[0],e.end??e.targetId??e.targets?.[0],n.parentLookupDb,n.nodeDb),o=e.sections[0];"rect33"!==t.shape&&eG(t,{x:o.startPoint.x+i.x,y:o.startPoint.y+i.y},a,d),"rect33"!==r.shape&&eG(r,{x:o.endPoint.x+i.x,y:o.endPoint.y+i.y},a,d)}),t.edges?.forEach(e=>{let t=i.get(e.id);if(!t)return;let o=!0===e.layoutReversed,a=e.sources?.[0]??e.start,d=e.targets?.[0]??e.end;o&&([a,d]=[d,a]);let u=n.nodeDb[a],h=n.nodeDb[d];if(!u||!h)return;if(!e.sections?.length){let n=(0,s.K)(e=>({x:(e.offset?.posX??e.x??0)+(e.width??0)/2,y:(e.offset?.posY??e.y??0)+(e.height??0)/2}),"centre"),i=n(u),o=n(h);u.x=i.x,u.y=i.y,h.x=o.x,h.y=o.y;let l=eH([i,o],u,h,r);t.points=l,t.curve="linear";let a=l[0],d=l[l.length-1];t.x=(a.x+d.x)/2,t.y=(a.y+d.y)/2,r.debug("APA18 no edge sections, using a straight line",e.id,t.points);return}let g=e.start??e.sourceId??a,f=e.end??e.targetId??d,p=ej(g,f,n.parentLookupDb,n.nodeDb);r.debug("APA18 offset",p,g," ==> ",f,"edge:",e,u);let c=eY(e.sections[0],p);o&&c.reverse();let y={start:c[0],end:c[c.length-1]};u.x=u.offset.posX+u.width/2,u.y=u.offset.posY+u.height/2,h.x=h.offset.posX+h.width/2,h.y=h.offset.posY+h.height/2,"rect33"!==u.shape&&c.unshift({x:u.x,y:u.y}),"rect33"!==h.shape&&c.push({x:h.x,y:h.y}),t.points=eq(eJ(eH(c,u,h,r),e3(h),ez(t),r),e3(u),eV(t),r),t.curve="rounded";let x=e.labels?.[0];for(let n of(x&&(t.x=x.x+p.x+x.width/2,t.y=x.y+p.y+x.height/2),e.labels??[]))n.terminal&&(n.x||n.y)&&(t.terminalLabelCenters??={},t.terminalLabelCenters[n.terminal]={x:n.x+p.x+n.width/2,y:n.y+p.y+n.height/2});t.terminalLabelCenters&&l.set(t,y)}),o)for(let{edge:t,runs:n}of eT(e.edges)){if(null==t.x||null==t.y)continue;let e=eA({x:t.x,y:t.y},n);e&&(t.x=e.x,t.y=e.y)}for(let[e,t]of l)eF(e,t);e$(e.edges,e.nodes),eX(e.edges,e.nodes),eC(e.edges)}function eC(e){let t=new Map;for(let n of e){if(null==n.x||null==n.y||!n.label||!n.width)continue;let e=[n.start??"",n.end??""].sort().join("\0"),r=t.get(e);r?r.push(n):t.set(e,[n])}for(let e of t.values()){if(2!==e.length)continue;let[t,n]=e;if(Math.abs(t.y-n.y)>Math.max(t.height??0,n.height??0))continue;let r=t.width/2+n.width/2+4,i=n.x-t.x,o=r-Math.abs(i);if(o<=0)continue;let l=Math.sign(i)||1;t.x=t.x-l*o/2,n.x=n.x+l*o/2}}(0,s.K)(eT,"straightenEdgeTerminals"),(0,s.K)(eD,"applyElkEdgeLayout"),(0,s.K)(eC,"separateOppositeEdgeLabels");var e_=(0,s.K)((e,t)=>e.x1<t.x2&&t.x1<e.x2&&e.y1<t.y2&&t.y1<e.y2,"boxesOverlap");function eR(e,t){let n=t.filter(e=>void 0!==e.x&&void 0!==e.y),r=(0,s.K)(e=>eN({x:e.x,y:e.y},{width:e.width??0,height:e.height??0}),"boxOf"),i=n.filter(e=>!e.isGroup).map(r),o=n.filter(e=>e.isGroup).map(r).flatMap(({x1:e,y1:t,x2:n,y2:r})=>[[{x:e,y:t},{x:n,y:t}],[{x:n,y:t},{x:n,y:r}],[{x:n,y:r},{x:e,y:r}],[{x:e,y:r},{x:e,y:t}]]),l=e.filter(e=>e.label&&e.width&&e.height&&void 0!==e.x).map(e=>eN({x:e.x,y:e.y},{width:e.width,height:e.height})),a=(0,s.K)((e,t=0)=>{let n={x1:e.x1-t,y1:e.y1-t,x2:e.x2+t,y2:e.y2+t};return o.some(([e,t])=>ev(e,t,n))},"hitsFrame"),d=(0,s.K)((t,n,r,o,s=0)=>i.some(e=>e_(t,e))||l.some(e=>e_(t,e))||a(t,s)||e.some(e=>(e.points??[]).some((r,i,l)=>i<l.length-1&&(e!==n||i!==o)&&ev(r,l[i+1],t)))||e.some(e=>Object.entries(e.terminalLabelCenters??{}).some(([i,o])=>{let l=e.terminalLabelSizes?.[i];return(e!==n||i!==r)&&void 0!==l&&e_(t,eN(o,l))})),"blocked");return{hitsFrame:a,blocked:d}}function*eB(e){for(let t of e){let e=t.points;if(e&&!(e.length<2)&&t.terminalLabelCenters&&t.terminalLabelSizes)for(let[n,r]of Object.entries(t.terminalLabelCenters)){let i=t.terminalLabelSizes[n],o=n.startsWith("start"),l=o?0:e.length-2,[a,s]=[e[l],e[l+1]],d=Math.hypot(s.x-a.x,s.y-a.y);i&&0!==d&&(yield{edge:t,key:n,center:r,size:i,atStart:o,segment:l,from:a,to:s,length:d})}}}function e$(e,t){let{hitsFrame:n,blocked:r}=eR(e,t);for(let{edge:t,key:i,center:o,size:l,atStart:a,segment:d,from:u,to:h,length:g}of eB(e)){if(!n(eN(o,l)))continue;let[e,f]=a?[h,u]:[u,h],p={x:(f.x-e.x)/g,y:(f.y-e.y)/g},c=(Math.abs(p.x)*l.width+Math.abs(p.y)*l.height)/2,y=(0,s.K)(e=>(e.x-f.x)*p.x+(e.y-f.y)*p.y,"along"),x=(0,s.K)(e=>y(e)+c<=0&&y(e)-c>=-g,"onSegment");for(let e=1;e<=g;e++){let n=[e,-e].map(e=>({x:o.x+e*p.x,y:o.y+e*p.y})).find(e=>x(e)&&!r(eN(e,l),t,i,d,2));if(n){t.terminalLabelCenters[i]=n;break}}}}function eX(e,t){let{blocked:n}=eR(e,t);for(let{edge:t,key:r,center:i,size:o,segment:l,from:a,to:s,length:d}of eB(e)){let e={x:-(s.y-a.y)/d,y:(s.x-a.x)/d},u=(i.x-a.x)*e.x+(i.y-a.y)*e.y;if(0===u||u>0===r.endsWith("Right"))continue;let h={x:i.x-2*u*e.x,y:i.y-2*u*e.y};n(eN(h,o),t,r,l)||(t.terminalLabelCenters[r]=h)}}function eF(e,t){let n=e.points;if(!n?.length||!e.terminalLabelCenters)return;let r={start:{x:n[0].x-t.start.x,y:n[0].y-t.start.y},end:{x:n[n.length-1].x-t.end.x,y:n[n.length-1].y-t.end.y}};for(let[t,n]of Object.entries(e.terminalLabelCenters)){let i=t.startsWith("start")?r.start:r.end;e.terminalLabelCenters[t]={x:n.x+i.x,y:n.y+i.y}}}function eG(e,t,n,r){let i=e.width??0,o=e.height??0,l=e.offset.posY,a=.5>=Math.abs(t.y-l)||.5>=Math.abs(t.y-(l+o));if((a?i:o)>=24||r.has(e.id))return;r.add(e.id);let s=a?t.x-(e.offset.posX+i/2):t.y-(e.offset.posY+o/2);if(.01>Math.abs(s))return;a?(e.offset.posX+=s,e.x=e.offset.posX+i/2):(e.offset.posY+=s,e.y=e.offset.posY+o/2);let d=n.get(e.id);d&&(d.x=e.offset.posX+i/2,d.y=e.offset.posY+o/2)}function eY(e,t){let n=e.startPoint,r=e.endPoint,i=(e.bendPoints?e.bendPoints:[]).map(e=>({x:e.x+t.x,y:e.y+t.y}));return[{x:n.x+t.x,y:n.y+t.y},...i,{x:r.x+t.x,y:r.y+t.y}]}function ej(e,t,n,r){let i=h(e,t,n);if(void 0===i||"root"===i)return{x:0,y:0};let o=r[i],l=o?.elkOrigin??o?.offset;return{x:l?.posX??0,y:l?.posY??0}}function eH(e,t,n,r){let i,o=Array.isArray(e)?[...e]:[],l=e3(n);r.debug("PPP cutter2: Points before cutter2:",JSON.stringify(e),"endBounds:",l,E(l,e[e.length-1]));{let e=e3(t),l=e3(n),a=!!t?.isGroup,s=!!n?.isGroup,{candidate:d,centerApprox:u}=e4(o,t,"start"),{candidate:h,centerApprox:g}=e4(o,n,"end"),f=a&&E(e,d),p=s&&E(l,h);e6(o,"start",f&&u),e6(o,"end",p&&g),a&&!f&&(f=e7(o,e,"start")),s&&!p&&(p=e7(o,l,"end")),f||p?(f||te(o,t,e,r),p||tt(o,n,l,r),r.debug("PPP cutter2: skipping cutter2 due to on-border group endpoint(s)",{skipStart:f,skipEnd:p,startCenterApprox:u,endCenterApprox:g,startCandidate:d,endCandidate:h}),i=o):i=tr(t,n,o,r)}if(r.debug("PPP cutter2: Points after cutter2:",JSON.stringify(i)),!Array.isArray(i)||i.length<2||eW(i)){r.warn("POI cutter2: Invalid points from cutter2, falling back to prevPoints",i);let e=o.filter(e=>Number.isFinite(e?.x)&&Number.isFinite(e?.y));i=e.length>=2?e:o}return r.debug("UIO cutter2: Points after cutter2 (sanitized):",i),eU(i,r)}function eW(e){return e?.some(e=>!Number.isFinite(e?.x)||!Number.isFinite(e?.y))}function eU(e,t){let n=e.filter((e,t,n)=>{if(0===t)return!0;let r=n[t-1];return Math.abs(e.x-r.x)>1e-6||Math.abs(e.y-r.y)>1e-6});return n.length!==e.length&&t.debug("UIO cutter2: removed consecutive duplicate points",{before:e,after:n}),n}function ez(e){return T(e.arrowTypeEnd)}function eV(e){return T(e.arrowTypeStart)}function eq(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[0],o=e[1],l=Math.hypot(o.x-i.x,o.y-i.y);if(l>=Math.max(8,2*n)||!E(t,o,1))return e;let a=[i,...e.slice(2)];return r.debug("UIO cutter2: removed short start marker segment",{before:e,after:a,markerOffset:n,segmentLength:l}),a}function eJ(e,t,n,r){if(n<=0||e.length<3)return e;let i=e[e.length-1],o=e[e.length-2],l=Math.hypot(i.x-o.x,i.y-o.y);if(l>=Math.max(8,2*n)||!E(t,o,1))return e;let a=[...e.slice(0,-2),i];return r.debug("UIO cutter2: removed short end marker segment",{before:e,after:a,markerOffset:n,segmentLength:l}),a}function eQ(e,t){let n=e.edges.defaultInterpolate,r=e.edges.defaultStyle,i=t.getConfig();e.edges.forEach(e=>{let o=e2(e,{defaultStyle:r,defaultInterpolate:n,confCurve:i.curve},t);Object.assign(e,o)})}function eZ(e){return void 0!==e.classes?e.classes:e.start&&e.end?`flowchart-link LS_${e.start} LE_${e.end}`:void 0}function e0(e,t,n){let r="normal",i="solid",o=[],l=[];return"dotted"===e?(i="dotted",o=["fill:none","stroke-width:2px","stroke-dasharray:3"]):"thick"===e?(r="thick",o=["stroke-width: 3.5px","fill:none"]):(o=t??["fill:none"],void 0!==n&&(l=n)),{thickness:r,pattern:i,style:o,labelStyle:l}}function e1(e,t,n){return void 0!==e?e:void 0!==t?t:n}function e2(e,t,n){let r={};r.minlen=e.minlen??e.length??1,r.text=e.text??e.label,r.arrowhead=e.arrowhead??("arrow_open"===e.type?"none":"normal");let i=D[e.type??"arrow_open"]??D.arrow_open;r.arrowTypeStart=e.arrowTypeStart??i[0],r.arrowTypeEnd=e.arrowTypeEnd??i[1],r.startLabelRight=e.startLabelRight,r.endLabelLeft=e.endLabelLeft;let o=e0(e.stroke,t.defaultStyle,t.defaultLabelStyle);r.thickness=e.thickness??o.thickness,r.pattern=e.pattern??o.pattern,r.style=e.style??o.style,r.labelStyle=e.labelStyle??o.labelStyle,r.classes=eZ(e),r.curve=n.interpolateToCurve(e1(e.curve??e.interpolate,t.defaultInterpolate,t.confCurve),d.lU);let l=(r.text??"")!=="";return void 0!==e.arrowheadStyle?r.arrowheadStyle=e.arrowheadStyle:(l||void 0!==e.style)&&(r.arrowheadStyle="fill: #333"),r.labelpos=e.labelpos??(l?"c":void 0),r.labelType=e.labelType,r.label=(e.label??r.text??"").replace(n.common.lineBreakRegex,"\n"),r}function e5(e){return Math.max(e.width??0,G(e))}function e3(e){let t=e?.isGroup?e5(e):e.width;return{x:e.offset.posX+e.width/2,y:e.offset.posY+e.height/2,width:t??0,height:e.height??0,padding:e.padding}}function e9(e,t,n=1e-6){return Math.abs(e-t)<n}function e8(e,t){return e9(e.x,t.x??0)&&e9(e.y,t.y??0)}function e4(e,t,n){if(!e?.length)return{candidate:{x:t.x??0,y:t.y??0},centerApprox:!0};if("start"===n){let n=e[0],r=e8(n,t);return{candidate:r&&e.length>1?e[1]:n,centerApprox:r}}{let n=e[e.length-1],r=e8(n,t);return{candidate:r&&e.length>1?e[e.length-2]:n,centerApprox:r}}}function e6(e,t,n){n&&("start"===t?e.length>0&&e.shift():e.length>0&&e.pop())}function e7(e,t,n){let r="start"===n?1:-1,i="start"===n?0:e.length-1,o=i;for(;i>=0&&i<e.length&&!K(t,e[i]);)i+=r;if(i===o||i<0||i>=e.length)return!1;let l=e[i],a=e[i-r],s=l.x-a.x,d=l.y-a.y,u=Math.min(0===s?1/0:(t.x+Math.sign(s)*t.width/2-a.x)/s,0===d?1/0:(t.y+Math.sign(d)*t.height/2-a.y)/d),h={x:a.x+u*s,y:a.y+u*d};return"start"===n?e.splice(0,i,h):e.splice(i+1,e.length-i-1,h),!0}function te(e,t,n,r){let i=-1;for(let[t,r]of e.entries())if(K(n,r)){i=t;break}if(-1!==i){let o=v(t,n,e[i],e[0]);N(e,"start",o),r.debug("UIO cutter2: start-only intersection applied",{startIntersection:o})}}function tt(e,t,n,r){let i=-1;for(let t=e.length-1;t>=0;t--)if(K(n,e[t])){i=t;break}if(-1!==i){let o=v(t,n,e[i],e[e.length-1]);N(e,"end",o),r.debug("UIO cutter2: end-only intersection applied",{endIntersection:o})}}function tn(e,t,n,r,i){if(e?.isGroup)return null;let o=n[r],l=n[r+i];return o&&l?A(e,t,o,l):null}function tr(e,t,n,r){let i=e3(e),o=e3(t);if(0===n.length)return[];let l=[...n],a=l[0],s=l[l.length-1];r.debug("PPP cutter2: bounds",{startBounds:i,endBounds:o}),r.debug("PPP cutter2: original points",n);let d=-1;for(let[e,t]of l.entries())-1===d&&K(i,t)&&(d=e);if(-1!==d){let t=l[d],n=tn(e,i,l,d,1)??v(e,i,t,a);r.debug("UIO cutter2: start intersection",n),N(l,"start",n)}let u=null,h=-1;for(let e=l.length-1;e>=0;e--)if(K(o,l[e])){u=l[e],h=e;break}if(!u&&l.length>1&&(u=l[l.length-2],h=l.length-2),u){let e=tn(t,o,l,h,-1)??v(t,o,u,s);r.debug("UIO cutter2: end intersection",{endIntersection:e,outsideIndexForEnd:h}),N(l,"end",e)}if(l.length>1){let e=l[l.length-1],t=l[l.length-2],n=Math.sqrt((e.x-t.x)**2+(e.y-t.y)**2);n<2&&(r.debug("UIO cutter2: trimming tail point (too close)",{distance:n,lastPoint:e,secondLastPoint:t}),l.pop())}return r.debug("UIO cutter2: final points",l),l}(0,s.K)(eR,"terminalLabelObstacles"),(0,s.K)(eB,"placedTerminalLabels"),(0,s.K)(e$,"slideTerminalLabelsOffFrames"),(0,s.K)(eX,"putTerminalLabelsOnTheirSide"),(0,s.K)(eF,"followMovedEndpoints"),(0,s.K)(eG,"alignDegenerateNodeToAnchor"),(0,s.K)(eY,"createEdgePointsFromSection"),(0,s.K)(ej,"calcOffset"),(0,s.K)(eH,"sanitizeElkEdgePoints"),(0,s.K)(eW,"hasInvalidPoint"),(0,s.K)(eU,"dedupeConsecutivePoints"),(0,s.K)(ez,"getEndMarkerPathOffset"),(0,s.K)(eV,"getStartMarkerPathOffset"),(0,s.K)(eq,"ensureStartMarkerSegmentLength"),(0,s.K)(eJ,"ensureEndMarkerSegmentLength"),(0,s.K)(eQ,"applyElkEdgeRenderData"),(0,s.K)(eZ,"buildFallbackEdgeClasses"),(0,s.K)(e0,"computeStroke"),(0,s.K)(e1,"getCurve"),(0,s.K)(e2,"buildEdgeData"),(0,s.K)(e5,"getEffectiveGroupWidth"),(0,s.K)(e3,"boundsFor"),(0,s.K)(e9,"approxEq"),(0,s.K)(e8,"isCenterApprox"),(0,s.K)(e4,"getCandidateBorderPoint"),(0,s.K)(e6,"dropAutoCenterPoint"),(0,s.K)(e7,"clipGroupEndpoint"),(0,s.K)(te,"applyStartIntersectionIfNeeded"),(0,s.K)(tt,"applyEndIntersectionIfNeeded"),(0,s.K)(tn,"attachAlongDepartureAxis"),(0,s.K)(tr,"cutter2")},90199:(e,t,n)=>{n.d(t,{Z:()=>w});var r=n(77351),i=n(88252),o=n(11807).hp;function l(e){let t=[];for(let n=0;n<e.length-1;n++)t.push({a:e[n],b:e[n+1]});return t}function a(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,l=r.x-n.x,a=r.y-n.y,s=i*a-o*l;if(0===s)return null;let d=n.x-e.x,u=n.y-e.y,h=(d*a-u*l)/s,g=(d*o-u*i)/s;return h<=1e-6||h>=.999999||g<=1e-6||g>=.999999?null:{point:{x:e.x+h*i,y:e.y+h*o},tA:h,tB:g}}function s(e){return Math.abs(e.b.x-e.a.x)>=Math.abs(e.b.y-e.a.y)}function d(e,t,n){if("rounded"!==e.curve)return!1;let r=e.points,i=r[t],o=r[t+1];if(!i||!o)return!1;let l=Math.hypot(o.x-i.x,o.y-i.y),a=n*l,s=t>0?y(r[t-1],i,o,5):null;if(s&&a<s.cutLen)return!0;let d=t+2<r.length?y(i,o,r[t+2],5):null;return null!==d&&l-a<d.cutLen}function u(e){let t=[];for(let n=0;n<e.length;n++){let r=e[n],i=l(r.points);for(let o=n+1;o<e.length;o++){let n=e[o],u=l(n.points);for(let[e,o]of i.entries())for(let[i,l]of u.entries()){let u=a(o.a,o.b,l.a,l.b);if(!u||d(r,e,u.tA)||d(n,i,u.tB))continue;let h=s(o);h!==s(l)&&h?t.push({jumpEdgeId:r.id,otherEdgeId:n.id,segIndex:e,t:u.tA,point:u.point}):t.push({jumpEdgeId:n.id,otherEdgeId:r.id,segIndex:i,t:u.tB,point:u.point})}}}return t}function h(e){let t=Math.round(1e3*e)/1e3;return Number.isInteger(t),`${t}`}function g(e){return`${h(e.x)},${h(e.y)}`}function f(e){let t=e.b.x-e.a.x,n=e.b.y-e.a.y;return Math.abs(t)>=Math.abs(n)?+(t>=0):+(n>=0)}function p(e,t){if(e.length<2)return e.map(e=>({...e}));let n=e.map(e=>({...e})),i=t.arrowTypeStart&&r.hq[t.arrowTypeStart];if(i){let t=e[0],r=e[1],o=Math.atan2(r.y-t.y,r.x-t.x);n[0].x=t.x+i*Math.cos(o),n[0].y=t.y+i*Math.sin(o)}let o=t.arrowTypeEnd&&r.hq[t.arrowTypeEnd];if(o){let t=e.length,r=e[t-2],i=e[t-1],l=Math.atan2(i.y-r.y,i.x-r.x);n[t-1].x=i.x-o*Math.cos(l),n[t-1].y=i.y-o*Math.sin(l)}return n}function c(e,t,n,r,i){let o=e.point.x,l=e.point.y,a={x:o-t*e.r,y:l-n*e.r},s={x:o+t*e.r,y:l+n*e.r},d=[`L${g(a)}`];return"arc"===i?d.push(`A${h(e.r)},${h(e.r)} 0 0 ${r} ${g(s)}`):d.push(`M${g(s)}`),d}function y(e,t,n,r){let i=t.x-e.x,o=t.y-e.y,l=n.x-t.x,a=n.y-t.y,s=Math.hypot(i,o),d=Math.hypot(l,a);if(s<1e-5||d<1e-5)return null;let u=i/s,h=o/s,g=l/d,f=a/d,p=Math.acos(Math.max(-1,Math.min(1,u*g+h*f)));if(p<1e-5||1e-5>Math.abs(Math.PI-p))return null;let c=Math.min(r/Math.sin(p/2),s/2,d/2);return{startX:t.x-u*c,startY:t.y-h*c,endX:t.x+g*c,endY:t.y+f*c,ctrlX:t.x,ctrlY:t.y,cutLen:c}}function x(e,t,n){let r=e.points;if(r.length<2)return"";let i=p(r,e),o="rounded"===e.curve,a=l(i),s=new Map;for(let e of t){let t=a[e.segIndex];if(!t)continue;let r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),i=s.get(e.segIndex)??[];i.push({t:e.t,point:e.point,d:e.t*r,r:n.jumpRadius}),s.set(e.segIndex,i)}let d=[`M${g(i[0])}`];for(let e=0;e<a.length;e++){let t=a[e],r=Math.hypot(t.b.x-t.a.x,t.b.y-t.a.y),l=0===r?0:(t.b.x-t.a.x)/r,u=0===r?0:(t.b.y-t.a.y)/r,p=f(t),x=0;if(o&&e>0){let t=y(i[e-1],i[e],i[e+1]??i[e],5);t&&(x=t.cutLen)}let b=r,m=null;o&&e<a.length-1&&(m=y(i[e],i[e+1],i[e+2]??i[e+1],5))&&(b=r-m.cutLen);let k=.6*n.jumpRadius,w=[...s.get(e)??[]].sort((e,t)=>e.t-t.t).filter(e=>{let t=Math.min(e.d-x,b-e.d)-2;return e.r=Math.min(e.r,t),e.r>=k});for(let e=0;e<w.length-1;e++){let t=w[e+1].d-w[e].d;if(w[e].r+w[e+1].r>t){let n=t/2;w[e].r=Math.min(w[e].r,n),w[e+1].r=Math.min(w[e+1].r,n)}}for(let e of w)e.r<k||d.push(...c(e,l,u,p,n.jumpStyle));o&&m?(d.push(`L${h(m.startX)},${h(m.startY)}`),d.push(`Q${h(m.ctrlX)},${h(m.ctrlY)} ${h(m.endX)},${h(m.endY)}`)):d.push(`L${g(t.b)}`)}return d.join(" ")}function b(e){return/^[\d\s+,.LMelm-]*$/.test(e)}function m(e){return!e||"linear"===e||"rounded"===e||"step"===e||"stepBefore"===e||"stepAfter"===e}function k(e){if(!e)return null;try{let t="function"==typeof atob?atob(e):o.from(e,"base64").toString(),n=JSON.parse(t);if(!Array.isArray(n))return null;let r=[];for(let e of n)e&&"number"==typeof e.x&&"number"==typeof e.y&&r.push({x:e.x,y:e.y});return r.length>=2?r:null}catch{return null}}function w(e,t,n){if(!n.enabled)return;let r=e.node();if(!r)return;let i=new Map;for(let e of t)i.set(e.id,e);let o=new Map;for(let e of r.querySelectorAll("path[data-id]")){let t=e.getAttribute("data-id");null===t||o.has(t)||o.set(t,e)}let l=[];for(let e of t){let t=o.get(e.id);if(!t)continue;let n=k(t.getAttribute("data-points"))??e.points;l.push({...e,points:n})}let a=u(l);if(0===a.length)return;let s=new Map;for(let e of a){let t=s.get(e.jumpEdgeId)??[];t.push(e),s.set(e.jumpEdgeId,t)}for(let e of l){let t=s.get(e.id);if(!t||0===t.length)continue;let r=i.get(e.id),l=r?.curve;if(void 0!==l&&!m(l))continue;let a=o.get(e.id);if(!a||void 0===l&&!b(a.getAttribute("d")??""))continue;let d=a.getAttribute("style")??"",u=/stroke-dasharray\s*:\s*0\s+([\d.]+)\s+[\d.]+\s+([\d.]+)/.exec(d),h=u?Number.parseFloat(u[1]):null,g=u?Number.parseFloat(u[2]):null,f=x(e,t,n);if(a.setAttribute("d",f),null!==h&&null!==g&&"function"==typeof a.getTotalLength){let e=Math.max(0,a.getTotalLength()-h-g),t=`0 ${h} ${e} ${g}`,n=d.replace(/stroke-dasharray\s*:[^;]*;?/g,`stroke-dasharray: ${t};`).replace(/;\s*;+/g,";");a.setAttribute("style",n)}}}(0,i.K)(l,"buildSegmentList"),(0,i.K)(a,"segmentIntersection"),(0,i.K)(s,"isHorizontalSeg"),(0,i.K)(d,"crossingSitsInRoundedCorner"),(0,i.K)(u,"findEdgeIntersections"),(0,i.K)(h,"fmt"),(0,i.K)(g,"pointToString"),(0,i.K)(f,"getArcSweepFlag"),(0,i.K)(p,"applyMarkerOffsets"),(0,i.K)(c,"emitJump"),(0,i.K)(y,"computeRoundedCorner"),(0,i.K)(x,"rewriteEdgePath"),(0,i.K)(b,"isStraightPath"),(0,i.K)(m,"curveSupportsLineHops"),(0,i.K)(k,"decodeDataPoints"),(0,i.K)(w,"applyLineJumpsToSvg")}}]);
|